commit 7899310a583ad09d0b5e88cec21e04b98116c8c5 Author: behnamrhp Date: Tue Jan 16 17:23:08 2024 +0300 First demo of image editor diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..47c6695 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,18 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', + ], + ignorePatterns: ['dist', '.eslintrc.cjs', "src/components/@pqina/**"], + parser: '@typescript-eslint/parser', + plugins: ['react-refresh'], + rules: { + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a248e9e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +# ---------------------------------------------------------------------------- # +# Base image for building from +FROM node:18-alpine AS base +# ---------------------------------------------------------------------------- # +# Install dependencies of project +# Choosing the right package manager +FROM base AS deps +RUN apk add --no-cache libc6-compat git +WORKDIR /app + +ARG YARN_CACHE_FOLDER=/var/yarn/.cache +RUN yarn config set cache-folder $YARN_CACHE_FOLDER # just to be explicit +RUN --mount=type=cache,mode=0777,target=$YARN_CACHE_FOLDER yarn cache list + +COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ +RUN --mount=type=cache,mode=0777,target=$YARN_CACHE_FOLDER \ + if [ -f yarn.lock ]; then YARN_CACHE_FOLDER=$YARN_CACHE_FOLDER yarn --frozen-lockfile; \ + elif [ -f package-lock.json ]; then npm ci; \ + elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \ + else echo "Lockfile not found." && exit 1; \ + fi +# ---------------------------------------------------------------------------- # +# Rebuild the source code only when needed +FROM base AS builder +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY . . + +RUN yarn build +# ---------------------------------------------------------------------------- # +FROM nginx:1.23.1-alpine + +COPY ./nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf +COPY --from=builder /app/dist /usr/share/nginx/html + +RUN touch /var/run/nginx.pid +RUN chown -R nginx:nginx /var/run/nginx.pid /var/cache/nginx /var/log/nginx /etc/nginx/conf.d + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..0d6babe --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: + +- Configure the top-level `parserOptions` property like this: + +```js +export default { + // other rules... + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + project: ['./tsconfig.json', './tsconfig.node.json'], + tsconfigRootDir: __dirname, + }, +} +``` + +- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` +- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` +- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b7e2569 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +version: "3.3" +services: + kaiser-demo-image-editor: + ports: + - 8000:80 + build: . \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..28d5720 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Kaiser Demo Image editor + + +
+ + + diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf new file mode 100644 index 0000000..20a9beb --- /dev/null +++ b/nginx/conf.d/default.conf @@ -0,0 +1,10 @@ +server_tokens off; +server { + listen 80; + root /usr/share/nginx/html; + index index.html; + server_name localhost; + location / { + try_files $uri $uri/ /index.html; + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..eef455b --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3177 @@ +{ + "name": "react-test", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "react-test", + "version": "0.0.0", + "dependencies": { + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", + "@mui/material": "^5.14.18", + "@mui/styled-engine": "^5.14.18", + "@mui/styled-engine-sc": "^6.0.0-alpha.6", + "@mui/x-data-grid-pro": "^6.18.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "styled-components": "^6.1.1" + }, + "devDependencies": { + "@types/react": "^18.2.37", + "@types/react-dom": "^18.2.15", + "@typescript-eslint/eslint-plugin": "^6.10.0", + "@typescript-eslint/parser": "^6.10.0", + "@vitejs/plugin-react-swc": "^3.5.0", + "eslint": "^8.53.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.4", + "typescript": "^5.2.2", + "vite": "^5.0.0" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.4.tgz", + "integrity": "sha512-r1IONyb6Ia+jYR2vvIDhdWdlTGhqbBoFqLTQidzZ4kepUFH15ejXvFHxCVbtl7BOXIudsIubf4E81xeA3h3IXA==", + "dependencies": { + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/runtime": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.4.tgz", + "integrity": "sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.4.tgz", + "integrity": "sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==", + "dependencies": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emotion/babel-plugin": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", + "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/serialize": "^1.1.2", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", + "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", + "dependencies": { + "@emotion/memoize": "^0.8.1", + "@emotion/sheet": "^1.2.2", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", + "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", + "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", + "dependencies": { + "@emotion/memoize": "^0.8.1" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + }, + "node_modules/@emotion/react": { + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz", + "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/cache": "^11.11.0", + "@emotion/serialize": "^1.1.2", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz", + "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==", + "dependencies": { + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/unitless": "^0.8.1", + "@emotion/utils": "^1.2.1", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", + "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" + }, + "node_modules/@emotion/styled": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.0.tgz", + "integrity": "sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/is-prop-valid": "^1.2.1", + "@emotion/serialize": "^1.1.2", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", + "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", + "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", + "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.7.tgz", + "integrity": "sha512-ZYZopyLhm4mcoZXjFt25itRlocKlcazDVkB4AhioiL9hOWhDldU9n38g62fhOI4Pth6vp+Mrd5rFKxD0/S+7aQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz", + "integrity": "sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==", + "dependencies": { + "@floating-ui/utils": "^0.1.3" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.3.tgz", + "integrity": "sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==", + "dependencies": { + "@floating-ui/core": "^1.4.2", + "@floating-ui/utils": "^0.1.3" + } + }, + "node_modules/@floating-ui/react-dom": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.4.tgz", + "integrity": "sha512-CF8k2rgKeh/49UrnIBs4BdxPUV6vize/Db1d/YbCLyp9GiVZ0BEwf5AiDSxJRCr6yOkGqTFHtmrULxkEfYZ7dQ==", + "dependencies": { + "@floating-ui/dom": "^1.5.1" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", + "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@mui/base": { + "version": "5.0.0-beta.24", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.24.tgz", + "integrity": "sha512-bKt2pUADHGQtqWDZ8nvL2Lvg2GNJyd/ZUgZAJoYzRgmnxBL9j36MSlS3+exEdYkikcnvVafcBtD904RypFKb0w==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@floating-ui/react-dom": "^2.0.4", + "@mui/types": "^7.2.9", + "@mui/utils": "^5.14.18", + "@popperjs/core": "^2.11.8", + "clsx": "^2.0.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.18.tgz", + "integrity": "sha512-yFpF35fEVDV81nVktu0BE9qn2dD/chs7PsQhlyaV3EnTeZi9RZBuvoEfRym1/jmhJ2tcfeWXiRuHG942mQXJJQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + } + }, + "node_modules/@mui/material": { + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.18.tgz", + "integrity": "sha512-y3UiR/JqrkF5xZR0sIKj6y7xwuEiweh9peiN3Zfjy1gXWXhz5wjlaLdoxFfKIEBUFfeQALxr/Y8avlHH+B9lpQ==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/base": "5.0.0-beta.24", + "@mui/core-downloads-tracker": "^5.14.18", + "@mui/system": "^5.14.18", + "@mui/types": "^7.2.9", + "@mui/utils": "^5.14.18", + "@types/react-transition-group": "^4.4.8", + "clsx": "^2.0.0", + "csstype": "^3.1.2", + "prop-types": "^15.8.1", + "react-is": "^18.2.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/private-theming": { + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.18.tgz", + "integrity": "sha512-WSgjqRlzfHU+2Rou3HlR2Gqfr4rZRsvFgataYO3qQ0/m6gShJN+lhVEvwEiJ9QYyVzMDvNpXZAcqp8Y2Vl+PAw==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/utils": "^5.14.18", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.14.18.tgz", + "integrity": "sha512-pW8bpmF9uCB5FV2IPk6mfbQCjPI5vGI09NOLhtGXPeph/4xIfC3JdIX0TILU0WcTs3aFQqo6s2+1SFgIB9rCXA==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@emotion/cache": "^11.11.0", + "csstype": "^3.1.2", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine-sc": { + "version": "6.0.0-alpha.6", + "resolved": "https://registry.npmjs.org/@mui/styled-engine-sc/-/styled-engine-sc-6.0.0-alpha.6.tgz", + "integrity": "sha512-gLES93s5AyZss2EOGBpUF5YNtjbCnRAN1csuFMs8eRnFsQdJGPOdLF1SwgTvOmGDM3JFuGOEOE2XEVuvjhnoUw==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "csstype": "^3.1.2", + "hoist-non-react-statics": "^3.3.2", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "styled-components": "^6.0.0" + } + }, + "node_modules/@mui/system": { + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.18.tgz", + "integrity": "sha512-hSQQdb3KF72X4EN2hMEiv8EYJZSflfdd1TRaGPoR7CIAG347OxCslpBUwWngYobaxgKvq6xTrlIl+diaactVww==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/private-theming": "^5.14.18", + "@mui/styled-engine": "^5.14.18", + "@mui/types": "^7.2.9", + "@mui/utils": "^5.14.18", + "clsx": "^2.0.0", + "csstype": "^3.1.2", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.9", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.9.tgz", + "integrity": "sha512-k1lN/PolaRZfNsRdAqXtcR71sTnv3z/VCCGPxU8HfdftDkzi335MdJ6scZxvofMAd/K/9EbzCZTFBmlNpQVdCg==", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.18.tgz", + "integrity": "sha512-HZDRsJtEZ7WMSnrHV9uwScGze4wM/Y+u6pDVo+grUjt5yXzn+wI8QX/JwTHh9YSw/WpnUL80mJJjgCnWj2VrzQ==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@types/prop-types": "^15.7.10", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/x-data-grid": { + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-6.18.1.tgz", + "integrity": "sha512-ibsrWwzM2lRRWB1xs/eop63kaxlXH/qar1S1rQx3fycJiYvK6fsM72jsScBNRlRZQQwRVSGI0ZPBsOZ+/tg7Qw==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/utils": "^5.14.16", + "clsx": "^2.0.0", + "prop-types": "^15.8.1", + "reselect": "^4.1.8" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@mui/material": "^5.4.1", + "@mui/system": "^5.4.1", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + } + }, + "node_modules/@mui/x-data-grid-pro": { + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@mui/x-data-grid-pro/-/x-data-grid-pro-6.18.1.tgz", + "integrity": "sha512-UP5SE3fwWHgGZ9l4+4TPkbAw5gE4jzGo3raU47+0OOTrqhYbnu9msGLIRX5oV7SzEeEkLd4HeMlv8ns2lBkVjg==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/utils": "^5.14.16", + "@mui/x-data-grid": "6.18.1", + "@mui/x-license-pro": "6.10.2", + "@types/format-util": "^1.0.3", + "clsx": "^2.0.0", + "prop-types": "^15.8.1", + "reselect": "^4.1.8" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "@mui/material": "^5.4.1", + "@mui/system": "^5.4.1", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + } + }, + "node_modules/@mui/x-license-pro": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/@mui/x-license-pro/-/x-license-pro-6.10.2.tgz", + "integrity": "sha512-Baw3shilU+eHgU+QYKNPFUKvfS5rSyNJ98pQx02E0gKA22hWp/XAt88K1qUfUMPlkPpvg/uci6gviQSSLZkuKw==", + "dependencies": { + "@babel/runtime": "^7.22.6", + "@mui/utils": "^5.13.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.5.1.tgz", + "integrity": "sha512-CWPkPGrFfN2vj3mw+S7A/4ZaU3rTV7AkXUr08W9lNP+UzOvKLVf34tWCqrKrfwQ0NTk5GFqUr2XGpeR2p6R4gw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.5.1.tgz", + "integrity": "sha512-ZRETMFA0uVukUC9u31Ed1nx++29073goCxZtmZARwk5aF/ltuENaeTtRVsSQzFlzdd4J6L3qUm+EW8cbGt0CKQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@swc/core": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.99.tgz", + "integrity": "sha512-8O996RfuPC4ieb4zbYMfbyCU9k4gSOpyCNnr7qBQ+o7IEmh8JCV6B8wwu+fT/Om/6Lp34KJe1IpJ/24axKS6TQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.1", + "@swc/types": "^0.1.5" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.3.99", + "@swc/core-darwin-x64": "1.3.99", + "@swc/core-linux-arm64-gnu": "1.3.99", + "@swc/core-linux-arm64-musl": "1.3.99", + "@swc/core-linux-x64-gnu": "1.3.99", + "@swc/core-linux-x64-musl": "1.3.99", + "@swc/core-win32-arm64-msvc": "1.3.99", + "@swc/core-win32-ia32-msvc": "1.3.99", + "@swc/core-win32-x64-msvc": "1.3.99" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.99.tgz", + "integrity": "sha512-fGrXYE6DbTfGNIGQmBefYxSk3rp/1lgbD0nVg4rl4mfFRQPi7CgGhrrqSuqZ/ezXInUIgoCyvYGWFSwjLXt/Qg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.99.tgz", + "integrity": "sha512-kvgZp/mqf3IJ806gUOL6gN6VU15+DfzM1Zv4Udn8GqgXiUAvbQehrtruid4Snn5pZTLj4PEpSCBbxgxK1jbssA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz", + "integrity": "sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@swc/types": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", + "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@types/format-util": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/format-util/-/format-util-1.0.4.tgz", + "integrity": "sha512-xrCYOdHh5zA3LUrn6CvspYwlzSWxPso11Lx32WnAG6KvLCRecKZ/Rh21PLXUkzUFsQmrGcx/traJAFjR6dVS5Q==" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" + }, + "node_modules/@types/prop-types": { + "version": "15.7.11", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", + "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==", + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.2.38", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.38.tgz", + "integrity": "sha512-cBBXHzuPtQK6wNthuVMV6IjHAFkdl/FOPFIlkd81/Cd1+IqkHu/A+w4g43kaQQoYHik/ruaQBDL72HyCy1vuMw==", + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.2.17", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.17.tgz", + "integrity": "sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.9.tgz", + "integrity": "sha512-ZVNmWumUIh5NhH8aMD9CR2hdW0fNuYInlocZHaZ+dgk/1K49j1w/HoAuK1ki+pgscQrOFRTlXeoURtuzEkV3dg==", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/scheduler": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", + "license": "MIT" + }, + "node_modules/@types/semver": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/stylis": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.4.tgz", + "integrity": "sha512-36ZrGJ8fgtBr6nwNnuJ9jXIj+bn/pF6UoqmrQT7+Y99+tFFeHHsoR54+194dHdyhPjgbeoNz3Qru0oRt0l6ASQ==" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.12.0.tgz", + "integrity": "sha512-XOpZ3IyJUIV1b15M7HVOpgQxPPF7lGXgsfcEIu3yDxFPaf/xZKt7s9QO/pbk7vpWQyVulpJbu4E5LwpZiQo4kA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.12.0", + "@typescript-eslint/type-utils": "6.12.0", + "@typescript-eslint/utils": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz", + "integrity": "sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "6.12.0", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/typescript-estree": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.12.0.tgz", + "integrity": "sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.12.0.tgz", + "integrity": "sha512-WWmRXxhm1X8Wlquj+MhsAG4dU/Blvf1xDgGaYCzfvStP2NwPQh6KBvCDbiOEvaE0filhranjIlK/2fSTVwtBng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "6.12.0", + "@typescript-eslint/utils": "6.12.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.12.0.tgz", + "integrity": "sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.12.0.tgz", + "integrity": "sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/visitor-keys": "6.12.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.12.0.tgz", + "integrity": "sha512-LywPm8h3tGEbgfyjYnu3dauZ0U7R60m+miXgKcZS8c7QALO9uWJdvNoP+duKTk2XMWc7/Q3d/QiCuLN9X6SWyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.12.0", + "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/typescript-estree": "6.12.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.12.0.tgz", + "integrity": "sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.12.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@vitejs/plugin-react-swc": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.5.0.tgz", + "integrity": "sha512-1PrOvAaDpqlCV+Up8RkAh9qaiUjoDUcjtttyhXDKw53XA6Ve16SOp6cCOpRs8Dj8DqUQs6eTW5YkLcLJjrXAig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@swc/core": "^1.3.96" + }, + "peerDependencies": { + "vite": "^4 || ^5" + } + }, + "node_modules/acorn": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelize": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", + "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/clsx": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", + "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/css-to-react-native": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", + "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", + "dependencies": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^4.0.2" + } + }, + "node_modules/csstype": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/esbuild": { + "version": "0.19.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.7.tgz", + "integrity": "sha512-6brbTZVqxhqgbpqBR5MzErImcpA0SQdoKOkcWK/U30HtQxnokIpG3TX2r0IJqbFUzqLjhU/zC1S5ndgakObVCQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.19.7", + "@esbuild/android-arm64": "0.19.7", + "@esbuild/android-x64": "0.19.7", + "@esbuild/darwin-arm64": "0.19.7", + "@esbuild/darwin-x64": "0.19.7", + "@esbuild/freebsd-arm64": "0.19.7", + "@esbuild/freebsd-x64": "0.19.7", + "@esbuild/linux-arm": "0.19.7", + "@esbuild/linux-arm64": "0.19.7", + "@esbuild/linux-ia32": "0.19.7", + "@esbuild/linux-loong64": "0.19.7", + "@esbuild/linux-mips64el": "0.19.7", + "@esbuild/linux-ppc64": "0.19.7", + "@esbuild/linux-riscv64": "0.19.7", + "@esbuild/linux-s390x": "0.19.7", + "@esbuild/linux-x64": "0.19.7", + "@esbuild/netbsd-x64": "0.19.7", + "@esbuild/openbsd-x64": "0.19.7", + "@esbuild/sunos-x64": "0.19.7", + "@esbuild/win32-arm64": "0.19.7", + "@esbuild/win32-ia32": "0.19.7", + "@esbuild/win32-x64": "0.19.7" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.54.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", + "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.4.tgz", + "integrity": "sha512-eD83+65e8YPVg6603Om2iCIwcQJf/y7++MWm4tACtEswFLYMwxwVWAfwN+e19f5Ad/FOyyNg9Dfi5lXhH3Y3rA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "eslint": ">=7" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/ignore": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + }, + "node_modules/reselect": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==" + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.5.1.tgz", + "integrity": "sha512-0EQribZoPKpb5z1NW/QYm3XSR//Xr8BeEXU49Lc/mQmpmVVG5jPUVrpc2iptup/0WMrY9mzas0fxH+TjYvG2CA==", + "dev": true, + "license": "MIT", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.5.1", + "@rollup/rollup-android-arm64": "4.5.1", + "@rollup/rollup-darwin-arm64": "4.5.1", + "@rollup/rollup-darwin-x64": "4.5.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.5.1", + "@rollup/rollup-linux-arm64-gnu": "4.5.1", + "@rollup/rollup-linux-arm64-musl": "4.5.1", + "@rollup/rollup-linux-x64-gnu": "4.5.1", + "@rollup/rollup-linux-x64-musl": "4.5.1", + "@rollup/rollup-win32-arm64-msvc": "4.5.1", + "@rollup/rollup-win32-ia32-msvc": "4.5.1", + "@rollup/rollup-win32-x64-msvc": "4.5.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/styled-components": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.1.tgz", + "integrity": "sha512-cpZZP5RrKRIClBW5Eby4JM1wElLVP4NQrJbJ0h10TidTyJf4SIIwa3zLXOoPb4gJi8MsJ8mjq5mu2IrEhZIAcQ==", + "dependencies": { + "@emotion/is-prop-valid": "^1.2.1", + "@emotion/unitless": "^0.8.0", + "@types/stylis": "^4.0.2", + "css-to-react-native": "^3.2.0", + "csstype": "^3.1.2", + "postcss": "^8.4.31", + "shallowequal": "^1.1.0", + "stylis": "^4.3.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/styled-components" + }, + "peerDependencies": { + "react": ">= 16.8.0", + "react-dom": ">= 16.8.0" + } + }, + "node_modules/styled-components/node_modules/stylis": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.0.tgz", + "integrity": "sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ==" + }, + "node_modules/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vite": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.2.tgz", + "integrity": "sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.19.3", + "postcss": "^8.4.31", + "rollup": "^4.2.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..acd4bb0 --- /dev/null +++ b/package.json @@ -0,0 +1,37 @@ +{ + "name": "react-test", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "@pqina/pintura": "^8.71.2", + "@pqina/react-pintura": "^9.0.3", + "@pqina/filepond-plugin-image-editor": "^9.0.3", + "i": "^0.3.7", + "filepond": "^4.x", + "filepond-plugin-file-poster": "^2.x", + "filepond-plugin-file-validate-type": "^1.2.8", + "npm": "^10.3.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "styled-components": "^6.1.1" + }, + "devDependencies": { + "@types/react": "^18.2.37", + "@types/react-dom": "^18.2.15", + "@typescript-eslint/eslint-plugin": "^6.10.0", + "@typescript-eslint/parser": "^6.10.0", + "@vitejs/plugin-react-swc": "^3.5.0", + "eslint": "^8.53.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.4", + "typescript": "^5.2.2", + "vite": "^5.0.0" + } +} diff --git a/public/image.jpeg b/public/image.jpeg new file mode 100644 index 0000000..6401289 Binary files /dev/null and b/public/image.jpeg differ diff --git a/public/vite.svg b/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app-image.tsx b/src/app-image.tsx new file mode 100644 index 0000000..4a53549 --- /dev/null +++ b/src/app-image.tsx @@ -0,0 +1,86 @@ + +import './components/@pqina/pintura/pintura.css'; +import { useRef, useState } from 'react'; + +// react-pintura +import { PinturaEditor } from './components/@pqina/react-pintura'; + +// pintura +import './components/@pqina/pintura/pintura.css'; +import { + // editor + locale_en_gb, + createDefaultImageReader, + createDefaultImageWriter, + createDefaultShapePreprocessor, + + // plugins + setPlugins, + plugin_crop, + plugin_crop_locale_en_gb, + plugin_finetune, + plugin_finetune_locale_en_gb, + plugin_finetune_defaults, + plugin_filter, + plugin_filter_locale_en_gb, + plugin_filter_defaults, + plugin_annotate, + plugin_annotate_locale_en_gb, + markup_editor_defaults, + markup_editor_locale_en_gb, +} from './components/@pqina/pintura'; + +setPlugins(plugin_crop, plugin_finetune, plugin_filter, plugin_annotate); + +const editorDefaults = { + imageReader: createDefaultImageReader(), + imageWriter: createDefaultImageWriter(), + shapePreprocessor: createDefaultShapePreprocessor(), + ...plugin_finetune_defaults, + ...plugin_filter_defaults, + ...markup_editor_defaults, + locale: { + ...locale_en_gb, + ...plugin_crop_locale_en_gb, + ...plugin_finetune_locale_en_gb, + ...plugin_filter_locale_en_gb, + ...plugin_annotate_locale_en_gb, + ...markup_editor_locale_en_gb, + }, +}; + +export default function AppImage() { + const [inlineResult, setInlineResult] = useState(""); + const editorRef = useRef(null); + + return ( +
+ { + + // not yet set + if (!editorRef.current) return; + + // Example using editor ref + const { editor } = editorRef.current; + + // Now we can access properties and methods + editor.imageCropAspectRatio = 1; + }} + onProcess={(res: {dest: File}) => { + setInlineResult(URL.createObjectURL(res.dest)) + } + } + /> + + {inlineResult && } +
+); +} diff --git a/src/components/@pqina/filepond-plugin-image-editor/README.md b/src/components/@pqina/filepond-plugin-image-editor/README.md new file mode 100644 index 0000000..1af3f47 --- /dev/null +++ b/src/components/@pqina/filepond-plugin-image-editor/README.md @@ -0,0 +1,20 @@ +# FilePond Plugin Image Editor + +This package makes it easy to connect [FilePond](https://pqina.nl/filepond) with [Pintura](https://pqina.nl/pintura). + +Visit https://pqina.nl/pintura for more details. + +Example projects: + +- https://github.com/pqina/pintura-example-javascript +- https://github.com/pqina/pintura-example-jquery +- https://github.com/pqina/pintura-example-react +- https://github.com/pqina/pintura-example-react-typescript +- https://github.com/pqina/pintura-example-vue-2 +- https://github.com/pqina/pintura-example-vue-3 +- https://github.com/pqina/pintura-example-angular +- https://github.com/pqina/pintura-example-nextjs +- https://github.com/pqina/pintura-example-nuxt-2 +- https://github.com/pqina/pintura-example-nuxt-3 +- https://github.com/pqina/pintura-example-svelte +- https://github.com/pqina/pintura-example-sveltekit diff --git a/src/components/@pqina/filepond-plugin-image-editor/package.json b/src/components/@pqina/filepond-plugin-image-editor/package.json new file mode 100644 index 0000000..f2ac6ef --- /dev/null +++ b/src/components/@pqina/filepond-plugin-image-editor/package.json @@ -0,0 +1,28 @@ +{ + "name": "@pqina/filepond-plugin-image-editor", + "version": "9.0.3", + "browser": "dist/FilePondPluginImageEditor.js", + "main": "dist/FilePondPluginImageEditor.js", + "types": "dist/FilePondPluginImageEditor.d.ts", + "author": "Rik Schennink at PQINA", + "homepage": "https://pqina.nl/pintura/", + "license": "https://pqina.nl/pintura/license/", + "description": "A FilePond plugin to connect with Pintura", + "type": "module", + "files": [ + "dist" + ], + "scripts": { + "dev": "vite", + "build": "vite build && cp -rf src/FilePondPluginImageEditor.d.ts dist/FilePondPluginImageEditor.d.ts", + "preview": "vite preview" + }, + "peerDependencies": { + "filepond": "4.x" + }, + "devDependencies": { + "vite": "^4.3.5", + "tslib": "^2.5.0", + "typescript": "^5.0.4" + } +} diff --git a/src/components/@pqina/pintura/CHANGELOG.md b/src/components/@pqina/pintura/CHANGELOG.md new file mode 100644 index 0000000..9c3a574 --- /dev/null +++ b/src/components/@pqina/pintura/CHANGELOG.md @@ -0,0 +1,2804 @@ +# Changelog + +## 8.71.2 | 2024-01-09 + +- Fix issue with shape brush size being set to `undefined` after removing `strokWidth` from other shape. + +## 8.71.1 | 2023-12-27 + +- Fix issue with `backgroundPosition` missing in TypeScript declarations. +- Fix `backgroundSize` not working if `backgroundPosition` wasn't defined. +- Fix `backgroundRepeat` offset when setting `backgroundPosition`. + +## 8.71.0 | 2023-12-22 + +- Add basic support for `backgroundRepeat`, set to `'repeat'` to repeat `backgroundImage` on a rectangle shape. + +## 8.70.1 | 2023-12-14 + +- Fix issue where redact shapes would sometimes only show edges. + +## 8.70.0 | 2023-12-13 + +- Add snap to shapes. +- Add snap to grid. +- Add snap to current context edges and center. +- Add hold Ctrl key or Command key to disable snapping. +- Add hold Ctrl key to center shape on draw origin while drawing. +- Add hold Shift key to lock drag axis. +- Add hold Shift key to lock shape aspect ratio while drawing. +- Add `markupEditorSnapThreshold` to control snap distance, defaults to `0` which means snapping is disabled. +- Add `markupEditorSnapToContext` to control snapping to context edges and center, defaults to `true`, only works if `markupEditorSnapThreshold` is above `0`. +- Add `markupEditorGridSize` to control snap grid size, defaults to `0` which means a grid is not drawn. +- Add `annotateGridSize`, and `annotateSnapToContext`, to control snapping in Annotate util. +- Add `decorateGridSize`, and `decorateSnapToContext`, to control snapping in Decorate util. +- Add showing text effects when editing text. +- Fix issue where `text-shadow` and `text-outline` were rendered incorrectly when text height was set. + +## 8.69.3 | 2023-12-08 + +- Fix issue where trim util wouldn't work when video duration was below 1 second. + +## 8.69.2 | 2023-12-07 + +- Fix issue with crop util not rendering correctly when it was the only util active. +- Fix issue with confirming selection in predictive keyboard input. + +## 8.69.1 | 2023-12-05 + +- Fix issue with sharpie tool being slow after multiple paths drawn. +- Fix issue with capitals in locale folder. + +## 8.69.0 | 2023-11-27 + +- Add outline and textShadow support to text shapes. +- Add `stickerForceEnable`, set to `true` to show the Stickers util even when the `stickers` prop is not set. +- Fix issue with `enableTapToAddText` where tapping outside an active text field would immediately create a new text field instead of confirming text in the currently active text field. + +## 8.68.3 | 2023-11-26 + +- Fix issue with feather error when drawing image shape. + +## 8.68.2 | 2023-11-21 + +- Fix issue where undo and redo would not work for sharpie lines. + +## 8.68.1 | 2023-11-20 + +- Fix issue where Crop util footer would still be rendered even when both the rotation and scale control were disabled. +- Fix issue where `imageTrim` wasn't set automatically when `imageMaxDuration` was defined. + +## 8.68.0 | 2023-11-16 + +- Add `foregroundColor`, `targetSize`, and `forceSquareCanvas` to `selectionToMask` options. +- Add `foregroundColor`, `targetSize`, `maskFormat`, `shapeFormat`, and `mimeType` to `createRetouchShape` options. +- Add correctly transformed `shape` to `selectionToMask` result object. +- Fix issue where mask wasn't correctly aligned when image was flipped or rotated. +- Fix issue where rectangular masks were rotated incorrectly. +- Fix issue where padding was incorrectly applied to the mask rectangle instead of the mask canvas. +- Fix stretched inpaint results when mask wasn't square, can now force square mask with `forceSquareCanvas`. +- Fix bug where Chrome 119 wouldn't correctly composite canvas operations. + +## 8.67.4 | 2023-11-06 + +- Fix issue with path tool not drawing more than one anchor point inside other shape. +- Fix `selectionToMask` return type in TypeScript declarations. + +## 8.67.3 | 2023-11-02 + +- Fix TypeScript declarations missing Retouch plugin options. + +## 8.67.2 | 2023-10-26 + +- Fix issue where retouch selections were very slow when used on large images. +- Improve memory management for video sources. + +## 8.67.1 | 2023-10-19 + +- Fix issue where button icon for custom panel component could not be set. + +## 8.67.0 | 2023-10-19 + +- Add detection of `data-touch-scroll` attribute on custom child elements, set to `true` to enable touch scrolling on iOS. + +## 8.66.3 | 2023-10-09 + +- Fix issue where `minDuration` and `maxDuration` weren't part of imageState. + +## 8.66.2 | 2023-10-05 + +- Fix issue with shortcut options no longer working when passed to `createMarkupEditorShapeStyleControls` + +## 8.66.1 | 2023-10-03 + +- Fix issue where deprecated `stickerEnableSelectImage` prop would not enable sticker util. +- Fix types. + +## 8.66.0 | 2023-09-27 + +This release adds support for pixel manipulation using the retouch plugin, for an example implementation of the new features see: https://github.com/pqina/pintura-example-feature-retouch + +- Add `textDirection` property, set to `'rtl'` to enable right-to-left text direction. +- Add `retouch` plugin, this plugin just like `sticker` is a plugin that is empty by default. +- Add `getShapeById` helper function to quickly find a shape by id in a collection of shapes. +- Add `updateShapeById` helper function to quickly update a shape in a collection by id. +- Add `selectionToMask` helper function to create a canvas or blob masked when passed a selection array. +- Add `createRetouchShape` helper function to make it easier to create retouch shapes. +- Add `createMarkupEditorBrushSizeControl` helper function to create a brush size control. +- Add `createMarkupEditorSelectionModeControl` helper function to create a selection mode controls showing new, add, subtract selection modes. +- Add `createMarkupEditorSelectionToolStyles` helper function to create brush, lassoo, rectangle, and ellipse selection tool styles. +- Add `createMarkupEditorSelectionTools` helper function to create brush, lassoo, rectangle, and ellipse tool buttons. +- Add `bitmap` prop to shape, set to `true` to render shape with canvas, currently only works for path based shapes. +- Add `letterSpacing` prop to shape. +- Add shape `status` property, set to `'loading'`, or `'error'` to show loading indicator or error state. +- Add support for `strokeDash`, `strokeCap`, and `strokeJoin` to `bitmap` based path shapes. +- Add `showTextInput` and `hideTextInput` editor methods to toggle quick text input. +- Add `imageSelection` array to read out or write to current selection shapes. +- Add `imageManipulation` array to render shapes in image layer. +- Add `cursorStyle: 'ellipse'` to sharpie and eraser shapes. +- Add `strokeJoin: 'round'`, and `strokeCap: 'round'` to sharpie. +- Add `cursorSize` property to shape, takes a fixed size or a shape property reference to read cursor size from. +- Add support for tool groups in the util toolbar. +- Add `'blurshape'`, `'selectiondown'`, `'selectionup'`, and `'selectionchange'`, events. +- Add `feather` property to lower opacity towards edges of rectangle shapes. +- Add `selectionStyle` property to shape, set to `'hook'` to only render selection corners when a shape is selected. + +And a long list of other small fixes and improvements. + +## 8.65.0 | 2023-09-13 + +- Add `resizeAspectRatioLocked` to set initial lock stated in resize util. +- Add `resizeEnableButtonLockAspectRatio` to enable or disable the lock button. +- Fix issue where backspace would not remove a newly added sticker. + +## 8.64.6 | 2023-09-12 + +- Fix issue where Firefox would not correclty parse video orientation. + +## 8.64.5 | 2023-09-07 + +- Fix `fontFamilyOptions` property not being read correctly. + +## 8.64.4 | 2023-09-07 + +- Fix regression where `enableInput` no longer worked with font size control. + +## 8.64.3 | 2023-09-05 + +- Fix issue where style control components couldn't be customized on React Native. + +## 8.64.2 | 2023-09-05 + +- Fix issue where style control options couldn't be customized on React Native. + +## 8.64.1 | 2023-08-21 + +- Fix types for new options added to markup editor controls. + +## 8.64.0 | 2023-08-18 + +- Add `enableInput` option to font size and line height controls. Currently only works when sizes are absolute. + +## 8.63.1 | 2023-08-18 + +- Fix issue where Hex color input couldn't be enabled on `strokeColor` and `color` styles. +- Fix issue where Hex input could still input opacity if opacity input was disabled. +- Fix issue where opaque Hex colors would be defined with 8 characters instead of 6. + +## 8.63.0 | 2023-08-16 + +- Add Hex color input to color picker control, this input is disabled by default, enable by passing `enableInput` to `backgroundColor` style control options. +- `createMarkupEditorShapeStyleControls` now also accepts style properties. + +Media controls have been moved to core so media can be controlled from main editor. This functionality only works when video extension is loaded. + +- Add `"play"` and `"pause"` events. +- Add `play()`, starts playing a video. +- Add `pause()`, pauses a playing video. +- Add `togglePlayPause()`, toggle between play and pause mode. +- Add `isPaused()`, returns `true' if the video is paused. +- Add `mute()`, mutes audio. +- Add `unmute()`, restores audio. +- Add `toggleMute()`, toggles mute state. +- Add `getDuration()`, returns the video duration in seconds. +- Add `getCurrentTime()`, returns the current position in seconds. +- Add `setCurrentTime(seconds)`, sets the current position in seconds. + +## 8.62.0 | 2023-08-07 + +- Add `imageMinDuration` to limit the duration and clip lengths of loaded videos. +- Add prevent loading of videos shorter than `imageMinDuration` +- Add Portugese locale files. +- Add Japanese locale files. + +## 8.61.0 | 2023-08-01 + +- Add `createMarkupEditorOptionsControl` helper method to create custom option controls for the style control bar. +- Fix issue with Safari 16.5 on iOS having trouble processing big images. +- Fix issue where redaction logic would run even with no redaction shapes defined. + +## 8.60.15 | 2023-07-25 + +- Fix issue introduced in 8.58.0 where typing an ampersand would throw an error when text format was not set to `'html'`. + +## 8.60.14 | 2023-07-24 + +- Fix issue where a hidden toolbar combined with custom CSS top inset would result in crop rectangle corners being misaligned. + +## 8.60.13 | 2023-07-20 + +- Fix issue where sticker util would not show if no stickers defined but `stickerEnableSelectImagePreset` was `true`. + +## 8.60.12 | 2023-07-06 + +- Fix changelog missing from npm repositories. +- Fix issue with text alignment on Firefox when font size above 1000 pixels. + +## 8.60.11 | 2023-07-04 + +- Fix `legacyDataToImageState` not correctly handling `0` rotation value. +- Fix `alwaysOnTop` missing from `Shape` type declaration. +- Fix incorrectly named media duration reading step in `imageReader` process. +- Fix issue with font size on Firefox being incorrect on large images. + +## 8.60.10 | 2023-06-29 + +- Fix incorrect Fill plugin import in Chinese locale files. + +## 8.60.9 | 2023-06-28 + +- Fix issue with measure loop not correctly detecting editor visibility when creating and destroying multiple editors simultaneously. + +## 8.60.8 | 2023-06-28 + +- Fix video performance issues on Firefox. + +## 8.60.7 | 2023-06-26 + +- Fix integration issues with external plugins like the video extension. + +## 8.60.6 | 2023-06-26 + +- Fix issue with Redact tool being active for video content. + +## 8.60.5 | 2023-06-26 + +- Fix issue with image crop limit to bounds no longer working. +- Fix issue with measure loop not resuming when hiding a primary editor and subsequently showing a secondary editor. + +## 8.60.4 | 2023-06-19 + +- Fix issue with MacOS trackpad zooming in markup editor being too slow. + +## 8.60.3 | 2023-06-16 + +- Fix issue where setting `stickers` after default editor load would not enable sticker util. +- Fix problem with media writer TypeScript types. + +## 8.60.2 | 2023-06-06 + +- Fix issue where transparency grid would not fill crop area. + +## 8.60.1 | 2023-06-06 + +- Fix transition between transparency grid and background-color. + +## 8.60.0 | 2023-06-06 + +- Add transparency grid. Set `enableTransparencyGrid` to `true` to enable. + +## 8.59.1 | 2023-06-05 + +- Fix issue where ellipse and rounded rectangles wouldn't draw correctly during creation phase. + +## 8.59.0 | 2023-06-05 + +- Add `imageRedactionRendering` property, set to `'auto'` to enable blurry instead of pixely redactions. Safari currently lacks the necessary APIs so will fallback to the pixel style. +- Fix issue where sometimes black borders would shown around redacted areas. +- Fix issue with size warning showing when editor has size. + +## 8.58.4 | 2023-06-02 + +- Fix issue with Chrome render precision when wrapping text. + +## 8.58.3 | 2023-05-31 + +- Fix text wrapping issue when resizing text box. + +## 8.58.2 | 2023-05-26 + +- Fix issue where having multiple modals open at the same time at a certain window size would cause the editor to resize in endless loop. + +## 8.58.1 | 2023-05-26 + +- Improve internal error handling when loading images and videos. +- Improve warning shown when loading file with type `'application/octet-stream'`. +- Improve warning shown when editor has no dimensions. + +## 8.58.0 | 2023-05-23 + +- Add `format` property to text shape. Defaults to `'text'`, set to `'html'` to enable inline text formatting with Bold, Italic, Underline, and Strikethrough. +- Add `willRenderShapeTextControls` hook to modify controls rendered in the text controls menu. +- Add Norwegian locale files. +- Update `'zoom'` event, now also fires on image load. +- Extract example projects and component packages to the [PQINA GitHub repository](https://github.com/orgs/pqina/repositories?q=pintura). + +## 8.57.12 | 2023-05-15 + +- Fix issue where software rendering mode didn't correctly clean up sticker shapes when dragging out of view. + +## 8.57.11 | 2023-05-15 + +- Fix issue that caused image to not render when switching to other tab after drag operation. +- Fix issue where rotation input stopped working when tabbing to another window while dragging. + +## 8.57.10 | 2023-05-13 + +- Fix issue where tab panels were too wide on React Native. + +## 8.57.9 | 2023-05-11 + +- Fix image writer store type in TypeScript declaration file. +- Fix issue with SSR because of `window` usage. +- Fix render issue on Edge 112 and Chrome 113. + +## 8.57.8 | 2023-05-10 + +- Fix Angular component peer dependencies. + +## 8.57.7 | 2023-05-10 + +- Update Angular component to work with Ivy. + +## 8.57.6 | 2023-05-09 + +- Fix issue with incorrect lowercase and uppercase use in locale files. +- Add TypeScript declaration files to locale folders. + +## 8.57.5 | 2023-05-05 + +- Fix issue where using a canvas element as a shape background would throw an error. + +## 8.57.4 | 2023-05-02 + +- Fix issue where a disabled style on a markup tool could be overwritten by changing a style on another tool. + +## 8.57.3 | 2023-05-01 + +- Fix issue where render loop would keep running when editor was hidden. +- Fix issue where `tapToAddText` would add text outside of canvas when tapping at edges. +- Fix issue where mousedown would get stuck when dragging a shape and then switching to another window. +- Fix issue where changing `strokeWidth` with the dropdown in the UI would result in invalid color value. +- Extend TypeScript declaration file with `PinturaImageState` type. + +## 8.57.2 | 2023-04-20 + +- Fix issue where using the `%` symbol in a text would sometimes throw an error. + +## 8.57.1 | 2023-04-13 + +- Fix problem where history index wasn't correclty set when running `updatingImage` + +## 8.57.0 | 2023-04-13 + +- Add `'writehistory'` event. + +## 8.56.1 | 2023-04-07 + +- Improve Angular adapter components to also proxy editor instance public functions. + +## 8.56.0 | 2023-04-07 + +- Add Fill util, set `fillOptions` to array of colors or images to use for image background fill. +- Fix issue where changing undo action would not select correct frame. +- Further improve conversion of legacy image state. + +## 8.55.0 | 2023-04-06 + +- Add support for shapes in videos, Annotate, Decorate, and Sticker utils will automatically be enabled when loading a video file. + +## 8.54.5 | 2023-04-04 + +- Further improve conversion of legacy image state. + +## 8.54.4 | 2023-04-03 + +- Improve handling of legacy image state in FilePond poster plugin. + +## 8.54.3 | 2023-04-03 + +- Fix issue where in rare situations a click on a control inside a scrollable element wasn't registered. + +## 8.54.2 | 2023-03-31 + +- Fix issue where `legacyDataToImageState` didn't correctly convert FilePond legacy state to Pintura state. + +## 8.54.1 | 2023-03-31 + +- Fix TypeScript declaration file for `findNode` helper function. + +## 8.54.0 | 2023-03-29 + +- Add Italian, Swedish, and Hindi locales. + +## 8.53.6 | 2023-03-28 + +- Fix issue where `legacyDataToImageState` function didn't correctly convert legacy state. + +## 8.53.5 | 2023-03-28 + +- Fix issue where `findNode` would return the correct node. +- Fix issue where `enableBrowseImage` was missing from TypeScript declarations. + +## 8.53.4 | 2023-03-23 + +- Fix issue where a fixed selection could not expand to fill stage. + +## 8.53.3 | 2023-03-23 + +- Fix issue where Pintura would sometimes output corrupt image on Chrome. +- Fix issue where `imageCropMinSize` would cause crop selection to sometimes exceed stage bounds. + +## 8.53.2 | 2023-03-16 + +- Improve Chrome version selector to target all Chrome versions. + +## 8.53.1 | 2023-03-16 + +- Extend Chrome version selector to work around bug introduced in Chrome 109. +- Fix missing imports in locale files. + +## 8.53.0 | 2023-03-16 + +- Add generic locale import to pintura package. + +## 8.52.3 | 2023-03-14 + +- Fix issue with software rendering not updating shape `backgroundImage` when image load was delayed. +- Improve markup editor zooming with Mac touchpad. + +## 8.52.2 | 2023-03-03 + +- Fix missing options parameter to disable default option on font size and line height controls. + +## 8.52.1 | 2023-03-02 + +- Fix `createDefaultMediaWriter` export and `imageTrim` property missing from TypeScript declaration file. +- Fix `createDefaultMediaWriter` logic missing from React video example. + +## 8.52.0 | 2023-02-28 + +- Add `zoomMaskOpacity` to control opacity of overlay shown behind UI when zooming in. + +## 8.51.11 | 2023-02-27 + +- Fix issue where software rendering would render black background after viewport resize. + +## 8.51.10 | 2023-02-17 + +- Fix issue reading JPEG with large APP1 header. + +## 8.51.9 | 2023-02-15 + +- Fix interaction issues with zooming and panning in Filter and Fintune utils on Android. + +## 8.51.8 | 2023-02-08 + +- Fix crop and shape edge selectors being difficult to adjust as a result of bug in Chrome v109. + +## 8.51.7 | 2023-02-08 + +- Fix issue with Android devices sometimes outputting a black image. + +## 8.51.6 | 2023-02-07 + +- Fix issue where updating the `markupEditorToolStyles` property would not trigger update of styles. +- Fix issue where `processImage` Promise would not reject when loading unsupported file format. + +## 8.51.5 | 2023-01-25 + +- Fix issue with `@pqina/pintura-angular` module not working in production build on Angular 8. + +## 8.51.4 | 2023-01-20 + +- Fix issue where trim locale file was named `en_gb` instead of `en_GB` +- Fix issue where path tool translations were missing. +- Fix double locale name, can now import `locale/en_GB/annotate/index.js` instead of `locale/en_GB/annotate/en_GB.js`. +- Add locale files to the npm package `@pqina/pintura/locale` + +## 8.51.3 | 2023-01-17 + +- Fix issue where Android emulator on Intel would not return a valid image Blob when calling `toBlob` during image processing. +- Fix `backgroundSize` value `width` and `height` only being applied when `backgroundPosition` was set. +- Fix TypeScript declaration missing types for annotate and decorate utils. +- Fix React component TypeScript declaration missing Vector type. +- Update SvelteKit preset based on 1.0 version of the framework. + +## 8.51.2 | 2023-01-12 + +- Fix `backgroundSize` and `backgroundImage` missing from `Shape` definition in TypeScript declarations file. +- Fix issue where editing text would throw error after switching betweens ticker and annotate view. +- Fix issue where reading Pintura output video's would not work on Chrome. + +## 8.51.1 | 2023-01-10 + +- Fix problem with text input after switching between decorate, annotate, or redact utils. + +## 8.51.0 | 2022-12-20 + +- Add `cropMaskOpacity` property to control opacity of mask shown in crop util. +- Fix markup editor tool styles not always retaining their styles when switching between utils. +- Fix issue where text was sometimes incorrectly rendered on new line. + +## 8.50.1 | 2022-12-19 + +- Fix issue where video would still continue playing when processing or closing the editor. +- Update NextJS example. + +## 8.50.0 | 2022-12-16 + +- Add `willSetMediaInitialTimeOffset` to control which time offset is initially shown when a video is loaded, by default Pintura loads the center of the first clip range. +- Add `muteAudio` property that sets the initial state of the audio mute button, defaults to `true`. +- Add calling `abortProcessImage` method now closes the process error screen. +- Add guard against `application/octet-stream` file types, Pintura will now try to guess if the src is an image or video, a warning is shown in console if the mime tyep is set incorrectly. +- Fix issue where video would continue playing during processing. +- Fix issue where video would continue playing when closing the editor. +- Fix issue where image processing error would not show. +- Fix issue with aborting video processing not working. + +## 8.49.3 | 2022-12-13 + +- Fix issue where `enableZoomControls` could no longer be used to disable zoom controls. +- Fix issue where when `layoutVerticalToolbarPreference` was set to `'bottom'` and only one util was active the image was rendered outside of the editor view. + +## 8.49.2 | 2022-12-12 + +- Fix issue where setting same Blob object to `src` prop would reload image. +- Fix issue where selecting a size preset in the crop preset options dropdown would throw an error. +- Fix issue where pan and zoom would sometimes not work when switching between utils. +- Fix issue with sliders in the frame util not working. + +## 8.49.1 | 2022-12-08 + +- Fix special symbol input being invisible for auto width text shapes. +- Fix issue where pan / zoom input would not work when only a single util was active. + +## 8.49.0 | 2022-12-07 + +- Add CMD+D and CTRL+D to duplicate currently active shape (if allowed by shape). +- Add `disableNewline` property to text shapes. Set to `false` on default auto-width text shape to allow newlines in. Set to `true` on fixed-width text shapes to prevent newlines. +- Automatically remove text with newlines in auto-width text shapes when loading shapes if `disableNewline` is not set to `false`. +- Auto width text fields that support newlines now also support text-align, the `textAlign` property needs to be defined on the default shape to enable this. +- Improved visiblity of text caret by lowering opacity of text selection border while editing. + +## 8.48.3 | 2022-11-28 + +- Fix multi-touch input not working in markup editor. + +## 8.48.2 | 2022-11-24 + +- Fix SSR issue introduced with version 8.48.0. + +## 8.48.1 | 2022-11-23 + +- Fix TypeScript declarations. + +## 8.48.0 | 2022-11-22 + +- Add `enableCanvasAlpha`, set to `true` to make editor canvas transparent. +- `imageStateToCanvas` now forces even size for video sources. + +## 8.47.1 | 2022-11-14 + +- Fix issue where `imageStateToCanvas` was missing from TypeScript declaration file. +- Add defensive styles to prevent CSS collisions. + +## 8.47.0 | 2022-11-08 + +- Add support for detecting and reading video length and size. +- Add readonly `duration` property, is `0` for image data, contains length in seconds for video. +- Add `imageTrim` property to set trim ranges for video. +- Add `imageStateToCanvas` helper function, use to draw current image source and `imageState` to a canvas element. +- Add `createDefaultMediaWriter` export, use to combine image and video writers. + +## 8.46.1 | 2022-11-04 + +- Fix error thrown when loading new images. + +## 8.46.0 | 2022-11-03 + +- Add `enablePanLimit`, defaults to `true` set to `false` to prevent limiting pan to center of stage. +- Add `panLimitGutterScalar`, defaults to `0`, set between `0` and `1` to allow some spacing around the bounds used to limit image panning. +- Add automatic handling of `null` values when restoring `imageState`. +- Fix issue where zoom/pan would not work correctly with when `previewUpscale` was set to `true`. +- Fix issue where path tool would not work in React native when passing default markup styles. +- Fix issue where resize tool 100% zoom level would not be set. +- Fix issue where `className` prop was missing from `PinturaEditorModal` React component type declarations. + +## 8.45.2 | 2022-10-31 + +- Fix issue where setting a file object as `backgroundImage` source would throw an error. + +## 8.45.1 | 2022-10-27 + +- Fix issue where editor would throw `contains` error. +- Add React Native TypeScript example project. + +## 8.45.0 | 2022-10-25 + +- Enable canvas zoom and pan on all utils except crop and resize. Disable by setting `enablePan` and `enableZoom` to `false`. +- Add generic zoom and pan properties. +- Deprecate markup editor zoom and pan properties. +- Fix issue where markup editor would not automatically switch to move tool when adding text with `tapToAddText` set to `true`. +- Change crop zoom control label to "scale" to prevent confusion with zoom dropdown in other utils. + +## 8.44.1 | 2022-10-17 + +- Fix bug where text shapes added with `tapToAddText` were rendered with incorrect size. +- Fix issue where when `imageCropLimitToImage` was set to `false` and an `imageCropAspectRatio` was set the image would not be contained in the crop rectangle. + +## 8.44.0 | 2022-10-11 + +- Add `dataSizeScalar` property to `createDefaultImageScrambler` to allow for more detailed blurring, defaults to `1`. +- Add `imageBackgroundImage` property, set to an image source to draw an image behind the main image. +- Fix `imageBackgroundColor` not being applied to filter previews. +- Fix color filters being applied incorrectly to transparent images. + +## 8.43.1 | 2022-09-29 + +- Fix issue with keyboard navigation not working correctly in scrollable containers. +- Fix issue where path would be drawn when attempting to select a shape. +- Fix issue where if `cropLimitToImage` was set to `false` the image was still zoomed in when rotated. + +## 8.43.0 | 2022-09-27 + +- Add path tool for drawing multi-corner paths and polygons. +- Add support for drawing simple polygons, simple polygons are polygons that don't have intersecting lines. +- Fix issue where 180 degree initial rotation would result in negative crop size. + +## 8.42.1 | 2022-09-26 + +- Fix issue with NextJS 12.3.x throwing an error while applying markup shapes during image processing. + +## 8.42.0 | 2022-09-26 + +- Add `request` property to `imageReader` to allow passing custom headers and setting withCredentials on the request. +- Add `headers` and `credentials` properties to `store` property on `imageWriter` to allow passing custom headers and setting withCredentials on the request. +- Fix script reference in `pintura-input` example. + +## 8.41.3 | 2022-09-23 + +- Fix issue where keyboard navigation with arrows would trigger page scroll. + +## 8.41.2 | 2022-09-21 + +- Fix `cropSelectPresetFilter` missing from TypeScript definitions. + +## 8.41.1 | 2022-09-20 + +- Fix issue where color picker selected value wasn't updated when color was changed programmatically. +- Fix issue where setting new values to the `markupEditorToolStyles` property would not reset current selected styles. +- Fix issue where 'selectcontrol' event would fire before markup editor was fully activated. + +## 8.41.0 | 2022-09-19 + +- Add `markupMaskOpacity` property which controls the opacity of the mask rendered on top of shapes outside of the image crop. Defaults to `1`, hiding all markup outside of the image crop. Set to lower value to show markup outside of the image crop, set to `0` to render markup outside of image crop area at 100% opacity. + +## 8.40.2 | 2022-09-14 + +- Fix issue where editor would stall when switching utils. + +## 8.40.1 | 2022-09-14 + +- Fix issue where image mask opacity would sometimes not be set to `1` when switching between crop and other utils. +- Fix issue where XMP and MPF data was not copied to JPEG headers. + +## 8.40.0 | 2022-09-13 + +- Add `'tapcanvas'` event, fires when the markup editor canvas is tapped. +- Add `'selectcontrol'` event, fires when a markup editor tool is selected. + +## 8.39.0 | 2022-09-09 + +- Fix issue where React Native webview proxy would not correctly pass string event details to native layer. + +## 8.39.0 | 2022-09-08 + +- Add `'selectutil'` event, fires when a util panel is selected, receives the selected util name. + +## 8.38.4 | 2022-09-06 + +- Fix issue where "Presets" caption for the color selector was not translated and renamed caption to "Color palette". + +## 8.38.3 | 2022-09-02 + +- Fix issue where image would animate in from bottom of view. + +## 8.38.2 | 2022-08-31 + +- Fix issue where the Pintura Modal component would not correctly render when in React Strict Mode. + +## 8.38.1 | 2022-08-30 + +- Fix TypeScript definitions for `blobToFile`, `finetuneOptions`, and `frameOptions`. +- Replace symbols in locale files with html entities. +- Upgrade React and NextJS example projects to use React 18.2. + +## 8.38.0 | 2022-08-09 + +- Fix issue where a slight grey line would be drawn to the left and right of the main image in preview mode. +- Add support for setting `ImageData` and `ImageBitmap` as image source. +- Add `'markupzoom'` and `'markuppan'` events to observe zooming and panning in markup editor. + +## 8.37.1 | 2022-08-04 + +- Fix issue where `processDefaultImage` would not apply frame or line styles. + +## 8.37.0 | 2022-07-28 + +- Updated NextJS preset to version 12. +- Fix issue where `willRenderShapeControls` would throw error after calling `addPreset` from `willRenderShapePresetToolbar`. +- Add `layoutVerticalControlGroupsPreference` set to `'top'` to move control groups to top. +- Add `layoutVerticalControlTabsPreference` set to `'top'` to place tabs inside controls groups above controls. +- Add `layoutVerticalToolbarPreference` set to `'bottom'` to move main toolbar to bottom of view. + +## 8.36.2 | 2022-07-22 + +- Fix issue where window width and height variables weren't correctly assigned on orientation change. + +## 8.36.1 | 2022-07-22 + +- Fix issue on Ionic where reset indicator line was drawn incorrectly. +- Fix tablist and sticker HTML buttons not being of type `"button"` causing accidental parent form submits. +- Fix issue where window width and height variables wouldn't be correctly updated on Cordova based apps. +- Fix issue where shape opacity label would not match opacity of shape when switching from shape with adjusted opacity to another shape. +- Fix issue where shift + scroll scroll direction was reversed. +- Fix issue where zoom level was reset when switching views. + +## 8.36.0 | 2022-07-19 + +- Add `markupEditorZoomLevel` to programmatically control the current zoom level. +- Add `markupEditorToolRetainStyles`, set to `true` to retain markup editor tool styles when loading a new image. +- Fix issue with `disableMove` not being set on path when using `createMarkupEditorToolStyle('path')` + +## 8.35.1 | 2022-07-15 + +- Fix slight opacity dip during image load in Chrome. + +## 8.35.0 | 2022-07-15 + +- Add `previewPad` property, set to `true` to show padding around image preview when a frame is selected that renders on the outside of the image. +- Add `previewMaskOpacity` property to control the opacity of the mask that is rendered on top of shapes outside of the image. +- Add support for `'never'` value to `cropMinimizeToolbar` property, when set to `'never'` the crop toolbar will never be minimized. +- Add `willRenderCanvas` state parameter to TypeScript declarations. + +## 8.34.0 | 2022-07-11 + +- Add `frameOutset` property to nine slice frame style. This controls if the frame image is rendered inside or outside of the crop and at which distance. Use negative value to add margin around frame image and crop edge. + +## 8.33.2 | 2022-07-07 + +- Fix issue where background color on fixed with and auto height text shapes would not align in the decoration util. + +## 8.33.1 | 2022-07-05 + +- Fix issue where Angular component package prevented use with Angular 13. + +## 8.33.0 | 2022-07-04 + +- Add `markupEditorZoomAdjustWheelFactor` to control zoom speed in markup editor. +- Add slight multiplier to Firefox and Safari scroll wheel interactions to make those a bit snappier. +- Add remove shape by pressing Delete key. +- Add base TypeScript declarations for Vue. + +## 8.32.3 | 2022-06-29 + +- Fix issue where using a normal frame shape instead of a shape that required preprocessing would throw an error. + +## 8.32.2 | 2022-06-27 + +- Fix issue with vertical interactions triggering footer navigation on Android for Firefox. + +## 8.32.1 | 2022-06-24 + +- Fix preset tab alignment on narrow viewports. + +## 8.32.0 | 2022-06-23 + +- Add support for passing custom shape preprocessor to `createDefaultShapePreprocessor`. +- Add support for defining custom shape preprocessors as array of functions when using default factories. +- Add scale and context data to shape preprocessor context. + +## 8.31.4 | 2022-06-22 + +- Export internal helper functions to make shape preprocessing easier. +- Fix issue with line and path shapes not correctly drawing when added as preset shape. +- Fix issue where editor wouldn't read CSS color info when was initially hidden. + +## 8.31.3 | 2022-06-21 + +- Fix issue with remote custom fonts not loading since version `8.30.0` + +## 8.31.2 | 2022-06-20 + +- Fix issue where utils would render at twice the viewport width on Safari versions 14 and below. + +## 8.31.1 | 2022-06-15 + +- Fix issue where markup editor style controls would not scroll on narrow viewports. +- Fix issue where corner radius control would show for stickers. + +## 8.31.0 | 2022-06-14 + +- Add move tool to markup editor, set `enableMoveTool` to `true` to enable, combined with `enableAutoSelectMoveTool` this makes shape interaction more natural. +- Add `enableAutoSelectMoveTool` option to control when the editor auto switches to move tool after adding a shape. By default will switch back to move for all shape tools except the sharpie and the eraser. +- Add view/hand tool to markup editor, set `enableViewTool` to `true` to enable, alternative to panning the view by holding spacebar. +- Add handling of ctrl+enter / cmd+enter keys to confirm text input. +- Add `cropRotationRange` property to control range of crop rotation input control. +- Fix issue where escape key would cancel text input but not keep shape selected. +- Fix issue with TypeScript naming conflict warning in react-pintura module. + +## 8.30.0 | 2022-06-13 + +- Scope every `pintura` package with `@pqina`. +- Convert included example projects to installing `@pqina` packages from pqina private npm. +- Remove Angular 8 example project as private npm module installation works with v8, v9 and newer versions of Angular. +- Move Pintura Vue 2 components to `@pqina/vue-pintura/vue-2` path inside Pintura vue module. +- Add `willRequest`, allows prevention of loading external resources (like `willRequestResource`) or adding request initialisers like custom headers and/or credentials to requests. Where `willRequestResource` only runs when loading external stylesheets `willRequest` will run for every resource. +- Deprecated `willRequestResource` in favour of `willRequest`. + +## 8.29.5 | 2022-06-08 + +- Fix issue where range input wasn't centered on mobile viewports. + +## 8.29.4 | 2022-06-03 + +- Improve layout handling for editor footer element and contents, no footer height is no longer fixed and scales dynamically with content. +- Improve intro animation of preset thumbnails. +- Fix issue where `beforeSelectShape` would not correctly supply previous selected shape when selecting the canvas. +- Fix default control missing for rectangle corner radius. +- Fix `stickerEnableSelectImagePreset` not working without also setting `stickerEnableSelectImage`. + +## 8.29.3 | 2022-06-01 + +- Fix issue where passing `imageReader` configuration options as an object would not work. + +## 8.29.2 | 2022-06-01 + +- Fix issue where empty text shapes with a `backgroundColor` would not show background color. +- Fix various IME text input issues. + +## 8.29.1 | 2022-05-31 + +- Fix issue where applying a `backgroundColor` to a text shape did no longer work. Currently only availabe by adding the `backgroundColor` property to the default style of the text shape using `createMarkupEditorToolStyle`. + +## 8.29.0 | 2022-05-30 + +- Add `cropInteractionFocus`, defaults to `'image'` where the image is dragged and scaled to make a crop selection. Set this property to `'selection'` to switch to dragging and scaling the crop selection rectangle. +- Improved clarity of images on low res screens. +- Fix issue with incorrect zoom percentage being highlighted in the zoom level dropdown. +- Fix issue where selecting a zoom level from the zoom level dropdown would not work after zooming in or out with mousewheel. + +## 8.28.1 | 2022-05-19 + +- Fix issue where a default tool was not selected if only one markup editor tool was supplied. +- Deprecated `stickersWillRenderShapePresetToolbar`, `stickersEnableButtonFlipVertical`, and `stickerEnableSelectImage`. These properties have been replaced with `stickerWillRenderShapePresetToolbar`, `stickerEnableButtonFlipVertical`, `stickerEnableSelectImagePreset` +- Fix issue where `stickerEnableDropImagePreset`, `annotateEnableDropImagePreset`, and `decorateEnableDropImagePreset` properties were not exported. +- Fix exports missing for interfaces and types in Pintura TypeScript declaration file. +- Fix `editor` property not being typed in React TypeScript declaration file. +- Add SvelteKit example project. + +## 8.28.0 | 2022-05-11 + +- Add `--color-transition-duration` custom property to control background color transition duration, defaults to `250ms`. +- Add `grabbing` cursor style when canvas is panned. +- Add matching theme style to panel controls. Set `--color-background` and `--color-foreground` on `.pintura-editor-panel` to adjust panel theming. +- Add subtle lens effect to Color Picker opacity control. +- Fix issue where flip control was disabled for stickers by default. +- Fix issue with default resize input field style looking too much like the fields were disabled. +- Fix issue where some UI controls were still animated even if `animations` was set to `'never'`. +- Fix issue where setting `elasticityMultiplier` to `0` would make image invisible. +- Fix issue where top shape could be moved to top, move to front button now switches to disabled state. +- Fix issue where changing font would throw an error with external stylesheet loaded. +- Fix issue where Pintura would sometimes throw an error when being destroyed but no image was loaded. +- Fix issue where you could zoom the markup editor canvas and move, rotate, or resize shapes at the same time. +- Fix issue where Color Picker slider was difficult to select near plus/minus buttons. +- Fix issue where image sometimes looked blurry on low res displays. + +## 8.27.2 | 2022-05-09 + +- Add Dutch locale. +- Fix issue where editor in overlay mode would not correctly present small images when the editor container was resized. +- Fix issue where not all properties were exposed as `@Input()` on Angular component. +- Fix issue where properties on `PinturaDefaultImageScramblerOptions` were not optional. +- Fix issue where empty editor instance would block scroll on iOS. + +## 8.27.1 | 2022-04-19 + +- Fix issue where loading custom fonts with `@import` wouldn't work. +- Fix issue where text shape would be hidden when switching to a different util while editing text. + +## 8.27.0 | 2022-04-07 + +- Add missing `editor` export to Svelte components. +- Change locale property to merge new set values with existing value making it easier to overwrite labels. +- Change Angular components to expose individual editor properties additional to the single options property. + +## 8.26.4 | 2022-04-04 + +- Fix issue where HTML tags would be parsed in text field. + +## 8.26.3 | 2022-03-31 + +- Fix issue where redactions would not render when clarity tool was set to other value than zero. + +## 8.26.2 | 2022-03-28 + +- Fix issue where calling `redraw` from one of the `willRender` hooks wouldn't redraw canvas. +- Fix issue where no history entry was created when confirming text entry. + +## 8.26.1 | 2022-03-21 + +- Fix issue where text input box would not be positioned correctly when image fit in editor stage. + +## 8.26.0 | 2022-03-18 + +- Add `markupEditorZoomLevels` to control the zoom levels shown in the markup editor zoom dropdown. +- Add `markupEditorZoomAdjustStep` to control the speed at which pressing the zoom buttons increases or decreases zoom. +- Add `markupEditorZoomAdjustFactor` to control the factor used to increase or decrease zoom speed when holding the zoom buttons. +- Add options parameter to `createMarkupEditorFontFamilyControl` so default option can be disabled by passing `{ defaultKey: undefined }` +- Optimise Pintura React Native component to clear unused Blob properties before converting to Base64 encoded DataURIs. +- Fix issue where the Pintura React Native component wouldn't correctly detect Safari. +- Fix issue where the Pintura React Native component wouldn't remove `src` property from process output. +- Fix issue where setting `imageReader` or `imageWriter` props on the Pintura React Native component would crash the editor. + +## 8.25.1 | 2022-03-11 + +- Fix issue with editor outline missing and throwing error when editor wrapped in web component with shadow dom. +- Fix issue where second argument, parent element, for `openDefaultEditor` could not be passed. + +## 8.25.0 | 2022-03-07 + +- Add `markupEditorWillStartInteraction` which allows intercepting the markup interaction start event. It receives the position of the mouse and the position of the canvas. Return `true` to proceed with interaction, or `false` to prevent interaction. +- Add `enableZoom` and `enablePan` to toggle zoom and pan interaction functionality. +- Fix iOS 15 modal issue where dragging inner elements would toggle iOS Safari footer if some children of body element had absolute positioning. + +## 8.24.2 | 2022-02-25 + +- Improve handling of errors thrown in will render hooks, errors thrown in these hooks will no longer crash the editor. +- Add Ionic 6 preset template. + +## 8.24.1 | 2022-02-16 + +- Fix issue where image size requirements wouldn't be respected when loading subsequent images. +- Fix issue with `disableSelect` not working. + +## 8.24.0 | 2022-02-10 + +- Custom store functions may now return `FormData` object. +- Fix issue with `findNode` function throwing an error. + +## 8.23.3 | 2022-02-07 + +- Fix issue where detail panel would throw an error when it was active and user switched utils. +- Fix issue where DynamicPanel would always replace root on update, even if root node was unchanged. +- Fix issue where editor toggle panels would move when scrolling the page. +- Fix issue where editor would not always detach panels correctly. +- Fix issue where editor moving focus to panel would cause page to scroll. +- Fix issue where text selection would not work in markup editor. + +## 8.23.2 | 2022-02-04 + +- Fix text texture size exceeding maximum texture size on Android. +- Fix issue where presets tool would not appear when only setting `willRenderPresetToolbar`. +- Fix React TypeScript declarations, event content now described better. +- Fix Angular TypeScript declarations, event content now described better. + +## 8.23.1 | 2022-02-01 + +- Fix label in `cropSelectPresetOptions` showing on small viewports. + +## 8.23.0 | 2022-01-31 + +- Add `cropSelectPresetFilter`, set to `'landscape'` or `'portrait'` to show tabs in preset dropdown and filter landscape aspect ratios. +- Add `cropEnableFilterMatchAspectRatio`, set to `false` to prevent swapping aspect ratio when switching between preset tabs. +- Add fourth parameter imageState to `preprocessImageSource` image writer hook. +- Fix issue with `findNode` function not correctly searching through lists of nodes. +- Fix rendering dropdown panels on half pixels causing slight blurring of panel content. +- Fix bug where on Android text input would scale modal height. + +## 8.22.1 | 2022-01-26 + +- Fix issue with temporary file input not being hidden properly. +- Fix issue where zoom level would not be reset when loading a new image. + +## 8.22.0 | 2022-01-25 + +- Add mousewheel zoom to annotation, decoration, redaction, and sticker views. +- Add space + mouse drag to annotation, decoration, redaction, and sticker views. +- Add zoom towards mousewheel position. +- Add zoom level dropdown to toolbar. +- Add zoom in and zoom out button to toolbar. +- Add hold to increase zoom speed to zoom buttons. +- Add fit option to zoom level dropdown. +- Add actual size option to zoom level dropdown. +- Add animated zoom percentage indicator. +- Add snap fit to view when using mousewheel. +- Add `enableZoomControls` property to turn on/off the zoom controls. +- Add sticker position lock, if sticker shape has `x` and/or `y` coordinate it will snap to that position. +- Change spacing between util menu and stage to be smaller. +- Change cursor used for rotation shape control from move to grab cursor. +- Change orchestration of view activation and deactivation, now all views are first deactivated before selected view activates. +- Change presentation of polaroid frame, now no longer zooms out main image. +- Change centering of undo/redo buttons on compact viewports, middle tools now auto centered to view. +- Fix shape selection lines so they align with selected shape when animating views. +- Fix issue where `'is-animated'` env property would toggle between `true` and `false` when interacting with shapes. +- Fix context menu not working for inline text input. + +## 8.21.1 | 2022-01-21 + +- Fix issue where `'selectstyle'` wasn't available in framework wrappers. + +## 8.21.0 | 2022-01-18 + +- Add `'selectstyle'` event to listen for input on style controls in markup editor. +- Fix issue where interacting with opacity control would result in a lot of history entries. +- Fix Safari 15 bug where sticker select image button would not work on iOS. + +## 8.20.8 | 2022-01-17 + +- Fix issue with force redrawing editor not working in `willRenderToolbar` and `cropWillRenderTools` after changing external data. +- Fix background color label being incorrect. + +## 8.20.7 | 2022-01-14 + +- Fix issue where setting `cropSelectPresetOptions` to an empty array would crash the editor. +- Fix issue where `backgroundColor`, `strokeColor`, and `color` style components could not receive `enablePicker`, `enableOpacity`, `enablePresets` props to control color picker components. +- Fix issue with editor instance in Angular component being protected. + +## 8.20.6 | 2022-01-13 + +- Fix issue where adding a sticker would not fire the `"addshape"` event. +- Fix issue where switching utils while editing text would throw. + +## 8.20.5 | 2022-01-11 + +- Fix issue with slider control label not updating in frame editor. +- Fix issue where 9-slice frame showed color style control. + +## 8.20.4 | 2022-01-10 + +- Fix issue where editor would throw an error if resize util was selected as first util to show. +- Fix issue where editor would throw if 9 slice frame slices overlapped. +- Fix issue where text was invisible when shape `isEditing` property was set to true and `markupEditorTextInputMode` was set to `'modal'`. + +## 8.20.3 | 2022-01-07 + +- Fix issue where upscaled decoration and annotation would be drawn at lower resolution than possible. +- Fix issue where shape backgrounds could be drawn at `0` width and the image processing step would throw an error. +- Fix issue where `canvasMemoryLimit` wasn't taken into account when drawing shape background images. +- Fix issue where shape `right` and `bottom` positions where calculated incorrectly when set to percentage value. +- Fix issue with text input modal throwing an error when deselecting text. +- Fix issue with rotated inline text not aligning correctly. +- Fix issue where text input modal would reselect text when switching to emoji keyboard. +- Fix issue with `isSafari` function throwing error on SSR environment. + +## 8.20.2 | 2022-01-03 + +- Fix issue where outdated font mime types would not be correctly interpreted. + +## 8.20.1 | 2021-12-29 + +- Fix issue with shape alignment when `devicePixelRatio` was not `2` + +## 8.20.0 | 2021-12-29 + +- Add `previewImageTextPixelRatio` to control resolution of text shapes, defaults to `window.devicePixelRatio`. +- Add `"tapshape"` event, is fired when an already selected shape is clicked. +- Change render loop to render annotations in view space improving clarity of shapes. +- Change resolution of text shapes, now renders at higher resolution on high retina displays. +- Change `strokeWidth` style control, when a width is selected the `strokeColor` opacity is now automatically set to `1` if it is `0`. +- Fix issue where `"selectshape"` event was fired even when shape was already selected. + +## 8.19.4 | 2021-12-27 + +- Change render loop to no longer redraw/compute annotations, decorations, redactions, and frame styles if no change to shapes or canvas was detected. +- Fix issue with `'NaN%'` values on shape drafts. +- Fix issue with custom fonts not being preloaded correctly. +- Fix issue where hover outline would be rendered when dragging stickers. +- Change Svelte preset depedencies, now at latest versions. +- Add Capacitor example project. + +## 8.19.3 | 2021-12-22 + +- Fix issue with image edit button not showing in FilePond. + +## 8.19.2 | 2021-12-21 + +- Fix issue where setting `imageState` on FilePond item would not update poster. +- Fix issue where multiple `processImage` calls in close succession would fail to output big images. +- Improve performance of FilePond Image Editor plugin, image posters are now generated faster and processing of images is queued allowing for FilePond to stay responsive. Requires updating the FilePond Image Poster plugin. +- Fix issue where `eraseRadius` shape property couldn't be exposed as style control. +- Fix issue where an increased `eraseRadius` wouldn't properly remove multiple smaller shapes. +- Fix issue caused by `imageEditorAfterWriteImage` not returning a Promise. +- Fix issue with loading JPEGs where EXIF header is bigger than usual. + +## 8.19.1 | 2021-12-14 + +- Fix issue where empty markup text shape would throw error when drawing output image. +- Fix issue where arrow style 'None' could not be selected for new arrows if an arrow style was set previously. + +## 8.19.0 | 2021-12-10 + +- Add `nine` frame style, use with `frameImage` property to create image based frames. +- Fix issue where lines, paths, and ellipses added with `enableSelectToolToAddShape` were slightly too large. +- Fix issue where lines and paths weren't drawn at correct location when image was zoomed in. +- Fix issue with error thrown when drawing in decoration layer. + +## 8.18.0 | 2021-12-08 + +- Add `cropActiveTransformTool` property, set to `'zoom'` to show zoom input as active instead of `'rotation'` input. +- Add `styleRules` property to react-native proxy component to allow adjusting editor styles. +- Add `customProperies` location in react-native template to allow for easier adjustment of the template. +- Fix issue with Japanese IME character composition on Windows and Android. + +## 8.17.1 | 2021-12-07 + +- Fix issue where `canvasMemoryLimit` would cause data in the `crop`, `annotation`, and `decoration` properties on the `imageState` output object to be scaled down. + +## 8.17.0 | 2021-12-06 + +- Fix `
` being added to the text input when returning to text edit mode. +- Add `createDefaultFrameStyles` export to generate the default frame style object. +- Add `createDefaultLineEndStyles` export to generate the default line end styles object. +- Add `createFrameStyleProcessor` export to merge custom frame styles with the default frame styles. +- Add `createLineEndProcessor` export to merge custom line end styles with the default line end styles. + +## 8.16.9 | 2021-12-02 + +- Fix problem where composition keys did not all work correctly and were not retained properly when blurring field after editing text. + +## 8.16.8 | 2021-11-30 + +- Fix issue where an invalid CSS selector in library CSS files would cause build problems. + +## 8.16.7 | 2021-11-29 + +- Fix issue with IME keyboard not working correctly for text input. + +## 8.16.6 | 2021-11-28 + +- Fix issue with frame change not creating a history entry. +- Fix shape color changes creating many history entries. + +## 8.16.5 | 2021-11-24 + +- Fix issue with loading big images introduced in version 8.16.2. + +## 8.16.4 | 2021-11-23 + +- Improve handling of Firefox bug where it cannot determine SVG size if the SVG does not have a width or height attribute. Will now set width to `300` and height to `150`. +- Fix issue with Safari not being detected correctly in a WebView. +- Fix issue where React Native proxy component would stringify image preview impacting performance on iOS. + +## 8.16.3 | 2021-11-22 + +- Improve memory usage. + +## 8.16.2 | 2021-11-12 + +- Fix issue with events fired by the WebView not ending up in React Native layer on Android. +- Improve React Native component performance, it now excludes `src` and `dest` prop from `'load'` event to lower memory usage. +- Improve React Native component performanace, it now excludes `src` prop from `'process'` event to lower memory usage. +- Improve React Native component, it now no longer auto converts the `'process'` event `dest` property to `Blob`, the output is now a dataURL. + +## 8.16.1 | 2021-11-11 + +- Fix issue where React Native preset wouldn't work on Android. + +## 8.16.0 | 2021-11-10 + +- Add inline text editing, set `markupEditorTextInputMode` to `'modal'` to revert to old text editing style. +- Add `willRequestResource` hook that is run when the editor loads a remote stylesheet to determine webfont locations in `@font-face` rules. This hook enables preventing the request in case the remote server doesn't support CORS or the stylesheet doesn't contain `@font-face` rules and can be skipped. +- Add line height property to text shapes, defaults to `120%` or `1.2 × fontSize`. +- Add support for `backgroundColor` property on text shape. +- Auto switch cursor style based on shape selection and hover state. +- Improve font rendering line and word breaking accuracy. +- Improve support for custom fonts with different weights. +- Improve shape rendering performance. +- Improve internal element measuring performance. +- Improve font rendering quality in decoration view. +- Improve redact icon style. +- Fix issue where dropdown would not select fallback item. +- Fix issue where dropdowns and navigation would sometimes not respond to clicks after keyboard interaction. + +## 8.15.1 | 2021-11-05 + +- Fix issue with shape selection outline being rendered at wrong location when changing window size. +- Fix issue with activated shape control panels not hiding when switching between frame styles or selecting different shapes. + +## 8.15.0 | 2021-10-29 + +- Add `imageDataResizer` property to `createDefaultImageWriter` this property allows setting up a custom resize algorithm to improve resize quality. Useful when resizing high contrast images like logo's to very small sizes. + +## 8.14.0 | 2021-10-28 + +- Add React Native example project. This project loads Pintura in a WebView component and wraps the WebView in an API that mimics the normal React version of Pintura. +- Add `history.getCollapsed()` to get history entries up to current index. +- Fix issue where touch end events felt "slippery" when pointer events were missing `timeStamp` property. + +## 8.13.4 | 2021-10-27 + +- Fix issue where frame exports where missing from TypeScript declaration file. + +## 8.13.3 | 2021-10-18 + +- Fix issue with `previewImageData` being a required property. + +## 8.13.2 | 2021-10-13 + +- Fix issue where appending a space to a text line was not possible. +- Fix issue where Firefox 93 would draw annotations set on editor initialisation incorrectly. +- Fix issue where tapping screen to select image wasn't possible when editor was waiting for image. + +## 8.13.1 | 2021-10-12 + +- Fix additional iOS 15 modal issues. +- Fix issue with incorrect redaction properties in TypeScript declarations file. +- Fix main menu button text overflow issue for iOS 13. + +## 8.13.0 | 2021-10-11 + +- Add `'ready'` event which fires when the editor is ready for interaction. +- Add `'loadpreview'` event which fires when the editor has loaded a preview image or the preview image has been updated. +- Add `previewImageData` property to access current preview image data. +- Fix issue where shapes were not deselected when switching between tools. +- Fix issue with iOS 15 drawing black output image when using redact feature. +- Improve performance of generating scrambled preview image. +- Improve scrambling of canvas for very large redaction areas. +- Improve Angular component TypeScript declarations. + +## 8.12.2 | 2021-10-07 + +- Fix redaction shape controls showing re-order button. +- Improve default scramble by setting default amount to `4`. +- Improve handling of transparent images. +- Fix issue where scrambled version of transparent image would not inherit `imageBackgroundColor`. +- Fix issue with Firefox 93 not rendering preview image correctly. + +## 8.12.1 | 2021-10-06 + +- Fix issue with scrambled image not aligning with preview image when image was flipped. +- Fix issue with Safari not positioning redacted shapes correctly. + +## 8.12.0 | 2021-10-05 + +- Add `'redact'` util. Use to blur or scramble information in an image. By defaults blurred parts of the image are scrambled and then blurred to make sure information cannot be retrieved. +- Add `imageScrambler` property which can be set to a function that handles scrambling the image data for use with the redact util. +- Add `createDefaultImageScrambler` export which creates a default image scrambler. +- Add ability to select paths created by Sharpie. To prevent users from selecting paths add `disableSelect` to the default path style. +- Improve image preview update speed for canvas sources. +- Fix issue with image state not restoring correctly when using `updateImage` +- Fix issue with interface gradient overlay not rendering. +- Fix Angular v9 preset project. + +## 8.11.0 | 2021-09-30 + +- Add `layoutHorizontalUtilsPreference`, set to `'right'` to move the main navigation to the right side of the editor. +- Add `layoutVerticalUtilsPreference`, set to `'bottom'` to move the main navigation to the top of the editor. Will not affect mobile presentation where the menu will stick to the bottom. +- Add `enableAutoDestroy` to modal options, prevents the modal from cleaning up after hiding. +- Add `enableAutoHide` to modal options, prevents the modal from automatically hiding after processing an image. +- Add `preventScrollBodyIfNeeded` to modal options, prevents iOS footer lock logic which isn't needed in mobile app context. +- Add `preventFooterOverlapIfNeeded` to modal options, prevents iOS footer spacing logic which isn't needed in mobile app context. +- Fix issue with overlay mode showing double buttons when scaled very large. +- Fix issue with additional history entry when editor was in overlay mode. +- Fix issue with typescript declarations not having `shapePreprocessor` prop for `processImage` export. + +## 8.10.3 | 2021-09-28 + +- Fix issue with annotation buffer size exceeding max texture size. +- Fix issue with overlay editor not zooming in images smaller than editor itself. +- Improve modal rendering on iOS Safari 15. +- Improve Cordova template. + +## 8.10.2 | 2021-09-27 + +- Fix issue with FilePond Image Editor plugin not being packaged correctly in Angular v9 preset. +- Fix issue with removing markup not correctly updating history state. +- Fix issue with Safari 15 new memory limitations on canvas element. +- Improve modal rendering on iOS Safari 15. +- Improve modal fade out animation. + +## 8.10.1 | 2021-09-22 + +- Fix issue with `z` key triggering undo action. +- Fix issue where scroll offset wasn't restored when closing modal on iOS Safari 15. +- Fix issue where page was scrolled before modal completely covered view. +- Fix issue where modal didn't create a `theme-color` tag if no `theme-color` tag was available in document head. +- Improve `createImageBitmap` usage on Safari 15 for images that don't have an orientation header. +- Improve Angular v9 preset to include FilePond. + +## 8.10.0 | 2021-09-21 + +- Add temporary warning when shapePreprocessor is not defined and shape with `lineEnd` or `lineStart` style is selected in markup editor. +- Improve menu item rendering to allow wrapping of labels. +- Add Spanish locale files. +- Add German locale files. +- Add French locale files. +- Add Russian locale files. +- Add Chinese Simplified locale files. +- Fix issue with Safari 15 incorrectly applying JPEG EXIF orientation in createImageBitmap. +- Fix issue with iOS Safari 15 incorrectly positioning modal. +- Fix issue with iOS Safari 15 initiating pull-to-refresh while interacting with editor. +- Fix issue with iOS Safari 15 scaling addressbar footer while interacting with editor. +- Fix issue with iOS Safari 15 not correctly reporting viewport height and rendering text input at wrong location. +- Sync meta element `theme-color` with editor background color. + +## 8.9.1 | 2021-09-16 + +- Fix issue where close button wouldn't show when image load failed. +- Fix issue where undo/redo keyboard shortcuts would block picking tool in markup editor. + +## 8.9.0 | 2021-09-15 + +- Add `resizeSizePresetOptions` to enable showing a dropdown with size presets. +- Add `resizeWidthPresetOptions` to enable showing a dropdown with width presets. +- Add `resizeHeightPresetOptions` to enable showing a dropdown with height presets. +- Add `resizeWillRenderFooter` to enable customization of the resize plugin footer components. +- Add `cropWillRenderTools` to enable customization of the crop plugin toolbar. +- Fix TypeScript declarations for frame plugin properties and `imageFrame` property. + +## 8.8.2 | 2021-09-14 + +- Fix issue with FilePond preset not showing edit button. + +## 8.8.1 | 2021-09-13 + +- Add `shapePreprocessor` property to preset code. +- Fix `shapePreprocessor` and `createDefaultShapePreprocessor` missing from TypeScript declarations file. +- Fix Uppy integration so works with Uppy version 2. +- Fix issue where eraser would erase text shapes that weren't near the eraser location. +- Fix issue where eraser would erase all shapes instead of only lines and sharpie. +- Fix issue where sharpe angles in sharpie line would result in very spiky lines. +- Improve rendering of text input modal, now moves to top if softkeyboard detected and not editing in a modal. + +## 8.8.0 | 2021-09-08 + +- Improved preset examples to make use of default editor. +- Add `willClose` hook fires when user attempts to close the editor when it's running in a modal. +- Fix issue with DataURLs not working in version 8.7.0. +- Fix issue where `imageCropMinSize` didn't throw error on image load when image was smaller than defined min size. +- Fix issue with rotation controls when a minimum crop size was supplied, `imageCropLimitToImage` was set to `false`, and the loaded image was smaller than the minimum size. + +## 8.7.0 | 2021-09-07 + +Please note that if you're _not_ using `getEditorDefaults`, `appendDefaultEditor`, `openDefaultEditor`, `overlayDefaultEditor`, or `defineDefaultCustomElements` to create the editor, you need to set the `shapePreprocessor` property after this update. See the editor properties documentation for more details. + +- Add `shapePreprocessor` property, needs to be set when using `lineEnd`, `lineStart`, or `frameStyle` property on shapes. +- Add `createDefaultShapePreprocessor`, use to set the `shapePreprocessor` property to the default `lineEnd`, `lineStart`, and `frameStyle` processors. +- Add opacity slider to stickers. +- Add `'force'` mode to shape `backgroundSize` which changes the background image to fit the shape size. +- Add support for updating the `backgroundImage` source, this enables for example cropping of stickers. +- Add `pathClose` prop to path shapes for drawing exotic paths. +- Add slight shadow on the inside of the image outline for better visual distinction between crop and image. +- Add `enableSelectToolToAddShape`, set to `true` to add shape when a markup tool is tapped, defaults to `false`. +- Add `enableTapToAddText`, set to `true` to add inline text shape when clicking canvas, defaults to `false`. +- Add undo/redo keyboard shortcuts. +- Add autoselection of text in text input form when input form shows. +- Add support for `inverted` property to rectangle shape to enable drawing rounded rectangle overlay in `willRenderCanvas`. +- Add `postprocessImageBlob` to enable converting the output image file to a different format, for example a GIF or HEIC. +- Improve rendering of image outline, lowered opacity of outline on all but crop util for improved preview of resulting image. +- Improve rendering of decoration shapes, are no longer drawn outside of crop selection. +- Improve render quality of shape manipulator outline. +- Improve path draw quality. +- Improved sticker size calculation logic. +- Improve sticker shape aspect ratio, no longer forces the aspect ratio but sets `backgroundSize` to `'contain'` instead. +- Fix stroke on square not being correctly rendered on inside. +- Fix `'circle-solid'` line end shape distance to line. +- Fix problem with `cropLimitToImage` and rotation on load. +- Fix problem with white color in color picker being nearly invisible. +- Fix issue with hidden canvas elements used for gradient overlay staying in DOM. + +## 8.6.1 | 2021-09-06 + +- Fix issue where sticker plugin would reposition preview image while being inactive. + +## 8.6.0 | 2021-09-02 + +- Add `imageEditorSupportImage` hook to FilePond plugin imag editor to filter out unsupported images. +- Fix issue where sharpie would be active in markup editor even if not included in toolbar. +- Fix issue where a tool was always selected in the markup editor. +- Fix issue where removing last shape from markup editor would sometimes trigger error. +- Fix issue where setting active tool would no longer work after user changed tool. + +## 8.5.9 | 2021-09-01 + +- Fix issue with Uppy editor plugin trying to open remote files. +- Fix issue with `cropMaxSize` being set too low because of incorrect browser detection. + +## 8.5.8 | 2021-08-31 + +- Fix issue with `isSelected` and `isEditing` not working when setting shapes in `'load'` event or when assigning initial shapes along with editor options. These props are now also included in the `imageState`. +- Fix issue with TypeScript declarations not having `willRenderShapePresetToolbar` property. +- Fix issue with TypeScript declarations shape `isEditing` property being readonly. + +## 8.5.7 | 2021-08-19 + +- Fix issue where dropping a file on `` wouldn't work. +- Fix issue where listening for pintura events would not work on ``. +- Fix issue where passing a single locale property to a default editor would prevent the editor from loading. + +## 8.5.6 | 2021-08-16 + +- Fix issue where drop and paste file was not working for file objects. + +## 8.5.5 | 2021-08-13 + +- Fix obscure ellipse drawing bug. + +## 8.5.4 | 2021-08-09 + +- Fix issue with clarity input not being applied in preview. + +## 8.5.3 | 2021-08-04 + +- Fix issue with center button not working since last update. + +## 8.5.2 | 2021-08-02 + +- Fix issue where resizing the window would reset crop state in overlay mode. +- Fix issue where scrolling the window would reset crop state in overlay mode. +- Fix `cropEnableZoomAutoHide` missing from TypeScript declarations file. + +## 8.5.1 | 2021-07-30 + +- Improve handling of dropped resources, can now drop image URLs as well. +- Fix `index` property missing from history in TypeScript declarations file. + +## 8.5.0 | 2021-07-28 + +- Add `cropEnableZoomAutoHide`, set to `false` to prevent auto hiding of crop zoom control on compact displays. +- Improve rendering of rotation control in overlay mode by making it more compact. +- Fix issue where toolbar was hidden when in overlay mode. +- Fix issue with dropdown icon button having too much padding. +- Fix issue with error thrown when `cropSelectPresetOptions` dropdown had no `undefined` custom crop mode. + +## 8.4.1 | 2021-07-27 + +- Fix issue with overlay mode editor showing a black screen on some devices. +- Fix issue with overlay not setting initial history state correctly. +- Fix issue with `abortProcessImage()` not working when called directly after `'processstart'` was fired. +- Fix issue with `abortLoadImage()` not working when called directly after `'loadstart'` was fired. +- Add `willProcessImage` to enable better interception of a process image request from the interface. + +## 8.4.0 | 2021-07-26 + +- Fix setting incorrect initial crop when loading an image with `cropLimitToImage` set to `false` and applying an initial rotation. +- Fix issue with reading EXIF orientation from certain JPEG files. +- Improve history state, now adds initial base state when setting initial props. +- Improve `processImage` method to accept properties just like the `loadImage` method. +- Add `willSetHistoryInitialState` to allow intercepting initial history state and override it. +- Add `processDefaultImage`, a helper function for headless image processing with less configuration options. +- Add `'update'` event which is fired every time the `imageState` object is updated. + +## 8.3.1 | 2021-07-21 + +- Fix modal example in jQuery preset. + +## 8.3.0 | 2021-07-16 + +- Add `disabled` property, will disable any interactions with the editor. +- Add `status` property, set to string or array `[label, progressType]` to show a custom status message. +- Add `preprocessImageSource` to the `createDefaultImageWriter()` to allow preprocessing the image source used to create the output image. +- Add `updateImage` to update the image source file while retaining the history state. +- Add `updateImagePreview` to update the current image preview. +- Add `imageMetadata` property, enables storing custom metadata in the `imageState` object. +- Improve image intro animation. +- Improve default style of custom buttons in editor toolbar. +- Improve rendering of path and shape stroke. + +## 8.2.0 | 2021-07-12 + +- Add `enablePasteImage` property, allows pasting an image to the browser window, the editor will pick it up if it's at least 75% in view. +- Fix scrolling the page when interacting with editor on iOS 12 and older. + +## 8.1.1 | 2021-07-09 + +- Fix sharpie lines being closed when erasing so eraser would erase sharpie line between end and begin point. +- Fix error thrown when dragging two sides of the crop rect. +- Fix error thrown when rotating and dragging image at the same time and ending the rotation interaction. +- Fix multi-touch zoom scaling too fast. + +## 8.1.0 | 2021-07-08 + +- Add switch text layout button to switch between fixed text box, auto-height, or auto-width. +- Add `disableTextLayout` property, set to `true` to disable switching to other text layouts or set to array of disabled layout values. +- Add support for `textContent` property to node list. +- Add NodeTree helpers to TypeScript declarations. +- Improve `createNode` to allow calling it with three arguments instead of requiring four. +- Fix typo in `Color` property of shape in TypeScript declarations. +- Fix issue where shape flip horizontal icon had black fill. +- Fix issue where padding of text input box was drawn incorrectly. +- Fix issue where resizing flipped shapes moved all shape corners. +- Fix issue where editing flipped text shapes didn't position the shape correctly. + +## 8.0.3 | 2021-07-05 + +- Fix new text being flipped in annotation util if image was flipped. +- Fix issue where resizing the window would incorrectly update shape selection indicator. +- Fix positioning issue with text shape when image was flipped and user was inputting text. +- Fix adding stickers at same center position not being placed at random offset from center. +- Fix bug where on Safari adding a sticker would not center it to the viewport. +- Improve interaction in stickers view, click on sticker now allows immidiate dragging. +- Improve Angular component peer dependencies to include Angular 12. + +## 8.0.2 | 2021-06-28 + +- Fix issue where vignette was drawn on top of annotations in preview. +- Fix `color` and `strokeColor` being marked as mandatory in the TypeScript declarations. +- Fix line style square outline indicator being represented by an arrow. +- Fix issue with the editor not correctly orientating images when image had more than one orientation tag. +- Fix issue where clicking outside of the text input panel would throw an error. +- Fix issue with vue inline component not rendering correctly. + +## 8.0.1 | 2021-06-23 + +- Fix issue with `` opening multiple editor instances. +- Fix issue with `` not using `name` attribute for asynchronous uploads. + +## 8.0.0 | 2021-06-21 + +Rebrand to Pintura. This name change introduces breaking changes and therefor the major verion number has been increased to 8. Properties that had been deprecated in version 7 have also been removed. A migration guide has been added to the product site. + +- Change `` custom element to ``. +- Change `` to `` +- Change `.doka-image-editor` CSS class to `.pintura-editor`. +- Change `'doka:'` to `'pintura:'`. +- Remove `doka-` internal id prefixes. +- Remove use of the term "doka" by replacing it with "pintura". +- Improve Cordova backup script, it now stores backup WebAPI in `__pqina_webapi__`. +- Remove method `undo()`, use `history.undo()` instead. +- Remove method `redo()`, use `history.redo()` instead. +- Remove method `revert()`, use `history.revert()` instead. +- Remove export `imageOrienter`, use `createDefaultImageOrienter`. +- Remove export `plugin_annotate_defaults`, use `markup_editor_defaults` instead. +- Remove export `plugin_decorate_defaults`, use `markup_editor_defaults` instead. +- Remove export `component_shape_editor_locale_en_gb`, use + `markup_editor_locale_en_gb` +- Remove export `plugin_crop_defaults`, set `cropSelectPresetOptions` manually instead, see crop plugins docs. +- Remove export `plugin_resize_defaults`, this was an empty object, no replacement necessary. +- Remove export `plugin_sticker_defaults`, this was an empty object, no replacement necessary. + +## 7.18.3 | 2021-06-20 + +- Add detection for missing mimetype in DataURLs. + +## 7.18.2 | 2021-06-17 + +- Fix issue with font test not building a valid querySelector. + +## 7.18.1 | 2021-06-15 + +- Fix issue with `document.fonts.check` reporting `false` for custom fonts. Code now also checks if the `check` API is properly supported by the browser. + +## 7.18.0 | 2021-06-14 + +- Add `willRenderPresetToolbar` hook to enable rendering custom preset toolbar items next to stickers overview. By default toolbar renders "Select image" button. +- Add `format` property to `createDefaultImageWriter`, enables choosing the `dest` type. Set to `'file'`, `'imageData'`, or `'canvas'`. +- Add support for ellipse shape in stickers. +- Add CSS custom properties to style modal. +- Improve "select image" icon. +- Improve draw quality of resized stickers. +- Improve setting of `class` property when using `openEditor`, the `class` property is now set to the editor modal instead of the editor itself. +- Improve handling of custom node tree structures, can now define components with name. Currently supports `'Button'` or `'Dropdown'`. +- Improve handling of Escape key when in modal, now only closes the top modal not all modals. +- Improve `react-doka` TypeScript types. +- Improve node tree api, `appendNode` now adds a node to a target node or nodelist, no longer accepts `id` parameter. +- Fix issue where getting editor UI props would not work. + +## 7.17.1 | 2021-06-11 + +- Fix `backgroundImage` not working correctly on ellipse shape. +- Fix `react-doka` TypeScript types mismatch. + +## 7.17.0 | 2021-06-09 + +- Add `history.write(state?)` to push a new state on the history array or create a new history entry based on the current state. +- Add `history.get()` to retrieve all history entries. +- Add `history.set(entries?)` to set the history array, combined with `history.get()` this allows complete restore of a previous image editing session. +- Add guard against interaction problem on Chrome mobile. + +## 7.16.0 | 2021-06-04 + +- Improve visibility of annotation selection tool by increasing the selection outline width and adding a slight shadow. This makes interacting with annotations on bright backgrounds easier. +- Fix issue where default font setting wouldn't render font. +- Fix problem where selecting lines wouldn't work correctly. +- Text tool now adds "auto" text field when tapping vs. text box when dragging to create a field. + +## 7.15.1 | 2021-06-03 + +- Fix newly introduced properties missing from TypeScript definitions. +- Fix changing outline color not triggering redraw of interface. + +## 7.15.0 | 2021-06-01 + +- Add `layoutDirectionPreference` property to force `'horizontal'` or `'vertical'` layout for normal display size. Will revert back to 'auto' for very small display sizes. +- Add `imageEditorAfterWriteImage` property to FilePond Image Editor plugin, enables generating more than one output image, additionally uploading the original source image, and/or renaming the output file. +- Improve registering of custom elements for `` and `` now checks if custom elements were already defined. +- Fix issue where zooming the browser window would draw interface and decoration shapes at incorrect positions until browser window was refreshed. +- Fix issue where filter preview images weren't fading out on exit filter util. +- Fix issue where toggling utils on and off would incorrectly redraw view. +- Fix issue where filter previews would stick around when filter util was disabled after being enabled earlier. + +## 7.14.2 | 2021-05-28 + +- Fix further issues where depending on how the editor modal was implemented on React it would throw an error when closing the editor. +- Fix issue with `` where could not exit "waiting for image" state. +- Fix issue where cordova `www` folder was missing from preset package. +- Fix issue with image load error not being caught. + +## 7.14.1 | 2021-05-27 + +- Fix issue where crop selection line color would sometimes not have correct color. +- Fix issue where depending on how the editor modal was implemented on React it would throw an error when closing the editor. +- Fix issue with new annotations being rotated incorrectly if the image was flipped. +- Fix issue with `` not working on Safari +- Fix issue with `` edit button not working for dropped images. +- Fix issue with `` not rendering properly when image input script was embedded before element. + +## 7.14.0 | 2021-05-26 + +- Add `eraseRadius` shape style to erase tool definition, shapes in the given radius around the erase interaction will be removed, defaults to `0`. +- Add `markupEditorToolSelectRadius` property to markup editor component, shapes inside the given radius will be eligible for selection, defaults to `0`. +- Improve shape selection logic, now takes into account shape `strokeWidth`. +- Fix issue with auto text not rendering. + +## 7.13.0 | 2021-05-25 + +- Improve missing doctype warning to make it more descriptive. +- Fix bug where `` component would not accept globally defined `imageWriter` props. +- Add templating to `` component to allow customisation of the empty, load, and process state. + +## 7.12.2 | 2021-05-21 + +- Fix issue where placing too many stickers would exceed maximum WebGL active texture capacity and throw an error. +- Fix sticker list being too narrow. +- For default factories stickers will stick to image instead of crop context by default. + +## 7.12.1 | 2021-05-20 + +- Fix line and foreground color missing from `willRenderCanvas` call. +- Fix TypeScript declarations for default factory functions, would still require `locale` and `imageReader` properties. +- Update `` component to use `openDefaultEditor` factory function instead of `openEditor`. + +## 7.12.0 | 2021-05-19 + +- Add automatic software rendering detection. Browsers will switch to software rendering if the graphics card has been black listed by the browser vendor. This can happen if the video card drivers are outdated or if the graphics chip is too old and doesn't support the proper draw commands. If the browser is detected to be running in software rendering mode the editor will automatically lower its framerate to 20, will disable animations if the `animations` property is not set to `'always'`, and will disable the finetune util clarity range input. This should lower the strain on the users system and allow for a less optimal but still suitable image editing experience. +- Add `'loadabort'` event when clicking the dismiss load error button. +- Improve rendering performance by limiting interaction updates to one per frame. +- Fix issue where `overlayEditor` would not render in portrait aspect ratio. +- Fix issue with annotations not rendering correctly when texture size is limited. +- Fix issue where loading incorrect plugins would throw error. +- Fix issue where crop dropdown values were added to the default editor factories. +- Fix issue with convolution matrix always being applied to preview render output. + +## 7.11.1 | 2021-05-17 + +- Fix issue where passing options to `defineCustomElements` did not set them on created editors. + +## 7.11.0 | 2021-05-14 + +- Fix issue with ESC key press not triggering `'close'` event. +- Fix issue where `appendEditor` would throw if no target element supplied. +- Fix further issues with image orientation on iOS. +- Add `appendDefaultEditor`, `appendDefaultEditors`, `openDefaultEditor`, `overlayDefaultEditor`, `defineDefaultCustomElements`, and `getEditorDefaults` exports, these editor factories will create a default editor with all plugins enabled, default options set, and locale loaded, they won't require any customisation before use. + +## 7.10.6 | 2021-05-12 + +- Fix issue where iOS versions 13 and earlier would reload page after loading a photo from camera. +- Fix `index` getter missing editor history API. + +## 7.10.5 | 2021-05-11 + +- Fix issue with image exif orientation not being corrected on Safari 12 and below. +- Fix issue with `canvasMemoryLimit` being incorrectly applied on Chrome. +- Fix issue with decoration text box not being scaled correctly. + +## 7.10.4 | 2021-05-05 + +- Fix max canvas sizes being too large resulting in errors when zooming out when `imageCropLimitToImage` was set to `false`. +- Add FilePond example to Svelte preset. +- Improve FilePond Plugin Image Editor to remove the edit button if WebGL is disabled in the browser. +- Improve FilePond Plugin Image Editor to still auto-process images if editing is disabled by lack of WebGL support. + +## 7.10.3 | 2021-05-04 + +- Fix some Emoji showing as symbols instead of emoji. +- Fix overflow of active item in dropdown list when list panel has border radius. +- Remove some animations that still played when `animations` was set to 'never'. +- Add `supportsWebGL` helper to exports. + +## 7.10.2 | 2021-05-03 + +- Improve handling of invalid or missing image mimetypes when loading images from URL resources. +- Fix issue where text input modal would throw error in responsive design mode. +- Fix issue with line processing introduced in 7.10.1. + +## 7.10.1 | 2021-04-29 + +- Improve handling of horizontal touchpad on Firefox. +- Improve parsing of legacy data. +- Improve accessibility of tabs and interactive controls. +- Mark touchstart and mousewheel event listeners as non-passive to prevent Lighthouse warning. +- Optimize SVG icons to use less elements. +- Optimize range input to use single path element instead of circle element for each dot. +- Optimize rendering of utils, will now wait with rendering util elements until util becomes active for first time. +- Fix issue with loading new image after annotating crashing the editor. +- Fix issue where line util would show arrow controls and would inherit arrow styles. + +## 7.10.0 | 2021-04-26 + +- Improve alignment of text in crop toolbar buttons for Firefox and Safari. +- Support image zoom gesture with MacBook trackpad. +- `cropImageSelectionCornerStyle` can now take `"invisible"` as value hiding the crop corner controls. +- `cropWillRenderImageSelectionGuides` can be used to finetune image selection guide count and appearance. +- Now renders additional image selection guides while rotating image. +- Move image selection guide rendering logic to crop plugin. +- Deprecate `undo()`, `redo()`, and `revert()` method and move to `history.undo()`, `history.redo()`, and `history.revort()`. +- Add `history.length` property to access current history length. +- Fix issue with MacBook trackpad horizontal swipe not being smooth. +- Fix issue with revert api not working. +- Fix issue where new lines and arrows weren't recorded in history update. + +## 7.9.1 | 2021-04-23 + +- Fix problem with IME keyboard blocking use dropdown after text input. + +## 7.9.0 | 2021-04-20 + +- Add visual resizing of image preview to resize plugin. +- Add `cropIconSelectPreset` icon property to crop plugin locale object. +- Add `cropIconCropBoundary` icon property to crop plugin locale object. +- Improve visual queue for auto calculated values of resize input fields, now has dashed outline if auto calculated. + +## 7.8.1 | 2021-04-19 + +- Fix issue with crop corners not aligning with image when `enableUtils` set to `false`. +- Fix issue with spacing of crop plugin tools when main toolbar disabled. +- Fix issue with renderer throwing an error when using remote images for stickers. +- Fix missing TypeScript definition for setting sticker groups. +- Add `--preview-border-color` custom property for changing preview border color. +- Add preset for Ionic 3 Angular. + +## 7.8.0 | 2021-04-12 + +- Add `cropEnableRotateMatchImageAspectRatio` option, if set to `'always'` this will automatically rotate the crop rectangle with the image. The editor only does this if the image is rotated while fully zoomed out and the crop aspect ratio is set to custom or a rotated crop aspect ratio preset is available. Set to `'custom'` to only do this when in custom aspect ratio mode. For backwards compatibility reasons the default is `'never'`. +- Improve handling of turning images. Now auto scales crop to fit image if crop was centered and at max size within image bounds. +- Improve handling of crop aspect ratio changes with rotated image. Now auto resizes new crop to fit image bounds. +- Improve exported default crop aspect ratio options, now features 4:3 and 3:4 aspect ratios. +- Fix issue with annotate and decorate toolbar items not being displayed since version 7.7.0. +- Fix issue with zoom control not working correctly. +- Fix issue with reset button of zoom control still resetting to 0 when zoom range was limited. +- Fix issue with rotation and zooming out not always working correctly when `imageCropLimitToImage` was set to `false`. + +## 7.7.2 | 2021-04-09 + +- Fix issue with rotating while crop not being centered causing crop to zoom in too far. + +## 7.7.1 | 2021-04-08 + +- Fix issue with stickers on Angular 7. +- Add Nuxt.js example project. + +## 7.7.0 | 2021-04-06 + +- Add `beforeUpdateShape` which enables preventing or altering shape updates. +- Add individual filter exports for fine grain control over which filters are available. See documentation exports section for more details. +- Add individual finetune control exports for fine grain control over which color adjustment controls are available. See documentation exports section for more details. +- Add individual shape control exports to make customisation and configuration of the markup editor less verbose. See markup section in documentation for more details. +- Add helper methods to make customisation of markup editor easier. +- Add support for `width` only text shapes. Height is automatically calculated. +- Improve text shape selection, now tests against visual text shape instead of entire text box. +- Improve style of the text input box scrollbar. +- Improve handling of pasting text in the text input box. +- Improve TypeScript declarations file. +- Improve rendering of line end style shapes. +- Fix issue with auto repositioning of full size stickers. +- Fix issue with full size stickers not being scaled correctly. +- Fix issue with shape `opacity` property not applying opacity to textures. +- Fix issue with rotated text shapes causing a slight text misalignment. +- Fix issue with rotation inertia not being 100% smooth since 7.6.0. +- Fix issue with loading images smaller than minimum crop size. Now shows error message stating minimum image width and height. +- Fix issue with FilePond Image Editor plugin generating output image twice. Requires updating FilePond to 4.26.2. +- Fix issue with FilePond Image Editor plugin triggering re-upload of server image. Requires updating FilePond to 4.26.2. +- Removed unused image properties `noise` and `perspective` from `imageState` object. +- Deprecated default exports for `plugin_resize_defaults`, `plugin_sticker_defaults`, `plugin_annotate_defaults`, `plugin_decorate_defaults`, and `component_shape_editor_locale_en_gb`. + +## 7.6.0 | 2021-03-26 + +- Align preset templates with product page demo by loading annotate plugin instead of decorate plugin. +- Add sticker example code to the native and jquery preset templates. +- Add configuration properties to `store` property of `createDefaultImageWriter`. +- Add `image-input` custom element, it automatically creates file input elements with edit, sync, and async upload functionality. +- Fix issue with "react-doka" TypeScript declaration file. +- Fix issue with bottom padding for overlay rotation control being too big. +- Fix issue with float values in resize plugin width / height placeholders. +- Fix issue with rotate button double turning an image when one turn would be possible. +- Fix issue with zoom control showing `NaN` if min crop size was same as image size. + +## 7.5.5 | 2021-03-22 + +- Fix FilePond Image Editor plugin TypeScript declaration file. +- Fix React and Vue FilePond presets. +- Fix missing locale labels in locale folder. + +## 7.5.4 | 2021-03-19 + +- Fix issue where crop controls weren't centered when only one util plugin was active. +- Fix issue with editor border line looking a bit odd when not centered. + +## 7.5.3 | 2021-03-18 + +- Fix issue where converting a JPEG to a PNG would result in an invalid image. +- Fix issue with stickers button showing in annotate and/or decorate plugin even though no sticker presets were defined. +- Fix issue with canvas memory limit not being respected on browsers that support OffscreenCanvas. +- Fix issue with editing a set of files in Uppy. +- Fix issue where undefined value for `filter` resulted in an error when processing the image. +- Fix issues with TypeScript definitions not matching API. +- Fix issue with `resizeMinSize` and `resizeMaxSize` not being applied correctly when switching between size fields. + +## 7.5.2 | 2021-03-16 + +- Fix issue where processing a PNG would throw an error. + +## 7.5.1 | 2021-03-15 + +- Fix issue with `resizeMinSize` and `resizeMaxSize` being applied too soon. +- Fix issue with navigation bar overlapping revert button. + +## 7.5.0 | 2021-03-14 + +- Add color temperature control to finetune plugin. +- Add better range indicators to sliders, now range from -100 to 100. +- Add shape `fontStyle` property, set to `'italic'` to render italic font. +- Add shape `fontWeight` property, set to `'bold'` to render bold font. +- Add shape style control to switch between font weights and styles simultaneously. +- Add center indicator to range input. +- Add drop image on top of editor to load new image, toggle with `enableDropImage`, is disabled by default. +- Add test for Document Type Declaration before starting the editor. +- Add `enableButtonClose` to editor base UI, set to `true` to enable close button, is automatically set to `true` when using `openModal`. +- Add `close` public method to base UI, triggers 'close' event. +- Add experimental `willRenderNav` hook which allows manipulation of the main navigation toolbar. +- Improve rendering of shape style controls, now animated. +- Improve positioning of shape controls, now limited to stage. +- Improve rendering of disabled buttons, now show default "arrow" cursor instead of "hand". +- Fix `strokeWidth` being updated incorrectly when color was changed. +- Fix issue with internal events not being correctly removed. +- Fix issue with `NaN` value in resize util. +- Fix issue with shape style control appearing underneath shape manipulator corners. +- Fix issue with filter previews not rendering. +- Fix issue where JPEG image header wasn't copied over to output image. +- Rename preset `lib` folder to `local_modules`. + +## 7.4.4 | 2021-03-05 + +- Fix text missing from output. +- Fix coloring of text shapes without width. + +## 7.4.3 | 2021-03-04 + +- Fix center alignment of single row stickers. +- Fix internal shape props being outputted in imageState. +- Fix error when processing generating output data for Blob input. +- Reset scroll position in sticker groups when switching between groups. +- Improve Cordova preset with camera and photo library selection. + +## 7.4.2 | 2021-03-01 + +- Fix missing calls to `handleEvent` when using `openEditor`. +- Fix editor not firing progress events. + +## 7.4.1 | 2021-02-26 + +- Fix problem with iOS crashing while generating preview of big image. +- Fix problem with `calc()` statements missing parentheses. +- Fix issue with Server Side Rendering. +- Fix issue with Next.js production build. +- Fix issue with FilePond Image Editor plugin not removing file when closing editor. +- Fix problem with arrow styles not rendering correctly in preview. +- Fix missing vertical flip icon in shape controls. +- Add Cordova preset template. +- Add locale folder to package. +- Improve load speed of images in FilePond image editor plugin. +- Optimize package size. + +## 7.4.0 | 2021-02-23 + +- Add shape manipulation events that were available in v6 see Shape and Event docs for more information. +- Add sticker thumbnail hook. +- Add sticker `disabled` state option. +- Add sticker group `disabled`, `icon`, and `hideLabel` options. +- Add tabs for sticker groups. +- Add tool `disabled` state option. +- Add missing feature error message. +- Add `preprocessImageState` hook to `createDefaultImageWriter`. +- Fix text color also coloring Emoji. +- Fix double tapping text input not showing keyboard to edit text on iOS and Android. +- Fix line end square not being drawn. +- Fix line end output being slightly different from preview. +- Fix PostCSS error recognizing calc statements as require parsing. + +## 7.3.0 | 2021-02-17 + +- Improve cleaning up editor on window unload. +- Improve how modal controls affect editor height on iOS. +- Prevent virtual keyboard from resizing window view when using `openEditor`. +- Improve text input control interface on iOS and Android. +- Add live preview when editing text. +- Fix problem with text input on Android and iOS. +- Fix uncaught error when an image could not be loaded. + +## 7.2.2 | 2021-02-12 + +- Improve Vue2 components so attribute updates are caught correctly. +- Improve crop rectangle size calculations when switching between aspect ratios. +- Improve Next.js project set up to use CSS modules. +- Improve rendering of shape selection when switching view while a shape is selected. +- Add press escape key to close Image Editor modal. +- Add `stickerEnableSelectImage` prop to enable / disable custom sticker selection. +- Add FilePond implementation example to Vue 3 preset. +- Add FilePond implementation example to React and React TypeScript presets. +- Add CSS Modules doka.module.css file for use with Next.js. +- Fix issue where loading a new image would crash the editor. +- Fix crop rectangle not animating after using scroll wheel to zoom out when already zoomed out. +- Fix rotator anchor rendering in the wrong position when holding shift. +- Fix line snapping in the wrong direction when holding shift. + +## 7.2.1 | 2021-02-08 + +- Fix issue with drawing rectangles in annotation view on normal displays. +- Fix issue where text color could was always black. +- Fix issue where outline for rectangles wasn't being drawn. +- Fix problem with events not being fired correctly in Vue v2 components. +- Fix issue on Vue where assigning of initial props caused settings to be applied incorrectly. +- Fix problem with annotation stickers placed incorrectly on rotated image. +- Fix load event firing twice when loading images shortly after each other. +- Fix PNG aliased transparent pixels. +- Add `postprocessImageData` hook to `createDefaultImageWriter`. + +## 7.2.0 | 2021-02-04 + +- Add line snapping, hold shift to draw straight lines or to draw lines at a 45 degree angle. +- Add Vue 2 example project and components. +- Optimize vertical space use on iOS Safari. +- Optimize creation and memory usage of canvas elements. +- Optimize interaction with hitboxes small shapes. +- Fix `imageCrop` incorrectly applied when cropLimitToBounds was set to `false`. +- Fix annotations being drawn outside the image bounds on the output image. +- Fix imageBackgroundColor not being applied to pixels outside of imageData. +- Fix problem where buttons in shape popup menu could not be clicked when under top nav bar. +- Fix issue with opening browser dev tools and the keydown state not being released. +- Fix contextmenu causing events to be attached incorrectly. +- Fix filter being applied to image background fill. +- Fix blending of image effects with image data being slightly incorrect. +- Restructured Angular and Vue packages and preset folders. + +## 7.1.0 | 2021-01-29 + +- Fix issue with tiny gaps in sharpie lines on Safari. +- Fix `cornerRadius` not applied to rectangle in output image. +- Fix preview rendering of rectangles that had `cornerRadius`, `backgroundSize`, and `backgroundImage` applied. +- Fix `cornerRadius` overlapping if larger than half rectangle width. +- Dramatically improve text preview update speed when changing text color. +- Lower compressed package size by 2KB by optimising GLSL shaders. +- Optimise draw performance of rectangles and text shapes. +- Fix Angular minimum required version being 11. +- Fix issue with SSR and how the `` was defined. +- Fix `imageBackgroundColor` not being applied in preview and output. +- Improve render quality of colors in color picker buttons. +- Add auto setting of shape `strokeWidth` if `strokeColor` is changed in editor. +- Add Next.js preset project. +- Add Angular View Engine preset project for Angular versions 8 and lower. + +## 7.0.2 | 2021-01-25 + +- Fix negative clarity value not blurring output image. +- Fix problem with restoring annotation/decoration state with text shapes and image shapes. +- Fix rotated text not rendering. +- Fix problem with backgroundSize 'cover' and 'contain' not rendering correctly. +- Fix performance of multiline text resizing. +- Fix clipping of multiline text in output image. +- Fix handling of returns in auto text blocks. +- Fix not being removable with eraser tool. +- Fix clarity image preview showing black or white lines on iOS and M1. +- Fix drag dropping stickers not working on mobile. + +## 7.0.1 | 2021-01-22 + +- Fix dragging and dropping stickers only working in annotation mode. +- Fix image stickers not showing correctly. +- Fix drawing emoji stickers not working sometimes. +- Fix stickers being added while dragging over sticker thumbnail. +- Fix stickers not being rotated rotated correctly when adding to a rotated image. +- Fix clarity adjustments resulting in a black image. +- Fix sticker presets `width` and `height` not being picked up correctly. +- Fix circular shapes being incorrectly drawn on iOS. +- Fix solid arrows not being drawn to output image. +- Fix solid arrows not being drawn correctly on retina viewports. +- Fix arrow tool missing arrow icon. +- Fix stickers not being loaded correctly on Safari. +- Fix automatic font-stack filtering for font family dropdown. +- Fix Firefox navigating to previous page when trying to remove a shape with backspace key. +- Fix decoration and annotation scale being incorrect when setting `imageTargetSize` property. +- Fix menu buttons sometimes not responding to click. +- Fix problem with free drawing circles because of incorrect tap gestured detection. +- Fix android dragging of scrollable regions not working smoothly. +- Lowered default size for sharpie and text. +- Add `createDefaultImageOrienter`, use instead of `imageOrienter`. +- Improve scroll container performance. +- Removed preset util defaults from annotate and decorate tools. + +## 7.0.0 | 2021-01-15 + +Version 7 is a complete rewrite of the image editor. The look and feel is different and it is not backwards compatible. You can convert version 6 data to a version 7 compatible format using the `legacyDataToImageState` method exported by the image editor module. + +See below for a short overview of some of the new features and improvements. + +- Add landscape view to make better use of viewport space +- Add improved viewport resizing +- Add undo/redo and reset functionality +- Add shape drawing API for drawing custom elements on top of the preview +- Add zoom control +- Add new render engine +- Add vignette control for adding a retro look n' feel +- Add gamma control for gamma correction +- Add clarity control for slightly sharpening and blurring images +- Add Custom Element +- Add support for tree-shaking +- Add drag/drop of stickers +- Add uploading of custom stickers +- Add rotating of shapes +- Add z-ordering of shapes +- Add duplicating shapes +- Add various arrow end styles +- Add text wrapping +- Add improved color selection +- Add image annotation +- Add more filters +- Add stickers to draw utils +- Add separate sticker util +- Add headless processing of images +- Add improved FilePond integration plugin +- Add improved Dropzone integration plugin +- Add improved Uppy integration plugin +- Add improved jQuery, React, Angular, Svelte, and Vue adapters +- Fix issue with text not rendering correctly. +- Fix position of text input box that wasn't centered. +- Fix issue where reset or undo would restore beyond initial imageState. +- Fix issue where loading a new image would not work. + +## 6.20.0 | 2020-12-21 + +- Add gold version of version 7.0, this version is ready for public use + +## 6.19.0 | 2020-12-09 + +- Add second beta version of version 7.0 +- Add `beforeDeselectMarkup(currentItem, nextItem)` which is called when A markup item is deselected, return `false` to prevent deselection, return `true` to allow deselection. + +## 6.18.0 | 2020-11-19 + +- Add first beta version of version 7.0 +- Add `afterUpdateStickerItem(button, data)` which is called when the editor updates the sticker thumbnail. Allows updating the sticker thumbnail HTML. +- Add `beforeAddMarkup(markupItem)` hook which is called before a markup item is added, return `markupItem` or `false` to prevent adding the item. +- Add `beforeRemoveMarkup(markupItem)` hook which is called before a markup item is removed, return `markupItem` to continue or `false` to prevent removing the item. +- Add `onselectmarkup(markupItem)` callback which is called when a markup item has been selected. +- Add `onremovemarkup(markupItem)` callback which is called when a markup item has been removed. +- Add `onaddmarkup(markupItem)` callback which is called when a markup item has been added. + +## 6.17.0 | 2020-10-28 + +- Add React-Dropzone integration example. + +## 6.16.1 | 2020-10-26 + +- Fix issue with `filter` property not being applied when set to string. +- Fix issue where markup dropdowns would not select active styles. +- Fix issue where narrow viewport menu was rendered incorrectly when only one util was active. +- Fix issue where loading a new image wasn't possible after a previous image failed to load. +- Fix issue where Firefox would sometimes throw an error when loading a Blob + +## 6.16.0 | 2020-09-09 + +- Add `beforeReset` hook to allow cancelling a reset. +- Fix issue where the Dropzone adapter would throw an error if the editor rejected an image file. + +## 6.15.5 | 2020-09-04 + +- Fix issue where setting the `outputData` object as new options would not recreate previous state. + +## 6.15.4 | 2020-08-21 + +- Fix issue where clicks on filters or stickers would sometimes not register. + +## 6.15.3 | 2020-08-12 + +- Fix issue where clicking outside of a dropdown would throw an error. + +## 6.15.2 | 2020-08-10 + +- Fix issue with some buttons not working when testing on simulated iOS devices in Chrome DevTools. + +## 6.15.1 | 2020-08-07 + +- Fix issue where TypeScript definitions were missing in Angular package. + +## 6.15.0 | 2020-07-29 + +- Adjust hitboxes on markup resize controls so small items can be dragged more easily. +- Hide edge resize controls on small symbols. + +## 6.14.0 | 2020-07-27 + +- Improve determining image mime type and file name of images loaded from URLs. +- Fix issue where draw input could be enabled in sticker util view. +- Upgrade Angular example project to version 10. + +## 6.13.2 | 2020-06-25 + +- Fix issue where elements with fixed values in sticker markup were not rendered correctly. + +## 6.13.1 | 2020-06-22 + +- Fix issue where markup images on remote servers would trigger tainted canvas error. + +## 6.13.0 | 2020-06-16 + +- Add prevent swipe on edge of screen navigation on iOS 13.4+. +- Fix issue on IE11 where `contains` wasn't properly polyfilled. + +## 6.12.0 | 2020-05-29 + +- Add Sticker util. By default it's not enabled. Add `'sticker'` to the `util` property array to enable it. +- Add `stickers` property. See documentation for details on how to set the available stickers. + +## 6.11.0 | 2020-05-28 + +- Add `beforeLoadImage` hook to allow custom file validation. Receives `file` object, should return a Promise. Resolve with `file` if everything is fine, reject with error status code if image should be rejected. Set `labelStatusLoadImageError` to a function to show a custom status message, the function receives the error status code and should return the label to show in the status bubble. +- Fix issue with border color of markup elements that had a fill style. + +## 6.10.1 | 2020-05-14 + +- Fix issue in TypeScript definitions, `edit` method can resolve with `null`. +- Fix issue on IE11 where menu/utils would not render after switching between them. +- Fix issue with Angular example project not working on IE11 due to compiler problem. + +## 6.10.0 | 2020-05-04 + +- Update jQuery File Upload demo to use the `edit` functionality in the fileupload-ui library. + +## 6.9.2 | 2020-05-01 + +- Fix issue where image wasn't destroyed when loading a new image to an existing editor instance resulting in a memory leak. This could cause problems with rendering on iOS or errors related to a missing WebGL context. + +## 6.9.1 | 2020-04-30 + +- Fix issue with IE11 incorrectly loading DataURL strings. + +## 6.9.0 | 2020-04-28 + +- Add `onready` event which fires when a loaded image is first presented. +- Fix issue where `size` property would override FilePond input size. + +## 6.8.1 | 2020-04-23 + +- Improve handling of custom markup, now assigns unique id to markup item if no id set. +- Fix issue where server side rendering would throw an error. + +## 6.8.0 | 2020-04-15 + +- Add auto-detection of image-orientation functionality now present in iOS Safari 13.4 and Chrome 81, this prevents incorrect rotation of JPEG images that contain orientation EXIF info. +- Add `disableDokaImageEditor` option to jQuery File Upload package. +- Improve defensive CSS styles for SVG elements. + +## 6.7.0 | 2020-03-30 + +- Add `allowButtonReset`, set to `false` to disable the reset button. +- Fix issue where `size` property would not work when 'resize' util wasn't active. +- Improve defensive styles to prevent collisions with other style frameworks. + +## 6.6.0 | 2020-03-23 + +- Improve hitboxes of paths, lines and markup anchor points for easier handling on small viewports. + +## 6.5.5 | 2020-03-21 + +- Fix issue with error thrown while loading preview editor. + +## 6.5.4 | 2020-03-19 + +- Improve defensive styles to prevent collisions with other style frameworks. +- Fix issue where setting the `crop` property would reset other properties. +- Fix placement of new markup elements to prevent them falling outside of image bounds. + +## 6.5.3 | 2020-02-28 + +- Fix issue where accessing localStorage would throw an error if not available due to privacy restrictions. + +## 6.5.2 | 2020-02-24 + +- Fix issue where IE11 would throw an error when loading dataURIs. + +## 6.5.1 | 2020-02-14 + +- Fix issue where dragging and resizing was no longer working on webkit browsers after scrolling the view on a touch screen. +- Fix issue where `outputCanvasSyncTarget` wouldn't render the correct image on retina viewports. +- Fix issue introduced in version 6.5.0 where `setData` would reset the view. + +## 6.5.0 | 2020-02-13 + +- Add `outputCanvasSyncTarget` property, set to a canvas element to draw the current webgl view to the target canvas. +- Fix issue where setting new markup would not correctly clear existing markup. +- Fix issue where when the width of an inline editor was exactly 600 pixels the cancel and reset button would both be visible. + +## 6.4.3 | 2020-02-04 + +- Fix issue where Firefox 58 and earlier would freeze when generating a preview image. +- Fix issue where `cropMask` wouldn't redraw when updated. + +## 6.4.2 | 2020-01-30 + +- Fix issue where a race condition could happen when focus was moved outside of the editor. +- Fix issue where close button on processing status message would not show when rendering the editor inline. + +## 6.4.1 | 2020-01-28 + +- Fix issue where new filter logic would not be applied to filter previews and output image. + +## 6.4.0 | 2020-01-27 + +- Add `reject` handler to `afterCreateOutput`, hook can now be used to (for example) upload files and communicate the upload state to the user. +- Fix issue where status bubbles were no longer animated. +- Fix issue where filter color matrix would not correctly apply alpha values. + +## 6.3.1 | 2020-01-17 + +- Fix issue with response headers (when loading an image from URL) not being parsed correctly. + +## 6.3.0 | 2020-01-14 + +If you're overriding default styles this update might impact rendering and you might have to prepend your custom styles with `.doka--root` to make them more specific. + +- Add `cropAllowResizeRect`. Set to `false` to disable resizing the crop rectangle. Useful for when you only want to allow users to scale and rotate the image. +- Add markup clipping to prevent markup from being rendered outside of the image crop area (on modern browsers only). +- Improve defensive styles to prevent collisions with overly generic style selectors. +- Improve profile examples to include file input elements for replacing existing images. +- Fix issue where Safari would incorrectly render the crop size indicator on non-retinate displays. +- Fix issue where `cropResizeMatchImageAspectRatio` would incorrectly zoom in when `imagePreviewScaleMode` was set to `'crop'`. + +## 6.2.0 | 2020-01-06 + +- Add `imagePreviewScaleMode`, set to `'crop'` to use actual pixel size of crop for preview image. Set to `'image'` to use pixel size of source image for preview image. Default is `'stage'`, fits preview to stage which matches the current behavior. +- Improve rendering of keyboard indicator on top of image, now only shows when navigating to image preview with tab key. +- Fix issue where `markupUtil` selection wouldn't work on init. +- Fix issue with `allowImageFlipVertical` not working correctly. +- Fix issue with color selection util not rendering correctly. +- Fix issue where crop rectangle edges would not fully cover image. + +## 6.1.0 | 2020-01-02 + +- Add custom color selection util to the markup editor. Disable by setting `markupAllowCustomColor` to `false`. +- Improve main menu style for narrow viewports. The corners are now rounded and the main action button has a prominent color. + +## 6.0.0 | 2019-12-30 + +Markup style defaults properties have been renamed. This is a breaking change and therefor the major version number has changed as well. Previously the default styles were set using the index of the option in the linked style options list. Starting from this version the value is set using the actual value instead of the index. + +This is only a breaking change if you've set different default values for the markup styles. + +- Add draw tool to markup view. +- Set default markup style values using `markupColor` , `markupFontSize`, `markupFontFamily`, `markupShapeStyle`, and `markupLineDecoration`. +- Add `markupDrawDistance` property, this controls the smoothness of the draw line. +- Add auto switching between a dark and bright selection highlight based on the shape colors. +- Add label properties for markup utils. +- Fix issue with image head not being copied correctly when outputting a new image. + +## 5.13.0 | 2019-12-20 + +- Add more information to `update` event. +- Add `cropAllowRotate` to toggle rotation control in crop util. +- Add `util` property to programmatically set the current active util. +- Fix issue where Chrome would throw error when accessing custom response headers. +- Improve `setData` call, can now apply output data object. + +## 5.12.0 | 2019-12-16 + +- Add Svelte adapter components. +- Fix issue where setting aspect ratio using the API resulted in an error message. + +## 5.11.2 | 2019-12-12 + +- Fix issue with SSR introduced by 5.11.1 +- Fix issue with dragging the editor window on iOS. + +## 5.11.1 | 2019-12-12 + +- Fix issue where adding multiple color filters would not render a scrollbar. +- Fix issue where dragging the color adjustment tools would sometimes cause the knob to snap back to center after release. +- Fix issue with IE throwing an error during loading and processing status. + +## 5.11.0 | 2019-12-09 + +- Add conditional compilation statements to MJS and SCSS source files. Add conditional compilation to your build script to optimize the output files based on which editor utils are enabled (can save up to 30%). +- Fix issue where scroll instruction wasn't aligned to pixel grid resulting in blurred text on non-retina displays. +- Fix issue where mousedown inside the modal and mouseup outside the modal would close the editor modal. + +## 5.10.1 | 2019-12-02 + +- Fix issue where the editor would throw an error on removal due to missing MODIFIER_KEYS variable. + +## 5.10.0 | 2019-12-02 + +- Add feature where tapping the modal overlay will close the modal. +- Add progress indicator to load image status. +- Add `afterCreateOutput` which allows modifying the output and updating the status message in the editor. +- Add `labelResizeWidth`, `labelResizeHeight`, and `labelResizeApplyChanges` properties to control labels in resize view. +- Add crop size indicator values are now animated when zooming in and out. +- Add `cropAllowInstructionZoom`, when set to `true` this will show a small message to the user explaining how to zoom in and out (it'll only appear when the crop is centered and after two seconds of interaction). When the user scrolls or zooms in/out with the touchpad the message is hidden and will not re-appear (the editor will use `localStorage` to remember it has shown the message). The editor will use the value in the `storageName` property as the name for the `localStorage` entry. +- Use `labelCropInstructionZoom` to change the label of the crop instruction bubble. +- Update resize modifier key handling, when the array of key codes is empty the custom resize functionality is disabled. +- Fix issue where clicks on menu wouldn't work while the menu bar was fading into view. +- Fix issue where scrollbars where enabled on devices that showed no scrollbars causing a slight horizontal jump when opening the editor. +- Fix issue where current and target aspect ratio wasn't calculated correctly resulting in weird zooming when switching between utils. +- Fix issue where destroying the editor would throw a removeEventListener error when `allowDropFiles` was enabled. + +## 5.9.0 | 2019-11-08 + +- Update `labelStatusLoadImageError` to allow both a function and a string to be assigned. The function receives the image load error, the string returned by the function is presented in the status bubble shown by the editor to the user. +- Fix issue where `getData` would not throw an error when called immediately after init. +- Fix issue where status layer would be rendered outside of the editor when in modal mode. + +## 5.8.0 | 2019-10-29 + +- Add option to set `width` and `height` values to the aspect ratio dropdown. This turns the dropdown into a list of image size presets. When size values are used the aspect ratio is calculated based on the supplied dimensions. +- Improve rendering performance and CSP compatibility by using `cssText` instead of `setAttribute` for updating view layout. + +## 5.7.0 | 2019-10-10 + +- Add `cropResizeMatchImageAspectRatio`, when enabled this will automatically adjust the crop aspect ratio to match the image aspect ratio if the user zooms out. Only works if the aspect ratio is set to "free". + +## 5.6.0 | 2019-10-08 + +- Add `cropAllowToggleLimit` to enable the "Crop selection" button. +- Add `cropLimitToImageBounds` to toggle limiting the crop selection to the image bounds or allow cropping outside of the image. +- Add `outputCanvasBackgroundColor` to control the color of the canvas when a transparent PNG is converted to JPEG and when cropping outside of the image bounds. +- Add `outputCorrectImageExifOrientation` to toggle correcting image EXIF orientation on and off, this is on by default. +- Fix issue where dragging the crop rectangle and scrolling the mouse wheel at the same time would throw an error. + +If you are using the editor with FilePond, please update the following plugins + +- Image Edit to at least 1.5.0 +- Image Preview to at least 4.5.0 +- Image Transform to at least 3.5.0 + +## 5.5.1 | 2019-09-26 + +- Fix issue where IE11 would not load images due to locked inner draw loop. + +## 5.5.0 | 2019-09-24 + +- Fix issue with missing handler in Angular profile demo. +- Fix issue with Angular production build not working on example project, see example project README_DOKA.md for new installation instructions. +- Add `onloadstart` callback. + +## 5.4.1 | 2019-09-19 + +- Fix issue with zoom scroll not working correctly within crop rectangle with inline editor. +- Fix issue with the editor instantly focussing the first view on load. +- Fix issue with color tools alignment. +- Increase opacity of image overlay on all but crop view. +- Lower height of crop and markup toolbar to create slightly more room for image. + +## 5.4.0 | 2019-09-17 + +- Add `allowBrowseFiles`, click on editor to upload new file while awaiting file input. +- Add `cropAllowImageFlipHorizontal` and `cropAllowImageFlipVertical` to toggle flip buttons on and off. +- Add `cropAllowImageTurnLeft` to toggle rotate left button. +- Add `pointerEventsPolyfillScope`, set to 'document' to polyfill pointer events at the document level instead of the editor level, this will allow dragging outside of the editor on Safari (and other browsers lacking PointerEvent support). +- Fix issue with WebGL error being thrown on black listed graphic cards/drivers. +- Fix issue with scroll zoom not working when scrolling towards an already initialised editor. +- Fix issue with weird image outline rendering issues on Firefox. +- Fix issue where setting the `className` property would not assign the class to the editor root element. + +## 5.3.1 | 2019-09-12 + +- Improve WebGL performance on older devices by slightly lowering the canvas size. The editor now uses the `devicePixelRatio` times `.75`. +- Fix issue where multi-touch interaction on the crop rectangle would throw an error. +- Fix issue where releasing a drag operation on a markup shape would throw an error. + +## 5.3.0 | 2019-09-06 + +- Add `cropResizeScrollRectOnly` property to limit scroll resizing to the crop rectangle. +- Fix issue where Edge would throw an error related to `toColor` method when closing the editor. + +## 5.2.1 | 2019-09-03 + +- Add "WebGL required" message to notify users when WebGL has been disabled on their browser. +- Fix issue where main util menu wasn't always perfectly aligned to the center. +- Fix issue where "Awaiting image" message would not show. +- Fix issue where aspect ratio dropdown would show for a small moment. +- Improve rendering of resize view. +- Improve callbacks in TypeScript declaration file. + +## 5.2.0 | 2019-09-02 + +- Add Angular adapter components. +- Fix problem with `cropAspectRatio` not updating the crop aspect ratio. +- Fix TypeScript declaration file mismatch with standards. +- Fix issue with crop size indicator throwing an error. +- Fix issue with resize view not re-rendering correctly. +- Improve TypeScript declaration file with better interfaces. + +## 5.1.3 | 2019-08-29 + +- Fix problem with double destroy method in GL layer. +- Fix problem with hiding util buttons instead of removing them completely. +- Fix problem where src scss file was not up to date. +- Improve CSS to prevent style collisions. + +## 5.1.2 | 2019-08-27 + +- Fix issue with WebGL background gradient flickering on certain hardware. + +## 5.1.1 | 2019-08-27 + +- Fix problem with multitouch resizing not working. + +## 5.1.0 | 2019-08-26 + +- Improve rendering performance by switching to WebGL powered image layer. +- Re-render when returning to editor from another tab. +- Improve release of canvas memory on Safari. +- All kinds of small performance improvements to limit use of CPU. +- Add more error logging to process method. +- Add keyboard navigation indicator icon. +- Fix issue where pressing backspace to remove markup on Firefox would navigate away from the page. +- Fix problem where creating the output image didn't work on iOS 10. + +## 5.0.2 | 2019-08-22 + +- Fix additional issue with shapes not loading after previous fix. +- Fix problem with removing locked shapes. + +## 5.0.1 | 2019-08-22 + +- Fix issue where removed markup item was still rendered to canvas. +- Fix issue where hidden error message would be thrown when closing the editor modal on Firefox. + +## 5.0.0 | 2019-08-15 + +Although the major version number has been changed, this version is mostly backwards compatible. The only breaking change is that now all utils except the resize util are enabled by default. + +If you've integrated the editor with FilePond, please make sure you update the FilePond Image Transform, Image Preview, and Image Edit plugins. + +- Add markup support. +- Add support for predefined markup. +- Add support for controlling which markup elements can be modified / edited. +- An extensive set of performance improvements. +- Improvements to examples templates. +- Fix `cropAspectRatioOptions` throwing an error when set to an empty array. +- Other small bug fixes and improvements. + +## 4.8.3 | 2019-08-07 + +- Fix additional problem with image processing step that caused a crash when no output size was set. + +## 4.8.2 | 2019-08-07 + +- Fix problem where Vue component didn't render correctly. +- Update React example to include initial crop aspect ratio. + +## 4.8.1 | 2019-08-06 + +- Fix problem where output upscale setting crashed image processing step. + +## 4.8.0 | 2019-08-05 + +- Add output image width and height to `output.data.image` property. +- Fix polyfill URLs in file upload library integration examples. + +## 4.7.2 | 2019-07-31 + +- Fix `ResizeMode` TypeScript property. +- Add `outputCanvasMemoryLimit` to TypeScript files. +- Add `tslint:disable` to Vue components to silence tslint warnings. +- Add very basic `createDoka.d.ts` file so the editor Vue components are seen as Components. + +## 4.7.1 | 2019-07-24 + +- Recover Vue FilePond image editor integration example. + +## 4.7.0 | 2019-07-24 + +- Fix issue where iOS canvas memory limit could be exceeded. Add the `outputCanvasMemoryLimit` property which is automatically set to 16 megapixels on iOS devices. The editor will automatically scale output canvas size on these devices to prevent transparent output images. + +## 4.6.4 | 2019-07-23 + +- Improve defensive CSS styles for better compatibility with CSS frameworks. +- Fix problem where EXIF info wasn't copied when `outputStripImageHead` was set to `false`. + +## 4.6.3 | 2019-07-23 + +- Fix style problem with React FilePond image editor integration example. +- Fix problem with Vue demo's throwing error when loading Web Workers. +- Add Vue FilePond image editor integration example. + +## 4.6.2 | 2019-07-11 + +- Fix issue where filter thumbnail was still skewed in some situations. + +## 4.6.1 | 2019-07-08 + +- Fix issue where a small canvas element was appended to the document body. + +## 4.6.0 | 2019-07-02 + +- Add `initialState` property to set state to reset to when reset button is pressed. Set to `null` to reset to the default editor state. +- Add React FilePond image editor example integration. +- Fix issue where filter previews showed a skewed image. +- Fix issue where setting the `size` property would throw an error. +- Fix issue where a `size` property update would not hide resize percentage indicator. +- Improved performance of filter preview rendering. + +## 4.5.2 | 2019-07-01 + +- Add color transitions to various parts of the editor for nicer theme switching. +- Add jQuery adapter. + +## 4.5.1 | 2019-06-22 + +- Fix `cannot read property scale of null` error. + +## 4.5.0 | 2019-06-21 + +- Add conditional close button to image error status message when in fullscreen mode so user can close the editor when an image fails to load. +- Optimise and speed up image resize logic. +- Fix rendering of cancel/exit button icon on Safari. +- Fix problem where `outputUpscale` when set to `false` would sometimes skip applying image filters. +- Fix problem with wrapping of utility tabs. + +## 4.4.2 | 2019-06-20 + +- Fix issue with minimum crop size not being calculated correctly for big images. +- Fix issue with updating the available utils property. + +## 4.4.1 | 2019-06-17 + +- Fix issue where flipping the image preview would hide it. +- Fix style collision with normalize.css. +- Fix style collisions created by blanket `* { box-sizing: border-box; }`. + +## 4.4.0 | 2019-06-13 + +This update adds the bright theme and a color control panel. + +All color values in CSS are now accessible through CSS Custom Properties, see documentation for a detailed guide. CSS Custom Properties are supported in all major browsers except Internet Explorer 11, it will still have to be styled "manually". + +- Set `--doka-invert` to `100%` on the `.doka--root` element to set bright theme mode. +- Add line crop corner style. Set the `styleCropCorner` to `'line'`, default is `'circle'`. +- Add brightness, contrast, exposure, and saturation controls. Enable by adding the `'color'` util to the `utils` property. +- Improve resize preview by taking into account the `devicePixelRatio` when calculating the image preview width and height. +- Slightly increase distance between utility buttons and crop rectangle, this results in less miss clicks. +- Fix issue where crop icon color would not be based on current color. +- Removed rounded corners from size indicator, this makes it look more distinct from the crop corners. Set `--doka-size-indicator--radius` to `9999em` to restore rounded corners. + +## 4.3.3 | 2019-06-06 + +- Fix issue where IE11 would throw an error because of using `Number.isNaN` instead of `isNaN`. +- Fix issue where crop rectangle size could fall below minimum image size when switching from free to a fixed ratio crop. +- Fix issue where crop rectangle size could fall below minimum image size when free cropping a very small image. +- Fix issue when selecting crop aspect ratios that would result in invalid crops for very small images by hiding the invalid crop ratios. + +## 4.3.2 | 2019-06-05 + +- Fix issue where native examples no longer worked on IE11 because polyfill was loaded incorrectly. +- Fix issue where min crop size was not respected while dragging corner crop controls. +- Fix issue where filter thumbnail images were skewed when image EXIF orientation header was set. +- Add "src" folder. This folder contains the merged source files. The JavaScript is written in ES6, this will need to be transpiled to function. The CSS files are written in Sass so will need to be converted to CSS to function. + +## 4.3.1 | 2019-05-31 + +- Fix issue where native examples did not load filters. +- Fix issue where font weight of buttons could be easily and accidentally overruled by other styles. +- Fix issue with internal paint loop not handling inactive tab state correctly. + +## 4.3.0 | 2019-05-28 + +- Fix issue where tab buttons would not enforce the editor `line-height`. +- Fix issue where image error status bubble would appear in bottom right corner on Safari 12. +- Fix problem where document body would receive min height of 512 pixels. +- Add image information object to `onload` event. +- Add `onupdate` event which shares the current crop width and height. +- Add `allowPreviewFitToView` option, set to `false` to prevent the editor from upscaling the preview image. +- Update example projects to include filter and resize utilities. + +## 4.2.0 | 2019-05-24 + +- Add filters, enable by adding the `'filter'` string to the `utils` property. +- Redesigned the Crop and Resize utility icons. +- Fix issue where dragging an image would throw an error on Safari. +- Fix issue where bottom safe area on iOS was always active, now only activates when Safari footer menu is not visible. +- Fix issue where outlines were invisible in high contrast mode. +- Fix issue where SVG elements were focusable on IE and Edge. +- Update TypeScript definitions. + +## 4.1.2 | 2019-05-09 + +- Fix issue where React module was a build target instead of the original source files. + +## 4.1.1 | 2019-05-02 + +- Fix issue where certain aspect ratios could overflow the minimum and maximum image size. + +## 4.1.0 | 2019-04-26 + +- Fix issue where resize and crop size width and height were reported incorrectly for large images. +- Fix issue where scrollwheel was still available in resize view. +- Fix issue where degree character would render incorrectly by replacing it with its HTML entity `°`. +- Fix issue where rotating the image 180 degrees and then flipping it would in not flip along the correct axis. +- Fix issue where typescript definitions for `getData`, `setData`, and `save` were malformed. +- Improved rendering of crop/resize image edges, they now better overlap with the image. +- Add `onloaderror` callback to programmatically handle image load error status. +- Add `afterCreateBlob` hook to allow modifying the Blob data before it's outputted by the editor. + +## 4.0.3 | 2019-04-11 + +- Fix issue where loading indicator view would break outside of editor when editor was inlined on the page. +- Fix issue where status message would unevenly draw background color of editor. +- Fix issue where zoom button would be clickable while hidden. +- Fix issue where settings the aspect ratio to free was no longer possible after loading an image with a given aspect ratio. +- Update TypeScript doka.d.ts file with new options added in version 4. + +## 4.0.2 | 2019-04-08 + +- Fix issue where editor would not clean up properly when exiting full screen mode. + +## 4.0.1 | 2019-04-04 + +- Add feature where turning is automatically done by 180 degree intervals if 90 degree does not fit the required minimum crop size. +- Fix issue where crop mask overlay would log a series of errors. +- Fix issue where crop mask overlay animation would not sync up with image and crop animations. + +## 4.0.0 | 2019-04-04 + +This is a major release as internally a lot of elements have changed, still it shouldn't break anything. If you're targeting the editor inner elements to apply different styles then the related CSS selectors might have to be updated. + +- Add Resize util. Enable by setting the `utils` option to `['crop', 'resize']`. The array also controls the order of the menu items. +- Add `size`, `sizeMin`, and `sizeMax` options to control image output size. +- Add size indicator in crop view, toggle with `cropShowSize`, default is `false`. +- Change `cropMinImageWidth` default value to `1`. +- Change `cropMinImageHeight` default value to `1`. +- Add `labelButtonUtilCrop` option. +- Add `labelButtonUtilResize` option. +- Improve animations to be just a little bit less bouncy. +- Fix issue where window resize sometimes caused view updates to not render correctly. +- Fix issue where main menu overlapped with top crop edge and corners making it difficult to control the crop area in some situations. +- Various tiny fixes and improvements. + +## 3.1.0 | 2019-02-21 + +- Add editor methods to React components. +- Add Vue components and demos. +- Add crop mask example to React and Vue demos. +- add `save` method to manually save the currently loaded image. This is basically an alias for `getData`. +- add `onload` callback which is called when an image has been successfully loaded. +- Fix issue where the editor would prevent default on the `mousemove` event. +- Fix issue where aspect ratio dropdown would not select the free aspect ratio. +- Fix issue where modal close event was fired multiple times if modal was not immediately removed from DOM. + +## 3.0.0 | 2019-02-12 + +This release adds React components to the package. + +- Fix issue with zoom timeout where multiple editor instances were sharing the same timeout id. +- Fix issue where passing a `cropAspectRatio` to `edit` or `open` would make it the default crop aspect ratio. +- Now only automatically closes and removes itself when in modal mode. When the editor is in preview or in-page layout mode it needs to be closed programmatically. +- Removed `queue` mode, the active file is now replaced if a new file is added, by listening to the `onconfirm` event it's still possible to walk over a queue of files. Samples have been updated. +- Add `allowAutoClose` to disable automatically closing the modal. The modal can then be programmatically closed using the `close()` method. +- Add `allowAutoDestroy`, if enabled the editor will automatically destroy itself when the modal is closed. +- Renamed `labelButtonClose` to `labelButtonCancel`. +- Renamed `allowButtonClose` to `allowButtonCancel`. +- Fix issue where `clear()` method did not work, it now removes the active image from view. +- Cancelling editing an image will no longer reject the returned Promise, it will resolve it returning `null`. +- Add `beforeCreateBlob` to adjust the output data before the Blob is created, useful for when you want to add a watermark. +- Add `crop` options, to programmatically update the current crop rectangle. +- Fix file processing popup, will now only show when the file is actually being processed. +- Add more examples to the package. +- Update TypeScript definitions. + +## 2.3.1 | 2019-01-22 + +- Update Typescript definitions. + +## 2.3.0 | 2019-01-22 + +- Add `cropMask` and `cropMaskInset` which can be used to plot a mask overlay on top of the crop area. + +## 2.2.1 | 2019-01-17 + +- Fix issue where server side rendering would not work. + +## 2.2.0 | 2019-01-03 + +- Add `cropMinImageWidth` and `cropMinImageHeight` properties. +- Fix issue where zoom button could not be clicked when crop area was very small. + +## 2.1.2 | 2018-12-27 + +- Fix issue where a resize of the image would prevent the editor from working on Android. + +## 2.1.1 | 2018-12-22 + +- Fix issue where the image was flipped along the incorrect axis when rotated. +- Remove flip indicator from flip buttons. + +## 2.1.0 | 2018-12-22 + +- Add typescript definitions file for the editor module. +- Add modal layout mode, set `styleLayoutMode` to `modal` to enable (only works in fullscreen mode). See docs for further instructions. +- Add key listener to allow closing of the modal and fullscreen mode by pressing the escape key. +- Add `outputStripImageHead` property, set to `false` to copy JPEG EXIF data to output file. +- Add /_ eslint-disable _/ statement to each file library file to prevent collisions with es lint. +- Improve responsive rendering of crop tools menu so it correctly renders no matter how many buttons are active. +- Fix FilePond sample, image edit plugin should be registered last. + +## 2.0.1 | 2018-12-04 + +- Fix issue with alignment of editor on IE11. +- Fix issue with alignment of aspect ratio dropdown on IE11. +- Fix issue with smoke overlay not rendering correctly on IE11. + +## 2.0.0 | 2018-11-25 + +- Add keyboard navigation. +- Add aspect ratio dropdown. +- Add loading and processing image indicators. +- Add open API endpoint to manually open images. +- Add open API endpoint to manually edit images. +- Add getData API endpoint to manually retrieve image data. +- Add setData API endpoint to manually update image data. +- Add option to use Image and Canvas tags as a source. +- Add option to configure labels. +- Add option to drop images directly on the editor. +- Add option to disable menu buttons. +- Add zoom timeout option. +- Add image transform options. +- Add functionality that blocks interactions when loading or processing images. +- Add container mode, run one or multiple editors in-page instead of fullscreen. +- Add preview mode, run the editor in a preview overlay on top on an image. +- Add integrations with different file upload solutions. +- Improve rescaling of the editor. +- Improve rendering by syncing with FilePond internal render engine if present. +- Improve handling of keyboard focus, now moves to the editor when active. +- Improve style of cancel, reset and confirm buttons. +- Improve presentation of flip buttons. +- Improve the keyboard focus indicator. +- Fix issue where button icons would incorrectly align on older browsers. +- Fix issue where the editor view would be incorrectly centered on Internet Explorer 11. +- Fix issue where iOS bottom footer would interfere with the editor. +- Fix issue where focus could leave editor when in fullscreen mode. +- Fix close window animation. + +## 1.0.2 | 2018-11-01 + +- Fix issue with resize controls not being positioned correctly when the viewport is very big. + +## 1.0.1 | 2018-10-12 + +- Fix issue with dynamic font size on body of editor. +- Fix issue with resize controls not being positioned correctly. +- Fix issue where reset and zoom icons would be positioning incorrectly on small viewports. + +## 1.0.0 | 2018-10-05 + +- Initial release. diff --git a/src/components/@pqina/pintura/README.md b/src/components/@pqina/pintura/README.md new file mode 100644 index 0000000..5c79274 --- /dev/null +++ b/src/components/@pqina/pintura/README.md @@ -0,0 +1,113 @@ +# Pintura Test Version + +This package is for testing Pintura in your project. This version of Pintura will overlay a watermark on top of the editor and output image. You can purchase a license on the [Pintura product page](https://pqina.nl/pintura/). + +Documentation: https://pqina.nl/pintura/docs/ + +## Installation + +```bash +npm install @pqina/pintura +``` + +If you're using Svelte, Vue, React, or Angular, you can install the matching adapter components like this. + +```bash +npm install @pqina/svelte-pintura +``` + +## Example implementations + +Use one of the example projects below as a starting point or guideline. + +JavaScript: + +- [JavaScript](https://github.com/pqina/pintura-example-javascript) +- [PinturaInput](https://github.com/pqina/pintura-example-pintura-input) +- [CustomElement](https://github.com/pqina/pintura-example-custom-element) + +Frameworks: + +- [jQuery](https://github.com/pqina/pintura-example-jquery) +- [Angular](https://github.com/pqina/pintura-example-angular) +- [Vue 2](https://github.com/pqina/pintura-example-vue-2) +- [Vue 3](https://github.com/pqina/pintura-example-vue-3) +- [Nuxt 2](https://github.com/pqina/pintura-example-nuxt-2) +- [Nuxt 3](https://github.com/pqina/pintura-example-nuxt-3) +- [Svelte](https://github.com/pqina/pintura-example-svelte) +- [SvelteKit](https://github.com/pqina/pintura-example-sveltekit) +- [React](https://github.com/pqina/pintura-example-react) +- [React TypeScript](https://github.com/pqina/pintura-example-react-typescript) +- [NextJS](https://github.com/pqina/pintura-example-nextjs) +- [React Native](https://github.com/pqina/pintura-example-react-native) +- [React Native TypeScript](https://github.com/pqina/pintura-example-react-native-typescript) +- [Cordova](https://github.com/pqina/pintura-example-cordova) +- [Capacitor](https://github.com/pqina/pintura-example-capacitor) +- [Ionic 6](https://github.com/pqina/pintura-example-ionic-6) + +File upload libraries: + +- [FilePond](https://github.com/pqina/pintura-example-filepond) +- [jQuery File Upload](https://github.com/pqina/pintura-example-jquery-file-upload) +- [React Dropzone](https://github.com/pqina/pintura-example-react-dropzone) +- [Dropzone](https://github.com/pqina/pintura-example-dropzone) +- [Uppy](https://github.com/pqina/pintura-example-uppy) + +## Components and Adapters + +Individual components can be found below: + +- [PinturaInput](https://github.com/pqina/pintura-component-pintura-input) +- [Vue](https://github.com/pqina/pintura-component-vue) +- [React](https://github.com/pqina/pintura-component-react) +- [Angular](https://github.com/pqina/pintura-component-angular) +- [Svelte](https://github.com/pqina/pintura-component-svelte) +- [React Native](https://github.com/pqina/pintura-component-react-native) + +Adapters can be found here: + +- [jQuery](https://github.com/pqina/pintura-adapter-jquery) +- [FilePond](https://github.com/pqina/filepond-plugin-image-editor) +- [Uppy](https://github.com/pqina/pintura-adapter-uppy) +- [Dropzone](https://github.com/pqina/pintura-adapter-dropzone) + +## Compatibility + +Pintura works on all modern browsers and devices. + +- Chrome +- Firefox +- Edge 18+ +- Safari 10+ +- Opera +- Chrome for Android +- Firefox Android +- iOS Safari 10+ +- Chrome for iOS +- Firefox iOS + +### Safari 11 and 12 + +- Safari 11 (global usage 0.05%) +- Safari 12 (global usage 0.01%) + +To add support for these browsers we need to polyfill Pointer Events. +Download polyfill here: https://github.com/Rich-Harris/Points + +### Safari 10 and Edge 18 + +- Safari 10 (global usage 0.01%) +- Edge 18 (global usage 0.23%) + +These browsers don't fully support JavaScript modules and will require polyfills to function correctly. To make Pintura Image Editor work on these browsers you'll need to load the IIFE version or transpile a compatible version yourself. + +Required polyfills for Edge 18: + +- Symbol.asyncIterator +- HTMLCanvasElement.prototype.toBlob + +Include this URL in your page to polyfill both the APIs above: https://polyfill.io/v3/polyfill.min.js?features=Symbol.asyncIterator%2CHTMLCanvasElement.prototype.toBlob + +### Internet Explorer 11 + +Internet Explorer 11 is not supported, global usage is at around 0.5%, it is end of life. diff --git a/src/components/@pqina/pintura/fixed-on.js b/src/components/@pqina/pintura/fixed-on.js new file mode 100644 index 0000000..b27cad5 --- /dev/null +++ b/src/components/@pqina/pintura/fixed-on.js @@ -0,0 +1,31062 @@ +/*! + * Pintura v8.71.2 - Test version + * (c) 2018-2024 PQINA Inc. - All Rights Reserved + * License: https://pqina.nl/pintura/license/ + * + * Visit https://pqina.nl/pintura/ to obtain a commercial license. + */ +/* eslint-disable */ + +const e = [{ + value: 65504, + name: "jfif" +}, { + value: 65498, + name: "sos" +}, { + value: 65505, + subvalue: 17784, + name: "exif" +}, { + value: 65505, + subvalue: 26740, + name: "xmp" +}, { + value: 65506, + subvalue: 19792, + name: "mpf" +}]; +var t = t => { + if (65496 !== t.getUint16(0)) return; + const o = t.byteLength; + let i, r = 2, + n = void 0; + for (; r < o && 255 === t.getUint8(r);) { + i = t.getUint16(r); + const o = e.find((e => e.value === i && (!e.subvalue || e.subvalue === t.getUint16(r + 2 + 2)))); + if (o) { + const { + name: e + } = o; + n || (n = {}), n[e] || (n[e] = { + offset: r, + size: t.getUint16(r + 2) + }) + } + if (65498 === i) break; + r += 2 + t.getUint16(r + 2) + } + return n +}; +var o = (e, o, i) => { + if (!e) return; + const r = new DataView(e), + n = t(r); + if (!n || !n.exif) return; + const a = ((e, t) => { + if (65505 !== e.getUint16(t)) return; + const o = e.getUint16(t + 2); + if (t += 4, 1165519206 !== e.getUint32(t)) return; + t += 6; + const i = e.getUint16(t); + if (18761 !== i && 19789 !== i) return; + const r = 18761 === i; + if (t += 2, 42 !== e.getUint16(t, r)) return; + t += e.getUint32(t + 2, r); + const n = i => { + const n = []; + let a = t; + const s = Math.min(e.byteLength, t + o - 16); + for (; a < s; a += 12) { + const t = a; + e.getUint16(t, r) === i && n.push(t) + } + return n + }; + return { + read: t => { + const o = n(t); + if (o.length) return e.getUint16(o[0] + 8, r) + }, + write: (t, o) => { + const i = n(t); + return !!i.length && (i.forEach((t => e.setUint16(t + 8, o, r))), !0) + } + } + })(r, n.exif.offset); + return a ? void 0 === i ? a.read(o) : a.write(o, i) : void 0 +}; +var i = e => window.__pqina_webapi__ ? window.__pqina_webapi__[e] : window[e], + r = (...e) => {}; +const n = { + ArrayBuffer: "readAsArrayBuffer" +}; +var a = async (e, t = [0, e.size], o) => await ((e, t = r, o = {}) => new Promise(((r, a) => { + const { + dataFormat: s = n.ArrayBuffer + } = o, l = new(i("FileReader")); + l.onload = () => r(l.result), l.onerror = () => a(l.error), l.onprogress = t, l[s](e) +})))(e.slice(...t), o), s = async (e, t) => { + const i = await a(e, [0, 262144], t); + return o(i, 274) || 1 +}; +let l = null; +var c = () => (null === l && (l = "undefined" != typeof window && void 0 !== window.document), l); +let d = null; +var u = () => new Promise((e => { + if (null === d) { + const t = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k="; + let o = c() ? new Image : {}; + o.src = t + console.log('****&&', o); + const parentDiv = document.createElement('div') + parentDiv.appendChild(o) + document.body.appendChild(parentDiv) + return o.onload = () => { + d = 1 === o.naturalWidth, o = void 0, e(d) + }, void(o.src = t) + } + return e(d) + })), + h = e => e.getContext("2d").getImageData(0, 0, e.width, e.height), + p = (e, t, o = []) => { + if (e === 'pre' || e === "div") { + t = { + ...t, + innerHTML: "", + style: "" + } + } + const i = document.createElement(e), + r = Object.getOwnPropertyDescriptors(i.__proto__); + for (const e in t) "style" === e ? i.style.cssText = t[e] : r[e] && r[e].set || /textContent|innerHTML/.test(e) || "function" == typeof t[e] ? i[e] = t[e] : i.setAttribute(e, t[e]); + console.log(e, t, o); + return o.forEach((e => i.appendChild(e))), i + }; +const m = { + 1: () => [1, 0, 0, 1, 0, 0], + 2: e => [-1, 0, 0, 1, e, 0], + 3: (e, t) => [-1, 0, 0, -1, e, t], + 4: (e, t) => [1, 0, 0, -1, 0, t], + 5: () => [0, 1, 1, 0, 0, 0], + 6: (e, t) => [0, 1, -1, 0, t, 0], + 7: (e, t) => [0, -1, -1, 0, t, e], + 8: e => [0, -1, 1, 0, 0, e] +}; +var g = e => { + e.width = 1, e.height = 1; + const t = e.getContext("2d"); + t && t.clearRect(0, 0, 1, 1) + }, + $ = e => "data" in e, + f = e => c() ? RegExp(e).test(window.navigator.userAgent) : void 0; +let y = null; +var b = () => (null === y && (y = f(/Android/)), y), + x = (e, t) => { + const o = p("canvas", { + width: e.width, + height: e.height + }); + + return o.getContext("2d", t).drawImage(e, 0, 0), o + }, + v = async (e, t = 1) => { + const o = await u(), + [i, r] = o || t < 5 ? [e.width, e.height] : [e.height, e.width], + n = p("canvas", { + width: i, + height: r + }), + a = n.getContext("2d", { + willReadFrequently: !0 + }); + + if ($(e) && !o && t > 1) { + const t = p("canvas", { + width: e.width, + height: e.height + }); + t.getContext("2d", { + willReadFrequently: !0 + }).putImageData(e, 0, 0), e = t + } + + if (!o && t > 1 && a.transform.apply(a, ((e, t, o = -1) => (-1 === o && (o = 1), m[o](e, t)))(e.width, e.height, t)), $(e)) { + if (a.putImageData(e, 0, 0), b()) return x(n) + } else a.drawImage(e, 0, 0); + return e instanceof HTMLCanvasElement && g(e), n + }, w = async (e, t = 1) => 1 === t || await u() ? e : h(await v(e, t)), S = e => "object" == typeof e; +const k = e => e instanceof HTMLElement ? e : S(e) ? C(e) : e, + C = e => { + let t; + return Array.isArray(e) ? (t = [], e.forEach(((e, o) => { + t[o] = k(e) + }))) : (t = {}, Object.keys(e).forEach((o => { + const i = e[o]; + t[o] = k(i) + }))), t + }; +var T = e => "string" == typeof e, + M = e => "function" == typeof e, + R = (e, t) => new Promise(((o, i) => { + const r = () => o(((e, { + width: t, + height: o, + canvasMemoryLimit: i, + contextOptions: r + }) => { + let n = t || e.naturalWidth, + a = o || e.naturalHeight; + n || a || (n = 300, a = 150); + const s = n * a; + if (i && s > i) { + const e = Math.sqrt(i) / Math.sqrt(s); + n = Math.floor(n * e), a = Math.floor(a * e) + } + const l = p("canvas"); + + return l.width = n, l.height = a, l.getContext("2d", r).drawImage(e, 0, 0, n, a), l + })(e, t)); + e.complete && e.width ? r() : (e.onload = r, e.onerror = () => i(new Error("Failed to load image"))) + })), + P = () => "createImageBitmap" in window, + E = e => /svg/.test(e.type), + I = () => Math.random().toString(36).substring(2, 9); +const A = new Map; +var L = (e, t, o) => new Promise(((i, r) => { + const n = e.toString(); + let a = A.get(n); + if (!a) { + const t = (e => `function () {self.onmessage = function (message) {(${e.toString()}).apply(null, message.data.content.concat([function (err, response) {\n response = response || {};\n const transfer = 'data' in response ? [response.data.buffer] : 'width' in response ? [response] : [];\n return self.postMessage({ id: message.data.id, content: response, error: err }, transfer);\n}]))}}`)(e), + o = URL.createObjectURL((e => new Blob(["(", "function" == typeof e ? e.toString() : e, ")()"], { + type: "application/javascript" + }))(t)), + i = new Map, + r = new Worker(o); + a = { + url: o, + worker: r, + messages: i, + terminationTimeout: void 0, + terminate: () => { + clearTimeout(a.terminationTimeout), a.worker.terminate(), URL.revokeObjectURL(o), A.delete(n) + } + }, r.onmessage = function(e) { + const { + id: t, + content: o, + error: r + } = e.data; + if (clearTimeout(a.terminationTimeout), a.terminationTimeout = setTimeout((() => { + i.size > 0 || a.terminate() + }), 500), !i.has(t)) return; + const n = i.get(t); + i.delete(t), null != r ? n.reject(r) : n.resolve(o) + }, A.set(n, a) + } + const s = I(); + a.messages.set(s, { + resolve: i, + reject: r + }), a.worker.postMessage({ + id: s, + content: t + }, o) + })), + z = async (e, t) => { + const o = async () => { + const o = await (async (e, t) => { + const o = p("img", { + src: URL.createObjectURL(e) + }), + i = await R(o, t); + return URL.revokeObjectURL(o.src), i + })(e, { + canvasMemoryLimit: t, + contextOptions: { + willReadFrequently: !0 + } + }), + i = h(o); + return g(o), i + }; + if (b()) return await o(); + let i; + if (P() && !E(e) && "OffscreenCanvas" in window) try { + i = await L(((e, t, o) => { + createImageBitmap(e).then((e => { + let i = e.width, + r = e.height; + const n = i * r; + if (t && n > t) { + const e = Math.sqrt(t) / Math.sqrt(n); + i = Math.floor(i * e), r = Math.floor(r * e) + } + const a = new OffscreenCanvas(i, r), + s = a.getContext("2d", { + willReadFrequently: !0 + }); + + + s.drawImage(e, 0, 0, i, r); + const l = s.getImageData(0, 0, a.width, a.height); + o(null, l) + })).catch((e => { + o(e) + })) + }), [e, t]) + } catch (e) {} + return i && i.width ? i : await o() + }, F = (e, t, o) => new Promise(((i, r) => { + try { + e.toBlob((e => { + if (!e) return r(new Error("Failed to create blob")); + i(e) + }), t, o) + } catch (e) { + r(e) + } + })), O = async (e, t, o) => { + const i = await v(e), + r = await F(i, t, o); + return g(i), r + }; +const D = { + matroska: "mkv" +}; +var B = e => { + const t = (e.match(/\/([a-z0-9]+)/) || [])[1]; + if (/^x/.test(t)) { + const [, t = ""] = e.split("/x-"); + return D[t] + } + return t + }, + W = e => e.substr(0, e.lastIndexOf(".")) || e; +const V = /avif|bmp|gif|jpg|jpeg|jpe|jif|jfif|png|svg|tiff|webp/; +var _ = e => { + return e && (t = (o = e, o.split(".").pop()).toLowerCase(), V.test(t) ? "image/" + (/jfif|jif|jpe|jpg/.test(t) ? "jpeg" : "svg" === t ? "svg+xml" : t) : ""); + var t, o + }, + N = (e, t, o) => { + const r = (new Date).getTime(), + n = e.type.length && !/null|text/.test(e.type), + a = n ? e.type : o, + s = ((e, t) => { + const o = _(e); + if (o === t) return e; + const i = B(t) || o; + return `${W(e)}.${i}` + })(t, a); + try { + return new(i("File"))([e], s, { + lastModified: r, + type: n ? e.type : a + }) + } catch (t) { + const o = n ? e.slice() : e.slice(0, e.size, a); + return o.lastModified = r, o.name = s, o + } + }, + H = (e, t) => e / t, + j = e => e; +const U = Math.PI, + G = Math.PI / 2, + Z = G / 2; +var X = e => { + const t = Math.abs(e) % Math.PI; + return t > Z && t < Math.PI - Z +}; +const Y = { + Top: "t", + Right: "r", + Bottom: "b", + Left: "l", + TopLeft: "tl", + TopRight: "tr", + BottomRight: "br", + BottomLeft: "bl" + }, + { + Top: q, + Right: K, + Bottom: J, + Left: Q, + TopLeft: ee, + TopRight: te, + BottomRight: oe, + BottomLeft: ie + } = Y; +var re = { + [q]: [.5, 0], + [K]: [1, .5], + [J]: [.5, 1], + [Q]: [0, .5], + [ee]: [0, 0], + [te]: [1, 0], + [oe]: [1, 1], + [ie]: [0, 1] + }, + ne = (e, t = 12) => parseFloat(e.toFixed(t)); +const ae = (e, t, o) => o + (e - o) * t, + se = e => ({ + x: e.x + .5 * e.width, + y: e.y + .5 * e.height, + rx: .5 * e.width, + ry: .5 * e.height + }), + le = () => ce(0, 0), + ce = (e, t) => ({ + x: e, + y: t + }), + de = e => ce(e.pageX, e.pageY), + ue = e => ce(e.x, e.y), + he = e => (e.x = -e.x, e.y = -e.y, e), + pe = (e, t, o = le()) => { + const i = Math.cos(t), + r = Math.sin(t), + n = e.x - o.x, + a = e.y - o.y; + return e.x = o.x + i * n - r * a, e.y = o.y + r * n + i * a, e + }, + me = e => Math.sqrt(e.x * e.x + e.y * e.y), + ge = e => { + const t = Math.sqrt(e.x * e.x + e.y * e.y); + return 0 === t ? le() : (e.x /= t, e.y /= t, e) + }, + $e = (e, t) => Math.atan2(t.y - e.y, t.x - e.x), + fe = (e, t) => e.x === t.x && e.y === t.y, + ye = (e, t) => (e.x = t(e.x), e.y = t(e.y), e), + be = (e, t) => (e.x += t.x, e.y += t.y, e), + xe = (e, t) => (e.x -= t.x, e.y -= t.y, e), + ve = (e, t) => (e.x /= t, e.y /= t, e), + we = (e, t) => (e.x *= t, e.y *= t, e), + Se = (e, t) => e.x * t.x + e.y * t.y, + ke = (e, t) => e.x * t.y - e.y * t.x, + Ce = (e, t = le()) => { + const o = e.x - t.x, + i = e.y - t.y; + return o * o + i * i + }, + Te = (e, t = le()) => Math.sqrt(Ce(e, t)), + Me = (e, t, o) => (e.x = ae(e.x, t, o.x), e.y = ae(e.y, t, o.y), e), + Re = e => { + let t = 0, + o = 0; + return e.forEach((e => { + t += e.x, o += e.y + })), ce(t / e.length, o / e.length) + }, + Pe = (e, t, o, i, r) => (e.forEach((e => { + e.x = t ? i - (e.x - i) : e.x, e.y = o ? r - (e.y - r) : e.y + })), e), + Ee = (e, t, o, i) => { + const r = Math.sin(t), + n = Math.cos(t); + return e.forEach((e => { + e.x -= o, e.y -= i; + const t = e.x * n - e.y * r, + a = e.x * r + e.y * n; + e.x = o + t, e.y = i + a + })), e + }, + Ie = (e, t) => ({ + width: e, + height: t + }), + Ae = e => Ie(e.width, e.height), + Le = e => Ie(e.width, e.height), + ze = e => Ie(e.width, e.height), + Fe = e => Ie(e[0], e[1]), + Oe = e => { + return /img/i.test(e.nodeName) ? Ie((t = e).naturalWidth, t.naturalHeight) : Le(e); + var t + }, + De = (e, t) => Ie(e, t), + Be = (e, t, o = j) => o(e.width) === o(t.width) && o(e.height) === o(t.height), + We = (e, t) => (e.width *= t, e.height *= t, e), + Ve = e => ce(.5 * e.width, .5 * e.height), + _e = (e, t) => { + const o = Math.abs(t), + i = Math.abs(Math.cos(o)), + r = Math.abs(Math.sin(o)), + n = i * e.width + r * e.height, + a = r * e.width + i * e.height; + return e.width = n, e.height = a, e + }, + Ne = (e, t) => e.width >= t.width && e.height >= t.height, + He = (e, t) => (e.width = t(e.width), e.height = t(e.height), e), + je = (e, t) => ({ + start: e, + end: t + }), + Ue = e => je(ue(e.start), ue(e.end)), + Ge = (e, t) => { + if (0 === t) return e; + const o = ce(e.start.x - e.end.x, e.start.y - e.end.y), + i = ge(o), + r = we(i, t); + return e.start.x += r.x, e.start.y += r.y, e.end.x -= r.x, e.end.y -= r.y, e + }, + Ze = [ce(-1, -1), ce(-1, 1), ce(1, 1), ce(1, -1)], + Xe = (e, t, o, i) => ({ + x: e, + y: t, + width: o, + height: i + }), + Ye = e => Xe(e.x, e.y, e.width, e.height), + qe = () => Xe(0, 0, 0, 0), + Ke = e => Xe(0, 0, e.width, e.height), + Je = e => Xe(e[3], e[0], e[1] - e[3], e[2] - e[0]), + Qe = e => Xe(e.x || 0, e.y || 0, e.width || 0, e.height || 0), + et = e => { + let t = e[0].x, + o = e[0].x, + i = e[0].y, + r = e[0].y; + return e.forEach((e => { + t = Math.min(t, e.x), o = Math.max(o, e.x), i = Math.min(i, e.y), r = Math.max(r, e.y) + })), Xe(t, i, o - t, r - i) + }, + tt = e => it(e.x - e.rx, e.y - e.ry, 2 * e.rx, 2 * e.ry), + ot = (e, t) => Xe(e.x - .5 * t.width, e.y - .5 * t.height, t.width, t.height), + it = (e, t, o, i) => Xe(e, t, o, i), + rt = e => ce(e.x + .5 * e.width, e.y + .5 * e.height), + nt = (e, t) => (e.x += t.x, e.y += t.y, e), + at = (e, t, o) => (o = o || rt(e), e.x = t * (e.x - o.x) + o.x, e.y = t * (e.y - o.y) + o.y, e.width = t * e.width, e.height = t * e.height, e), + st = (e, t, o, i) => { + const r = (i.x - e.x) / e.width, + n = (i.y - e.y) / e.height; + let a = Math.max(t.width, e.width), + s = Math.max(t.height, e.height); + return a = Math.min(o.width, a), s = Math.min(o.height, s), e.x = i.x - r * a, e.y = i.y - n * s, e.width = a, e.height = s, e + }, + lt = (e, t) => { + const [o, i] = re[t], r = o * e.width, n = i * e.height; + return ce(e.x + r, e.y + n) + }, + ct = (e, t) => (e.x *= t, e.y *= t, e.width *= t, e.height *= t, e), + dt = (e, t, o = j) => o(e.x) === o(t.x) && o(e.y) === o(t.y) && o(e.width) === o(t.width) && o(e.height) === o(t.height), + ut = e => H(e.width, e.height), + ht = (e, t, o, i, r) => (e.x = t, e.y = o, e.width = i, e.height = r, e), + pt = (e, t) => (e.x = t.x, e.y = t.y, e.width = t.width, e.height = t.height, e), + mt = (e, t, o) => (o || (o = rt(e)), xt(e).map((e => pe(e, t, o)))), + gt = (e, t) => Xe(.5 * e.width - .5 * t.width, .5 * e.height - .5 * t.height, t.width, t.height), + $t = (e, t) => !(t.x < e.x) && (!(t.y < e.y) && (!(t.x > e.x + e.width) && !(t.y > e.y + e.height))), + ft = (e, t, o = le()) => { + if (0 === e.width || 0 === e.height) return qe(); + const i = ut(e); + t || (t = i); + let r = e.width, + n = e.height; + return t > i ? r = n * t : n = r / t, Xe(o.x + .5 * (e.width - r), o.y + .5 * (e.height - n), r, n) + }, + yt = (e, t = ut(e), o = le()) => { + if (0 === e.width || 0 === e.height) return qe(); + let i = e.width, + r = i / t; + return r > e.height && (r = e.height, i = r * t), Xe(o.x + .5 * (e.width - i), o.y + .5 * (e.height - r), i, r) + }, + bt = e => [Math.min(e.y, e.y + e.height), Math.max(e.x, e.x + e.width), Math.max(e.y, e.y + e.height), Math.min(e.x, e.x + e.width)], + xt = e => [ce(e.x, e.y), ce(e.x + e.width, e.y), ce(e.x + e.width, e.y + e.height), ce(e.x, e.y + e.height)], + vt = (e, t) => { + if (e) return e.x = t(e.x), e.y = t(e.y), e.width = t(e.width), e.height = t(e.height), e + }, + wt = (e, t, o = rt(e)) => xt(e).map(((e, i) => { + const r = Ze[i]; + return ce(ae(e.x, 1 + r.x * t.x, o.x), ae(e.y, 1 + r.y * t.y, o.y)) + })), + St = e => (e.x = 0, e.y = 0, e), + kt = e => { + const t = e[0], + o = e[e.length - 1]; + e = fe(t, o) ? e : [...e, t]; + const i = t.x, + r = t.y; + let n, a, s, l = 0, + c = 0, + d = 0, + u = 0; + const h = e.length; + for (; c < h; c++) n = e[c], a = e[c + 1 > h - 1 ? 0 : c + 1], s = (n.y - r) * (a.x - i) - (a.y - r) * (n.x - i), l += s, d += (n.x + a.x - 2 * i) * s, u += (n.y + a.y - 2 * r) * s; + return s = 3 * l, ce(i + d / s, r + u / s) + }, + Ct = (e, t) => Tt(e.start, e.end, t.start, t.end), + Tt = (e, t, o, i) => { + const r = (i.y - o.y) * (t.x - e.x) - (i.x - o.x) * (t.y - e.y); + if (0 === r) return; + const n = ((i.x - o.x) * (e.y - o.y) - (i.y - o.y) * (e.x - o.x)) / r, + a = ((t.x - e.x) * (e.y - o.y) - (t.y - e.y) * (e.x - o.x)) / r; + return n < 0 || n > 1 || a < 0 || a > 1 ? void 0 : ce(e.x + n * (t.x - e.x), e.y + n * (t.y - e.y)) + }, + Mt = (e, t, { + ignoreIdenticalLines: o = !1, + breakOnIntersection: i = !1 + } = {}) => { + const r = t.length, + n = []; + for (let a = 0; a < r - 1; a++) { + if (o && (fe(e.start, t[a]) || fe(e.start, t[a + 1]) || fe(e.end, t[a]) || fe(e.end, t[a + 1]))) continue; + const r = Tt(e.start, e.end, t[a], t[a + 1]); + if (r) { + if (i) return [r]; + n.push(r) + } + } + return n.length ? n : void 0 + }, + Rt = (e, t) => { + let o = 0, + i = 0, + r = !1; + const n = t.length; + for (o = 0, i = n - 1; o < n; i = o++) t[o].y > e.y != t[i].y > e.y && e.x < (t[i].x - t[o].x) * (e.y - t[o].y) / (t[i].y - t[o].y) + t[o].x && (r = !r); + return r + }, + Pt = e => { + const t = []; + for (let o = 0; o < e.length; o++) { + let i = o + 1; + i === e.length && (i = 0), t.push(je(ue(e[o]), ue(e[i]))) + } + return t + }, + Et = (e, t = 0) => Pt(e).map((e => Ge(e, t))), + It = (e, t, o, i = 0, r = !1, n = !1, a = 12) => { + const s = []; + for (let i = 0; i < a; i++) s.push(ce(e.x + t * Math.cos(i * (2 * Math.PI) / a), e.y + o * Math.sin(i * (2 * Math.PI) / a))); + return (r || n) && Pe(s, r, n, e.x, e.y), i && Ee(s, i, e.x, e.y), s + }, + At = (e, t, o, i) => { + const r = ce(e.x - o.x, e.y - o.y), + n = ce(i.x - o.x, i.y - o.y), + a = Se(n, n); + let s = Se(r, n) / a; + s = s < 0 ? 0 : s, s = s > 1 ? 1 : s; + const l = ce(n.x * s + o.x - e.x, n.y * s + o.y - e.y); + return Se(l, l) <= t * t + }, + Lt = (e, t, o) => { + const i = o.length; + for (let r = 0; r < i - 1; r++) + if (At(e, t, o[r], o[r + 1])) return !0; + return !1 + }, + zt = (e, t, o) => !!Rt(e, o) || (!!Lt(e, t, o) || At(e, t, o[0], o[o.length - 1])), + Ft = (e, t, o, i, r) => zt(e, t, mt(o, i, r || rt(o))); +var Ot = (e, t) => { + const o = Ke(e), + i = rt(o), + r = mt(o, t, i); + return St(et(r)) + }, + Dt = (e, t) => e instanceof HTMLElement && (!t || new RegExp(`^${t}$`, "i").test(e.nodeName)), + Bt = e => e instanceof File, + Wt = async (e, t, o) => { + const i = await F(e, t, o); + return N(i, "canvas") + }, Vt = e => e.split("/").pop().split(/\?|\#/).shift(); +const _t = c() && !!Node.prototype.replaceChildren ? (e, t) => e.replaceChildren(t) : (e, t) => { + for (; e.lastChild;) e.removeChild(e.lastChild); + void 0 !== t && e.append(t) + }, + Nt = c() && p("div", { + class: "PinturaMeasure", + style: "position:absolute;left:0;top:0;width:99999px;height:0;pointer-events:none;contain:strict;margin:0;padding:0;" + }); +let Ht; +var jt = e => (_t(Nt, e), Nt.parentNode || document.body.append(Nt), clearTimeout(Ht), Ht = setTimeout((() => { + Nt.remove() +}), 500), e); +let Ut = null; +var Gt = () => (null === Ut && (Ut = c() && /^((?!chrome|android).)*(safari|iphone|ipad)/i.test(navigator.userAgent)), Ut), + Zt = e => new Promise(((t, o) => { + let i = !1; + !e.parentNode && Gt() && (i = !0, e.style.cssText = "position:absolute;visibility:hidden;pointer-events:none;left:0;top:0;width:0;height:0;", jt(e)); + const r = () => { + const o = e.naturalWidth, + r = e.naturalHeight; + o && r && (i && e.remove(), clearInterval(n), t({ + width: o, + height: r + })) + }; + e.onerror = e => { + clearInterval(n), o(e) + }; + const n = setInterval(r, 1); + r() + })), + Xt = e => new Promise(((t, o) => { + const i = () => { + t({ + width: e.videoWidth, + height: e.videoHeight + }) + }; + if (e.readyState >= 1) return i(); + e.onloadedmetadata = i, e.onerror = () => o(e.error) + })), + Yt = e => /^image/.test(e.type), + qt = e => new Promise((t => { + const o = T(e) ? e : URL.createObjectURL(e), + i = () => { + const e = new Image; + e.src = o, t(e) + }; + if (e instanceof Blob && Yt(e)) return i(); + const r = document.createElement("video"); + r.preload = "metadata", r.onloadedmetadata = () => t(r), r.onerror = i, r.src = o + })), + Kt = e => "VIDEO" === e.nodeName, + Jt = async e => { + let t, o; + t = e.src ? e : await qt(e); + try { + o = Kt(t) ? await Xt(t) : await Zt(t) + } finally { + Bt(e) && URL.revokeObjectURL(t.src) + } + return o + }; +var Qt = async e => { + const t = await Jt(e), + o = await (e => new Promise(((t, o) => { + if (e.complete) return t(e); + e.onload = () => t(e), e.onerror = () => o(new Error("Failed to load image")) + })))(e), + i = p("canvas", t); + i.getContext("2d", { + willReadFrequently: !0 + }).drawImage(o, 0, 0); + const r = await F(i); + return N(r, Vt(o.src)) +}, eo = (e = 0, t = !0) => new(i("ProgressEvent"))("progress", { + loaded: 100 * e, + total: 100, + lengthComputable: t +}), to = (e, t, o = (e => e)) => e.getAllResponseHeaders().indexOf(t) >= 0 ? o(e.getResponseHeader(t)) : void 0, oo = e => { + if (!e) return null; + const t = e.split(/filename=|filename\*=.+''/).splice(1).map((e => e.trim().replace(/^["']|[;"']{0,2}$/g, ""))).filter((e => e.length)); + return t.length ? decodeURI(t[t.length - 1]) : null +}; +const io = "URL_REQUEST"; +class ro extends Error { + constructor(e, t, o) { + super(e), this.name = "EditorError", this.code = t, this.metadata = o + } +} +var no = (e, t) => { + const { + headers: o = {}, + credentials: i + } = t || {}; + Object.entries(o).forEach((([t, o]) => e.setRequestHeader(t, o))), i && (e.withCredentials = "omit" !== i) + }, + ao = (e, t, o) => /^data:/.test(e) ? (async (e, t = "data-uri", o = r) => { + o(eo(0)); + const i = await fetch(e); + o(eo(.33)); + const n = await i.blob(); + let a; + Yt(n) || (a = "image/" + (e.includes(",/9j/") ? "jpeg" : "png")), o(eo(.66)); + const s = N(n, t, a); + return o(eo(1)), s + })(e, void 0, t) : ((e, t, o) => new Promise(((i, r) => { + const n = () => r(new ro("Error fetching image", io, a)), + a = new XMLHttpRequest; + a.onprogress = t, a.onerror = n, a.onload = () => { + if (!a.response || a.status >= 300 || a.status < 200) return n(); + const t = to(a, "Content-Type"), + o = to(a, "Content-Disposition", oo) || Vt(e); + i(N(a.response, o, t || _(o))) + }; + const { + willRequest: s + } = o; + Promise.resolve(s && s(e, { + resourceType: "image" + })).then((t => { + if (!1 === t) return r("Image load rejected"); + a.open("GET", e), no(a, t), a.responseType = "blob", a.send() + })).catch(console.error) + })))(e, t, o), + so = e => e instanceof Blob && !(e instanceof File), + lo = e => "close" in e, + co = async (e, t, o) => { + if (Bt(e) || so(e)) return e; + if (T(e)) return await ao(e, t, o); + if (Dt(e, "canvas")) return await Wt(e); + if (Dt(e, "img")) return await Qt(e); + if ($(e) || lo(e)) return await Wt(await v(e)); + throw new ro("Invalid image source", "invalid-image-source") + }; +let uo = null; +var ho = () => (null === uo && (uo = c() && /^mac/i.test(navigator.platform)), uo); +let po = null; +var mo = () => (null === po && (po = c() && (f(/iPhone|iPad|iPod/) || ho() && navigator.maxTouchPoints >= 1)), po), + go = async (e, t = 1) => await u() || mo() || t < 5 ? e : De(e.height, e.width), $o = e => /jpeg/.test(e.type), fo = e => { + return "object" != typeof(t = e) || t.constructor != Object ? e : JSON.stringify(e); + var t + }, yo = (e, t = 0, o) => (0 === t || (e.translate(o.x, o.y), e.rotate(t), e.translate(-o.x, -o.y)), e), bo = (e, t, o) => (e.scale(t, o), e), xo = async (e, t = {}) => { + const { + flipX: o, + flipY: i, + rotation: r, + crop: n + } = t, a = Le(e), s = o || i, l = !!r, c = n && (n.x || n.y || n.width || n.height), d = c && dt(n, Ke(a)), u = c && !d; + if (!s && !l && !u) return e; + let h, m = p("canvas", { + width: e.width, + height: e.height + }); + if (m.getContext("2d", { + willReadFrequently: !0 + }).putImageData(e, 0, 0), s) { + const e = p("canvas", { + width: m.width, + height: m.height + }).getContext("2d", { + willReadFrequently: !0 + }); + bo(e, o ? -1 : 1, i ? -1 : 1), e.drawImage(m, o ? -m.width : 0, i ? -m.height : 0), e.restore(), g(m), m = e.canvas + } + if (l) { + const e = He(ze(et(mt(Qe(m), r))), Math.floor), + t = p("canvas", { + width: n.width, + height: n.height + }).getContext("2d", { + willReadFrequently: !0 + }); + ((e, t, o) => { + e.translate(t, o) + })(t, -n.x, -n.y), yo(t, r, Ve(e)), t.drawImage(m, .5 * (e.width - m.width), .5 * (e.height - m.height)), t.restore(), g(m), m = t.canvas + } else if (u) { + return h = m.getContext("2d", { + willReadFrequently: !0 + }).getImageData(n.x, n.y, n.width, n.height), g(m), h + } + return h = m.getContext("2d", { + willReadFrequently: !0 + }).getImageData(0, 0, m.width, m.height), g(m), h + }, vo = (e, t) => { + const { + imageData: o, + width: i, + height: r + } = e, n = o.width, a = o.height, s = Math.round(i), l = Math.round(r), c = o.data, d = new Uint8ClampedArray(s * l * 4), u = n / s, h = a / l, p = Math.ceil(.5 * u), m = Math.ceil(.5 * h); + for (let e = 0; e < l; e++) + for (let t = 0; t < s; t++) { + const o = 4 * (t + e * s); + let i = 0, + r = 0, + a = 0, + l = 0, + g = 0, + $ = 0, + f = 0; + const y = (e + .5) * h; + for (let o = Math.floor(e * h); o < (e + 1) * h; o++) { + const e = Math.abs(y - (o + .5)) / m, + s = (t + .5) * u, + d = e * e; + for (let e = Math.floor(t * u); e < (t + 1) * u; e++) { + let t = Math.abs(s - (e + .5)) / p; + const u = Math.sqrt(d + t * t); + if (u < -1 || u > 1) continue; + if (i = 2 * u * u * u - 3 * u * u + 1, i <= 0) continue; + t = 4 * (e + o * n); + const h = c[t + 3]; + f += i * h, a += i, h < 255 && (i = i * h / 250), l += i * c[t], g += i * c[t + 1], $ += i * c[t + 2], r += i + } + } + d[o] = l / r, d[o + 1] = g / r, d[o + 2] = $ / r, d[o + 3] = f / a + } + t(null, { + data: d, + width: s, + height: l + }) + }, wo = e => { + if (e instanceof ImageData) return e; + let t; + try { + t = new ImageData(e.width, e.height) + } catch (o) { + t = p("canvas").getContext("2d").createImageData(e.width, e.height) + } + return t.data.set(e.data), t + }, So = async (e, t = {}, o) => { + const { + width: i, + height: r, + fit: n, + upscale: a + } = t; + if (!i && !r) return e; + let s = i, + l = r; + if (i ? r || (l = i) : s = r, "force" !== n) { + const t = s / e.width, + o = l / e.height; + let i = 1; + if ("cover" === n ? i = Math.max(t, o) : "contain" === n && (i = Math.min(t, o)), i > 1 && !1 === a) return e; + s = Math.round(e.width * i), l = Math.round(e.height * i) + } + return s = Math.max(s, 1), l = Math.max(l, 1), e.width === s && e.height === l ? e : o ? o(e, s, l) : (e = await L(vo, [{ + imageData: e, + width: s, + height: l + }], [e.data.buffer]), wo(e)) + }, ko = (e, t) => { + const { + imageData: o, + matrix: i + } = e; + if (!i) return t(null, o); + const r = new Uint8ClampedArray(o.width * o.height * 4), + n = o.data, + a = n.length, + s = i[0], + l = i[1], + c = i[2], + d = i[3], + u = i[4], + h = i[5], + p = i[6], + m = i[7], + g = i[8], + $ = i[9], + f = i[10], + y = i[11], + b = i[12], + x = i[13], + v = i[14], + w = i[15], + S = i[16], + k = i[17], + C = i[18], + T = i[19]; + let M = 0, + R = 0, + P = 0, + E = 0, + I = 0, + A = 0, + L = 0, + z = 0, + F = 0, + O = 0, + D = 0, + B = 0; + for (; M < a; M += 4) R = n[M] / 255, P = n[M + 1] / 255, E = n[M + 2] / 255, I = n[M + 3] / 255, A = R * s + P * l + E * c + I * d + u, L = R * h + P * p + E * m + I * g + $, z = R * f + P * y + E * b + I * x + v, F = R * w + P * S + E * k + I * C + T, O = Math.max(0, A * F) + (1 - F), D = Math.max(0, L * F) + (1 - F), B = Math.max(0, z * F) + (1 - F), r[M] = 255 * Math.max(0, Math.min(1, O)), r[M + 1] = 255 * Math.max(0, Math.min(1, D)), r[M + 2] = 255 * Math.max(0, Math.min(1, B)), r[M + 3] = 255 * I; + t(null, { + data: r, + width: o.width, + height: o.height + }) + }, Co = (e, t) => { + const { + imageData: o, + matrix: i + } = e; + if (!i) return t(null, o); + let r = i.reduce(((e, t) => e + t)); + r = r <= 0 ? 1 : r; + const n = o.width, + a = o.height, + s = o.data; + let l = 0, + c = 0, + d = 0; + const u = Math.round(Math.sqrt(i.length)), + h = Math.floor(u / 2); + let p = 0, + m = 0, + g = 0, + $ = 0, + f = 0, + y = 0, + b = 0, + x = 0, + v = 0, + w = 0; + const S = new Uint8ClampedArray(n * a * 4); + for (d = 0; d < a; d++) + for (c = 0; c < n; c++) { + for (p = 0, m = 0, g = 0, $ = 0, y = 0; y < u; y++) + for (f = 0; f < u; f++) b = d + y - h, x = c + f - h, b < 0 && (b = a - 1), b >= a && (b = 0), x < 0 && (x = n - 1), x >= n && (x = 0), v = 4 * (b * n + x), w = i[y * u + f], p += s[v] * w, m += s[v + 1] * w, g += s[v + 2] * w, $ += s[v + 3] * w; + S[l] = p / r, S[l + 1] = m / r, S[l + 2] = g / r, S[l + 3] = $ / r, l += 4 + } + t(null, { + data: S, + width: n, + height: a + }) + }, To = (e, t) => { + let { + imageData: o, + strength: i + } = e; + if (!i) return t(null, o); + const r = new Uint8ClampedArray(o.width * o.height * 4), + n = o.width, + a = o.height, + s = o.data, + l = (e, t) => (c = e - w, d = t - S, Math.sqrt(c * c + d * d)); + let c, d, u, h, p, m, g, $, f, y, b, x = 0, + v = 0, + w = .5 * n, + S = .5 * a, + k = l(0, 0); + for (i > 0 ? (u = 0, h = 0, p = 0) : (i = Math.abs(i), u = 1, h = 1, p = 1), v = 0; v < a; v++) + for (x = 0; x < n; x++) C = 4 * (x + v * n), T = s, M = r, R = l(x, v) * i / k, m = T[C] / 255, g = T[C + 1] / 255, $ = T[C + 2] / 255, f = T[C + 3] / 255, y = 1 - R, b = y * f + R, M[C] = (y * f * m + R * u) / b * 255, M[C + 1] = (y * f * g + R * h) / b * 255, M[C + 2] = (y * f * $ + R * p) / b * 255, M[C + 3] = 255 * b; + var C, T, M, R; + t(null, { + data: r, + width: o.width, + height: o.height + }) + }, Mo = (e, t) => { + const { + imageData: o, + level: i, + monochrome: r = !1 + } = e; + if (!i) return t(null, o); + const n = new Uint8ClampedArray(o.width * o.height * 4), + a = o.data, + s = a.length; + let l, c, d, u = 0; + const h = () => 255 * (2 * Math.random() - 1) * i, + p = r ? () => { + const e = h(); + return [e, e, e] + } : () => [h(), h(), h()]; + for (; u < s; u += 4)[l, c, d] = p(), n[u] = a[u] + l, n[u + 1] = a[u + 1] + c, n[u + 2] = a[u + 2] + d, n[u + 3] = a[u + 3]; + t(null, { + data: n, + width: o.width, + height: o.height + }) + }, Ro = (e, t) => { + const { + imageData: o, + level: i + } = e; + if (!i) return t(null, o); + const r = new Uint8ClampedArray(o.width * o.height * 4), + n = o.data, + a = n.length; + let s, l, c, d = 0; + for (; d < a; d += 4) s = n[d] / 255, l = n[d + 1] / 255, c = n[d + 2] / 255, r[d] = 255 * Math.pow(s, i), r[d + 1] = 255 * Math.pow(l, i), r[d + 2] = 255 * Math.pow(c, i), r[d + 3] = n[d + 3]; + t(null, { + data: r, + width: o.width, + height: o.height + }) + }, Po = async (e, t = {}) => { + const { + colorMatrix: o, + convolutionMatrix: i, + gamma: r, + noise: n, + vignette: a + } = t, s = []; + if (i && s.push([Co, { + matrix: i.clarity + }]), r > 0 && s.push([Ro, { + level: 1 / r + }]), o && !(e => { + const t = e.length; + let o; + const i = t >= 20 ? 6 : t >= 16 ? 5 : 3; + for (let r = 0; r < t; r++) { + if (o = e[r], 1 === o && r % i != 0) return !1; + if (0 !== o && 1 !== o) return !1 + } + return !0 + })(o) && s.push([ko, { + matrix: o + }]), (n > 0 || n < 0) && s.push([Mo, { + level: n + }]), (a > 0 || a < 0) && s.push([To, { + strength: a + }]), !s.length) return e; + const l = (e, t) => `(err, imageData) => {\n (${e[t][0].toString()})(Object.assign({ imageData: imageData }, filterInstructions[${t}]), \n ${e[t+1]?l(e,t+1):"done"})\n }`, + c = `function (options, done) {\n const filterInstructions = options.filterInstructions;\n const imageData = options.imageData;\n (${l(s,0)})(null, imageData)\n }`; + return e = await L(c, [{ + imageData: e, + filterInstructions: s.map((e => e[1])) + }], [e.data.buffer]), wo(e) + }, Eo = e => "number" == typeof e, Io = e => T(e) && null !== e.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g), Ao = (e, t) => e.hasOwnProperty(t), Lo = e => Array.isArray(e); +let zo = 64, + Fo = 102, + Oo = 112, + Do = !1; +var Bo = (e, t) => (!Do && c() && (/^win/i.test(navigator.platform) && (Fo = 103), (mo() || ho()) && (zo = 63.5, Fo = 110, Oo = 123), Do = !0), `${e}`), + Wo = e => e instanceof Blob, + Vo = (e, t) => e / t * 100 + "%", + _o = e => `rgba(${Math.round(255*e[0])}, ${Math.round(255*e[1])}, ${Math.round(255*e[2])}, ${Eo(e[3])?e[3]:1})`, + No = e => Object.values(e).join("_"); +const Ho = async (e, t = 0) => { + const o = p("canvas", { + width: 80, + height: 80 + }).getContext("2d"); + return await ((e = 0) => new Promise((t => { + setTimeout(t, e) + })))(t), o.drawImage(e, 0, 0, 80, 80), !((e => !new Uint32Array(e.getImageData(0, 0, e.canvas.width, e.canvas.height).data.buffer).some((e => 0 !== e)))(o) && t <= 256) || await Ho(e, t + 16) +}, jo = new Map; +var Uo = e => new Promise(((t, o) => { + const i = new FileReader; + i.onerror = () => o(i.error), i.onload = () => t(i.result), i.readAsDataURL(e) + })), + Go = () => { + let e = []; + return { + sub: (t, o) => (e.push({ + event: t, + callback: o + }), () => e = e.filter((e => e.event !== t || e.callback !== o))), + pub: (t, o) => { + e.filter((e => e.event === t)).forEach((e => e.callback(o))) + } + } + }; +let Zo = null; +var Xo = () => (null === Zo && (Zo = f(/Firefox/)), Zo); +const Yo = 32, + qo = ({ + color: e = [0, 0, 0], + fontSize: t = 16, + fontFamily: o = "sans-serif", + fontVariant: i = "normal", + fontWeight: r = "normal", + fontStyle: n = "normal", + textAlign: a = "left", + letterSpacing: s = "normal", + lineHeight: l = 20 + }, c = 1) => `font-size:${t*c}px;font-style:${n};font-weight:${r};font-family:${o};font-variant:${i};line-height:${l*c}px;text-align:${a};letter-spacing:${Eo(s)?s+"px":"normal"};color:${_o(e)};`, + Ko = (e, t, o = 1) => { + const { + width: i, + height: r, + disableNewline: n + } = t, a = !i, s = !1 === n ? ((e = "") => e.split("\n").length)(e) : void 0, l = a ? "normal" : "break-word", c = a && !s ? "nowrap" : "pre-line"; + return `max-width:none;min-width:auto;width:${a?"auto":i*o+"px"};height:${r?r*o+"px":"auto"};margin-top:0;margin-bottom:0;padding-top:${(({fontSize:e=16,lineHeight:t=20}={})=>.5*Math.max(0,e-t))(t)*o}px;word-break:${l};word-wrap:normal;white-space:${c};` + }, + Jo = new Map, + Qo = e => { + const t = []; + for (const o of Array.from(e.childNodes)) o.nodeType === Node.TEXT_NODE ? t.push(ti(o)) : t.push(...Qo(o)); + return t + }, + ei = "pointer-events:none;visibility:hidden;position:absolute;left:0;top:0;", + ti = e => { + const t = e.nodeValue; + if (!t) return []; + const o = t.length, + i = document.createRange(); + i.selectNodeContents(e); + const r = []; + for (let n = 0; n < o; n++) { + i.setStart(e, 0), i.setEnd(e, n + 1); + const o = i.getClientRects().length - 1, + a = t.charAt(n); + r[o] ? r[o] += a : r.push(a) + } + const n = i.getClientRects(); + return r.map(((e, t) => ({ + rect: n[t], + text: e + }))) + }, + oi = new Map, + ii = (e = "", t) => { + const { + width: o = 0, + height: i = 0 + } = t; + if (o && i) return De(o, i); + let { + fontSize: r = 16, + fontFamily: n, + lineHeight: a = 20, + fontWeight: s, + fontStyle: l, + fontVariant: c, + letterSpacing: d + } = t; + const u = No({ + text: e, + fontFamily: n, + fontWeight: s, + fontStyle: l, + fontVariant: c, + fontSize: r, + letterSpacing: d, + lineHeight: a, + width: o + }); + let h = oi.get(u); + if (h) return h; + let m = 1; + r > 1e3 && Xo() && (m = r / 1e3, r = 1e3, a /= m); + const g = jt(p("pre", { + contenteditable: "true", + spellcheck: "false", + style: `${ei}${qo({...t,fontSize:r,lineHeight:a})};${Ko(e,t)}"`, + innerHTML: e + })).getBoundingClientRect(); + return h = Le(g), h.height += Math.max(0, r - a), h = He(h, (e => e * m)), o && (h.width = o), oi.set(u, h), h + }, + ri = new Map, + ni = (e, t) => new Promise(((o, i) => { + let r = ri.get(e); + void 0 === r && (r = ((e, t) => { + const { + sub: o, + pub: i + } = Go(); + let r, n; + return Promise.resolve(t && t(e, { + resourceType: "stylesheet" + })).then((t => { + if (!1 === t) return n = "requestPrevented", i("error", n); + const { + headers: o, + credentials: a + } = t || {}; + fetch(e, { + headers: o, + credentials: a + }).then((e => e.text())).then((e => { + r = e, i("load", r) + })).catch((e => { + n = e, i("error", n) + })) + })), { + sub: (e, t) => "load" === e && r ? t(r) : "error" === e && n ? t(n) : void o(e, t) + } + })(e, t), ri.set(e, r)), r.sub("load", o), r.sub("error", i) + })), + ai = async (e, t) => { + let o; + try { + o = await ni(e, t) + } catch (e) { + return [] + } + const i = p("style", { + innerHTML: o, + id: I() + }); + document.head.append(i); + const r = Array.from(document.styleSheets).find((e => e.ownerNode.id === i.id)); + return i.remove(), Array.from(r.cssRules) + }, si = new Map, li = async (e, t) => { + if (si.has(e.href)) return si.get(e.href); + let o; + try { + o = Array.from(e.cssRules); + for (const e of (e => e.filter((e => e instanceof CSSImportRule)))(o)) { + const i = e.href; + if (si.has(i)) { + const e = si.get(i); + o = [...o, ...e]; + continue + } + const r = await ai(i, t); + si.set(i, r), o = [...o, ...r] + } + } catch (i) { + const r = e.href; + o = await ai(r, t), si.set(r, o) + } + return (e => e.filter((e => e instanceof CSSFontFaceRule)))(o) + }, ci = (e, t) => e.style.getPropertyValue(t), di = (e, t) => { + if (!e.style) return !1; + return ci(e, "font-family").replace(/^"|"$/g, "") == t + }, ui = async (e, t) => { + const o = ((e, t) => { + const o = []; + for (const i of e) di(i, t) && o.push(i); + return o + })(await (async e => { + const t = Array.from(document.styleSheets).map((t => li(t, e))), + o = await Promise.all(t), + i = []; + return o.forEach((e => i.push(...e))), i + })(t), e); + return o.length ? o.map((e => { + const t = e.parentStyleSheet.href && new URL(e.parentStyleSheet.href), + o = t ? t.origin + (e => e.pathname.split("/").slice(0, -1).join("/"))(t) + "/" : "", + i = e.style.getPropertyValue("src").match(/url\("?(.*?)"?\)/)[1], + r = Array.from(e.style).filter((e => "src" != e)).reduce(((t, o) => t += o + ":" + ci(e, o) + ";"), ""); + return [/^http/.test(i) ? i : o + i, r] + })) : [] + }, hi = new Map, pi = new Map; +var mi = async (e = "", t) => { + if (!e.length) return; + let { + color: o, + imageWidth: i = 300, + imageHeight: r = 150, + paddingTop: n = 0, + paddingRight: a = Yo, + paddingBottom: s = 0, + paddingLeft: l = Yo, + fontFamily: c, + fontSize: d, + pixelRatio: u = 1, + willRequest: h, + outline: p, + blur: m + } = t, g = 1, $ = ""; + d > 1e3 && Xo() && (g = d / 1e3, $ = `transform-origin:0 0;transform:scale(${g})`); + const f = u / g, + y = (i + l + a) * u, + b = (r + s + n) * u, + x = await (async (e, t) => { + if (hi.get(e)) return; + let o = pi.get(e); + if (!o) { + const r = await ui(e, t); + if (!r.length) return void hi.set(e, !0); + const n = []; + for (const [e, t] of r) { + const o = await fetch(e).then((e => e.blob())), + r = !(i = o.type) || /woff2/.test(i) ? "woff2" : /woff/.test(i) ? "woff" : /ttf|truetype/.test(i) ? "truetype" : /otf|opentype/.test(i) ? "opentype" : /svg/.test(i) ? "svg" : "woff2", + a = await Uo(o); + n.push(`@font-face { src:url(${a}) format('${r}');${t};font-display:block; }`) + } + o = n.join(""), pi.set(e, o) + } + var i; + return o + })(c, h); + const v = e.replace(/%/g, "%25").replace(/#/g, "%23").replace(/ /g, " ").replace(/&(?!#\d{4};|[a-z]+;)/gi, "&").replace(/
|\n/g, "
"), + w = `top:${n*f}px;right:${a*f}px;bottom:${s*f}px;left:${l*f}px`; + let S = o, + k = "", + C = ""; + if (p || m) { + const e = _o(o); + p && (S = [0, 0, 0, 0], k = `-webkit-text-stroke: ${2*p*f}px ${e}`), m && (Gt() ? C = `filter:blur(${m*f*.4}px)` : (S = [0, 0, 0, 0], C = `text-shadow: 0 0 ${m*f}px ${e}`)) + } + return ((e, { + safariCacheKey: t = "*" + } = {}) => new Promise(((o, i) => { + const r = new Image; + r.onerror = () => i(new Error("Failed to load SVG")), r.onload = () => { + if (!Gt() || !e.includes("@font-face") || jo.has(t)) return o(r); + Ho(r).then((() => { + jo.set(t, !0), o(r) + })) + }, r.src = "data:image/svg+xml," + e + })))(`
${x?``:""}
${v}
`, { + safariCacheKey: c + }) +}; +const gi = e => { + const t = { + ...e + }; + return C(t) + }, + $i = (e, t = {}) => { + const o = ut(e); + let i, r; + const n = t.width || t.rx, + a = t.height || t.ry; + if (n && a) return Ae(t); + if (n || a) { + i = parseFloat(n || Number.MAX_SAFE_INTEGER), r = parseFloat(a || Number.MAX_SAFE_INTEGER); + const e = Math.min(i, r); + T(n) || T(a) ? (i = e + "%", r = e * o + "%") : (i = e, r = e) + } else { + const e = 10; + i = e + "%", r = e * o + "%" + } + return { + [(t.width ? "width" : t.rx ? "rx" : void 0) || "width"]: i, + [(t.width ? "height" : t.rx ? "ry" : void 0) || "height"]: r + } + }, + fi = (e, t = {}) => { + return { + width: void 0, + height: void 0, + ...t, + aspectRatio: 1, + backgroundImage: (o = Bo(e), "data:image/svg+xml," + o.replace("<", "%3C").replace(">", "%3E")) + }; + var o + }, + yi = (e, t = {}) => ({ + backgroundColor: [0, 0, 0, 0], + ...Ti(t) ? {} : { + width: void 0, + height: void 0, + aspectRatio: void 0 + }, + ...t, + backgroundImage: T(e) ? e : Wo(e) ? URL.createObjectURL(e) : e + }), + bi = (e, t) => { + let o; + if (T(e) || Wo(e)) { + const i = { + ...$i(t), + backgroundSize: "contain" + }; + o = Io(e) ? fi(e, i) : yi(e, i) + } else if (e.src) { + const i = $i(t, e.shape || e), + r = { + ...e.shape, + ...i + }; + if (e.width && e.height && !Ao(r, "aspectRatio")) { + const e = pr(i, "width", t), + o = pr(i, "height", t); + r.aspectRatio = H(e, o) + } + r.backgroundSize || e.shape || e.width && e.height || (r.backgroundSize = "contain"), o = Io(e.src) ? fi(e.src, r) : yi(e.src, r) + } else e.shape && (o = gi(e.shape)); + return Ao(o, "backgroundImage") && (Ao(o, "backgroundColor") || (o.backgroundColor = [0, 0, 0, 0]), Ao(o, "disableStyle") || (o.disableStyle = ["cornerRadius", "backgroundColor", "strokeColor", "strokeWidth"])), t ? ur(o, t) : o + }, + xi = e => ce(e.x1, e.y1), + vi = e => ce(e.x2, e.y2), + wi = e => Ao(e, "text"), + Si = e => wi(e) && !(Oi(e) || Ao(e, "width")), + ki = e => wi(e) && (Oi(e) || Ao(e, "width")), + Ci = e => !wi(e) && Di(e), + Ti = e => Ao(e, "rx"), + Mi = e => Ao(e, "x1"), + Ri = e => Ao(e, "points"), + Pi = e => wi(e) && e.isEditing, + Ei = e => !Ao(e, "opacity") || e.opacity > 0, + Ii = e => e.isSelected, + Ai = e => e.isEditing, + Li = e => e._isDraft, + zi = e => Ao(e, "width") && Ao(e, "height"), + Fi = e => { + const t = Ao(e, "right"), + o = Ao(e, "bottom"); + return t || o + }, + Oi = e => (Ao(e, "x") || Ao(e, "left")) && Ao(e, "right") || (Ao(e, "y") || Ao(e, "top")) && Ao(e, "bottom"), + Di = e => zi(e) || Oi(e), + Bi = e => (e._isDraft = !0, e), + Wi = e => (e._isDraft = !1, e), + Vi = (e, t) => !0 !== e.disableStyle && (!Lo(e.disableStyle) || !t || !e.disableStyle.includes(t)), + _i = e => !0 !== e.disableSelect, + Ni = e => !0 !== e.disableRemove, + Hi = e => !e.disableFlip && (!Li(e) && !Fi(e) && (e => Ao(e, "backgroundImage") || Ao(e, "text"))(e)), + ji = (e, t) => !!wi(e) && (!0 !== e.disableInput && (M(e.disableInput) ? e.disableInput(null != t ? t : e.text) : t || !0)), + Ui = (e, t) => !0 !== e.disableTextLayout && (!Lo(e.disableTextLayout) || !t || !e.disableTextLayout.includes(t)), + Gi = e => !0 !== e.disableManipulate && !Li(e) && !Fi(e), + Zi = e => Gi(e) && !0 !== e.disableMove, + Xi = e => (delete e.left, delete e.right, delete e.top, delete e.bottom, e), + Yi = e => (delete e.rotation, e), + qi = e => (e.strokeWidth = e.strokeWidth || 1, e.strokeColor = e.strokeColor || [0, 0, 0], e), + Ki = e => (e.backgroundColor = e.backgroundColor ? e.backgroundColor : e.strokeWidth || e.backgroundImage ? void 0 : [0, 0, 0], e), + Ji = e => { + let t = e.text; + t = t.replace(/&(#[0-9]+|[a-z]+);/gi, ((e, t) => `___${t}___`)), t = t.replace(/&/, "&"), e.text = t.replace(/___(#[0-9]+|[a-z]+)___/gi, ((e, t) => `&${t};`)) + }, + Qi = e => { + if (e.fontSize = e.fontSize || "4%", e.fontFamily = e.fontFamily || "sans-serif", e.fontWeight = e.fontWeight || "normal", e.fontStyle = e.fontStyle || "normal", e.fontVariant = e.fontVariant || "normal", e.lineHeight = e.lineHeight || "120%", e.color = e.color || [0, 0, 0], e.format = "html" === e.format ? "html" : "text", e.textShadow) { + const [t, o, i, r] = e.textShadow; + e.textShadowX = t, e.textShadowY = o, e.textShadowBlur = i, e.textShadowColor = r, delete e.textShadow + } + if (e.textOutline) { + const [t, o] = e.textOutline; + e.textOutlineWidth = t, e.textOutlineColor = o, delete e.textOutline + } + return "html" === e.format ? Ji(e) : (e => { + Ji(e); + let t = e.text; + t = t.replace(//g, "<"), e.text = t + })(e), Si(e) ? er(e) : tr(e) + }, + er = e => (!1 !== e.disableNewline && (delete e.textAlign, e.text = e.text.replace(/\n/g, " ")), Xi(e)), + tr = e => (e.textAlign = e.textAlign || "left", e), + or = e => ((e => { + T(e.id) || (e.id = I()), Ao(e, "rotation") || (e.rotation = 0), Ao(e, "opacity") || (e.opacity = 1), Ao(e, "disableErase") || (e.disableErase = !0) + })(e), wi(e) ? Qi(e) : Ci(e) ? (e => { + e.cornerRadius = e.cornerRadius || 0, e.strokeWidth = e.strokeWidth || 0, e.strokeColor = e.strokeColor || [0, 0, 0], Ki(e) + })(e) : Ri(e) ? (e => { + qi(e), Yi(e), Ao(e, "pathClose") || (e.disableResize = !0, Ao(e, "disableMove") || (e.disableMove = !0)), Xi(e) + })(e) : Mi(e) ? (e => { + qi(e), e.lineStart = e.lineStart || void 0, e.lineEnd = e.lineEnd || void 0, Yi(e), Xi(e) + })(e) : Ti(e) && (e => { + e.strokeWidth = e.strokeWidth || 0, e.strokeColor = e.strokeColor || [0, 0, 0], Ki(e) + })(e), e), + ir = e => wi(e) ? "text" : Ci(e) ? "rectangle" : Ri(e) ? "path" : Mi(e) ? "line" : Ti(e) ? "ellipse" : void 0, + rr = (e, t) => parseFloat(e) / 100 * t, + nr = new RegExp(/^x|left|right|^width|rx|fontSize|eraseRadius|feather|cornerRadius|strokeWidth|strokeDash/, "i"), + ar = new RegExp(/^y|top|bottom|^height|ry/, "i"), + sr = (e, t, { + width: o, + height: i + }) => { + if (Array.isArray(t)) return t.map((t => (S(t) && dr(t, { + width: o, + height: i + }), T(t) && (t = sr(e, t, { + width: o, + height: i + })), t))); + if ("string" != typeof t) return t; + if (!t.endsWith("%")) return t; + const r = parseFloat(t) / 100; + return nr.test(e) ? ne(o * r, 6) : ar.test(e) ? ne(i * r, 6) : t + }, + lr = sr, + cr = ["lineHeight", "textOutlineWidth", "textShadowX", "textShadowY", "textShadowBlur"], + dr = (e, t) => { + Object.entries(e).map((([o, i]) => { + e[o] = sr(o, i, t) + })), e.text && cr.filter((t => T(e[t]))).forEach((t => { + var o, i; + e[t] = (o = e[t], i = e.fontSize, Math.round(i * (parseFloat(o) / 100))) + })) + }, + ur = (e, t) => (dr(e, t), yr(e, t), e), + hr = (e, t) => { + let o; + return /^x|width|rx|fontSize|strokeWidth|cornerRadius/.test(e) ? o = t.width : /^y|height|ry/.test(e) && (o = t.height), o + }, + pr = (e, t, o) => Array.isArray(e[t]) ? e[t].map((e => Object.entries(e).reduce(((e, [t, i]) => (e[t] = T(i) ? rr(i, hr(t, o)) : i, e)), {}))) : T(e[t]) ? rr(e[t], hr(t, o)) : e[t], + mr = (e, t, o) => t.reduce(((t, i) => { + const r = pr(e, i, o); + return t[i] = r, t + }), {}), + gr = (e, t, o) => (Object.keys(t).forEach((i => ((e, t, o, i) => { + if (!T(e[t])) return e[t] = o, e; + const r = hr(t, i); + return e[t] = void 0 === r ? o : Vo(o, r), e + })(e, i, t[i], o))), e), + $r = (e, t) => { + const o = e.filter((e => e.x < 0 || e.y < 0 || e.x1 < 0 || e.y1 < 0)).reduce(((e, t) => { + const [o, i, r, n] = (e => { + const t = qe(), + o = e.strokeWidth || 0; + if (Ci(e)) t.x = e.x - .5 * o, t.y = e.y - .5 * o, t.width = e.width + o, t.height = e.height + o; + else if (Mi(e)) { + const { + x1: i, + y1: r, + x2: n, + y2: a + } = e, s = Math.abs(Math.min(i, n)), l = Math.abs(Math.max(i, n)), c = Math.abs(Math.min(r, a)), d = Math.abs(Math.min(r, a)); + t.x = s + .5 * o, t.y = l + .5 * o, t.width = l - s + o, t.height = d - c + o + } else Ti(e) && (t.x = e.x - e.rx + .5 * o, t.y = e.y - e.ry + .5 * o, t.width = 2 * e.rx + o, t.height = 2 * e.ry + o); + return t && Ao(e, "rotation") && mt(t, e.rotation), bt(t) + })(t); + return e.top = Math.min(o, e.top), e.left = Math.min(n, e.left), e.bottom = Math.max(r, e.bottom), e.right = Math.max(i, e.right), e + }), { + top: 0, + right: 0, + bottom: 0, + left: 0 + }); + return o.right > 0 && (o.right -= t.width), o.bottom > 0 && (o.bottom -= t.height), o + }, + fr = (e, t, o) => { + const i = gi(e); + ur(i, t); + const r = o(i); + return Array.isArray(r) ? r : [r] + }, + yr = (e, t) => { + if (Ao(e, "left") && (e.x = e.left), Ao(e, "right") && !T(e.right)) { + const o = t.width - e.right; + Ao(e, "left") ? (e.x = e.left, e.width = Math.max(0, o - e.left)) : Ao(e, "width") && (e.x = o - e.width) + } + if (Ao(e, "top") && (e.y = e.top), Ao(e, "bottom") && !T(e.bottom)) { + const o = t.height - e.bottom; + Ao(e, "top") ? (e.y = e.top, e.height = Math.max(0, o - e.top)) : Ao(e, "height") && (e.y = o - e.height) + } + return e + }, + br = (e, t) => (Ri(e) && e.points.filter((e => Eo(e.x))).forEach((e => { + e.x *= t, e.y *= t + })), Mi(e) && Eo(e.x1) && (e.x1 *= t, e.y1 *= t, e.x2 *= t, e.y2 *= t), Eo(e.x) && Eo(e.y) && (e.x *= t, e.y *= t), Eo(e.width) && Eo(e.height) && (e.width *= t, e.height *= t), Eo(e.rx) && Eo(e.ry) && (e.rx *= t, e.ry *= t), (e => Eo(e.strokeWidth) && e.strokeWidth > 0)(e) && (e.strokeWidth *= t), wi(e) && (e._scale = t, Eo(e.fontSize) && (e.fontSize *= t), Eo(e.lineHeight) && (e.lineHeight *= t), Eo(e.width) && !Eo(e.height) && (e.width *= t)), Ao(e, "cornerRadius") && Eo(e.cornerRadius) && (e.cornerRadius *= t), e), + xr = e => { + if (e.x1) return Te(ce(e.x1, e.y1), ce(e.x2, e.y2)) + }, + vr = e => { + if (Ci(e)) return ce(e.x + .5 * e.width, e.y + .5 * e.height); + if (Ti(e)) return ce(e.x, e.y); + if (e.text) { + if (ki(e)) { + const t = e.height || ii(e.text, e).height; + return ce(e.x + .5 * e.width, e.y + .5 * t) + } + const t = ii(e.text, e); + return ce(e.x + .5 * t.width, e.y + .5 * t.height) + } + return Ri(e) ? Re(e.points) : Mi(e) ? Re([xi(e), vi(e)]) : void 0 + }, + wr = (e, t) => { + let o = !1; + t.flipX && e.flipX ? o = !0 : !t.flipX && e.flipX ? o = !1 : t.flipX && !e.flipX && (o = !0); + let i = !1; + t.flipY && e.flipY ? i = !0 : !t.flipY && e.flipY ? i = !1 : t.flipY && !e.flipY && (i = !0); + let r = -t.rotation; + return !o && !i || o && i || (r = -r), { + flipX: o, + flipY: i, + rotation: r + } + }; +var Sr = e => /canvas/i.test(e.nodeName), + kr = (e, t) => new Promise(((o, i) => { + let r = e, + n = !1; + const a = () => { + n || (n = !0, M(t) && Promise.resolve().then((() => t(De(r.naturalWidth, r.naturalHeight))))) + }; + if (r.src || (r = new Image, T(e) && new URL(e, location.href).origin !== location.origin && (r.crossOrigin = "anonymous"), r.src = T(e) ? e : URL.createObjectURL(e)), r.complete) return a(), o(r); + M(t) && Zt(r).then(a).catch(i), r.onload = () => { + a(), o(r) + }, r.onerror = () => i(new Error("Failed to load image")) + })); +const Cr = new Map([]), + Tr = (e, t = {}) => new Promise(((o, i) => { + const { + onMetadata: n = r, + onLoad: a = o, + onError: s = i, + onComplete: l = r + } = t; + let c = Cr.get(e); + if (c || (c = { + loading: !1, + complete: !1, + error: !1, + image: void 0, + size: void 0, + bus: Go() + }, Cr.set(e, c)), c.bus.sub("meta", n), c.bus.sub("load", a), c.bus.sub("error", s), c.bus.sub("complete", l), Sr(e)) { + const t = e, + o = t.cloneNode(); + c.complete = !0, c.image = o, c.size = Oe(t) + } + if (c.complete) return c.bus.pub("meta", { + size: c.size + }), c.error ? c.bus.pub("error", c.error) : c.bus.pub("load", c.image), c.bus.pub("complete"), void(c.bus = Go()); + c.loading || (c.loading = !0, kr(e, (e => { + c.size = e, c.bus.pub("meta", { + size: e + }) + })).then((e => { + c.image = e, c.bus.pub("load", e) + })).catch((e => { + c.error = e, c.bus.pub("error", e) + })).finally((() => { + c.complete = !0, c.loading = !1, c.bus.pub("complete"), c.bus = Go() + }))) + })), + Mr = (e, t, o, i) => e.drawImage(t, o.x, o.x, o.width, o.height, i.x, i.y, i.width, i.height); +var Rr = async (e, t, o, i, r = Mr, n) => { + e.save(), e.clip(), await r(e, t, o, i, n), e.restore() +}; +const Pr = (e, t, o, i, r) => { + const n = Ye(e); + if (i) { + const e = vt(et(i), ne); + return e.x *= o.width, e.width *= o.width, e.y *= o.height, e.height *= o.height, { + srcRect: e, + destRect: n + } + } + const a = it(0, 0, o.width, o.height); + if ("contain" === t) { + const t = yt(e, ut(a)); + n.width = t.width, n.height = t.height, r ? (n.x += r.x, n.y += r.y) : (n.x += t.x, n.y += t.y) + } else if ("cover" === t) { + const e = ft(n, a.width / a.height); + n.width = e.width, n.height = e.height, r ? (n.x += r.x, n.y += r.y) : (n.x += e.x, n.y += e.y) + } else t ? (n.width = t.width, n.height = t.height, r && (n.x += r.x, n.y += r.y)) : r && (n.width = o.width, n.height = o.height, n.x += r.x, n.y += r.y); + return { + srcRect: a, + destRect: n + } + }, + Er = (e, t) => (t.cornerRadius > 0 ? ((e, t, o, i, r, n) => { + i < 2 * n && (n = i / 2), r < 2 * n && (n = r / 2), e.beginPath(), e.moveTo(t + n, o), e.arcTo(t + i, o, t + i, o + r, n), e.arcTo(t + i, o + r, t, o + r, n), e.arcTo(t, o + r, t, o, n), e.arcTo(t, o, t + i, o, n), e.closePath() + })(e, t.x, t.y, t.width, t.height, t.cornerRadius) : e.rect(t.x, t.y, t.width, t.height), e), + Ir = (e, t) => (t.backgroundColor && e.fill(), e), + Ar = (e, t) => (t.strokeWidth && e.stroke(), e); +var Lr = async (e, t, o = {}) => { + const { + drawImage: i + } = o; + if (e.lineWidth = t.strokeWidth ? t.strokeWidth : 1, e.strokeStyle = t.strokeColor ? _o(t.strokeColor) : "none", e.fillStyle = t.backgroundColor ? _o(t.backgroundColor) : "none", e.globalAlpha = t.opacity, t.backgroundImage) { + let o; + if (o = Sr(t.backgroundImage) ? t.backgroundImage : await Tr(t.backgroundImage), Er(e, t), Ir(e, t), "repeat" === t.backgroundRepeat) { + const r = t.backgroundPosition || { + x: 0, + y: 0 + }, + { + srcRect: n, + destRect: a + } = Pr(t, t.backgroundSize || Oe(o), Oe(o), t.backgroundCorners, { + x: 0, + y: 0 + }), + s = document.createElement("canvas"); + s.width = a.width, s.height = a.height; + const l = s.getContext("2d", { + willReadFrequently: !1, + desynchronized: !0 + }); + await i(l, o, n, { + ...a, + x: 0, + y: 0 + }); + const c = e.createPattern(s, "repeat"); + e.fillStyle = c, e.save(), e.beginPath(), e.rect(t.x + r.x, t.y + r.y, t.width - r.x, t.height - r.y), e.clip(), e.translate(a.x + r.x, a.y + r.y), e.fill(), g(s), e.restore() + } else { + const { + srcRect: r, + destRect: n + } = Pr(t, t.backgroundSize, Oe(o), t.backgroundCorners, t.backgroundPosition); + await Rr(e, o, r, n, i, { + feather: t.feather + }) + } + return e.beginPath(), Er(e, t), Ar(e, t), [] + } + return Er(e, t), Ir(e, t), Ar(e, t), [] +}, zr = async (e, t, o = {}) => new Promise((async (i, r) => { + const { + drawImage: n + } = o; + if (e.lineWidth = t.strokeWidth || 1, e.strokeStyle = t.strokeColor ? _o(t.strokeColor) : "none", e.fillStyle = t.backgroundColor ? _o(t.backgroundColor) : "none", e.globalAlpha = t.opacity, e.ellipse(t.x, t.y, t.rx, t.ry, 0, 0, 2 * Math.PI), t.backgroundColor && e.fill(), t.backgroundImage) { + let o; + try { + o = await Tr(t.backgroundImage) + } catch (e) { + r(e) + } + const a = it(t.x - t.rx, t.y - t.ry, 2 * t.rx, 2 * t.ry), + { + srcRect: s, + destRect: l + } = Pr(a, t.backgroundSize, Oe(o), t.backgroundCorners, t.backgroundPosition); + await Rr(e, o, s, l, n), t.strokeWidth && e.stroke(), i([]) + } else t.strokeWidth && e.stroke(), i([]) +})), Fr = async (e, t, o) => { + const i = t.width && t.height ? Le(t) : ii(t.text, t), + r = { + x: t.x, + y: t.y, + width: i.width, + height: i.height + }; + if (Lr(e, { + ...t, + ...r, + options: o + }), !t.text.length) return []; + const { + textOutlineWidth: n = 0, + textShadowX: a = 0, + textShadowY: s = 0, + textShadowBlur: l = 0, + textShadowColor: c, + outline: d, + blur: u, + ...h + } = t; + return t.height && (e.rect(r.x - n + Math.min(a, 0), r.y - n + Math.min(s, 0), r.width + n + n + Math.abs(a) + l, r.height + n + Math.abs(s) + l), e.save(), e.clip()), (a || s || l) && (e.save(), e.translate(a, s), await Or(e, r, t, { + ...o, + paddingLeft: Yo + l, + paddingRight: Yo + l, + paddingTop: l, + paddingBottom: l, + shapeExtendedProps: { + color: c, + blur: l + } + }), e.restore()), n && await Or(e, r, t, { + ...o, + paddingLeft: Yo + n, + paddingRight: Yo + n, + paddingTop: n, + paddingBottom: n, + shapeExtendedProps: { + color: t.textOutlineColor, + outline: n + } + }), t.height && e.restore(), await Or(e, r, h, { + ...o, + paddingLeft: Yo, + paddingRight: Yo, + paddingTop: 0, + paddingBottom: 0 + }), [] +}; +const Or = async (e, t, o, i) => { + const { + willRequest: r, + shapeExtendedProps: n, + paddingLeft: a, + paddingRight: s, + paddingTop: l, + paddingBottom: c + } = i, d = await mi(o.text, { + ...o, + ...n, + ...t, + paddingLeft: a, + paddingRight: s, + paddingTop: l, + paddingBottom: c, + imageWidth: t.width, + imageHeight: t.height, + willRequest: r + }); + e.drawImage(d, o.x - a, o.y - l, d.width, d.height) +}; +var Dr = async (e, t) => new Promise((async o => { + e.lineWidth = t.strokeWidth || 1, e.strokeStyle = t.strokeColor ? _o(t.strokeColor) : "none", e.globalAlpha = t.opacity; + let i = xi(t), + r = vi(t); + e.moveTo(i.x, i.y), e.lineTo(r.x, r.y), t.strokeWidth && e.stroke(), o([]) +})), Br = async (e, t) => new Promise(((o, i) => { + if (t.bitmap && 1 === t.points.length) return void zr(e, { + x: t.points[0].x, + y: t.points[0].y, + rx: .5 * t.strokeWidth, + ry: .5 * t.strokeWidth, + backgroundColor: t.strokeColor + }).then((() => o([]))); + e.lineWidth = t.strokeWidth || 1, e.strokeStyle = t.strokeColor ? _o(t.strokeColor) : "none", e.fillStyle = t.backgroundColor ? _o(t.backgroundColor) : "none", e.globalAlpha = t.opacity; + const { + points: r + } = t; + e.lineCap = t.strokeCap, e.lineJoin = t.strokeJoin, e.setLineDash(t.strokeDash || []), t.pathClose && e.beginPath(), e.moveTo(r[0].x, r[0].y); + const n = r.length; + for (let t = 1; t < n; t++) e.lineTo(r[t].x, r[t].y); + t.pathClose && e.closePath(), t.strokeWidth && e.stroke(), t.backgroundColor && e.fill(), o([]) +})), Wr = (e, t, o, i) => t || o ? (e.translate(i.x, i.y), e.scale(t ? -1 : 1, o ? -1 : 1), e.translate(-i.x, -i.y), e) : e; +const Vr = async (e, t, o) => { + e.globalCompositeOperation = "subtract" === t.drawMode ? "destination-out" : "source-over"; + const i = vr(t); + let r; + if (yo(e, t.rotation, i), Wr(e, t.flipX, t.flipY, i), Ci(t) ? r = Lr : Ti(t) ? r = zr : Mi(t) ? r = Dr : Ri(t) ? r = Br : wi(t) && (r = Fr), r) { + const i = await r(e, t, o); + if (!i.length) return []; + return [t, ...await _r(e, i, o)] + } + return [] +}; +var _r = async (e, t, o) => { + let i = []; + for (const r of t) e.save(), e.beginPath(), i = [...i, ...await Vr(e, r, o)], e.restore(); + return i +}, Nr = async (e, t = {}) => { + const { + shapes: o = [], + contextBounds: i = e, + transform: n = r, + drawImage: a, + willRequest: s, + canvasMemoryLimit: l, + computeShape: c = j, + preprocessShape: d = j + } = t; + if (!o.length) return e; + const u = p("canvas"); + u.width = i.width, u.height = i.height; + const h = u.getContext("2d", { + willReadFrequently: !0 + }); + h.putImageData(e, i.x || 0, i.y || 0); + const m = o.map(gi).map(c).map(d).flat(); + n(h), await _r(h, m, { + drawImage: a, + canvasMemoryLimit: l, + willRequest: s + }); + const $ = h.getImageData(0, 0, u.width, u.height); + return g(u), $ +}, Hr = async (e, t = {}) => { + const { + backgroundColor: o, + backgroundImage: i + } = t, r = !(!o || o && 0 === o[3]); + if (!i && !r) return e; + const n = p("canvas"); + n.width = e.width, n.height = e.height; + const a = n.getContext("2d", { + willReadFrequently: !0 + }); + if (a.putImageData(e, 0, 0), a.globalCompositeOperation = "destination-over", r && (a.fillStyle = _o(o), a.fillRect(0, 0, n.width, n.height)), i) { + let t; + t = Sr(i) ? i : await Tr(i); + const { + srcRect: o, + destRect: r + } = Pr({ + x: 0, + y: 0, + width: e.width, + height: e.height + }, "cover", { + width: t.width, + height: t.height + }); + a.drawImage(t, o.x, o.y, o.width, o.height, r.x, r.y, r.width, r.height) + } + const s = a.getImageData(0, 0, n.width, n.height); + return g(n), s +}, jr = e => e.length ? e.reduce(((e, t) => ((e, t) => { + const o = new Array(20); + return o[0] = e[0] * t[0] + e[1] * t[5] + e[2] * t[10] + e[3] * t[15], o[1] = e[0] * t[1] + e[1] * t[6] + e[2] * t[11] + e[3] * t[16], o[2] = e[0] * t[2] + e[1] * t[7] + e[2] * t[12] + e[3] * t[17], o[3] = e[0] * t[3] + e[1] * t[8] + e[2] * t[13] + e[3] * t[18], o[4] = e[0] * t[4] + e[1] * t[9] + e[2] * t[14] + e[3] * t[19] + e[4], o[5] = e[5] * t[0] + e[6] * t[5] + e[7] * t[10] + e[8] * t[15], o[6] = e[5] * t[1] + e[6] * t[6] + e[7] * t[11] + e[8] * t[16], o[7] = e[5] * t[2] + e[6] * t[7] + e[7] * t[12] + e[8] * t[17], o[8] = e[5] * t[3] + e[6] * t[8] + e[7] * t[13] + e[8] * t[18], o[9] = e[5] * t[4] + e[6] * t[9] + e[7] * t[14] + e[8] * t[19] + e[9], o[10] = e[10] * t[0] + e[11] * t[5] + e[12] * t[10] + e[13] * t[15], o[11] = e[10] * t[1] + e[11] * t[6] + e[12] * t[11] + e[13] * t[16], o[12] = e[10] * t[2] + e[11] * t[7] + e[12] * t[12] + e[13] * t[17], o[13] = e[10] * t[3] + e[11] * t[8] + e[12] * t[13] + e[13] * t[18], o[14] = e[10] * t[4] + e[11] * t[9] + e[12] * t[14] + e[13] * t[19] + e[14], o[15] = e[15] * t[0] + e[16] * t[5] + e[17] * t[10] + e[18] * t[15], o[16] = e[15] * t[1] + e[16] * t[6] + e[17] * t[11] + e[18] * t[16], o[17] = e[15] * t[2] + e[16] * t[7] + e[17] * t[12] + e[18] * t[17], o[18] = e[15] * t[3] + e[16] * t[8] + e[17] * t[13] + e[18] * t[18], o[19] = e[15] * t[4] + e[16] * t[9] + e[17] * t[14] + e[18] * t[19] + e[19], o +})([...e], t)), e.shift()) : [], Ur = (e, t) => { + const o = e.width * e.height, + i = t.reduce(((e, t) => (t.width > e.width && t.height > e.height && (e.width = t.width, e.height = t.height), e)), { + width: 0, + height: 0 + }), + r = i.width * i.height; + return ((e, t = 2) => Math.round(e * t) / t)(Math.max(.5, .5 + (1 - r / o) / 2), 5) +}; + +function Gr() {} +const Zr = e => e; + +function Xr(e, t) { + for (const o in t) e[o] = t[o]; + return e +} + +function Yr(e) { + return e() +} + +function qr() { + return Object.create(null) +} + +function Kr(e) { + e.forEach(Yr) +} + +function Jr(e) { + return "function" == typeof e +} + +function Qr(e, t) { + return e != e ? t == t : e !== t || e && "object" == typeof e || "function" == typeof e +} + +function en(e, ...t) { + if (null == e) return Gr; + const o = e.subscribe(...t); + return o.unsubscribe ? () => o.unsubscribe() : o +} + +function tn(e) { + let t; + return en(e, (e => t = e))(), t +} + +function on(e, t, o) { + e.$$.on_destroy.push(en(t, o)) +} + +function rn(e, t, o, i) { + if (e) { + const r = nn(e, t, o, i); + return e[0](r) + } +} + +function nn(e, t, o, i) { + return e[1] && i ? Xr(o.ctx.slice(), e[1](i(t))) : o.ctx +} + +function an(e, t, o, i) { + if (e[2] && i) { + const r = e[2](i(o)); + if (void 0 === t.dirty) return r; + if ("object" == typeof r) { + const e = [], + o = Math.max(t.dirty.length, r.length); + for (let i = 0; i < o; i += 1) e[i] = t.dirty[i] | r[i]; + return e + } + return t.dirty | r + } + return t.dirty +} + +function sn(e, t, o, i, r, n) { + if (r) { + const a = nn(t, o, i, n); + e.p(a, r) + } +} + +function ln(e) { + if (e.ctx.length > 32) { + const t = [], + o = e.ctx.length / 32; + for (let e = 0; e < o; e++) t[e] = -1; + return t + } + return -1 +} + +function cn(e) { + const t = {}; + for (const o in e) "$" !== o[0] && (t[o] = e[o]); + return t +} + +function dn(e, t) { + const o = {}; + t = new Set(t); + for (const i in e) t.has(i) || "$" === i[0] || (o[i] = e[i]); + return o +} + +function un(e, t, o) { + return e.set(o), t +} + +function hn(e) { + return e && Jr(e.destroy) ? e.destroy : Gr +} +const pn = "undefined" != typeof window; +let mn = pn ? () => window.performance.now() : () => Date.now(), + gn = pn ? e => requestAnimationFrame(e) : Gr; +const $n = new Set; + +function fn(e) { + $n.forEach((t => { + t.c(e) || ($n.delete(t), t.f()) + })), 0 !== $n.size && gn(fn) +} + +function yn(e) { + let t; + return 0 === $n.size && gn(fn), { + promise: new Promise((o => { + $n.add(t = { + c: e, + f: o + }) + })), + abort() { + $n.delete(t) + } + } +} + +function bn(e, t) { + e.appendChild(t) +} + +function xn(e) { + if (!e) return document; + const t = e.getRootNode ? e.getRootNode() : e.ownerDocument; + return t && t.host ? t : e.ownerDocument +} + +function vn(e) { + const t = kn("style"); + return function(e, t) { + bn(e.head || e, t), t.sheet + }(xn(e), t), t.sheet +} + +function wn(e, t, o) { + e.insertBefore(t, o || null) +} + +function Sn(e) { + e.parentNode.removeChild(e) +} + +function kn(e) { + return document.createElement(e) +} + +function Cn(e) { + return document.createElementNS("http://www.w3.org/2000/svg", e) +} + +function Tn(e) { + return document.createTextNode(e) +} + +function Mn() { + return Tn(" ") +} + +function Rn() { + return Tn("") +} + +function Pn(e, t, o, i) { + return e.addEventListener(t, o, i), () => e.removeEventListener(t, o, i) +} + +function En(e) { + return function(t) { + return t.preventDefault(), e.call(this, t) + } +} + +function In(e) { + return function(t) { + return t.stopPropagation(), e.call(this, t) + } +} + +function An(e, t, o) { + null == o ? e.removeAttribute(t) : e.getAttribute(t) !== o && e.setAttribute(t, o) +} + +function Ln(e, t) { + const o = Object.getOwnPropertyDescriptors(e.__proto__); + for (const i in t) null == t[i] ? e.removeAttribute(i) : "style" === i ? e.style.cssText = t[i] : "__value" === i ? e.value = e[i] = t[i] : o[i] && o[i].set ? e[i] = t[i] : An(e, i, t[i]) +} + +function zn(e, t) { + Object.keys(t).forEach((o => { + ! function(e, t, o) { + t in e ? e[t] = "boolean" == typeof e[t] && "" === o || o : An(e, t, o) + }(e, o, t[o]) + })) +} + +function Fn(e, t) { + t = "" + t, e.wholeText !== t && (e.data = t) +} + +function On(e, t) { + e.value = null == t ? "" : t +} + +function Dn(e, t, { + bubbles: o = !1, + cancelable: i = !1 +} = {}) { + const r = document.createEvent("CustomEvent"); + return r.initCustomEvent(e, o, i, t), r +} +class Bn { + constructor(e = !1) { + this.is_svg = !1, this.is_svg = e, this.e = this.n = null + } + c(e) { + this.h(e) + } + m(e, t, o = null) { + this.e || (this.is_svg ? this.e = Cn(t.nodeName) : this.e = kn(t.nodeName), this.t = t, this.c(e)), this.i(o) + } + h(e) { + this.e.innerHTML = e, this.n = Array.from(this.e.childNodes) + } + i(e) { + for (let t = 0; t < this.n.length; t += 1) wn(this.t, this.n[t], e) + } + p(e) { + this.d(), this.h(e), this.i(this.a) + } + d() { + this.n.forEach(Sn) + } +} + +function Wn(e, t) { + return new e(t) +} +const Vn = new Map; +let _n, Nn = 0; + +function Hn(e, t, o, i, r, n, a, s = 0) { + const l = 16.666 / i; + let c = "{\n"; + for (let e = 0; e <= 1; e += l) { + const i = t + (o - t) * n(e); + c += 100 * e + `%{${a(i,1-i)}}\n` + } + const d = c + `100% {${a(o,1-o)}}\n}`, + u = `__svelte_${function(e){let t=5381,o=e.length;for(;o--;)t=(t<<5)-t^e.charCodeAt(o);return t>>>0}(d)}_${s}`, + h = xn(e), + { + stylesheet: p, + rules: m + } = Vn.get(h) || function(e, t) { + const o = { + stylesheet: vn(t), + rules: {} + }; + return Vn.set(e, o), o + }(h, e); + m[u] || (m[u] = !0, p.insertRule(`@keyframes ${u} ${d}`, p.cssRules.length)); + const g = e.style.animation || ""; + return e.style.animation = `${g?g+", ":""}${u} ${i}ms linear ${r}ms 1 both`, Nn += 1, u +} + +function jn(e, t) { + const o = (e.style.animation || "").split(", "), + i = o.filter(t ? e => e.indexOf(t) < 0 : e => -1 === e.indexOf("__svelte")), + r = o.length - i.length; + r && (e.style.animation = i.join(", "), Nn -= r, Nn || gn((() => { + Nn || (Vn.forEach((e => { + const { + ownerNode: t + } = e.stylesheet; + t && Sn(t) + })), Vn.clear()) + }))) +} + +function Un(e) { + _n = e +} + +function Gn() { + if (!_n) throw new Error("Function called outside component initialization"); + return _n +} + +function Zn(e) { + Gn().$$.on_mount.push(e) +} + +function Xn(e) { + Gn().$$.after_update.push(e) +} + +function Yn(e) { + Gn().$$.on_destroy.push(e) +} + +function qn() { + const e = Gn(); + return (t, o, { + cancelable: i = !1 + } = {}) => { + const r = e.$$.callbacks[t]; + if (r) { + const n = Dn(t, o, { + cancelable: i + }); + return r.slice().forEach((t => { + t.call(e, n) + })), !n.defaultPrevented + } + return !0 + } +} + +function Kn(e, t) { + return Gn().$$.context.set(e, t), t +} + +function Jn(e) { + return Gn().$$.context.get(e) +} + +function Qn(e, t) { + const o = e.$$.callbacks[t.type]; + o && o.slice().forEach((e => e.call(this, t))) +} +const ea = [], + ta = [], + oa = [], + ia = [], + ra = Promise.resolve(); +let na = !1; + +function aa() { + na || (na = !0, ra.then(pa)) +} + +function sa() { + return aa(), ra +} + +function la(e) { + oa.push(e) +} + +function ca(e) { + ia.push(e) +} +const da = new Set; +let ua, ha = 0; + +function pa() { + const e = _n; + do { + for (; ha < ea.length;) { + const e = ea[ha]; + ha++, Un(e), ma(e.$$) + } + for (Un(null), ea.length = 0, ha = 0; ta.length;) ta.pop()(); + for (let e = 0; e < oa.length; e += 1) { + const t = oa[e]; + da.has(t) || (da.add(t), t()) + } + oa.length = 0 + } while (ea.length); + for (; ia.length;) ia.pop()(); + na = !1, da.clear(), Un(e) +} + +function ma(e) { + if (null !== e.fragment) { + e.update(), Kr(e.before_update); + const t = e.dirty; + e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(la) + } +} + +function ga(e, t, o) { + e.dispatchEvent(Dn(`${t?"intro":"outro"}${o}`)) +} +const $a = new Set; +let fa; + +function ya() { + fa = { + r: 0, + c: [], + p: fa + } +} + +function ba() { + fa.r || Kr(fa.c), fa = fa.p +} + +function xa(e, t) { + e && e.i && ($a.delete(e), e.i(t)) +} + +function va(e, t, o, i) { + if (e && e.o) { + if ($a.has(e)) return; + $a.add(e), fa.c.push((() => { + $a.delete(e), i && (o && e.d(1), i()) + })), e.o(t) + } else i && i() +} +const wa = { + duration: 0 +}; + +function Sa(e, t, o, i) { + let r = t(e, o), + n = i ? 0 : 1, + a = null, + s = null, + l = null; + + function c() { + l && jn(e, l) + } + + function d(e, t) { + const o = e.b - n; + return t *= Math.abs(o), { + a: n, + b: e.b, + d: o, + duration: t, + start: e.start, + end: e.start + t, + group: e.group + } + } + + function u(t) { + const { + delay: o = 0, + duration: i = 300, + easing: u = Zr, + tick: h = Gr, + css: p + } = r || wa, m = { + start: mn() + o, + b: t + }; + t || (m.group = fa, fa.r += 1), a || s ? s = m : (p && (c(), l = Hn(e, n, t, i, o, u, p)), t && h(0, 1), a = d(m, i), la((() => ga(e, t, "start"))), yn((t => { + if (s && t > s.start && (a = d(s, i), s = null, ga(e, a.b, "start"), p && (c(), l = Hn(e, n, a.b, a.duration, 0, u, r.css))), a) + if (t >= a.end) h(n = a.b, 1 - n), ga(e, a.b, "end"), s || (a.b ? c() : --a.group.r || Kr(a.group.c)), a = null; + else if (t >= a.start) { + const e = t - a.start; + n = a.a + a.d * u(e / a.duration), h(n, 1 - n) + } + return !(!a && !s) + }))) + } + return { + run(e) { + Jr(r) ? (ua || (ua = Promise.resolve(), ua.then((() => { + ua = null + }))), ua).then((() => { + r = r(), u(e) + })) : u(e) + }, + end() { + c(), a = s = null + } + } +} +const ka = "undefined" != typeof window ? window : "undefined" != typeof globalThis ? globalThis : global; + +function Ca(e, t) { + e.d(1), t.delete(e.key) +} + +function Ta(e, t) { + va(e, 1, 1, (() => { + t.delete(e.key) + })) +} + +function Ma(e, t, o, i, r, n, a, s, l, c, d, u) { + let h = e.length, + p = n.length, + m = h; + const g = {}; + for (; m--;) g[e[m].key] = m; + const $ = [], + f = new Map, + y = new Map; + for (m = p; m--;) { + const e = u(r, n, m), + s = o(e); + let l = a.get(s); + l ? i && l.p(e, t) : (l = c(s, e), l.c()), f.set(s, $[m] = l), s in g && y.set(s, Math.abs(m - g[s])) + } + const b = new Set, + x = new Set; + + function v(e) { + xa(e, 1), e.m(s, d), a.set(e.key, e), d = e.first, p-- + } + for (; h && p;) { + const t = $[p - 1], + o = e[h - 1], + i = t.key, + r = o.key; + t === o ? (d = t.first, h--, p--) : f.has(r) ? !a.has(i) || b.has(i) ? v(t) : x.has(r) ? h-- : y.get(i) > y.get(r) ? (x.add(i), v(t)) : (b.add(r), h--) : (l(o, a), h--) + } + for (; h--;) { + const t = e[h]; + f.has(t.key) || l(t, a) + } + for (; p;) v($[p - 1]); + return $ +} + +function Ra(e, t) { + const o = {}, + i = {}, + r = { + $$scope: 1 + }; + let n = e.length; + for (; n--;) { + const a = e[n], + s = t[n]; + if (s) { + for (const e in a) e in s || (i[e] = 1); + for (const e in s) r[e] || (o[e] = s[e], r[e] = 1); + e[n] = s + } else + for (const e in a) r[e] = 1 + } + for (const e in i) e in o || (o[e] = void 0); + return o +} + +function Pa(e) { + return "object" == typeof e && null !== e ? e : {} +} + +function Ea(e, t, o) { + const i = e.$$.props[t]; + void 0 !== i && (e.$$.bound[i] = o, o(e.$$.ctx[i])) +} + +function Ia(e) { + e && e.c() +} + +function Aa(e, t, o, i) { + const { + fragment: r, + after_update: n + } = e.$$; + r && r.m(t, o), i || la((() => { + const t = e.$$.on_mount.map(Yr).filter(Jr); + e.$$.on_destroy ? e.$$.on_destroy.push(...t) : Kr(t), e.$$.on_mount = [] + })), n.forEach(la) +} + +function La(e, t) { + const o = e.$$; + null !== o.fragment && (Kr(o.on_destroy), o.fragment && o.fragment.d(t), o.on_destroy = o.fragment = null, o.ctx = []) +} + +function za(e, t, o, i, r, n, a, s = [-1]) { + const l = _n; + Un(e); + const c = e.$$ = { + fragment: null, + ctx: [], + props: n, + update: Gr, + not_equal: r, + bound: qr(), + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(t.context || (l ? l.$$.context : [])), + callbacks: qr(), + dirty: s, + skip_bound: !1, + root: t.target || l.$$.root + }; + a && a(c.root); + let d = !1; + if (c.ctx = o ? o(e, t.props || {}, ((t, o, ...i) => { + const n = i.length ? i[0] : o; + return c.ctx && r(c.ctx[t], c.ctx[t] = n) && (!c.skip_bound && c.bound[t] && c.bound[t](n), d && function(e, t) { + -1 === e.$$.dirty[0] && (ea.push(e), aa(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31 + }(e, t)), o + })) : [], c.update(), d = !0, Kr(c.before_update), c.fragment = !!i && i(c.ctx), t.target) { + if (t.hydrate) { + const e = function(e) { + return Array.from(e.childNodes) + }(t.target); + c.fragment && c.fragment.l(e), e.forEach(Sn) + } else c.fragment && c.fragment.c(); + t.intro && xa(e.$$.fragment), Aa(e, t.target, t.anchor, t.customElement), pa() + } + Un(l) +} +class Fa { + $destroy() { + La(this, 1), this.$destroy = Gr + } + $on(e, t) { + if (!Jr(t)) return Gr; + const o = this.$$.callbacks[e] || (this.$$.callbacks[e] = []); + return o.push(t), () => { + const e = o.indexOf(t); - 1 !== e && o.splice(e, 1) + } + } + $set(e) { + var t; + this.$$set && (t = e, 0 !== Object.keys(t).length) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1) + } +} +const Oa = []; + +function Da(e, t) { + return { + subscribe: Ba(e, t).subscribe + } +} + +function Ba(e, t = Gr) { + let o; + const i = new Set; + + function r(t) { + if (Qr(e, t) && (e = t, o)) { + const t = !Oa.length; + for (const t of i) t[1](), Oa.push(t, e); + if (t) { + for (let e = 0; e < Oa.length; e += 2) Oa[e][0](Oa[e + 1]); + Oa.length = 0 + } + } + } + return { + set: r, + update: function(t) { + r(t(e)) + }, + subscribe: function(n, a = Gr) { + const s = [n, a]; + return i.add(s), 1 === i.size && (o = t(r) || Gr), n(e), () => { + i.delete(s), 0 === i.size && (o(), o = null) + } + } + } +} + +function Wa(e, t, o) { + const i = !Array.isArray(e), + r = i ? [e] : e, + n = t.length < 2; + return Da(o, (e => { + let o = !1; + const a = []; + let s = 0, + l = Gr; + const c = () => { + if (s) return; + l(); + const o = t(i ? a[0] : a, e); + n ? e(o) : l = Jr(o) ? o : Gr + }, + d = r.map(((e, t) => en(e, (e => { + a[t] = e, s &= ~(1 << t), o && c() + }), (() => { + s |= 1 << t + })))); + return o = !0, c(), + function() { + Kr(d), l() + } + })) +} +var Va = e => e.reduce(((e, t) => Object.assign(e, t)), {}); +const _a = e => ({ + updateValue: e + }), + Na = e => ({ + defaultValue: e + }), + Ha = e => ({ + store: e + }), + ja = e => ({ + store: (t, o) => Wa(...e(o)) + }), + Ua = e => ({ + store: (t, o) => { + const [i, r, n = (() => !1)] = e(o); + let a, s = !0; + return Wa(i, ((e, t) => { + r(e, (e => { + !s && n(a, e) || (a = e, s = !1, t(e)) + })) + })) + } + }), + Ga = e => ({ + store: (t, o) => { + const [i, r = {}, n] = e(o); + let a = []; + const s = {}, + l = e => i(e, s), + c = e => { + (a.length || e.length) && (a = e, d()) + }, + d = () => { + const e = a.map(l); + n && e.sort(n), a = [...e], h(e) + }; + Object.entries(r).map((([e, t]) => t.subscribe((t => { + s[e] = t, t && d() + })))); + const { + subscribe: u, + set: h + } = Ba(t || []); + return { + set: c, + update: e => c(e(a)), + subscribe: u + } + } + }); +var Za = e => { + const t = {}, + o = {}; + return e.forEach((([e, ...i]) => { + const n = Va(i), + a = t[e] = ((e, t, o) => { + const { + store: i = (e => Ba(e)), + defaultValue: n = r, + updateValue: a + } = o, s = i(n(), t, e), { + subscribe: l, + update: c = r + } = s; + let d; + const u = e => { + let t = !0; + d && d(), d = l((o => { + if (t) return t = !1; + e(o), d(), d = void 0 + })) + }, + h = a ? a(e) : j; + return s.set = e => c((t => h(e, t, u))), s.defaultValue = n, s + })(o, t, n), + s = { + get: () => tn(a), + set: a.set + }; + Object.defineProperty(o, e, s) + })), { + stores: t, + accessors: o + } +}; +var Xa = [ + ["src", Ha((() => { + let e; + const { + subscribe: t, + set: o + } = Ba(), i = t => { + e !== t && (e = t, o(e)) + }; + return { + set: i, + subscribe: t, + update: t => i(t(e)) + } + }))], + ["imageReader"], + ["imageWriter"], + ["imageScrambler"], + ["imageRedactionRendering", Na((() => "pixelated"))], + ["images", Na((() => []))], + ["shapePreprocessor"], + ["willRequestResource"], + ["willRequest"] + ], + Ya = e => e.charAt(0).toUpperCase() + e.slice(1), + qa = (e, t) => { + Object.keys(t).forEach((o => { + const i = M(t[o]) ? { + value: t[o], + writable: !1 + } : t[o]; + Object.defineProperty(e, o, i) + })) + }; +const Ka = (e, t) => { + let o, i, r, n, a, s, l, c, d, u; + const h = t.length; + for (o = 0; o < h; o++) + if (i = t[o], r = t[o + 1 > h - 1 ? 0 : o + 1], n = i.x - e.x, a = i.y - e.y, s = r.x - e.x, l = r.y - e.y, c = n - s, d = a - l, u = c * a - d * n, u < -1e-5) return !1; + return !0 +}; +var Ja = (e, t) => { + const o = Pt(t), + i = le(); + xt(e).forEach((e => { + be(e, i), Ka(e, t) || o.forEach((t => { + const o = Math.atan2(t.start.y - t.end.y, t.start.x - t.end.x), + r = 1e4 * Math.sin(Math.PI - o), + n = 1e4 * Math.cos(Math.PI - o), + a = ce(e.x + r, e.y + n), + s = Ge(Ue(t), 1e4), + l = Ct(je(e, a), s); + l && be(i, xe(ue(l), e)) + })) + })); + const r = Ye(e); + be(r, i); + return !!xt(r).every((e => Ka(e, t))) && (pt(e, r), !0) + }, + Qa = (e, t) => { + const o = xt(e), + i = Et(t, 5), + r = rt(e), + n = []; + o.forEach((e => { + const t = ((e, t) => { + if (0 === t) return e; + const o = ce(e.start.x - e.end.x, e.start.y - e.end.y), + i = ge(o), + r = we(i, t); + return e.end.x += r.x, e.end.y += r.y, e + })(je(ue(r), ue(e)), 1e6); + let o = !1; + i.map(Ue).forEach((e => { + const i = Ct(t, e); + i && !o && (n.push(i), o = !0) + })) + })); + const a = Te(n[0], n[2]) < Te(n[1], n[3]) ? [n[0], n[2]] : [n[1], n[3]], + s = et(a); + return s.width < e.width && (pt(e, s), !0) + }, + es = (e, t, o = { + x: 0, + y: 0 + }) => { + const i = Ke(e), + r = rt(i), + n = wt(i, o, r).map((e => pe(e, t, r))), + a = et(n); + return n.map((e => xe(e, a))) + }, + ts = (e, t = 0, o = ut(e)) => { + let i, r; + if (0 !== t) { + const n = Math.atan2(1, o), + a = Math.sign(t) * t, + s = a % Math.PI, + l = a % G; + let c; + c = s > Z && s < G + Z ? l > Z ? a : G - l : l > Z ? G - l : a; + const d = Math.min(Math.abs(e.height / Math.sin(n + c)), Math.abs(e.width / Math.cos(n - c))); + i = Math.cos(n) * d, r = i / o + } else i = e.width, r = i / o, r > e.height && (r = e.height, i = r * o); + return De(i, r) + }, + os = (e, t, o, i, r, n, a, s) => { + const l = Ae(a), + c = Ae(s), + d = ne(Math.max(t.width / c.width, t.height / c.height)), + u = ne(Math.min(t.width / l.width, t.height / l.height)), + h = Ye(t); + if (u < 1 || d > 1) { + const o = rt(e), + i = rt(t), + r = u < 1 ? u : d, + n = (i.x + o.x) / 2, + a = (i.y + o.y) / 2, + s = h.width / r, + l = h.height / r; + ht(h, n - .5 * s, a - .5 * l, s, l) + } + return n ? (((e, t, o = 0, i = le(), r) => { + if (Eo(o) && 0 !== o || i.x || i.y) { + const r = ut(e), + n = es(t, o, i), + a = ts(t, o, r); + if (!(e.width < a.width && e.height < a.height)) { + const t = .5 * e.width - .5 * a.width, + o = .5 * e.height - .5 * a.height; + e.width > a.width && (e.width = a.width, e.x += t), e.height > a.height && (e.height = a.height, e.y += o) + } + Ja(e, n), Qa(e, n) && Ja(e, n) + } else { + const o = ut(e); + e.width = Math.min(e.width, t.width), e.height = Math.min(e.height, t.height), e.x = Math.max(e.x, 0), e.x + e.width > t.width && (e.x -= e.x + e.width - t.width), e.y = Math.max(e.y, 0), e.y + e.height > t.height && (e.y -= e.y + e.height - t.height); + const i = rt(e), + n = yt(e, o); + n.width = Math.max(r.width, n.width), n.height = Math.max(r.height, n.height), n.x = i.x - .5 * n.width, n.y = i.y - .5 * n.height, pt(e, n) + } + })(h, o, i, r, l), { + crop: h + }) : { + crop: h + } + }, + is = (e, t, o) => { + const i = Ke(e), + r = rt(i), + n = mt(i, o, r), + a = rt(St(et(n))), + s = rt(t), + l = pe(s, -o, a), + c = xe(l, a), + d = ye(be(r, c), ne); + return it(d.x - .5 * t.width, d.y - .5 * t.height, t.width, t.height) + }, + rs = (e, t, o) => Math.max(t, Math.min(e, o)); +const ns = ["cropLimitToImage", "cropMinSize", "cropMaxSize", "cropAspectRatio", "flipX", "flipY", "rotation", "crop", "colorMatrix", "convolutionMatrix", "gamma", "vignette", "manipulation", "redaction", "annotation", "decoration", "selection", "frame", "backgroundColor", "backgroundImage", "targetSize", "metadata", "trim", "volume", "minDuration", "maxDuration"], + as = e => Lo(e) ? e.map(as) : so(e) || Bt(e) ? e : S(e) ? { + ...e + } : e, + ss = e => e.map((e => Object.entries(e).reduce(((e, [t, o]) => (t.startsWith("_") || (e[t] = o), e)), {}))); +const ls = (e, t) => e === t; +var cs = (e, t, o = ls) => { + if (e.length !== t.length) return !1; + for (let i = 0; i < e.length; i++) + if (!o(e[i], t[i])) return !1; + return !0 +}; +const ds = (e, t, o) => { + const i = ye(rt(e), (e => ne(e, 8))), + r = Ke(t), + n = rt(r), + a = mt(r, o, n), + s = ye(Ve(et(a)), (e => ne(e, 8))), + l = Math.abs(s.x - i.x), + c = Math.abs(s.y - i.y); + return l < 1 && c < 1 + }, + us = (e, t, o, i, r) => { + if (!r) return [-1 / 0, 1 / 0]; + const n = Math.max(o.width / i.width, o.height / i.height), + a = De(i.width * n, i.height * n), + s = (l = a, Math.sqrt(l.width * l.width + l.height * l.height)); + var l; + if (s < Math.min(e.width, e.height)) return [-1 / 0, 1 / 0]; + const c = t ? e.height : e.width, + d = t ? e.width : e.height, + u = Math.acos(a.height / s), + h = u - Math.acos(d / s), + p = Math.asin(c / s) - u; + if (Number.isNaN(h) && Number.isNaN(p)) return [-1 / 0, 1 / 0]; + const m = Number.isNaN(h) ? p : Number.isNaN(p) ? h : Math.min(h, p); + return [-m, m] + }, + hs = (e, t) => { + const { + context: o, + props: i + } = t; + return e._isFormatted || ((e = or(e))._isFormatted = !0, Object.assign(e, i)), e._isDraft || !Oi(e) || e._context && dt(o, e._context) || (yr(e, o), e._context = { + ...o + }), e + }, + ps = (e, t) => (e._isFormatted || (e.disableMove = !0, e.disableSelect = !0, e.disableResize = !0, e.disableRotate = !0), hs(e, t)); +var ms = [ + ["file"], + ["size"], + ["loadState"], + ["processState"], + ["aspectRatio", ja((({ + size: e + }) => [e, e => e ? ut(e) : void 0]))], + ["perspectiveX", Na((() => 0))], + ["perspectiveY", Na((() => 0))], + ["perspective", ja((({ + perspectiveX: e, + perspectiveY: t + }) => [ + [e, t], ([e, t]) => ({ + x: e, + y: t + }) + ]))], + ["rotation", Na((() => 0)), _a((e => (t, o, i) => { + if (t === o) return t; + const { + loadState: r, + size: n, + rotationRange: a, + cropMinSize: s, + cropMaxSize: l, + crop: c, + perspective: d, + cropLimitToImage: u, + cropOrigin: h + } = e; + if (!c || !r || !r.beforeComplete) return t; + const p = u && ((e, t, o) => { + const i = ts(t, o, ut(e)); + return Be(He(i, Math.round), He(Ae(e), Math.round)) + })(c, n, o), + m = u && ds(c, n, o), + g = ((e, t, o, i, r, n, a, s, l, c) => { + const d = Ae(l), + u = Ae(c); + a && (u.width = Math.min(c.width, r.width), u.height = Math.min(c.height, r.height)); + let h = !1; + const p = (t, o) => { + const l = is(r, i, t), + c = Ke(r), + m = rt(c), + g = wt(c, n, m), + $ = xe(ue(m), kt(g)), + f = pe(rt(l), o, m), + y = xe(ue(m), f); + g.forEach((e => pe(e, o, m))); + const b = et(g), + x = kt(g), + v = be(xe(xe(x, y), b), $), + w = it(v.x - .5 * l.width, v.y - .5 * l.height, l.width, l.height); + if (s && at(w, s.width / w.width), a) { + const e = es(r, o, n); + Qa(w, e) + } + const S = ne(Math.min(w.width / d.width, w.height / d.height), 8), + k = ne(Math.max(w.width / u.width, w.height / u.height), 8); + return (S < 1 || k > 1) && ne(Math.abs(o - t)) === ne(Math.PI / 2) && !h ? (h = !0, p(e, e + Math.sign(o - t) * Math.PI)) : { + rotation: o, + crop: vt(w, (e => ne(e, 8))) + } + }, + m = Math.sign(t) * Math.round(Math.abs(t) / G) * G, + g = rs(t, m + o[0], m + o[1]); + return p(e, g) + })(o, t, a, c, n, d, u, h, s, l); + if (p && m) { + const e = ts(n, t, ut(g.crop)); + g.crop.x += .5 * g.crop.width, g.crop.y += .5 * g.crop.height, g.crop.x -= .5 * e.width, g.crop.y -= .5 * e.height, g.crop.width = e.width, g.crop.height = e.height + } + return i((() => { + e.crop = vt(g.crop, (e => ne(e, 8))) + })), g.rotation + }))], + ["flipX", Na((() => !1))], + ["flipY", Na((() => !1))], + ["flip", ja((({ + flipX: e, + flipY: t + }) => [ + [e, t], ([e, t]) => ({ + x: e, + y: t + }) + ]))], + ["isRotatedSideways", Ua((({ + rotation: e + }) => [ + [e], ([e], t) => t(X(e)), (e, t) => e !== t + ]))], + ["crop", _a((e => (t, o = t) => { + const { + loadState: i, + size: r, + cropMinSize: n, + cropMaxSize: a, + cropLimitToImage: s, + cropAspectRatio: l, + rotation: c, + perspective: d + } = e; + if (!t && !o || !i || !i.beforeComplete) return t; + t || (t = Ke(ts(r, c, l || ut(r)))); + const u = os(o, t, r, c, d, s, n, a), + h = vt(u.crop, (e => ne(e, 8))); + return dt(o, h) ? o : h + }))], + ["cropAspectRatio", _a((e => (t, o) => { + const { + loadState: i, + crop: r, + size: n, + rotation: a, + cropLimitToImage: s + } = e, l = (e => { + if (e) { + if (/:/.test(e)) { + const [t, o] = e.split(":"); + return t / o + } + return parseFloat(e) + } + })(t); + if (!l) return; + if (!r || !i || !i.beforeComplete) return l; + const c = o ? Math.abs(t - o) : 1; + if (ds(r, n, a) && s && c >= .1) { + const o = ((e, t) => { + const o = e.width, + i = e.height; + return X(t) && (e.width = i, e.height = o), e + })(Ae(n), a); + e.crop = vt(yt(Ke(o), t), ne) + } else { + const t = { + width: r.height * l, + height: r.height + }, + o = .5 * (r.width - t.width), + i = .5 * (r.height - t.height); + e.crop = vt(it(r.x + o, r.y + i, t.width, t.height), ne) + } + return l + }))], + ["cropOrigin"], + ["cropMinSize", Na((() => ({ + width: 1, + height: 1 + })))], + ["cropMaxSize", Na((() => ({ + width: 32768, + height: 32768 + })))], + ["cropLimitToImage", Na((() => !0)), _a((e => (t, o, i) => { + const { + crop: r + } = e; + return r ? (!o && t && i((() => e.crop = Ye(e.crop))), t) : t + }))], + ["cropSize", Ua((({ + crop: e + }) => [ + [e], ([e], t) => { + e && t(De(e.width, e.height)) + }, (e, t) => Be(e, t) + ]))], + ["cropRectAspectRatio", ja((({ + cropSize: e + }) => [ + [e], ([e], t) => { + e && t(ne(ut(e), 5)) + } + ]))], + ["cropRange", Ua((({ + size: e, + rotation: t, + cropRectAspectRatio: o, + cropMinSize: i, + cropMaxSize: r, + cropLimitToImage: n + }) => [ + [e, t, o, i, r, n], ([e, t, o, i, r, n], a) => { + if (!e) return; + a(((e, t, o, i, r, n) => { + const a = Ae(i), + s = Ae(r); + return n ? [a, He(ts(e, t, o), Math.round)] : [a, s] + })(e, t, o, i, r, n)) + }, (e, t) => cs(e, t) + ]))], + ["rotationRange", Ua((({ + size: e, + isRotatedSideways: t, + cropMinSize: o, + cropSize: i, + cropLimitToImage: r + }) => [ + [e, t, o, i, r], ([e, t, o, i, r], n) => { + if (!e || !i) return; + n(us(e, t, o, i, r)) + }, (e, t) => cs(e, t) + ]))], + ["backgroundColor", _a((() => e => ((e = [0, 0, 0, 0], t = 1) => 4 === e.length ? e : [...e, t])(e)))], + ["backgroundImage"], + ["targetSize"], + ["colorMatrix"], + ["convolutionMatrix"], + ["gamma"], + ["noise"], + ["vignette"], + ["duration"], + ["minDuration", Na((() => 1 / 24))], + ["maxDuration", Na((() => 1 / 0))], + ["trim"], + ["volume", Na((() => 1))], + ["redaction", Ga((({ + size: e + }) => [hs, { + context: e + }]))], + ["manipulation", Ga((({ + size: e + }) => [hs, { + context: e + }]))], + ["annotation", Ga((({ + size: e + }) => [hs, { + context: e + }]))], + ["decoration", Ga((({ + crop: e + }) => [hs, { + context: e + }]))], + ["selection", Ga((({ + size: e + }) => [ps, { + context: e + }]))], + ["frame", _a((() => e => { + if (!e) return; + const t = { + frameStyle: void 0, + x: 0, + y: 0, + width: "100%", + height: "100%", + disableStyle: ["backgroundColor", "strokeColor", "strokeWidth"] + }; + return T(e) ? t.frameStyle = e : Object.assign(t, e), t + }))], + ["metadata"], + ["state", Ha(((e, t, o) => { + const i = ns.map((e => t[e])); + let r = !1; + const n = Ba({}), + { + subscribe: a + } = Wa([...i, n], ((e, t) => { + if (r) return; + const o = ns.reduce(((t, o, i) => (t[o] = as(e[i]), t)), {}); + o.crop && vt(o.crop, Math.round), o.manipulation = o.manipulation && ss(o.manipulation), o.redaction = o.redaction && ss(o.redaction), o.annotation = o.annotation && ss(o.annotation), o.decoration = o.decoration && ss(o.decoration), o.selection = o.selection && ss(o.selection), t(o) + })), + s = e => { + e && (r = !0, o.cropOrigin = void 0, ns.filter((t => Ao(e, t))).forEach((t => { + const i = e[t]; + o[t] = null === i ? void 0 : as(i) + })), r = !1, n.set({})) + }; + return { + set: s, + update: e => s(e(null)), + subscribe: a + } + }))] + ], + gs = async (e, t, o = {}, i) => { + const { + ontaskstart: n, + ontaskprogress: a, + ontaskend: s, + token: l + } = i; + console.log('first i', i); + let c = !1; + const d = { + cancel: r + }; + l.cancel = () => { + c = !0, d.cancel() + }; + for (const [i, r] of t.entries()) { + if (c) return; + const [t, l] = r; + n(i, l); + try { + e = await t(e, { + ...o, + taskCancelToken: d + }, (e => a(i, l, e))) + } catch (e) { + throw c = !0, e + } + s(i, l) + } + console.log('i, l', i, l, t, e); + return e + }; +const $s = ["loadstart", "loadabort", "loaderror", "loadprogress", "load", "processstart", "processabort", "processerror", "processprogress", "process"], + fs = ["flip", "cropOrigin", "isRotatedSideways", "perspective", "perspectiveX", "perspectiveY", "cropRange"], + ys = ["images"], + bs = ms.map((([e]) => e)).filter((e => !fs.includes(e))), + xs = e => "image" + Ya(e), + vs = e => Ao(e, "crop"); +var ws = () => { + const { + stores: e, + accessors: t + } = Za(Xa), { + sub: o, + pub: i + } = Go(), n = () => t.images ? t.images[0] : {}; + let a = {}; + const s = {}; + bs.forEach((e => { + Object.defineProperty(t, xs(e), { + get: () => { + const t = n(); + if (t) return t.accessors[e] + }, + set: t => { + a[xs(e)] = t, s[xs(e)] = t; + const o = n(); + o && (o.accessors[e] = t) + } + }) + })); + const l = () => t.images && t.images[0], + c = e.src.subscribe((e => { + if (!e) return t.images = []; + t.imageReader && (t.images.length && (a = {}), u(e)) + })), + d = e.imageReader.subscribe((e => { + e && (t.images.length || t.src && u(t.src)) + })), + u = e => { + Promise.resolve().then((() => p(e, a))).catch((() => {})) + }; + let h; + const p = (e, o = {}) => new Promise(((n, c) => { + let d = l(); + const u = !(!1 === o.cropLimitToImage || !1 === o.imageCropLimitToImage || !1 === s.imageCropLmitedToImage), + p = o.cropMinSize || o.imageCropMinSize || s.imageCropMinSize, + m = u ? p : d && d.accessors.cropMinSize, + $ = o.minDuration || o.imageMinDuration; + d && g(), d = (({ + minSize: e = { + width: 1, + height: 1 + }, + minDuration: t = 0 + } = {}) => { + const { + stores: o, + accessors: i + } = Za(ms), { + pub: n, + sub: a + } = Go(), s = (e, t) => { + const o = () => i[e] || {}, + r = t => { + i[e] = { + ...o(), + ...t, + timeStamp: Date.now() + } + }, + a = () => o().error, + s = e => { + a() || (r({ + error: e + }), n(t + "error", { + ...o() + })) + }; + return { + start() { + n(t + "start") + }, + onabort() { + r({ + abort: !0 + }), n(t + "abort", { + ...o() + }) + }, + ontaskstart(e, i) { + a() || (r({ + index: e, + task: i, + taskProgress: void 0, + taskLengthComputable: void 0 + }), n(t + "taskstart", { + ...o() + })) + }, + ontaskprogress(e, i, s) { + a() || (r({ + index: e, + task: i, + taskProgress: s.loaded / s.total, + taskLengthComputable: s.lengthComputable + }), n(t + "taskprogress", { + ...o() + }), n(t + "progress", { + ...o() + })) + }, + ontaskend(e, i) { + a() || (r({ + index: e, + task: i + }), n(t + "taskend", { + ...o() + })) + }, + ontaskerror(e) { + s(e) + }, + error(e) { + s(e) + }, + beforeComplete(e) { + a() || (r({ + beforeComplete: !0 + }), n("before" + t, e)) + }, + complete(e) { + a() || (r({ + complete: !0 + }), n(t, e)) + } + } + }; + return qa(i, { + read: (o, { + reader: n + }, a = {}) => { + if (!n) return; + Object.assign(i, { + file: void 0, + size: void 0, + loadState: void 0 + }); + let l = { + cancel: r + }, + c = !1; + const d = s("loadState", "load"), + u = { + token: l, + ...d + }, + h = { + src: o, + size: void 0, + dest: void 0, + duration: void 0 + }; + return Promise.resolve().then((async () => { + try { + if (d.start(), c) return d.onabort(); + const o = await gs(h, n, a, u); + if (c) return d.onabort(); + const { + size: r, + duration: s, + dest: p + } = o || {}; + if (!r || !r.width || !r.height) throw new ro("Image size missing", "IMAGE_SIZE_MISSING", o); + if (s > 0 && s < t) throw new ro("Video too short", "VIDEO_TOO_SHORT", { + ...o, + minDuration: t + }); + if (r.width < e.width || r.height < e.height) throw new ro("Image too small", "IMAGE_TOO_SMALL", { + ...o, + minWidth: e.width, + minHeight: e.height + }); + Object.assign(i, { + file: p, + size: r, + duration: s + }), d.beforeComplete(o), d.complete(o) + } catch (e) { + d.error(e) + } finally { + l = void 0 + } + })), () => { + c = !0, l && l.cancel(), d.onabort() + } + }, + write: (e, t) => { + if (!i.loadState.complete) return; + i.processState = void 0; + console.log(i.processState); + const o = s("processState", "process"), + n = { + src: i.file, + imageState: i.state, + dest: void 0 + }; + console.log('heere', o, n, ) + if (M(e) && (e = e(i.file, i.state)), !e) return o.start(), void o.complete(n); + let a = { + cancel: r + }, + l = !1; + const c = t, + d = { + token: a, + ...o + }; + + return Promise.resolve().then((async () => { + try { + if (o.start(), l) return o.onabort(); + console.log('before', n, e, c, d, n.dest ); + e = e.filter((item) => { + return item[1] !== "image-data-decorate" + }) + // e = e.map((item) => { + + // if (item[1] === "read-exif-orientation-tag") return [ + // () => true, + // item[1] + // ] + // return item + // }) + + const t = await gs(n, e, c, d); + console.log('afterrrr', URL.createObjectURL(n.dest), e ); + + if (l) return o.onabort(); + console.log('token,', t); + + o.complete(t) + } catch (e) { + o.error(e) + } finally { + a = void 0 + } + })), () => { + l = !0, a && a.cancel() + } + }, + on: a + }), { + accessors: i, + stores: o + } + })({ + minSize: m, + minDuration: $ + }), $s.map((e => { + return d.accessors.on(e, (t = e, e => i(t, e))); + var t + })); + const f = () => { + a = {}, y.forEach((e => e())) + }, + y = []; + y.push(d.accessors.on("loaderror", (e => { + f(), c(e) + }))), y.push(d.accessors.on("loadabort", (() => { + f(), c({ + name: "AbortError" + }) + }))), y.push(d.accessors.on("load", (e => { + h = void 0, f(), n(e) + }))), y.push(d.accessors.on("beforeload", (() => ((e, o) => { + if (vs(o)) return void(t.imageState = o); + if (!o.imageCrop) { + const t = e.accessors.size, + i = o.imageRotation || 0, + r = _e(Ae(t), i), + n = Ke(r); + n.width = ne(Math.abs(n.width), 6), n.height = ne(Math.abs(n.height), 6); + const a = o.imageCropAspectRatio || (o.imageCropLimitToImage ? ut(t) : ut(n)); + let s; + o.imageCropLimitToImage ? s = yt(n, a) : (s = ft(n, a), s.x = (t.width - s.width) / 2, s.y = (t.height - s.height) / 2), o.imageCrop = s + } + if (e.accessors.duration && !o.imageTrim && o.imageMaxDuration) { + const { + duration: t + } = e.accessors; + o.imageTrim = [ + [0, Math.min(o.imageMaxDuration / t, 1)] + ] + } + const i = ["imageCropLimitToImage", "imageCrop", "imageCropAspectRatio", "imageRotation"]; + i.filter((e => Ao(o, e))).forEach((e => { + t[e] = o[e], delete o[e] + })); + const r = Object.keys(o).filter((e => !i.includes(e))).reduce(((e, t) => (e[t] = o[t], e)), {}); + Object.assign(t, r) + })(d, o)))), t.images = [d], o.imageReader && (t.imageReader = o.imageReader), o.imageWriter && (t.imageWriter = o.imageWriter), h = d.accessors.read(e, { + reader: t.imageReader + }, { + willRequest: t.willRequest + }) + })); + let m; + const g = () => { + const e = l(); + e && (h && h(), e.accessors.loadState = void 0, t.images = []) + }; + return Object.defineProperty(t, "stores", { + get: () => e + }), qa(t, { + on: o, + loadImage: p, + abortLoadImage: () => { + h && h(), t.images = [] + }, + editImage: (e, o) => new Promise(((i, r) => { + p(e, o).then((() => { + const { + images: e + } = t, o = e[0], n = () => { + a(), s() + }, a = o.accessors.on("processerror", (e => { + n(), r(e) + })), s = o.accessors.on("process", (e => { + n(), i(e) + })) + })).catch(r) + })), + removeImage: g, + processImage: (e, o) => new Promise(((i, r) => { + console.log(i, r, '----------'); + try { + const n = [], + a = () => { + m = void 0, n.forEach((e => e())) + }; + (async () => { + if ((e => T(e) || Wo(e) || Dt(e))(e)) try { + await p(e, o) + } catch (e) { + r(e) + } else e && (vs(e) ? t.imageState = e : Object.assign(t, e)); + const s = l(); + console.log('*******', t, t.imageWriter, e, s.accessors.write); + if (!s) return r("no image"); + n.push(s.accessors.on("processerror", (e => { + a(), r(e) + }))), n.push(s.accessors.on("processabort", (() => { + a(), r({ + name: "AbortError" + }) + }))), n.push(s.accessors.on("process", (e => { + a(), i(e) + }))), m = s.accessors.write(t.imageWriter, { + redactionRenderStyle: t.imageRedactionRendering, + shapePreprocessor: t.shapePreprocessor || j, + imageScrambler: t.imageScrambler, + willRequest: t.willRequest, + willRequestResource: t.willRequestResource + }) + })() + } catch (e) { + r(e) + } + })), + abortProcessImage: () => { + const e = l(); + e && (m && m(), e.accessors.processState = void 0) + }, + destroy: () => { + c && c(), d && d() + } + }), t +}; +const Ss = (e, t) => { + const { + processImage: o + } = ws(); + return o(e, t) +}; +var ks = () => Gt() ? mo() ? /15_|16_/.test(navigator.userAgent) ? 14745600 : 16777216 : /15_/.test(navigator.userAgent) ? 16777216 : 1 / 0 : 1 / 0, + Cs = (e, t) => Object.keys(e).filter((e => !t.includes(e))).reduce(((t, o) => (t[o] = e[o], t)), {}), + Ts = e => new Promise((t => { + if (e.duration === 1 / 0) return e.ontimeupdate = () => { + e.ontimeupdate = void 0, t(e) + }, void(e.currentTime = Number.MAX_SAFE_INTEGER); + t(e) + })); +const Ms = ({ + imageDataResizer: e, + canvasMemoryLimit: t +} = {}) => async (o, i, r, n, a) => { + r.width = Math.max(r.width, 1), r.height = Math.max(r.height, 1), n.width = Math.max(n.width, 1), n.height = Math.max(n.height, 1); + const { + dest: s + } = await Ss(i, { + imageReader: ol(), + imageWriter: rl({ + format: "canvas", + targetSize: { + ...n, + upscale: !0 + }, + imageDataResizer: e, + canvasMemoryLimit: t + }), + imageCrop: r + }), { + feather: l = 0 + } = a || {}; + if (l > 0) { + const e = p("canvas"); + e.width = s.width, e.height = s.height; + const t = e.getContext("2d", { + willReadFrequently: !0 + }), + o = 1 / l; + let i = 0; + for (i = 0; i < l; i++) { + const e = i * o; + t.strokeStyle = `rgba(0,0,0,${e*e})`, t.strokeRect(i + .5, i + .5, s.width - 2 * i - 1, s.height - 2 * i - 1) + } + t.fillStyle = "#000", t.fillRect(i, i, s.width + .5 - 2 * i, s.height + .5 - 2 * i); + const r = s.getContext("2d"); + r.globalCompositeOperation = "destination-in", r.drawImage(e, 0, 0), g(e) + } + o.drawImage(s, n.x, n.y, n.width, n.height), g(s) +}, Rs = (e, t = ((...e) => e), o) => async (i, r, n) => { + n(eo(0, !1)); + let a = !1; + const s = await e(...t(i, r, (e => { + a = !0, n(e) + }))); + return o && o(i, s), a || n(eo(1, !1)), i +}, Ps = ({ + willRequest: e, + srcProp: t = "src", + destProp: o = "dest" +} = {}) => [Rs(co, ((o, i, r) => [o[t], r, { + ...i, + willRequest: e +}]), ((e, t) => e[o] = t)), "any-to-file"], Es = ({ + srcProp: e = "dest", + destProp: t = "dest" +} = {}) => [Rs((async e => { + if (/octet-stream/.test(e.type)) { + console.warn(`Pintura: File has unknown mime type "${e.type}", make sure your server sets the correct Content-Type header.`); + let t = "image"; + const o = await qt(e); + /video/i.test(o.nodeName) && (t = "video"); + const i = { + type: t + "/unknown" + }; + return Bt(e) ? new File([e], e.name, { + ...i, + lastModified: e.lastModified + }) : new Blob([e], i) + } + return e +}), (t => [t[e]]), ((e, o) => e[t] = o)), "any-to-file"], Is = ({ + srcProp: e = "src", + destProp: t = "size" +} = {}) => [Rs(Jt, (t => [t[e]]), ((e, o) => e[t] = o)), "read-image-size"], As = async e => { + const t = await qt(e); + if (Kt(t)) return await (e => new Promise(((t, o) => { + const i = () => { + Ts(e).then((() => { + t(e.duration) + })) + }; + if (e.readyState >= 1) return i(); + e.onloadedmetadata = i, e.onerror = () => o(e.error) + })))(t) +}, Ls = ({ + srcProp: e = "src", + destProp: t = "duration" +} = {}) => [Rs(As, (t => [t[e]]), ((e, o) => e[t] = o)), "read-media-duration"], zs = ({ + srcSize: e = "size", + srcOrientation: t = "orientation", + destSize: o = "size" +} = {}) => [Rs(go, (o => [o[e], o[t]]), ((e, t) => e[o] = t)), "image-size-match-orientation"], Fs = ({ + srcProp: e = "src", + destProp: t = "head" +} = {}) => [Rs(((e, t) => $o(e) ? a(e, t) : void 0), (t => [t[e], + [0, 262144], onprogress +]), ((e, o) => e[t] = o)), "read-image-head"], Os = ({ + srcProp: e = "head", + destProp: t = "orientation" +} = {}) => [Rs(o, (t => [t[e], 274]), ((e, o = 1) => e[t] = o)), "read-exif-orientation-tag"], Ds = ({ + srcProp: e = "head" +} = {}) => [Rs(o, (t => [t[e], 274, 1])), "clear-exif-orientation-tag"], Bs = ({ + srcImageSize: e = "size", + srcCanvasSize: t = "imageData", + srcImageState: o = "imageState", + destImageSize: i = "size", + destScalar: r = "scalar" +} = {}) => [Rs(((e, t) => [Math.min(t.width / e.width, t.height / e.height), Le(t)]), (i => [i[e], i[t], i[o]]), ((e, [t, o]) => { + e[r] = t, e[i] = o +})), "calculate-canvas-scalar"], Ws = ({ + srcProp: e = "src", + destProp: t = "imageData", + canvasMemoryLimit: o +} = {}) => [Rs(z, (t => [t[e], o]), ((e, o) => e[t] = o)), "blob-to-image-data"], Vs = ({ + srcImageData: e = "imageData", + srcOrientation: t = "orientation" +} = {}) => [Rs(w, (o => [o[e], o[t]]), ((e, t) => e.imageData = t)), "image-data-match-orientation"], _s = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState" +} = {}) => [Rs(Hr, (o => [o[e], { + backgroundColor: o[t].backgroundColor, + backgroundImage: o[t].backgroundImage +}]), ((e, t) => e.imageData = t)), "image-data-fill"], Ns = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destScalar: o = "scalar" +} = {}) => [Rs(xo, (i => { + const r = i[o]; + let { + crop: n + } = i[t]; + return n && 1 !== r && (n = at(Ye(n), r, le())), [i[e], { + crop: n, + rotation: i[t].rotation, + flipX: i[t].flipX, + flipY: i[t].flipY + }] +}), ((e, t) => e.imageData = t)), "image-data-crop"], Hs = ({ + targetSize: e = { + width: void 0, + height: void 0, + fit: void 0, + upscale: void 0 + }, + imageDataResizer: t, + srcProp: o = "imageData", + srcImageState: i = "imageState", + destImageScaledSize: r = "imageScaledSize" +}) => [Rs(So, (r => { + const n = Math.min(e.width || Number.MAX_SAFE_INTEGER, r[i].targetSize && r[i].targetSize.width || Number.MAX_SAFE_INTEGER), + a = Math.min(e.height || Number.MAX_SAFE_INTEGER, r[i].targetSize && r[i].targetSize.height || Number.MAX_SAFE_INTEGER); + return [r[o], { + width: n, + height: a, + fit: e.fit || "contain", + upscale: (s = r[i], !!(s.targetSize && s.targetSize.width || s.targetSize && s.targetSize.height) || (e.upscale || !1)) + }, t]; + var s +}), ((e, t) => { + Be(e.imageData, t) || (e[r] = Le(t)), e.imageData = t +})), "image-data-resize"], js = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destImageData: o = "imageData" +} = {}) => [Rs(Po, (o => { + const { + colorMatrix: i + } = o[t], r = i && Object.keys(i).map((e => i[e])).filter(Boolean); + return [o[e], { + colorMatrix: r && jr(r), + convolutionMatrix: o[t].convolutionMatrix, + gamma: o[t].gamma, + noise: o[t].noise, + vignette: o[t].vignette + }] +}), ((e, t) => e[o] = t)), "image-data-filter"], Us = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destImageData: o = "imageData", + destScalar: i = "scalar" +} = {}) => [Rs((async (e, t, o, i, r, n) => { + if (!t || !i.length) return e; + let a; + try { + const r = { + dataSizeScalar: Ur(e, i) + }; + o && o[3] > 0 && (r.backgroundColor = [...o]), a = await t(e, r) + } catch (e) {} + const s = p("canvas"); + s.width = e.width, s.height = e.height; + const l = s.getContext("2d", { + willReadFrequently: !0 + }); + if (l.putImageData(e, 0, 0), "auto" === n) { + const t = Math.sqrt(e.width * e.height); + l.filter = `blur(${Math.round(t/100)}px)` + } + const c = new Path2D; + i.forEach((e => { + const t = it(e.x, e.y, e.width, e.height); + ct(t, r); + const o = mt(Ye(t), e.rotation), + i = new Path2D; + o.forEach(((e, t) => { + if (0 === t) return i.moveTo(e.x, e.y); + i.lineTo(e.x, e.y) + })), c.addPath(i) + })), l.clip(c, "nonzero"), l.imageSmoothingEnabled = !1, l.drawImage(a, 0, 0, s.width, s.height), g(a); + const d = l.getImageData(0, 0, s.width, s.height); + return g(s), d +}), ((o, { + imageScrambler: r, + redactionRenderStyle: n +}) => [o[e], r, o[t].backgroundColor, o[t].redaction, o[i], n]), ((e, t) => e[o] = t)), "image-data-redact"], Gs = ({ + srcImageData: e = "imageData", + srcSize: t = "size", + srcImageState: o = "imageState", + srcShapes: i = "annotation", + destImageData: r = "imageData", + destImageScaledSize: n = "imageScaledSize", + destScalar: a = "scalar", + imageDataResizer: s, + canvasMemoryLimit: l +} = {}) => [Rs(Nr, ((r, { + shapePreprocessor: c, + willRequestResource: d, + willRequest: u +}) => { + const h = r[o][i]; + if (!h.length) return [r[e]]; + const p = r[a], + { + crop: m + } = r[o], + g = r[t]; + let $ = p; + const f = r[n]; + f && ($ = Math.min(f.width / m.width, f.height / m.height)); + const y = { + width: g.width / p, + height: g.height / p + }; + return [r[e], { + shapes: h, + computeShape: e => (e = ur(e, y), e = Cs(e, ["left", "right", "top", "bottom"]), e = br(e, $)), + transform: e => { + const i = r[t], + { + rotation: s = 0, + flipX: l, + flipY: c, + cropLimitToImage: d + } = r[o], + u = r[a], + { + crop: h = Ke(i) + } = r[o], + p = r[n], + m = p ? Math.min(p.width / h.width, p.height / h.height) : 1, + g = { + width: i.width / u * m, + height: i.height / u * m + }, + $ = Ot(g, s), + f = $.width, + y = $.height, + b = .5 * g.width - .5 * f, + x = .5 * g.height - .5 * y, + v = Ve(g); + e.translate(-b, -x), e.translate(-h.x * m, -h.y * m), e.translate(v.x, v.y), e.rotate(s), e.translate(-v.x, -v.y), e.scale(l ? -1 : 1, c ? -1 : 1), e.translate(l ? -g.width : 0, c ? -g.height : 0), d && (e.rect(0, 0, g.width, g.height), e.clip()) + }, + drawImage: Ms({ + imageDataResizer: s, + canvasMemoryLimit: l + }), + preprocessShape: e => c(e, { + isPreview: !1, + ...r[o] + }), + canvasMemoryLimit: l, + willRequest: u || d + }] +}), ((e, t) => e[r] = t)), "image-data-annotate"], Zs = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destImageData: o = "imageData", + destImageScaledSize: i = "imageScaledSize", + imageDataResizer: r, + canvasMemoryLimit: n, + destScalar: a = "scalar" +} = {}) => [Rs(Nr, ((o, { + shapePreprocessor: s, + willRequestResource: l, + willRequest: c +}) => { + let { + decoration: d + } = o[t]; + if ("undefined" != typeof window && (e => { + if (e && e._clpdx4s) return; + const [i] = [ + [85, 110, 108, 105, 99, 101, 110, 115, 101, 100, 32, 80, 105, 110, 116, 117, 114, 97, 32, 105, 110, 115, 116, 97, 110, 99, 101, 32] + ].map((e => e.map((e => String.fromCharCode(e))).join(""))), { + width: r, + height: n + } = o[t].crop, a = n / 15; + d = [...d, { + x: .5 * -a, + y: .5 * -a, + width: 1.5 * r, + height: 1.25 * n, + text: Array(50).fill(i).join(""), + fontWeight: 900, + lineHeight: a, + fontSize: a, + color: [1, 1, 1, .05] + }] + })(window), !d.length) return [o[e]]; + let u = o[a]; + const { + crop: h + } = o[t], p = o[i]; + if (p) { + const e = Math.min(p.width / h.width, p.height / h.height); + u = e + } + return [o[e], { + shapes: d, + drawImage: Ms({ + imageDataResizer: r, + canvasMemoryLimit: n + }), + computeShape: e => (e = ur(e, h), e = Cs(e, ["left", "right", "top", "bottom"]), e = br(e, u)), + preprocessShape: e => s(e, { + isPreview: !1, + ...o[t] + }), + canvasMemoryLimit: n, + willRequest: c || l + }] +}), ((e, t) => e[o] = t)), "image-data-decorate"], Xs = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destImageData: o = "imageData", + destImageScaledSize: i = "imageScaledSize", + imageDataResizer: r, + canvasMemoryLimit: n, + destScalar: a = "scalar" +} = {}) => [Rs(Nr, ((o, { + shapePreprocessor: s, + willRequestResource: l, + willRequest: c +}) => { + const d = o[t].frame; + if (!d) return [o[e]]; + const u = o[a]; + let { + crop: h + } = o[t]; + h && 1 !== u && (h = at(Ye(h), u, le())); + const p = { + ...h + }, + m = $r(fr(d, p, s), p); + p.x = Math.abs(m.left), p.y = Math.abs(m.top), p.width += Math.abs(m.left) + Math.abs(m.right), p.height += Math.abs(m.top) + Math.abs(m.bottom); + const g = o[i], + $ = g ? Math.min(g.width / h.width, g.height / h.height) : 1; + return ct(p, $), p.x = Math.floor(p.x), p.y = Math.floor(p.y), p.width = Math.floor(p.width), p.height = Math.floor(p.height), [o[e], { + shapes: [d], + contextBounds: p, + computeShape: t => ur(t, o[e]), + transform: e => { + e.translate(p.x, p.y) + }, + drawImage: Ms({ + imageDataResizer: r, + canvasMemoryLimit: n + }), + preprocessShape: e => s(e, { + isPreview: !1, + ...o[t] + }), + canvasMemoryLimit: n, + willRequest: c || l + }] +}), ((e, t) => e[o] = t)), "image-data-frame"], Ys = ({ + mimeType: e, + quality: t, + srcImageData: o = "imageData", + srcFile: i = "src", + destBlob: r = "blob" +} = {}) => [Rs(O, (r => [r[o], e || _(r[i].name) || r[i].type, t]), ((e, t) => e[r] = t)), "image-data-to-blob"], qs = ({ + srcImageData: e = "imageData", + srcOrientation: t = "orientation", + destCanvas: o = "dest" +} = {}) => [Rs(v, (o => [o[e], o[t]]), ((e, t) => e[o] = t)), "image-data-to-canvas"], Ks = async (e, o) => { + if (!$o(e) || !o) return e; + const i = new DataView(o), + r = t(i); + if (!r || !r.exif) return e; + const n = ["exif", "mpf", "xmp"].reduce(((e, t) => r[t] ? Math.max(e, r[t].offset + r[t].size) : e), 0); + return ((e, t, o = [0, e.size]) => t ? new Blob([t, e.slice(...o)], { + type: e.type + }) : e)(e, o.slice(0, n + 2), [20]) +}, Js = (e = "blob", t = "head", o = "blob") => [Rs(Ks, (o => [o[e], o[t]]), ((e, t) => e[o] = t)), "blob-write-image-head"], Qs = ({ + renameFile: e, + srcBlob: t = "blob", + srcFile: o = "src", + destFile: i = "dest", + defaultFilename: r +} = {}) => [Rs(N, (i => [i[t], e ? e(i[o]) : i[o].name || `${r}.${B(i[t].type)}`]), ((e, t) => e[i] = t)), "blob-to-file"], el = ({ + url: e = "./", + dataset: t = (e => [ + ["dest", e.dest, e.dest.name], + ["imageState", e.imageState] + ]), + destStore: o = "store", + credentials: i, + headers: n = {} +}) => [Rs((async (t, o) => await ((e, t, o) => new Promise(((i, n) => { + const { + token: a = {}, + beforeSend: s = r, + onprogress: l = r + } = o; + a.cancel = () => c.abort(); + const c = new XMLHttpRequest; + c.upload.onprogress = l, c.onload = () => c.status >= 200 && c.status < 300 ? i(c) : n(c), c.onerror = () => n(c), c.ontimeout = () => n(c), c.open("POST", encodeURI(e)), s(c), c.send(t instanceof FormData ? t : t.reduce(((e, t) => (e.append(...t.map(fo)), e)), new FormData)) +})))(e, t, { + onprogress: o, + beforeSend: e => no(e, { + headers: n, + credentials: i + }) +})), ((e, o, i) => [t(e), i]), ((e, t) => e[o] = t)), "store"], tl = e => [Rs((t => e && e.length ? (Object.keys(t).forEach((o => { + e.includes(o) || delete t[o] +})), t) : t)), "prop-filter"], ol = (e = {}) => { + const { + orientImage: t = !0, + outputProps: o = ["src", "dest", "size", "duration"], + preprocessImageFile: i, + request: r = {} + } = e; + return [Ps({ + willRequest: () => r + }), Es(), i && [Rs(i, ((e, t, o) => [e.dest, t, o]), ((e, t) => e.dest = t)), "preprocess-image-file"], Is({ + srcProp: "dest" + }), Ls({ + srcProp: "dest" + }), t && Fs({ + srcProp: "dest" + }), t && Os(), t && zs(), tl(o)].filter(Boolean) +}, il = e => e && (T(e) ? el({ + url: e +}) : M(e) ? [e, "store"] : el(e)), rl = (e = {}) => (t, o, i = {}) => { + if (!Yt(t)) return; + let { + canvasMemoryLimit: r = ks(), + orientImage: n = !0, + copyImageHead: a = !0, + mimeType: s, + quality: l, + renameFile: c, + targetSize: d, + imageDataResizer: u, + store: h, + format: p = "file", + outputProps: m = ["src", "dest", "imageState", "store"], + preprocessImageSource: g, + preprocessImageState: $, + postprocessImageData: f, + postprocessImageBlob: y + } = { + ...e, + ...i + }; + console.log('ppp', p); + return "blob" === p && (p = "file"), [g && [Rs(g, ((e, t, o) => [e.src, t, o, e.imageState]), ((e, t) => e.src = t)), "preprocess-image-source"], (n || a) && Fs(), n && Os(), Is(), $ && [Rs($, ((e, t, o, i) => [e.imageState, t, o, { + size: e.size, + orientation: e.orientation + }]), ((e, t) => e.imageState = t)), "preprocess-image-state"], Ws({ + canvasMemoryLimit: r + }), n && zs(), n && Vs(), Bs(), Us(), Ns(), Hs({ + imageDataResizer: u, + targetSize: d + }), Gs({ + imageDataResizer: u, + canvasMemoryLimit: r, + srcShapes: "manipulation" + }), js(), _s(), Gs({ + imageDataResizer: u, + canvasMemoryLimit: r, + srcShapes: "annotation" + }), Zs({ + imageDataResizer: u, + canvasMemoryLimit: r + }), Xs({ + imageDataResizer: u, + canvasMemoryLimit: r + }), f && [Rs(f, ((e, t, o) => [e.imageData, t, o]), ((e, t) => e.imageData = t)), "postprocess-image-data"], "file" === p ? Ys({ + mimeType: s, + quality: l + }) : "canvas" === p ? qs() : [e => (e.dest = e.imageData, e)], "file" === p && n && Ds(), "file" === p && a && Js(), y && [Rs(y, (({ + blob: e, + imageData: t, + src: o + }, i, r) => [{ + blob: e, + imageData: t, + src: o + }, i, r]), ((e, t) => e.blob = t)), "postprocess-image-file"], "file" === p && Qs({ + defaultFilename: "image", + renameFile: c + }), "file" === p ? il(h) : M(h) && [h, "store"], tl(m)].filter(Boolean) +}; +var nl = (e, t, o, i, r, n, a, s, l, c, d) => { + if (!(e && t && o && i && s)) return; + s *= n; + const u = St(Ye(t)), + h = rt(u), + p = rt(e), + m = Ke(o), + g = rt(m), + $ = is(o, i, l), + f = rt($), + y = xe(ue(g), f), + b = xe(ue(p), h); + y.x += b.x, y.y += b.y; + const x = he(ue(y)); + x.x += b.x, x.y += b.y; + const v = rt(nt(nt(Ye(r), a), e)), + w = xe(v, p); + return be(y, w), { + origin: x, + translation: y, + rotation: { + x: d ? Math.PI : 0, + y: c ? Math.PI : 0, + z: l + }, + scale: s + } +}; +let al = null; +var sl = () => { + if (null === al) + if ("WebGL2RenderingContext" in window) { + let e; + try { + e = p("canvas"), al = !!e.getContext("webgl2") + } catch (e) { + al = !1 + } + e && g(e), e = void 0 + } else al = !1; + return al + }, + ll = e => 0 == (e & e - 1), + cl = (e, t = {}, o = "", i = "") => Object.keys(t).filter((e => !S(t[e]))).reduce(((e, r) => e.replace(new RegExp(o + r + i), t[r])), e); +const dl = { + head: "#version 300 es\n\nin vec4 aPosition;uniform mat4 uMatrix;", + text: "\nin vec2 aTexCoord;out vec2 vTexCoord;", + matrix: "\ngl_Position=uMatrix*vec4(aPosition.x,aPosition.y,0,1);" + }, + ul = { + head: "#version 300 es\nprecision highp float;\n\nout vec4 fragColor;", + mask: "\nuniform float uMaskFeather[8];uniform float uMaskBounds[4];uniform float uMaskOpacity;float mask(float x,float y,float bounds[4],float opacity){return 1.0-(1.0-(smoothstep(bounds[3],bounds[3]+1.0,x)*(1.0-smoothstep(bounds[1]-1.0,bounds[1],x))*(1.0-step(bounds[0],y))*step(bounds[2],y)))*(1.0-opacity);}", + init: "\nfloat a=1.0;vec4 fillColor=uColor;vec4 textureColor=texture(uTexture,vTexCoord);textureColor*=(1.0-step(uRepeat.y,vTexCoord.y))*step(0.0,vTexCoord.y)*(1.0-step(uRepeat.x,vTexCoord.x))*step(0.0,vTexCoord.x);", + colorize: "\nif(uTextureColor.a!=0.0&&textureColor.a>0.0){vec3 colorFlattened=textureColor.rgb/textureColor.a;if(colorFlattened.r>=.9999&&colorFlattened.g==0.0&&colorFlattened.b>=.9999){textureColor.rgb=uTextureColor.rgb*textureColor.a;}textureColor*=uTextureColor.a;}", + maskapply: "\nfloat m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);", + maskfeatherapply: "\nfloat leftFeatherOpacity=step(uMaskFeather[1],gl_FragCoord.x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],gl_FragCoord.x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],gl_FragCoord.x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],gl_FragCoord.x));a*=leftFeatherOpacity*rightFeatherOpacity;", + rectaa: "\nvec2 scaledPoint=vec2(vRectCoord.x*uSize.x,vRectCoord.y*uSize.y);a*=smoothstep(0.0,uEdgeFeather,uSize.x-scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,uSize.y-scaledPoint.y);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.y);", + cornerradius: "\nvec2 s=(uSize-2.0)*.5;vec2 r=(vRectCoord*uSize)-1.0;vec2 p=r-s;float cornerRadius=uCornerRadius[0];bool left=r.x { + const i = e.createShader(o), + r = ((e, t, o) => (t = cl(t, o === e.VERTEX_SHADER ? dl : ul, "##").trim(), sl() ? t : (t = (t = t.replace(/#version.+/gm, "").trim()).replace(/^\/\/\#/gm, "#"), o === e.VERTEX_SHADER && (t = t.replace(/in /gm, "attribute ").replace(/out /g, "varying ")), o === e.FRAGMENT_SHADER && (t = t.replace(/in /gm, "varying ").replace(/out.*?;/gm, "").replace(/texture\(/g, "texture2D(").replace(/fragColor/g, "gl_FragColor")), "" + t)))(e, t, o); + return e.shaderSource(i, r), e.compileShader(i), e.getShaderParameter(i, e.COMPILE_STATUS) || console.error(e.getShaderInfoLog(i)), i + }, + pl = (e, t, o, i, r) => { + const n = hl(e, t, e.VERTEX_SHADER), + a = hl(e, o, e.FRAGMENT_SHADER), + s = e.createProgram(); + e.attachShader(s, n), e.attachShader(s, a), e.linkProgram(s); + const l = {}; + return i.forEach((t => { + l[t] = e.getAttribLocation(s, t) + })), r.forEach((t => { + l[t] = e.getUniformLocation(s, t) + })), { + program: s, + locations: l, + destroy() { + e.detachShader(s, n), e.detachShader(s, a), e.deleteShader(n), e.deleteShader(a), e.deleteProgram(s) + } + } + }, + ml = e => "VIDEO" !== e.nodeName && (!!sl() || ll(e.width) && ll(e.height)), + gl = (e, t, o, i) => (e.bindTexture(e.TEXTURE_2D, t), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, o), ((e, t, o) => { + e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, ml(t) ? e.LINEAR_MIPMAP_LINEAR : e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, o.filterParam), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, o.wrapParam), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, o.wrapParam), ml(t) && e.generateMipmap(e.TEXTURE_2D) + })(e, o, i), e.bindTexture(e.TEXTURE_2D, null), t), + $l = (e, t = 1) => e ? [e[0], e[1], e[2], Eo(e[3]) ? t * e[3] : t] : [0, 0, 0, 0], + fl = () => { + const e = new Float32Array(16); + return e[0] = 1, e[5] = 1, e[10] = 1, e[15] = 1, e + }, + yl = (e, t, o, i, r, n, a) => { + const s = 1 / (t - o), + l = 1 / (i - r), + c = 1 / (n - a); + e[0] = -2 * s, e[1] = 0, e[2] = 0, e[3] = 0, e[4] = 0, e[5] = -2 * l, e[6] = 0, e[7] = 0, e[8] = 0, e[9] = 0, e[10] = 2 * c, e[11] = 0, e[12] = (t + o) * s, e[13] = (r + i) * l, e[14] = (a + n) * c, e[15] = 1 + }, + bl = (e, t, o, i) => { + e[12] = e[0] * t + e[4] * o + e[8] * i + e[12], e[13] = e[1] * t + e[5] * o + e[9] * i + e[13], e[14] = e[2] * t + e[6] * o + e[10] * i + e[14], e[15] = e[3] * t + e[7] * o + e[11] * i + e[15] + }, + xl = (e, t) => { + e[0] *= t, e[1] *= t, e[2] *= t, e[3] *= t, e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t, e[8] *= t, e[9] *= t, e[10] *= t, e[11] *= t + }, + vl = (e, t) => { + const o = Math.sin(t), + i = Math.cos(t), + r = e[4], + n = e[5], + a = e[6], + s = e[7], + l = e[8], + c = e[9], + d = e[10], + u = e[11]; + e[4] = r * i + l * o, e[5] = n * i + c * o, e[6] = a * i + d * o, e[7] = s * i + u * o, e[8] = l * i - r * o, e[9] = c * i - n * o, e[10] = d * i - a * o, e[11] = u * i - s * o + }, + wl = (e, t) => { + const o = Math.sin(t), + i = Math.cos(t), + r = e[0], + n = e[1], + a = e[2], + s = e[3], + l = e[8], + c = e[9], + d = e[10], + u = e[11]; + e[0] = r * i - l * o, e[1] = n * i - c * o, e[2] = a * i - d * o, e[3] = s * i - u * o, e[8] = r * o + l * i, e[9] = n * o + c * i, e[10] = a * o + d * i, e[11] = s * o + u * i + }, + Sl = (e, t) => { + const o = Math.sin(t), + i = Math.cos(t), + r = e[0], + n = e[1], + a = e[2], + s = e[3], + l = e[4], + c = e[5], + d = e[6], + u = e[7]; + e[0] = r * i + l * o, e[1] = n * i + c * o, e[2] = a * i + d * o, e[3] = s * i + u * o, e[4] = l * i - r * o, e[5] = c * i - n * o, e[6] = d * i - a * o, e[7] = u * i - s * o + }; +var kl = e => e * Math.PI / 180, + Cl = (e, t) => sl() ? e.getContext("webgl2", t) : e.getContext("webgl", t) || e.getContext("experimental-webgl", t); +const Tl = (e, t) => { + const o = e.length; + return t >= o ? e[t % o] : t < 0 ? e[t % o + o] : e[t] + }, + Ml = (e, t, o, i) => { + const r = ce(o.x - t.x, o.y - t.y), + n = ce(i.x - o.x, i.y - o.y), + a = ce(t.x - i.x, t.y - i.y), + s = ce(e.x - t.x, e.y - t.y), + l = ce(e.x - o.x, e.y - o.y), + c = ce(e.x - i.x, e.y - i.y), + d = ke(r, s), + u = ke(n, l), + h = ke(a, c); + return d <= 0 && u <= 0 && h <= 0 + }, + Rl = e => { + if (e.length < 3) return []; + if ((e => { + const t = e.length; + for (let o = 0; o < t; o++) { + const t = je(e[o], Tl(e, o + 1)); + if (Mt(t, e, { + ignoreIdenticalLines: !0, + breakOnIntersection: !0 + })) return !0 + } + return !1 + })(e)) return []; + (e => { + let t, o, i, r, n, a = 0; + const s = e.length; + for (t = 0; t < s; t++) o = e[t], i = e[(t + 1) % s], r = i.x - o.x, n = (i.y + o.y) / 2, a += r * n; + return a + })(e) < 0 && e.reverse(); + const t = e.length, + o = [...Array(t).keys()], + i = []; + let r, n, a, s, l, c, d, u, h, p, m, g, $ = 128; + for (; o.length > 3;) { + if ($ <= 0) return []; + for ($--, r = 0; r < o.length; r++) + if (a = o[r], s = Tl(o, r - 1), l = Tl(o, r + 1), c = e[a], d = e[s], u = e[l], h = ce(d.x - c.x, d.y - c.y), p = ce(u.x - c.x, u.y - c.y), !(ke(h, p) < 0)) { + for (m = !0, n = 0; n < t; n++) + if (n !== a && n !== s && n !== l && (g = e[n], Ml(g, d, c, u))) { + m = !1; + break + } if (m) { + i.push([d, c, u]), o.splice(r, 1); + break + } + } + } + return i.push([e[o[0]], e[o[1]], e[o[2]]]), i + }, + Pl = (e, t, o, i, r) => { + const n = ge(ce(i.x - o.x, i.y - o.y)), + a = ge(ce(r.x - i.x, r.y - i.y)), + s = ge(ce(n.x + a.x, n.y + a.y)), + l = ce(-s.y, s.x), + c = ce(-n.y, n.x), + d = Math.min(1 / Se(l, c), 5); + e[t] = i.x, e[t + 1] = i.y, e[t + 2] = l.x * d, e[t + 3] = l.y * d, e[t + 4] = -1, e[t + 5] = i.x, e[t + 6] = i.y, e[t + 7] = l.x * d, e[t + 8] = l.y * d, e[t + 9] = 1 + }, + El = e => { + const t = new Float32Array(8); + return t[0] = e[3].x, t[1] = e[3].y, t[2] = e[0].x, t[3] = e[0].y, t[4] = e[2].x, t[5] = e[2].y, t[6] = e[1].x, t[7] = e[1].y, t + }, + Il = (e, t = 0, o, i) => { + const r = xt(e), + n = e.x + .5 * e.width, + a = e.y + .5 * e.height; + return (o || i) && Pe(r, o, i, n, a), 0 !== t && Ee(r, t, n, a), r + }, + Al = (e, t, o, i, r) => { + const n = Math.min(20, Math.max(4, Math.round(i / 2))); + let a = 0, + s = 0, + l = 0, + c = 0, + d = 0; + for (; d < n; d++) a = d / n, s = r * G + a * G, l = i * Math.cos(s), c = i * Math.sin(s), e.push(ce(t + l, o + c)) + }; +let Ll = null; +var zl = () => { + if (null !== Ll) return Ll; + let e = p("canvas"); + const t = Cl(e); + return Ll = t ? t.getParameter(t.MAX_TEXTURE_SIZE) : void 0, g(e), e = void 0, Ll + }, + Fl = () => c() && !!window.chrome; +const Ol = new Float32Array([0, 1, 0, 0, 1, 1, 1, 0]), + Dl = new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]), + Bl = c() && Xo(), + Wl = [0, 0, 0, 0, 1, 0, 0, 0, 0], + Vl = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], + _l = [0, 0, 0, 0], + Nl = [0, 0, 0, 0], + Hl = (e, t, o, i, r) => { + if (!o || !i) return Ol; + let n = i.x / o.width, + a = i.y / o.height, + s = e / o.width / r, + l = t / o.height / r; + s -= n, l -= a; + return new Float32Array([-n, l, -n, -a, s, l, s, -a]) + }; +var jl = (e, t = {}) => { + const { + alpha: o = !1 + } = t, i = { + width: 0, + height: 0 + }, r = { + width: 0, + height: 0 + }, n = zl() || 1024; + let a, s, l; + const c = fl(), + d = fl(); + let u, h, p, m, $, f, y, b, x, v = 0, + w = 0, + S = 0, + k = 1; + const C = new Map([]), + T = () => { + P.stencilOp(P.KEEP, P.KEEP, P.KEEP), P.stencilFunc(P.ALWAYS, 1, 255), P.stencilMask(255) + }, + M = kl(30), + R = Math.tan(M / 2), + P = Cl(e, { + alpha: o, + antialias: !1, + premultipliedAlpha: !0, + stencil: !0 + }); + if (!P) return; + P.getExtension("OES_standard_derivatives"), P.disable(P.DEPTH_TEST), P.enable(P.STENCIL_TEST), P.enable(P.BLEND), P.blendFunc(P.ONE, P.ONE_MINUS_SRC_ALPHA), P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !(!o && Xo())), T(); + const E = P.createTexture(); + P.bindTexture(P.TEXTURE_2D, E), P.texImage2D(P.TEXTURE_2D, 0, P.RGBA, 1, 1, 0, P.RGBA, P.UNSIGNED_BYTE, new Uint8Array(_l)), C.set(0, E); + const I = P.createTexture(); + C.set(2, I); + const A = P.createFramebuffer(), + L = P.createTexture(); + C.set(1, L); + const z = P.createFramebuffer(), + F = pl(P, "\n##head\n##text\nvoid main(){vTexCoord=aTexCoord;gl_Position=uMatrix*aPosition;}", "\n##head\nin vec2 vTexCoord;uniform sampler2D uTexture;uniform sampler2D uTextureOverlay;uniform sampler2D uTextureBlend;uniform vec2 uTextureSize;uniform float uOpacity;uniform int uAntialias;uniform vec4 uOverlayColor;uniform mat4 uColorMatrix;uniform vec4 uColorOffset;uniform float uClarityKernel[9];uniform float uClarityKernelWeight;uniform float uColorGamma;uniform float uColorVignette;uniform float uMaskClip;uniform float uMaskOpacity;uniform float uMaskBounds[4];uniform float uMaskCornerRadius[4];uniform float uMaskFeather[8];vec4 applyGamma(vec4 c,float g){c.r=pow(c.r,g);c.g=pow(c.g,g);c.b=pow(c.b,g);return c;}vec4 applyColorMatrix(vec4 c,mat4 m,vec4 o){return(c*m)+(o*c.a);}vec4 applyConvolutionMatrix(vec4 c,float k0,float k1,float k2,float k3,float k4,float k5,float k6,float k7,float k8,float w){vec2 pixel=vec2(1)/uTextureSize;vec4 colorSum=texture(uTexture,vTexCoord-pixel)*k0+texture(uTexture,vTexCoord+pixel*vec2(0.0,-1.0))*k1+texture(uTexture,vTexCoord+pixel*vec2(1.0,-1.0))*k2+texture(uTexture,vTexCoord+pixel*vec2(-1.0,0.0))*k3+texture(uTexture,vTexCoord)*k4+texture(uTexture,vTexCoord+pixel*vec2(1.0,0.0))*k5+texture(uTexture,vTexCoord+pixel*vec2(-1.0,1.0))*k6+texture(uTexture,vTexCoord+pixel*vec2(0.0,1.0))*k7+texture(uTexture,vTexCoord+pixel)*k8;vec4 color=vec4(clamp((colorSum/w),0.0,1.0).rgb,c.a);return color;}vec4 applyVignette(vec4 c,vec2 pos,vec2 center,float v){float d=distance(pos,center)/length(center);float f=1.0-(d*abs(v));if(v>0.0){c.rgb*=f;}else if(v<0.0){c.rgb+=(1.0-f)*(1.0-c.rgb);}return c;}vec4 blendPremultipliedAlpha(vec4 back,vec4 front){return front+(back*(1.0-front.a));}void main(){float x=gl_FragCoord.x;float y=gl_FragCoord.y;float a=1.0;float maskTop=uMaskBounds[0];float maskRight=uMaskBounds[1];float maskBottom=uMaskBounds[2];float maskLeft=uMaskBounds[3];float leftFeatherOpacity=step(uMaskFeather[1],x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],x));a*=leftFeatherOpacity*rightFeatherOpacity;float overlayColorAlpha=(smoothstep(maskLeft,maskLeft+1.0,x)*(1.0-smoothstep(maskRight-1.0,maskRight,x))*(1.0-step(maskTop,y))*step(maskBottom,y));if(uOverlayColor.a==0.0){a*=overlayColorAlpha;}vec2 offset=vec2(maskLeft,maskBottom);vec2 size=vec2(maskRight-maskLeft,maskTop-maskBottom)*.5;vec2 center=offset.xy+size.xy;int pixelX=int(step(center.x,x));int pixelY=int(step(y,center.y));float cornerRadius=0.0;if(pixelX==0&&pixelY==0)cornerRadius=uMaskCornerRadius[0];if(pixelX==1&&pixelY==0)cornerRadius=uMaskCornerRadius[1];if(pixelX==0&&pixelY==1)cornerRadius=uMaskCornerRadius[2];if(pixelX==1&&pixelY==1)cornerRadius=uMaskCornerRadius[3];float cornerOffset=sign(cornerRadius)*length(max(abs(gl_FragCoord.xy-size-offset)-size+cornerRadius,0.0))-cornerRadius;float cornerOpacity=1.0-smoothstep(0.0,1.0,cornerOffset);a*=cornerOpacity;if(uAntialias==1){vec2 scaledPoint=vec2(vTexCoord.x*uTextureSize.x,vTexCoord.y*uTextureSize.y);a*=smoothstep(0.0,1.0,uTextureSize.x-scaledPoint.x);a*=smoothstep(0.0,1.0,uTextureSize.y-scaledPoint.y);a*=smoothstep(0.0,1.0,scaledPoint.x);a*=smoothstep(0.0,1.0,scaledPoint.y);}vec4 color=texture(uTexture,vTexCoord);if(uClarityKernelWeight!=-1.0){color=applyConvolutionMatrix(color,uClarityKernel[0],uClarityKernel[1],uClarityKernel[2],uClarityKernel[3],uClarityKernel[4],uClarityKernel[5],uClarityKernel[6],uClarityKernel[7],uClarityKernel[8],uClarityKernelWeight);}color=blendPremultipliedAlpha(color,texture(uTextureBlend,vTexCoord));color=applyGamma(color,uColorGamma);color=applyColorMatrix(color,uColorMatrix,uColorOffset);color*=a;if(uColorVignette!=0.0){vec2 pos=gl_FragCoord.xy-offset;color=applyVignette(color,pos,center-offset,uColorVignette);}color=blendPremultipliedAlpha(color,texture(uTextureOverlay,vTexCoord));if(overlayColorAlpha<=0.0){color*=1.0-uOverlayColor.a;}color*=uOpacity;fragColor=color;}", ["aPosition", "aTexCoord"], ["uMatrix", "uTexture", "uTextureBlend", "uTextureOverlay", "uTextureSize", "uColorGamma", "uColorVignette", "uColorOffset", "uColorMatrix", "uClarityKernel", "uClarityKernelWeight", "uOpacity", "uMaskOpacity", "uMaskBounds", "uMaskCornerRadius", "uMaskFeather", "uOverlayColor", "uAntialias"]), + O = P.createBuffer(), + D = P.createBuffer(); + P.bindBuffer(P.ARRAY_BUFFER, D), P.bufferData(P.ARRAY_BUFFER, Ol, P.STATIC_DRAW); + const B = P.createBuffer(); + P.bindBuffer(P.ARRAY_BUFFER, B), P.bufferData(P.ARRAY_BUFFER, Dl, P.STATIC_DRAW); + const W = pl(P, "#version 300 es\n\nin vec4 aPosition;in vec2 aNormal;in float aMiter;out vec2 vNormal;out float vMiter;out float vWidth;uniform float uWidth;uniform float uSharpness;uniform mat4 uMatrix;void main(){vMiter=aMiter;vNormal=aNormal;vWidth=(uWidth*.5)+uSharpness;gl_Position=uMatrix*vec4(aPosition.x+(aNormal.x*vWidth*aMiter),aPosition.y+(aNormal.y*vWidth*aMiter),0,1);}", "\n##head\n##mask\nin vec2 vNormal;in float vMiter;in float vWidth;uniform float uWidth;uniform vec4 uColor;uniform vec4 uCanvasColor;void main(){vec4 fillColor=uColor;float m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);if(m<=0.0)discard;fillColor.a*=clamp(smoothstep(vWidth-.5,vWidth-1.0,abs(vMiter)*vWidth),0.0,1.0);fillColor.rgb*=fillColor.a;fillColor.rgb*=m;fillColor.rgb+=(1.0-m)*(uCanvasColor.rgb*fillColor.a);fragColor=fillColor;}", ["aPosition", "aNormal", "aMiter"], ["uColor", "uCanvasColor", "uMatrix", "uWidth", "uSharpness", "uMaskBounds", "uMaskOpacity"]), + V = P.createBuffer(); + Fl() && (P.bindBuffer(P.ARRAY_BUFFER, V), P.bufferData(P.ARRAY_BUFFER, 1, P.DYNAMIC_DRAW)); + const _ = (e, t, o, i = !1) => { + const { + program: r, + locations: n + } = W; + P.useProgram(r), P.enableVertexAttribArray(n.aPosition), P.enableVertexAttribArray(n.aNormal), P.enableVertexAttribArray(n.aMiter); + const a = ((e, t) => { + let o, i, r, n = 0; + const a = e.length, + s = new Float32Array(10 * (t ? a + 1 : a)), + l = e[0], + c = e[a - 1]; + for (n = 0; n < a; n++) o = e[n - 1], i = e[n], r = e[n + 1], o || (o = t ? c : ce(i.x + (i.x - r.x), i.y + (i.y - r.y))), r || (r = t ? l : ce(i.x + (i.x - o.x), i.y + (i.y - o.y))), Pl(s, 10 * n, o, i, r); + return t && Pl(s, 10 * a, c, l, e[1]), s + })(e, i), + s = 5 * Float32Array.BYTES_PER_ELEMENT, + c = 2 * Float32Array.BYTES_PER_ELEMENT, + d = 4 * Float32Array.BYTES_PER_ELEMENT; + P.uniform1f(n.uWidth, t), P.uniform1f(n.uSharpness, l), P.uniform4fv(n.uColor, o), P.uniformMatrix4fv(n.uMatrix, !1, u), P.uniform4f(n.uCanvasColor, v, w, S, k), P.uniform1fv(n.uMaskBounds, y), P.uniform1f(n.uMaskOpacity, f), P.bindBuffer(P.ARRAY_BUFFER, V), P.bufferData(P.ARRAY_BUFFER, a, P.STATIC_DRAW), P.vertexAttribPointer(n.aPosition, 2, P.FLOAT, !1, s, 0), P.vertexAttribPointer(n.aNormal, 2, P.FLOAT, !1, s, c), P.vertexAttribPointer(n.aMiter, 1, P.FLOAT, !1, s, d), P.drawArrays(P.TRIANGLE_STRIP, 0, a.length / 5), P.disableVertexAttribArray(n.aPosition), P.disableVertexAttribArray(n.aNormal), P.disableVertexAttribArray(n.aMiter) + }, + N = pl(P, "\n##head\nvoid main(){\n##matrix\n}", "\n##head\n##mask\nuniform vec4 uColor;uniform vec4 uCanvasColor;void main(){vec4 fillColor=uColor;\n##maskapply\nfillColor.rgb*=fillColor.a;fillColor.rgb*=m;fillColor.rgb+=(1.0-m)*(uCanvasColor.rgb*fillColor.a);fragColor=fillColor;}", ["aPosition"], ["uColor", "uCanvasColor", "uMatrix", "uMaskBounds", "uMaskOpacity"]), + j = P.createBuffer(), + U = pl(P, "\n##head\n##text\nin vec2 aRectCoord;out vec2 vRectCoord;void main(){vTexCoord=aTexCoord;vRectCoord=aRectCoord;\n##matrix\n}", "\n##head\n##mask\nin vec2 vTexCoord;in vec2 vRectCoord;uniform sampler2D uTexture;uniform vec4 uTextureColor;uniform float uTextureOpacity;uniform vec2 uRepeat;uniform vec4 uColor;uniform float uCornerRadius[4];uniform vec2 uSize;uniform vec2 uPosition;uniform vec4 uCanvasColor;uniform int uInverted;uniform float uEdgeFeather;void main(){\n##init\n##colorize\n##rectaa\n##cornerradius\n##maskfeatherapply\nif(uInverted==1)a=1.0-a;\n##maskapply\n##fragcolor\n}", ["aPosition", "aTexCoord", "aRectCoord"], ["uTexture", "uColor", "uMatrix", "uCanvasColor", "uTextureColor", "uTextureOpacity", "uRepeat", "uPosition", "uSize", "uMaskBounds", "uMaskOpacity", "uMaskFeather", "uCornerRadius", "uInverted", "uEdgeFeather"]), + G = P.createBuffer(), + Z = P.createBuffer(), + X = P.createBuffer(), + Y = pl(P, "\n##head\n##text\nout vec2 vTexCoordDouble;void main(){vTexCoordDouble=vec2(aTexCoord.x*2.0-1.0,aTexCoord.y*2.0-1.0);vTexCoord=aTexCoord;\n##matrix\n}", "\n##head\n##mask\nin vec2 vTexCoord;in vec2 vTexCoordDouble;uniform sampler2D uTexture;uniform float uTextureOpacity;uniform vec2 uRepeat;uniform vec2 uRadius;uniform vec4 uColor;uniform int uInverted;uniform vec4 uCanvasColor;void main(){\n##init\nfloat ar=uRadius.x/uRadius.y;vec2 rAA=vec2(uRadius.x-1.0,uRadius.y-(1.0/ar));vec2 scaledPointSq=vec2((vTexCoordDouble.x*uRadius.x)*(vTexCoordDouble.x*uRadius.x),(vTexCoordDouble.y*uRadius.y)*(vTexCoordDouble.y*uRadius.y));float p=(scaledPointSq.x/(uRadius.x*uRadius.x))+(scaledPointSq.y/(uRadius.y*uRadius.y));float pAA=(scaledPointSq.x/(rAA.x*rAA.x))+(scaledPointSq.y/(rAA.y*rAA.y));a=smoothstep(1.0,p/pAA,p);if(uInverted==1)a=1.0-a;\n##maskapply\n##fragcolor\n}", ["aPosition", "aTexCoord"], ["uTexture", "uTextureOpacity", "uRepeat", "uColor", "uCanvasColor", "uMatrix", "uRadius", "uInverted", "uMaskBounds", "uMaskOpacity"]), + q = P.createBuffer(), + K = P.createBuffer(), + J = new Map, + Q = { + 2: { + width: 0, + height: 0 + }, + 1: { + width: 0, + height: 0 + } + }, + ee = (e, t, o, r = 1) => { + const a = Math.min(Math.min(4096, n) / o.width, Math.min(4096, n) / o.height, r), + l = Math.floor(a * o.width), + c = Math.floor(a * o.height); + Be(o, Q[e]) ? P.bindFramebuffer(P.FRAMEBUFFER, t) : (P.bindTexture(P.TEXTURE_2D, C.get(e)), P.texImage2D(P.TEXTURE_2D, 0, P.RGBA, l, c, 0, P.RGBA, P.UNSIGNED_BYTE, null), P.texParameteri(P.TEXTURE_2D, P.TEXTURE_MIN_FILTER, P.LINEAR), P.texParameteri(P.TEXTURE_2D, P.TEXTURE_WRAP_S, P.CLAMP_TO_EDGE), P.texParameteri(P.TEXTURE_2D, P.TEXTURE_WRAP_T, P.CLAMP_TO_EDGE), P.bindFramebuffer(P.FRAMEBUFFER, t), P.framebufferTexture2D(P.FRAMEBUFFER, P.COLOR_ATTACHMENT0, P.TEXTURE_2D, C.get(e), 0), Q[e] = o); + const h = o.width * s, + p = o.height * s; + var m, g; + yl(d, 0, h, p, 0, -1, 1), bl(d, 0, p, 0), g = 1, (m = d)[0] *= g, m[1] *= g, m[2] *= g, m[3] *= g, ((e, t) => { + e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t + })(d, -1), u = d, P.viewport(0, 0, l, c), P.colorMask(!0, !0, !0, !0), P.clearColor(0, 0, 0, 0), P.clear(P.COLOR_BUFFER_BIT), x = [1, 0, 1, 0, 1, Math.max(i.width, o.width), 1, Math.max(i.width, o.width)] + }, + te = (e, t) => { + const { + forceRelease: o = !1 + } = t || {}, { + src: i + } = J.get(e); + i instanceof HTMLCanvasElement && (o || i.dataset.retain || g(i)), J.delete(e), P.deleteTexture(e) + }, + oe = e => J.get(e).isRotatedVideo; + return { + drawPath: (e, t = 0, o = !1, i = !1, r, n, a, l, c) => { + if (e.length < 2) return; + const d = e.map((e => ({ + x: e.x * s, + y: e.y * s + }))), + h = r * s; + if (h > 0 && _(d, h, $l(n, c), a), d.length < 3 || !l || 0 === l[3] || !a) return; + const p = Rl(d), + m = new Float32Array(6 * p.length); + p.forEach((([e, t, o], i) => { + const r = 6 * i; + m[r + 0] = e.x, m[r + 1] = e.y, m[r + 2] = t.x, m[r + 3] = t.y, m[r + 4] = o.x, m[r + 5] = o.y + })), ((e, t) => { + const { + program: o, + locations: i + } = N; + P.useProgram(o), P.enableVertexAttribArray(i.aPosition), P.uniform4fv(i.uColor, t), P.uniformMatrix4fv(i.uMatrix, !1, u), P.uniform1fv(i.uMaskBounds, y), P.uniform1f(i.uMaskOpacity, f), P.uniform4f(i.uCanvasColor, v, w, S, k), P.bindBuffer(P.ARRAY_BUFFER, j), P.bufferData(P.ARRAY_BUFFER, e, P.STATIC_DRAW), P.vertexAttribPointer(i.aPosition, 2, P.FLOAT, !1, 0, 0), P.drawArrays(P.TRIANGLES, 0, e.length / 2), P.disableVertexAttribArray(i.aPosition) + })(m, $l(l, c)) + }, + drawRect: (e, t = 0, o = !1, i = !1, r, n, a, l, c, d = !1, h, p, m, g, $, b = 1 / s, C, T) => { + const M = ct(Ye(e), s), + R = r.map((t => ((e, t) => Math.floor(rs(e, 0, Math.min(.5 * (t.width - 1), .5 * (t.height - 1)))))(t || 0, e))).map((e => e * s)); + if (n || a) { + const e = Ye(M); + e.x -= .5, e.y -= .5, e.width += 1, e.height += 1; + const r = Il(e, t, o, i), + p = El(r); + let m; + C && (m = $l(C), 0 === m[3] && (m[3] = .001)); + const I = l && d ? [e.width / l.width, e.height / l.height] : [1, 1]; + ((e, t, o, i, r, n = E, a, l = 1, c = _l, d = Ol, h = x, p = 1, m) => { + const { + program: g, + locations: $ + } = U; + P.useProgram(g), P.enableVertexAttribArray($.aPosition), P.enableVertexAttribArray($.aTexCoord), P.enableVertexAttribArray($.aRectCoord), P.uniform4fv($.uColor, r), P.uniform2fv($.uSize, [t, o]), P.uniform2fv($.uPosition, [e[2], e[3]]), P.uniform2fv($.uRepeat, a), P.uniform1i($.uInverted, m ? 1 : 0), P.uniform1fv($.uCornerRadius, i), P.uniform4f($.uCanvasColor, v, w, S, k), P.uniform1fv($.uMaskFeather, h.map(((e, t) => t % 2 == 0 ? e : e * s))), P.uniform1fv($.uMaskBounds, y), P.uniform1f($.uMaskOpacity, f), P.uniform1f($.uEdgeFeather, Math.max(0, p)), P.uniformMatrix4fv($.uMatrix, !1, u), P.uniform1i($.uTexture, 4), P.uniform4fv($.uTextureColor, c), P.uniform1f($.uTextureOpacity, l), P.activeTexture(P.TEXTURE0 + 4), P.bindTexture(P.TEXTURE_2D, n), P.bindBuffer(P.ARRAY_BUFFER, Z), P.bufferData(P.ARRAY_BUFFER, d, P.STATIC_DRAW), P.vertexAttribPointer($.aTexCoord, 2, P.FLOAT, !1, 0, 0), P.bindBuffer(P.ARRAY_BUFFER, X), P.bufferData(P.ARRAY_BUFFER, Ol, P.STATIC_DRAW), P.vertexAttribPointer($.aRectCoord, 2, P.FLOAT, !1, 0, 0), P.bindBuffer(P.ARRAY_BUFFER, G), P.bufferData(P.ARRAY_BUFFER, e, P.STATIC_DRAW), P.vertexAttribPointer($.aPosition, 2, P.FLOAT, !1, 0, 0), P.drawArrays(P.TRIANGLE_STRIP, 0, e.length / 2), P.disableVertexAttribArray($.aPosition), P.disableVertexAttribArray($.aTexCoord), P.disableVertexAttribArray($.aRectCoord) + })(p, e.width, e.height, R, $l(n, g), a, I, g, m, h ? new Float32Array(h) : Hl(e.width, e.height, l, c, s), $, b * s, T) + } + p && (p = Math.min(p, M.width, M.height), _(((e, t, o, i, r, n, a, s) => { + const l = []; + if (n.every((e => 0 === e))) l.push(ce(e, t), ce(e + o, t), ce(e + o, t + i), ce(e, t + i)); + else { + const [r, a, s, c] = n, d = e, u = e + o, h = t, p = t + i; + l.push(ce(d + r, h)), Al(l, u - a, h + a, a, -1), l.push(ce(u, h + a)), Al(l, u - c, p - c, c, 0), l.push(ce(u - c, p)), Al(l, d + s, p - s, s, 1), l.push(ce(d, p - s)), Al(l, d + r, h + r, r, 2) + } + return (a || s) && Pe(l, a, s, e + .5 * o, t + .5 * i), r && Ee(l, r, e + .5 * o, t + .5 * i), l + })(M.x, M.y, M.width, M.height, t, R, o, i), p * s, $l(m, g), !0)) + }, + drawEllipse: (e, t, o, i, r, n, a, l, c, d, h, p, m, g, $) => { + const b = ct(it(e.x - t, e.y - o, 2 * t, 2 * o), s); + if (a || l) { + const e = Ye(b); + e.x -= .5, e.y -= .5, e.width += 1, e.height += 1; + const t = Il(e, i, r, n); + ((e, t, o, i, r = E, n = Ol, a = 1, s = !1) => { + const { + program: l, + locations: c + } = Y; + P.useProgram(l), P.enableVertexAttribArray(c.aPosition), P.enableVertexAttribArray(c.aTexCoord), P.uniformMatrix4fv(c.uMatrix, !1, u), P.uniform2fv(c.uRadius, [.5 * t, .5 * o]), P.uniform1i(c.uInverted, s ? 1 : 0), P.uniform4fv(c.uColor, i), P.uniform4f(c.uCanvasColor, v, w, S, k), P.uniform2fv(c.uRepeat, [1, 1]), P.uniform1fv(c.uMaskBounds, y), P.uniform1f(c.uMaskOpacity, f), P.uniform1i(c.uTexture, 4), P.uniform1f(c.uTextureOpacity, a), P.activeTexture(P.TEXTURE0 + 4), P.bindTexture(P.TEXTURE_2D, r), P.bindBuffer(P.ARRAY_BUFFER, K), P.bufferData(P.ARRAY_BUFFER, n, P.STATIC_DRAW), P.vertexAttribPointer(c.aTexCoord, 2, P.FLOAT, !1, 0, 0), P.bindBuffer(P.ARRAY_BUFFER, q), P.bufferData(P.ARRAY_BUFFER, e, P.STATIC_DRAW), P.vertexAttribPointer(c.aPosition, 2, P.FLOAT, !1, 0, 0), P.drawArrays(P.TRIANGLE_STRIP, 0, e.length / 2), P.disableVertexAttribArray(c.aPosition), P.disableVertexAttribArray(c.aTexCoord) + })(El(t), e.width, e.height, $l(a, g), l, h ? new Float32Array(h) : Hl(e.width, e.height, c, d, s), g, $) + } + p && _(((e, t, o, i, r, n, a) => { + const s = .5 * Math.abs(o), + l = .5 * Math.abs(i), + c = Math.abs(o) + Math.abs(i), + d = Math.max(20, Math.round(c / 6)); + return It(ce(e + s, t + l), s, l, r, n, a, d) + })(b.x, b.y, b.width, b.height, i, r, n), p * s, $l(m, g), !0) + }, + drawImage: (e, t, o, r, n, l, c, d, u, h, p = Vl, m = 1, g, $ = 1, x = 0, v = b, w = Nl, S = _l, k = !1, T = !1, E = !0) => { + const I = t.width * s, + A = t.height * s, + L = -.5 * I, + z = .5 * A, + W = .5 * I, + V = -.5 * A, + _ = new Float32Array([L, V, 0, L, z, 0, W, V, 0, W, z, 0]); + P.bindBuffer(P.ARRAY_BUFFER, O), P.bufferData(P.ARRAY_BUFFER, _, P.STATIC_DRAW); + const N = t.height / 2 / R * (i.height / t.height) * -1; + n *= s, l *= s, o *= s, r *= s; + const { + program: H, + locations: j + } = F, U = fl(); + ((e, t, o, i, r) => { + const n = 1 / Math.tan(t / 2), + a = 1 / (i - r); + e[0] = n / o, e[1] = 0, e[2] = 0, e[3] = 0, e[4] = 0, e[5] = n, e[6] = 0, e[7] = 0, e[8] = 0, e[9] = 0, e[10] = (r + i) * a, e[11] = -1, e[12] = 0, e[13] = 0, e[14] = 2 * r * i * a, e[15] = 0 + })(U, M, a, 1, 2 * -N), bl(U, n, -l, N), bl(U, o, -r, 0), Sl(U, -u), xl(U, h), bl(U, -o, r, 0), wl(U, d), vl(U, c), P.useProgram(H), P.enableVertexAttribArray(j.aPosition), P.enableVertexAttribArray(j.aTexCoord), P.uniform1i(j.uTexture, 3), P.uniform2f(j.uTextureSize, t.width, t.height), P.activeTexture(P.TEXTURE0 + 3), P.bindTexture(P.TEXTURE_2D, e); + const G = T ? 1 : 0, + Z = C.get(G); + P.uniform1i(j.uTextureBlend, G), P.activeTexture(P.TEXTURE0 + G), P.bindTexture(P.TEXTURE_2D, Z); + const X = k ? 2 : 0, + Y = C.get(X); + P.uniform1i(j.uTextureOverlay, X), P.activeTexture(P.TEXTURE0 + X), P.bindTexture(P.TEXTURE_2D, Y), P.bindBuffer(P.ARRAY_BUFFER, O), P.vertexAttribPointer(j.aPosition, 3, P.FLOAT, !1, 0, 0); + const q = Bl && oe(e); + let K; + P.bindBuffer(P.ARRAY_BUFFER, q ? B : D), P.vertexAttribPointer(j.aTexCoord, 2, P.FLOAT, !1, 0, 0), P.uniformMatrix4fv(j.uMatrix, !1, U), P.uniform4fv(j.uOverlayColor, S), !g || cs(g, Wl) ? (g = Wl, K = -1) : (K = g.reduce(((e, t) => e + t), 0), K = K <= 0 ? 1 : K), P.uniform1fv(j.uClarityKernel, g), P.uniform1f(j.uClarityKernelWeight, K), P.uniform1f(j.uColorGamma, 1 / $), P.uniform1f(j.uColorVignette, x), P.uniform1i(j.uAntialias, E ? 1 : 0), P.uniform4f(j.uColorOffset, p[4], p[9], p[14], p[19]), P.uniformMatrix4fv(j.uColorMatrix, !1, [p[0], p[1], p[2], p[3], p[5], p[6], p[7], p[8], p[10], p[11], p[12], p[13], p[15], p[16], p[17], p[18]]), P.uniform1f(j.uOpacity, m), P.uniform1f(j.uMaskOpacity, f), P.uniform1fv(j.uMaskBounds, y), P.uniform1fv(j.uMaskCornerRadius, w.map((e => e * s))), P.uniform1fv(j.uMaskFeather, v.map(((e, t) => t % 2 == 0 ? e : e * s))), P.drawArrays(P.TRIANGLE_STRIP, 0, 4), P.disableVertexAttribArray(j.aPosition), P.disableVertexAttribArray(j.aTexCoord) + }, + textureFilterNearest: P.NEAREST, + textureFilterLinear: P.LINEAR, + textureClamp: P.CLAMP_TO_EDGE, + textureRepeat: P.REPEAT, + textureCreate: () => P.createTexture(), + textureUpdate: (e, t, o) => (J.set(e, { + src: t, + options: o, + isRotatedVideo: "VIDEO" === t.nodeName && (t.dataset && 90 == t.dataset.rotation || 270 == t.dataset.rotation) + }), gl(P, e, t, o)), + textureGetSize: e => { + const { + src: t, + options: o + } = J.get(e), i = Le(t); + return o.scalar ? He(i, (e => e / o.scalar)) : i + }, + textureDelete: te, + enablePreviewStencil: () => { + P.stencilOp(P.KEEP, P.KEEP, P.REPLACE), P.stencilFunc(P.ALWAYS, 1, 255), P.stencilMask(255) + }, + applyPreviewStencil: () => { + P.stencilFunc(P.EQUAL, 1, 255), P.stencilMask(0) + }, + disablePreviewStencil: T, + setCanvasColor(e) { + v = e[0], w = e[1], S = e[2], k = o ? e[3] : 1, P.clear(P.COLOR_BUFFER_BIT) + }, + resetCanvasMatrix: () => { + yl(c, 0, i.width, i.height, 0, -1, 1) + }, + updateCanvasMatrix(e, t, o, r, n) { + const a = e.width, + l = e.height, + d = i.width * (.5 / s), + u = i.height * (.5 / s), + h = { + x: d + (o.x + t.x), + y: u + (o.y + t.y) + }, + p = { + x: h.x - t.x, + y: h.y - t.y + }, + m = .5 * a, + g = .5 * l; + pe(p, n.z, h), Me(p, r, h); + bl(c, (p.x - m) * s, (p.y - g) * s, 0), bl(c, m * s, g * s, 0), Sl(c, n.z); + const $ = n.x > Math.PI / 2; + vl(c, $ ? Math.PI : 0); + const f = n.y > Math.PI / 2; + wl(c, f ? Math.PI : 0), xl(c, r), bl(c, -m * s, -g * s, 0) + }, + drawToCanvas() { + P.bindFramebuffer(P.FRAMEBUFFER, null), u = c, P.viewport(0, 0, P.drawingBufferWidth, P.drawingBufferHeight), P.colorMask(!0, !0, !0, !0), P.clearColor(v, w, S, k), P.clear(P.COLOR_BUFFER_BIT), x = [1, 0, 1, 0, 1, i.width, 1, i.width] + }, + drawToImageBlendBuffer(e, t) { + ee(1, z, e, t) + }, + drawToImageOverlayBuffer(e, t) { + ee(2, A, e, t) + }, + enableMask(e, t) { + const o = e.x * s, + r = e.y * s, + n = e.width * s, + a = e.height * s; + $ = o, p = $ + n, h = i.height - r, m = i.height - (r + a), f = 1 - t, y = [h, p, m, $] + }, + disableMask() { + $ = 0, p = i.width, h = i.height, m = 0, f = 1, y = [h, p, m, $] + }, + resize: (t, o, n) => { + s = n, l = 1 === s ? .75 : 1, r.width = t, r.height = o, i.width = t * s, i.height = o * s, a = H(i.width, i.height), e.width = i.width, e.height = i.height, yl(c, 0, i.width, i.height, 0, -1, 1), b = [1, 0, 1, 0, 1, r.width, 1, r.width] + }, + release() { + Array.from(J.keys()).forEach((e => te(e, { + forceRelease: !0 + }))), J.clear(), C.forEach((e => { + P.deleteTexture(e) + })), C.clear(), F.destroy(), W.destroy(), N.destroy(), U.destroy(), Y.destroy(), e.width = 1, e.height = 1, e = void 0 + } + } + }, + Ul = e => e % 2 == 0 ? e : e + 1; +var Gl = (e, t, o) => { + const { + targetCanvas: i, + targetSize: r, + disableDraw: n = !1, + shapePreprocessor: a + } = o || {}, s = i || document.createElement("canvas"), { + crop: l, + colorMatrix: c, + convolutionMatrix: d + } = t, u = Kt(e), h = { + width: u ? e.videoWidth : e.width, + height: u ? e.videoHeight : e.height + }, { + upscale: m = !1, + fit: g = "contain", + width: $, + height: f + } = r || {}; + let y = 1; + "contain" === g ? y = Math.min(($ || Number.MAX_SAFE_INTEGER) / l.width, (f || Number.MAX_SAFE_INTEGER) / l.height) : "cover" === g && (y = Math.max(($ || l.width) / l.width, (f || l.height) / l.height)), m || (y = Math.min(y, 1)); + const b = Math.floor(l.width * y), + x = Math.floor(l.height * y), + v = u ? Ul(b) : b, + w = u ? Ul(x) : x, + S = jl(s, { + alpha: !0 + }); + S.resize(v, w, 1); + const k = S.textureCreate(); + let C; + S.setCanvasColor([0, 0, 0, 0]), S.drawToCanvas(), S.disableMask(), S.disablePreviewStencil(); + { + const e = Object.values(c || {}).filter(Boolean); + e.length && (C = jr(e)) + } + const T = { + x: 0, + y: 0, + width: v, + height: w + }, + { + origin: M, + translation: R, + rotation: P, + scale: E + } = nl(T, T, h, l, { + x: 0, + y: 0, + width: v, + height: w + }, y, { + x: 0, + y: 0 + }, 1, t.rotation, t.flipX, t.flipY), + I = [h, M.x, M.y, R.x, R.y, P.x, P.y, P.z, E, C, 1, d && d.clarity, Eo(t.gamma) ? t.gamma : 1, t.vignette || 0, [1, 0, 1, 0, 1, w, 1, v], void 0, void 0, void 0, void 0, !1]; + let A = !1; + const L = t.decoration.length || t.annotation.length, + z = L && S.textureCreate(), + O = () => { + S.textureUpdate(k, e, { + filterParam: S.textureFilterLinear, + wrapParam: S.textureClamp + }) + }, + D = () => { + O(), S.drawImage(k, ...I), L && A && S.drawRect(T, 0, !1, !1, [0, 0, 0, 0], void 0, z) + }; + return O(), !n && D(), { + canvas: s, + prepare: async () => { + if (!L) return; + const { + dest: e + } = await Ss(p("canvas", h), { + shapePreprocessor: a, + imageReader: [ + [async (e, t, o) => { + const { + src: i + } = e, r = parseInt(i.width, 10), n = parseInt(i.height, 10), a = await F(i); + return { + ...e, + dest: a, + size: { + width: r, + height: n + } + } + }, "read-canvas"] + ], + imageWriter: rl({ + format: "canvas" + }), + imageState: { + ...t, + redaction: [], + frame: void 0, + gamma: void 0, + convolutionMatrix: void 0, + colorMatrix: void 0, + backgroundColor: [0, 0, 0, 0], + backgroundImage: void 0, + trim: void 0, + vignette: void 0, + volume: void 0 + } + }); + S.textureUpdate(z, e, { + filterParam: S.textureFilterLinear, + wrapParam: S.textureClamp + }), A = !0, !n && D() + }, + redraw: D, + destroy: () => { + S.release() + } + } + }, + Zl = (e, t) => { + const { + imageData: o, + amount: i = 1 + } = e, r = Math.round(2 * Math.max(1, i)), n = Math.round(.5 * r), a = o.width, s = o.height, l = new Uint8ClampedArray(a * s * 4), c = o.data; + let d, u, h, p, m, g = 0, + $ = 0, + f = 0; + const y = a * s * 4 - 4; + for (h = 0; h < s; h++) + for (d = crypto.getRandomValues(new Uint8ClampedArray(s)), u = 0; u < a; u++) p = d[h] / 255, $ = 0, f = 0, p < .5 && ($ = 4 * (-n + Math.round(Math.random() * r))), p > .5 && (f = (-n + Math.round(Math.random() * r)) * (4 * a)), m = Math.min(Math.max(0, g + $ + f), y), l[g] = c[m], l[g + 1] = c[m + 1], l[g + 2] = c[m + 2], l[g + 3] = c[m + 3], g += 4; + t(null, { + data: l, + width: o.width, + height: o.height + }) + }; +const Xl = [.0625, .125, .0625, .125, .25, .125, .0625, .125, .0625]; + +function Yl(e) { + return Math.sqrt(1 - --e * e) +} + +function ql(e) { + return "[object Date]" === Object.prototype.toString.call(e) +} + +function Kl(e, t) { + if (e === t || e != e) return () => e; + const o = typeof e; + if (o !== typeof t || Array.isArray(e) !== Array.isArray(t)) throw new Error("Cannot interpolate values of different type"); + if (Array.isArray(e)) { + const o = t.map(((t, o) => Kl(e[o], t))); + return e => o.map((t => t(e))) + } + if ("object" === o) { + if (!e || !t) throw new Error("Object cannot be null"); + if (ql(e) && ql(t)) { + e = e.getTime(); + const o = (t = t.getTime()) - e; + return t => new Date(e + t * o) + } + const o = Object.keys(t), + i = {}; + return o.forEach((o => { + i[o] = Kl(e[o], t[o]) + })), e => { + const t = {}; + return o.forEach((o => { + t[o] = i[o](e) + })), t + } + } + if ("number" === o) { + const o = t - e; + return t => e + t * o + } + throw new Error(`Cannot interpolate ${o} values`) +} + +function Jl(e, t = {}) { + const o = Ba(e); + let i, r = e; + + function n(n, a) { + if (null == e) return o.set(e = n), Promise.resolve(); + r = n; + let s = i, + l = !1, + { + delay: c = 0, + duration: d = 400, + easing: u = Zr, + interpolate: h = Kl + } = Xr(Xr({}, t), a); + if (0 === d) return s && (s.abort(), s = null), o.set(e = r), Promise.resolve(); + const p = mn() + c; + let m; + return i = yn((t => { + if (t < p) return !0; + l || (m = h(e, n), "function" == typeof d && (d = d(e, n)), l = !0), s && (s.abort(), s = null); + const i = t - p; + return i > d ? (o.set(e = n), !1) : (o.set(e = m(u(i / d))), !0) + })), i.promise + } + return { + set: n, + update: (t, o) => n(t(r, e), o), + subscribe: o.subscribe + } +} + +function Ql(e, t, o, i) { + if ("number" == typeof o) { + const r = i - o, + n = (o - t) / (e.dt || 1 / 60), + a = (n + (e.opts.stiffness * r - e.opts.damping * n) * e.inv_mass) * e.dt; + return Math.abs(a) < e.opts.precision && Math.abs(r) < e.opts.precision ? i : (e.settled = !1, o + a) + } + if (Lo(o)) return o.map(((r, n) => Ql(e, t[n], o[n], i[n]))); + if ("object" == typeof o) { + const r = {}; + for (const n in o) r[n] = Ql(e, t[n], o[n], i[n]); + return r + } + throw new Error(`Cannot spring ${typeof o} values`) +} + +function ec(e, t = {}) { + const o = Ba(e), + { + stiffness: i = .15, + damping: r = .8, + precision: n = .01 + } = t; + let a, s, l, c = e, + d = e, + u = 1, + h = 0, + p = !1; + + function m(t, i = {}) { + d = t; + const r = l = {}; + if (null == e || i.hard || g.stiffness >= 1 && g.damping >= 1) return p = !0, a = null, c = t, o.set(e = d), Promise.resolve(); + if (i.soft) { + const e = !0 === i.soft ? .5 : +i.soft; + h = 1 / (60 * e), u = 0 + } + if (!s) { + a = null, p = !1; + const t = { + inv_mass: void 0, + opts: g, + settled: !0, + dt: void 0 + }; + s = yn((i => { + if (null === a && (a = i), p) return p = !1, s = null, !1; + u = Math.min(u + h, 1), t.inv_mass = u, t.opts = g, t.settled = !0, t.dt = 60 * (i - a) / 1e3; + const r = Ql(t, c, e, d); + return a = i, c = e, o.set(e = r), t.settled && (s = null), !t.settled + })) + } + return new Promise((e => { + s.promise.then((() => { + r === l && e() + })) + })) + } + const g = { + set: m, + update: (t, o) => m(t(d, e), o), + subscribe: o.subscribe, + stiffness: i, + damping: r, + precision: n + }; + return g +} +var tc = Da(!1, (e => { + const t = window.matchMedia("(prefers-reduced-motion:reduce)"), + o = () => e(t.matches); + return o(), t.addListener(o), () => t.removeListener(o) + })), + oc = () => "ResizeObserver" in window; +const ic = qe(), + rc = (e, t, o, i, r) => { + e.rect || (e.rect = qe()); + const n = e.rect; + ht(ic, t, o, i, r), dt(n, ic) || (pt(n, ic), e.dispatchEvent(new CustomEvent("measure", { + detail: n + }))) + }, + nc = Math.round, + ac = e => { + const t = e.getBoundingClientRect(); + uc && rc(e, nc(t.x), nc(t.y), nc(t.width), nc(t.height)) + }, + sc = e => { + uc && rc(e, e.offsetLeft, e.offsetTop, e.offsetWidth, e.offsetHeight) + }, + lc = []; +let cc, dc, uc = void 0; + +function hc() { + lc.length ? (lc.forEach((e => e.measure(e))), uc = requestAnimationFrame(hc)) : uc = void 0 +} +let pc = new Map([]), + mc = 0, + gc = 0; +var $c = (e, t = {}) => { + const { + observePosition: o = !1, + observeViewRect: i = !1, + once: r = !1, + disabled: n = !1, + isMeasureRoot: a = !1 + } = t; + if (oc() && a && (dc || (dc = new ResizeObserver((e => { + e.forEach((e => { + pc.set(e.target, e.contentRect) + })); + const t = Array.from(pc.values()).some((({ + width: e, + height: t + }) => e > 0 && t > 0)); + t ? t && !1 === uc && hc() : (uc && cancelAnimationFrame(uc), uc = !1) + }))), dc.observe(e), mc++), !n) return !oc() || o || i ? (e.measure = i ? ac : sc, lc.push(e), void 0 === uc && (uc = requestAnimationFrame(hc)), e.measure(e), { + destroy() { + a && dc && (pc.delete(e), dc.unobserve(e), mc--, 0 === mc && (dc.disconnect(), dc = void 0)); + const t = lc.indexOf(e); + lc.splice(t, 1), delete e.measure + } + }) : (cc || (cc = new ResizeObserver((e => { + e.forEach((e => { + uc && sc(e.target) + })) + }))), cc.observe(e), sc(e), r ? cc.unobserve(e) : gc++, { + destroy() { + a && dc && (pc.delete(e), dc.unobserve(e), mc--, 0 === mc && (dc.disconnect(), dc = void 0)), r || (cc.unobserve(e), gc--, 0 === gc && (cc.disconnect(), cc = void 0)) + } + }) + }, + fc = e => { + let t = !1; + const o = { + pointerdown: () => { + t = !1 + }, + keydown: () => { + t = !0 + }, + keyup: () => { + t = !1 + }, + focus: e => { + t && (e.target.dataset.focusVisible = "") + }, + blur: e => { + delete e.target.dataset.focusVisible + } + }; + return Object.keys(o).forEach((t => e.addEventListener(t, o[t], !0))), { + destroy() { + Object.keys(o).forEach((t => e.removeEventListener(t, o[t], !0))) + } + } + }; +const yc = async e => new Promise((t => { + if ("file" === e.kind) return t(e.getAsFile()); + e.getAsString(t) +})); +var bc = (e, t = {}) => { + const o = e => { + e.preventDefault() + }, + i = async o => { + o.preventDefault(), o.stopPropagation(); + try { + const i = await (e => new Promise(((t, o) => { + const { + items: i + } = e.dataTransfer; + if (!i) return t([]); + Promise.all(Array.from(i).map(yc)).then((e => { + t(e.filter((e => Wo(e) && Yt(e) || /^http/.test(e)))) + })).catch(o) + })))(o); + e.dispatchEvent(new CustomEvent("dropfiles", { + detail: { + event: o, + resources: i + }, + ...t + })) + } catch (e) {} + }; + return e.addEventListener("drop", i), e.addEventListener("dragover", o), { + destroy() { + e.removeEventListener("drop", i), e.removeEventListener("dragover", o) + } + } +}; +let xc = null; +var vc = () => { + if (null === xc) + if (c()) { + const e = p("canvas"); + xc = !Cl(e, { + failIfMajorPerformanceCaveat: !0 + }), g(e) + } else xc = !1; + return xc + }, + wc = e => e instanceof WebGLTexture, + Sc = ([e, t, o, i]) => [i.x, i.y, e.x, e.y, o.x, o.y, t.x, t.y]; + +function kc(e) { + let t, o, i, r; + return { + c() { + t = kn("div"), o = kn("canvas"), An(t, "class", "PinturaCanvas") + }, + m(n, a) { + wn(n, t, a), bn(t, o), e[36](o), i || (r = [Pn(o, "measure", e[37]), hn($c.call(null, o))], i = !0) + }, + p: Gr, + i: Gr, + o: Gr, + d(o) { + o && Sn(t), e[36](null), i = !1, Kr(r) + } + } +} + +function Cc(e, t, o) { + let i, n, a, s, l, d, u; + const h = [0, 0, 0, 0], + m = le(), + f = c() && (e => { + const t = .5 * e, + o = p("canvas", { + "data-retain": !0, + width: e, + height: e + }), + i = o.getContext("2d"); + return i.fillStyle = "#f0f", i.fillRect(0, 0, t, t), i.fillRect(t, t, t, t), o + })(128), + y = qn(); + let b, { + isAnimated: x + } = t, + { + isTransparent: v + } = t, + { + maskRect: w + } = t, + { + maskOpacity: S = 1 + } = t, + { + maskFrameOpacity: k = .95 + } = t, + { + maskMarkupOpacity: C = 1 + } = t, + { + clipAnnotationsToImage: M = !0 + } = t, + { + pixelRatio: R = 1 + } = t, + { + textPixelRatio: P = R + } = t, + { + backgroundColor: E + } = t, + { + willRender: I = j + } = t, + { + didRender: A = j + } = t, + { + willRequest: L + } = t, + { + loadImageData: z = j + } = t, + { + enableGrid: F = !1 + } = t, + { + gridColors: O + } = t, + { + gridSize: D + } = t, + { + gridOpacity: B = 0 + } = t, + { + images: W = [] + } = t, + { + interfaceImages: V = [] + } = t, + { + selectionColor: _ + } = t, + N = null, + U = null, + G = null; + const Z = (e, t) => e.set(t, { + hard: !x + }), + X = { + precision: 1e-4 * .01 + }; + let Y = 0; + const q = Jl(void 0, { + duration: 0 + }); + on(e, q, (e => o(35, u = e))); + const K = ec(1, X); + on(e, K, (e => o(34, l = e))); + const J = ec(1, X); + on(e, J, (e => o(50, a = e))); + const Q = Ba(); + on(e, Q, (e => o(52, d = e))); + const ee = Ba(); + on(e, ee, (e => o(51, s = e))); + const te = {}, + oe = (e, t) => { + let o = te[e.id]; + const i = Math.min(1, 2048 / t.width); + let r = o ? o.element : p("canvas", { + width: t.width * i, + height: t.height * i, + "data-retain": !0 + }); + if (!o || ((e, t) => { + if (e.total !== t.length) return !0; + const o = e.last, + i = t[t.length - 1]; + return o.drawMode !== i.drawMode || !(!Ci(o) || Ci(i) && dt(o, i)) || !(!Ti(o) || Ti(i) && o.x === i.x && o.y === i.y && o.rx === i.rx && o.ry === i.ry) || !(!Ri(o) || Ri(i) && i.points.length === o.points.length) + })(o, e.actions)) { + r = r.cloneNode(), ((e, t, o) => { + const { + selectionColor: i = [1, 1, 1], + scalar: r = 1 + } = o || {}; + let n = !1; + for (const o of t) { + const t = "subtract" === o.drawMode; + if (t && !n) continue; + e.globalCompositeOperation = t ? "destination-out" : "source-over", e.save(), e.beginPath(); + const a = vr(o); + bo(e, r, r), yo(e, o.rotation, a), Wr(e, o.flipX, o.flipY, a), o.width ? Lr(e, { + ...o, + backgroundColor: i + }) : o.points ? Br(e, Object.assign({}, o, o.pathClose ? { + backgroundColor: i, + strokeColor: [0, 0, 0, 0] + } : { + strokeColor: i, + strokeJoin: "round", + strokeCap: "round" + })) : o.rx && zr(e, { + ...o, + backgroundColor: i, + strokeColor: [0, 0, 0, 0], + strokeJoin: "round", + strokeCap: "round" + }), e.restore(), n = !0 + } + })(r.getContext("2d"), e.actions, { + selectionColor: [1, 0, 1], + scalar: i + }); + const t = e.actions.length; + te[e.id] = { + total: t, + last: { + ...e.actions[t - 1] + }, + element: r + } + } + return { + x: 0, + y: 0, + ...t, + fillColor: e.color || [1, 1, 1], + backgroundImage: r + } + }; + let ie; + const re = () => { + cancelAnimationFrame(ie), ie = requestAnimationFrame((() => { + Ce = !0, Oe = 0, n() + })) + }, + ne = new Map([]), + ae = new Map([]), + se = (e, t) => ({ + filterParam: "pixelated" === e ? N.textureFilterNearest : N.textureFilterLinear, + wrapParam: "repeat" === t ? N.textureRepeat : N.textureClamp + }), + de = (e, t, o) => { + if (!ne.has(e)) { + ne.set(e, e); + const r = se(t, o); + if (!T(i = e) && (lo(i) || $(i) || Sr(i) || Kt(i))) { + const t = N.textureCreate(); + N.textureUpdate(t, e, r), ne.set(e, t) + } else z(e).then((t => { + if (!N || !t) return; + const o = N.textureCreate(); + N.textureUpdate(o, t, r), ne.set(e, o), re() + })).catch((t => { + ne.set(e, t) + })) + } + var i, r; + if (Kt(e) && ((r = e).currentTime > 0 && !r.paused && !r.ended && r.readyState > 2 || "true" === e.dataset.redraw)) { + const i = ne.get(e), + r = se(t, o); + return N.textureUpdate(i, e, r), e.dataset.redraw = !1, i + } + return ne.get(e) + }, + ue = (e, t = {}) => { + const o = t.id || e.id; + if (!e.text.length) return void ae.delete(o); + let { + text: i, + textAlign: r, + fontFamily: n, + fontSize: a = 16, + fontWeight: s, + fontVariant: l, + fontStyle: c, + letterSpacing: d, + lineHeight: u = a, + width: h, + height: m + } = e, { + outline: g = 0, + blur: $ = 0, + paddingTop: f = 0, + paddingRight: y = Yo, + paddingBottom: b = 0, + paddingLeft: x = Yo + } = t; + h = Eo(h) ? Math.floor(h) : h, m = Eo(m) ? Math.floor(m) : m; + const { + textSize: v, + signature: w + } = ((e = "", t) => { + let { + width: o = 0, + height: i = "auto", + fontSize: r, + fontFamily: n, + lineHeight: a, + fontWeight: s, + fontStyle: l, + fontVariant: c, + letterSpacing: d + } = t; + const u = No({ + text: e, + fontFamily: n, + fontWeight: s, + fontStyle: l, + fontVariant: c, + fontSize: r, + lineHeight: a, + letterSpacing: d, + width: o, + height: i + }); + let h = Jo.get(u); + if (h) return h; + let m = 1; + r > 1e3 && Xo() && (m = r / 1e3, r = 1e3, a *= m); + const g = jt(p("pre", { + contenteditable: "true", + spellcheck: "false", + style: `${ei}${qo({fontFamily:n,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:r,letterSpacing:d,lineHeight:a})};${Ko(e,t)}"`, + innerHTML: e + })), + $ = g.getBoundingClientRect(); + return h = { + signature: Qo(g).flat().map((e => e.text)).join("_;_"), + textSize: He(Le($), (e => Math.ceil(e * m))) + }, Jo.set(u, h), g.remove(), h + })(i, { + ...e, + width: h, + height: m + }), S = No({ + text: i, + textAlign: r, + fontFamily: n, + fontSize: a, + fontWeight: s, + fontVariant: l, + fontStyle: c, + lineHeight: u, + letterSpacing: d, + outline: g, + blur: $, + signature: w + }); + if (!ne.has(S)) { + ne.set(S, i); + const e = Math.ceil(v.width), + t = Math.ceil(v.height / u) * u; + if (0 === e || 0 === t) return; + const p = zl(), + w = Math.min(1, (p - (x + y) * P) / (e * P), (p - (f + b) * P) / (t * P)); + mi(i, { + fontSize: a, + fontFamily: n, + fontWeight: s, + fontVariant: l, + fontStyle: c, + letterSpacing: d, + textAlign: r, + lineHeight: u, + width: h, + height: m, + imageWidth: e, + imageHeight: t, + paddingLeft: x, + paddingTop: f, + paddingRight: y, + paddingBottom: b, + pixelRatio: P * w, + willRequest: L, + outline: g, + blur: $, + color: [1, 0, 1] + }).then((e => { + if (!N) return; + const t = N.textureCreate(); + N.textureUpdate(t, e, { + filterParam: N.textureFilterLinear, + wrapParam: N.textureClamp, + scalar: w + }), ne.set(S, t), ae.set(o, t), re() + })).catch(console.error) + } + const k = ne.get(S); + return wc(k) ? k : ae.get(o) + }, + he = new Map, + me = (e, t) => { + let o; + if (e.backgroundImage) o = de(e.backgroundImage, e.backgroundImageRendering, "repeat" === e.backgroundRepeat ? "repeat" : void 0); + else if (T(e.text)) { + if (e.width && e.width < 1 || e.height && e.height < 1) return; + o = ue(e, t) + } else e.bitmap && e.points && (o = (e => { + const { + id: t, + points: o, + strokeWidth: i, + strokeCap: r, + strokeJoin: n, + strokeColor: a + } = e; + let s = ne.get(t), + l = he.get(t); + const c = No({ + points: o.map((e => `${e.x},${e.y}`)).join(","), + strokeWidth: i, + strokeCap: r, + strokeJoin: n, + strokeColor: a + }); + if (l) { + const { + hash: e + } = l; + if (ne.has(t)) { + if (c === e) return ne.get(t) + } else l = void 0 + } + if (!l) { + const o = p("canvas", { + width: 1, + height: 1 + }); + l = { + canvas: o, + hash: void 0 + }, he.set(e.id, l), s = N.textureCreate(), N.textureUpdate(s, o, { + filterParam: N.textureFilterLinear, + wrapParam: N.textureClamp + }), ne.set(t, s) + } + const { + canvas: d + } = l, u = Math.ceil(e.strokeWidth), h = et(o), m = Math.floor(h.x) - .5 * u, g = Math.floor(h.y) - .5 * u, $ = Math.ceil(h.width + u), f = Math.ceil(h.height + u); + d.width = Math.max($, 1), d.height = Math.max(f, 1); + const y = d.getContext("2d"); + return y.clearRect(0, 0, d.width, d.height), $ >= 1 && f >= 1 && (y.translate(-m, -g), Br(y, e), y.resetTransform()), N.textureUpdate(s, d, { + filterParam: N.textureFilterLinear, + wrapParam: N.textureClamp + }), he.set(t, { + canvas: d, + hash: c + }), ne.get(t) + })(e)); + return o + }, + ge = ({ + texture: e, + size: t, + origin: o, + translation: i, + rotation: r, + scale: n, + colorMatrix: a, + opacity: s, + convolutionMatrix: l, + gamma: c, + vignette: d, + maskFeather: u, + maskCornerRadius: h, + overlayColor: p, + enableOverlay: m, + enableManipulation: g, + enableAntialiasing: $ + }) => { + let f = 0, + y = 0; + if (1 === R) { + const e = Math.abs(1 - n) < Number.EPSILON; + f = e && U % 2 != 0 ? .5 : 0, y = e && G % 2 != 0 ? .5 : 0 + } + return N.drawImage(e, t, o.x, o.y, i.x + f, i.y + y, r.x, r.y, r.z, n, a, rs(s, 0, 1), l, c, d, u, h, p, m, g, $), e + }, + $e = (e, t, o, i, r, n, a, s, l) => { + const c = { + ...t + }, + d = { + width: r.width / P * o, + height: r.height / P * o + }, + u = ce(0, 0), + h = { + width: d.width, + height: d.height + }; + return c.x -= l * o, c.y -= n * o, e.width ? (c.height = c.height ? c.height + n * o / i : d.height, c.width += (l + a) * o / i, "center" === e.textAlign ? u.x = .5 * (c.width - h.width / i) : "right" === e.textAlign && (u.x = c.width - h.width / i)) : (c.width = d.width, c.height = d.height), { + rect: c, + backgroundPosition: u, + backgroundSize: h + } + }, + fe = (e = [], t) => { + e.forEach((e => { + let o = me(e); + const i = "loading" === e.status || e.backgroundImage && o === e.backgroundImage; + i && re(); + const r = "error" === e.status || e.backgroundImage && o instanceof Error; + let n = wc(o) ? o : void 0; + const a = e._scale || 1, + s = e._translate || m, + l = e.strokeWidth && e.strokeWidth * a, + c = !!e.width, + d = !c && T(e.text) && n, + u = Lo(e.points), + h = Ti(e); + if (u) { + const i = e.points.map((e => ce(e.x * a + s.x, e.y * a + s.y))); + if (e.bitmap) { + o && t.push(o); + const r = et(i), + s = Math.ceil(e.strokeWidth * a); + N.drawRect({ + x: Math.floor(r.x) - .5 * s, + y: Math.floor(r.y) - .5 * s, + width: Math.ceil(r.width + s), + height: Math.ceil(r.height + s) + }, e.rotation, e.flipX, e.flipY, [0, 0, 0, 0], void 0, n, void 0, void 0, void 0, void 0, void 0, void 0, e.opacity, void 0, void 0, !1, !1) + } else N.drawPath(i, e.rotation, e.flipX, e.flipY, l, e.strokeColor, e.pathClose, e.backgroundColor, e.opacity) + } else if (h) { + let c = e.x, + d = e.y; + c *= a, d *= a, c += s.x, d += s.y; + const u = ce(c, d); + N.drawEllipse(u, e.rx * a, e.ry * a, e.rotation, e.flipX, e.flipY, e.backgroundColor, n, void 0, void 0, e.backgroundCorners && Sc(e.backgroundCorners), l, e.strokeColor, e.opacity, e.inverted), o && t.push(o), (i || r) && (e.backgroundColor || e.strokeColor && e.strokeWidth || N.drawEllipse(u, e.rx * a, e.ry * a, e.rotation, e.flipX, e.flipY, r ? [1, 0, 0, .25 * e.opacity] : [0, 0, 0, .25 * e.opacity]), r && Se(u), i && we(u)) + } else if (d || c) { + const c = n && N.textureGetSize(n); + let d, u, h, p = e.fillColor, + m = e.backgroundColor, + g = e.strokeColor, + $ = [e.cornerRadius, e.cornerRadius, e.cornerRadius, e.cornerRadius].map((e => e * a)); + d = e.width ? Qe(e) : { + x: e.x, + y: e.y, + ...c + }, a && s && (d.x *= a, d.y *= a, d.x += s.x, d.y += s.y, d.width *= a, d.height *= a), o && t.push(o); + const { + backgroundRepeat: f = "no-repeat" + } = e; + if (c) + if (e.backgroundImage && (e.backgroundSize || e.backgroundPosition || e.backgroundRepeat)) { + const t = H(c.width, c.height); + if ("repeat" === e.backgroundRepeat && (u = { + ...c + }, h = { + x: 0, + y: 0 + }), "contain" === e.backgroundSize) { + const o = yt(d, t, d); + u = ze(o), h = e.backgroundPosition ? e.backgroundPosition : ce(.5 * (d.width - u.width), .5 * (d.height - u.height)) + } else if ("cover" === e.backgroundSize) { + const o = ft(d, t, d); + u = ze(o), e.backgroundPosition ? h = e.backgroundPosition : (h = ce(o.x, o.y), h = ce(.5 * (d.width - u.width), .5 * (d.height - u.height))) + } else e.backgroundSize ? (u = e.backgroundSize, h = e.backgroundPosition || { + x: 0, + y: 0 + }) : e.backgroundPosition && (u = { + ...c + }, h = e.backgroundPosition) + } else if (e.text) { + const o = { + ...d + }; + if (e.backgroundColor || e.strokeColor) { + m = void 0, g = void 0; + const t = { + width: c.width / P * a, + height: c.height / P * a + }, + o = (e.width || t.width - 2 * Yo) * a, + i = (e.height || t.height) * a; + N.drawRect({ + ...d, + width: o, + height: i + }, e.rotation, e.flipX, e.flipY, $, e.backgroundColor, void 0, void 0, void 0, !1, void 0, l, e.strokeColor, e.opacity, void 0, void 0, void 0, e.inverted) + } + let i = 1; + e.fontSize > 1e3 && Xo() && (i = e.fontSize / 1e3), p = e.color || [0, 0, 0], e._prerender && (p[3] = 0); + const r = $e(e, o, a, i, c, 0, Yo, 0, Yo); + d = r.rect, h = r.backgroundPosition, u = r.backgroundSize; + const { + textShadowX: n, + textShadowY: s, + textShadowBlur: f + } = e; + if (n || s || f) { + const r = Math.ceil(.5 * f), + l = r, + c = Math.max(Yo, r), + u = r, + h = Math.max(Yo, r), + p = me(e, { + id: e.id + "shadow", + blur: f, + paddingTop: l, + paddingRight: c, + paddingBottom: u, + paddingLeft: h + }); + if (p && !e._prerender) { + t.push(p); + const r = N.textureGetSize(p), + { + rect: u, + backgroundPosition: m, + backgroundSize: g + } = $e(e, o, a, i, r, l, c, 0, h), + $ = rt(d), + f = rt(u); + f.x += n, f.y += s; + const y = pe(f, e.rotation, $), + b = { + x: y.x - .5 * u.width, + y: y.y - .5 * u.height, + width: u.width, + height: u.height + }; + e.height && (b.height -= s), N.drawRect(b, e.rotation, e.flipX, e.flipY, [0, 0, 0, 0], void 0, p, g, m, !1, void 0, void 0, void 0, e.opacity, void 0, 0, e.textShadowColor) + } + } + if (e.textOutlineWidth) { + const r = Math.ceil(.5 * e.textOutlineWidth), + n = r, + s = Yo + r, + l = r, + c = Yo + r, + d = me(e, { + id: e.id + "outline", + outline: e.textOutlineWidth, + paddingTop: n, + paddingRight: s, + paddingBottom: l, + paddingLeft: c + }); + if (d && !e._prerender) { + const r = N.textureGetSize(d); + t.push(d); + const { + rect: l, + backgroundPosition: u, + backgroundSize: h + } = $e(e, o, a, i, r, n, s, 0, c); + N.drawRect(l, e.rotation, e.flipX, e.flipY, [0, 0, 0, 0], void 0, d, h, u, !1, void 0, void 0, void 0, e.opacity, void 0, 0, e.textOutlineColor) + } + } + } + if (N.drawRect(d, e.rotation, e.flipX, e.flipY, $, m, n, u, h, "repeat" === f, e.backgroundCorners && Sc(e.backgroundCorners), l, g, e.opacity, void 0, e.feather, p, e.inverted), i || r) { + e.backgroundColor && 0 !== e.backgroundColor[3] || e.strokeColor && e.strokeWidth || N.drawRect(d, e.rotation, e.flipX, e.flipY, $, r ? [1, .2549, .2118, .25 * e.opacity] : [0, 0, 0, .25 * e.opacity]); + const t = rt(d); + r && Se(t), i && we(t) + } + } else o && t.push(o) + })) + }; + let ye = 0; + const be = [{ + x: -5, + y: -5 + }, { + x: 5, + y: 5 + }], + xe = [{ + x: 5, + y: -5 + }, { + x: -5, + y: 5 + }], + ve = It({ + x: 0, + y: 0 + }, 10, 10, 0, !1, !1, 16); + ve.length = 9; + const we = e => { + ye = Date.now() / 50, N.drawEllipse(e, 15, 15, 0, !1, !1, [0, 0, 0, .5]); + const t = Ee(ve.map((t => ({ + x: t.x + e.x, + y: t.y + e.y + }))), ye, e.x, e.y); + N.drawPath(t, 0, !1, !1, 2, [1, 1, 1]) + }, + Se = e => { + N.drawEllipse(e, 13, 13, 0, !1, !1, [1, .2549, .2118, .75]); + const t = be.map((t => ({ + x: t.x + e.x, + y: t.y + e.y + }))), + o = xe.map((t => ({ + x: t.x + e.x, + y: t.y + e.y + }))); + N.drawPath(t, 0, !1, !1, 3, [1, 1, 1]), N.drawPath(o, 0, !1, !1, 3, [1, 1, 1]) + }, + ke = (e, t, o, i, r, n) => N.drawRect(t, 0, !1, !1, h, h, e, i, o, !0, void 0, 0, void 0, n, void 0, void 0, r); + let Ce = !1, + Te = !0, + Me = !1; + const Re = [], + Pe = [], + Ie = [], + Ae = () => { + Ie.length = 0; + const e = W[0], + { + manipulationShapes: t, + manipulationShapesDirty: o, + annotationShapes: i, + annotationShapesDirty: r, + interfaceShapes: n, + decorationShapes: c, + frameShapes: p, + selectionShapes: m + } = I({ + opacity: e.opacity, + rotation: e.rotation, + scale: e.scale, + images: W, + size: De(U, G), + backgroundColor: [...u], + selectionRect: d + }), + g = [...u], + $ = d, + y = rs(l, 0, 1), + b = s, + x = Math.abs(e.rotation.x / Math.PI * 2 - 1), + S = Math.abs(e.rotation.y / Math.PI * 2 - 1), + k = x < .99 || S < .99, + T = { + ...e.size + }, + R = e.backgroundColor, + E = e.backgroundImage, + L = t.length > 0, + z = i.length > 0, + H = R[3] > 0, + j = !!M && C >= 1; + if (y < 1 && H) { + const e = g[0], + t = g[1], + o = g[2], + i = 1 - y, + r = R[0] * i, + n = R[1] * i, + a = R[2] * i, + s = 1 - i; + g[0] = r + e * s, g[1] = n + t * s, g[2] = a + o * s, g[3] = 1 + } + N.setCanvasColor(v ? h : g); + L && (o || Ce) ? (N.disableMask(), N.drawToImageBlendBuffer(T), Re.length = 0, fe(t, Re)) : L || (Re.length = 0), Ie.push(...Re), Te && (N.drawToImageOverlayBuffer(T, P), Te = !1); + if (k ? (z && (r || Ce) || !Me ? (N.disableMask(), N.drawToImageOverlayBuffer(T, P), Pe.length = 0, fe(i, Pe)) : z || (Pe.length = 0), Me = !0) : Me = !1, N.drawToCanvas(), N.enableMask($, y), F && D >= 1 && 2 === O.length && B && ((e, t, o, i, r) => { + const n = De(t, t), + a = de(f, "pixelated", "repeat"), + s = ce(-e.x % t, -e.y % t), + l = ce(s.x + .5 * n.width, s.y); + ke(a, e, s, n, o, r), ke(a, e, l, n, i, r) + })($, D, O[0], O[1], B), H && N.drawRect($, 0, !1, !1, h, R), E) { + N.enableMask($, 1); + const e = Math.max(w.width / E.width, w.height / E.height), + t = E.width * e, + o = E.height * e, + i = { + x: w.x + .5 * w.width - .5 * t, + y: w.y + .5 * w.height - .5 * o, + width: t, + height: o + }; + N.drawRect(i, 0, !1, !1, h, h, de(E, "linear")), N.enableMask($, y) + } + if (j && N.enablePreviewStencil(), Ie.push(...[...W].reverse().map((e => ge({ + ...e, + texture: de(e.data), + enableOverlay: k && z, + enableManipulation: L, + enableAntialiasing: !0, + mask: $, + maskOpacity: y, + overlayColor: b + })))), N.enableMask($, C), k || (j && N.applyPreviewStencil(), N.resetCanvasMatrix(), N.updateCanvasMatrix(T, e.origin, e.translation, e.scale, e.rotation), Pe.length = 0, fe(i, Pe), j && N.disablePreviewStencil()), Ie.push(...Pe), N.resetCanvasMatrix(), N.enableMask($, C), fe(c, Ie), p.length) { + N.enableMask($, 1); + const e = p.filter((e => !e.expandsCanvas)), + t = p.filter((e => e.expandsCanvas)); + e.length && fe(e, Ie), t.length && (N.enableMask({ + x: $.x + .5, + y: $.y + .5, + width: $.width - 1, + height: $.height - 1 + }, a), fe(t, Ie)) + } + if (_ && m.length && !k) { + N.resetCanvasMatrix(), N.updateCanvasMatrix(T, e.origin, e.translation, e.scale, e.rotation); + const t = [..._]; + t[3] = .5; + const o = [{ + id: "selection", + color: t, + actions: [...m] + }].map((e => oe(e, T))); + fe(o, Ie), N.resetCanvasMatrix() + } + N.disableMask(), fe(n, Ie), V.forEach((e => { + if (N.enableMask(e.mask, e.maskOpacity), e.backgroundColor) { + const t = E && ft({ + ...e.mask + }, E.width / E.height), + o = E && de(E, "linear"); + N.drawRect(e.mask, 0, !1, !1, e.maskCornerRadius, e.backgroundColor, o, t, t, void 0, void 0, void 0, void 0, e.opacity, e.maskFeather), o && Ie.push(o) + } + const t = ge({ + ...e, + texture: de(e.data), + enableAntialiasing: !1, + translation: { + x: e.translation.x + e.offset.x - .5 * U, + y: e.translation.y + e.offset.y - .5 * G + } + }); + Ie.push(t) + })), N.disableMask(), (e => { + ne.forEach(((t, o) => { + !e.find((e => e === t)) && wc(t) && (Array.from(ae.values()).includes(t) || (ne.delete(o), N.textureDelete(t))) + })) + })(Ie), A(), Ce = !1 + }; + let Fe, Oe = 0; + const Be = () => { + clearTimeout(Fe); + const e = Date.now(); + e - Oe < 48 ? Fe = setTimeout(Be, 48) : (Oe = e, Ae()) + }; + Xn((() => n())), Zn((() => o(30, N = jl(b, { + alpha: v + })))), Yn((() => { + N && (he.forEach((({ + canvas: e + }) => g(e))), he.clear(), N.release(), o(30, N = void 0), o(0, b = void 0)) + })); + return e.$$set = e => { + "isAnimated" in e && o(9, x = e.isAnimated), "isTransparent" in e && o(10, v = e.isTransparent), "maskRect" in e && o(11, w = e.maskRect), "maskOpacity" in e && o(12, S = e.maskOpacity), "maskFrameOpacity" in e && o(13, k = e.maskFrameOpacity), "maskMarkupOpacity" in e && o(14, C = e.maskMarkupOpacity), "clipAnnotationsToImage" in e && o(15, M = e.clipAnnotationsToImage), "pixelRatio" in e && o(16, R = e.pixelRatio), "textPixelRatio" in e && o(17, P = e.textPixelRatio), "backgroundColor" in e && o(18, E = e.backgroundColor), "willRender" in e && o(19, I = e.willRender), "didRender" in e && o(20, A = e.didRender), "willRequest" in e && o(21, L = e.willRequest), "loadImageData" in e && o(22, z = e.loadImageData), "enableGrid" in e && o(23, F = e.enableGrid), "gridColors" in e && o(24, O = e.gridColors), "gridSize" in e && o(25, D = e.gridSize), "gridOpacity" in e && o(26, B = e.gridOpacity), "images" in e && o(27, W = e.images), "interfaceImages" in e && o(28, V = e.interfaceImages), "selectionColor" in e && o(29, _ = e.selectionColor) + }, e.$$.update = () => { + if (1 & e.$$.dirty[0] && b) { + const e = getComputedStyle(b).getPropertyValue("--color-transition-duration"); + o(31, Y = (e => { + let t = parseFloat(e); + return /^[0-9]+s$/.test(e) ? 1e3 * t : t + })(e)) + } + 262656 & e.$$.dirty[0] | 1 & e.$$.dirty[1] && E && q.set(E, { + duration: x ? Y : 0 + }), 4096 & e.$$.dirty[0] && Z(K, Eo(S) ? S : 1), 8192 & e.$$.dirty[0] && Z(J, Eo(k) ? k : 1), 2048 & e.$$.dirty[0] && w && Q.set(w), 24 & e.$$.dirty[1] && u && ee.set([u[0], u[1], u[2], rs(l, 0, 1)]), 1207959558 & e.$$.dirty[0] && o(33, i = !!(N && U && G && W.length)), 1073807366 & e.$$.dirty[0] && U && G && N && (Oe = 0, N.resize(U, G, R)), 4 & e.$$.dirty[1] && o(32, n = i ? vc() ? Be : Ae : r), 6 & e.$$.dirty[1] && i && n && n() + }, [b, U, G, y, q, K, J, Q, ee, x, v, w, S, k, C, M, R, P, E, I, A, L, z, F, O, D, B, W, V, _, N, Y, n, i, l, u, function(e) { + ta[e ? "unshift" : "push"]((() => { + b = e, o(0, b) + })) + }, e => { + o(1, U = e.detail.width), o(2, G = e.detail.height), y("measure", { + width: U, + height: G + }) + }] +} +class Tc extends Fa { + constructor(e) { + super(), za(this, e, Cc, kc, Qr, { + isAnimated: 9, + isTransparent: 10, + maskRect: 11, + maskOpacity: 12, + maskFrameOpacity: 13, + maskMarkupOpacity: 14, + clipAnnotationsToImage: 15, + pixelRatio: 16, + textPixelRatio: 17, + backgroundColor: 18, + willRender: 19, + didRender: 20, + willRequest: 21, + loadImageData: 22, + enableGrid: 23, + gridColors: 24, + gridSize: 25, + gridOpacity: 26, + images: 27, + interfaceImages: 28, + selectionColor: 29 + }, null, [-1, -1, -1]) + } +} +var Mc = (e, t = Boolean, o = " ") => e.filter(t).join(o); + +function Rc(e, t, o) { + const i = e.slice(); + return i[17] = t[o], i +} +const Pc = e => ({ + tab: 4 & e + }), + Ec = e => ({ + tab: e[17] + }); + +function Ic(e) { + let t, o, i, r = [], + n = new Map, + a = e[2]; + const s = e => e[17].id; + for (let t = 0; t < a.length; t += 1) { + let o = Rc(e, a, t), + i = s(o); + n.set(i, r[t] = Ac(i, o)) + } + return { + c() { + t = kn("ul"); + for (let e = 0; e < r.length; e += 1) r[e].c(); + An(t, "class", o = Mc(["PinturaTabList", e[0]])), An(t, "role", "tablist"), An(t, "data-layout", e[1]) + }, + m(o, n) { + wn(o, t, n); + for (let e = 0; e < r.length; e += 1) r[e].m(t, null); + e[14](t), i = !0 + }, + p(e, l) { + 1124 & l && (a = e[2], ya(), r = Ma(r, l, s, 1, e, a, n, t, Ta, Ac, null, Rc), ba()), (!i || 1 & l && o !== (o = Mc(["PinturaTabList", e[0]]))) && An(t, "class", o), (!i || 2 & l) && An(t, "data-layout", e[1]) + }, + i(e) { + if (!i) { + for (let e = 0; e < a.length; e += 1) xa(r[e]); + i = !0 + } + }, + o(e) { + for (let e = 0; e < r.length; e += 1) va(r[e]); + i = !1 + }, + d(o) { + o && Sn(t); + for (let e = 0; e < r.length; e += 1) r[e].d(); + e[14](null) + } + } +} + +function Ac(e, t) { + let o, i, r, n, a, s, l, c, d, u; + const h = t[11].default, + p = rn(h, t, t[10], Ec); + + function m(...e) { + return t[12](t[17], ...e) + } + + function g(...e) { + return t[13](t[17], ...e) + } + return { + key: e, + first: null, + c() { + o = kn("li"), i = kn("button"), p && p.c(), n = Mn(), An(i, "type", "button"), i.disabled = r = t[17].disabled, An(o, "role", "tab"), An(o, "aria-controls", a = t[17].href.substr(1)), An(o, "id", s = t[17].tabId), An(o, "aria-selected", l = t[17].selected), this.first = o + }, + m(e, t) { + wn(e, o, t), bn(o, i), p && p.m(i, null), bn(o, n), c = !0, d || (u = [Pn(i, "keydown", m), Pn(i, "click", g)], d = !0) + }, + p(e, n) { + t = e, p && p.p && (!c || 1028 & n) && sn(p, h, t, t[10], c ? an(h, t[10], n, Pc) : ln(t[10]), Ec), (!c || 4 & n && r !== (r = t[17].disabled)) && (i.disabled = r), (!c || 4 & n && a !== (a = t[17].href.substr(1))) && An(o, "aria-controls", a), (!c || 4 & n && s !== (s = t[17].tabId)) && An(o, "id", s), (!c || 4 & n && l !== (l = t[17].selected)) && An(o, "aria-selected", l) + }, + i(e) { + c || (xa(p, e), c = !0) + }, + o(e) { + va(p, e), c = !1 + }, + d(e) { + e && Sn(o), p && p.d(e), d = !1, Kr(u) + } + } +} + +function Lc(e) { + let t, o, i = e[4] && Ic(e); + return { + c() { + i && i.c(), t = Rn() + }, + m(e, r) { + i && i.m(e, r), wn(e, t, r), o = !0 + }, + p(e, [o]) { + e[4] ? i ? (i.p(e, o), 16 & o && xa(i, 1)) : (i = Ic(e), i.c(), xa(i, 1), i.m(t.parentNode, t)) : i && (ya(), va(i, 1, 1, (() => { + i = null + })), ba()) + }, + i(e) { + o || (xa(i), o = !0) + }, + o(e) { + va(i), o = !1 + }, + d(e) { + i && i.d(e), e && Sn(t) + } + } +} + +function zc(e, t, o) { + let i, r, n, { + $$slots: a = {}, + $$scope: s + } = t, + { + class: l + } = t, + { + name: c + } = t, + { + selected: d + } = t, + { + tabs: u = [] + } = t, + { + layout: h + } = t; + const p = qn(), + m = e => { + const t = n.querySelectorAll('[role="tab"] button')[e]; + t && t.focus() + }, + g = (e, t) => { + e.preventDefault(), e.stopPropagation(), p("select", t) + }, + $ = ({ + key: e + }, t) => { + if (!/arrow/i.test(e)) return; + const o = u.findIndex((e => e.id === t)); + return /right|down/i.test(e) ? m(o < u.length - 1 ? o + 1 : 0) : /left|up/i.test(e) ? m(o > 0 ? o - 1 : u.length - 1) : void 0 + }; + return e.$$set = e => { + "class" in e && o(0, l = e.class), "name" in e && o(7, c = e.name), "selected" in e && o(8, d = e.selected), "tabs" in e && o(9, u = e.tabs), "layout" in e && o(1, h = e.layout), "$$scope" in e && o(10, s = e.$$scope) + }, e.$$.update = () => { + 896 & e.$$.dirty && o(2, i = u.map((e => { + const t = e.id === d; + return { + ...e, + tabId: `tab-${c}-${e.id}`, + href: `#panel-${c}-${e.id}`, + selected: t + } + }))), 4 & e.$$.dirty && o(4, r = i.length > 1) + }, [l, h, i, n, r, g, $, c, d, u, s, a, (e, t) => $(t, e.id), (e, t) => g(t, e.id), function(e) { + ta[e ? "unshift" : "push"]((() => { + n = e, o(3, n) + })) + }] +} +class Fc extends Fa { + constructor(e) { + super(), za(this, e, zc, Lc, Qr, { + class: 0, + name: 7, + selected: 8, + tabs: 9, + layout: 1 + }) + } +} +const Oc = e => ({ + panel: 16 & e + }), + Dc = e => ({ + panel: e[4][0].id, + panelIsActive: !0 + }); + +function Bc(e, t, o) { + const i = e.slice(); + return i[14] = t[o].id, i[15] = t[o].shouldDraw, i[16] = t[o].panelId, i[17] = t[o].tabindex, i[18] = t[o].labelledBy, i[19] = t[o].isActive, i[20] = t[o].hidden, i[3] = t[o].visible, i +} +const Wc = e => ({ + panel: 16 & e, + panelIsActive: 16 & e + }), + Vc = e => ({ + panel: e[14], + panelIsActive: e[19] + }); + +function _c(e) { + let t, o, i, r, n, a; + const s = e[11].default, + l = rn(s, e, e[10], Dc); + return { + c() { + t = kn("div"), o = kn("div"), l && l.c(), An(o, "class", i = Mc([e[1]])), An(t, "class", e[0]), An(t, "style", e[2]) + }, + m(i, s) { + wn(i, t, s), bn(t, o), l && l.m(o, null), r = !0, n || (a = [Pn(t, "measure", e[13]), hn($c.call(null, t))], n = !0) + }, + p(e, n) { + l && l.p && (!r || 1040 & n) && sn(l, s, e, e[10], r ? an(s, e[10], n, Oc) : ln(e[10]), Dc), (!r || 2 & n && i !== (i = Mc([e[1]]))) && An(o, "class", i), (!r || 1 & n) && An(t, "class", e[0]), (!r || 4 & n) && An(t, "style", e[2]) + }, + i(e) { + r || (xa(l, e), r = !0) + }, + o(e) { + va(l, e), r = !1 + }, + d(e) { + e && Sn(t), l && l.d(e), n = !1, Kr(a) + } + } +} + +function Nc(e) { + let t, o, i, r, n, a = [], + s = new Map, + l = e[4]; + const c = e => e[14]; + for (let t = 0; t < l.length; t += 1) { + let o = Bc(e, l, t), + i = c(o); + s.set(i, a[t] = jc(i, o)) + } + return { + c() { + t = kn("div"); + for (let e = 0; e < a.length; e += 1) a[e].c(); + An(t, "class", o = Mc(["PinturaTabPanels", e[0]])), An(t, "style", e[2]) + }, + m(o, s) { + wn(o, t, s); + for (let e = 0; e < a.length; e += 1) a[e].m(t, null); + i = !0, r || (n = [Pn(t, "measure", e[12]), hn($c.call(null, t, { + observePosition: !0 + }))], r = !0) + }, + p(e, r) { + 1042 & r && (l = e[4], ya(), a = Ma(a, r, c, 1, e, l, s, t, Ta, jc, null, Bc), ba()), (!i || 1 & r && o !== (o = Mc(["PinturaTabPanels", e[0]]))) && An(t, "class", o), (!i || 4 & r) && An(t, "style", e[2]) + }, + i(e) { + if (!i) { + for (let e = 0; e < l.length; e += 1) xa(a[e]); + i = !0 + } + }, + o(e) { + for (let e = 0; e < a.length; e += 1) va(a[e]); + i = !1 + }, + d(e) { + e && Sn(t); + for (let e = 0; e < a.length; e += 1) a[e].d(); + r = !1, Kr(n) + } + } +} + +function Hc(e) { + let t; + const o = e[11].default, + i = rn(o, e, e[10], Vc); + return { + c() { + i && i.c() + }, + m(e, o) { + i && i.m(e, o), t = !0 + }, + p(e, r) { + i && i.p && (!t || 1040 & r) && sn(i, o, e, e[10], t ? an(o, e[10], r, Wc) : ln(e[10]), Vc) + }, + i(e) { + t || (xa(i, e), t = !0) + }, + o(e) { + va(i, e), t = !1 + }, + d(e) { + i && i.d(e) + } + } +} + +function jc(e, t) { + let o, i, r, n, a, s, l, c, d, u = t[15] && Hc(t); + return { + key: e, + first: null, + c() { + o = kn("div"), u && u.c(), i = Mn(), An(o, "class", r = Mc(["PinturaTabPanel", t[1]])), o.hidden = n = t[20], An(o, "id", a = t[16]), An(o, "tabindex", s = t[17]), An(o, "aria-labelledby", l = t[18]), An(o, "data-inert", c = !t[3]), this.first = o + }, + m(e, t) { + wn(e, o, t), u && u.m(o, null), bn(o, i), d = !0 + }, + p(e, h) { + (t = e)[15] ? u ? (u.p(t, h), 16 & h && xa(u, 1)) : (u = Hc(t), u.c(), xa(u, 1), u.m(o, i)): u && (ya(), va(u, 1, 1, (() => { + u = null + })), ba()), (!d || 2 & h && r !== (r = Mc(["PinturaTabPanel", t[1]]))) && An(o, "class", r), (!d || 16 & h && n !== (n = t[20])) && (o.hidden = n), (!d || 16 & h && a !== (a = t[16])) && An(o, "id", a), (!d || 16 & h && s !== (s = t[17])) && An(o, "tabindex", s), (!d || 16 & h && l !== (l = t[18])) && An(o, "aria-labelledby", l), (!d || 16 & h && c !== (c = !t[3])) && An(o, "data-inert", c) + }, + i(e) { + d || (xa(u), d = !0) + }, + o(e) { + va(u), d = !1 + }, + d(e) { + e && Sn(o), u && u.d() + } + } +} + +function Uc(e) { + let t, o, i, r; + const n = [Nc, _c], + a = []; + + function s(e, t) { + return e[5] ? 0 : 1 + } + return t = s(e), o = a[t] = n[t](e), { + c() { + o.c(), i = Rn() + }, + m(e, o) { + a[t].m(e, o), wn(e, i, o), r = !0 + }, + p(e, [r]) { + let l = t; + t = s(e), t === l ? a[t].p(e, r) : (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba(), o = a[t], o ? o.p(e, r) : (o = a[t] = n[t](e), o.c()), xa(o, 1), o.m(i.parentNode, i)) + }, + i(e) { + r || (xa(o), r = !0) + }, + o(e) { + va(o), r = !1 + }, + d(e) { + a[t].d(e), e && Sn(i) + } + } +} + +function Gc(e, t, o) { + let i, r, { + $$slots: n = {}, + $$scope: a + } = t, + { + class: s + } = t, + { + name: l + } = t, + { + selected: c + } = t, + { + panelClass: d + } = t, + { + panels: u = [] + } = t, + { + visible: h + } = t, + { + style: p + } = t; + const m = {}; + return e.$$set = e => { + "class" in e && o(0, s = e.class), "name" in e && o(6, l = e.name), "selected" in e && o(7, c = e.selected), "panelClass" in e && o(1, d = e.panelClass), "panels" in e && o(8, u = e.panels), "visible" in e && o(3, h = e.visible), "style" in e && o(2, p = e.style), "$$scope" in e && o(10, a = e.$$scope) + }, e.$$.update = () => { + 968 & e.$$.dirty && o(4, i = u.map((e => { + const t = e === c; + t && o(9, m[e] = !0, m); + const i = h ? -1 !== h.indexOf(e) : t; + return { + id: e, + panelId: `panel-${l}-${e}`, + labelledBy: `tab-${l}-${e}`, + isActive: t, + hidden: !t, + visible: i, + tabindex: t ? 0 : -1, + shouldDraw: t || m[e] + } + }))), 16 & e.$$.dirty && o(5, r = i.length > 1) + }, [s, d, p, h, i, r, l, c, u, m, a, n, function(t) { + Qn.call(this, e, t) + }, function(t) { + Qn.call(this, e, t) + }] +} +class Zc extends Fa { + constructor(e) { + super(), za(this, e, Gc, Uc, Qr, { + class: 0, + name: 6, + selected: 7, + panelClass: 1, + panels: 8, + visible: 3, + style: 2 + }) + } +} +var Xc = e => { + const t = Object.getOwnPropertyDescriptors(e.prototype); + return Object.keys(t).filter((e => !!t[e].get)) +}; + +function Yc(e) { + let t, o, i, r; + const n = [e[4]]; + + function a(t) { + e[22](t) + } + var s = e[10]; + + function l(e) { + let t = {}; + for (let e = 0; e < n.length; e += 1) t = Xr(t, n[e]); + return void 0 !== e[2] && (t.name = e[2]), { + props: t + } + } + return s && (t = Wn(s, l(e)), ta.push((() => Ea(t, "name", a))), e[23](t), t.$on("measure", e[11])), { + c() { + t && Ia(t.$$.fragment), i = Rn() + }, + m(e, o) { + t && Aa(t, e, o), wn(e, i, o), r = !0 + }, + p(e, r) { + const c = 16 & r[0] ? Ra(n, [Pa(e[4])]) : {}; + if (!o && 4 & r[0] && (o = !0, c.name = e[2], ca((() => o = !1))), s !== (s = e[10])) { + if (t) { + ya(); + const e = t; + va(e.$$.fragment, 1, 0, (() => { + La(e, 1) + })), ba() + } + s ? (t = Wn(s, l(e)), ta.push((() => Ea(t, "name", a))), e[23](t), t.$on("measure", e[11]), Ia(t.$$.fragment), xa(t.$$.fragment, 1), Aa(t, i.parentNode, i)) : t = null + } else s && t.$set(c) + }, + i(e) { + r || (t && xa(t.$$.fragment, e), r = !0) + }, + o(e) { + t && va(t.$$.fragment, e), r = !1 + }, + d(o) { + e[23](null), o && Sn(i), t && La(t, o) + } + } +} + +function qc(e) { + let t, o, i, r = e[5] && Yc(e); + return { + c() { + t = kn("div"), r && r.c(), An(t, "data-util", e[2]), An(t, "class", o = Mc(["PinturaUtilPanel", e[1]])), An(t, "style", e[6]) + }, + m(o, n) { + wn(o, t, n), r && r.m(t, null), e[24](t), i = !0 + }, + p(e, n) { + e[5] ? r ? (r.p(e, n), 32 & n[0] && xa(r, 1)) : (r = Yc(e), r.c(), xa(r, 1), r.m(t, null)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), (!i || 4 & n[0]) && An(t, "data-util", e[2]), (!i || 2 & n[0] && o !== (o = Mc(["PinturaUtilPanel", e[1]]))) && An(t, "class", o), (!i || 64 & n[0]) && An(t, "style", e[6]) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(o) { + o && Sn(t), r && r.d(), e[24](null) + } + } +} + +function Kc(e, t, o) { + let i, r, n, a, s, l; + const c = qn(); + let { + isActive: d = !0 + } = t, { + stores: u + } = t, { + content: h + } = t, { + component: p + } = t, { + locale: m + } = t, { + class: g + } = t; + const $ = Jn("isAnimated"); + let f; + on(e, $, (e => o(21, l = e))); + const y = ec(0), + b = Wa(y, (e => rs(e, 0, 1))); + on(e, b, (e => o(20, s = e))); + let x = !d; + const v = Ba(d); + on(e, v, (e => o(25, a = e))); + const w = { + isActive: Wa(v, (async (e, t) => { + if (!e) return t(e); + await sa(), t(e) + })), + isActiveFraction: Wa(b, (e => e)), + isVisible: Wa(b, (e => e > 0)) + }, + S = h.view, + k = Xc(S), + C = Object.keys(h.props || {}).reduce(((e, t) => k.includes(t) ? (e[t] = h.props[t], e) : e), {}), + T = Object.keys(w).reduce(((e, t) => k.includes(t) ? (e[t] = w[t], e) : e), {}); + let M, R; + const P = e => { + o(17, f = { + ...e.detail + }), I && d && c("measure", { + ...f + }) + }; + Kn("measurable", $c); + const E = Gn().$$.context; + let I = !1; + return Zn((() => { + if (o(19, I = !0), n) return; + o(0, p = new S({ + target: R, + props: { + ...r + }, + context: E + })), o(2, M = p.name); + const e = p.$on("measure", P); + return () => { + e(), p.$destroy() + } + })), e.$$set = e => { + "isActive" in e && o(12, d = e.isActive), "stores" in e && o(13, u = e.stores), "content" in e && o(14, h = e.content), "component" in e && o(0, p = e.component), "locale" in e && o(15, m = e.locale), "class" in e && o(1, g = e.class) + }, e.$$.update = () => { + 135169 & e.$$.dirty[0] && f && d && p && c("measure", f), 2101248 & e.$$.dirty[0] && y.set(d ? 1 : 0, { + hard: !1 === l + }), 1310720 & e.$$.dirty[0] && (s <= 0 && !x ? o(18, x = !0) : s > 0 && x && o(18, x = !1)), 786432 & e.$$.dirty[0] && I && c(x ? "hide" : "show"), 1048576 & e.$$.dirty[0] && c("fade", s), 1048576 & e.$$.dirty[0] && o(6, i = s < 1 ? "opacity: " + s : void 0), 4096 & e.$$.dirty[0] && un(v, a = d, a), 40960 & e.$$.dirty[0] && o(4, r = { + ...C, + ...T, + stores: u, + locale: m + }) + }, o(5, n = !k.includes("external")), [p, g, M, R, r, n, i, $, b, v, S, P, d, u, h, m, y, f, x, I, s, l, function(e) { + M = e, o(2, M) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + p = e, o(0, p) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + R = e, o(3, R) + })) + }] +} +class Jc extends Fa { + constructor(e) { + super(), za(this, e, Kc, qc, Qr, { + isActive: 12, + stores: 13, + content: 14, + component: 0, + locale: 15, + class: 1, + opacity: 16 + }, null, [-1, -1]) + } + get opacity() { + return this.$$.ctx[16] + } +} + +function Qc(e) { + let t, o, i; + const r = e[5].default, + n = rn(r, e, e[4], null); + return { + c() { + t = Cn("svg"), n && n.c(), An(t, "class", e[3]), An(t, "style", e[2]), An(t, "width", e[0]), An(t, "height", e[1]), An(t, "viewBox", o = "0 0 " + e[0] + "\n " + e[1]), An(t, "xmlns", "http://www.w3.org/2000/svg"), An(t, "aria-hidden", "true"), An(t, "focusable", "false"), An(t, "stroke-linecap", "round"), An(t, "stroke-linejoin", "round") + }, + m(e, o) { + wn(e, t, o), n && n.m(t, null), i = !0 + }, + p(e, [a]) { + n && n.p && (!i || 16 & a) && sn(n, r, e, e[4], i ? an(r, e[4], a, null) : ln(e[4]), null), (!i || 8 & a) && An(t, "class", e[3]), (!i || 4 & a) && An(t, "style", e[2]), (!i || 1 & a) && An(t, "width", e[0]), (!i || 2 & a) && An(t, "height", e[1]), (!i || 3 & a && o !== (o = "0 0 " + e[0] + "\n " + e[1])) && An(t, "viewBox", o) + }, + i(e) { + i || (xa(n, e), i = !0) + }, + o(e) { + va(n, e), i = !1 + }, + d(e) { + e && Sn(t), n && n.d(e) + } + } +} + +function ed(e, t, o) { + let { + $$slots: i = {}, + $$scope: r + } = t, { + width: n = 24 + } = t, { + height: a = 24 + } = t, { + style: s + } = t, { + class: l + } = t; + return e.$$set = e => { + "width" in e && o(0, n = e.width), "height" in e && o(1, a = e.height), "style" in e && o(2, s = e.style), "class" in e && o(3, l = e.class), "$$scope" in e && o(4, r = e.$$scope) + }, [n, a, s, l, r, i] +} +class td extends Fa { + constructor(e) { + super(), za(this, e, ed, Qc, Qr, { + width: 0, + height: 1, + style: 2, + class: 3 + }) + } +} +var od = (e, t) => t === e.target || t.contains(e.target), + id = (e, t, o) => { + return (T(t) ? t : e) + (o ? ` (${i=o,i.map((e=>"CMD"===e?ho()?"⌘":"Ctrl":e)).join("+")})` : ""); + var i + }; + +function rd(e) { + let t, o; + return t = new td({ + props: { + class: "PinturaButtonIcon", + $$slots: { + default: [nd] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 536870920 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function nd(e) { + let t; + return { + c() { + t = Cn("g") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[3] + }, + p(e, o) { + 8 & o && (t.innerHTML = e[3]) + }, + d(e) { + e && Sn(t) + } + } +} + +function ad(e) { + let t; + return { + c() { + t = kn("span"), An(t, "class", e[11]) + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[0] + }, + p(e, o) { + 1 & o && (t.innerHTML = e[0]), 2048 & o && An(t, "class", e[11]) + }, + d(e) { + e && Sn(t) + } + } +} + +function sd(e) { + let t, o, i, r, n; + const a = e[27].default, + s = rn(a, e, e[29], null), + l = s || function(e) { + let t, o, i, r = e[3] && rd(e), + n = e[0] && ad(e); + return { + c() { + t = kn("span"), r && r.c(), o = Mn(), n && n.c(), An(t, "class", e[13]) + }, + m(e, a) { + wn(e, t, a), r && r.m(t, null), bn(t, o), n && n.m(t, null), i = !0 + }, + p(e, a) { + e[3] ? r ? (r.p(e, a), 8 & a && xa(r, 1)) : (r = rd(e), r.c(), xa(r, 1), r.m(t, o)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[0] ? n ? n.p(e, a) : (n = ad(e), n.c(), n.m(t, null)) : n && (n.d(1), n = null), (!i || 8192 & a) && An(t, "class", e[13]) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + e && Sn(t), r && r.d(), n && n.d() + } + } + }(e); + return { + c() { + t = kn("button"), l && l.c(), An(t, "type", e[6]), An(t, "style", e[4]), t.disabled = e[5], An(t, "class", e[12]), An(t, "title", o = id(e[0], e[1], e[2])) + }, + m(o, a) { + wn(o, t, a), l && l.m(t, null), e[28](t), i = !0, r || (n = [Pn(t, "keydown", (function() { + Jr(e[8]) && e[8].apply(this, arguments) + })), Pn(t, "click", (function() { + Jr(e[7]) && e[7].apply(this, arguments) + })), Pn(t, "pointerdown", (function() { + Jr(e[14]) && e[14].apply(this, arguments) + })), hn(e[9].call(null, t))], r = !0) + }, + p(r, [n]) { + e = r, s ? s.p && (!i || 536870912 & n) && sn(s, a, e, e[29], i ? an(a, e[29], n, null) : ln(e[29]), null) : l && l.p && (!i || 10249 & n) && l.p(e, i ? n : -1), (!i || 64 & n) && An(t, "type", e[6]), (!i || 16 & n) && An(t, "style", e[4]), (!i || 32 & n) && (t.disabled = e[5]), (!i || 4096 & n) && An(t, "class", e[12]), (!i || 7 & n && o !== (o = id(e[0], e[1], e[2]))) && An(t, "title", o) + }, + i(e) { + i || (xa(l, e), i = !0) + }, + o(e) { + va(l, e), i = !1 + }, + d(o) { + o && Sn(t), l && l.d(o), e[28](null), r = !1, Kr(n) + } + } +} + +function ld(e, t, o) { + let i, n, a, s, l, c, { + $$slots: d = {}, + $$scope: u + } = t, + { + class: h + } = t, + { + label: p + } = t, + { + title: m + } = t, + { + shortcut: g + } = t, + { + labelClass: $ + } = t, + { + innerClass: f + } = t, + { + hideLabel: y = !1 + } = t, + { + icon: b + } = t, + { + style: x + } = t, + { + disabled: v + } = t, + { + type: w = "button" + } = t, + { + onclick: S + } = t, + { + onkeydown: k + } = t, + { + onhold: C + } = t, + { + action: T = (() => {}) + } = t, + { + holdThreshold: M = 500 + } = t, + { + holdSpeedUpFactor: R = .5 + } = t, + { + holdSpeedMin: P = 20 + } = t; + const E = e => { + o(25, c = setTimeout((() => { + C(), E(Math.max(e * R, P)) + }), e)) + }; + let I; + return e.$$set = e => { + "class" in e && o(15, h = e.class), "label" in e && o(0, p = e.label), "title" in e && o(1, m = e.title), "shortcut" in e && o(2, g = e.shortcut), "labelClass" in e && o(16, $ = e.labelClass), "innerClass" in e && o(17, f = e.innerClass), "hideLabel" in e && o(18, y = e.hideLabel), "icon" in e && o(3, b = e.icon), "style" in e && o(4, x = e.style), "disabled" in e && o(5, v = e.disabled), "type" in e && o(6, w = e.type), "onclick" in e && o(7, S = e.onclick), "onkeydown" in e && o(8, k = e.onkeydown), "onhold" in e && o(19, C = e.onhold), "action" in e && o(9, T = e.action), "holdThreshold" in e && o(20, M = e.holdThreshold), "holdSpeedUpFactor" in e && o(21, R = e.holdSpeedUpFactor), "holdSpeedMin" in e && o(22, P = e.holdSpeedMin), "$$scope" in e && o(29, u = e.$$scope) + }, e.$$.update = () => { + 101187584 & e.$$.dirty && o(26, n = C ? () => { + c && (clearTimeout(c), o(25, c = void 0), document.documentElement.removeEventListener("pointerup", n)) + } : r), 68681728 & e.$$.dirty && o(14, i = C ? () => { + document.documentElement.addEventListener("pointerup", n), E(M) + } : r), 131072 & e.$$.dirty && o(13, a = Mc(["PinturaButtonInner", f])), 294912 & e.$$.dirty && o(12, s = Mc(["PinturaButton", y && "PinturaButtonIconOnly", h])), 327680 & e.$$.dirty && o(11, l = Mc([y ? "implicit" : "PinturaButtonLabel", $])) + }, [p, m, g, b, x, v, w, S, k, T, I, l, s, a, i, h, $, f, y, C, M, R, P, e => od(e, I), () => I, c, n, d, function(e) { + ta[e ? "unshift" : "push"]((() => { + I = e, o(10, I) + })) + }, u] +} +class cd extends Fa { + constructor(e) { + super(), za(this, e, ld, sd, Qr, { + class: 15, + label: 0, + title: 1, + shortcut: 2, + labelClass: 16, + innerClass: 17, + hideLabel: 18, + icon: 3, + style: 4, + disabled: 5, + type: 6, + onclick: 7, + onkeydown: 8, + onhold: 19, + action: 9, + holdThreshold: 20, + holdSpeedUpFactor: 21, + holdSpeedMin: 22, + isEventTarget: 23, + getElement: 24 + }) + } + get isEventTarget() { + return this.$$.ctx[23] + } + get getElement() { + return this.$$.ctx[24] + } +} +var dd = (e, t) => { + const o = e.findIndex(t); + if (o >= 0) return e.splice(o, 1) +}; +const ud = 80; +var hd = (e, t = {}) => { + const { + inertia: o = !1, + inertiaDurationMultiplier: i = ud, + shouldStartInteraction: r = (() => !0), + pinch: n = !1, + multiTouch: a, + getEventPosition: s = (e => ce(e.clientX, e.clientY)), + observeKeys: l = !1 + } = t; + + function c(t, o) { + e.dispatchEvent(new CustomEvent(t, { + detail: o + })) + } + + function d() { + w && w(), w = void 0 + } + const u = [], + h = e => 0 === e.timeStamp ? Date.now() : e.timeStamp, + p = () => { + const e = ue(u[0].position); + if (u[1]) { + const t = .5 * (u[1].position.x - e.x), + o = .5 * (u[1].position.y - e.y); + e.x += t, e.y += o + } + return e + }, + m = e => { + e.origin.x = e.position.x, e.origin.y = e.position.y, e.translation.x = 0, e.translation.y = 0 + }, + g = e => { + const t = (e => u.findIndex((t => t.event.pointerId === e.pointerId)))(e); + if (!(t < 0)) return u[t] + }, + $ = () => 1 === u.length, + f = () => 2 === u.length, + y = e => { + const t = Re(e.map((e => e.position))); + return { + center: t, + distance: ((e, t) => e.reduce(((e, o) => e + Te(t, o.position)), 0) / e.length)(e, t), + velocity: Re(e.map((e => e.velocity))), + translation: Re(e.map((e => e.translation))) + } + }; + let b, x, v, w, S, k, C, T, M = 0, + R = void 0; + e.addEventListener("pointerdown", L); + const P = ["Meta", "Control", "Alt", "Shift"]; + + function E(e) { + if (!P.includes(e.key)) return; + const { + metaKey: t, + ctrlKey: o, + altKey: i, + shiftKey: r + } = e; + A({ + metaKey: t, + ctrlKey: o, + altKey: i, + shiftKey: r + }) + } + let I = Date.now(); + const A = e => { + const t = ue(u[0].translation); + let o = C; + if (n && f()) { + o *= Te(u[0].position, u[1].position) / S, be(t, u[1].translation) + } + be(t, k); + const i = Date.now(); + i - I < 16 || (I = i, c("interactionupdate", { + position: p(), + translation: t, + scalar: n ? o : void 0, + isMultiTouching: f(), + ...e + })) + }; + + function L(t) { + if (!f() && !(e => Eo(e.button) && 0 !== e.button)(t) && r(t, e)) + if (d(), (e => { + const t = h(e), + o = { + timeStamp: t, + timeStampInitial: t, + position: s(e), + origin: s(e), + velocity: le(), + velocityHistory: [], + velocityAverage: le(), + translation: le(), + interactionState: void 0, + event: e + }; + u.push(o), o.interactionState = y(u) + })(t), l && (window.addEventListener("keydown", E), window.addEventListener("keyup", E)), $()) document.documentElement.addEventListener("pointermove", z), document.documentElement.addEventListener("pointerup", F), document.documentElement.addEventListener("pointercancel", F), document.addEventListener("visibilitychange", D), T = !1, C = 1, k = le(), S = void 0, c("interactionstart", { + origin: ue(g(t).origin) + }); + else if (n) T = !0, S = Te(u[0].position, u[1].position), k.x += u[0].translation.x, k.y += u[0].translation.y, m(u[0]); + else if (!1 === a) return u.length = 0, W(), c("interactioncancel") + } + + function z(e) { + e.preventDefault(), (e => { + const t = g(e); + if (!t) return; + const o = h(e), + i = s(e), + r = Math.max(1, o - t.timeStamp); + t.velocity.x = (i.x - t.position.x) / r, t.velocity.y = (i.y - t.position.y) / r, t.velocityHistory.push(ue(t.velocity)), t.velocityHistory = t.velocityHistory.slice(-3), t.velocityAverage = t.velocityHistory.reduce(((e, t, o, i) => (e.x += t.x / i.length, e.y += t.y / i.length, e)), le()), t.translation.x = i.x - t.origin.x, t.translation.y = i.y - t.origin.y, t.timeStamp = o, t.position.x = i.x, t.position.y = i.y, t.event = e + })(e); + const { + metaKey: t = !1, + ctrlKey: o = !1, + altKey: i = !1, + shiftKey: r = !1 + } = l ? e : {}; + A({ + metaKey: t, + ctrlKey: o, + altKey: i, + shiftKey: r + }) + } + + function F(e) { + if (!g(e)) return; + const t = p(), + r = (e => { + const t = dd(u, (t => t.event.pointerId === e.pointerId)); + if (t) return t[0] + })(e); + if (n && $()) { + const e = Te(u[0].position, r.position); + C *= e / S, k.x += u[0].translation.x + r.translation.x, k.y += u[0].translation.y + r.translation.y, m(u[0]) + } + let a = !1, + s = !1; + if (!T && r) { + const e = performance.now(), + t = e - r.timeStampInitial, + o = Ce(r.translation); + a = o < 64 && t < 300, s = !!(R && a && e - M < 700 && Ce(R, r.position) < 128), a && (R = ue(r.position), M = e) + } + if (u.length > 0) return; + W(); + const l = ue(r.translation), + d = ue(r.velocityAverage); + let h = !1; + c("interactionrelease", { + isTap: a, + isDoubleTap: s, + position: t, + translation: l, + scalar: C, + preventInertia: () => h = !0 + }); + const f = Te(d); + if (h || !o || f < .25) return B(l, { + isTap: a, + isDoubleTap: s + }); + x = ue(t), v = ue(l), b = Jl(ue(l), { + easing: Yl, + duration: f * i + }), b.set({ + x: l.x + 50 * d.x, + y: l.y + 50 * d.y + }).then((() => { + w && B(tn(b), { + isTap: a, + isDoubleTap: s + }) + })), w = b.subscribe(O) + } + + function O(e) { + e && c("interactionupdate", { + position: ce(x.x + (e.x - v.x), x.y + (e.y - v.y)), + translation: e, + scalar: n ? C : void 0 + }) + } + + function D(e) { + if ("visible" === document.visibilityState || !u.length) return; + const t = y(u); + d(), c("interactionend", { + ...t + }), u.length = 0, W() + } + + function B(e, t) { + d(), c("interactionend", { + ...t, + translation: e, + scalar: n ? C : void 0 + }) + } + + function W() { + l && window.removeEventListener("keydown", E), l && window.removeEventListener("keyup", E), document.documentElement.removeEventListener("pointermove", z), document.documentElement.removeEventListener("pointerup", F), document.documentElement.removeEventListener("pointercancel", F), document.addEventListener("visibilitychange", D) + } + return { + destroy() { + d(), e.removeEventListener("pointerdown", L) + } + } + }, + pd = (e, t = {}) => { + const { + direction: o, + shiftMultiplier: i = 10, + bubbles: r = !1, + preventDefault: n = !1, + stopKeydownPropagation: a = !0 + } = t, s = "horizontal" === o, l = "vertical" === o, c = t => { + const { + key: o + } = t, c = t.shiftKey, d = /up|down/i.test(o), u = /left|right/i.test(o); + if (!u && !d) return; + if (s && d) return; + if (l && u) return; + const h = c ? i : 1; + a && t.stopPropagation(), n && t.preventDefault(), e.dispatchEvent(new CustomEvent("nudge", { + bubbles: r, + detail: ce((/left/i.test(o) ? -1 : /right/i.test(o) ? 1 : 0) * h, (/up/i.test(o) ? -1 : /down/i.test(o) ? 1 : 0) * h) + })) + }; + return e.addEventListener("keydown", c), { + destroy() { + e.removeEventListener("keydown", c) + } + } + }; + +function md(e, t) { + return t ? t * Math.sign(e) * Math.log10(1 + Math.abs(e) / t) : e +} +const gd = (e, t, o) => { + if (!t || !o) return { + ...e + }; + const i = e.x + md(t.x - e.x, o), + r = e.x + e.width + md(t.x + t.width - (e.x + e.width), o), + n = e.y + md(t.y - e.y, o); + return { + x: i, + y: n, + width: r - i, + height: e.y + e.height + md(t.y + t.height - (e.y + e.height), o) - n + } + }, + $d = (e, t, o) => t && o ? ce(e.x + md(t.x - e.x, o), e.y + md(t.y - e.y, o)) : { + ...e + }; +var fd = (e, t) => { + if (e) return /em/.test(e) ? 16 * parseInt(e, 10) : /px/.test(e) ? parseInt(e, 10) : void 0 + }, + yd = e => { + let t = e.detail || 0; + const { + deltaX: o, + deltaY: i, + wheelDelta: r, + wheelDeltaX: n, + wheelDeltaY: a + } = e; + return Eo(n) && Math.abs(n) > Math.abs(a) ? t = n / -120 : Eo(o) && Math.abs(o) > Math.abs(i) ? t = o / 20 : (r || a) && (t = (r || a) / -120), t || (t = i / 20), (Xo() || Gt()) && (t *= 2), t + }; + +function bd(e) { + let t, o, i, r, n, a, s; + const l = e[36].default, + c = rn(l, e, e[35], null); + return { + c() { + t = kn("div"), o = kn("div"), c && c.c(), An(o, "style", e[5]), An(t, "class", i = Mc(["PinturaScrollable", e[0]])), An(t, "style", e[4]), An(t, "data-direction", e[1]), An(t, "data-state", e[6]) + }, + m(i, l) { + wn(i, t, l), bn(t, o), c && c.m(o, null), e[38](t), n = !0, a || (s = [Pn(o, "interactionstart", e[8]), Pn(o, "interactionupdate", e[10]), Pn(o, "interactionend", e[11]), Pn(o, "interactionrelease", e[9]), hn(hd.call(null, o, { + inertia: !0 + })), Pn(o, "measure", e[37]), hn($c.call(null, o)), Pn(t, "wheel", e[13], { + passive: !1 + }), Pn(t, "scroll", e[15]), Pn(t, "focusin", e[14]), Pn(t, "nudge", e[16]), Pn(t, "measure", e[12]), hn($c.call(null, t, { + observePosition: !0 + })), hn(r = pd.call(null, t, { + direction: "x" === e[1] ? "horizontal" : "vertical", + stopKeydownPropagation: !1 + }))], a = !0) + }, + p(e, a) { + c && c.p && (!n || 16 & a[1]) && sn(c, l, e, e[35], n ? an(l, e[35], a, null) : ln(e[35]), null), (!n || 32 & a[0]) && An(o, "style", e[5]), (!n || 1 & a[0] && i !== (i = Mc(["PinturaScrollable", e[0]]))) && An(t, "class", i), (!n || 16 & a[0]) && An(t, "style", e[4]), (!n || 2 & a[0]) && An(t, "data-direction", e[1]), (!n || 64 & a[0]) && An(t, "data-state", e[6]), r && Jr(r.update) && 2 & a[0] && r.update.call(null, { + direction: "x" === e[1] ? "horizontal" : "vertical", + stopKeydownPropagation: !1 + }) + }, + i(e) { + n || (xa(c, e), n = !0) + }, + o(e) { + va(c, e), n = !1 + }, + d(o) { + o && Sn(t), c && c.d(o), e[38](null), a = !1, Kr(s) + } + } +} + +function xd(e, t, o) { + let i, n, a, s, l, c, d, u, { + $$slots: h = {}, + $$scope: p + } = t; + const m = qn(); + let g, $, f, y, b = "idle", + x = ec(0); + on(e, x, (e => o(34, u = e))); + let v, { + class: w + } = t, + { + scrollBlockInteractionDist: S = 5 + } = t, + { + scrollStep: k = 10 + } = t, + { + scrollFocusMargin: C = 64 + } = t, + { + scrollDirection: T = "x" + } = t, + { + scrollAutoCancel: M = !1 + } = t, + { + elasticity: R = 0 + } = t, + { + onscroll: P = r + } = t, + { + maskFeatherSize: E + } = t, + { + maskFeatherStartOpacity: I + } = t, + { + maskFeatherEndOpacity: A + } = t, + { + scroll: L + } = t, + z = "", + F = !0; + const O = x.subscribe((e => { + const t = le(); + t[T] = e, P(t) + })), + D = e => Math.max(Math.min(0, e), f[i] - $[i]); + let B, W, V; + const _ = (e, t = {}) => { + const { + elastic: i = !1, + animate: r = !1, + preventScrollState: n = !1 + } = t; + Math.abs(e - g) > S && "idle" === b && !y && !n && o(27, b = "scrolling"); + const a = D(e), + s = i && R && !y ? a + md(e - a, R) : a; + let l = !0; + r ? l = !1 : F || (l = !y), F = !1, x.set(s, { + hard: l + }).then((e => { + y && (F = !0) + })) + }; + Yn((() => { + O() + })); + return e.$$set = e => { + "class" in e && o(0, w = e.class), "scrollBlockInteractionDist" in e && o(20, S = e.scrollBlockInteractionDist), "scrollStep" in e && o(21, k = e.scrollStep), "scrollFocusMargin" in e && o(22, C = e.scrollFocusMargin), "scrollDirection" in e && o(1, T = e.scrollDirection), "scrollAutoCancel" in e && o(23, M = e.scrollAutoCancel), "elasticity" in e && o(24, R = e.elasticity), "onscroll" in e && o(25, P = e.onscroll), "maskFeatherSize" in e && o(19, E = e.maskFeatherSize), "maskFeatherStartOpacity" in e && o(17, I = e.maskFeatherStartOpacity), "maskFeatherEndOpacity" in e && o(18, A = e.maskFeatherEndOpacity), "scroll" in e && o(26, L = e.scroll), "$$scope" in e && o(35, p = e.$$scope) + }, e.$$.update = () => { + if (2 & e.$$.dirty[0] && o(31, i = "x" === T ? "width" : "height"), 2 & e.$$.dirty[0] && o(29, n = T.toUpperCase()), 8 & e.$$.dirty[0] && o(33, a = v && getComputedStyle(v)), 8 & e.$$.dirty[0] | 4 & e.$$.dirty[1] && o(32, s = a && fd(a.getPropertyValue("--scrollable-feather-size"))), 268828676 & e.$$.dirty[0] | 11 & e.$$.dirty[1] && null != u && f && null != s && $) { + const e = -1 * u / s, + t = -(f[i] - $[i] - u) / s; + o(17, I = rs(1 - e, 0, 1)), o(18, A = rs(1 - t, 0, 1)), o(19, E = s), o(4, z = `--scrollable-feather-start-opacity: ${I};--scrollable-feather-end-opacity: ${A}`) + } + 67108872 & e.$$.dirty[0] && v && void 0 !== L && (Eo(L) ? _(L) : _(L.scrollOffset, L)), 268435460 & e.$$.dirty[0] | 1 & e.$$.dirty[1] && o(30, l = f && $ ? $[i] > f[i] : void 0), 1207959552 & e.$$.dirty[0] && o(6, c = Mc([b, l ? "overflows" : void 0])), 1610612736 & e.$$.dirty[0] | 8 & e.$$.dirty[1] && o(5, d = l ? `transform: translate${n}(${u}px)` : void 0) + }, [w, T, $, v, z, d, c, x, () => { + l && (W = !1, B = !0, V = ce(0, 0), y = !1, o(27, b = "idle"), g = tn(x)) + }, ({ + detail: e + }) => { + l && (y = !0, o(27, b = "idle")) + }, ({ + detail: e + }) => { + l && (W || B && (B = !1, Ce(e.translation) < .1) || (!M || "x" !== T || (e => { + const t = ye(ce(e.x - V.x, e.y - V.y), Math.abs); + V = ue(e); + const o = Ce(t), + i = t.x - t.y; + return !(o > 1 && i < -.5) + })(e.translation) ? _(g + e.translation[T], { + elastic: !0 + }) : W = !0)) + }, ({ + detail: e + }) => { + if (!l) return; + if (W) return; + const t = g + e.translation[T], + o = D(t); + F = !1, x.set(o).then((e => { + y && (F = !0) + })) + }, ({ + detail: e + }) => { + o(28, f = e), m("measure", { + x: e.x, + y: e.y, + width: e.width, + height: e.height + }) + }, e => { + if (!l) return; + e.preventDefault(), e.stopPropagation(); + const t = e.shiftKey, + o = yd(e) * (t ? -1 : 1), + i = tn(x); + _(i + o * k, { + animate: !0 + }) + }, e => { + if (!l) return; + if (!y) return; + let t = e.target; + e.target.classList.contains("implicit") && (t = t.parentNode); + const o = t["x" === T ? "offsetLeft" : "offsetTop"], + r = o + t["x" === T ? "offsetWidth" : "offsetHeight"], + n = tn(x), + a = C + E; + n + o < a ? _(-o + a) : n + r > f[i] - a && _(f[i] - r - a, { + animate: !0 + }) + }, () => { + o(3, v["x" === T ? "scrollLeft" : "scrollTop"] = 0, v) + }, ({ + detail: e + }) => { + if (v.querySelector("[data-focus-visible]")) return; + const t = -2 * e[T], + o = tn(x); + _(o + t * k, { + animate: !0, + preventScrollState: !0 + }) + }, I, A, E, S, k, C, M, R, P, L, b, f, n, l, i, s, a, u, p, h, e => o(2, $ = e.detail), function(e) { + ta[e ? "unshift" : "push"]((() => { + v = e, o(3, v) + })) + }] +} +class vd extends Fa { + constructor(e) { + super(), za(this, e, xd, bd, Qr, { + class: 0, + scrollBlockInteractionDist: 20, + scrollStep: 21, + scrollFocusMargin: 22, + scrollDirection: 1, + scrollAutoCancel: 23, + elasticity: 24, + onscroll: 25, + maskFeatherSize: 19, + maskFeatherStartOpacity: 17, + maskFeatherEndOpacity: 18, + scroll: 26 + }, null, [-1, -1]) + } +} + +function wd(e, { + delay: t = 0, + duration: o = 400, + easing: i = Zr +} = {}) { + const r = +getComputedStyle(e).opacity; + return { + delay: t, + duration: o, + easing: i, + css: e => "opacity: " + e * r + } +} + +function Sd(e) { + let t, o, i, r, n; + return { + c() { + t = kn("span"), An(t, "class", "PinturaStatusMessage") + }, + m(o, a) { + wn(o, t, a), t.innerHTML = e[0], i = !0, r || (n = [Pn(t, "measure", (function() { + Jr(e[1]) && e[1].apply(this, arguments) + })), hn($c.call(null, t))], r = !0) + }, + p(o, [r]) { + e = o, (!i || 1 & r) && (t.innerHTML = e[0]) + }, + i(e) { + i || (la((() => { + o || (o = Sa(t, wd, { + duration: 500 + }, !0)), o.run(1) + })), i = !0) + }, + o(e) { + o || (o = Sa(t, wd, { + duration: 500 + }, !1)), o.run(0), i = !1 + }, + d(e) { + e && Sn(t), e && o && o.end(), r = !1, Kr(n) + } + } +} + +function kd(e, t, o) { + let { + text: i + } = t, { + onmeasure: n = r + } = t; + return e.$$set = e => { + "text" in e && o(0, i = e.text), "onmeasure" in e && o(1, n = e.onmeasure) + }, [i, n] +} +class Cd extends Fa { + constructor(e) { + super(), za(this, e, kd, Sd, Qr, { + text: 0, + onmeasure: 1 + }) + } +} + +function Td(e) { + let t, o, i, r, n, a, s, l, c; + return { + c() { + t = kn("span"), o = Cn("svg"), i = Cn("g"), r = Cn("circle"), n = Cn("circle"), a = Mn(), s = kn("span"), l = Tn(e[3]), An(r, "class", "PinturaProgressIndicatorBar"), An(r, "r", "8.5"), An(r, "cx", "10"), An(r, "cy", "10"), An(r, "stroke-linecap", "round"), An(r, "opacity", ".25"), An(n, "class", "PinturaProgressIndicatorFill"), An(n, "r", "8.5"), An(n, "stroke-dasharray", e[2]), An(n, "cx", "10"), An(n, "cy", "10"), An(n, "transform", "rotate(-90) translate(-20)"), An(i, "fill", "none"), An(i, "stroke", "currentColor"), An(i, "stroke-width", "2.5"), An(i, "stroke-linecap", "round"), An(i, "opacity", e[1]), An(o, "width", "20"), An(o, "height", "20"), An(o, "viewBox", "0 0 20 20"), An(o, "xmlns", "http://www.w3.org/2000/svg"), An(o, "aria-hidden", "true"), An(o, "focusable", "false"), An(s, "class", "implicit"), An(t, "class", "PinturaProgressIndicator"), An(t, "data-status", e[0]), An(t, "style", c = "opacity:" + e[4]) + }, + m(e, c) { + wn(e, t, c), bn(t, o), bn(o, i), bn(i, r), bn(i, n), bn(t, a), bn(t, s), bn(s, l) + }, + p(e, [o]) { + 4 & o && An(n, "stroke-dasharray", e[2]), 2 & o && An(i, "opacity", e[1]), 8 & o && Fn(l, e[3]), 1 & o && An(t, "data-status", e[0]), 16 & o && c !== (c = "opacity:" + e[4]) && An(t, "style", c) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t) + } + } +} + +function Md(e, t, o) { + let i, r, n, a, s, l, c; + const d = qn(); + let { + progress: u + } = t, { + min: h = 0 + } = t, { + max: p = 100 + } = t, { + labelBusy: m = "Busy" + } = t, { + opacity: g + } = t; + const $ = ec(g, { + precision: .01 + }); + on(e, $, (e => o(4, c = e))); + const f = ec(0, { + precision: .01 + }), + y = ec(0, { + precision: .01 + }); + on(e, y, (e => o(13, s = e))); + const b = Wa([f], (e => rs(e, h, p))); + on(e, b, (e => o(14, l = e))); + const x = b.subscribe((e => { + 1 === u && Math.round(e) >= 100 && d("complete") + })); + return Zn((() => { + y.set(1) + })), Yn((() => { + x() + })), e.$$set = e => { + "progress" in e && o(8, u = e.progress), "min" in e && o(9, h = e.min), "max" in e && o(10, p = e.max), "labelBusy" in e && o(11, m = e.labelBusy), "opacity" in e && o(12, g = e.opacity) + }, e.$$.update = () => { + 4096 & e.$$.dirty && Eo(g) && $.set(g), 256 & e.$$.dirty && u && u !== 1 / 0 && f.set(100 * u), 18688 & e.$$.dirty && o(3, i = u === 1 / 0 ? m : Math.round(l) + "%"), 16640 & e.$$.dirty && o(2, r = u === 1 / 0 ? "26.5 53" : l / 100 * 53 + " 53"), 8192 & e.$$.dirty && o(1, n = s), 256 & e.$$.dirty && o(0, a = u === 1 / 0 ? "busy" : "loading") + }, [a, n, r, i, c, $, y, b, u, h, p, m, g, s, l] +} +class Rd extends Fa { + constructor(e) { + super(), za(this, e, Md, Td, Qr, { + progress: 8, + min: 9, + max: 10, + labelBusy: 11, + opacity: 12 + }) + } +} + +function Pd(e) { + let t, o, i; + const r = e[5].default, + n = rn(r, e, e[4], null); + return { + c() { + t = kn("span"), n && n.c(), An(t, "class", o = "PinturaStatusAside " + e[0]), An(t, "style", e[1]) + }, + m(e, o) { + wn(e, t, o), n && n.m(t, null), i = !0 + }, + p(e, [a]) { + n && n.p && (!i || 16 & a) && sn(n, r, e, e[4], i ? an(r, e[4], a, null) : ln(e[4]), null), (!i || 1 & a && o !== (o = "PinturaStatusAside " + e[0])) && An(t, "class", o), (!i || 2 & a) && An(t, "style", e[1]) + }, + i(e) { + i || (xa(n, e), i = !0) + }, + o(e) { + va(n, e), i = !1 + }, + d(e) { + e && Sn(t), n && n.d(e) + } + } +} + +function Ed(e, t, o) { + let i, { + $$slots: r = {}, + $$scope: n + } = t, + { + offset: a = 0 + } = t, + { + opacity: s = 0 + } = t, + { + class: l + } = t; + return e.$$set = e => { + "offset" in e && o(2, a = e.offset), "opacity" in e && o(3, s = e.opacity), "class" in e && o(0, l = e.class), "$$scope" in e && o(4, n = e.$$scope) + }, e.$$.update = () => { + 12 & e.$$.dirty && o(1, i = `transform:translateX(${a}px);opacity:${s}`) + }, [l, i, a, s, n, r] +} +class Id extends Fa { + constructor(e) { + super(), za(this, e, Ed, Pd, Qr, { + offset: 2, + opacity: 3, + class: 0 + }) + } +} +const { + document: Ad +} = ka; + +function Ld(e) { + let t, o, i, r; + return { + c() { + t = Mn(), o = kn("button"), An(o, "class", "PinturaImageButton"), An(o, "type", "button"), An(o, "title", e[1]), o.disabled = e[2] + }, + m(n, a) { + wn(n, t, a), wn(n, o, a), o.innerHTML = e[0], e[11](o), i || (r = [Pn(Ad.body, "load", e[5], !0), Pn(Ad.body, "error", e[6], !0), Pn(o, "pointerdown", e[4])], i = !0) + }, + p(e, [t]) { + 1 & t && (o.innerHTML = e[0]), 2 & t && An(o, "title", e[1]), 4 & t && (o.disabled = e[2]) + }, + i: Gr, + o: Gr, + d(n) { + n && Sn(t), n && Sn(o), e[11](null), i = !1, Kr(r) + } + } +} + +function zd(e, t, o) { + let i, { + html: n + } = t, + { + title: a + } = t, + { + onclick: s + } = t, + { + disabled: l = !1 + } = t, + { + ongrab: c = r + } = t, + { + ondrag: d = r + } = t, + { + ondrop: u = r + } = t; + const h = e => Ce(p, ce(e.pageX, e.pageY)) < 256; + let p; + const m = e => { + document.documentElement.removeEventListener("pointermove", g), document.documentElement.removeEventListener("pointerup", m); + const t = ce(e.pageX, e.pageY); + if (Ce(p, t) < 32) return s(e); + h(e) || u(e) + }, + g = e => { + h(e) || d(e) + }, + $ = e => i && i.contains(e) && "IMG" === e.nodeName; + return e.$$set = e => { + "html" in e && o(0, n = e.html), "title" in e && o(1, a = e.title), "onclick" in e && o(7, s = e.onclick), "disabled" in e && o(2, l = e.disabled), "ongrab" in e && o(8, c = e.ongrab), "ondrag" in e && o(9, d = e.ondrag), "ondrop" in e && o(10, u = e.ondrop) + }, e.$$.update = () => { + 8 & e.$$.dirty && i && i.querySelector("img") && o(3, i.dataset.loader = !0, i) + }, [n, a, l, i, e => { + p = ce(e.pageX, e.pageY), c(e), document.documentElement.addEventListener("pointermove", g), document.documentElement.addEventListener("pointerup", m) + }, ({ + target: e + }) => { + $(e) && o(3, i.dataset.load = !0, i) + }, ({ + target: e + }) => { + $(e) && o(3, i.dataset.error = !0, i) + }, s, c, d, u, function(e) { + ta[e ? "unshift" : "push"]((() => { + i = e, o(3, i) + })) + }] +} +class Fd extends Fa { + constructor(e) { + super(), za(this, e, zd, Ld, Qr, { + html: 0, + title: 1, + onclick: 7, + disabled: 2, + ongrab: 8, + ondrag: 9, + ondrop: 10 + }) + } +} + +function Od(e, t, o) { + const i = e.slice(); + return i[14] = t[o], i +} + +function Dd(e, t) { + let o, i, r, n, a, s, l; + + function c() { + return t[10](t[14]) + } + + function d(...e) { + return t[11](t[14], ...e) + } + + function u(...e) { + return t[12](t[14], ...e) + } + + function h(...e) { + return t[13](t[14], ...e) + } + return i = new Fd({ + props: { + onclick: c, + ongrab: d, + ondrag: u, + ondrop: h, + disabled: t[1] || t[14].disabled, + title: t[14].title, + html: t[14].thumb + } + }), { + key: e, + first: null, + c() { + o = kn("li"), Ia(i.$$.fragment), r = Mn(), An(o, "style", t[6]), this.first = o + }, + m(e, c) { + wn(e, o, c), Aa(i, o, null), bn(o, r), a = !0, s || (l = hn(n = t[8].call(null, o, t[14])), s = !0) + }, + p(e, r) { + t = e; + const s = {}; + 5 & r && (s.onclick = c), 9 & r && (s.ongrab = d), 17 & r && (s.ondrag = u), 33 & r && (s.ondrop = h), 3 & r && (s.disabled = t[1] || t[14].disabled), 1 & r && (s.title = t[14].title), 1 & r && (s.html = t[14].thumb), i.$set(s), (!a || 64 & r) && An(o, "style", t[6]), n && Jr(n.update) && 1 & r && n.update.call(null, t[14]) + }, + i(e) { + a || (xa(i.$$.fragment, e), a = !0) + }, + o(e) { + va(i.$$.fragment, e), a = !1 + }, + d(e) { + e && Sn(o), La(i), s = !1, l() + } + } +} + +function Bd(e) { + let t, o, i = [], + r = new Map, + n = e[0]; + const a = e => e[14].id; + for (let t = 0; t < n.length; t += 1) { + let o = Od(e, n, t), + s = a(o); + r.set(s, i[t] = Dd(s, o)) + } + return { + c() { + t = kn("ul"); + for (let e = 0; e < i.length; e += 1) i[e].c(); + An(t, "class", "PinturaImageButtonList") + }, + m(e, r) { + wn(e, t, r); + for (let e = 0; e < i.length; e += 1) i[e].m(t, null); + o = !0 + }, + p(e, [o]) { + 127 & o && (n = e[0], ya(), i = Ma(i, o, a, 1, e, n, r, t, Ta, Dd, null, Od), ba()) + }, + i(e) { + if (!o) { + for (let e = 0; e < n.length; e += 1) xa(i[e]); + o = !0 + } + }, + o(e) { + for (let e = 0; e < i.length; e += 1) va(i[e]); + o = !1 + }, + d(e) { + e && Sn(t); + for (let e = 0; e < i.length; e += 1) i[e].d() + } + } +} + +function Wd(e, t, o) { + let i, r, { + items: n + } = t, + { + disabled: a + } = t, + { + onclickitem: s + } = t, + { + ongrabitem: l + } = t, + { + ondragitem: c + } = t, + { + ondropitem: d + } = t; + const u = ec(0, { + stiffness: .25, + damping: .9 + }); + on(e, u, (e => o(9, r = e))); + Zn((() => u.set(1))); + return e.$$set = e => { + "items" in e && o(0, n = e.items), "disabled" in e && o(1, a = e.disabled), "onclickitem" in e && o(2, s = e.onclickitem), "ongrabitem" in e && o(3, l = e.ongrabitem), "ondragitem" in e && o(4, c = e.ondragitem), "ondropitem" in e && o(5, d = e.ondropitem) + }, e.$$.update = () => { + 512 & e.$$.dirty && o(6, i = "opacity:" + r) + }, [n, a, s, l, c, d, i, u, (e, t) => t.mount && t.mount(e.firstChild, t), r, e => s(e.id), (e, t) => l && l(e.id, t), (e, t) => c && c(e.id, t), (e, t) => d && d(e.id, t)] +} +class Vd extends Fa { + constructor(e) { + super(), za(this, e, Wd, Bd, Qr, { + items: 0, + disabled: 1, + onclickitem: 2, + ongrabitem: 3, + ondragitem: 4, + ondropitem: 5 + }) + } +} +var _d = () => c() && window.devicePixelRatio || 1; +let Nd = null; +var Hd = e => (null === Nd && (Nd = 1 === _d() ? Math.round : e => e), Nd(e)), + jd = (e, t = {}) => { + if (e) { + if (t.preventScroll && Gt()) { + const t = document.body.scrollTop; + return e.focus(), void(document.body.scrollTop = t) + } + e.focus(t) + } + }, + Ud = e => /date|email|number|search|text|url/.test(e.type), + Gd = e => (e => /textarea/i.test(e.nodeName))(e) || Ud(e) || e.isContentEditable; +const Zd = e => ({}), + Xd = e => ({}), + Yd = e => ({}), + qd = e => ({}); + +function Kd(e) { + let t, o; + const i = [e[7]]; + let r = { + $$slots: { + default: [Qd] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), e[44](t), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 128 & o[0] ? Ra(i, [Pa(e[7])]) : {}; + 131072 & o[1] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(o) { + e[44](null), La(t, o) + } + } +} + +function Jd(e) { + let t, o; + const i = [e[7]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), e[43](t), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 128 & o[0] ? Ra(i, [Pa(e[7])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(o) { + e[43](null), La(t, o) + } + } +} + +function Qd(e) { + let t; + const o = e[42].label, + i = rn(o, e, e[48], qd); + return { + c() { + i && i.c() + }, + m(e, o) { + i && i.m(e, o), t = !0 + }, + p(e, r) { + i && i.p && (!t || 131072 & r[1]) && sn(i, o, e, e[48], t ? an(o, e[48], r, Yd) : ln(e[48]), qd) + }, + i(e) { + t || (xa(i, e), t = !0) + }, + o(e) { + va(i, e), t = !1 + }, + d(e) { + i && i.d(e) + } + } +} + +function eu(e) { + let t, o, i, r, n, a, s; + const l = e[42].details, + c = rn(l, e, e[48], Xd); + return { + c() { + t = kn("div"), c && c.c(), o = Mn(), i = kn("span"), An(i, "class", "PinturaPanelTip"), An(i, "style", e[10]), An(t, "class", r = Mc(["PinturaPanel", "pintura-editor-panel", e[2]])), An(t, "tabindex", "-1"), An(t, "style", e[11]) + }, + m(r, l) { + wn(r, t, l), c && c.m(t, null), bn(t, o), bn(t, i), e[45](t), n = !0, a || (s = [Pn(t, "close", e[46]), Pn(t, "keydown", e[18]), Pn(t, "measure", e[47]), hn($c.call(null, t))], a = !0) + }, + p(e, o) { + c && c.p && (!n || 131072 & o[1]) && sn(c, l, e, e[48], n ? an(l, e[48], o, Zd) : ln(e[48]), Xd), (!n || 1024 & o[0]) && An(i, "style", e[10]), (!n || 4 & o[0] && r !== (r = Mc(["PinturaPanel", "pintura-editor-panel", e[2]]))) && An(t, "class", r), (!n || 2048 & o[0]) && An(t, "style", e[11]) + }, + i(e) { + n || (xa(c, e), n = !0) + }, + o(e) { + va(c, e), n = !1 + }, + d(o) { + o && Sn(t), c && c.d(o), e[45](null), a = !1, Kr(s) + } + } +} + +function tu(e) { + let t, o, i, r, n, a, s, l, c; + const d = [Jd, Kd], + u = []; + + function h(e, t) { + return e[1] ? 0 : 1 + } + o = h(e), i = u[o] = d[o](e); + let p = e[6] && eu(e); + return { + c() { + t = Mn(), i.c(), r = Mn(), p && p.c(), n = Mn(), a = Rn() + }, + m(i, d) { + wn(i, t, d), u[o].m(i, d), wn(i, r, d), p && p.m(i, d), wn(i, n, d), wn(i, a, d), s = !0, l || (c = [Pn(document.body, "pointerdown", (function() { + Jr(e[9]) && e[9].apply(this, arguments) + })), Pn(document.body, "pointerup", (function() { + Jr(e[8]) && e[8].apply(this, arguments) + }))], l = !0) + }, + p(t, a) { + let s = o; + o = h(e = t), o === s ? u[o].p(e, a) : (ya(), va(u[s], 1, 1, (() => { + u[s] = null + })), ba(), i = u[o], i ? i.p(e, a) : (i = u[o] = d[o](e), i.c()), xa(i, 1), i.m(r.parentNode, r)), e[6] ? p ? (p.p(e, a), 64 & a[0] && xa(p, 1)) : (p = eu(e), p.c(), xa(p, 1), p.m(n.parentNode, n)) : p && (ya(), va(p, 1, 1, (() => { + p = null + })), ba()) + }, + i(e) { + s || (xa(i), xa(p), xa(false), s = !0) + }, + o(e) { + va(i), va(p), va(false), s = !1 + }, + d(e) { + e && Sn(t), u[o].d(e), e && Sn(r), p && p.d(e), e && Sn(n), e && Sn(a), l = !1, Kr(c) + } + } +} + +function ou(e, t, o) { + let i, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, { + $$slots: w = {}, + $$scope: S + } = t, + { + buttonClass: k + } = t, + { + buttonLabel: C + } = t, + { + buttonLabelClass: T + } = t, + { + buttonHideLabel: M + } = t, + { + buttonIcon: R + } = t, + { + buttonTitle: P + } = t, + { + panelClass: E + } = t, + { + isActive: I = !1 + } = t, + { + onshow: A = (({ + panel: e + }) => jd(e, { + preventScroll: !0 + })) + } = t, + { + onhide: L = r + } = t; + const z = Jn("isAnimated"); + on(e, z, (e => o(41, v = e))); + const F = Jn("rootPortal"); + on(e, F, (e => o(36, $ = e))); + const O = Jn("rootRect"); + let D, B, W; + on(e, O, (e => o(40, x = e))); + const V = () => o(26, W = i && i.getBoundingClientRect()); + let _ = le(), + N = ec(0); + on(e, N, (e => o(38, y = e))); + let H = le(); + const j = Ba({ + x: 0, + y: 0 + }); + on(e, j, (e => o(37, f = e))); + const U = ec(-5, { + stiffness: .1, + damping: .35, + precision: .001 + }); + on(e, U, (e => o(39, b = e))); + const G = e => od(e, $) || B.isEventTarget(e); + let Z, X, Y = !1; + const q = e => { + Gd(e.target) || (I || V(), o(30, X = e), o(0, I = !I)) + }, + K = e => { + /down/i.test(e.key) && (o(0, I = !0), o(30, X = e)) + }; + Yn((() => { + if (!$) return; + if (!Z) return; + const e = Z; + sa().then((() => { + e.parentNode && e.remove() + })) + })); + return e.$$set = e => { + "buttonClass" in e && o(19, k = e.buttonClass), "buttonLabel" in e && o(1, C = e.buttonLabel), "buttonLabelClass" in e && o(20, T = e.buttonLabelClass), "buttonHideLabel" in e && o(21, M = e.buttonHideLabel), "buttonIcon" in e && o(22, R = e.buttonIcon), "buttonTitle" in e && o(23, P = e.buttonTitle), "panelClass" in e && o(2, E = e.panelClass), "isActive" in e && o(0, I = e.isActive), "onshow" in e && o(24, A = e.onshow), "onhide" in e && o(25, L = e.onhide), "$$scope" in e && o(48, S = e.$$scope) + }, e.$$.update = () => { + if (16 & e.$$.dirty[0] && (i = B && B.getElement()), 536870913 & e.$$.dirty[0] && o(8, m = I ? e => { + Y && (o(29, Y = !1), G(e) || o(0, I = !1)) + } : void 0), 1 & e.$$.dirty[0] | 1024 & e.$$.dirty[1] && N.set(I ? 1 : 0, { + hard: !1 === v + }), 1 & e.$$.dirty[0] | 1024 & e.$$.dirty[1] && U.set(I ? 0 : -5, { + hard: !1 === v + }), 256 & e.$$.dirty[1] && o(33, n = 1 - b / -5), 1 & e.$$.dirty[0] | 512 & e.$$.dirty[1] && x && I && V(), 67108873 & e.$$.dirty[0] | 512 & e.$$.dirty[1] && x && D && W && I) { + let e = W.x - x.x + .5 * W.width - .5 * D.width, + t = W.y - x.y + W.height; + const i = 12, + r = 12, + n = x.width - 12, + a = x.height - 12, + s = e, + l = t, + c = s + D.width, + d = l + D.height; + if (s < i && (o(28, H.x = s - i, H), e = i), c > n && (o(28, H.x = c - n, H), e = n - D.width), d > a) { + o(27, _.y = -1, _); + r < t - D.height - W.height ? (o(28, H.y = 0, H), t -= D.height + W.height) : (o(28, H.y = t - (d - a), H), t -= d - a) + } else o(27, _.y = 1, _); + un(j, f = ye(ce(e, t), Hd), f) + } + 128 & e.$$.dirty[1] && o(6, a = y > 0), 128 & e.$$.dirty[1] && o(35, s = y < 1), 134217728 & e.$$.dirty[0] | 320 & e.$$.dirty[1] && o(34, l = `translateX(${Math.round(f.x)+12*_.x}px) translateY(${Math.round(f.y)+12*_.y+_.y*b}px)`), 152 & e.$$.dirty[1] && o(11, c = s ? `opacity: ${y}; pointer-events: ${y<1?"none":"all"}; transform: ${l};` : "transform: " + l), 4 & e.$$.dirty[1] && o(31, d = .5 + .5 * n), 4 & e.$$.dirty[1] && o(32, u = n), 402653192 & e.$$.dirty[0] | 67 & e.$$.dirty[1] && o(10, h = f && D && `opacity:${u};transform:scaleX(${d})rotate(45deg);top:${_.y<0?H.y+D.height:0}px;left:${H.x+.5*D.width}px`), 1 & e.$$.dirty[0] && o(9, p = I ? e => { + G(e) || o(29, Y = !0) + } : void 0), 96 & e.$$.dirty[0] | 32 & e.$$.dirty[1] && a && $ && Z && Z.parentNode !== $ && $.append(Z), 1 & e.$$.dirty[0] && (I || o(30, X = void 0)), 1090519137 & e.$$.dirty[0] && I && a && Z && A({ + e: X, + panel: Z + }), 33554497 & e.$$.dirty[0] && a && !I && L(), 16252930 & e.$$.dirty[0] && o(7, g = { + label: C, + icon: R, + class: Mc(["PinturaPanelButton", k]), + onkeydown: K, + onclick: q, + hideLabel: M, + labelClass: T, + title: P + }) + }, [I, C, E, D, B, Z, a, g, m, p, h, c, z, F, O, N, j, U, e => { + /esc/i.test(e.key) && (o(0, I = !1), i.focus()) + }, k, T, M, R, P, A, L, W, _, H, Y, X, d, u, n, l, s, $, f, y, b, x, v, w, function(e) { + ta[e ? "unshift" : "push"]((() => { + B = e, o(4, B) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + B = e, o(4, B) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + Z = e, o(5, Z) + })) + }, e => { + e.stopPropagation(), o(0, I = !1) + }, e => o(3, D = Le(e.detail)), S] +} +class iu extends Fa { + constructor(e) { + super(), za(this, e, ou, tu, Qr, { + buttonClass: 19, + buttonLabel: 1, + buttonLabelClass: 20, + buttonHideLabel: 21, + buttonIcon: 22, + buttonTitle: 23, + panelClass: 2, + isActive: 0, + onshow: 24, + onhide: 25 + }, null, [-1, -1]) + } +} +var ru = { + Up: 38, + Down: 40, + Left: 37, + Right: 39 +}; + +function nu(e) { + let t, o, i, r, n, a, s, l; + const c = e[15].default, + d = rn(c, e, e[14], null); + return { + c() { + t = kn("li"), o = kn("input"), i = Mn(), r = kn("label"), d && d.c(), An(o, "type", "radio"), An(o, "class", "implicit"), An(o, "id", e[7]), An(o, "name", e[0]), o.value = e[3], o.disabled = e[6], o.hidden = e[5], o.checked = e[4], An(r, "for", e[7]), An(r, "title", e[2]), An(t, "class", n = Mc(["PinturaRadioGroupOption", e[1]])), An(t, "data-hidden", e[5]), An(t, "data-disabled", e[6]), An(t, "data-selected", e[4]) + }, + m(n, c) { + wn(n, t, c), bn(t, o), bn(t, i), bn(t, r), d && d.m(r, null), a = !0, s || (l = [Pn(o, "change", In(e[16])), Pn(o, "keydown", e[9]), Pn(o, "click", e[10])], s = !0) + }, + p(e, [i]) { + (!a || 128 & i) && An(o, "id", e[7]), (!a || 1 & i) && An(o, "name", e[0]), (!a || 8 & i) && (o.value = e[3]), (!a || 64 & i) && (o.disabled = e[6]), (!a || 32 & i) && (o.hidden = e[5]), (!a || 16 & i) && (o.checked = e[4]), d && d.p && (!a || 16384 & i) && sn(d, c, e, e[14], a ? an(c, e[14], i, null) : ln(e[14]), null), (!a || 128 & i) && An(r, "for", e[7]), (!a || 4 & i) && An(r, "title", e[2]), (!a || 2 & i && n !== (n = Mc(["PinturaRadioGroupOption", e[1]]))) && An(t, "class", n), (!a || 32 & i) && An(t, "data-hidden", e[5]), (!a || 64 & i) && An(t, "data-disabled", e[6]), (!a || 16 & i) && An(t, "data-selected", e[4]) + }, + i(e) { + a || (xa(d, e), a = !0) + }, + o(e) { + va(d, e), a = !1 + }, + d(e) { + e && Sn(t), d && d.d(e), s = !1, Kr(l) + } + } +} + +function au(e, t, o) { + let i, r, { + $$slots: n = {}, + $$scope: a + } = t, + { + name: s + } = t, + { + class: l + } = t, + { + label: c + } = t, + { + id: d + } = t, + { + value: u + } = t, + { + checked: h + } = t, + { + onkeydown: p + } = t, + { + onclick: m + } = t, + { + hidden: g = !1 + } = t, + { + disabled: $ = !1 + } = t; + const f = Object.values(ru), + y = Jn("keysPressed"); + on(e, y, (e => o(17, r = e))); + return e.$$set = e => { + "name" in e && o(0, s = e.name), "class" in e && o(1, l = e.class), "label" in e && o(2, c = e.label), "id" in e && o(11, d = e.id), "value" in e && o(3, u = e.value), "checked" in e && o(4, h = e.checked), "onkeydown" in e && o(12, p = e.onkeydown), "onclick" in e && o(13, m = e.onclick), "hidden" in e && o(5, g = e.hidden), "disabled" in e && o(6, $ = e.disabled), "$$scope" in e && o(14, a = e.$$scope) + }, e.$$.update = () => { + 2049 & e.$$.dirty && o(7, i = `${s}-${d}`) + }, [s, l, c, u, h, g, $, i, y, e => { + p(e) + }, e => { + r.some((e => f.includes(e))) || m(e) + }, d, p, m, a, n, function(t) { + Qn.call(this, e, t) + }] +} +class su extends Fa { + constructor(e) { + super(), za(this, e, au, nu, Qr, { + name: 0, + class: 1, + label: 2, + id: 11, + value: 3, + checked: 4, + onkeydown: 12, + onclick: 13, + hidden: 5, + disabled: 6 + }) + } +} +var lu = (e = []) => e.reduce(((e, t) => (Lo(t) ? Lo(t[1]) : !!t.options) ? e.concat(Lo(t) ? t[1] : t.options) : (e.push(t), e)), []); +const cu = (e, t, o) => { + let i; + return Lo(e) ? i = { + id: t, + value: e[0], + label: e[1], + ...e[2] || {} + } : (i = e, i.id = null != i.id ? i.id : t), o ? o(i) : i +}; +var du = (e, t, o) => M(e) ? e(t, o) : e; +const uu = (e, t) => e.map((([e, o, i]) => { + if (Lo(o)) return [du(e, t), uu(o, t)]; + { + const r = [e, du(o, t)]; + if (i) { + let e = { + ...i + }; + i.icon && (e.icon = du(i.icon, t)), r.push(e) + } + return r + } +})); +var hu = (e, t) => uu(e, t), + pu = (e, t) => Array.isArray(e) && Array.isArray(t) ? cs(e, t) : e === t; + +function mu(e, t, o) { + const i = e.slice(); + return i[27] = t[o], i +} +const gu = e => ({ + option: 1024 & e[0] + }), + $u = e => ({ + option: e[27] + }); + +function fu(e, t, o) { + const i = e.slice(); + return i[27] = t[o], i +} +const yu = e => ({ + option: 1024 & e[0] + }), + bu = e => ({ + option: e[27] + }), + xu = e => ({ + option: 1024 & e[0] + }), + vu = e => ({ + option: e[27] + }); + +function wu(e) { + let t, o, i, r, n, a = [], + s = new Map, + l = e[1] && Su(e), + c = e[10]; + const d = e => e[27].id; + for (let t = 0; t < c.length; t += 1) { + let o = mu(e, c, t), + i = d(o); + s.set(i, a[t] = Fu(i, o)) + } + return { + c() { + t = kn("fieldset"), l && l.c(), o = Mn(), i = kn("ul"); + for (let e = 0; e < a.length; e += 1) a[e].c(); + An(i, "class", "PinturaRadioGroupOptions"), An(t, "class", r = Mc(["PinturaRadioGroup", e[3]])), An(t, "data-layout", e[5]), An(t, "title", e[7]) + }, + m(e, r) { + wn(e, t, r), l && l.m(t, null), bn(t, o), bn(t, i); + for (let e = 0; e < a.length; e += 1) a[e].m(i, null); + n = !0 + }, + p(e, u) { + e[1] ? l ? l.p(e, u) : (l = Su(e), l.c(), l.m(t, o)) : l && (l.d(1), l = null), 8419153 & u[0] && (c = e[10], ya(), a = Ma(a, u, d, 1, e, c, s, i, Ta, Fu, null, mu), ba()), (!n || 8 & u[0] && r !== (r = Mc(["PinturaRadioGroup", e[3]]))) && An(t, "class", r), (!n || 32 & u[0]) && An(t, "data-layout", e[5]), (!n || 128 & u[0]) && An(t, "title", e[7]) + }, + i(e) { + if (!n) { + for (let e = 0; e < c.length; e += 1) xa(a[e]); + n = !0 + } + }, + o(e) { + for (let e = 0; e < a.length; e += 1) va(a[e]); + n = !1 + }, + d(e) { + e && Sn(t), l && l.d(); + for (let e = 0; e < a.length; e += 1) a[e].d() + } + } +} + +function Su(e) { + let t, o, i; + return { + c() { + t = kn("legend"), o = Tn(e[1]), An(t, "class", i = e[2] && "implicit") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, r) { + 2 & r[0] && Fn(o, e[1]), 4 & r[0] && i !== (i = e[2] && "implicit") && An(t, "class", i) + }, + d(e) { + e && Sn(t) + } + } +} + +function ku(e) { + let t, o; + return t = new su({ + props: { + name: e[4], + label: e[27].label, + id: e[27].id, + value: e[27].value, + disabled: e[27].disabled, + hidden: e[27].hidden, + class: e[8], + checked: e[12](e[27]) === e[0], + onkeydown: e[13](e[27]), + onclick: e[14](e[27]), + $$slots: { + default: [Pu] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.name = e[4]), 1024 & o[0] && (i.label = e[27].label), 1024 & o[0] && (i.id = e[27].id), 1024 & o[0] && (i.value = e[27].value), 1024 & o[0] && (i.disabled = e[27].disabled), 1024 & o[0] && (i.hidden = e[27].hidden), 256 & o[0] && (i.class = e[8]), 1025 & o[0] && (i.checked = e[12](e[27]) === e[0]), 1024 & o[0] && (i.onkeydown = e[13](e[27])), 1024 & o[0] && (i.onclick = e[14](e[27])), 8389696 & o[0] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Cu(e) { + let t, o, i, r, n, a, s = [], + l = new Map; + const c = e[22].group, + d = rn(c, e, e[23], vu), + u = d || function(e) { + let t, o, i = e[27].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", "PinturaRadioGroupOptionGroupLabel") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1024 & t[0] && i !== (i = e[27].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } + }(e); + let h = e[27].options; + const p = e => e[27].id; + for (let t = 0; t < h.length; t += 1) { + let o = fu(e, h, t), + i = p(o); + l.set(i, s[t] = zu(i, o)) + } + return { + c() { + t = kn("li"), u && u.c(), o = Mn(), i = kn("ul"); + for (let e = 0; e < s.length; e += 1) s[e].c(); + r = Mn(), An(i, "class", "PinturaRadioGroupOptions"), An(t, "class", n = Mc(["PinturaRadioGroupOptionGroup", e[9]])) + }, + m(e, n) { + wn(e, t, n), u && u.m(t, null), bn(t, o), bn(t, i); + for (let e = 0; e < s.length; e += 1) s[e].m(i, null); + bn(t, r), a = !0 + }, + p(e, o) { + d ? d.p && (!a || 8389632 & o[0]) && sn(d, c, e, e[23], a ? an(c, e[23], o, xu) : ln(e[23]), vu) : u && u.p && (!a || 1024 & o[0]) && u.p(e, a ? o : [-1, -1]), 8418641 & o[0] && (h = e[27].options, ya(), s = Ma(s, o, p, 1, e, h, l, i, Ta, zu, null, fu), ba()), (!a || 512 & o[0] && n !== (n = Mc(["PinturaRadioGroupOptionGroup", e[9]]))) && An(t, "class", n) + }, + i(e) { + if (!a) { + xa(u, e); + for (let e = 0; e < h.length; e += 1) xa(s[e]); + a = !0 + } + }, + o(e) { + va(u, e); + for (let e = 0; e < s.length; e += 1) va(s[e]); + a = !1 + }, + d(e) { + e && Sn(t), u && u.d(e); + for (let e = 0; e < s.length; e += 1) s[e].d() + } + } +} + +function Tu(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Mu] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8389632 & o[0] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Mu(e) { + let t, o = e[27].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 1024 & i[0] && o !== (o = e[27].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Ru(e) { + let t, o, i = e[27].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", e[6]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, r) { + 1024 & r[0] && i !== (i = e[27].label + "") && Fn(o, i), 64 & r[0] && An(t, "class", e[6]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Pu(e) { + let t; + const o = e[22].option, + i = rn(o, e, e[23], $u), + r = i || function(e) { + let t, o, i, r = e[27].icon && Tu(e), + n = !e[27].hideLabel && Ru(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Mn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[27].icon ? r ? (r.p(e, i), 1024 & i[0] && xa(r, 1)) : (r = Tu(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[27].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Ru(e), n.c(), n.m(o.parentNode, o)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } + }(e); + return { + c() { + r && r.c() + }, + m(e, o) { + r && r.m(e, o), t = !0 + }, + p(e, n) { + i ? i.p && (!t || 8389632 & n[0]) && sn(i, o, e, e[23], t ? an(o, e[23], n, gu) : ln(e[23]), $u) : r && r.p && (!t || 1088 & n[0]) && r.p(e, t ? n : [-1, -1]) + }, + i(e) { + t || (xa(r, e), t = !0) + }, + o(e) { + va(r, e), t = !1 + }, + d(e) { + r && r.d(e) + } + } +} + +function Eu(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Iu] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8389632 & o[0] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Iu(e) { + let t, o = e[27].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 1024 & i[0] && o !== (o = e[27].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Au(e) { + let t, o, i = e[27].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", e[6]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, r) { + 1024 & r[0] && i !== (i = e[27].label + "") && Fn(o, i), 64 & r[0] && An(t, "class", e[6]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Lu(e) { + let t; + const o = e[22].option, + i = rn(o, e, e[23], bu), + r = i || function(e) { + let t, o, i, r = e[27].icon && Eu(e), + n = !e[27].hideLabel && Au(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Mn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[27].icon ? r ? (r.p(e, i), 1024 & i[0] && xa(r, 1)) : (r = Eu(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[27].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Au(e), n.c(), n.m(o.parentNode, o)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } + }(e); + return { + c() { + r && r.c() + }, + m(e, o) { + r && r.m(e, o), t = !0 + }, + p(e, n) { + i ? i.p && (!t || 8389632 & n[0]) && sn(i, o, e, e[23], t ? an(o, e[23], n, yu) : ln(e[23]), bu) : r && r.p && (!t || 1088 & n[0]) && r.p(e, t ? n : [-1, -1]) + }, + i(e) { + t || (xa(r, e), t = !0) + }, + o(e) { + va(r, e), t = !1 + }, + d(e) { + r && r.d(e) + } + } +} + +function zu(e, t) { + let o, i, r; + return i = new su({ + props: { + name: t[4], + label: t[27].label, + id: t[27].id, + value: t[27].value, + disabled: t[27].disabled, + hidden: t[27].hidden, + class: t[8], + checked: t[12](t[27]) === t[0], + onkeydown: t[13](t[27]), + onclick: t[14](t[27]), + $$slots: { + default: [Lu] + }, + $$scope: { + ctx: t + } + } + }), { + key: e, + first: null, + c() { + o = Rn(), Ia(i.$$.fragment), this.first = o + }, + m(e, t) { + wn(e, o, t), Aa(i, e, t), r = !0 + }, + p(e, o) { + t = e; + const r = {}; + 16 & o[0] && (r.name = t[4]), 1024 & o[0] && (r.label = t[27].label), 1024 & o[0] && (r.id = t[27].id), 1024 & o[0] && (r.value = t[27].value), 1024 & o[0] && (r.disabled = t[27].disabled), 1024 & o[0] && (r.hidden = t[27].hidden), 256 & o[0] && (r.class = t[8]), 1025 & o[0] && (r.checked = t[12](t[27]) === t[0]), 1024 & o[0] && (r.onkeydown = t[13](t[27])), 1024 & o[0] && (r.onclick = t[14](t[27])), 8389696 & o[0] && (r.$$scope = { + dirty: o, + ctx: t + }), i.$set(r) + }, + i(e) { + r || (xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(o), La(i, e) + } + } +} + +function Fu(e, t) { + let o, i, r, n, a; + const s = [Cu, ku], + l = []; + + function c(e, t) { + return e[27].options ? 0 : 1 + } + return i = c(t), r = l[i] = s[i](t), { + key: e, + first: null, + c() { + o = Rn(), r.c(), n = Rn(), this.first = o + }, + m(e, t) { + wn(e, o, t), l[i].m(e, t), wn(e, n, t), a = !0 + }, + p(e, o) { + let a = i; + i = c(t = e), i === a ? l[i].p(t, o) : (ya(), va(l[a], 1, 1, (() => { + l[a] = null + })), ba(), r = l[i], r ? r.p(t, o) : (r = l[i] = s[i](t), r.c()), xa(r, 1), r.m(n.parentNode, n)) + }, + i(e) { + a || (xa(r), a = !0) + }, + o(e) { + va(r), a = !1 + }, + d(e) { + e && Sn(o), l[i].d(e), e && Sn(n) + } + } +} + +function Ou(e) { + let t, o, i, r = e[11].length && wu(e); + return { + c() { + r && r.c(), t = Mn(), o = Rn() + }, + m(e, n) { + r && r.m(e, n), wn(e, t, n), wn(e, o, n), i = !0 + }, + p(e, o) { + e[11].length ? r ? (r.p(e, o), 2048 & o[0] && xa(r, 1)) : (r = wu(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(false), i = !0) + }, + o(e) { + va(r), va(false), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), e && Sn(o) + } + } +} + +function Du(e, t, o) { + let i, r, n, { + $$slots: a = {}, + $$scope: s + } = t; + const l = qn(); + let { + label: c + } = t, { + hideLabel: d = !0 + } = t, { + class: u + } = t, { + name: h = "radio-group-" + I() + } = t, { + selectedIndex: p = -1 + } = t, { + options: m = [] + } = t, { + onchange: g + } = t, { + layout: $ + } = t, { + optionMapper: f + } = t, { + optionFilter: y + } = t, { + value: b + } = t, { + optionLabelClass: x + } = t, { + title: v + } = t, { + locale: w + } = t, { + optionClass: S + } = t, { + optionGroupClass: k + } = t; + const C = e => n.findIndex((t => t.id === e.id)), + T = (e, t) => { + o(0, p = C(e)); + const i = { + index: p, + ...e + }; + ((e, ...t) => { + e && e(...t) + })(g, i, t), l("change", i) + }; + return e.$$set = e => { + "label" in e && o(1, c = e.label), "hideLabel" in e && o(2, d = e.hideLabel), "class" in e && o(3, u = e.class), "name" in e && o(4, h = e.name), "selectedIndex" in e && o(0, p = e.selectedIndex), "options" in e && o(15, m = e.options), "onchange" in e && o(16, g = e.onchange), "layout" in e && o(5, $ = e.layout), "optionMapper" in e && o(17, f = e.optionMapper), "optionFilter" in e && o(18, y = e.optionFilter), "value" in e && o(19, b = e.value), "optionLabelClass" in e && o(6, x = e.optionLabelClass), "title" in e && o(7, v = e.title), "locale" in e && o(20, w = e.locale), "optionClass" in e && o(8, S = e.optionClass), "optionGroupClass" in e && o(9, k = e.optionGroupClass), "$$scope" in e && o(23, s = e.$$scope) + }, e.$$.update = () => { + 1343488 & e.$$.dirty[0] && o(11, i = hu(y ? m.filter(y) : m, w)), 133120 & e.$$.dirty[0] && o(10, r = ((e = [], t) => { + let o = 0; + return e.map((e => (o++, Lo(e) ? Lo(e[1]) ? { + id: o, + label: e[0], + options: e[1].map((e => cu(e, ++o, t))) + } : cu(e, o, t) : e.options ? { + id: e.id || o, + label: e.label, + options: e.options.map((e => cu(e, ++o, t))) + } : cu(e, o, t)))) + })(i, f)), 1024 & e.$$.dirty[0] && o(21, n = lu(r)), 2654209 & e.$$.dirty[0] && p < 0 && (o(0, p = n.findIndex((e => pu(e.value, b)))), p < 0 && o(0, p = (e => e.findIndex((e => void 0 === e[0])))(m))) + }, [p, c, d, u, h, $, x, v, S, k, r, i, C, e => t => { + var o; + (o = t.key, /enter| /i.test(o)) && T(e, t) + }, e => t => { + T(e, t) + }, m, g, f, y, b, w, n, a, s] +} +class Bu extends Fa { + constructor(e) { + super(), za(this, e, Du, Ou, Qr, { + label: 1, + hideLabel: 2, + class: 3, + name: 4, + selectedIndex: 0, + options: 15, + onchange: 16, + layout: 5, + optionMapper: 17, + optionFilter: 18, + value: 19, + optionLabelClass: 6, + title: 7, + locale: 20, + optionClass: 8, + optionGroupClass: 9 + }, null, [-1, -1]) + } +} + +function Wu(e) { + let t, o, i, r, n, a, s, l, c, d; + return { + c() { + t = kn("div"), o = kn("button"), i = Tn("▲"), n = Mn(), a = kn("button"), s = Tn("▼"), An(o, "type", "button"), An(o, "tabindex", "-1"), An(o, "aria-label", r = "increase " + e[7]), An(a, "type", "button"), An(a, "tabindex", "-1"), An(a, "aria-label", l = "decrease " + e[7]), An(t, "class", "PinturaInputSpinners") + }, + m(r, l) { + wn(r, t, l), bn(t, o), bn(o, i), bn(t, n), bn(t, a), bn(a, s), c || (d = [Pn(o, "click", e[17]), Pn(a, "click", e[18])], c = !0) + }, + p(e, t) { + 128 & t && r !== (r = "increase " + e[7]) && An(o, "aria-label", r), 128 & t && l !== (l = "decrease " + e[7]) && An(a, "aria-label", l) + }, + d(e) { + e && Sn(t), c = !1, Kr(d) + } + } +} + +function Vu(e) { + let t, o, i, r, n, a, s = "number" === e[1] && e[9] && Wu(e); + return { + c() { + t = kn("div"), o = kn("input"), r = Mn(), s && s.c(), An(o, "class", "PinturaInputField"), An(o, "title", e[7]), An(o, "type", e[1]), An(o, "min", e[4]), An(o, "max", e[5]), An(o, "step", e[6]), An(o, "inputmode", e[3]), o.value = i = e[14] ? e[13] : e[0], An(o, "style", e[11]), An(o, "placeholder", e[8]), An(o, "maxlength", e[12]), o.disabled = e[2], An(o, "spellcheck", "false"), An(o, "autocorrect", "off"), An(o, "autocapitalize", "off"), An(t, "class", "PinturaInput") + }, + m(i, l) { + wn(i, t, l), bn(t, o), e[26](o), bn(t, r), s && s.m(t, null), n || (a = [Pn(o, "input", e[16]), Pn(o, "blur", (function() { + Jr(e[14] && e[15]) && (e[14] && e[15]).apply(this, arguments) + })), Pn(o, "keydown", e[19]), Pn(o, "keyup", e[20])], n = !0) + }, + p(r, [n]) { + e = r, 128 & n && An(o, "title", e[7]), 2 & n && An(o, "type", e[1]), 16 & n && An(o, "min", e[4]), 32 & n && An(o, "max", e[5]), 64 & n && An(o, "step", e[6]), 8 & n && An(o, "inputmode", e[3]), 24577 & n && i !== (i = e[14] ? e[13] : e[0]) && o.value !== i && (o.value = i), 2048 & n && An(o, "style", e[11]), 256 & n && An(o, "placeholder", e[8]), 4096 & n && An(o, "maxlength", e[12]), 4 & n && (o.disabled = e[2]), "number" === e[1] && e[9] ? s ? s.p(e, n) : (s = Wu(e), s.c(), s.m(t, null)) : s && (s.d(1), s = null) + }, + i: Gr, + o: Gr, + d(o) { + o && Sn(t), e[26](null), s && s.d(), n = !1, Kr(a) + } + } +} + +function _u(e, t, o) { + let i, n, a, s, l, c, d, { + value: u + } = t, + { + type: h = "text" + } = t, + { + disabled: p = !1 + } = t, + { + inputmode: m + } = t, + { + min: g + } = t, + { + max: $ + } = t, + { + step: f + } = t, + { + onchange: y = r + } = t, + { + onkeydown: b = r + } = t, + { + title: x + } = t, + { + stepMultiplier: v = 10 + } = t, + { + placeholder: w + } = t, + { + enableSpinButtons: S = !0 + } = t; + const k = () => { + let e = c.value; + return "number" === h && (e = "numeric" === m ? parseInt(e, 10) : parseFloat(e), !Eo(e) || Number.isNaN(e) ? e = g || 0 : i && (e = rs(e, g, $))), e + }; + let C = u; + const T = () => { + const e = rs(k() + (d ? f * v : f), g, $); + e !== u && (o(24, C = e), o(0, u = e), y(u)) + }, + M = () => { + const e = rs(k() - (d ? f * v : f), g, $); + e !== u && (o(24, C = e), o(0, u = e), y(u)) + }; + return e.$$set = e => { + "value" in e && o(0, u = e.value), "type" in e && o(1, h = e.type), "disabled" in e && o(2, p = e.disabled), "inputmode" in e && o(3, m = e.inputmode), "min" in e && o(4, g = e.min), "max" in e && o(5, $ = e.max), "step" in e && o(6, f = e.step), "onchange" in e && o(21, y = e.onchange), "onkeydown" in e && o(22, b = e.onkeydown), "title" in e && o(7, x = e.title), "stepMultiplier" in e && o(23, v = e.stepMultiplier), "placeholder" in e && o(8, w = e.placeholder), "enableSpinButtons" in e && o(9, S = e.enableSpinButtons) + }, e.$$.update = () => { + 48 & e.$$.dirty && o(14, i = Eo(g) && Eo($)), 16778241 & e.$$.dirty && o(13, n = c === document.activeElement ? C : u), 32 & e.$$.dirty && o(25, a = $ ? ($ + "").length : void 0), 33554440 & e.$$.dirty && o(12, s = "numeric" === m && a ? a : void 0), 33554432 & e.$$.dirty && o(11, l = a ? `min-width:${a}em` : void 0) + }, [u, h, p, m, g, $, f, x, w, S, c, l, s, n, i, () => { + o(24, C = k()), y(u) + }, () => { + o(24, C = c.value), y(k()) + }, T, M, e => { + d = e.shiftKey, b(e); + const { + key: t + } = e; + /up|down/i.test(t) && (/up/i.test(t) && T(), /down/i.test(t) && M(), e.preventDefault(), e.stopPropagation()) + }, e => { + const { + key: t + } = e; + /up|down/i.test(t) && (e.preventDefault(), e.stopPropagation()) + }, y, b, v, C, a, function(e) { + ta[e ? "unshift" : "push"]((() => { + c = e, o(10, c) + })) + }] +} +class Nu extends Fa { + constructor(e) { + super(), za(this, e, _u, Vu, Qr, { + value: 0, + type: 1, + disabled: 2, + inputmode: 3, + min: 4, + max: 5, + step: 6, + onchange: 21, + onkeydown: 22, + title: 7, + stepMultiplier: 23, + placeholder: 8, + enableSpinButtons: 9 + }) + } +} +const Hu = e => ({}), + ju = e => ({}); + +function Uu(e) { + let t, o, i, r, n = (e[2] || e[21]) + "", + a = e[6] && Zu(e); + return { + c() { + a && a.c(), t = Mn(), o = kn("span"), An(o, "class", i = Mc(["PinturaButtonLabel", e[3], e[5] && "implicit"])) + }, + m(e, i) { + a && a.m(e, i), wn(e, t, i), wn(e, o, i), o.innerHTML = n, r = !0 + }, + p(e, s) { + e[6] ? a ? (a.p(e, s), 64 & s[0] && xa(a, 1)) : (a = Zu(e), a.c(), xa(a, 1), a.m(t.parentNode, t)) : a && (ya(), va(a, 1, 1, (() => { + a = null + })), ba()), (!r || 2097156 & s[0]) && n !== (n = (e[2] || e[21]) + "") && (o.innerHTML = n), (!r || 40 & s[0] && i !== (i = Mc(["PinturaButtonLabel", e[3], e[5] && "implicit"]))) && An(o, "class", i) + }, + i(e) { + r || (xa(a), r = !0) + }, + o(e) { + va(a), r = !1 + }, + d(e) { + a && a.d(e), e && Sn(t), e && Sn(o) + } + } +} + +function Gu(e) { + let t, o; + return t = new Nu({ + props: { + value: e[10], + onchange: e[17], + type: "number", + inputmode: "numeric", + min: e[8].reduce(rh, 1 / 0), + max: e[8].reduce(nh, -1 / 0), + enableSpinButtons: !1 + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o[0] && (i.value = e[10]), 131072 & o[0] && (i.onchange = e[17]), 256 & o[0] && (i.min = e[8].reduce(rh, 1 / 0)), 256 & o[0] && (i.max = e[8].reduce(nh, -1 / 0)), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Zu(e) { + let t, o; + return t = new td({ + props: { + class: "PinturaButtonIcon", + $$slots: { + default: [Xu] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 536870976 & o[0] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Xu(e) { + let t; + return { + c() { + t = Cn("g") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[6] + }, + p(e, o) { + 64 & o[0] && (t.innerHTML = e[6]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Yu(e) { + let t, o, i, r, n, a; + const s = [Gu, Uu], + l = []; + + function c(e, t) { + return e[18] ? 0 : 1 + } + return o = c(e), i = l[o] = s[o](e), { + c() { + t = kn("span"), i.c(), An(t, "slot", "label"), An(t, "title", r = du(e[1], e[16])), An(t, "class", n = Mc(["PinturaButtonInner", e[18] && "PinturaComboBox", e[4]])) + }, + m(e, i) { + wn(e, t, i), l[o].m(t, null), a = !0 + }, + p(e, d) { + let u = o; + o = c(e), o === u ? l[o].p(e, d) : (ya(), va(l[u], 1, 1, (() => { + l[u] = null + })), ba(), i = l[o], i ? i.p(e, d) : (i = l[o] = s[o](e), i.c()), xa(i, 1), i.m(t, null)), (!a || 65538 & d[0] && r !== (r = du(e[1], e[16]))) && An(t, "title", r), (!a || 262160 & d[0] && n !== (n = Mc(["PinturaButtonInner", e[18] && "PinturaComboBox", e[4]]))) && An(t, "class", n) + }, + i(e) { + a || (xa(i), a = !0) + }, + o(e) { + va(i), a = !1 + }, + d(e) { + e && Sn(t), l[o].d() + } + } +} + +function qu(e) { + let t, o, i = e[31].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "slot", "group") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1 & t[1] && i !== (i = e[31].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Ku(e) { + let t, o; + return t = new td({ + props: { + style: M(e[14]) ? e[14](e[31].value) : e[14], + $$slots: { + default: [Ju] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16384 & o[0] | 1 & o[1] && (i.style = M(e[14]) ? e[14](e[31].value) : e[14]), 536870912 & o[0] | 1 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ju(e) { + let t, o = e[31].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 1 & i[1] && o !== (o = e[31].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Qu(e) { + let t, o, i, r, n, a = e[31].label + "", + s = e[31].sublabel && eh(e); + return { + c() { + t = kn("span"), o = new Bn(!1), i = Mn(), s && s.c(), o.a = i, An(t, "style", r = M(e[15]) ? e[15](e[31].value) : e[15]), An(t, "class", n = Mc(["PinturaDropdownOptionLabel", e[11]])) + }, + m(e, r) { + wn(e, t, r), o.m(a, t), bn(t, i), s && s.m(t, null) + }, + p(e, i) { + 1 & i[1] && a !== (a = e[31].label + "") && o.p(a), e[31].sublabel ? s ? s.p(e, i) : (s = eh(e), s.c(), s.m(t, null)) : s && (s.d(1), s = null), 32768 & i[0] | 1 & i[1] && r !== (r = M(e[15]) ? e[15](e[31].value) : e[15]) && An(t, "style", r), 2048 & i[0] && n !== (n = Mc(["PinturaDropdownOptionLabel", e[11]])) && An(t, "class", n) + }, + d(e) { + e && Sn(t), s && s.d() + } + } +} + +function eh(e) { + let t, o = e[31].sublabel + ""; + return { + c() { + t = kn("span"), An(t, "class", "PinturaDropdownOptionSublabel") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 1 & i[1] && o !== (o = e[31].sublabel + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function th(e) { + let t, o, i, r = e[31].icon && Ku(e), + n = !e[31].hideLabel && Qu(e); + return { + c() { + t = kn("span"), r && r.c(), o = Mn(), n && n.c(), An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), r && r.m(t, null), bn(t, o), n && n.m(t, null), i = !0 + }, + p(e, i) { + e[31].icon ? r ? (r.p(e, i), 1 & i[1] && xa(r, 1)) : (r = Ku(e), r.c(), xa(r, 1), r.m(t, o)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[31].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Qu(e), n.c(), n.m(t, null)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + e && Sn(t), r && r.d(), n && n.d() + } + } +} + +function oh(e) { + let t, o, i, r, n, a; + const s = e[27].controls, + l = rn(s, e, e[29], ju); + return i = new Bu({ + props: { + class: "PinturaOptionsList PinturaScrollableContent", + name: e[7], + value: e[10], + selectedIndex: e[9], + optionFilter: e[12], + optionMapper: e[13], + optionLabelClass: Mc(["PinturaDropdownOptionLabel", e[11]]), + optionGroupClass: "PinturaListOptionGroup", + optionClass: "PinturaListOption", + options: e[19], + onchange: e[22], + $$slots: { + option: [th, ({ + option: e + }) => ({ + 31: e + }), ({ + option: e + }) => [0, e ? 1 : 0]], + group: [qu, ({ + option: e + }) => ({ + 31: e + }), ({ + option: e + }) => [0, e ? 1 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), l && l.c(), o = Mn(), Ia(i.$$.fragment), An(t, "slot", "details"), An(t, "class", "PinturaOptionsListWrapper") + }, + m(s, c) { + wn(s, t, c), l && l.m(t, null), bn(t, o), Aa(i, t, null), r = !0, n || (a = Pn(t, "keydown", e[24]), n = !0) + }, + p(e, t) { + l && l.p && (!r || 536870912 & t[0]) && sn(l, s, e, e[29], r ? an(s, e[29], t, Hu) : ln(e[29]), ju); + const o = {}; + 128 & t[0] && (o.name = e[7]), 1024 & t[0] && (o.value = e[10]), 512 & t[0] && (o.selectedIndex = e[9]), 4096 & t[0] && (o.optionFilter = e[12]), 8192 & t[0] && (o.optionMapper = e[13]), 2048 & t[0] && (o.optionLabelClass = Mc(["PinturaDropdownOptionLabel", e[11]])), 524288 & t[0] && (o.options = e[19]), 536922112 & t[0] | 1 & t[1] && (o.$$scope = { + dirty: t, + ctx: e + }), i.$set(o) + }, + i(e) { + r || (xa(l, e), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(l, e), va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), l && l.d(e), La(i), n = !1, a() + } + } +} + +function ih(e) { + let t, o, i; + + function r(t) { + e[28](t) + } + let n = { + onshow: e[23], + buttonClass: Mc(["PinturaDropdownButton", e[0], e[5] && "PinturaDropdownIconOnly"]), + $$slots: { + details: [oh], + label: [Yu] + }, + $$scope: { + ctx: e + } + }; + return void 0 !== e[20] && (n.isActive = e[20]), t = new iu({ + props: n + }), ta.push((() => Ea(t, "isActive", r))), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 33 & i[0] && (r.buttonClass = Mc(["PinturaDropdownButton", e[0], e[5] && "PinturaDropdownIconOnly"])), 540016638 & i[0] && (r.$$scope = { + dirty: i, + ctx: e + }), !o && 1048576 & i[0] && (o = !0, r.isActive = e[20], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} +const rh = (e, [t]) => t < e ? t : e, + nh = (e, [t]) => t > e ? t : e; + +function ah(e, t, o) { + let i, n, { + $$slots: a = {}, + $$scope: s + } = t, + { + class: l + } = t, + { + title: c + } = t, + { + label: d + } = t, + { + labelClass: u + } = t, + { + innerClass: h + } = t, + { + hideLabel: p = !1 + } = t, + { + icon: m + } = t, + { + name: g + } = t, + { + options: $ = [] + } = t, + { + selectedIndex: f = -1 + } = t, + { + value: y + } = t, + { + optionLabelClass: b + } = t, + { + optionFilter: x + } = t, + { + optionMapper: v + } = t, + { + optionIconStyle: w + } = t, + { + optionLabelStyle: S + } = t, + { + locale: k + } = t, + { + onchange: C = r + } = t, + { + onload: T = r + } = t, + { + ondestroy: M = r + } = t, + { + enableInput: R = !1 + } = t; + let P; + return Zn((() => T({ + options: $ + }))), Yn((() => M({ + options: $ + }))), e.$$set = e => { + "class" in e && o(0, l = e.class), "title" in e && o(1, c = e.title), "label" in e && o(2, d = e.label), "labelClass" in e && o(3, u = e.labelClass), "innerClass" in e && o(4, h = e.innerClass), "hideLabel" in e && o(5, p = e.hideLabel), "icon" in e && o(6, m = e.icon), "name" in e && o(7, g = e.name), "options" in e && o(8, $ = e.options), "selectedIndex" in e && o(9, f = e.selectedIndex), "value" in e && o(10, y = e.value), "optionLabelClass" in e && o(11, b = e.optionLabelClass), "optionFilter" in e && o(12, x = e.optionFilter), "optionMapper" in e && o(13, v = e.optionMapper), "optionIconStyle" in e && o(14, w = e.optionIconStyle), "optionLabelStyle" in e && o(15, S = e.optionLabelStyle), "locale" in e && o(16, k = e.locale), "onchange" in e && o(17, C = e.onchange), "onload" in e && o(25, T = e.onload), "ondestroy" in e && o(26, M = e.ondestroy), "enableInput" in e && o(18, R = e.enableInput), "$$scope" in e && o(29, s = e.$$scope) + }, e.$$.update = () => { + 65792 & e.$$.dirty[0] && o(19, i = k ? hu($, k) : $), 525312 & e.$$.dirty[0] && o(21, n = i.reduce(((e, t) => { + if (e) return e; + const o = Array.isArray(t) ? t : [t, t], + [i, r] = o; + return pu(i, y) ? r : void 0 + }), void 0) || (e => { + const t = e.find((e => void 0 === e[0])); + if (t) return t[1] + })(i) || y) + }, [l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, R, i, P, n, e => { + o(21, n = e.value), C(e), o(20, P = !1) + }, ({ + e: e, + panel: t + }) => { + if (e && e.key && /up|down/i.test(e.key)) return jd(t.querySelector("input:not([disabled])")); + jd(t.querySelector("fieldset")) + }, e => { + /tab/i.test(e.key) && e.preventDefault() + }, T, M, a, function(e) { + P = e, o(20, P) + }, s] +} +class sh extends Fa { + constructor(e) { + super(), za(this, e, ah, ih, Qr, { + class: 0, + title: 1, + label: 2, + labelClass: 3, + innerClass: 4, + hideLabel: 5, + icon: 6, + name: 7, + options: 8, + selectedIndex: 9, + value: 10, + optionLabelClass: 11, + optionFilter: 12, + optionMapper: 13, + optionIconStyle: 14, + optionLabelStyle: 15, + locale: 16, + onchange: 17, + onload: 25, + ondestroy: 26, + enableInput: 18 + }, null, [-1, -1]) + } +} + +function lh(e) { + let t; + return { + c() { + t = kn("div"), An(t, "slot", "details") + }, + m(o, i) { + wn(o, t, i), e[14](t) + }, + p: Gr, + d(o) { + o && Sn(t), e[14](null) + } + } +} + +function ch(e) { + let t, o, i; + + function r(t) { + e[15](t) + } + let n = { + buttonLabel: e[0], + buttonClass: e[1], + buttonIcon: e[2], + buttonHideLabel: e[3], + buttonTitle: e[4], + buttonLabelClass: e[5], + onshow: e[6], + onhide: e[7], + $$slots: { + details: [lh] + }, + $$scope: { + ctx: e + } + }; + return void 0 !== e[9] && (n.isActive = e[9]), t = new iu({ + props: n + }), ta.push((() => Ea(t, "isActive", r))), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, [i]) { + const r = {}; + 1 & i && (r.buttonLabel = e[0]), 2 & i && (r.buttonClass = e[1]), 4 & i && (r.buttonIcon = e[2]), 8 & i && (r.buttonHideLabel = e[3]), 16 & i && (r.buttonTitle = e[4]), 32 & i && (r.buttonLabelClass = e[5]), 64 & i && (r.onshow = e[6]), 128 & i && (r.onhide = e[7]), 65792 & i && (r.$$scope = { + dirty: i, + ctx: e + }), !o && 512 & i && (o = !0, r.isActive = e[9], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function dh(e, t, o) { + let { + buttonLabel: i + } = t, { + buttonClass: n + } = t, { + buttonIcon: a + } = t, { + buttonHideLabel: s + } = t, { + buttonTitle: l + } = t, { + buttonLabelClass: c + } = t, { + root: d + } = t, { + ondestroy: u = r + } = t, { + onshow: h = r + } = t, { + onhide: p = r + } = t; + let m, g = !1; + return Yn(u), e.$$set = e => { + "buttonLabel" in e && o(0, i = e.buttonLabel), "buttonClass" in e && o(1, n = e.buttonClass), "buttonIcon" in e && o(2, a = e.buttonIcon), "buttonHideLabel" in e && o(3, s = e.buttonHideLabel), "buttonTitle" in e && o(4, l = e.buttonTitle), "buttonLabelClass" in e && o(5, c = e.buttonLabelClass), "root" in e && o(10, d = e.root), "ondestroy" in e && o(11, u = e.ondestroy), "onshow" in e && o(6, h = e.onshow), "onhide" in e && o(7, p = e.onhide) + }, e.$$.update = () => { + 1280 & e.$$.dirty && m && d && m.firstChild !== d && (m.hasChildNodes() ? m.replaceChild(d, m.firstChild) : m.append(d)) + }, [i, n, a, s, l, c, h, p, m, g, d, u, () => o(9, g = !1), () => o(9, g = !0), function(e) { + ta[e ? "unshift" : "push"]((() => { + m = e, o(8, m) + })) + }, function(e) { + g = e, o(9, g) + }] +} +class uh extends Fa { + constructor(e) { + super(), za(this, e, dh, ch, Qr, { + buttonLabel: 0, + buttonClass: 1, + buttonIcon: 2, + buttonHideLabel: 3, + buttonTitle: 4, + buttonLabelClass: 5, + root: 10, + ondestroy: 11, + onshow: 6, + onhide: 7, + hide: 12, + show: 13 + }) + } + get hide() { + return this.$$.ctx[12] + } + get show() { + return this.$$.ctx[13] + } +} +var hh = (e, t, o) => (e - t) / (o - t); +const ph = e => ({}), + mh = e => ({}); + +function gh(e) { + let t, o, i, r, n, a, s, l; + return o = new td({ + props: { + $$slots: { + default: [$h] + }, + $$scope: { + ctx: e + } + } + }), n = new td({ + props: { + $$slots: { + default: [fh] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("button"), Ia(o.$$.fragment), i = Mn(), r = kn("button"), Ia(n.$$.fragment), An(t, "type", "button"), An(t, "aria-label", "Increase"), An(r, "type", "button"), An(r, "aria-label", "Decrease") + }, + m(c, d) { + wn(c, t, d), Aa(o, t, null), wn(c, i, d), wn(c, r, d), Aa(n, r, null), a = !0, s || (l = [Pn(t, "pointerdown", e[20](1)), Pn(r, "pointerdown", e[20](-1))], s = !0) + }, + p(e, t) { + const i = {}; + 128 & t[1] && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i); + const r = {}; + 128 & t[1] && (r.$$scope = { + dirty: t, + ctx: e + }), n.$set(r) + }, + i(e) { + a || (xa(o.$$.fragment, e), xa(n.$$.fragment, e), a = !0) + }, + o(e) { + va(o.$$.fragment, e), va(n.$$.fragment, e), a = !1 + }, + d(e) { + e && Sn(t), La(o), e && Sn(i), e && Sn(r), La(n), s = !1, Kr(l) + } + } +} + +function $h(e) { + let t; + return { + c() { + t = Cn("path"), An(t, "d", "M8 12 h8 M12 8 v8") + }, + m(e, o) { + wn(e, t, o) + }, + p: Gr, + d(e) { + e && Sn(t) + } + } +} + +function fh(e) { + let t; + return { + c() { + t = Cn("path"), An(t, "d", "M9 12 h6") + }, + m(e, o) { + wn(e, t, o) + }, + p: Gr, + d(e) { + e && Sn(t) + } + } +} + +function yh(e) { + let t, o, i, r, n, a, s, l, c, d, u, h, p, m, g, $, f; + const y = e[36].default, + b = rn(y, e, e[38], null), + x = e[36].knob, + v = rn(x, e, e[38], mh); + let w = e[9] && gh(e); + return { + c() { + t = kn("div"), o = kn("div"), i = kn("input"), n = Mn(), a = kn("div"), b && b.c(), l = Mn(), c = kn("div"), d = kn("div"), v && v.c(), p = Mn(), w && w.c(), An(i, "type", "range"), An(i, "id", e[3]), An(i, "min", e[0]), An(i, "max", e[1]), An(i, "step", e[2]), i.value = e[14], An(i, "style", r = e[10] ? "pointer-events:none" : ""), An(a, "class", s = Mc(["PinturaSliderTrack", e[5]])), An(a, "style", e[4]), An(d, "class", u = Mc(["PinturaSliderKnob", e[7]])), An(d, "style", e[6]), An(c, "class", "PinturaSliderKnobController"), An(c, "style", e[17]), An(o, "class", "PinturaSliderControl"), An(o, "style", h = "--slider-position:" + Math.round(e[15])), An(t, "class", m = Mc(["PinturaSlider", e[12]])), An(t, "data-direction", e[8]) + }, + m(r, s) { + wn(r, t, s), bn(t, o), bn(o, i), e[37](i), bn(o, n), bn(o, a), b && b.m(a, null), bn(o, l), bn(o, c), bn(c, d), v && v.m(d, null), bn(t, p), w && w.m(t, null), g = !0, $ || (f = [Pn(i, "input", e[18]), Pn(i, "nudge", e[19]), hn(pd.call(null, i)), Pn(o, "pointerdown", (function() { + Jr(e[11] && e[13]) && (e[11] && e[13]).apply(this, arguments) + }))], $ = !0) + }, + p(n, l) { + e = n, (!g || 8 & l[0]) && An(i, "id", e[3]), (!g || 1 & l[0]) && An(i, "min", e[0]), (!g || 2 & l[0]) && An(i, "max", e[1]), (!g || 4 & l[0]) && An(i, "step", e[2]), (!g || 16384 & l[0]) && (i.value = e[14]), (!g || 1024 & l[0] && r !== (r = e[10] ? "pointer-events:none" : "")) && An(i, "style", r), b && b.p && (!g || 128 & l[1]) && sn(b, y, e, e[38], g ? an(y, e[38], l, null) : ln(e[38]), null), (!g || 32 & l[0] && s !== (s = Mc(["PinturaSliderTrack", e[5]]))) && An(a, "class", s), (!g || 16 & l[0]) && An(a, "style", e[4]), v && v.p && (!g || 128 & l[1]) && sn(v, x, e, e[38], g ? an(x, e[38], l, ph) : ln(e[38]), mh), (!g || 128 & l[0] && u !== (u = Mc(["PinturaSliderKnob", e[7]]))) && An(d, "class", u), (!g || 64 & l[0]) && An(d, "style", e[6]), (!g || 131072 & l[0]) && An(c, "style", e[17]), (!g || 32768 & l[0] && h !== (h = "--slider-position:" + Math.round(e[15]))) && An(o, "style", h), e[9] ? w ? (w.p(e, l), 512 & l[0] && xa(w, 1)) : (w = gh(e), w.c(), xa(w, 1), w.m(t, null)) : w && (ya(), va(w, 1, 1, (() => { + w = null + })), ba()), (!g || 4096 & l[0] && m !== (m = Mc(["PinturaSlider", e[12]]))) && An(t, "class", m), (!g || 256 & l[0]) && An(t, "data-direction", e[8]) + }, + i(e) { + g || (xa(b, e), xa(v, e), xa(w), g = !0) + }, + o(e) { + va(b, e), va(v, e), va(w), g = !1 + }, + d(o) { + o && Sn(t), e[37](null), b && b.d(o), v && v.d(o), w && w.d(), $ = !1, Kr(f) + } + } +} + +function bh(e, t, o) { + let i, n, a, s, l, c, d, u, h, p, m, g, $, f, y, { + $$slots: b = {}, + $$scope: x + } = t, + { + min: v = 0 + } = t, + { + max: w = 100 + } = t, + { + step: S = 1 + } = t, + { + id: k + } = t, + { + value: C = 0 + } = t, + { + valueMin: M + } = t, + { + valueMax: R + } = t, + { + trackStyle: P + } = t, + { + trackClass: E + } = t, + { + knobStyle: I + } = t, + { + knobClass: A + } = t, + { + ongrab: L = r + } = t, + { + onchange: z = r + } = t, + { + onrelease: F = r + } = t, + { + onexceed: O = r + } = t, + { + direction: D = "x" + } = t, + { + getValue: B = j + } = t, + { + setValue: W = j + } = t, + { + enableSpinButtons: V = !0 + } = t, + { + enableForceUseKnob: _ = !1 + } = t, + { + enableStopPropagation: N = !0 + } = t, + { + enablePointerdownListener: H = !0 + } = t, + { + maxInteractionDistance: U = 6 + } = t, + { + class: G + } = t; + const Z = e => W(((e, t) => (t = 1 / t, Math.round(e * t) / t))(rs(e, v, w), S), C), + X = (e, t, i = {}) => { + const { + grabbed: r = !1, + released: a = !1 + } = i, s = Z(v + e / t * n), l = M || v, c = R || w; + o(21, C = T(s) ? s : rs(s, l, c)), y !== s && (y = s, !T(s) && (s < l || s > c) && O(C, s), C !== f && (f = C, r && L(C), z(C), a && F(C))) + }; + let Y; + const q = e => { + const t = e[u] - $; + X(g + t, m) + }, + K = e => { + m = void 0, document.documentElement.removeEventListener("pointermove", q), document.documentElement.removeEventListener("pointerup", K), z(C), F(C) + }, + J = () => { + o(21, C = Z(i + ee * S)), z(C) + }; + let Q, ee = 1, + te = !1; + const oe = e => { + clearTimeout(Q), te || J(), F(C), document.removeEventListener("pointerup", oe) + }; + return e.$$set = e => { + "min" in e && o(0, v = e.min), "max" in e && o(1, w = e.max), "step" in e && o(2, S = e.step), "id" in e && o(3, k = e.id), "value" in e && o(21, C = e.value), "valueMin" in e && o(22, M = e.valueMin), "valueMax" in e && o(23, R = e.valueMax), "trackStyle" in e && o(4, P = e.trackStyle), "trackClass" in e && o(5, E = e.trackClass), "knobStyle" in e && o(6, I = e.knobStyle), "knobClass" in e && o(7, A = e.knobClass), "ongrab" in e && o(24, L = e.ongrab), "onchange" in e && o(25, z = e.onchange), "onrelease" in e && o(26, F = e.onrelease), "onexceed" in e && o(27, O = e.onexceed), "direction" in e && o(8, D = e.direction), "getValue" in e && o(28, B = e.getValue), "setValue" in e && o(29, W = e.setValue), "enableSpinButtons" in e && o(9, V = e.enableSpinButtons), "enableForceUseKnob" in e && o(10, _ = e.enableForceUseKnob), "enableStopPropagation" in e && o(30, N = e.enableStopPropagation), "enablePointerdownListener" in e && o(11, H = e.enablePointerdownListener), "maxInteractionDistance" in e && o(31, U = e.maxInteractionDistance), "class" in e && o(12, G = e.class), "$$scope" in e && o(38, x = e.$$scope) + }, e.$$.update = () => { + 270532608 & e.$$.dirty[0] && o(14, i = void 0 !== C ? B(C) : 0), 3 & e.$$.dirty[0] && (n = w - v), 16387 & e.$$.dirty[0] && o(33, a = hh(i, v, w)), 4 & e.$$.dirty[1] && o(15, s = 100 * a), 256 & e.$$.dirty[0] && o(34, l = D.toUpperCase()), 256 & e.$$.dirty[0] && o(35, c = "x" === D ? "Width" : "Height"), 16 & e.$$.dirty[1] && (d = "offset" + c), e.$$.dirty[1], 8 & e.$$.dirty[1] && (u = "page" + l), 32768 & e.$$.dirty[0] | 8 & e.$$.dirty[1] && o(17, h = `transform: translate${l}(${s}%)`) + }, [v, w, S, k, P, E, I, A, D, V, _, H, G, e => { + let t = !1; + N && e.stopPropagation(), clearTimeout(Y); + const o = p.getBoundingClientRect(); + if (m = p[d], $ = e[u], g = $ - o[D], _) { + if (Math.abs(g - a * m) > U) return; + t = !0, e.stopPropagation() + } + return document.activeElement !== p && p.focus(), X(g, m, { + grabbed: !0 + }), document.documentElement.addEventListener("pointermove", q), document.documentElement.addEventListener("pointerup", K), t + }, i, s, p, h, e => { + m || (o(21, C = W(parseFloat(e.target.value))), C !== f && (f = C, z(C))) + }, e => { + const t = p[d]; + X(i / n * t + e.detail[D], t), clearTimeout(Y), Y = setTimeout((() => { + F(C) + }), 250) + }, e => t => { + clearTimeout(Y), ee = e, te = !1, Q = setInterval((() => { + te = !0, J() + }), 100), document.addEventListener("pointercancel", oe), document.addEventListener("pointerup", oe) + }, C, M, R, L, z, F, O, B, W, N, U, e => { + const t = p.getBoundingClientRect(), + o = e[u] - t[D], + i = p[d]; + return Math.abs(o - a * i) + }, a, l, c, b, function(e) { + ta[e ? "unshift" : "push"]((() => { + p = e, o(16, p) + })) + }, x] +} +class xh extends Fa { + constructor(e) { + super(), za(this, e, bh, yh, Qr, { + min: 0, + max: 1, + step: 2, + id: 3, + value: 21, + valueMin: 22, + valueMax: 23, + trackStyle: 4, + trackClass: 5, + knobStyle: 6, + knobClass: 7, + ongrab: 24, + onchange: 25, + onrelease: 26, + onexceed: 27, + direction: 8, + getValue: 28, + setValue: 29, + enableSpinButtons: 9, + enableForceUseKnob: 10, + enableStopPropagation: 30, + enablePointerdownListener: 11, + maxInteractionDistance: 31, + class: 12, + eventDistanceToKnob: 32, + handlePointerDown: 13 + }, null, [-1, -1]) + } + get eventDistanceToKnob() { + return this.$$.ctx[32] + } + get handlePointerDown() { + return this.$$.ctx[13] + } +} + +function vh(e) { + let t, o; + return t = new td({ + props: { + class: "PinturaButtonIcon", + $$slots: { + default: [wh] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1048580 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function wh(e) { + let t; + return { + c() { + t = Cn("g") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[2] + }, + p(e, o) { + 4 & o && (t.innerHTML = e[2]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Sh(e) { + let t, o, i = du(e[8], e[6]) + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", "PinturaButtonLabelPrefix") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 320 & t && i !== (i = du(e[8], e[6]) + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function kh(e) { + let t, o, i, r, n, a, s, l, c, d = e[2] && vh(e), + u = e[8] && Sh(e); + return { + c() { + t = kn("span"), d && d.c(), o = Mn(), u && u.c(), i = Mn(), r = kn("span"), n = Tn(e[9]), An(r, "class", a = Mc(["PinturaButtonLabel", e[3], e[5] && "implicit"])), An(t, "slot", "label"), An(t, "title", s = du(e[1], e[6])), An(t, "class", l = Mc(["PinturaButtonInner", e[4]])) + }, + m(e, a) { + wn(e, t, a), d && d.m(t, null), bn(t, o), u && u.m(t, null), bn(t, i), bn(t, r), bn(r, n), c = !0 + }, + p(e, h) { + e[2] ? d ? (d.p(e, h), 4 & h && xa(d, 1)) : (d = vh(e), d.c(), xa(d, 1), d.m(t, o)) : d && (ya(), va(d, 1, 1, (() => { + d = null + })), ba()), e[8] ? u ? u.p(e, h) : (u = Sh(e), u.c(), u.m(t, i)) : u && (u.d(1), u = null), (!c || 512 & h) && Fn(n, e[9]), (!c || 40 & h && a !== (a = Mc(["PinturaButtonLabel", e[3], e[5] && "implicit"]))) && An(r, "class", a), (!c || 66 & h && s !== (s = du(e[1], e[6]))) && An(t, "title", s), (!c || 16 & h && l !== (l = Mc(["PinturaButtonInner", e[4]]))) && An(t, "class", l) + }, + i(e) { + c || (xa(d), c = !0) + }, + o(e) { + va(d), c = !1 + }, + d(e) { + e && Sn(t), d && d.d(), u && u.d() + } + } +} + +function Ch(e) { + let t, o, i, r, n; + const a = [e[12], { + value: e[7] + }, { + onchange: e[11] + }]; + let s = {}; + for (let e = 0; e < a.length; e += 1) s = Xr(s, a[e]); + return o = new xh({ + props: s + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "details") + }, + m(a, s) { + wn(a, t, s), Aa(o, t, null), i = !0, r || (n = Pn(t, "keydown", e[10]), r = !0) + }, + p(e, t) { + const i = 6272 & t ? Ra(a, [4096 & t && Pa(e[12]), 128 & t && { + value: e[7] + }, 2048 & t && { + onchange: e[11] + }]) : {}; + o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o), r = !1, n() + } + } +} + +function Th(e) { + let t, o; + return t = new iu({ + props: { + panelClass: "PinturaSliderPanel", + buttonClass: Mc(["PinturaSliderButton", e[0], e[5] && "PinturaSliderIconOnly"]), + $$slots: { + details: [Ch], + label: [kh] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, [o]) { + const i = {}; + 33 & o && (i.buttonClass = Mc(["PinturaSliderButton", e[0], e[5] && "PinturaSliderIconOnly"])), 1053694 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Mh(e, t, o) { + const i = ["class", "title", "label", "icon", "labelClass", "innerClass", "hideLabel", "locale", "value", "onchange", "labelPrefix"]; + let n = dn(t, i), + { + class: a + } = t, + { + title: s + } = t, + { + label: l = Math.round + } = t, + { + icon: c + } = t, + { + labelClass: d + } = t, + { + innerClass: u + } = t, + { + hideLabel: h = !1 + } = t, + { + locale: p + } = t, + { + value: m + } = t, + { + onchange: g = r + } = t, + { + labelPrefix: $ + } = t; + const { + min: f, + max: y, + getValue: b = j + } = n; + let x; + const v = e => o(9, x = (e => M(l) ? l(b(e), f, y, e) : l)(e)); + return e.$$set = e => { + t = Xr(Xr({}, t), cn(e)), o(12, n = dn(t, i)), "class" in e && o(0, a = e.class), "title" in e && o(1, s = e.title), "label" in e && o(13, l = e.label), "icon" in e && o(2, c = e.icon), "labelClass" in e && o(3, d = e.labelClass), "innerClass" in e && o(4, u = e.innerClass), "hideLabel" in e && o(5, h = e.hideLabel), "locale" in e && o(6, p = e.locale), "value" in e && o(7, m = e.value), "onchange" in e && o(14, g = e.onchange), "labelPrefix" in e && o(8, $ = e.labelPrefix) + }, e.$$.update = () => { + 8320 & e.$$.dirty && v(m) + }, [a, s, c, d, u, h, p, m, $, x, e => { + /tab/i.test(e.key) && e.preventDefault() + }, e => { + v(e), g(e) + }, n, l, g] +} +class Rh extends Fa { + constructor(e) { + super(), za(this, e, Mh, Th, Qr, { + class: 0, + title: 1, + label: 13, + icon: 2, + labelClass: 3, + innerClass: 4, + hideLabel: 5, + locale: 6, + value: 7, + onchange: 14, + labelPrefix: 8 + }) + } +} + +function Ph(e) { + let t, o, i = du(e[0], e[1]) + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", e[3]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, r) { + 3 & r && i !== (i = du(e[0], e[1]) + "") && Fn(o, i), 8 & r && An(t, "class", e[3]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Eh(e) { + let t, o, i, r, n = e[0] && Ph(e); + return i = new dp({ + props: { + items: e[2] + } + }), { + c() { + t = kn("li"), n && n.c(), o = Mn(), Ia(i.$$.fragment), An(t, "class", "PinturaShapeStyle") + }, + m(e, a) { + wn(e, t, a), n && n.m(t, null), bn(t, o), Aa(i, t, null), r = !0 + }, + p(e, [r]) { + e[0] ? n ? n.p(e, r) : (n = Ph(e), n.c(), n.m(t, o)) : n && (n.d(1), n = null); + const a = {}; + 4 & r && (a.items = e[2]), i.$set(a) + }, + i(e) { + r || (xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), n && n.d(), La(i) + } + } +} + +function Ih(e, t, o) { + let i, { + title: r + } = t, + { + locale: n + } = t, + { + items: a + } = t, + { + hideTitle: s = !1 + } = t; + return e.$$set = e => { + "title" in e && o(0, r = e.title), "locale" in e && o(1, n = e.locale), "items" in e && o(2, a = e.items), "hideTitle" in e && o(4, s = e.hideTitle) + }, e.$$.update = () => { + 16 & e.$$.dirty && o(3, i = "PinturaShapeStyleLabel" + (s ? " implicit" : "")) + }, [r, n, a, i, s] +} +class Ah extends Fa { + constructor(e) { + super(), za(this, e, Ih, Eh, Qr, { + title: 0, + locale: 1, + items: 2, + hideTitle: 4 + }) + } +} +var Lh = (e, t, o) => { + let i, r, n; + const a = Math.floor(6 * e), + s = 6 * e - a, + l = o * (1 - t), + c = o * (1 - s * t), + d = o * (1 - (1 - s) * t); + switch (a % 6) { + case 0: + i = o, r = d, n = l; + break; + case 1: + i = c, r = o, n = l; + break; + case 2: + i = l, r = o, n = d; + break; + case 3: + i = l, r = c, n = o; + break; + case 4: + i = d, r = l, n = o; + break; + case 5: + i = o, r = l, n = c + } + return [i, r, n] +}; + +function zh(e) { + let t, o, i; + return { + c() { + t = kn("div"), o = kn("span"), An(t, "class", "PinturaColorPreview"), An(t, "title", e[0]), An(t, "style", i = "--color:" + e[1]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, [o]) { + 1 & o && An(t, "title", e[0]), 2 & o && i !== (i = "--color:" + e[1]) && An(t, "style", i) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t) + } + } +} + +function Fh(e, t, o) { + let i, { + color: r + } = t, + { + title: n + } = t; + return e.$$set = e => { + "color" in e && o(2, r = e.color), "title" in e && o(0, n = e.title) + }, e.$$.update = () => { + 4 & e.$$.dirty && o(1, i = r ? _o(r) : "transparent") + }, [n, i, r] +} +class Oh extends Fa { + constructor(e) { + super(), za(this, e, Fh, zh, Qr, { + color: 2, + title: 0 + }) + } +} +var Dh = e => (e = e.trim(), /^rgba/.test(e) ? e.substr(5).split(",").map(parseFloat).map(((e, t) => e / (3 === t ? 1 : 255))) : /^rgb/.test(e) ? e.substr(4).split(",").map(parseFloat).map((e => e / 255)) : /^#/.test(e) ? (e => { + const [, t, o, i, r] = e.split(""); + e = e.length >= 4 && e.length <= 5 ? `#${t}${t}${o}${o}${i}${i}${r?`${r}${r}`:""}` : e; + const [n, a, s, l, c] = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e) || []; + if (n) return [a, s, l, c].filter((e => void 0 !== e)).map((e => parseInt(e, 16) / 255)) +})(e) : /[0-9]{1,3}\s?,\s?[0-9]{1,3}\s?,\s?[0-9]{1,3}/.test(e) ? e.split(",").map((e => parseInt(e, 10))).map((e => e / 255)) : void 0); + +function Bh(e) { + let t, o; + return { + c() { + t = kn("span"), o = Tn(e[0]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1 & t[0] && Fn(o, e[0]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Wh(e) { + let t, o, i, r; + o = new Oh({ + props: { + color: e[4], + title: du(e[8], e[10]) + } + }); + let n = !e[9] && Bh(e); + return { + c() { + t = kn("span"), Ia(o.$$.fragment), i = Mn(), n && n.c(), An(t, "slot", "label"), An(t, "class", "PinturaButtonLabel") + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), n && n.m(t, null), r = !0 + }, + p(e, i) { + const r = {}; + 16 & i[0] && (r.color = e[4]), 1280 & i[0] && (r.title = du(e[8], e[10])), o.$set(r), e[9] ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Bh(e), n.c(), n.m(t, null)) + }, + i(e) { + r || (xa(o.$$.fragment, e), r = !0) + }, + o(e) { + va(o.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), La(o), n && n.d() + } + } +} + +function Vh(e) { + let t, o, i, r, n, a, s, l, c, d, u, h, p, m; + c = new xh({ + props: { + class: "PinturaHuePicker", + knobStyle: "background-color:" + e[20], + onchange: e[26], + value: e[15], + min: 0, + max: 1, + step: .01 + } + }); + let g = e[11] && _h(e), + $ = e[14] && Nh(e); + return { + c() { + t = kn("div"), o = kn("div"), i = kn("div"), r = kn("div"), l = Mn(), Ia(c.$$.fragment), d = Mn(), g && g.c(), u = Mn(), $ && $.c(), An(r, "role", "button"), An(r, "aria-label", "Saturation slider"), An(r, "class", "PinturaPickerKnob"), An(r, "tabindex", "0"), An(r, "style", n = `background-color:${e[19]};`), An(i, "class", "PinturaPickerKnobController"), An(i, "style", a = `transform:translate(${e[24]}%,${e[23]}%)`), An(o, "class", "PinturaSaturationPicker"), An(o, "style", s = "background-color: " + e[20]), An(t, "class", "PinturaPicker") + }, + m(n, a) { + wn(n, t, a), bn(t, o), bn(o, i), bn(i, r), e[37](o), bn(t, l), Aa(c, t, null), bn(t, d), g && g.m(t, null), bn(t, u), $ && $.m(t, null), h = !0, p || (m = [Pn(r, "nudge", e[29]), hn(pd.call(null, r, { + preventDefault: !0 + })), Pn(o, "pointerdown", e[28])], p = !0) + }, + p(e, l) { + (!h || 524288 & l[0] && n !== (n = `background-color:${e[19]};`)) && An(r, "style", n), (!h || 25165824 & l[0] && a !== (a = `transform:translate(${e[24]}%,${e[23]}%)`)) && An(i, "style", a), (!h || 1048576 & l[0] && s !== (s = "background-color: " + e[20])) && An(o, "style", s); + const d = {}; + 1048576 & l[0] && (d.knobStyle = "background-color:" + e[20]), 32768 & l[0] && (d.value = e[15]), c.$set(d), e[11] ? g ? (g.p(e, l), 2048 & l[0] && xa(g, 1)) : (g = _h(e), g.c(), xa(g, 1), g.m(t, u)) : g && (ya(), va(g, 1, 1, (() => { + g = null + })), ba()), e[14] ? $ ? $.p(e, l) : ($ = Nh(e), $.c(), $.m(t, null)) : $ && ($.d(1), $ = null) + }, + i(e) { + h || (xa(c.$$.fragment, e), xa(g), h = !0) + }, + o(e) { + va(c.$$.fragment, e), va(g), h = !1 + }, + d(o) { + o && Sn(t), e[37](null), La(c), g && g.d(), $ && $.d(), p = !1, Kr(m) + } + } +} + +function _h(e) { + let t, o; + return t = new xh({ + props: { + class: "PinturaOpacityPicker", + knobStyle: "background-color:" + e[17], + trackStyle: `background-image:linear-gradient(to right,${e[18]},${e[19]})`, + onchange: e[27], + value: e[16], + min: 0, + max: 1, + step: .01 + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 131072 & o[0] && (i.knobStyle = "background-color:" + e[17]), 786432 & o[0] && (i.trackStyle = `background-image:linear-gradient(to right,${e[18]},${e[19]})`), 65536 & o[0] && (i.value = e[16]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Nh(e) { + let t, o, i; + return { + c() { + t = kn("input"), An(t, "class", "PinturaColorPickerInput"), An(t, "type", "text"), t.value = e[22] + }, + m(r, n) { + wn(r, t, n), o || (i = Pn(t, "input", e[30]), o = !0) + }, + p(e, o) { + 4194304 & o[0] && t.value !== e[22] && (t.value = e[22]) + }, + d(e) { + e && Sn(t), o = !1, i() + } + } +} + +function Hh(e) { + let t, o; + return t = new Bu({ + props: { + label: du(e[10].labelColorPalette, e[10]), + class: Mc(["PinturaColorPresets", e[9] ? "PinturaColorPresetsGrid" : "PinturaColorPresetsList"]), + hideLabel: !1, + name: e[1], + value: e[4], + optionGroupClass: "PinturaListOptionGroup", + optionClass: "PinturaListOption", + options: e[2].map(e[38]), + selectedIndex: e[3], + optionMapper: e[7], + optionLabelClass: e[6], + onchange: e[39], + $$slots: { + option: [Gh, ({ + option: e + }) => ({ + 51: e + }), ({ + option: e + }) => [0, e ? 1048576 : 0]], + group: [jh, ({ + option: e + }) => ({ + 51: e + }), ({ + option: e + }) => [0, e ? 1048576 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o[0] && (i.label = du(e[10].labelColorPalette, e[10])), 512 & o[0] && (i.class = Mc(["PinturaColorPresets", e[9] ? "PinturaColorPresetsGrid" : "PinturaColorPresetsList"])), 2 & o[0] && (i.name = e[1]), 16 & o[0] && (i.value = e[4]), 1028 & o[0] && (i.options = e[2].map(e[38])), 8 & o[0] && (i.selectedIndex = e[3]), 128 & o[0] && (i.optionMapper = e[7]), 64 & o[0] && (i.optionLabelClass = e[6]), 512 & o[0] | 3145728 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function jh(e) { + let t, o, i = e[51].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "slot", "group") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1048576 & t[1] && i !== (i = e[51].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Uh(e) { + let t, o, i = e[51].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", "PinturaButtonLabel") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1048576 & t[1] && i !== (i = e[51].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Gh(e) { + let t, o, i, r; + o = new Oh({ + props: { + title: e[51].label, + color: e[51].value + } + }); + let n = !e[9] && Uh(e); + return { + c() { + t = kn("span"), Ia(o.$$.fragment), i = Mn(), n && n.c(), An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), n && n.m(t, null), r = !0 + }, + p(e, i) { + const r = {}; + 1048576 & i[1] && (r.title = e[51].label), 1048576 & i[1] && (r.color = e[51].value), o.$set(r), e[9] ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Uh(e), n.c(), n.m(t, null)) + }, + i(e) { + r || (xa(o.$$.fragment, e), r = !0) + }, + o(e) { + va(o.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), La(o), n && n.d() + } + } +} + +function Zh(e) { + let t, o, i, r = e[13] && Vh(e), + n = e[12] && Hh(e); + return { + c() { + t = kn("div"), r && r.c(), o = Mn(), n && n.c(), An(t, "slot", "details"), An(t, "class", "PinturaColorPickerPanel") + }, + m(e, a) { + wn(e, t, a), r && r.m(t, null), bn(t, o), n && n.m(t, null), i = !0 + }, + p(e, i) { + e[13] ? r ? (r.p(e, i), 8192 & i[0] && xa(r, 1)) : (r = Vh(e), r.c(), xa(r, 1), r.m(t, o)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[12] ? n ? (n.p(e, i), 4096 & i[0] && xa(n, 1)) : (n = Hh(e), n.c(), xa(n, 1), n.m(t, null)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + e && Sn(t), r && r.d(), n && n.d() + } + } +} + +function Xh(e) { + let t, o; + return t = new iu({ + props: { + buttonClass: Mc(["PinturaColorPickerButton", e[5]]), + $$slots: { + details: [Zh], + label: [Wh] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 32 & o[0] && (i.buttonClass = Mc(["PinturaColorPickerButton", e[5]])), 33554399 & o[0] | 2097152 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Yh(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, { + label: f + } = t, + { + name: y + } = t, + { + options: b = [] + } = t, + { + selectedIndex: x = -1 + } = t, + { + value: v + } = t, + { + buttonClass: w + } = t, + { + optionLabelClass: S + } = t, + { + optionMapper: k + } = t, + { + onchange: C + } = t, + { + title: T + } = t, + { + hidePresetLabel: R = !0 + } = t, + { + locale: P + } = t, + { + enableOpacity: E = !0 + } = t, + { + enablePresets: I = !0 + } = t, + { + enablePicker: A = !0 + } = t, + { + enableInput: L = !1 + } = t; + const z = (e, t) => { + if (u = [e[0], e[1], e[2]], t) { + let t = ((e, t, o) => { + let i = Math.max(e, t, o), + r = i - Math.min(e, t, o), + n = r && (i == e ? (t - o) / r : i == t ? 2 + (o - e) / r : 4 + (e - t) / r); + return [60 * (n < 0 ? n + 6 : n) / 360, i && r / i, i] + })(...u); + o(15, s = t[0]), o(32, l = t[1]), o(33, c = t[2]), o(16, d = Eo(e[3]) ? e[3] : 1) + } + o(17, h = _o(e)), o(18, p = _o([...u, 0])), o(19, m = _o([...u, 1])), o(20, g = _o(Lh(s, 1, 1))) + }, + F = () => { + const e = [...Lh(s, l, c), d]; + z(e), C(e) + }, + O = e => { + const t = 3 === e.length ? [...e, 1] : e; + z(t, !0), C(t) + }, + D = (e, t) => { + const i = rs(e.x / t.width, 0, 1), + r = rs(e.y / t.height, 0, 1); + var n; + n = 1 - r, o(32, l = i), o(33, c = n), 0 === d && o(16, d = 1), F() + }; + let B, W, V, _; + const N = e => { + const t = xe(de(e), _); + D(be(ue(V), t), W) + }, + H = e => { + W = void 0, document.documentElement.removeEventListener("pointermove", N), document.documentElement.removeEventListener("pointerup", H) + }; + let j; + return e.$$set = e => { + "label" in e && o(0, f = e.label), "name" in e && o(1, y = e.name), "options" in e && o(2, b = e.options), "selectedIndex" in e && o(3, x = e.selectedIndex), "value" in e && o(4, v = e.value), "buttonClass" in e && o(5, w = e.buttonClass), "optionLabelClass" in e && o(6, S = e.optionLabelClass), "optionMapper" in e && o(7, k = e.optionMapper), "onchange" in e && o(31, C = e.onchange), "title" in e && o(8, T = e.title), "hidePresetLabel" in e && o(9, R = e.hidePresetLabel), "locale" in e && o(10, P = e.locale), "enableOpacity" in e && o(11, E = e.enableOpacity), "enablePresets" in e && o(12, I = e.enablePresets), "enablePicker" in e && o(13, A = e.enablePicker), "enableInput" in e && o(14, L = e.enableInput) + }, e.$$.update = () => { + 16 & e.$$.dirty[0] | 8 & e.$$.dirty[1] && (!v || $ && cs(v, $) || (o(34, $ = [...v]), z(v, !0))), 2 & e.$$.dirty[1] && o(24, i = 100 * l), 4 & e.$$.dirty[1] && o(23, r = 100 - 100 * c), 16 & e.$$.dirty[1] && o(36, n = !!j && (j.length >= 4 && j.length <= 5)), 18448 & e.$$.dirty[0] | 32 & e.$$.dirty[1] && o(22, a = L && v ? ((e, t, o) => { + let i = e.map((e => Math.round(255 * e).toString(16).toLowerCase().padStart(2, "0"))); + return (!t && i.length > 3 || "ff" === i[3]) && i.pop(), o && (i = i.map((e => e.substring(0, 1)))), "#" + i.join("") + })(v, E, n) : void 0) + }, [f, y, b, x, v, w, S, k, T, R, P, E, I, A, L, s, d, h, p, m, g, B, a, r, i, O, e => { + o(15, s = e), 0 === d && o(16, d = 1), F() + }, e => { + o(16, d = e), F() + }, e => { + e.stopPropagation(), W = De(B.offsetWidth, B.offsetHeight), V = (e => ce(e.offsetX, e.offsetY))(e), _ = de(e), D(V, W), document.documentElement.addEventListener("pointermove", N), document.documentElement.addEventListener("pointerup", H) + }, e => { + W = De(B.offsetWidth, B.offsetHeight); + const t = i / 100 * W.width, + o = r / 100 * W.height; + D({ + x: t + e.detail.x, + y: o + e.detail.y + }, W) + }, e => { + const { + value: t + } = e.target, i = t.length; + if (!t.startsWith("#") || i < 4 || 6 === i || 8 === i || i > 9) return; + if (!E && i > 7) return; + const r = Dh(t); + r && (o(35, j = t), z(r), C(r)) + }, C, l, c, $, j, n, function(e) { + ta[e ? "unshift" : "push"]((() => { + B = e, o(21, B) + })) + }, ([e, t]) => [e, M(t) ? t(P) : t], e => O(e.value)] +} +class qh extends Fa { + constructor(e) { + super(), za(this, e, Yh, Xh, Qr, { + label: 0, + name: 1, + options: 2, + selectedIndex: 3, + value: 4, + buttonClass: 5, + optionLabelClass: 6, + optionMapper: 7, + onchange: 31, + title: 8, + hidePresetLabel: 9, + locale: 10, + enableOpacity: 11, + enablePresets: 12, + enablePicker: 13, + enableInput: 14 + }, null, [-1, -1]) + } +} + +function Kh(e) { + let t, o, i; + return o = new dp({ + props: { + items: e[0] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaShorthandControl PinturaShapeStyle") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, [t]) { + const i = {}; + 1 & t && (i.items = e[0]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Jh(e, t, o) { + let i, r, { + value: n + } = t, + { + onchange: a + } = t, + { + controls: s = [] + } = t; + return e.$$set = e => { + o(6, t = Xr(Xr({}, t), cn(e))), "value" in e && o(1, n = e.value), "onchange" in e && o(2, a = e.onchange), "controls" in e && o(3, s = e.controls) + }, e.$$.update = () => { + o(4, i = (e => { + const { + controls: t, + ...o + } = e; + return o + })(t)), 30 & e.$$.dirty && o(0, r = s.map(((e, t) => { + const [o, r, s] = e; + return [o, r, { + ...i, + ...s, + value: n[t], + onchange: e => { + const o = [...n]; + o[t] = e, a(o) + } + }] + }))) + }, t = cn(t), [r, n, a, s, i] +} +class Qh extends Fa { + constructor(e) { + super(), za(this, e, Jh, Kh, Qr, { + value: 1, + onchange: 2, + controls: 3 + }) + } +} + +function ep(e, t, o) { + const i = e.slice(); + return i[9] = t[o][0], i[0] = t[o][1], i[10] = t[o][2], i[2] = t[o][3], i +} + +function tp(e) { + let t, o, i; + const r = [e[10]]; + var n = e[3][e[9]] || e[9]; + + function a(e) { + let t = {}; + for (let e = 0; e < r.length; e += 1) t = Xr(t, r[e]); + return { + props: t + } + } + return n && (t = Wn(n, a())), { + c() { + t && Ia(t.$$.fragment), o = Rn() + }, + m(e, r) { + t && Aa(t, e, r), wn(e, o, r), i = !0 + }, + p(e, i) { + const s = 4 & i ? Ra(r, [Pa(e[10])]) : {}; + if (n !== (n = e[3][e[9]] || e[9])) { + if (t) { + ya(); + const e = t; + va(e.$$.fragment, 1, 0, (() => { + La(e, 1) + })), ba() + } + n ? (t = Wn(n, a()), Ia(t.$$.fragment), xa(t.$$.fragment, 1), Aa(t, o.parentNode, o)) : t = null + } else n && t.$set(s) + }, + i(e) { + i || (t && xa(t.$$.fragment, e), i = !0) + }, + o(e) { + t && va(t.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(o), t && La(t, e) + } + } +} + +function op(e) { + let t, o = e[9], + i = e[9] && ap(e); + return { + c() { + i && i.c(), t = Rn() + }, + m(e, o) { + i && i.m(e, o), wn(e, t, o) + }, + p(e, r) { + e[9] ? o ? Qr(o, e[9]) ? (i.d(1), i = ap(e), i.c(), i.m(t.parentNode, t)) : i.p(e, r) : (i = ap(e), i.c(), i.m(t.parentNode, t)) : o && (i.d(1), i = null), o = e[9] + }, + i: Gr, + o(e) { + va(i) + }, + d(e) { + e && Sn(t), i && i.d(e) + } + } +} + +function ip(e) { + let t, o, i = e[10].innerHTML + ""; + return { + c() { + t = new Bn(!1), o = Rn(), t.a = o + }, + m(e, r) { + t.m(i, e, r), wn(e, o, r) + }, + p(e, o) { + 4 & o && i !== (i = e[10].innerHTML + "") && t.p(i) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(o), e && t.d() + } + } +} + +function rp(e) { + let t, o = e[10].textContent + ""; + return { + c() { + t = Tn(o) + }, + m(e, o) { + wn(e, t, o) + }, + p(e, i) { + 4 & i && o !== (o = e[10].textContent + "") && Fn(t, o) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t) + } + } +} + +function np(e) { + let t, o; + return t = new dp({ + props: { + items: e[2], + discardEmptyItems: !0 + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 4 & o && (i.items = e[2]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function ap(e) { + let t, o, i, r, n; + const a = [np, rp, ip], + s = []; + + function l(e, t) { + return e[2] && e[2].length ? 0 : e[10].textContent ? 1 : e[10].innerHTML ? 2 : -1 + }~(o = l(e)) && (i = s[o] = a[o](e)); + let c = [e[4](e[10])], + d = {}; + for (let e = 0; e < c.length; e += 1) d = Xr(d, c[e]); + return { + c() { + t = kn(e[9]), i && i.c(), r = Mn(), /-/.test(e[9]) ? zn(t, d) : Ln(t, d) + }, + m(e, i) { + wn(e, t, i), ~o && s[o].m(t, null), bn(t, r), n = !0 + }, + p(e, n) { + let u = o; + o = l(e), o === u ? ~o && s[o].p(e, n) : (i && (ya(), va(s[u], 1, 1, (() => { + s[u] = null + })), ba()), ~o ? (i = s[o], i ? i.p(e, n) : (i = s[o] = a[o](e), i.c()), xa(i, 1), i.m(t, r)) : i = null), d = Ra(c, [4 & n && e[4](e[10])]), /-/.test(e[9]) ? zn(t, d) : Ln(t, d) + }, + i(e) { + n || (xa(i), n = !0) + }, + o(e) { + va(i), n = !1 + }, + d(e) { + e && Sn(t), ~o && s[o].d() + } + } +} + +function sp(e, t) { + let o, i, r, n, a, s; + const l = [op, tp], + c = []; + + function d(e, t) { + return 4 & t && (i = null), null == i && (i = !e[5](e[9])), i ? 0 : 1 + } + return r = d(t, -1), n = c[r] = l[r](t), { + key: e, + first: null, + c() { + o = Rn(), n.c(), a = Rn(), this.first = o + }, + m(e, t) { + wn(e, o, t), c[r].m(e, t), wn(e, a, t), s = !0 + }, + p(e, o) { + let i = r; + r = d(t = e, o), r === i ? c[r].p(t, o) : (ya(), va(c[i], 1, 1, (() => { + c[i] = null + })), ba(), n = c[r], n ? n.p(t, o) : (n = c[r] = l[r](t), n.c()), xa(n, 1), n.m(a.parentNode, a)) + }, + i(e) { + s || (xa(n), s = !0) + }, + o(e) { + va(n), s = !1 + }, + d(e) { + e && Sn(o), c[r].d(e), e && Sn(a) + } + } +} + +function lp(e) { + let t, o, i = [], + r = new Map, + n = e[2]; + const a = e => e[0] + e[1]; + for (let t = 0; t < n.length; t += 1) { + let o = ep(e, n, t), + s = a(o); + r.set(s, i[t] = sp(s, o)) + } + return { + c() { + for (let e = 0; e < i.length; e += 1) i[e].c(); + t = Rn() + }, + m(e, r) { + for (let t = 0; t < i.length; t += 1) i[t].m(e, r); + wn(e, t, r), o = !0 + }, + p(e, [o]) { + 62 & o && (n = e[2], ya(), i = Ma(i, o, a, 1, e, n, r, t.parentNode, Ta, sp, t, ep), ba()) + }, + i(e) { + if (!o) { + for (let e = 0; e < n.length; e += 1) xa(i[e]); + o = !0 + } + }, + o(e) { + for (let e = 0; e < i.length; e += 1) va(i[e]); + o = !1 + }, + d(e) { + for (let t = 0; t < i.length; t += 1) i[t].d(e); + e && Sn(t) + } + } +} + +function cp(e, t, o) { + let i, r, { + items: n + } = t, + { + discardEmptyItems: a = !0 + } = t, + { + key: s = "" + } = t; + const l = { + Button: cd, + ImageButton: Fd, + ImageButtonList: Vd, + Dropdown: sh, + RadioGroup: Bu, + Input: Nu, + Panel: uh, + ProgressIndicator: Rd, + ShapeStyle: Ah, + ToggleSlider: Rh, + ColorPicker: qh, + ShorthandControl: Qh + }, + c = e => !T(e) || !!l[e], + d = e => { + if (!e) return !1; + const [t, , o, i = []] = e; + return !!c(t) || (i.some(d) || o.textContent || o.innerHTML) + }; + return e.$$set = e => { + "items" in e && o(6, n = e.items), "discardEmptyItems" in e && o(7, a = e.discardEmptyItems), "key" in e && o(0, s = e.key) + }, e.$$.update = () => { + 1 & e.$$.dirty && o(1, i = s), 192 & e.$$.dirty && o(2, r = (n && a ? n.filter(d) : n) || []) + }, [s, i, r, l, (e = {}) => { + const { + textContent: t, + innerHTML: o, + ...i + } = e; + return i + }, c, n, a] +} +class dp extends Fa { + constructor(e) { + super(), za(this, e, cp, lp, Qr, { + items: 6, + discardEmptyItems: 7, + key: 0 + }) + } +} +let up = null; +var hp = e => { + if (null === up && (up = c() && "visualViewport" in window), !up) return !1; + const t = visualViewport.height, + o = () => { + e(visualViewport.height < t ? "visible" : "hidden") + }; + return visualViewport.addEventListener("resize", o), () => visualViewport.removeEventListener("resize", o) +}; + +function pp(e) { + let t, o; + const i = [{ + onclick: e[1] + }, e[3]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 10 & o[0] ? Ra(i, [2 & o[0] && { + onclick: e[1] + }, 8 & o[0] && Pa(e[3])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function mp(e) { + let t, o; + const i = [{ + onclick: e[0] + }, { + class: "PinturaInputFormButtonConfirm" + }, e[2]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 5 & o[0] ? Ra(i, [1 & o[0] && { + onclick: e[0] + }, i[1], 4 & o[0] && Pa(e[2])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function gp(e) { + let t, o, i, r, n, a, s, l, c = e[3] && pp(e); + const d = e[24].default, + u = rn(d, e, e[23], null); + let h = e[2] && mp(e); + return { + c() { + t = kn("div"), o = kn("div"), c && c.c(), i = Mn(), r = kn("div"), u && u.c(), n = Mn(), h && h.c(), An(r, "class", "PinturaInputFormFields"), An(o, "class", "PinturaInputFormInner"), An(t, "class", "PinturaInputForm"), An(t, "data-layout", e[4]), An(t, "style", e[6]) + }, + m(d, p) { + wn(d, t, p), bn(t, o), c && c.m(o, null), bn(o, i), bn(o, r), u && u.m(r, null), bn(o, n), h && h.m(o, null), e[25](t), a = !0, s || (l = [Pn(r, "keydown", e[10]), Pn(t, "focusin", e[7]), Pn(t, "focusout", e[8]), Pn(t, "measure", e[9]), hn($c.call(null, t))], s = !0) + }, + p(e, r) { + e[3] ? c ? (c.p(e, r), 8 & r[0] && xa(c, 1)) : (c = pp(e), c.c(), xa(c, 1), c.m(o, i)) : c && (ya(), va(c, 1, 1, (() => { + c = null + })), ba()), u && u.p && (!a || 8388608 & r[0]) && sn(u, d, e, e[23], a ? an(d, e[23], r, null) : ln(e[23]), null), e[2] ? h ? (h.p(e, r), 4 & r[0] && xa(h, 1)) : (h = mp(e), h.c(), xa(h, 1), h.m(o, null)) : h && (ya(), va(h, 1, 1, (() => { + h = null + })), ba()), (!a || 16 & r[0]) && An(t, "data-layout", e[4]), (!a || 64 & r[0]) && An(t, "style", e[6]) + }, + i(e) { + a || (xa(c), xa(u, e), xa(h), a = !0) + }, + o(e) { + va(c), va(u, e), va(h), a = !1 + }, + d(o) { + o && Sn(t), c && c.d(), u && u.d(o), h && h.d(), e[25](null), s = !1, Kr(l) + } + } +} + +function $p(e, t, o) { + let i, r, n, a, s, { + $$slots: l = {}, + $$scope: c + } = t, + { + onconfirm: d + } = t, + { + oncancel: u + } = t, + { + autoFocus: h = !0 + } = t, + { + autoPositionCursor: p = !0 + } = t, + { + buttonConfirm: m + } = t, + { + buttonCancel: g + } = t, + { + layout: $ = "stack" + } = t, + { + parentRect: f + } = t, + { + align: y + } = t, + { + justify: x + } = t, + { + parentMargin: v = 16 + } = t, + { + panelOffset: w = le() + } = t, + S = !1, + k = void 0, + C = void 0, + T = "", + M = 0; + const R = () => { + const e = s.querySelector("input, textarea"); + e.focus(), M >= 1 || e.select() + }, + P = () => { + S = !0, I || !mo() && !b() || o(19, T = "top:1em;bottom:auto;"), mo() && (e => { + let t; + const o = e => t = e.touches[0].screenY, + i = e => { + const o = e.touches[0].screenY, + i = e.target; + /textarea/i.test(i.nodeName) ? (o > t ? 0 == i.scrollTop && e.preventDefault() : o < t ? i.scrollTop + i.offsetHeight == i.scrollHeight && e.preventDefault() : e.preventDefault(), t = o) : e.preventDefault() + }; + e.addEventListener("touchstart", o), e.addEventListener("touchmove", i) + })(s), o(20, M = 1) + }; + let E; + const I = hp((e => { + n ? "hidden" !== e || S ? (clearTimeout(C), C = void 0, o(19, T = `top:${visualViewport.height-k.height-w.y}px`), "visible" === e ? (o(5, s.dataset.stick = !0, s), R(), P()) : (S = !1, o(20, M = 0))) : R() : o(19, T = "top: 4.5em; bottom: auto") + })); + return Zn((() => { + h && R() + })), Yn((() => { + I && I() + })), e.$$set = e => { + "onconfirm" in e && o(0, d = e.onconfirm), "oncancel" in e && o(1, u = e.oncancel), "autoFocus" in e && o(11, h = e.autoFocus), "autoPositionCursor" in e && o(12, p = e.autoPositionCursor), "buttonConfirm" in e && o(2, m = e.buttonConfirm), "buttonCancel" in e && o(3, g = e.buttonCancel), "layout" in e && o(4, $ = e.layout), "parentRect" in e && o(13, f = e.parentRect), "align" in e && o(14, y = e.align), "justify" in e && o(15, x = e.justify), "parentMargin" in e && o(16, v = e.parentMargin), "panelOffset" in e && o(17, w = e.panelOffset), "$$scope" in e && o(23, c = e.$$scope) + }, e.$$.update = () => { + 385024 & e.$$.dirty[0] && o(21, i = f && k ? ((e, t, o, i, r) => { + let n, a; + return n = "center" === i ? e.x + .5 * e.width - .5 * t.width : "right" === i ? e.x + e.width - t.width - r : e.x + r, a = "center" === o ? e.y + .5 * e.height - .5 * t.height : "bottom" === o ? e.y + e.height - t.height - r : e.y + r, `left:${n}px;top:${a}px;right:auto;bottom:auto;` + })(f, k, y, x, v) : void 0), 32 & e.$$.dirty[0] && o(22, r = s && getComputedStyle(s)), 4194304 & e.$$.dirty[0] && (n = r && "1" === r.getPropertyValue("--editor-modal")), 3670016 & e.$$.dirty[0] && o(6, a = `opacity:${M};${i||T}`) + }, [d, u, m, g, $, s, a, e => { + var t; + ((e => /textarea/i.test(e))(e.target) || Ud(e.target)) && (E = Date.now(), p && ((t = e.target).selectionStart = t.selectionEnd = t.value.length), clearTimeout(C), C = setTimeout(P, 200)) + }, e => { + Date.now() - E > 50 || (e.stopPropagation(), R()) + }, ({ + detail: e + }) => { + o(18, k = { + width: e.width, + height: e.height + }) + }, e => "Enter" === e.key ? d() : "Escape" === e.key ? u() : void 0, h, p, f, y, x, v, w, k, T, M, i, r, c, l, function(e) { + ta[e ? "unshift" : "push"]((() => { + s = e, o(5, s) + })) + }] +} +class fp extends Fa { + constructor(e) { + super(), za(this, e, $p, gp, Qr, { + onconfirm: 0, + oncancel: 1, + autoFocus: 11, + autoPositionCursor: 12, + buttonConfirm: 2, + buttonCancel: 3, + layout: 4, + parentRect: 13, + align: 14, + justify: 15, + parentMargin: 16, + panelOffset: 17 + }, null, [-1, -1]) + } +} +const yp = ["aspectRatio", "isRotatedSideways", "flip", "cropSize"], + bp = ms.map((([e]) => e)).filter((e => !yp.includes(e))); +var xp = (e, t) => new CustomEvent("ping", { + detail: { + type: e, + data: t + }, + cancelable: !0, + bubbles: !0 + }), + vp = (e, t) => (t ? cl(e, t) : e).replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\s+/g, "-").toLowerCase(), + wp = (e, t = j) => { + const { + subscribe: o, + set: i + } = Ba(void 0); + return { + subscribe: o, + destroy: ((e, t) => { + const o = matchMedia(e); + return o.addListener(t), t(o), { + get matches() { + return o.matches + }, + destroy: () => o.removeListener(t) + } + })(e, (({ + matches: e + }) => i(t(e)))).destroy + } + }, + Sp = e => /video/.test(e.type); +var kp = (e, t, o) => new Promise(((i, r) => { + (async () => { + Sp(e) && i(await (e => new Promise(((t, o) => { + const i = p("video"); + i.onseeked = () => { + const e = p("canvas"); + Xt(i).then((({ + width: o, + height: r + }) => { + e.width = o, e.height = r; + const n = e.getContext("2d", { + willReadFrequently: !0 + }), + a = () => { + n.drawImage(i, 0, 0, e.width, e.height); + const o = n.getImageData(0, 0, e.width, e.height); + g(e), URL.revokeObjectURL(i.src), t(o) + }; + Gt() ? setTimeout(a, 16) : a() + })) + }, i.onloadeddata = () => { + i.currentTime = 0 + }, i.onerror = e => { + console.error(e), o(i.error) + }, i.src = URL.createObjectURL(e), i.load() + })))(e)); + const n = await t.read(e), + a = e => z(e, o).then((e => t.apply(e, n))).then(i).catch(r); + if (E(e) || !P() || Gt() || mo()) return a(e); + let s; + try { + s = await L(((e, t) => createImageBitmap(e).then((e => t(null, e))).catch(t)), [e]) + } catch (e) {} + s && s.width ? await u() ? Fl() && n > 1 ? i(await (async e => h(await v(e)))(s)) : i(s) : i(t.apply(s, n)) : a(e) + })() + })), + Cp = (e, t) => new Promise((async o => { + if (e.width < t.width && e.height < t.height) return o(e); + const i = Math.min(t.width / e.width, t.height / e.height), + r = i * e.width, + n = i * e.height, + a = p("canvas", { + width: r, + height: n + }), + s = a.getContext("2d", { + willReadFrequently: !0 + }), + l = $(e) ? await v(e) : e; + s.drawImage(l, 0, 0, r, n), o(h(a)) + })); +let Tp = null; +var Mp = () => { + if (null === Tp) { + let e = p("canvas"); + Tp = !!Cl(e), g(e), e = void 0 + } + return Tp +}; +const Rp = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], + Pp = { + precision: 1e-4 + }, + Ep = { + precision: .01 * Pp.precision + }; +var Ip = () => { + const e = [], + t = [], + o = [], + i = () => { + t.forEach((e => e(o))) + }, + r = t => { + t.unsub = t.subscribe((r => ((t, r) => { + const n = e.indexOf(t); + n < 0 || (o[n] = r, i()) + })(t, r))), i() + }; + return { + get length() { + return e.length + }, + clear: () => { + e.forEach((e => e.unsub())), e.length = 0, o.length = 0 + }, + unshift: t => { + e.unshift(t), r(t) + }, + get: t => e[t], + push: t => { + e.push(t), r(t) + }, + remove: t => { + t.unsub(); + const i = e.indexOf(t); + e.splice(i, 1), o.splice(i, 1) + }, + forEach: t => e.forEach(t), + filter: t => e.filter(t), + subscribe: e => (t.push(e), e(o), () => { + t.splice(t.indexOf(e), 1) + }) + } + }, + Ap = e => e[0] < .25 && e[1] < .25 && e[2] < .25, + Lp = (e = {}) => new Promise((t => { + const { + accept: o = "image/*" + } = e, i = p("input", { + style: "position:absolute;visibility:hidden;width:0;height:0;", + type: "file", + accept: o + }), r = () => { + const [e] = i.files; + i.parentNode && i.remove(), i.removeEventListener("change", r), t(e) + }; + i.addEventListener("change", r), mo() && document.body.append(i), i.click() + })), + zp = e => { + try { + return e() + } catch (e) { + console.error(e) + } + }, + Fp = ([e, t]) => e + .5 * (t - e), + Op = e => Math.round(100 * e), + Dp = e => ce(e.clientX, e.clientY), + Bp = (e, t, o) => { + const i = Dp(e); + return xe(xe(i, t), o) + }; + +function Wp(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, { + root: S + } = t, + { + locale: k + } = t, + { + stores: C + } = t, + { + allowPan: T = !0 + } = t, + { + allowZoom: M = !0 + } = t, + { + enablePan: R = !0 + } = t, + { + enableZoom: P = !0 + } = t, + { + enableZoomControls: E = P + } = t, + { + enableZoomInput: I = !0 + } = t, + { + enablePanInput: A = !0 + } = t, + { + enablePanLimit: L = !0 + } = t, + { + panLimitGutterScalar: z = 0 + } = t, + { + zoomOptions: F = [.25, .5, 1, 1.25, 1.5, 2, 3, 4, 6, 8, 16] + } = t, + { + zoomAdjustStep: O = .25 + } = t, + { + zoomAdjustFactor: D = .1 + } = t, + { + zoomAdjustWheelFactor: B = 1 + } = t, + { + elasticity: W = 5 + } = t, + { + imageSelectionRectCentered: V + } = t, + { + imageSelectionRectScalar: _ + } = t, + { + zoomLevel: N = null + } = t, + { + zoomControls: H + } = t, + { + zoomMultiTouching: j = !1 + } = t; + const { + isAnimated: U, + isInteracting: G, + rootRect: Z, + stageRect: X, + stageScalar: Y, + imageSelectionPan: q, + imageSelectionZoom: K, + imageSelectionStageFitScalar: J, + imageSelectionRect: Q, + imageSelectionStoredState: ee, + imagePreviewUpscale: te + } = C; + on(e, U, (e => o(68, v = e))), on(e, G, (e => o(67, b = e))), on(e, Z, (e => o(65, f = e))), on(e, X, (e => o(64, $ = e))), on(e, Y, (e => o(45, x = e))), on(e, q, (e => o(63, p = e))), on(e, K, (e => o(42, h = e))), on(e, J, (e => o(43, m = e))), on(e, Q, (e => o(66, y = e))), on(e, ee, (e => o(69, w = e))), on(e, te, (e => o(44, g = e))); + let oe = !1, + ie = void 0, + re = void 0, + ne = void 0, + ae = void 0; + const se = e => { + const t = S.querySelector(".PinturaMain > .PinturaUtilMain") || S.querySelector('div[tabindex="0"] .PinturaUtilMain'); + return !!t && (!!t.contains(e.target) && !Gd(e.target)) + }, + de = (e = {}) => { + const { + pan: t = p, + zoom: o = h + } = e; + un(ee, w = { + translation: t, + zoom: o + }, w) + }, + he = () => p && 0 === p.x && 0 === p.y, + pe = () => { + un(K, h = void 0, h), he() || un(q, p = le(), p), $e.set(void 0, { + hard: !0 + }) + }, + ge = () => { + pe(), de() + }, + $e = ec(void 0, { + precision: .01 + }); + $e.subscribe((e => { + if (void 0 === e) return un(K, h = void 0, h), void(he() || un(q, p = le(), p)); + const t = h; + e <= 1 ? he() || un(q, p = le(), p) : e <= t && un(q, p = we(p, .8), p), un(K, h = e, h) + })); + const fe = e => { + $e.update((t => { + const o = e(t || m); + return de({ + zoom: o + }), o + })) + }, + ye = e => { + e ? $e.set(e, { + hard: !1 === v + }) : (e = void 0, $e.set(void 0, { + hard: !0 + })), un(K, h = e, h), de({ + zoom: e + }) + }, + be = (e, t) => { + const o = _ * t, + i = { + ...V + }, + r = 1 - rs(z, 0, 1); + at(i, o < r ? o : r); + const n = { + ...V + }; + at(n, o), nt(n, e); + const a = { + ...n + }; + return n.x > i.x && (a.x = i.x), n.y > i.y && (a.y = i.y), n.x + n.width < i.x + i.width && (a.x = i.x + i.width - n.width), n.y + n.height < i.y + i.height && (a.y = i.y + i.height - n.height), xe(rt(a), rt(i)) + }, + Se = ({ + translation: e, + zoom: t = 1, + elastify: o = !0 + }) => { + if (!ie) return; + let i = e; + const r = ce(ie.x + i.x, ie.y + i.y); + if (!L) return r; + const n = be(r, t); + return o ? $d(n, r, W) : n + }; + let ke, Ce; + const Te = () => { + Ce = void 0, un(G, b = !0, b), o(33, oe = A), ke = !1, ne = !1, ie = { + ...p + }, re = g ? h || m : n ? h || 1 : h || m + }, + Me = e => { + const { + scalar: t, + translation: r, + isMultiTouching: n + } = e.detail; + if (!ie || !n && !A) return; + n && we(r, .5), (A || n) && (ke = !0), j || o(12, j = n); + const a = i ? rs(re * t, s, l) : 1, + c = Se({ + translation: r, + zoom: a, + elastify: !0 + }), + d = me(c); + ae = me(p), ne = d < ae, i && K.set(a), q.set(c), Ce = j && { + translation: e.detail.translation, + scalar: t + } + }, + Re = e => { + un(G, b = !1, b), o(33, oe = !1), o(12, j = !1), ne && ae < 50 && (ie = void 0, re = void 0, q.set(le())) + }, + Pe = e => { + un(G, b = !1, b), o(33, oe = !1), o(12, j = !1), Promise.resolve().then((() => { + if (ke && ie) { + const t = Ce || e.detail, + o = i ? rs(re * t.scalar, s, l) : 1, + r = Se({ + elastify: !1, + translation: t.translation, + zoom: o + }); + q.set(r) + } + ie = void 0, re = void 0, A && e.detail.isDoubleTap && ge(), de() + })) + }; + let Ee, Ie = Date.now(), + Ae = 0, + Le = !1, + ze = !1; + const Fe = e => { + if (!se(e)) return; + if (e.preventDefault(), e.stopPropagation(), ze) return; + clearTimeout(Ee); + const t = yd(e), + o = Date.now(), + i = o - Ie; + Ie = o; + const r = Math.abs(t / i) > .2; + Ae = r ? Ae + 1 : 0; + const n = 1 + -1 * t * B / (r ? 50 : 100), + a = Bp(e, f, $); + Oe(a, n, { + isZoomingFast: r + }) + }, + Oe = (e, t, { + isZoomingFast: o + }) => { + const i = g ? h || m : n ? h || 1 : h || m, + r = i * t, + a = le(), + c = p, + d = g ? m : n ? 1 : m, + u = Math.abs(r - d), + $ = r < i, + f = i > d && $ || i < d && r > i, + b = Ae >= 5; + if (o || (Le = !1), Ae > 0 && !Le && (Le = f), b && Le) return ge(), ze = !0, void setTimeout((() => { + ze = !1 + }), 100); + if (b) return; + !o && f && u <= .05 && (Ee = setTimeout((() => { + ge() + }), 250)), un(K, h = rs(r, s, l), h); + const x = Ye(y); + at(x, i), nt(x, c); + const v = rt(x), + w = Ye(x); + at(w, h - i + 1, e); + const S = rt(w), + k = ve(xe(S, v), i); + ((e, t, o) => { + e.x = t, e.y = o + })(a, c.x + k.x, c.y + k.y), un(q, p = $ && o ? we(ue(p), .85) : be(a, i), p), de() + }, + De = e => (e ? "add" : "remove") + "EventListener"; + let Be, We, Ve, _e; + const Ne = e => { + e.preventDefault(), We = { + ...p + }, _e = Ye(y), Ve = Bp(e, f, $), Be = g ? h || m : n ? h || 1 : h || m + }, + He = e => { + e.preventDefault(), un(K, h = rs(e.scale * Be, s, l), h); + const t = Ye(_e); + at(t, Be), nt(t, We); + const o = rt(t), + i = Ye(t); + at(i, h - Be + 1, Ve); + const r = rt(i), + n = ve(xe(r, o), Be), + a = { + x: We.x + n.x, + y: We.y + n.y + }; + un(q, p = be(a, h), p) + }, + je = e => { + e.preventDefault() + }, + Ue = e => { + S[De(e)]("wheel", Fe), mo() || (S[De(e)]("gesturestart", Ne), S[De(e)]("gesturechange", He), S[De(e)]("gestureend", je)) + }, + Ge = e => { + const t = De(e); + S[t]("interactionstart", Te), S[t]("interactionupdate", Me), S[t]("interactionrelease", Re), S[t]("interactionend", Pe) + }; + let Ze; + return Zn((() => { + Ze = hd(S, { + drag: !0, + pinch: !0, + inertia: !0, + inertiaDurationMultiplier: 10, + shouldStartInteraction: se + }) + })), Yn((() => { + Ue(!1), Ge(!1), Ze.destroy(), Ze = void 0 + })), e.$$set = e => { + "root" in e && o(13, S = e.root), "locale" in e && o(14, k = e.locale), "stores" in e && o(15, C = e.stores), "allowPan" in e && o(16, T = e.allowPan), "allowZoom" in e && o(17, M = e.allowZoom), "enablePan" in e && o(18, R = e.enablePan), "enableZoom" in e && o(19, P = e.enableZoom), "enableZoomControls" in e && o(20, E = e.enableZoomControls), "enableZoomInput" in e && o(21, I = e.enableZoomInput), "enablePanInput" in e && o(22, A = e.enablePanInput), "enablePanLimit" in e && o(23, L = e.enablePanLimit), "panLimitGutterScalar" in e && o(24, z = e.panLimitGutterScalar), "zoomOptions" in e && o(25, F = e.zoomOptions), "zoomAdjustStep" in e && o(26, O = e.zoomAdjustStep), "zoomAdjustFactor" in e && o(27, D = e.zoomAdjustFactor), "zoomAdjustWheelFactor" in e && o(28, B = e.zoomAdjustWheelFactor), "elasticity" in e && o(29, W = e.elasticity), "imageSelectionRectCentered" in e && o(30, V = e.imageSelectionRectCentered), "imageSelectionRectScalar" in e && o(31, _ = e.imageSelectionRectScalar), "zoomLevel" in e && o(32, N = e.zoomLevel), "zoomControls" in e && o(11, H = e.zoomControls), "zoomMultiTouching" in e && o(12, j = e.zoomMultiTouching) + }, e.$$.update = () => { + var t, $; + 2752512 & e.$$.dirty[0] && o(35, i = M && P && I), 327680 & e.$$.dirty[0] && o(34, r = T && R), 196608 & e.$$.dirty[0] && (T || M ? (un(K, h = P ? w.zoom : void 0, h), un(q, p = R ? ue(w.translation) : he() ? p : le(), p), $e.set(h)) : pe()), 16384 & e.$$.dirty[1] && (n = x >= 1), 33570816 & e.$$.dirty[0] | 28672 & e.$$.dirty[1] && o(39, a = [(g || x < 1) && [m, Op(m) + "%", { + sublabel: k.labelZoomFit + }], ...F.map((e => [e, Op(e) + "%"]))].filter(Boolean).map((e => (1 === e[0] && (e[2] = { + sublabel: k.labelZoomActual + }), e))).sort(((e, t) => { + const o = e[0] || m, + i = t[0] || m; + return o < i ? -1 : i < o ? 1 : 0 + }))), 4352 & e.$$.dirty[1] && o(37, s = Math.min(a.reduce(((e, [t]) => t < e ? t : e), Number.MAX_SAFE_INTEGER), m)), 256 & e.$$.dirty[1] && o(36, l = a.reduce(((e, [t]) => t > e ? t : e), Number.MIN_SAFE_INTEGER)), 2 & e.$$.dirty[1] && null !== N && ye(N), 30720 & e.$$.dirty[1] && o(41, d = h || (g || x < 1 ? m : 1)), 1280 & e.$$.dirty[1] && o(38, (t = a.map((([e]) => e)), $ = d, c = t.findIndex((e => e === $)))), 1024 & e.$$.dirty[1] && o(40, u = Op(d) + "%"), 202522624 & e.$$.dirty[0] | 3040 & e.$$.dirty[1] && o(11, H = (M || M) && E ? [ + ["Button", "zoom-out", { + hideLabel: !0, + label: k.labelZoomOut, + icon: k.iconZoomOut, + disabled: h === s, + onclick: () => fe((e => Math.max(s, e - O))), + onhold: () => fe((e => Math.max(s, e * (1 - D)))) + }], + ["Dropdown", "zoom-level", { + label: u, + labelClass: "PinturaFixedWidthCharacters", + options: a, + selectedIndex: c, + onchange: e => ye(e.value) + }], + ["Button", "zoom-in", { + hideLabel: !0, + label: k.labelZoomIn, + icon: k.iconZoomIn, + disabled: h === l, + onclick: () => fe((e => Math.min(l, e + O))), + onhold: () => fe((e => Math.min(l, e * (1 + D)))) + }] + ] : []), 8192 & e.$$.dirty[0] | 16 & e.$$.dirty[1] && S && Ue(i), 8192 & e.$$.dirty[0] | 8 & e.$$.dirty[1] && S && Ge(r), 4202496 & e.$$.dirty[0] | 12 & e.$$.dirty[1] && S && S.style.setProperty("--cursor", r && A ? oe ? "grabbing" : "grab" : "") + }, [U, G, Z, X, Y, q, K, J, Q, ee, te, H, j, S, k, C, T, M, R, P, E, I, A, L, z, F, O, D, B, W, V, _, N, oe, r, i, l, s, c, a, u, d, h, m, g, x] +} +class Vp extends Fa { + constructor(e) { + super(), za(this, e, Wp, null, Qr, { + root: 13, + locale: 14, + stores: 15, + allowPan: 16, + allowZoom: 17, + enablePan: 18, + enableZoom: 19, + enableZoomControls: 20, + enableZoomInput: 21, + enablePanInput: 22, + enablePanLimit: 23, + panLimitGutterScalar: 24, + zoomOptions: 25, + zoomAdjustStep: 26, + zoomAdjustFactor: 27, + zoomAdjustWheelFactor: 28, + elasticity: 29, + imageSelectionRectCentered: 30, + imageSelectionRectScalar: 31, + zoomLevel: 32, + zoomControls: 11, + zoomMultiTouching: 12 + }, null, [-1, -1, -1, -1]) + } +} +const _p = e => new Promise((t => { + const o = new FileReader; + o.onload = () => t(o.result), o.readAsArrayBuffer(e) + })), + Np = (e, t = 0, o = e.byteLength) => { + const i = [], + r = t + o; + for (; t < r;) { + const o = e.getUint32(t); + if (o < 0) break; + const r = e.getUint32(t + 4); + if (i.push({ + type: r, + size: o, + offset: t, + bodyOffset: t + 8, + bodySize: o - 8 + }), o < 8) break; + t += o + } + return i + }, + Hp = (e, { + limit: t = 1024 + } = {}) => { + let o = 0; + o += 4; + if (1718909296 !== e.getUint32(o)) return 0; + o += 4; + const i = e.getUint32(o); + return 1836069938 === i ? ((e, t, o) => { + let i = !1, + r = -1; + for (let n = t; n < o; n++) + if (i || 1953653099 !== e.getUint32(n) || (i = !0, n += 4), i && 64 == e.getUint8(n)) { + r = n; + break + } if (r < 0) return 0; + const n = e.getUint32(r - 28), + a = e.getUint32(r - 20), + s = e.getUint32(r - 32), + l = e.getUint32(r - 16); + return 65536 === n && 4294901760 === a ? 90 : 4294901760 === s && 4294901760 === l ? 180 : 4294901760 === n && 65536 === a ? 270 : 0 + })(e, o, t) : 1903435808 === i ? (e => { + const t = Np(e).find((e => 1836019574 === e.type)); + if (!t) return 0; + const o = Np(e, t.bodyOffset, t.bodySize); + o.filter((e => 1953653099 === e.type)).forEach((t => { + o.push(...Np(e, t.bodyOffset, t.bodySize)) + })); + const i = [1836476516, 1953196132], + r = o.filter((e => i.includes(e.type))); + for (const { + type: t, + bodyOffset: o + } + of r) { + const i = e.getUint8(o); + let r = o + 4; + r += 1836476516 === t ? 32 : 36, r += 1 === i ? 12 : 0; + const n = e.getInt32(r), + a = e.getInt32(r + 4); + if (0 === n && a > 0) return 90; + if (n < 0 && 0 === a) return 180; + if (0 === n && a < 0) return 270 + } + return 0 + })(e) : 0 + }, + { + window: jp + } = ka; + +function Up(e) { + let t, o, i, r = e[42] && Gp(e), + n = e[39] && tm(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[42] ? r ? (r.p(e, i), 2048 & i[1] && xa(r, 1)) : (r = Gp(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[39] ? n ? (n.p(e, i), 256 & i[1] && xa(n, 1)) : (n = tm(e), n.c(), xa(n, 1), n.m(o.parentNode, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function Gp(e) { + let t, o, i, r, n, a; + const s = [Xp, Zp], + l = []; + + function c(e, t) { + return e[40] ? 0 : e[35] ? 1 : -1 + } + return ~(i = c(e)) && (r = l[i] = s[i](e)), { + c() { + t = kn("div"), o = kn("p"), r && r.c(), An(o, "style", e[73]), An(t, "class", "PinturaStatus"), An(t, "style", n = "opacity: " + e[55]) + }, + m(e, r) { + wn(e, t, r), bn(t, o), ~i && l[i].m(o, null), a = !0 + }, + p(e, d) { + let u = i; + i = c(e), i === u ? ~i && l[i].p(e, d) : (r && (ya(), va(l[u], 1, 1, (() => { + l[u] = null + })), ba()), ~i ? (r = l[i], r ? r.p(e, d) : (r = l[i] = s[i](e), r.c()), xa(r, 1), r.m(o, null)) : r = null), (!a || 2048 & d[2]) && An(o, "style", e[73]), (!a || 16777216 & d[1] && n !== (n = "opacity: " + e[55])) && An(t, "style", n) + }, + i(e) { + a || (xa(r), a = !0) + }, + o(e) { + va(r), a = !1 + }, + d(e) { + e && Sn(t), ~i && l[i].d() + } + } +} + +function Zp(e) { + let t, o, i, r; + t = new Cd({ + props: { + text: e[35].text || "", + onmeasure: e[214] + } + }); + let n = e[35].aside && Yp(e); + return { + c() { + Ia(t.$$.fragment), o = Mn(), n && n.c(), i = Rn() + }, + m(e, a) { + Aa(t, e, a), wn(e, o, a), n && n.m(e, a), wn(e, i, a), r = !0 + }, + p(e, o) { + const r = {}; + 16 & o[1] && (r.text = e[35].text || ""), t.$set(r), e[35].aside ? n ? (n.p(e, o), 16 & o[1] && xa(n, 1)) : (n = Yp(e), n.c(), xa(n, 1), n.m(i.parentNode, i)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + r || (xa(t.$$.fragment, e), xa(n), r = !0) + }, + o(e) { + va(t.$$.fragment, e), va(n), r = !1 + }, + d(e) { + La(t, e), e && Sn(o), n && n.d(e), e && Sn(i) + } + } +} + +function Xp(e) { + let t, o, i, r; + return t = new Cd({ + props: { + text: e[40], + onmeasure: e[214] + } + }), i = new Id({ + props: { + class: "PinturaStatusIcon", + offset: e[83], + opacity: e[84], + $$slots: { + default: [em] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment), o = Mn(), Ia(i.$$.fragment) + }, + m(e, n) { + Aa(t, e, n), wn(e, o, n), Aa(i, e, n), r = !0 + }, + p(e, o) { + const r = {}; + 512 & o[1] && (r.text = e[40]), t.$set(r); + const n = {}; + 2097152 & o[2] && (n.offset = e[83]), 4194304 & o[2] && (n.opacity = e[84]), 8 & o[0] | 536870912 & o[18] && (n.$$scope = { + dirty: o, + ctx: e + }), i.$set(n) + }, + i(e) { + r || (xa(t.$$.fragment, e), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(t.$$.fragment, e), va(i.$$.fragment, e), r = !1 + }, + d(e) { + La(t, e), e && Sn(o), La(i, e) + } + } +} + +function Yp(e) { + let t, o; + return t = new Id({ + props: { + class: "PinturaStatusButton", + offset: e[83], + opacity: e[84], + $$slots: { + default: [Jp] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 2097152 & o[2] && (i.offset = e[83]), 4194304 & o[2] && (i.opacity = e[84]), 16 & o[1] | 536870912 & o[18] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function qp(e) { + let t, o; + return t = new Rd({ + props: { + progress: e[35].progressIndicator.progress + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[1] && (i.progress = e[35].progressIndicator.progress), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Kp(e) { + let t, o; + const i = [e[35].closeButton, { + hideLabel: !0 + }]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 16 & o[1] ? Ra(i, [Pa(e[35].closeButton), i[1]]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Jp(e) { + let t, o, i, r = e[35].progressIndicator.visible && qp(e), + n = e[35].closeButton && e[35].text && Kp(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[35].progressIndicator.visible ? r ? (r.p(e, i), 16 & i[1] && xa(r, 1)) : (r = qp(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[35].closeButton && e[35].text ? n ? (n.p(e, i), 16 & i[1] && xa(n, 1)) : (n = Kp(e), n.c(), xa(n, 1), n.m(o.parentNode, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function Qp(e) { + let t, o = e[3].iconSupportError + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 8 & i[0] && o !== (o = e[3].iconSupportError + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function em(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Qp] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8 & o[0] | 536870912 & o[18] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function tm(e) { + let t, o, i, r, n, a, s, l, c, d, u, h, p, m, g = e[10] && om(e), + $ = e[46] && e[45] && im(e); + const f = [lm, sm], + y = []; + + function b(e, t) { + return e[46] ? 0 : 1 + } + + function x(t) { + e[427](t) + } + + function v(t) { + e[428](t) + } + + function w(t) { + e[429](t) + } + i = b(e), r = y[i] = f[i](e), a = new Tc({ + props: { + isAnimated: e[54], + isTransparent: e[20], + pixelRatio: e[58], + textPixelRatio: e[6], + backgroundColor: e[57], + maskRect: e[59], + maskOpacity: e[74] ? e[74].maskOpacity : 1, + maskMarkupOpacity: e[7], + maskFrameOpacity: e[5], + clipAnnotationsToImage: e[86], + images: e[56], + interfaceImages: e[87], + loadImageData: e[28], + enableGrid: e[11], + gridSize: e[88], + gridColors: [e[89], e[90]], + gridOpacity: e[91], + selectionColor: e[92], + willRequest: e[82] || e[93], + willRender: e[424], + didRender: e[425] + } + }); + let S = { + root: e[2], + locale: e[3], + stores: e[200], + allowPan: e[95], + enablePan: e[17], + enablePanLimit: e[21], + panLimitGutterScalar: e[22], + enablePanInput: e[96], + allowZoom: e[97], + enableZoom: e[18], + enableZoomInput: void 0 !== e[19] ? e[19] : e[98], + enableZoomControls: e[99], + zoomOptions: e[13] || e[23], + zoomAdjustStep: e[14] || e[24], + zoomAdjustFactor: e[15] || e[25], + zoomAdjustWheelFactor: e[16] || e[26], + imageSelectionRectCentered: e[100], + imageSelectionRectScalar: e[101], + elasticity: mm * e[8] + }; + return void 0 !== e[0] && (S.zoomLevel = e[0]), void 0 !== e[33] && (S.zoomControls = e[33]), void 0 !== e[34] && (S.zoomMultiTouching = e[34]), d = new Vp({ + props: S + }), ta.push((() => Ea(d, "zoomLevel", x))), ta.push((() => Ea(d, "zoomControls", v))), ta.push((() => Ea(d, "zoomMultiTouching", w))), { + c() { + g && g.c(), t = Mn(), $ && $.c(), o = Mn(), r.c(), n = Mn(), Ia(a.$$.fragment), s = Mn(), l = kn("div"), c = Mn(), Ia(d.$$.fragment), An(l, "class", "PinturaRootPortal") + }, + m(r, u) { + g && g.m(r, u), wn(r, t, u), $ && $.m(r, u), wn(r, o, u), y[i].m(r, u), wn(r, n, u), Aa(a, r, u), wn(r, s, u), wn(r, l, u), e[426](l), wn(r, c, u), Aa(d, r, u), m = !0 + }, + p(e, s) { + e[10] ? g ? (g.p(e, s), 1024 & s[0] && xa(g, 1)) : (g = om(e), g.c(), xa(g, 1), g.m(t.parentNode, t)) : g && (ya(), va(g, 1, 1, (() => { + g = null + })), ba()), e[46] && e[45] ? $ ? ($.p(e, s), 49152 & s[1] && xa($, 1)) : ($ = im(e), $.c(), xa($, 1), $.m(o.parentNode, o)) : $ && (ya(), va($, 1, 1, (() => { + $ = null + })), ba()); + let l = i; + i = b(e), i === l ? y[i].p(e, s) : (ya(), va(y[l], 1, 1, (() => { + y[l] = null + })), ba(), r = y[i], r ? r.p(e, s) : (r = y[i] = f[i](e), r.c()), xa(r, 1), r.m(n.parentNode, n)); + const c = {}; + 8388608 & s[1] && (c.isAnimated = e[54]), 1048576 & s[0] && (c.isTransparent = e[20]), 134217728 & s[1] && (c.pixelRatio = e[58]), 64 & s[0] && (c.textPixelRatio = e[6]), 67108864 & s[1] && (c.backgroundColor = e[57]), 268435456 & s[1] && (c.maskRect = e[59]), 4096 & s[2] && (c.maskOpacity = e[74] ? e[74].maskOpacity : 1), 128 & s[0] && (c.maskMarkupOpacity = e[7]), 32 & s[0] && (c.maskFrameOpacity = e[5]), 16777216 & s[2] && (c.clipAnnotationsToImage = e[86]), 33554432 & s[1] && (c.images = e[56]), 33554432 & s[2] && (c.interfaceImages = e[87]), 268435456 & s[0] && (c.loadImageData = e[28]), 2048 & s[0] && (c.enableGrid = e[11]), 67108864 & s[2] && (c.gridSize = e[88]), 402653184 & s[2] && (c.gridColors = [e[89], e[90]]), 536870912 & s[2] && (c.gridOpacity = e[91]), 1073741824 & s[2] && (c.selectionColor = e[92]), 1048576 & s[2] | 1 & s[3] && (c.willRequest = e[82] || e[93]), 512 & s[0] | 541982784 & s[1] | 2 & s[3] && (c.willRender = e[424]), 124 & s[2] && (c.didRender = e[425]), a.$set(c); + const m = {}; + 4 & s[0] && (m.root = e[2]), 8 & s[0] && (m.locale = e[3]), 4 & s[3] && (m.allowPan = e[95]), 131072 & s[0] && (m.enablePan = e[17]), 2097152 & s[0] && (m.enablePanLimit = e[21]), 4194304 & s[0] && (m.panLimitGutterScalar = e[22]), 8 & s[3] && (m.enablePanInput = e[96]), 16 & s[3] && (m.allowZoom = e[97]), 262144 & s[0] && (m.enableZoom = e[18]), 524288 & s[0] | 32 & s[3] && (m.enableZoomInput = void 0 !== e[19] ? e[19] : e[98]), 64 & s[3] && (m.enableZoomControls = e[99]), 8396800 & s[0] && (m.zoomOptions = e[13] || e[23]), 16793600 & s[0] && (m.zoomAdjustStep = e[14] || e[24]), 33587200 & s[0] && (m.zoomAdjustFactor = e[15] || e[25]), 67174400 & s[0] && (m.zoomAdjustWheelFactor = e[16] || e[26]), 128 & s[3] && (m.imageSelectionRectCentered = e[100]), 256 & s[3] && (m.imageSelectionRectScalar = e[101]), 256 & s[0] && (m.elasticity = mm * e[8]), !u && 1 & s[0] && (u = !0, m.zoomLevel = e[0], ca((() => u = !1))), !h && 4 & s[1] && (h = !0, m.zoomControls = e[33], ca((() => h = !1))), !p && 8 & s[1] && (p = !0, m.zoomMultiTouching = e[34], ca((() => p = !1))), d.$set(m) + }, + i(e) { + m || (xa(g), xa($), xa(r), xa(a.$$.fragment, e), xa(d.$$.fragment, e), m = !0) + }, + o(e) { + va(g), va($), va(r), va(a.$$.fragment, e), va(d.$$.fragment, e), m = !1 + }, + d(r) { + g && g.d(r), r && Sn(t), $ && $.d(r), r && Sn(o), y[i].d(r), r && Sn(n), La(a, r), r && Sn(s), r && Sn(l), e[426](null), r && Sn(c), La(d, r) + } + } +} + +function om(e) { + let t, o, i, r, n; + return o = new dp({ + props: { + items: e[70] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaNav PinturaNavTools") + }, + m(a, s) { + wn(a, t, s), Aa(o, t, null), i = !0, r || (n = [Pn(t, "measure", e[411]), hn($c.call(null, t))], r = !0) + }, + p(e, t) { + const i = {}; + 256 & t[2] && (i.items = e[70]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o), r = !1, Kr(n) + } + } +} + +function im(e) { + let t, o, i; + return o = new vd({ + props: { + elasticity: e[8] * gm, + scrollDirection: e[76] ? "y" : "x", + $$slots: { + default: [am] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaNav PinturaNavMain") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 256 & t[0] && (i.elasticity = e[8] * gm), 16384 & t[2] && (i.scrollDirection = e[76] ? "y" : "x"), 8192 & t[1] | 393216 & t[2] | 536870912 & t[18] && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function rm(e) { + let t, o = e[586].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 268435456 & i[18] && o !== (o = e[586].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function nm(e) { + let t, o, i, r, n, a = e[586].label + ""; + return t = new td({ + props: { + $$slots: { + default: [rm] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment), o = Mn(), i = kn("span"), r = Tn(a) + }, + m(e, a) { + Aa(t, e, a), wn(e, o, a), wn(e, i, a), bn(i, r), n = !0 + }, + p(e, o) { + const i = {}; + 805306368 & o[18] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i), (!n || 268435456 & o[18]) && a !== (a = e[586].label + "") && Fn(r, a) + }, + i(e) { + n || (xa(t.$$.fragment, e), n = !0) + }, + o(e) { + va(t.$$.fragment, e), n = !1 + }, + d(e) { + La(t, e), e && Sn(o), e && Sn(i) + } + } +} + +function am(e) { + let t, o; + const i = [e[80], { + tabs: e[79] + }]; + let r = { + $$slots: { + default: [nm, ({ + tab: e + }) => ({ + 586: e + }), ({ + tab: e + }) => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, e ? 268435456 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new Fc({ + props: r + }), t.$on("select", e[412]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 393216 & o[2] ? Ra(i, [262144 & o[2] && Pa(e[80]), 131072 & o[2] && { + tabs: e[79] + }]) : {}; + 805306368 & o[18] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function sm(e) { + let t, o, i; + + function r(t) { + e[420](t) + } + let n = { + class: "PinturaMain", + content: { + ...e[47].find(e[419]), + props: e[27][e[44]] + }, + locale: e[3], + stores: e[200] + }; + return void 0 !== e[1][e[44]] && (n.component = e[1][e[44]]), t = new Jc({ + props: n + }), ta.push((() => Ea(t, "component", r))), t.$on("measure", e[226]), t.$on("show", e[421]), t.$on("hide", e[422]), t.$on("fade", e[423]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 134217728 & i[0] | 73728 & i[1] && (r.content = { + ...e[47].find(e[419]), + props: e[27][e[44]] + }), 8 & i[0] && (r.locale = e[3]), !o && 2 & i[0] | 8192 & i[1] && (o = !0, r.component = e[1][e[44]], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function lm(e) { + let t, o; + const i = [{ + class: "PinturaMain" + }, { + visible: e[63] + }, e[80], { + panels: e[78] + }]; + let r = { + $$slots: { + default: [cm, ({ + panel: e, + panelIsActive: t + }) => ({ + 584: e, + 585: t + }), ({ + panel: e, + panelIsActive: t + }) => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (e ? 67108864 : 0) | (t ? 134217728 : 0)]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new Zc({ + props: r + }), t.$on("measure", e[418]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 327682 & o[2] ? Ra(i, [i[0], 2 & o[2] && { + visible: e[63] + }, 262144 & o[2] && Pa(e[80]), 65536 & o[2] && { + panels: e[78] + }]) : {}; + 134217738 & o[0] | 65664 & o[1] | 2 & o[2] | 738197504 & o[18] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function cm(e) { + let t, o, i; + + function r(...t) { + return e[413](e[584], ...t) + } + + function n(t) { + e[414](t, e[584]) + } + let a = { + content: { + ...e[47].find(r), + props: e[27][e[584]] + }, + locale: e[3], + isActive: e[585], + stores: e[200] + }; + return void 0 !== e[1][e[584]] && (a.component = e[1][e[584]]), t = new Jc({ + props: a + }), ta.push((() => Ea(t, "component", n))), t.$on("measure", e[226]), t.$on("show", (function() { + return e[415](e[584]) + })), t.$on("hide", (function() { + return e[416](e[584]) + })), t.$on("fade", (function(...t) { + return e[417](e[584], ...t) + })), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(i, n) { + e = i; + const a = {}; + 134217728 & n[0] | 65536 & n[1] | 67108864 & n[18] && (a.content = { + ...e[47].find(r), + props: e[27][e[584]] + }), 8 & n[0] && (a.locale = e[3]), 134217728 & n[18] && (a.isActive = e[585]), !o && 2 & n[0] | 67108864 & n[18] && (o = !0, a.component = e[1][e[584]], ca((() => o = !1))), t.$set(a) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function dm(e) { + let t, o; + return { + c() { + t = kn("span"), An(t, "class", "PinturaEditorOverlay"), An(t, "style", o = "opacity:" + e[102]) + }, + m(e, o) { + wn(e, t, o) + }, + p(e, i) { + 512 & i[3] && o !== (o = "opacity:" + e[102]) && An(t, "style", o) + }, + d(e) { + e && Sn(t) + } + } +} + +function um(e) { + let t, o; + const i = [{ + layout: "row" + }, { + parentRect: e[51] + }, e[61]]; + let r = { + $$slots: { + default: [hm] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new fp({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 1074790400 & o[1] ? Ra(i, [i[0], 1048576 & o[1] && { + parentRect: e[51] + }, 1073741824 & o[1] && Pa(e[61])]) : {}; + 1073741824 & o[1] | 1 & o[2] | 536870912 & o[18] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function hm(e) { + let t, o, i; + return { + c() { + t = kn("input"), t.value = o = e[61].text, An(t, "placeholder", i = e[61].placeholder), An(t, "type", "text"), An(t, "spellcheck", "false"), An(t, "autocorrect", "off"), An(t, "autocapitalize", "off") + }, + m(o, i) { + wn(o, t, i), e[430](t) + }, + p(e, r) { + 1073741824 & r[1] && o !== (o = e[61].text) && t.value !== o && (t.value = o), 1073741824 & r[1] && i !== (i = e[61].placeholder) && An(t, "placeholder", i) + }, + d(o) { + o && Sn(t), e[430](null) + } + } +} + +function pm(e) { + let t, o, i, n, a, s; + la(e[410]); + let l = e[41] && Up(e), + c = e[102] > 0 && dm(e), + d = e[61] && um(e); + return { + c() { + t = kn("div"), l && l.c(), o = Mn(), c && c.c(), i = Mn(), d && d.c(), An(t, "id", e[4]), An(t, "class", e[77]), An(t, "data-env", e[75]), An(t, "dir", e[12]) + }, + m(u, h) { + wn(u, t, h), l && l.m(t, null), bn(t, o), c && c.m(t, null), bn(t, i), d && d.m(t, null), e[431](t), n = !0, a || (s = [Pn(jp, "keydown", e[217]), Pn(jp, "keyup", e[218]), Pn(jp, "blur", e[219]), Pn(jp, "paste", e[223]), Pn(jp, "resize", e[410]), Pn(t, "ping", (function() { + Jr(e[69]) && e[69].apply(this, arguments) + })), Pn(t, "contextmenu", e[220]), Pn(t, "touchstart", e[215], { + passive: !1 + }), Pn(t, "touchmove", (function() { + Jr(e[72]) && e[72].apply(this, arguments) + })), Pn(t, "pointermove", (function() { + Jr(e[71]) && e[71].apply(this, arguments) + })), Pn(t, "transitionend", e[205]), Pn(t, "dropfiles", e[221]), Pn(t, "measure", e[432]), Pn(t, "click", (function() { + Jr(e[43] ? e[222] : r) && (e[43] ? e[222] : r).apply(this, arguments) + })), hn($c.call(null, t, { + observeViewRect: !0, + isMeasureRoot: !0 + })), hn(fc.call(null, t)), hn(bc.call(null, t))], a = !0) + }, + p(r, a) { + (e = r)[41] ? l ? (l.p(e, a), 1024 & a[1] && xa(l, 1)) : (l = Up(e), l.c(), xa(l, 1), l.m(t, o)): l && (ya(), va(l, 1, 1, (() => { + l = null + })), ba()), e[102] > 0 ? c ? c.p(e, a) : (c = dm(e), c.c(), c.m(t, i)) : c && (c.d(1), c = null), e[61] ? d ? (d.p(e, a), 1073741824 & a[1] && xa(d, 1)) : (d = um(e), d.c(), xa(d, 1), d.m(t, null)) : d && (ya(), va(d, 1, 1, (() => { + d = null + })), ba()), (!n || 16 & a[0]) && An(t, "id", e[4]), (!n || 32768 & a[2]) && An(t, "class", e[77]), (!n || 8192 & a[2]) && An(t, "data-env", e[75]), (!n || 4096 & a[0]) && An(t, "dir", e[12]) + }, + i(e) { + n || (xa(l), xa(d), n = !0) + }, + o(e) { + va(l), va(d), n = !1 + }, + d(o) { + o && Sn(t), l && l.d(), c && c.d(), d && d.d(), e[431](null), a = !1, Kr(s) + } + } +} +const mm = 1, + gm = 10; + +function $m(e, t, o) { + let i, n, a, s, l, c, d, u, p, m, $, f, y, v, w, S, k, C, M, R, P, E, A, L, z, F, O, D, B, W, V, _, N, H, U, G, Z, X, Y, q, K, J, Q, ee, te, oe, ie, re, ae, se, de, ue, he, pe, me, ge, $e, fe, be, xe, ve, we, Se, ke, Ce, Te, Me, Re, Pe, Ee, Ie, Ae, Le, ze, Fe, Oe, Be, We, Ve, _e, Ne, He, je, Ue, Ge, Ze, Xe, Je, Qe, tt, ot, rt, st, lt, ht, pt, $t, ft, xt, wt, kt, Ct, Tt, Mt, Rt, Pt, Et, It, At, Lt, zt, Ft, Ot, Wt, Vt, _t, Nt, Ht, jt, Ut, Zt, Xt, Yt, qt, Kt, Jt, Qt, eo, to, oo, io, ro, no, ao, lo, co, uo, ho, po, go, $o, fo, yo, bo, xo, vo, wo, So, ko, Co, To, Mo, Ro, Po, Io, Ao, Lo, zo, Fo, Oo, Do, Bo, Vo, _o, No, Ho, jo, Uo, Zo, Yo, qo, Ko, Jo, Qo, ei, ti, oi, ii, ri, ni, ai, si, li, ci, di, ui, hi, pi, mi, $i, fi, yi, bi, xi, vi, ki, Ci, Ti, Ri, Pi, Ii, Ai, Li, zi, Fi, Oi, Di, Bi, Wi = Gr, + Vi = Gr; + on(e, tc, (e => o(398, qo = e))), e.$$.on_destroy.push((() => Wi())), e.$$.on_destroy.push((() => Vi())); + const _i = Go(), + Ni = qn(); + let Hi, ji, { + class: Ui + } = t, + { + layout: Gi + } = t, + { + stores: Zi + } = t, + { + locale: Xi + } = t, + { + id: Yi + } = t, + { + util: qi + } = t, + { + utils: Ki + } = t, + { + animations: Ji = "auto" + } = t, + { + disabled: Qi = !1 + } = t, + { + status: er + } = t, + { + previewUpscale: tr = !1 + } = t, + { + previewPad: or = !1 + } = t, + { + previewMaskOpacity: ir = .95 + } = t, + { + previewImageDataMaxSize: rr + } = t, + { + previewImageTextPixelRatio: nr + } = t, + { + markupMaskOpacity: ar = 1 + } = t, + { + zoomMaskOpacity: sr = .85 + } = t, + { + elasticityMultiplier: lr = 10 + } = t, + { + willRevert: cr = (() => Promise.resolve(!0)) + } = t, + { + willProcessImage: dr = (() => Promise.resolve(!0)) + } = t, + { + willRenderCanvas: hr = j + } = t, + { + willRenderToolbar: pr = j + } = t, + { + willSetHistoryInitialState: mr = j + } = t, + { + enableButtonExport: gr = !0 + } = t, + { + enableButtonRevert: yr = !0 + } = t, + { + enableNavigateHistory: br = !0 + } = t, + { + enableToolbar: xr = !0 + } = t, + { + enableUtils: vr = !0 + } = t, + { + enableButtonClose: wr = !1 + } = t, + { + enableDropImage: kr = !1 + } = t, + { + enablePasteImage: Cr = !1 + } = t, + { + enableBrowseImage: Tr = !1 + } = t, + { + enableTransparencyGrid: Mr = !1 + } = t, + { + layoutDirectionPreference: Rr = "auto" + } = t, + { + layoutHorizontalUtilsPreference: Pr = "left" + } = t, + { + layoutVerticalUtilsPreference: Er = "bottom" + } = t, + { + layoutVerticalToolbarPreference: Ir = "top" + } = t, + { + layoutVerticalControlGroupsPreference: Ar = "bottom" + } = t, + { + layoutVerticalControlTabsPreference: Lr = "bottom" + } = t, + { + textDirection: zr + } = t, + { + markupEditorZoomLevel: Fr = null + } = t, + { + markupEditorZoomLevels: Or + } = t, + { + markupEditorZoomAdjustStep: Dr + } = t, + { + markupEditorZoomAdjustFactor: Br + } = t, + { + markupEditorZoomAdjustWheelFactor: Wr + } = t, + { + markupEditorInteractionMode: Vr = !1 + } = t, + { + muteAudio: _r = !0 + } = t, + { + willSetMediaInitialTimeOffset: Nr = ((e, t) => e * Fp(t[0])) + } = t, + { + enablePan: Hr = !0 + } = t, + { + enableZoom: Zr = !0 + } = t, + { + enableZoomControls: Xr = !0 + } = t, + { + enableZoomInput: Yr + } = t, + { + enablePanInput: qr + } = t, + { + enableCanvasAlpha: Kr = !1 + } = t, + { + enablePanLimit: Jr + } = t, + { + panLimitGutterScalar: Qr + } = t, + { + zoomPresetOptions: rn = [.25, .5, 1, 1.25, 1.5, 2, 3, 4, 6, 8, 16] + } = t, + { + zoomAdjustStep: nn = .25 + } = t, + { + zoomAdjustFactor: an = .1 + } = t, + { + zoomAdjustWheelFactor: sn = 1 + } = t, + { + zoomLevel: ln = null + } = t; + let { + imagePreviewSrc: cn + } = t, { + imageOrienter: dn = { + read: () => 1, + apply: e => e + } + } = t, { + pluginComponents: hn + } = t, { + pluginOptions: pn = {} + } = t; + const mn = _i.sub, + gn = {}; + let { + root: $n + } = t; + const fn = () => { + $t.setAttribute("data-redraw", "true"), Vn.set({}) + }, + yn = Ba(!0); + on(e, yn, (e => o(464, Nt = e))); + const bn = Ba(void 0); + on(e, bn, (e => o(406, di = e))); + const xn = Ba(0); + on(e, xn, (e => o(407, ui = e))); + const vn = Ba(0), + wn = Ba(!1), + Sn = e => { + wn.set("play" === e.type), _i.pub(e.type) + }; + let kn, Cn; + let Tn, Mn, Rn = !1; + const Pn = () => { + if (!n || !In()) return; + Mn = u, un(bn, di = void 0, di); + const e = $t; + Rn = !1; + const t = 1 / 24, + o = Dn(); + (Math.abs(c * o - ui * o) <= t || o - o * ui <= t) && un(xn, ui = l, ui), Wn(Dn() * ui), e.play().catch((() => {})); + const i = () => { + In() || (Tn = requestAnimationFrame(i), un(xn, ui = Bn() / Dn(), ui), Mn >= 0 && ui >= c && (un(xn, ui = c, ui), En()), u > -1 && (Rn = !0), Rn && -1 === u && p > 0 && (un(xn, ui = s[p][0], ui), Wn(ui * Dn())), fn()) + }; + i() + }, + En = () => { + n && !In() && (un(bn, di = void 0, di), Mn = void 0, $t.pause(), cancelAnimationFrame(Tn), fn()) + }, + In = () => $t && $t.paused, + An = () => { + if (n) return In() ? Pn() : En() + }, + Ln = () => { + if (!n) return; + $t.muted = !0 + }, + zn = () => { + if (!n) return; + $t.muted = !1 + }, + Fn = () => { + n && un(On, ci = !ci, ci) + }, + On = Ba(_r); + on(e, On, (e => o(405, ci = e))); + const Dn = () => { + if (n) return $t.duration + }, + Bn = () => { + if (!n) return; + return $t.currentTime + }, + Wn = e => { + if (!n) return; + $t.currentTime = e, vn.set(e) + }; + Kn("previewcontrols", { + play: Pn, + pause: En, + togglePlayPause: An, + mute: Ln, + unmute: zn, + toggleMute: Fn, + setCurrentTime: Wn, + getCurrentTime: Bn, + getDuration: Dn, + currentTime: vn, + frameOffset: xn, + framePeekOffset: bn, + isPlaying: wn, + isMuted: On + }); + const Vn = Ba({}); + on(e, Vn, (e => o(53, Ut = e))), Kn("redrawTrigger", Vn); + const _n = Ba(lr); + on(e, _n, (e => o(480, si = e))), Kn("elasticityMultiplier", _n); + let Nn = []; + const Hn = ec(); + on(e, Hn, (e => o(102, Bi = e))); + const jn = zl() || 1024, + Un = De(jn, jn), + Gn = ks(), + Zn = e => Promise.resolve(ai && ai(e, { + resourceType: "image" + })).then((t => { + if (!1 === t) return; + const { + headers: o, + credentials: i + } = t || {}; + return fetch(e, { + headers: o, + credentials: i + }).then((e => { + if (200 !== e.status) throw `${e.status} (${e.statusText})`; + return e.blob() + })).then((e => kp(e, dn, Gn))).then((e => Cp(e, f))) + })); + let { + imageSourceToImageData: Xn = (e => T(e) ? Zn(e) : Dt(e) ? new Promise((t => t(h(e)))) : so(e) || Bt(e) ? kp(e, dn, Gn).then((e => Cp(e, f))) : void 0) + } = t; + const Jn = (() => { + let e, t; + const o = bp.reduce(((e, o) => (e[o] = function(e, t, o) { + let i = []; + return { + set: t, + update: o, + publish: e => { + i.forEach((t => t(e))) + }, + subscribe: t => (i.push(t), e(t), () => { + i = i.filter((e => e !== t)) + }) + } + }((e => { + if (!t) return e(); + t.stores[o].subscribe(e)() + }), (e => { + t && t.stores[o].set(e) + }), (e => { + t && t.stores[o].update(e) + })), e)), {}); + return { + update: i => { + if (t = i, e && (e.forEach((e => e())), e = void 0), !i) return o.file.publish(void 0), void o.loadState.publish(void 0); + e = bp.map((e => i.stores[e].subscribe((t => { + o[e].publish(t) + })))) + }, + stores: o, + destroy: () => { + e && e.forEach((e => e())) + } + } + })(), + { + file: Qn, + size: ea, + duration: oa, + trim: ia, + volume: ra, + minDuration: na, + maxDuration: aa, + loadState: sa, + processState: la, + cropAspectRatio: ca, + cropLimitToImage: da, + crop: ua, + cropMinSize: ha, + cropMaxSize: pa, + cropRange: ma, + cropOrigin: ga, + cropRectAspectRatio: $a, + rotation: fa, + rotationRange: ya, + targetSize: ba, + flipX: xa, + flipY: va, + backgroundColor: wa, + backgroundImage: Sa, + colorMatrix: ka, + convolutionMatrix: Ca, + gamma: Ta, + vignette: Ma, + noise: Ra, + decoration: Pa, + annotation: Ea, + manipulation: Ia, + redaction: Aa, + frame: La, + selection: za, + state: Fa + } = Jn.stores; + on(e, Qn, (e => o(382, go = e))), on(e, ea, (e => o(355, wt = e))), on(e, oa, (e => o(408, hi = e))), on(e, ia, (e => o(403, ni = e))), on(e, ra, (e => o(404, li = e))), on(e, aa, (e => o(409, pi = e))), on(e, sa, (e => o(374, oo = e))), on(e, la, (e => o(373, to = e))), on(e, ca, (e => o(477, Jo = e))), on(e, da, (e => o(86, yi = e))), on(e, ua, (e => o(393, zo = e))), on(e, fa, (e => o(358, Tt = e))), on(e, xa, (e => o(357, Ct = e))), on(e, va, (e => o(356, kt = e))), on(e, wa, (e => o(364, Wt = e))), on(e, Pa, (e => o(49, xt = e))), on(e, Ea, (e => o(50, Mt = e))), on(e, Ia, (e => o(361, zt = e))), on(e, Aa, (e => o(362, Ft = e))), on(e, La, (e => o(48, ft = e))), on(e, za, (e => o(60, oi = e))), on(e, Fa, (e => o(466, yo = e))); + const Oa = (e, t, o = 0) => new Promise(((i, r) => { + if (Sp(e)) { + return void(Xo() ? (async e => { + const t = await _p(e), + o = new DataView(t); + return Hp(o) + })(e) : Promise.resolve()).then((t => { + const o = document.createElement("video"); + o.onerror = () => console.error(o.error), o.playsInline = !0, o.preload = "auto", o.onloadeddata = () => { + o.onloadeddata = void 0, o.dataset.rotation = t || "0", Ts(o).then((() => { + const e = Nr(o.duration, ni || [ + [0, 1] + ]); + e > 0 ? (o.onseeked = () => { + o.onseeked = void 0, i(o) + }, o.currentTime = e) : (o.currentTime = e, i(o)) + })) + }, o.src = URL.createObjectURL(e), o.load() + })) + } + let n, a = !1; + t.cancel = () => a = !0; + const s = Date.now(); + Xn(e).then((e => { + const t = Date.now() - s; + clearTimeout(n), n = setTimeout((() => { + a || i(e) + }), Math.max(0, o - t)) + })).catch(r) + })), + { + images: Va, + shapePreprocessor: _a, + imageScrambler: Na, + imageRedactionRendering: Ha, + willRequest: ja, + willRequestResource: Ua + } = Zi; + let Ga; + on(e, Va, (e => o(402, ri = e))), on(e, _a, (e => o(401, ii = e))), on(e, Na, (e => o(365, Vt = e))), on(e, Ha, (e => o(363, Ot = e))), on(e, ja, (e => o(82, ai = e))), on(e, Ua, (e => o(93, Ri = e))); + const Za = Wa(Sa, ((e, t) => { + if (!e) return t(void 0); + Ga && (Ga.cancel(), Ga = void 0), Ga = { + cancel: r + }, Oa(e, Ga).then(t).catch((e => {})) + })), + Xa = Fa.subscribe((e => _i.pub("update", e))), + Ya = Ba(); + Kn("ui", Ba({})), Kn("selection", za); + const qa = Ba(!0); + on(e, qa, (e => o(95, Ii = e))); + const Ka = Ba(!0); + on(e, Ka, (e => o(97, Li = e))); + const Ja = Ba(!0); + on(e, Ja, (e => o(400, ti = e))); + const Qa = Ba(!0); + on(e, Qa, (e => o(478, Qo = e))); + const es = Ba(!0); + on(e, es, (e => o(98, zi = e))); + const ts = Ba(); + on(e, ts, (e => o(99, Fi = e))); + const os = Ba(); + on(e, os, (e => o(479, ei = e))); + const is = Wa([os, Qa], (() => void 0 !== ei ? ei : Qo)); + on(e, is, (e => o(96, Ai = e))); + const ns = Ba([0, 0, 0]); + on(e, ns, (e => o(57, So = e))); + const as = Ba([1, 1, 1]); + on(e, as, (e => o(462, Lt = e))); + const ss = ec([1, 1, 1]); + on(e, ss, (e => o(461, At = e))); + const ls = Ba(); + on(e, ls, (e => o(92, Ti = e))); + const ds = Ba(), + us = Ba(); + on(e, us, (e => o(52, Ht = e))); + const hs = Ba(); + on(e, hs, (e => o(359, Pt = e))); + const ps = Ba(qe()); + on(e, ps, (e => o(81, bo = e))); + const ms = Ba(0); + on(e, ms, (e => o(399, Ko = e))); + const gs = Ba(qe()); + on(e, gs, (e => o(85, fi = e))); + const $s = Ba(); + on(e, $s, (e => o(459, pt = e))); + const fs = wp("(pointer: fine)", (e => e ? "pointer-fine" : "pointer-coarse")); + on(e, fs, (e => o(380, ho = e))); + const ys = wp("(hover: hover)", (e => e ? "pointer-hover" : "pointer-no-hover")); + on(e, ys, (e => o(379, uo = e))); + const bs = Ba(!1), + xs = Ba(!1); + on(e, xs, (e => o(360, It = e))); + const vs = Da(void 0, (e => { + const t = ec(0), + o = [xs.subscribe((e => { + t.set(e ? 1 : 0) + })), t.subscribe(e)]; + return () => o.forEach((e => e())) + })); + on(e, vs, (e => o(460, Et = e))); + const ws = Ba(); + on(e, ws, (e => o(465, ao = e))); + const Ss = Ba(); + let Cs; + on(e, Ss, (e => o(54, Xt = e))), Kn("isAnimated", Ss); + const Ms = Ba(tr); + on(e, Ms, (e => o(383, $o = e))); + const Rs = Ba(!1); + on(e, Rs, (e => o(471, Bo = e))), Kn("imageIsStatic", Rs); + const Ps = Ba(); + on(e, Ps, (e => o(472, Vo = e))); + const Es = Ba(); + on(e, Es, (e => o(469, Oo = e))); + const Is = Da(void 0, (e => { + const t = Ba(void 0), + o = [ua.subscribe((() => { + if (!zo) return; + if (Bo) return t.set(Ye(zo)); + const e = gd(zo, Oo, 5 * lr); + t.set(e) + })), t.subscribe(e)]; + return () => o.forEach((e => e())) + })), + As = Ba(); + on(e, As, (e => o(468, Lo = e))); + const Ls = Ba(); + on(e, Ls, (e => o(470, Do = e))); + const zs = Ba(void 0); + on(e, zs, (e => o(475, Uo = e))); + const Fs = Ba(le()); + on(e, Fs, (e => o(476, Zo = e))); + const Os = (e, t) => { + if (!t || !e) return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; + const o = fr(t, e, y), + i = $r(o, e); + return { + top: Math.abs(i.top), + right: Math.abs(i.right), + bottom: Math.abs(i.bottom), + left: Math.abs(i.left) + } + }, + Ds = Ba({}), + Bs = Wa([$s, ps, gs, Ds], (([e, t, o, i], r) => { + if (!e) return r(void 0); + let n = 0; + 1 !== D.length || m || "bottom" === Ir || (n = o.y + o.height), r(it(e.x + t.x, e.y + t.y + n, e.width, e.height)) + })); + let Ws = { + left: 0, + right: 0, + top: 0, + bottom: 0 + }; + const Vs = Ba(!1), + _s = Wa([Vs, La, Bs, xs], (([e, t, o, i], r) => { + if (!o) return r({ + left: 0, + right: 0, + top: 0, + bottom: 0 + }); + if (!e) return; + const n = Math.min(o.width, o.height), + a = Os({ + width: n, + height: n + }, t); + ne(Ws.top, 4) === ne(a.top, 4) && ne(Ws.bottom, 4) === ne(a.bottom, 4) && ne(Ws.right, 4) === ne(a.right, 4) && ne(Ws.left, 4) === ne(a.left, 4) || (Ws = a, r(a)) + })); + on(e, _s, (e => o(391, Po = e))); + const Ns = Wa([Vs, _s], (([e, t], o) => { + if (!e) return o(!1); + o(Object.values(t).some((e => e > 0))) + })); + on(e, Ns, (e => o(392, Io = e))); + const Hs = Wa([Vs, $s, Ns, _s], (([e, t, o, i], r) => { + if (t) return e && o ? void r(it(t.x + i.left, t.y + i.top, t.width - i.left - i.right, t.height - i.top - i.bottom)) : r({ + ...t + }) + })), + js = Wa([Bs, Ns, _s], (([e, t, o], i) => e ? t ? void i(it(e.x + o.left, e.y + o.top, e.width - o.left - o.right, e.height - o.top - o.bottom)) : i(e) : i(void 0))); + on(e, js, (e => o(51, Rt = e))); + const Us = Wa([Rs, ea, fa], (([e, t, o], i) => { + if (!e || !t) return i(void 0); + const r = Ke(t); + i(mt(r, o)) + })), + Gs = Wa([Us], (([e], t) => { + if (!e) return t(void 0); + const o = et(e); + t(St(o)) + })); + on(e, Gs, (e => o(394, Fo = e))); + const Zs = Wa([js, ua, Gs, Ms], (([e, t, o, i], r) => { + if (!e || !t || !(!Vo && !Oo)) return; + const { + width: n, + height: a + } = o || t, s = Math.min(e.width / n, e.height / a); + r(i ? s : Math.min(1, s)) + })); + on(e, Zs, (e => o(395, No = e))); + Kn("imageStaticVisualCorners", Wa([Rs, ea, fa, js, $s, Zs], (([e, t, o, i, r, n], a) => { + if (!(e && i && r && t)) return a(void 0); + const s = Ke(t), + l = St(at(s, n)), + c = gt(i, l); + l.x = c.x, l.y = c.y; + a(mt(l, o)) + }))); + const Xs = Ba(void 0); + on(e, Xs, (e => o(397, Yo = e))); + const Ys = Wa([ua, js], (([e, t]) => { + if (t && e) return Math.min(t.width / e.width, t.height / e.height) + })), + qs = Wa([ua, As], (([e, t]) => e && t ? Math.min(e.width / t.width, e.height / t.height) : 1)); + on(e, qs, (e => o(101, Di = e))); + const Ks = Wa([Xs, qs], (([e, t]) => e && t ? t * e : 1)); + on(e, Ks, (e => o(474, Ho = e))); + const Js = Ba(le()); + on(e, Js, (e => o(396, jo = e))); + const Qs = Ba({ + scalar: Ho, + translation: jo + }), + el = () => { + Qs.set({ + scalar: void 0, + translation: le() + }) + }, + tl = Da(void 0, (e => { + const t = ec(void 0, { + precision: 1e-4 + }), + o = 1 === _d() ? e => vt(e, Math.round) : j, + i = () => { + if (!Lo) return; + const e = It || !ao; + if (Bo) { + const o = Ye(Lo); + return nt(o, Zo), nt(o, Rt), t.set(o, { + hard: e + }) + } + const i = gd(Lo, Uo, mm * lr); + i.width < 0 && (i.width = 0, i.x = Lo.x), i.height < 0 && (i.height = 0, i.y = Lo.y), nt(i, Rt), nt(i, jo), at(i, Ho), !e && o(i), t.set(i, { + hard: e + }) + }, + r = [js.subscribe(i), As.subscribe(i), Ks.subscribe(i), Js.subscribe(i), La.subscribe(i), t.subscribe(e)]; + return () => r.forEach((e => e())) + })); + on(e, tl, (e => o(59, Ro = e))); + const ol = Ba(1); + on(e, ol, (e => o(467, Ao = e))); + const il = () => { + if (!zo || !Rt) return; + let e = ct(Ye(zo), No || 1); + const t = gt(Rt, ct(Ye(Fo), No)); + nt(e, t); + const o = pt.width / e.width, + i = pt.height / e.height, + r = Math.min(1, o, i); + ol.set(r), at(e, r), ((e, t) => { + const [o, i, r, n] = bt(e); + o < t.y && (e.y = Math.max(t.y, e.y)), i > t.width && (e.x = t.width - e.width), r > t.height && (e.y = t.height - e.height), n < t.x && (e.x = Math.max(t.x, e.x)) + })(e, { + ...pt, + x: 0, + y: 0 + }), As.set(e) + }, + rl = Wa([js, Zs, ua, ea], (([e, t, o, i], r) => { + e && (o || i) && r(al(e, t || 1, o || i)) + })); + on(e, rl, (e => o(100, Oi = e))); + const al = (e, t, o) => o.width <= e.width && o.height <= e.height ? gt(e, ct(Ye(o), t)) : yt(e, ut(o)); + let sl, ll; + const dl = e => { + if (m && sl && dt(sl, e) && ll === No) return; + if (Bo) return il(); + sl = e, ll = No; + const t = al(e, No, zo || wt); + As.set(t) + }; + let ul = !1; + const hl = Zs.subscribe((e => { + !ul && void 0 !== e && zo && (dl(Rt), ul = !0) + })), + pl = js.subscribe((e => { + e && void 0 !== No && zo && dl(e) + })), + ml = Rs.subscribe((e => { + !e && Rt && dl(Rt) + })); + let gl; + const $l = Ls.subscribe((e => { + if (!e) return gl = void 0, void un(Ps, Vo = void 0, Vo); + gl = _o; + const t = Ye(zo); + Ps.set(t) + })), + fl = As.subscribe((e => { + if (!e || !Do) return; + const t = (o = Ye(e), i = Do, o.x -= i.x, o.y -= i.y, o.width -= i.width, o.height -= i.height, o); + var o, i; + ((e, t) => { + e.x /= t, e.y /= t, e.width /= t, e.height /= t + })(t, gl); + const r = ((e, t) => (e.x += t.x, e.y += t.y, e.width += t.width, e.height += t.height, e))(Ye(Vo), t); + ua.set(r) + })), + yl = ua.subscribe((e => { + if (!e || !Lo) return; + if (Bo) return void(Do || il()); + if (It || Do || Oo) return; + const t = ut(Lo), + o = ut(e); + if (ne(t, 6) === ne(o, 6)) return; + const { + width: i, + height: r + } = Fo || zo, n = Math.min(Rt.width / i, Rt.height / r), a = De(e.width * n, e.height * n), s = .5 * (Lo.width - a.width), l = .5 * (Lo.height - a.height), c = it(Lo.x + s, Lo.y + l, a.width, a.height); + As.set(c) + })), + bl = Wa([Zs, ua, As, Rs], (([e, t, o, i], r) => { + if (!e || !t || !o) return; + if (i) return r(Ao); + const n = o.width / t.width, + a = o.height / t.height; + r(Math.max(n, a) / e) + })), + xl = Wa([Zs, bl], (([e, t], o) => { + if (!t) return; + o(e * t) + })); + on(e, xl, (e => o(473, _o = e))); + let vl = { + left: 0, + right: 0, + top: 0, + bottom: 0 + }; + const wl = Wa([La, As], (([e, t], o) => { + if (!t) return o(vl); + const i = Os(t, e); + ne(vl.top, 4) === ne(i.top, 4) && ne(vl.bottom, 4) === ne(i.bottom, 4) && ne(vl.right, 4) === ne(i.right, 4) && ne(vl.left, 4) === ne(i.left, 4) || (vl = i, o(i)) + })), + Sl = Wa([wl], (([e], t) => { + t(Object.values(e).some((e => e > 0))) + })), + kl = ec(.075, { + stiffness: .03, + damping: .4, + precision: .001 + }), + Cl = Wa([ss, ns, kl, tl, Ks, La, Sl, wl, Ns], (([e, t, o, i, r, n, a, s, l], c) => { + if (!i || m) return c([]); + let { + x: d, + y: u, + width: h, + height: p + } = i; + d += .5, u += .5, h -= .5, p -= .5; + const g = []; + if (n) { + if (a) { + let { + left: e, + right: o, + top: i, + bottom: n + } = s; + e *= r, o *= r, i *= r, n *= r; + const a = Ap(t) ? [1, 1, 1, .125] : [0, 0, 0, .075]; + g.push({ + x: d - e - .5, + y: u - i - .5, + width: h + e + o + 1, + height: p + i + n + 1, + strokeWidth: 1, + strokeColor: a, + opacity: l ? 1 : .5 + }) + } + const i = Ap(e); + n && n.frameColor && Ap(n.frameColor) || i || (g.push({ + x: d - 1, + y: u - 1, + width: h + 2, + height: p + 2, + strokeWidth: 2, + strokeColor: [0, 0, 0, .1], + opacity: o + }), g.push({ + x: d + 1, + y: u + 1, + width: h - 2, + height: p - 2, + strokeWidth: 2, + strokeColor: [0, 0, 0, .1], + opacity: o + })) + } + c([...g, { + x: d, + y: u, + width: h, + height: p, + strokeWidth: 1, + strokeColor: e, + opacity: o + }]) + })), + Tl = Ba([]); + on(e, Tl, (e => o(385, xo = e))); + const Ml = Wa([Cl, Tl], (([e, t], o) => { + o([...e, ...t]) + })); + on(e, Ml, (e => o(94, Pi = e))); + const Rl = ec(0, { + precision: .001 + }); + on(e, Rl, (e => o(387, wo = e))); + const Pl = ec(); + on(e, Pl, (e => o(390, To = e))); + const El = ec(); + on(e, El, (e => o(389, Co = e))); + const Il = ec(); + on(e, Il, (e => o(388, ko = e))); + const Al = ec(); + on(e, Al, (e => o(386, vo = e))); + const Ll = Ba(!1); + on(e, Ll, (e => o(372, eo = e))); + const Ol = Ba(); + let Dl; + on(e, Ol, (e => o(375, io = e))); + const Bl = Wa([Ll, Ol], (([e, t], i) => { + if (!e || !t) return void i(void 0); + if (Dl && (Dl.cancel(), o(282, Dl = void 0)), Sr(t)) return i(x(t)); + const n = ac.length ? 0 : Xt ? 250 : 0; + o(282, Dl = { + cancel: r + }), Oa(t, Dl, n).then(i).catch((e => { + un(sa, oo.error = e, oo) + })).finally((() => { + o(282, Dl = void 0) + })) + })); + Wi(), Wi = en(Bl, (e => o(354, $t = e))); + let { + imagePreviewCurrent: Wl + } = t; + const Vl = Ba({}); + on(e, Vl, (e => o(377, lo = e))); + const _l = Ba([]); + on(e, _l, (e => o(87, bi = e))); + const Nl = Wa([js, hs, ea, Is, As, xl, fa, xa, va, Ks, Js, bs], (([e, t, o, i, r, n, a, s, l, c, d, u], h) => { + if (!e || !r) return; + const p = nl(e, t, o, i, r, c, d, n, a, s, l); + !u && z(p), h(p) + })); + on(e, Nl, (e => o(378, co = e))); + const Hl = Wa([ka, Ca, Ta, Ma, Ra], (([e, t, o, i, r], n) => { + const a = e && Object.keys(e).map((t => e[t])).filter(Boolean); + n({ + gamma: o || void 0, + vignette: i || void 0, + noise: r || void 0, + convolutionMatrix: t || void 0, + colorMatrix: a && a.length && jr(a) + }) + })); + let jl, Ul; + const Gl = (() => { + if (!mo()) return !1; + const e = navigator.userAgent.match(/OS (\d+)_(\d+)_?(\d+)?/i) || [], + [, t, o] = e.map((e => parseInt(e, 10) || 0)); + return t > 13 || 13 === t && o >= 4 + })(), + Zl = Ba({}); + on(e, Zl, (e => o(366, jt = e))), Kn("env", Zl); + const Xl = _d(), + Yl = Da(Xl, (e => { + const t = () => e(_d()), + o = matchMedia(`(resolution: ${Xl}dppx)`); + return o.addListener(t), () => o.removeListener(t) + })); + on(e, Yl, (e => o(58, Mo = e))); + const ql = ((e, t) => { + const { + sub: o, + pub: i + } = Go(), r = [], n = Ba(0), a = [], s = () => a.forEach((e => e({ + index: tn(n), + length: r.length + }))), l = { + get index() { + return tn(n) + }, + set index(e) { + e = Number.isInteger(e) ? e : 0, e = rs(e, 0, r.length - 1), n.set(e), t(r[l.index]), s() + }, + get state() { + return r[r.length - 1] + }, + length: () => r.length, + undo() { + const e = l.index--; + return i("undo", e), e + }, + redo() { + const e = l.index++; + return i("redo", l.index), e + }, + revert() { + r.length = 1, l.index = 0, i("revert") + }, + write(o) { + o && t({ + ...e(), + ...o + }); + const a = e(), + c = r[r.length - 1]; + JSON.stringify(a) !== JSON.stringify(c) && (r.length = l.index + 1, r.push(a), n.set(r.length - 1), s(), i("writehistory")) + }, + set(e = {}) { + r.length = 0, l.index = 0; + const t = Array.isArray(e) ? e : [e]; + r.push(...t), l.index = r.length - 1 + }, + get: () => [...r], + subscribe: e => (a.push(e), e({ + index: l.index, + length: r.length + }), () => a.splice(a.indexOf(e), 1)), + on: o + }; + return l + })((() => yo), (e => { + un(Fa, yo = e, yo), ps.set(bo) + })); + Vi(), Vi = en(ql, (e => o(384, fo = e))); + const Kl = () => { + const e = { + x: 0, + y: 0, + ...wt + }, + t = vt(yt(e, yo.cropAspectRatio), Math.round), + o = mr({ + ...yo, + rotation: 0, + crop: t + }, yo), + i = [o]; + JSON.stringify(o) !== JSON.stringify(yo) && i.push({ + ...yo + }), ql.set(i) + }, + Ql = sa.subscribe((e => { + e && e.complete && Kl() + })), + oc = () => cr().then((e => e && ql.revert())), + ic = Ba(!1); + on(e, ic, (e => o(367, Zt = e))); + const rc = () => { + un(ic, Zt = !0, Zt), dr().then((e => { + if (!e) return void un(ic, Zt = !1, Zt); + let t; + t = Lc.subscribe((e => { + 1 === e && (t && t(), Ni("processImage")) + })) + })) + }, + nc = la.subscribe((e => { + if (!e) return void un(ic, Zt = !1, Zt); + un(ic, Zt = !0, Zt); + const { + complete: t, + abort: o + } = e; + (t || o) && un(ic, Zt = !1, Zt) + })), + ac = Ip(); + on(e, ac, (e => o(56, ro = e))); + const sc = Wa([ac], (([e], t) => { + if (!e.length) return t(); + const { + origin: o, + translation: i, + rotation: r, + scale: n + } = e[0]; + t({ + origin: o, + translation: i, + rotation: r, + scale: n + }) + })), + lc = Ba(); + on(e, lc, (e => o(381, po = e))); + let cc, dc = []; + const uc = Ba(), + hc = Ba(), + pc = Wa([Xs, hc, Zs, Ys], (([e, t, o, i]) => e || (t || o < 1 ? i : 1))), + mc = { + ...Zi, + imageFile: Qn, + imageSize: ea, + mediaDuration: oa, + mediaMinDuration: na, + mediaMaxDuration: aa, + mediaTrim: ia, + imageBackgroundColor: wa, + imageBackgroundImage: Sa, + imageCropAspectRatio: ca, + imageCropMinSize: ha, + imageCropMaxSize: pa, + imageCropLimitToImage: da, + imageCropRect: ua, + imageCropRectOrigin: ga, + imageCropRectSnapshot: Ps, + imageCropRectAspectRatio: $a, + imageCropRange: ma, + imageRotation: fa, + imageRotationRange: ya, + imageFlipX: xa, + imageFlipY: va, + imageOutputSize: ba, + imageColorMatrix: ka, + imageConvolutionMatrix: Ca, + imageGamma: Ta, + imageVignette: Ma, + imageNoise: Ra, + imageManipulation: Ia, + imageDecoration: Pa, + imageAnnotation: Ea, + imageRedaction: Aa, + imageFrame: La, + imagePreview: Bl, + imagePreviewSource: Ol, + imageTransforms: Nl, + imagePreviewModifiers: Vl, + history: ql, + animation: ws, + pixelRatio: Yl, + elasticityMultiplier: lr, + scrollElasticity: gm, + rangeInputElasticity: 5, + redrawTrigger: Vn, + pointerAccuracy: fs, + pointerHoverable: ys, + env: Zl, + rootRect: hs, + stageRect: js, + stageRectBase: Bs, + stageRecenter: Ds, + stageScalar: Zs, + stagePadding: _s, + stagePadded: Ns, + presentationScalar: xl, + imagePreviewUpscale: hc, + utilRect: $s, + utilRectPadded: Hs, + allowPlayPause: yn, + allowPan: qa, + allowZoom: Ka, + allowZoomControls: Ja, + enableZoomInput: es, + enablePanInput: Qa, + enablePanInputStatus: is, + imageSelectionMultiTouching: uc, + rootBackgroundColor: ns, + rootForegroundColor: as, + rootLineColor: ss, + rootColorSecondary: ds, + imageOutlineOpacity: kl, + utilTools: lc, + imageSelectionPan: Js, + imageSelectionZoom: Xs, + imageSelectionZoomCurrent: pc, + imageSelectionStageFitScalar: Ys, + imageSelectionStoredState: Qs, + imageOverlayMarkup: Tl, + interfaceImages: _l, + isInteracting: xs, + isTransformingImage: bs, + isInteractingFraction: vs, + imageCropRectIntent: Es, + imageCropRectPresentation: Is, + imageSelectionRect: As, + imageSelectionRectIntent: zs, + imageSelectionRectPresentation: tl, + imageSelectionRectSnapshot: Ls, + imageScalar: bl, + imageTransformsInterpolated: sc, + imageEffects: Hl + }; + delete mc.image; + const gc = "util-" + I(); + let $c = []; + const fc = e => B.find((([t]) => e === t)); + let yc = [], + bc = mo(); + const xc = (e, t, o) => { + let i = be.getPropertyValue(e); + i = o ? o(i) : /^[0-9]+$/.test(i) ? parseFloat(i) : void 0, t.set(i, { + hard: !Xt + }) + }, + wc = (e, t, o = !1) => { + const i = (e => { + const t = be.getPropertyValue(e); + return Dh(t) + })(e); + i && 0 !== i[3] && (o || (i.length = 3), t.set(i, { + hard: !Xt + })) + }, + Sc = Ba(); + on(e, Sc, (e => o(88, xi = e))); + const kc = Ba(); + on(e, kc, (e => o(89, vi = e))); + const Cc = Ba(); + on(e, Cc, (e => o(90, ki = e))); + const Tc = ec(0, { + damping: .9 + }); + on(e, Tc, (e => o(91, Ci = e))); + const Rc = () => { + wc("color", as), wc(Kr ? "--color-background" : "background-color", ns), wc("outline-color", ss), wc("--color-primary", ls), wc("--color-secondary", ds), wc("--grid-color-even", kc, !0), wc("--grid-color-odd", Cc, !0), xc("--grid-size", Sc), xc("--editor-inset-top", ms, (e => parseInt(e, 10))) + }, + Pc = Wa([Nl, Hl, wa, Za], (([e, t, o, i]) => e && { + ...e, + ...t, + backgroundColor: o, + backgroundImage: i + })); + on(e, Pc, (e => o(376, no = e))); + const Ec = () => { + const e = ac.length ? void 0 : { + resize: 1.05 + }, + t = ((e, t, o = {}) => { + const { + resize: i = 1, + opacity: r = 0 + } = o, n = { + opacity: [ec(r, { + ...Pp, + stiffness: .1 + }), j], + resize: [ec(i, { + ...Pp, + stiffness: .1 + }), j], + translation: [ec(void 0, Pp), j], + rotation: [ec(void 0, Ep), j], + origin: [ec(void 0, Pp), j], + scale: [ec(void 0, Ep), j], + gamma: [ec(void 0, Ep), e => e || 1], + vignette: [ec(void 0, Ep), e => e || 0], + colorMatrix: [ec([...Rp], Pp), e => e || [...Rp]], + convolutionMatrix: [Ba(void 0), e => e && e.clarity || void 0], + backgroundColor: [ec(void 0, Pp), (e, t, o) => { + if (Array.isArray(e)) { + if (Array.isArray(t)) { + const i = [...e]; + 0 === t[3] ? (i[3] = 0, o(i)) : 0 === i[3] && ((e = [...t])[3] = 0) + } + return e + } + }], + backgroundImage: [Ba(void 0), j] + }, a = Object.entries(n).map((([e, t]) => [e, t[0]])), s = a.map((([, e]) => e)), l = Object.entries(n).reduce(((e, [t, o]) => { + const [i, r] = o; + return e[t] = (e, o) => i.set(r(e, c[t], (e => { + i.set(e, { + hard: !0 + }) + })), o), e + }), {}); + let c; + const d = Wa(s, (o => (c = o.reduce(((e, t, o) => (e[a[o][0]] = t, e)), {}), c.data = e, c.size = t, c.scale *= o[1], c))); + return d.get = () => c, d.set = (e, t) => { + const o = { + hard: !t + }; + Object.entries(e).forEach((([e, t]) => { + l[e] && l[e](t, o) + })) + }, d + })($t, wt, e); + ac.unshift(t), Ic(no) + }, + Ic = e => { + ac.forEach(((t, o) => { + const i = 0 === o ? 1 : 0; + t.set({ + ...e, + opacity: i, + resize: 1 + }, ao) + })) + }; + let Ac; + const Lc = Jl(void 0, { + duration: 500 + }); + let zc; + on(e, Lc, (e => o(55, Jt = e))); + const Fc = Ba(!1); + let Oc; + on(e, Fc, (e => o(371, Qt = e))); + const Dc = ec(void 0, { + stiffness: .1, + damping: .7, + precision: .25 + }); + on(e, Dc, (e => o(83, mi = e))); + const Bc = ec(0, { + stiffness: .1, + precision: .05 + }); + on(e, Bc, (e => o(84, $i = e))); + const Wc = ec(0, { + stiffness: .02, + damping: .5, + precision: .25 + }); + on(e, Wc, (e => o(369, qt = e))); + const Vc = ec(void 0, { + stiffness: .02, + damping: .5, + precision: .25 + }); + on(e, Vc, (e => o(370, Kt = e))); + const _c = ec(void 0, { + stiffness: .02, + damping: .5, + precision: .25 + }); + let Nc; + on(e, _c, (e => o(368, Yt = e))); + const Hc = () => { + Ni("abortLoadImage") + }, + jc = () => { + Ni("abortProcessImage"), un(ic, Zt = !1, Zt) + }, + Uc = e => { + e.target && "true" === e.target.dataset.touchScroll || e.preventDefault() + }, + Gc = Gl ? e => { + const t = e.touches ? e.touches[0] : e; + t.pageX > 20 && t.pageX < window.innerWidth - 20 || Uc(e) + } : r, + Zc = Ba([]); + on(e, Zc, (e => o(463, _t = e))), Kn("keysPressed", Zc); + const Xc = e => { + !e || Wo(e) && !(e => /^image/.test(e.type) && !/svg/.test(e.type))(e) || !Wo(e) && !/^http/.test(e) || Ni("loadImage", e) + }, + Yc = e => { + e && Xc(e) + }; + let qc = void 0; + let Kc, Jc = []; + const Qc = Ba(); + Kn("rootPortal", Qc), Kn("rootRect", hs); + const ed = () => ({ + foregroundColor: [...Lt], + lineColor: [...At], + utilVisibility: { + ...N + }, + isInteracting: It, + isInteractingFraction: Et, + rootRect: Ye(Pt), + stageRect: Ye(Rt), + manipulationShapesDirty: yd, + annotationShapesDirty: pd, + decorationShapesDirty: $d, + frameShapesDirty: fd + }), + td = (e, t, o) => ur(e, De(t.width / o, t.height / o)), + od = (e, t, o) => { + var i; + return e._translate = ce((i = t).x, i.y), e._scale = o, e + }, + id = e => { + const t = []; + return e.forEach((e => t.push(rd(e)))), t.filter(Boolean) + }, + rd = e => Mi(e) ? (e.points = [ce(e.x1, e.y1), ce(e.x2, e.y2)], e) : (!(e => wi(e) && !e.text.length)(e) || e.backgroundColor && 0 !== e.backgroundColor[3] || (Si(e) && (e.width = 5, e.height = e.lineHeight), e.strokeWidth = 1, e.strokeColor = [1, 1, 1, .5], e.backgroundColor = [0, 0, 0, .1]), e); + let nd, ad = [], + sd = [], + ld = [], + cd = [], + dd = [], + ud = {}; + const hd = (e, t, o, i, r, n, a) => { + const { + manipulationShapesDirty: s, + annotationShapesDirty: l, + decorationShapesDirty: c, + frameShapesDirty: d, + selectionRect: u, + scale: h + } = e, p = nd !== h, m = p || !dt(ud, u); + m && (nd = h, ud = u), s && (ld = t.filter(Ei).map(gi).map((e => ur(e, wt)))), (l || o !== Mt) && (ad = o.filter(Ei).map(gi).sort(((e, t) => e.alwaysOnTop ? 1 : t.alwaysOnTop ? -1 : 0)).map((e => ur(e, wt)))), (p || md || l || o !== Mt) && (sd = id(ad.map((e => y(e, { + flipX: Ct, + flipY: kt, + rotation: Tt, + scale: h, + context: Ke(wt) + }))).flat())), (c || i !== xt || m) && (cd = id(i.filter(Ei).map(gi).sort(((e, t) => e.alwaysOnTop ? 1 : t.alwaysOnTop ? -1 : 0)).map((e => td(e, u, h))).map((e => y(e, { + context: u + }))).flat().map((e => od(e, u, h))))), (d || n !== ft || m) && (dd = n ? id([n].map(gi).map((e => td(e, u, h))).map(y).flat().map((e => od(e, u, h)))) : []); + let g = id(r.filter(Ei)); + return "undefined" != typeof window && (e => { + if (e && e._clpdx4s) return; + const [t] = [ + [85, 110, 108, 105, 99, 101, 110, 115, 101, 100, 32, 80, 105, 110, 116, 117, 114, 97, 32, 105, 110, 115, 116, 97, 110, 99, 101] + ].map((e => e.map((e => String.fromCharCode(e))).join(""))); + g = [...g, { + x: u.x + .5 * u.width - 82, + y: u.y + u.height - 16 - 12, + width: 164, + height: 16, + text: t, + fontWeight: 900, + fontSize: 12, + color: [1, 1, 1, .25] + }] + })(window), { + manipulationShapesDirty: s, + manipulationShapes: ld, + annotationShapesDirty: l, + annotationShapes: sd, + decorationShapesDirty: c, + decorationShapes: cd, + frameShapesDirty: d, + frameShapes: dd, + interfaceShapes: g, + selectionShapes: a.map(gi).map((e => ur(e, wt))) + } + }; + let pd = !0; + let md = !0; + let $d = !0; + let fd = !0; + let yd = !0; + Yn((() => { + En(), $t && T($t.src) && /^blob:/.test($t.src) && URL.revokeObjectURL($t.src), Xa(), pl(), hl(), ml(), $l(), fl(), yl(), Ql(), nc(), fs.destroy(), ys.destroy(), Jn.destroy(), ac.clear(), ad.length = 0, sd.length = 0, ld.length = 0, cd.length = 0, dd.length = 0; + try { + o(228, Wl = void 0), o(283, Ac = void 0) + } catch (e) {} + })); + return e.$$set = e => { + "class" in e && o(229, Ui = e.class), "layout" in e && o(230, Gi = e.layout), "stores" in e && o(231, Zi = e.stores), "locale" in e && o(3, Xi = e.locale), "id" in e && o(4, Yi = e.id), "util" in e && o(232, qi = e.util), "utils" in e && o(233, Ki = e.utils), "animations" in e && o(234, Ji = e.animations), "disabled" in e && o(235, Qi = e.disabled), "status" in e && o(227, er = e.status), "previewUpscale" in e && o(236, tr = e.previewUpscale), "previewPad" in e && o(237, or = e.previewPad), "previewMaskOpacity" in e && o(5, ir = e.previewMaskOpacity), "previewImageDataMaxSize" in e && o(238, rr = e.previewImageDataMaxSize), "previewImageTextPixelRatio" in e && o(6, nr = e.previewImageTextPixelRatio), "markupMaskOpacity" in e && o(7, ar = e.markupMaskOpacity), "zoomMaskOpacity" in e && o(239, sr = e.zoomMaskOpacity), "elasticityMultiplier" in e && o(8, lr = e.elasticityMultiplier), "willRevert" in e && o(240, cr = e.willRevert), "willProcessImage" in e && o(241, dr = e.willProcessImage), "willRenderCanvas" in e && o(9, hr = e.willRenderCanvas), "willRenderToolbar" in e && o(242, pr = e.willRenderToolbar), "willSetHistoryInitialState" in e && o(243, mr = e.willSetHistoryInitialState), "enableButtonExport" in e && o(244, gr = e.enableButtonExport), "enableButtonRevert" in e && o(245, yr = e.enableButtonRevert), "enableNavigateHistory" in e && o(246, br = e.enableNavigateHistory), "enableToolbar" in e && o(10, xr = e.enableToolbar), "enableUtils" in e && o(247, vr = e.enableUtils), "enableButtonClose" in e && o(248, wr = e.enableButtonClose), "enableDropImage" in e && o(249, kr = e.enableDropImage), "enablePasteImage" in e && o(250, Cr = e.enablePasteImage), "enableBrowseImage" in e && o(251, Tr = e.enableBrowseImage), "enableTransparencyGrid" in e && o(11, Mr = e.enableTransparencyGrid), "layoutDirectionPreference" in e && o(252, Rr = e.layoutDirectionPreference), "layoutHorizontalUtilsPreference" in e && o(253, Pr = e.layoutHorizontalUtilsPreference), "layoutVerticalUtilsPreference" in e && o(254, Er = e.layoutVerticalUtilsPreference), "layoutVerticalToolbarPreference" in e && o(255, Ir = e.layoutVerticalToolbarPreference), "layoutVerticalControlGroupsPreference" in e && o(256, Ar = e.layoutVerticalControlGroupsPreference), "layoutVerticalControlTabsPreference" in e && o(257, Lr = e.layoutVerticalControlTabsPreference), "textDirection" in e && o(12, zr = e.textDirection), "markupEditorZoomLevel" in e && o(258, Fr = e.markupEditorZoomLevel), "markupEditorZoomLevels" in e && o(13, Or = e.markupEditorZoomLevels), "markupEditorZoomAdjustStep" in e && o(14, Dr = e.markupEditorZoomAdjustStep), "markupEditorZoomAdjustFactor" in e && o(15, Br = e.markupEditorZoomAdjustFactor), "markupEditorZoomAdjustWheelFactor" in e && o(16, Wr = e.markupEditorZoomAdjustWheelFactor), "markupEditorInteractionMode" in e && o(259, Vr = e.markupEditorInteractionMode), "muteAudio" in e && o(260, _r = e.muteAudio), "willSetMediaInitialTimeOffset" in e && o(261, Nr = e.willSetMediaInitialTimeOffset), "enablePan" in e && o(17, Hr = e.enablePan), "enableZoom" in e && o(18, Zr = e.enableZoom), "enableZoomControls" in e && o(262, Xr = e.enableZoomControls), "enableZoomInput" in e && o(19, Yr = e.enableZoomInput), "enablePanInput" in e && o(263, qr = e.enablePanInput), "enableCanvasAlpha" in e && o(20, Kr = e.enableCanvasAlpha), "enablePanLimit" in e && o(21, Jr = e.enablePanLimit), "panLimitGutterScalar" in e && o(22, Qr = e.panLimitGutterScalar), "zoomPresetOptions" in e && o(23, rn = e.zoomPresetOptions), "zoomAdjustStep" in e && o(24, nn = e.zoomAdjustStep), "zoomAdjustFactor" in e && o(25, an = e.zoomAdjustFactor), "zoomAdjustWheelFactor" in e && o(26, sn = e.zoomAdjustWheelFactor), "zoomLevel" in e && o(0, ln = e.zoomLevel), "imagePreviewSrc" in e && o(266, cn = e.imagePreviewSrc), "imageOrienter" in e && o(267, dn = e.imageOrienter), "pluginComponents" in e && o(268, hn = e.pluginComponents), "pluginOptions" in e && o(27, pn = e.pluginOptions), "root" in e && o(2, $n = e.root), "imageSourceToImageData" in e && o(28, Xn = e.imageSourceToImageData), "imagePreviewCurrent" in e && o(228, Wl = e.imagePreviewCurrent) + }, e.$$.update = () => { + if (1 & e.$$.dirty[0] | 1024 & e.$$.dirty[8] && o(0, ln = null === ln ? Fr : ln), 2 & e.$$.dirty[0] | 1048576 & e.$$.dirty[8]) { + let e = !1; + hn.forEach((([t]) => { + gn[t] || (o(1, gn[t] = {}, gn), e = !0) + })), e && o(280, Nn = [...hn]) + } + var t, h, b, x; + if (8 & e.$$.dirty[0] | 65536 & e.$$.dirty[7] | 2 & e.$$.dirty[9] && o(335, D = Xi && Nn.length ? Ki || Nn.map((([e]) => e)) : []), 134217728 & e.$$.dirty[0] | 2 & e.$$.dirty[9] | 33554432 & e.$$.dirty[10] | 1024 & e.$$.dirty[12] && o(336, B = ((e, t, o, i) => { + const r = t.filter((([t]) => e.includes(t))).filter((([e, { + isSupported: t + }]) => t({ + ...i, + ...o[e] + }))).map((([e, t]) => [e, t.Component])); + return cs(r, $c, ((e, t) => e[0] === t[0] && e[1] === t[1])) ? $c : ($c = r, r) + })(D, Nn, pn, { + src: go + })), 67108864 & e.$$.dirty[10] && o(291, W = B.length), 8 & e.$$.dirty[0] | 4096 & e.$$.dirty[9] | 33554432 & e.$$.dirty[10] && o(47, V = W && D.map((e => { + const t = fc(e); + if (t) return { + id: e, + view: t[1], + tabIcon: Xi[e + "Icon"], + tabLabel: Xi[e + "Label"] + } + })).filter(Boolean) || []), 65536 & e.$$.dirty[1] && o(353, i = !!V.find((e => "trim" === e.id))), 12288 & e.$$.dirty[11] | 32 & e.$$.dirty[13] && o(290, n = !!(hi && $t && i)), 32768 & e.$$.dirty[7] | 4096 & e.$$.dirty[9] && o(44, _ = W && qi && "string" == typeof qi && fc(qi) ? qi : W > 0 ? B[0][0] : void 0), 8192 & e.$$.dirty[1] | 2048 & e.$$.dirty[9] && n && _ && En(), 2048 & e.$$.dirty[9] | 8192 & e.$$.dirty[11] && (n ? ($t.addEventListener("play", Sn), $t.addEventListener("pause", Sn)) : $t && "video" === $t.nodeName && ($t.removeEventListener("play", Sn), $t.removeEventListener("pause", Sn))), 2048 & e.$$.dirty[9] && n && xn.set(Bn() / Dn()), 24 & e.$$.dirty[13] && (e => { + if (!In()) return; + const t = Date.now(); + if (Cn && t - Cn < 16) return; + Cn = t; + const o = hi * e; + if (o.toFixed(1) === kn) return; + kn = o.toFixed(1); + const i = $t, + r = () => { + i.removeEventListener("seeked", r), fn() + }; + i.addEventListener("seeked", r), ((e, t) => { + e.fastSeek && e.fastSeek(t), e.currentTime = t + })(i, o) + })(di || ui), 16 & e.$$.dirty[13] && o(351, a = ui && ne(ui, 6)), 97 & e.$$.dirty[13] && o(349, s = ni || [ + [0, Math.min(hi, pi) / hi] + ]), 256 & e.$$.dirty[11] && (l = s[0][0]), 256 & e.$$.dirty[11] && (c = s[s.length - 1][1]), 256 & e.$$.dirty[11] && o(352, d = s.map((([e, t]) => [ne(e, 6), ne(t, 6)]))), 3072 & e.$$.dirty[11] && o(350, u = d.findIndex((([e, t]) => a >= e && a <= t))), 3584 & e.$$.dirty[11] && (p = -1 === u && d.findIndex(((e, t, o) => { + const i = o[t - 1]; + return i ? a <= e[0] && a >= i[1] : a <= e[0] + }))), 4096 & e.$$.dirty[8] && On.set(_r), 8192 & e.$$.dirty[11] | 4 & e.$$.dirty[13] && ($t && ci ? Ln() : zn()), 8192 & e.$$.dirty[11] | 2 & e.$$.dirty[13] && $t && (e => { + if (!n) return; + $t.volume = Math.min(1, e) + })(li), 256 & e.$$.dirty[0] && un(_n, si = lr, si), 8192 & e.$$.dirty[7] && o(345, m = "overlay" === Gi), 1073741824 & e.$$.dirty[7] | 16 & e.$$.dirty[11] && o(45, $ = vr && !m), 134217730 & e.$$.dirty[0] && pn && Object.entries(pn).forEach((([e, t]) => { + Object.entries(t).forEach((([t, i]) => { + gn[e] && o(1, gn[e][t] = i, gn) + })) + })), 262144 & e.$$.dirty[7] && Hn.set(Qi ? 1 : 0), 2097152 & e.$$.dirty[7] && (f = rr ? (t = rr, h = Un, De(Math.min(t.width, h.width), Math.min(t.height, h.height))) : Un), 1073741824 & e.$$.dirty[12] && Jn.update(ri[0]), 536870912 & e.$$.dirty[12] && (y = ii ? (e, t) => ii(e, { + flipX: void 0, + flipY: void 0, + rotation: void 0, + ...t, + isPreview: !0 + }) : j), 536870912 & e.$$.dirty[1] && Array.isArray(oi) && Ni("selectionchange", [...oi]), 16384 & e.$$.dirty[8] | 268435456 & e.$$.dirty[12] && ts.set(ti && Xr), 34816 & e.$$.dirty[8] && os.set("pan" === Vr || qr), 2097152 & e.$$.dirty[1] && Ht && hs.set(it(Ht.x, Ht.y, Ht.width, Ht.height)), 262160 & e.$$.dirty[11] | 4 & e.$$.dirty[12] && Pt && m && oo && oo.complete && (() => { + const e = Jo, + t = ut(Pt); + e && e === t || (ca.set(ut(Pt)), Kl()) + })(), 33554432 & e.$$.dirty[10] && o(46, Z = D.length > 1), 32768 & e.$$.dirty[1] && (Z || ps.set(qe())), 1024 & e.$$.dirty[0] | 134217728 & e.$$.dirty[12] && (xr || gs.set(it(0, Ko, 0, 0))), 524352 & e.$$.dirty[11] && o(348, w = !It && v), 67108864 & e.$$.dirty[12] && o(346, S = !qo), 2097152 & e.$$.dirty[1] && o(292, Qe = Ht && Ht.width > 0 && Ht.height > 0), 8 & e.$$.dirty[0] | 12288 & e.$$.dirty[9] && o(41, tt = Qe && Xi && !!W), 1024 & e.$$.dirty[1] && setTimeout((() => o(281, Cs = tt)), 1), 131072 & e.$$.dirty[7] | 4 & e.$$.dirty[9] | 160 & e.$$.dirty[11] && un(ws, ao = "always" === Ji ? w : "never" !== Ji && (w && Cs && S), ao), 131072 & e.$$.dirty[7] | 96 & e.$$.dirty[11] && un(Ss, Xt = "always" === Ji ? v : "never" !== Ji && (v && S), Xt), 524288 & e.$$.dirty[7] | 16 & e.$$.dirty[11] && Ms.set(tr || m), 1048576 & e.$$.dirty[7] && Vs.set(or), 4 & e.$$.dirty[0] | 41943040 & e.$$.dirty[12] && $n && ($n.dispatchEvent(xp("markupzoom", Yo)), $n.dispatchEvent(xp("zoom", Eo(Yo) ? Yo : No))), 4 & e.$$.dirty[0] | 16777216 & e.$$.dirty[12] && $n && ($n.dispatchEvent(xp("markuppan", jo)), $n.dispatchEvent(xp("pan", jo))), 2097152 & e.$$.dirty[12] && zo && el(), 4194304 & e.$$.dirty[12] && Fo && il(), 8396800 & e.$$.dirty[1] && _ && kl.set(.075, { + hard: !Xt + }), 4194304 & e.$$.dirty[7] && o(343, k = sr), 1572864 & e.$$.dirty[12] && o(344, C = Io ? -Math.max(...Object.values(Po)) : 0), 277872640 & e.$$.dirty[1] | 12 & e.$$.dirty[11] && Ro) { + let e = Ro.x - Rt.x, + t = Rt.x + Rt.width - (Ro.x + Ro.width), + o = Ro.y - Rt.y, + i = Rt.y + Rt.height - (Ro.y + Ro.height), + r = Math.min(e, o, t, i); + Rl.set(r > C ? 0 : Math.min(k, Math.abs(r / 64)), { + hard: !Xt + }) + } + if (134217728 & e.$$.dirty[1] && o(342, M = .55 / Mo), 9437184 & e.$$.dirty[1] | 2 & e.$$.dirty[11] && Rt && Pl.set({ + x: 0, + y: Rt.y, + width: Rt.x < 64 ? 0 : Rt.x, + height: Rt.height + M + }, { + hard: !Xt + }), 9437184 & e.$$.dirty[1] | 262146 & e.$$.dirty[11] && Rt && El.set({ + x: 0, + y: 0, + width: Pt.width, + height: Rt.y + M + }, { + hard: !Xt + }), 9437184 & e.$$.dirty[1] | 262146 & e.$$.dirty[11] && Rt) { + let e = Rt.x + Rt.width, + t = Pt.width - (Rt.x + Rt.width); + t < 64 && (e += t, t = 0), Il.set({ + x: e, + y: Rt.y, + width: t, + height: Rt.height + M + }, { + hard: !Xt + }) + } + if (9437184 & e.$$.dirty[1] | 262144 & e.$$.dirty[11] && Rt && Al.set({ + x: 0, + y: Rt.y + Rt.height, + width: Pt.width, + height: Pt.height - (Rt.y + Rt.height) + }, { + hard: !Xt + }), 67108864 & e.$$.dirty[1] | 294912 & e.$$.dirty[12] && o(338, R = To && { + id: "stage-overlay", + backgroundColor: So, + opacity: wo, + ...To + }), 67108864 & e.$$.dirty[1] | 163840 & e.$$.dirty[12] && o(341, P = Co && { + id: "stage-overlay", + backgroundColor: So, + opacity: wo, + ...Co + }), 67108864 & e.$$.dirty[1] | 98304 & e.$$.dirty[12] && o(340, E = ko && { + id: "stage-overlay", + backgroundColor: So, + opacity: wo, + ...ko + }), 67108864 & e.$$.dirty[1] | 49152 & e.$$.dirty[12] && o(339, A = vo && { + id: "stage-overlay", + backgroundColor: So, + opacity: wo, + ...vo + }), 1879048192 & e.$$.dirty[10] | 1 & e.$$.dirty[11] && o(337, L = [P, E, A, R].filter(Boolean)), 134217728 & e.$$.dirty[10] | 8192 & e.$$.dirty[12] && L && xo && Tl.update((e => [...e.filter((e => "stage-overlay" !== e.id)), ...L])), 262144 & e.$$.dirty[8] | 1024 & e.$$.dirty[12] && Ol.set(cn || (go || void 0)), 4 & e.$$.dirty[0] | 2048 & e.$$.dirty[7] | 8192 & e.$$.dirty[11] && (o(228, Wl = $t), $t && $n.dispatchEvent(xp("loadpreview", Wl))), 8 & e.$$.dirty[12] && io && (Js.set(le()), Xs.set(void 0), el(), _l.set([])), 4096 & e.$$.dirty[12] && o(296, F = fo.index > 0), 4096 & e.$$.dirty[12] && o(295, O = fo.index < fo.length - 1), 8 & e.$$.dirty[1] && uc.set(cc), 2048 & e.$$.dirty[12] && hc.set($o), 8192 & e.$$.dirty[1] && Ya.set(_), 65664 & e.$$.dirty[1] && o(38, N = V.reduce(((e, t) => (e[t.id] = N && N[t.id] || 0, e)), {})), 8192 & e.$$.dirty[1] && o(80, H = { + name: gc, + selected: _ + }), 65536 & e.$$.dirty[1] && o(79, U = V.map((e => ({ + id: e.id, + icon: e.tabIcon, + label: e.tabLabel + })))), 65536 & e.$$.dirty[1] && o(78, G = V.map((e => e.id))), 4096 & e.$$.dirty[7] && o(77, X = Mc(["PinturaRoot", "PinturaRootComponent", Ui])), 262144 & e.$$.dirty[11] && o(331, Y = Pt && (Pt.width > 1e3 ? "wide" : Pt.width < 600 ? "narrow" : void 0)), 262144 & e.$$.dirty[11] && o(318, q = Pt && (Pt.width <= 320 || Pt.height <= 460)), 262144 & e.$$.dirty[11] && o(330, K = Pt && (Pt.height > 1e3 ? "tall" : Pt.height < 600 ? "short" : void 0)), 4 & e.$$.dirty[0] && o(298, J = $n && $n.parentNode && $n.parentNode.classList.contains("PinturaModal")), 1 & e.$$.dirty[1] | 524288 & e.$$.dirty[9] | 262144 & e.$$.dirty[11] && o(323, Q = J && Pt && jl > Pt.width), 2 & e.$$.dirty[1] | 524288 & e.$$.dirty[9] | 262144 & e.$$.dirty[11] && o(322, ee = J && Pt && Ul > Pt.height), 12288 & e.$$.dirty[10] && o(324, te = Q && ee), 1048576 & e.$$.dirty[0] && o(321, oe = Kr), 2097152 & e.$$.dirty[10] && o(293, ie = "narrow" === Y), 16 & e.$$.dirty[8] | 262144 & e.$$.dirty[11] && o(332, (b = Pt, x = Rr, re = Pt ? "auto" === x ? b.width > b.height ? "landscape" : "portrait" : "horizontal" === x ? b.width < 500 ? "portrait" : "landscape" : "vertical" === x ? b.height < 400 ? "landscape" : "portrait" : void 0 : "landscape")), 4194304 & e.$$.dirty[10] && o(76, ae = "landscape" === re), 16384 & e.$$.dirty[9] | 1048576 & e.$$.dirty[10] && o(320, se = ie || "short" === K), 1 & e.$$.dirty[1] | 262144 & e.$$.dirty[11] && o(319, de = bc && Pt && jl === Pt.width && !Gl), 4 & e.$$.dirty[1] | 512 & e.$$.dirty[12] && o(294, ue = [...po || [], ...dc].filter(Boolean)), 32 & e.$$.dirty[8] && o(329, he = "has-navigation-preference-" + Pr), 64 & e.$$.dirty[8] && o(328, pe = "has-navigation-preference-" + Er), 128 & e.$$.dirty[8] && o(325, me = "has-toolbar-preference-" + Ir), 256 & e.$$.dirty[8] && o(327, ge = "has-controlgroups-preference-" + Ar), 512 & e.$$.dirty[8] && o(326, $e = "has-controltabs-preference-" + Lr), 262144 & e.$$.dirty[11] && o(334, fe = void 0 !== Pt && Pt.width > 0 && Pt.height > 0), 4 & e.$$.dirty[0] | 16777216 & e.$$.dirty[10] && o(333, be = fe && $n && getComputedStyle($n)), 8388608 & e.$$.dirty[10] && be && Rc(), 1024 & e.$$.dirty[0] | 8437760 & e.$$.dirty[1] | 270336 & e.$$.dirty[7] | 524288 & e.$$.dirty[9] | 8388352 & e.$$.dirty[10] | 33554432 & e.$$.dirty[11] | 384 & e.$$.dirty[12] && Zl.set({ + ...jt, + layoutMode: Gi, + orientation: re, + horizontalSpace: Y, + verticalSpace: K, + navigationHorizontalPreference: he, + navigationVerticalPreference: pe, + controlGroupsVerticalPreference: ge, + controlTabsVerticalpreference: $e, + toolbarVerticalPreference: me, + isModal: J, + isDisabled: Qi, + isCentered: te, + isCenteredHorizontally: Q, + isCenteredVertically: ee, + isAnimated: Xt, + isTransparent: oe, + pointerAccuracy: ho, + pointerHoverable: uo, + isCompact: se, + hasSwipeNavigation: de, + hasLimitedSpace: q, + hasToolbar: xr, + hasNavigation: Z && $, + isIOS: bc, + browserVersion: Fl() ? "chrome-" + (navigator.userAgent.match(/Chrome\/([0-9]+)/) || [])[1] : void 0 + }), 33554432 & e.$$.dirty[11] && o(75, xe = Object.entries(jt).map((([e, t]) => /^is|has/.test(e) ? t ? vp(e) : void 0 : t)).filter(Boolean).join(" ")), 8192 & e.$$.dirty[1] && _ && lc.set([]), 96 & e.$$.dirty[12] && o(74, ve = co && Object.entries(lo).filter((([, e]) => null != e)).reduce(((e, [, t]) => e = { + ...e, + ...t + }), {})), 4 & e.$$.dirty[12] && o(315, Ce = oo && "any-to-file" === oo.task), 32 & e.$$.dirty[10] && Ce && ac && ac.clear(), 16 & e.$$.dirty[12] && o(317, we = !!no && !!no.translation), 16 & e.$$.dirty[9] | 128 & e.$$.dirty[10] | 8192 & e.$$.dirty[11] && we && $t && $t !== Ac && (o(283, Ac = $t), Ec()), 128 & e.$$.dirty[10] | 16 & e.$$.dirty[12] && we && Ic(no), 33554432 & e.$$.dirty[1] && ro && ro.length > 1) { + let e = []; + ac.forEach(((t, o) => { + 0 !== o && t.get().opacity <= 0 && e.push(t) + })), e.forEach((e => ac.remove(e))) + } + if (8 & e.$$.dirty[0] | 64 & e.$$.dirty[10] && o(40, ke = Xi && Se.length && Xi.labelSupportError(Se)), 4 & e.$$.dirty[12] && o(307, Te = oo && !!oo.error), 4 & e.$$.dirty[12] && o(43, Me = !oo || !oo.complete && void 0 === oo.task), 4 & e.$$.dirty[12] && o(308, Re = oo && (oo.taskLengthComputable ? oo.taskProgress : 1 / 0)), 32 & e.$$.dirty[10] && Ce && un(Ll, eo = !1, eo), 8388608 & e.$$.dirty[1] | 32 & e.$$.dirty[9] | 4 & e.$$.dirty[12] && oo && oo.complete) { + const e = Xt ? 250 : 0; + clearTimeout(zc), o(284, zc = setTimeout((() => { + un(Ll, eo = !0, eo) + }), e)) + } + if (4096 & e.$$.dirty[1] | 268435456 & e.$$.dirty[9] | 5 & e.$$.dirty[12] && o(312, Pe = oo && !Te && !Me && !eo), 8 & e.$$.dirty[9] | 8192 & e.$$.dirty[11] | 8 & e.$$.dirty[12] && o(311, Ee = !(!io || $t && !Dl)), 8388608 & e.$$.dirty[1] | 1 & e.$$.dirty[12]) + if (eo) { + setTimeout((() => Tc.set(1)), Xt ? 500 : 0) + } else Tc.set(0); + if (67108864 & e.$$.dirty[11] | 2 & e.$$.dirty[12] && o(306, Ie = !!(Zt || to && void 0 !== to.progress && !to.complete)), 134217728 & e.$$.dirty[9] && Ie && En(), 4096 & e.$$.dirty[1] | 4 & e.$$.dirty[12] && o(309, Ae = oo && !(oo.error || Me)), 8 & e.$$.dirty[0] | 4 & e.$$.dirty[12] && o(310, Le = Xi && (oo ? !oo.complete || oo.error ? cl(Xi.statusLabelLoadImage(oo), oo.error && oo.error.metadata, "{", "}") : Xi.statusLabelLoadImage({ + progress: 1 / 0, + task: "blob-to-bitmap" + }) : Xi.statusLabelLoadImage(oo))), 8 & e.$$.dirty[0] | 2 & e.$$.dirty[12] && o(305, ze = to && Xi && Xi.statusLabelProcessImage(to)), 2 & e.$$.dirty[12] && o(303, Fe = to && (to.taskLengthComputable ? to.taskProgress : 1 / 0)), 2 & e.$$.dirty[12] && o(304, Oe = to && !to.error), 2 & e.$$.dirty[12] && o(302, Be = !(!to || !to.error)), 8 & e.$$.dirty[0] | 4096 & e.$$.dirty[1] | 1024 & e.$$.dirty[7] | 2139095040 & e.$$.dirty[9] | 7 & e.$$.dirty[10]) + if (er) { + let e, t, i, r, n; + T(er) && (e = er), Eo(er) ? t = er : Array.isArray(er) && ([e, t, n] = er, !1 === t && (r = !0), Eo(t) && (i = !0)), o(35, Oc = (e || t) && { + text: e, + aside: r || i, + progressIndicator: { + visible: i, + progress: t + }, + closeButton: r && { + label: Xi.statusLabelButtonClose, + icon: Xi.statusIconButtonClose, + onclick: n || (() => o(227, er = void 0)) + } + }) + } else o(35, Oc = Xi && Me || Te || Pe || Ee ? { + text: Le, + aside: Te || Ae, + progressIndicator: { + visible: Ae, + progress: Re + }, + closeButton: Te && { + label: Xi.statusLabelButtonClose, + icon: Xi.statusIconButtonClose, + onclick: Hc + } + } : Xi && Ie && ze ? { + text: ze, + aside: Be || Oe, + progressIndicator: { + visible: Oe, + progress: Fe + }, + closeButton: Be && { + label: Xi.statusLabelButtonClose, + icon: Xi.statusIconButtonClose, + onclick: jc + } + } : void 0); + if (1024 & e.$$.dirty[7] && o(314, We = void 0 !== er), 8388608 & e.$$.dirty[1] | 524288 & e.$$.dirty[9] | 2 & e.$$.dirty[12] && J && to && to.complete && (Fc.set(!0), setTimeout((() => Fc.set(!1)), Xt ? 100 : 0)), 4 & e.$$.dirty[0] | 8192 & e.$$.dirty[1] | 1 & e.$$.dirty[12] && eo && $n && $n.dispatchEvent(xp("selectutil", _)), 4608 & e.$$.dirty[1] | 402653184 & e.$$.dirty[9] | 22 & e.$$.dirty[10] | 1073741824 & e.$$.dirty[11] && o(313, Ve = Qt || ke || Me || Te || Pe || Ee || Ie || We), 8 & e.$$.dirty[10] && un(Lc, Jt = Ve ? 1 : 0, Jt), 8388608 & e.$$.dirty[1] | 8 & e.$$.dirty[10] && Lc.set(Ve ? 1 : 0, { + duration: Xt ? 500 : 1 + }), 16777216 & e.$$.dirty[1] && o(42, _e = Jt > 0), 16 & e.$$.dirty[1] && o(301, Ne = !(!Oc || !Oc.aside)), 8390672 & e.$$.dirty[1] | 4194368 & e.$$.dirty[9] | 536870912 & e.$$.dirty[11] && _e && Oc) { + clearTimeout(Nc); + const e = { + hard: !1 === Xt + }; + if (Ne) { + const t = !!Oc.error || !Xt; + Bc.set(1, e), Dc.set(Kt, { + hard: t + }), o(285, Nc = setTimeout((() => { + Wc.set(16, e) + }), 1)) + } else Bc.set(0, e), o(285, Nc = setTimeout((() => { + Wc.set(0, e) + }), 1)) + } + if (2048 & e.$$.dirty[1] && (_e || (_c.set(void 0, { + hard: !0 + }), Dc.set(void 0, { + hard: !0 + }), Wc.set(0, { + hard: !0 + }))), 268435456 & e.$$.dirty[11] && o(300, He = .5 * qt), 2097152 & e.$$.dirty[9] | 134217728 & e.$$.dirty[11] && o(73, je = `transform: translateX(${Yt-He}px)`), 512 & e.$$.dirty[1] | 8192 & e.$$.dirty[11] && o(39, ht = $t && !ke), 256 & e.$$.dirty[1] | 1572864 & e.$$.dirty[9] && o(297, Ge = Ue && (ht || J) ? Uc : r), 262144 & e.$$.dirty[9] && o(72, Ze = Ge), 262144 & e.$$.dirty[9] && o(71, Xe = Ge), 8 & e.$$.dirty[0] | 4194304 & e.$$.dirty[1] | 973078528 & e.$$.dirty[7] | 1 & e.$$.dirty[8] | 245760 & e.$$.dirty[9] | 33554432 & e.$$.dirty[11] && o(70, Je = Xi && Ut && zp((() => pr([ + ["div", "alpha", { + class: "PinturaNavGroup" + }, + [ + ["div", "alpha-set", { + class: "PinturaNavSet" + }, + [wr && ["Button", "close", { + label: Xi.labelClose, + icon: Xi.iconButtonClose, + onclick: () => Ni("close"), + hideLabel: !0 + }], yr && ["Button", "revert", { + label: Xi.labelButtonRevert, + icon: Xi.iconButtonRevert, + disabled: !F, + onclick: oc, + hideLabel: !0 + }]] + ] + ] + ], + ["div", "beta", { + class: "PinturaNavGroup PinturaNavGroupFloat" + }, + [br && ["div", "history", { + class: "PinturaNavSet" + }, + [ + ["Button", "undo", { + label: Xi.labelButtonUndo, + icon: Xi.iconButtonUndo, + disabled: !F, + onclick: ql.undo, + hideLabel: !0 + }], + ["Button", "redo", { + label: Xi.labelButtonRedo, + icon: Xi.iconButtonRedo, + disabled: !O, + onclick: ql.redo, + hideLabel: !0 + }] + ] + ], ue.length && ["div", "plugin-tools", { + class: "PinturaNavSet" + }, ue.filter(Boolean).map((([e, t, o]) => [e, t, { + ...o + }]))]] + ], + ["div", "gamma", { + class: "PinturaNavGroup" + }, + [gr && ["Button", "export", { + label: Xi.labelButtonExport, + icon: ie && Xi.iconButtonExport, + class: "PinturaButtonExport", + onclick: rc, + hideLabel: ie + }]] + ] + ], { + ...jt + }, (() => Vn.set({})))))), 2097152 & e.$$.dirty[11] && o(289, ot = Ft && !!Ft.length), 1024 & e.$$.dirty[9] | 2113536 & e.$$.dirty[11] && o(288, rt = ot && Ur(wt, Ft)), 1536 & e.$$.dirty[9] | 25174016 & e.$$.dirty[11] && ot && ((e, t, i, r) => { + if (!t) return; + const n = { + dataSizeScalar: i + }; + r && r[3] > 0 && (n.backgroundColor = [...r]), t(e, n).then((e => { + qc && g(qc), o(286, qc = e) + })) + })($t, Vt, rt, Wt), 128 & e.$$.dirty[9] | 6307840 & e.$$.dirty[11] && Ft && qc && wt) { + const { + width: e, + height: t + } = wt, i = Gt() ? "pixelated" : "auto" === Ot ? "auto" : "pixelated"; + o(287, Jc = Ft.map((o => { + const r = it(o.x, o.y, o.width, o.height), + n = mt(Ye(r), o.rotation).map((o => ce(o.x / e, o.y / t))); + return { + ...o, + id: "redaction", + flipX: !1, + flipY: !1, + cornerRadius: 0, + strokeWidth: 0, + strokeColor: void 0, + backgroundColor: [0, 0, 0, 0], + backgroundImage: qc, + backgroundImageRendering: i, + backgroundCorners: n + } + }))) + } + 256 & e.$$.dirty[9] | 1048576 & e.$$.dirty[11] && o(37, st = [...Jc, ...zt || []]), 32 & e.$$.dirty[1] && Kc && Qc.set(Kc), 4 & e.$$.dirty[0] | 256 & e.$$.dirty[1] && ht && $n.dispatchEvent(xp("ready")), 524288 & e.$$.dirty[1] && o(64, pd = !0), 245760 & e.$$.dirty[11] && o(65, md = !0), 262144 & e.$$.dirty[1] && o(66, $d = !0), 131072 & e.$$.dirty[1] && o(67, fd = !0), 64 & e.$$.dirty[1] && o(68, yd = !0) + }, o(347, v = !vc()), z = 1 === _d() ? e => { + e && (ye(e.origin, Math.round), ye(e.translation, Math.round)) + } : j, o(316, Se = [!Mp() && "WebGL"].filter(Boolean)), o(299, Ue = mo() || b() && Xo()), o(69, lt = ((e, t = !0) => o => { + "ping" === o.type && (t && o.stopPropagation(), e(o.detail.type, o.detail.data)) + })(_i.pub)), [ln, gn, $n, Xi, Yi, ir, nr, ar, lr, hr, xr, Mr, zr, Or, Dr, Br, Wr, Hr, Zr, Yr, Kr, Jr, Qr, rn, nn, an, sn, pn, Xn, Bl, ql, jl, Ul, dc, cc, Oc, Kc, st, N, ht, ke, tt, _e, Me, _, $, Z, V, ft, xt, Mt, Rt, Ht, Ut, Xt, Jt, ro, So, Mo, Ro, oi, Hi, ji, yc, pd, md, $d, fd, yd, lt, Je, Xe, Ze, je, ve, xe, ae, X, G, U, H, bo, ai, mi, $i, fi, yi, bi, xi, vi, ki, Ci, Ti, Ri, Pi, Ii, Ai, Li, zi, Fi, Oi, Di, Bi, yn, bn, xn, On, Vn, _n, Hn, Qn, ea, oa, ia, ra, aa, sa, la, ca, da, ua, fa, xa, va, wa, Pa, Ea, Ia, Aa, La, za, Fa, Va, _a, Na, Ha, ja, Ua, qa, Ka, Ja, Qa, es, ts, os, is, ns, as, ss, ls, us, hs, ps, ms, gs, $s, fs, ys, xs, vs, ws, Ss, Ms, Rs, Ps, Es, As, Ls, zs, Fs, _s, Ns, js, Gs, Zs, Xs, qs, Ks, Js, tl, ol, rl, xl, Tl, Ml, Rl, Pl, El, Il, Al, Ll, Ol, Vl, _l, Nl, Zl, Yl, ic, ac, lc, mc, Sc, kc, Cc, Tc, ({ + target: e, + propertyName: t + }) => { + e === $n && /background|outline/.test(t) && be && Rc() + }, Pc, Lc, Fc, Dc, Bc, Wc, Vc, _c, e => { + const t = !(!Oc || !Oc.closeButton) || !Xt; + Vc.set(e.detail.width, { + hard: t + }), _c.set(Math.round(.5 * -e.detail.width), { + hard: t + }) + }, Gc, Zc, e => { + const { + keyCode: t, + metaKey: o, + ctrlKey: i, + shiftKey: r + } = e; + if (9 === t && Qi) return void e.preventDefault(); + if (e.target && 32 === t && $n.contains(e.target) && !Gd(e.target) && (Nt && n && An(), e.preventDefault()), 90 === t && (o || i)) return void(r && o ? ql.redo() : ql.undo()); + if (89 === t && i) return void ql.redo(); + if (229 === t) return; + const a = new Set([..._t, t]); + Zc.set(Array.from(a)) + }, ({ + key: e, + keyCode: t + }) => { + if ("Meta" === e) return Zc.set([]); + Zc.set(_t.filter((e => e !== t))) + }, () => { + Zc.set([]) + }, e => { + Gd(e.target) || e.preventDefault() + }, e => { + kr && Xc(e.detail.resources[0]) + }, () => { + Tr && Lp().then(Yc) + }, e => { + if (!Cr) return; + const t = rs((window.innerWidth - Math.abs(Pt.x)) / Pt.width, 0, 1), + o = rs((window.innerHeight - Math.abs(Pt.y)) / Pt.height, 0, 1); + t < .75 && o < .75 || Xc((e.clipboardData || window.clipboardData).files[0]) + }, ed, hd, e => { + pt && dt(e.detail, pt) || un($s, pt = e.detail, pt) + }, er, Wl, Ui, Gi, Zi, qi, Ki, Ji, Qi, tr, or, rr, sr, cr, dr, pr, mr, gr, yr, br, vr, wr, kr, Cr, Tr, Rr, Pr, Er, Ir, Ar, Lr, Fr, Vr, _r, Nr, Xr, qr, () => o(61, Hi = void 0), (e, t, i) => { + const { + text: r = "", + placeholder: n = "", + autoClose: a = !0, + align: s = "top", + justify: l = "center", + buttonConfirm: c, + buttonCancel: d + } = i; + o(61, Hi = { + align: s, + justify: l, + text: r, + placeholder: n, + buttonConfirm: c, + buttonCancel: d, + onconfirm: () => { + e(ji.value), a && o(61, Hi = void 0) + }, + oncancel: () => { + t(void 0), o(61, Hi = void 0) + } + }) + }, cn, dn, hn, mn, Pn, En, In, An, Ln, zn, Fn, Dn, Bn, Wn, Nn, Cs, Dl, Ac, zc, Nc, qc, Jc, rt, ot, n, W, Qe, ie, ue, O, F, Ge, J, Ue, He, Ne, Be, Fe, Oe, ze, Ie, Te, Re, Ae, Le, Ee, Pe, Ve, We, Ce, Se, we, q, de, se, oe, ee, Q, te, me, $e, ge, pe, he, K, Y, re, be, fe, D, B, L, R, A, E, P, M, k, C, m, S, v, w, s, u, a, d, i, $t, wt, kt, Ct, Tt, Pt, It, zt, Ft, Ot, Wt, Vt, jt, Zt, Yt, qt, Kt, Qt, eo, to, oo, io, no, lo, co, uo, ho, po, go, $o, fo, xo, vo, wo, ko, Co, To, Po, Io, zo, Fo, No, jo, Yo, qo, Ko, ti, ii, ri, ni, li, ci, di, ui, hi, pi, function() { + o(31, jl = jp.innerWidth), o(32, Ul = jp.innerHeight) + }, e => un(gs, fi = e.detail, fi), ({ + detail: e + }) => o(44, _ = e), (e, t) => t.id === e, function(t, i) { + e.$$.not_equal(gn[i], t) && (gn[i] = t, o(1, gn), o(268, hn), o(27, pn)) + }, e => o(63, yc = yc.concat(e)), e => o(63, yc = yc.filter((t => t !== e))), (e, { + detail: t + }) => o(38, N[e] = t, N), e => un(ps, bo = e.detail, bo), e => e.id === _, function(t) { + e.$$.not_equal(gn[_], t) && (gn[_] = t, o(1, gn), o(268, hn), o(27, pn)) + }, () => o(63, yc = yc.concat(_)), () => o(63, yc = yc.filter((e => e !== _))), ({ + detail: e + }) => o(38, N[_] = e, N), e => { + const t = { + ...e, + ...ed() + }, + { + annotationShapes: o, + decorationShapes: i, + interfaceShapes: r, + frameShapes: n, + selectionShapes: a + } = hr({ + annotationShapes: Mt, + decorationShapes: xt, + interfaceShapes: Pi, + frameShapes: ft, + selectionShapes: oi + }, t); + return hd(t, st, o, i, r, n, a) + }, () => { + o(64, pd = !1), o(65, md = !1), o(66, $d = !1), o(67, fd = !1), o(68, yd = !1) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + Kc = e, o(36, Kc) + })) + }, function(e) { + ln = e, o(0, ln), o(258, Fr) + }, function(e) { + dc = e, o(33, dc) + }, function(e) { + cc = e, o(34, cc) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + ji = e, o(62, ji) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + $n = e, o(2, $n) + })) + }, e => un(us, Ht = e.detail, Ht)] +} +class fm extends Fa { + constructor(e) { + super(), za(this, e, $m, pm, Qr, { + class: 229, + layout: 230, + stores: 231, + locale: 3, + id: 4, + util: 232, + utils: 233, + animations: 234, + disabled: 235, + status: 227, + previewUpscale: 236, + previewPad: 237, + previewMaskOpacity: 5, + previewImageDataMaxSize: 238, + previewImageTextPixelRatio: 6, + markupMaskOpacity: 7, + zoomMaskOpacity: 239, + elasticityMultiplier: 8, + willRevert: 240, + willProcessImage: 241, + willRenderCanvas: 9, + willRenderToolbar: 242, + willSetHistoryInitialState: 243, + enableButtonExport: 244, + enableButtonRevert: 245, + enableNavigateHistory: 246, + enableToolbar: 10, + enableUtils: 247, + enableButtonClose: 248, + enableDropImage: 249, + enablePasteImage: 250, + enableBrowseImage: 251, + enableTransparencyGrid: 11, + layoutDirectionPreference: 252, + layoutHorizontalUtilsPreference: 253, + layoutVerticalUtilsPreference: 254, + layoutVerticalToolbarPreference: 255, + layoutVerticalControlGroupsPreference: 256, + layoutVerticalControlTabsPreference: 257, + textDirection: 12, + markupEditorZoomLevel: 258, + markupEditorZoomLevels: 13, + markupEditorZoomAdjustStep: 14, + markupEditorZoomAdjustFactor: 15, + markupEditorZoomAdjustWheelFactor: 16, + markupEditorInteractionMode: 259, + muteAudio: 260, + willSetMediaInitialTimeOffset: 261, + enablePan: 17, + enableZoom: 18, + enableZoomControls: 262, + enableZoomInput: 19, + enablePanInput: 263, + enableCanvasAlpha: 20, + enablePanLimit: 21, + panLimitGutterScalar: 22, + zoomPresetOptions: 23, + zoomAdjustStep: 24, + zoomAdjustFactor: 25, + zoomAdjustWheelFactor: 26, + zoomLevel: 0, + hideTextInput: 264, + showTextInput: 265, + imagePreviewSrc: 266, + imageOrienter: 267, + pluginComponents: 268, + pluginOptions: 27, + sub: 269, + pluginInterface: 1, + root: 2, + play: 270, + pause: 271, + isPaused: 272, + togglePlayPause: 273, + mute: 274, + unmute: 275, + toggleMute: 276, + getDuration: 277, + getCurrentTime: 278, + setCurrentTime: 279, + imageSourceToImageData: 28, + imagePreview: 29, + imagePreviewCurrent: 228, + history: 30 + }, null, [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) + } + get class() { + return this.$$.ctx[229] + } + set class(e) { + this.$$set({ + class: e + }), pa() + } + get layout() { + return this.$$.ctx[230] + } + set layout(e) { + this.$$set({ + layout: e + }), pa() + } + get stores() { + return this.$$.ctx[231] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[3] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get id() { + return this.$$.ctx[4] + } + set id(e) { + this.$$set({ + id: e + }), pa() + } + get util() { + return this.$$.ctx[232] + } + set util(e) { + this.$$set({ + util: e + }), pa() + } + get utils() { + return this.$$.ctx[233] + } + set utils(e) { + this.$$set({ + utils: e + }), pa() + } + get animations() { + return this.$$.ctx[234] + } + set animations(e) { + this.$$set({ + animations: e + }), pa() + } + get disabled() { + return this.$$.ctx[235] + } + set disabled(e) { + this.$$set({ + disabled: e + }), pa() + } + get status() { + return this.$$.ctx[227] + } + set status(e) { + this.$$set({ + status: e + }), pa() + } + get previewUpscale() { + return this.$$.ctx[236] + } + set previewUpscale(e) { + this.$$set({ + previewUpscale: e + }), pa() + } + get previewPad() { + return this.$$.ctx[237] + } + set previewPad(e) { + this.$$set({ + previewPad: e + }), pa() + } + get previewMaskOpacity() { + return this.$$.ctx[5] + } + set previewMaskOpacity(e) { + this.$$set({ + previewMaskOpacity: e + }), pa() + } + get previewImageDataMaxSize() { + return this.$$.ctx[238] + } + set previewImageDataMaxSize(e) { + this.$$set({ + previewImageDataMaxSize: e + }), pa() + } + get previewImageTextPixelRatio() { + return this.$$.ctx[6] + } + set previewImageTextPixelRatio(e) { + this.$$set({ + previewImageTextPixelRatio: e + }), pa() + } + get markupMaskOpacity() { + return this.$$.ctx[7] + } + set markupMaskOpacity(e) { + this.$$set({ + markupMaskOpacity: e + }), pa() + } + get zoomMaskOpacity() { + return this.$$.ctx[239] + } + set zoomMaskOpacity(e) { + this.$$set({ + zoomMaskOpacity: e + }), pa() + } + get elasticityMultiplier() { + return this.$$.ctx[8] + } + set elasticityMultiplier(e) { + this.$$set({ + elasticityMultiplier: e + }), pa() + } + get willRevert() { + return this.$$.ctx[240] + } + set willRevert(e) { + this.$$set({ + willRevert: e + }), pa() + } + get willProcessImage() { + return this.$$.ctx[241] + } + set willProcessImage(e) { + this.$$set({ + willProcessImage: e + }), pa() + } + get willRenderCanvas() { + return this.$$.ctx[9] + } + set willRenderCanvas(e) { + this.$$set({ + willRenderCanvas: e + }), pa() + } + get willRenderToolbar() { + return this.$$.ctx[242] + } + set willRenderToolbar(e) { + this.$$set({ + willRenderToolbar: e + }), pa() + } + get willSetHistoryInitialState() { + return this.$$.ctx[243] + } + set willSetHistoryInitialState(e) { + this.$$set({ + willSetHistoryInitialState: e + }), pa() + } + get enableButtonExport() { + return this.$$.ctx[244] + } + set enableButtonExport(e) { + this.$$set({ + enableButtonExport: e + }), pa() + } + get enableButtonRevert() { + return this.$$.ctx[245] + } + set enableButtonRevert(e) { + this.$$set({ + enableButtonRevert: e + }), pa() + } + get enableNavigateHistory() { + return this.$$.ctx[246] + } + set enableNavigateHistory(e) { + this.$$set({ + enableNavigateHistory: e + }), pa() + } + get enableToolbar() { + return this.$$.ctx[10] + } + set enableToolbar(e) { + this.$$set({ + enableToolbar: e + }), pa() + } + get enableUtils() { + return this.$$.ctx[247] + } + set enableUtils(e) { + this.$$set({ + enableUtils: e + }), pa() + } + get enableButtonClose() { + return this.$$.ctx[248] + } + set enableButtonClose(e) { + this.$$set({ + enableButtonClose: e + }), pa() + } + get enableDropImage() { + return this.$$.ctx[249] + } + set enableDropImage(e) { + this.$$set({ + enableDropImage: e + }), pa() + } + get enablePasteImage() { + return this.$$.ctx[250] + } + set enablePasteImage(e) { + this.$$set({ + enablePasteImage: e + }), pa() + } + get enableBrowseImage() { + return this.$$.ctx[251] + } + set enableBrowseImage(e) { + this.$$set({ + enableBrowseImage: e + }), pa() + } + get enableTransparencyGrid() { + return this.$$.ctx[11] + } + set enableTransparencyGrid(e) { + this.$$set({ + enableTransparencyGrid: e + }), pa() + } + get layoutDirectionPreference() { + return this.$$.ctx[252] + } + set layoutDirectionPreference(e) { + this.$$set({ + layoutDirectionPreference: e + }), pa() + } + get layoutHorizontalUtilsPreference() { + return this.$$.ctx[253] + } + set layoutHorizontalUtilsPreference(e) { + this.$$set({ + layoutHorizontalUtilsPreference: e + }), pa() + } + get layoutVerticalUtilsPreference() { + return this.$$.ctx[254] + } + set layoutVerticalUtilsPreference(e) { + this.$$set({ + layoutVerticalUtilsPreference: e + }), pa() + } + get layoutVerticalToolbarPreference() { + return this.$$.ctx[255] + } + set layoutVerticalToolbarPreference(e) { + this.$$set({ + layoutVerticalToolbarPreference: e + }), pa() + } + get layoutVerticalControlGroupsPreference() { + return this.$$.ctx[256] + } + set layoutVerticalControlGroupsPreference(e) { + this.$$set({ + layoutVerticalControlGroupsPreference: e + }), pa() + } + get layoutVerticalControlTabsPreference() { + return this.$$.ctx[257] + } + set layoutVerticalControlTabsPreference(e) { + this.$$set({ + layoutVerticalControlTabsPreference: e + }), pa() + } + get textDirection() { + return this.$$.ctx[12] + } + set textDirection(e) { + this.$$set({ + textDirection: e + }), pa() + } + get markupEditorZoomLevel() { + return this.$$.ctx[258] + } + set markupEditorZoomLevel(e) { + this.$$set({ + markupEditorZoomLevel: e + }), pa() + } + get markupEditorZoomLevels() { + return this.$$.ctx[13] + } + set markupEditorZoomLevels(e) { + this.$$set({ + markupEditorZoomLevels: e + }), pa() + } + get markupEditorZoomAdjustStep() { + return this.$$.ctx[14] + } + set markupEditorZoomAdjustStep(e) { + this.$$set({ + markupEditorZoomAdjustStep: e + }), pa() + } + get markupEditorZoomAdjustFactor() { + return this.$$.ctx[15] + } + set markupEditorZoomAdjustFactor(e) { + this.$$set({ + markupEditorZoomAdjustFactor: e + }), pa() + } + get markupEditorZoomAdjustWheelFactor() { + return this.$$.ctx[16] + } + set markupEditorZoomAdjustWheelFactor(e) { + this.$$set({ + markupEditorZoomAdjustWheelFactor: e + }), pa() + } + get markupEditorInteractionMode() { + return this.$$.ctx[259] + } + set markupEditorInteractionMode(e) { + this.$$set({ + markupEditorInteractionMode: e + }), pa() + } + get muteAudio() { + return this.$$.ctx[260] + } + set muteAudio(e) { + this.$$set({ + muteAudio: e + }), pa() + } + get willSetMediaInitialTimeOffset() { + return this.$$.ctx[261] + } + set willSetMediaInitialTimeOffset(e) { + this.$$set({ + willSetMediaInitialTimeOffset: e + }), pa() + } + get enablePan() { + return this.$$.ctx[17] + } + set enablePan(e) { + this.$$set({ + enablePan: e + }), pa() + } + get enableZoom() { + return this.$$.ctx[18] + } + set enableZoom(e) { + this.$$set({ + enableZoom: e + }), pa() + } + get enableZoomControls() { + return this.$$.ctx[262] + } + set enableZoomControls(e) { + this.$$set({ + enableZoomControls: e + }), pa() + } + get enableZoomInput() { + return this.$$.ctx[19] + } + set enableZoomInput(e) { + this.$$set({ + enableZoomInput: e + }), pa() + } + get enablePanInput() { + return this.$$.ctx[263] + } + set enablePanInput(e) { + this.$$set({ + enablePanInput: e + }), pa() + } + get enableCanvasAlpha() { + return this.$$.ctx[20] + } + set enableCanvasAlpha(e) { + this.$$set({ + enableCanvasAlpha: e + }), pa() + } + get enablePanLimit() { + return this.$$.ctx[21] + } + set enablePanLimit(e) { + this.$$set({ + enablePanLimit: e + }), pa() + } + get panLimitGutterScalar() { + return this.$$.ctx[22] + } + set panLimitGutterScalar(e) { + this.$$set({ + panLimitGutterScalar: e + }), pa() + } + get zoomPresetOptions() { + return this.$$.ctx[23] + } + set zoomPresetOptions(e) { + this.$$set({ + zoomPresetOptions: e + }), pa() + } + get zoomAdjustStep() { + return this.$$.ctx[24] + } + set zoomAdjustStep(e) { + this.$$set({ + zoomAdjustStep: e + }), pa() + } + get zoomAdjustFactor() { + return this.$$.ctx[25] + } + set zoomAdjustFactor(e) { + this.$$set({ + zoomAdjustFactor: e + }), pa() + } + get zoomAdjustWheelFactor() { + return this.$$.ctx[26] + } + set zoomAdjustWheelFactor(e) { + this.$$set({ + zoomAdjustWheelFactor: e + }), pa() + } + get zoomLevel() { + return this.$$.ctx[0] + } + set zoomLevel(e) { + this.$$set({ + zoomLevel: e + }), pa() + } + get hideTextInput() { + return this.$$.ctx[264] + } + get showTextInput() { + return this.$$.ctx[265] + } + get imagePreviewSrc() { + return this.$$.ctx[266] + } + set imagePreviewSrc(e) { + this.$$set({ + imagePreviewSrc: e + }), pa() + } + get imageOrienter() { + return this.$$.ctx[267] + } + set imageOrienter(e) { + this.$$set({ + imageOrienter: e + }), pa() + } + get pluginComponents() { + return this.$$.ctx[268] + } + set pluginComponents(e) { + this.$$set({ + pluginComponents: e + }), pa() + } + get pluginOptions() { + return this.$$.ctx[27] + } + set pluginOptions(e) { + this.$$set({ + pluginOptions: e + }), pa() + } + get sub() { + return this.$$.ctx[269] + } + get pluginInterface() { + return this.$$.ctx[1] + } + get root() { + return this.$$.ctx[2] + } + set root(e) { + this.$$set({ + root: e + }), pa() + } + get play() { + return this.$$.ctx[270] + } + get pause() { + return this.$$.ctx[271] + } + get isPaused() { + return this.$$.ctx[272] + } + get togglePlayPause() { + return this.$$.ctx[273] + } + get mute() { + return this.$$.ctx[274] + } + get unmute() { + return this.$$.ctx[275] + } + get toggleMute() { + return this.$$.ctx[276] + } + get getDuration() { + return this.$$.ctx[277] + } + get getCurrentTime() { + return this.$$.ctx[278] + } + get setCurrentTime() { + return this.$$.ctx[279] + } + get imageSourceToImageData() { + return this.$$.ctx[28] + } + set imageSourceToImageData(e) { + this.$$set({ + imageSourceToImageData: e + }), pa() + } + get imagePreview() { + return this.$$.ctx[29] + } + get imagePreviewCurrent() { + return this.$$.ctx[228] + } + set imagePreviewCurrent(e) { + this.$$set({ + imagePreviewCurrent: e + }), pa() + } + get history() { + return this.$$.ctx[30] + } +} +"undefined" != typeof window && (e => { + if (e && e._clpdx4s) return; + const [t, o, i] = [ + [99, 111, 110, 115, 111, 108, 101], + [108, 111, 103], + [84, 104, 105, 115, 32, 118, 101, 114, 115, 105, 111, 110, 32, 111, 102, 32, 80, 105, 110, 116, 117, 114, 97, 32, 105, 115, 32, 102, 111, 114, 32, 116, 101, 115, 116, 105, 110, 103, 32, 112, 117, 114, 112, 111, 115, 101, 115, 32, 111, 110, 108, 121, 46, 32, 86, 105, 115, 105, 116, 32, 104, 116, 116, 112, 115, 58, 47, 47, 112, 113, 105, 110, 97, 46, 110, 108, 47, 112, 105, 110, 116, 117, 114, 97, 47, 32, 116, 111, 32, 112, 117, 114, 99, 104, 97, 115, 101, 32, 97, 32, 118, 97, 108, 105, 100, 32, 108, 105, 99, 101, 110, 115, 101, 46] + ].map((e => e.map((e => String.fromCharCode(e))).join(""))); + e && e[t] && e[t][o](i) +})(window); +const ym = ["klass", "stores", "isVisible", "isActive", "isActiveFraction", "locale"], + bm = ["history", "klass", "stores", "navButtons", "pluginComponents", "pluginInterface", "pluginOptions", "sub", "imagePreviewSrc", "imagePreview", "imagePreviewCurrent"], + xm = ["locale"]; +let vm; +const wm = new Set([]), + Sm = {}, + km = new Map, + Cm = (...e) => { + e.filter((e => !!e.util)).forEach((e => { + const [t, o, i = (() => !0)] = e.util; + km.has(t) || (km.set(t, { + Component: o, + isSupported: i + }), Xc(o).filter((e => !ym.includes(e))).forEach((e => { + wm.add(e), Sm[e] ? Sm[e].push(t) : Sm[e] = [t] + }))) + })) + }; +var Tm = [...$s, "init", "update", "undo", "redo", "revert", "writehistory", "destroy", "show", "hide", "close", "ready", "zoom", "pan", "loadpreview", "selectshape", "blurshape", "updateshape", "addshape", "removeshape", "selectstyle", "markuptap", "markupzoom", "markuppan", "selectutil", "selectcontrol", "selectiondown", "selectionup", "selectionchange"]; +var Mm = (e, t, o = {}) => { + const { + prefix: i = "pintura:" + } = o; + return Tm.map((o => e.on(o, (e => Dt(t) ? ((e, t, o) => e.dispatchEvent(new CustomEvent(t, { + detail: o, + bubbles: !0, + cancelable: !0 + })))(t, `${i}${o}`, e) : t(o, e))))) + }, + Rm = e => { + if (void 0 === e || Eo(e)) return e; + if (!T(e)) return !1; + const t = e; + if (!t.length) return; + const [o, i] = t.split(/\/|:/g).map((e => parseFloat(e.replace(/,/, ".")))).filter(Boolean); + return !!o && (i ? Math.abs(o / i) : o) + }; +const Pm = e => T(e[0]), + Em = e => !Pm(e), + Im = e => e[1], + Am = e => e[3] || []; + +function Lm(e, t, o, i) { + return Array.isArray(o) && (i = o, o = {}), [e, t, o || {}, i || []] +} +const zm = (e, t, o, i = (e => e)) => { + const r = Vm(t, o), + n = r.findIndex((e => Im(e) === t)); + var a, s, l; + a = r, s = i(n), l = e, a.splice(s, 0, l) + }, + Fm = (e, t, o) => zm(e, t, o), + Om = (e, t, o) => zm(e, t, o, (e => e + 1)), + Dm = (e, t) => { + if (Em(t)) return t.push(e); + t[3] = [...Am(t), e] + }, + Bm = (e, t) => { + const o = Vm(e, t); + return dd(o, (t => Im(t) === e)), o + }, + Wm = (e, t) => { + if (t && t.length) { + if (Pm(t)) { + if (Im(t) === e) return t; + const o = Wm(e, Am(t)); + if (o) return o + } + if (Em(t)) + for (const o of t) { + const t = Wm(e, o); + if (t) return t + } + } + }, + Vm = (e, t) => { + if (Em(t)) { + if (t.find((t => Im(t) === e))) return t; + const o = t.find((t => Vm(e, Am(t)))); + return o && o[3] + } + return Vm(e, Am(t)) + }, + _m = (e, t) => { + const [, , o] = e; + Object.assign(o, t) + }, + Nm = () => [.75, .25, .25, 0, 0, .25, .75, .25, 0, 0, .25, .25, .75, 0, 0, 0, 0, 0, 1, 0], + Hm = () => [1.398, -.316, .065, -.273, .201, -.051, 1.278, -.08, -.273, .201, -.051, .119, 1.151, -.29, .215, 0, 0, 0, 1, 0], + jm = () => [1.073, -.015, .092, -.115, -.017, .107, .859, .184, -.115, -.017, .015, .077, 1.104, -.115, -.017, 0, 0, 0, 1, 0], + Um = () => [1.06, 0, 0, 0, 0, 0, 1.01, 0, 0, 0, 0, 0, .93, 0, 0, 0, 0, 0, 1, 0], + Gm = () => [1.1, 0, 0, 0, -.1, 0, 1.1, 0, 0, -.1, 0, 0, 1.2, 0, -.1, 0, 0, 0, 1, 0], + Zm = () => [-1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0], + Xm = () => [.212, .715, .114, 0, 0, .212, .715, .114, 0, 0, .212, .715, .114, 0, 0, 0, 0, 0, 1, 0], + Ym = () => [.15, 1.3, -.25, .1, -.2, .15, 1.3, -.25, .1, -.2, .15, 1.3, -.25, .1, -.2, 0, 0, 0, 1, 0], + qm = () => [.163, .518, .084, -.01, .208, .163, .529, .082, -.02, .21, .171, .529, .084, 0, .214, 0, 0, 0, 1, 0], + Km = () => [.338, .991, .117, .093, -.196, .302, 1.049, .096, .078, -.196, .286, 1.016, .146, .101, -.196, 0, 0, 0, 1, 0], + Jm = () => [.393, .768, .188, 0, 0, .349, .685, .167, 0, 0, .272, .533, .13, 0, 0, 0, 0, 0, 1, 0], + Qm = () => [.289, .62, .185, 0, .077, .257, .566, .163, 0, .115, .2, .43, .128, 0, .188, 0, 0, 0, 1, 0], + eg = () => [.269, .764, .172, .05, .1, .239, .527, .152, 0, .176, .186, .4, .119, 0, .159, 0, 0, 0, 1, 0], + tg = () => [.547, .764, .134, 0, -.147, .281, .925, .12, 0, -.135, .225, .558, .33, 0, -.113, 0, 0, 0, 1, 0], + og = { + chrome: Hm, + fade: jm, + pastel: Nm, + cold: Gm, + warm: Um, + monoDefault: Xm, + monoWash: qm, + monoNoir: Ym, + monoStark: Km, + sepiaDefault: Jm, + sepiaRust: eg, + sepiaBlues: Qm, + sepiaColor: tg + }; +var ig = { + filterFunctions: og, + filterOptions: [ + ["Default", [ + [void 0, e => e.labelDefault] + ]], + ["Classic", [ + ["chrome", e => e.filterLabelChrome], + ["fade", e => e.filterLabelFade], + ["cold", e => e.filterLabelCold], + ["warm", e => e.filterLabelWarm], + ["pastel", e => e.filterLabelPastel] + ]], + ["Monochrome", [ + ["monoDefault", e => e.filterLabelMonoDefault], + ["monoNoir", e => e.filterLabelMonoNoir], + ["monoStark", e => e.filterLabelMonoStark], + ["monoWash", e => e.filterLabelMonoWash] + ]], + ["Sepia", [ + ["sepiaDefault", e => e.filterLabelSepiaDefault], + ["sepiaRust", e => e.filterLabelSepiaRust], + ["sepiaBlues", e => e.filterLabelSepiaBlues], + ["sepiaColor", e => e.filterLabelSepiaColor] + ]] + ] +}; +const rg = { + borderColor: "strokeColor", + borderWidth: "strokeWidth", + lineWidth: "strokeWidth", + fontColor: "color", + lineColor: "strokeColor", + src: "backgroundImage", + fit: "backgroundSize" + }, + ng = e => 0 === e || "0%" === e || "0px" === e ? 0 : /px$/.test(e) ? parseInt(e, 10) : /\%$/.test(e) ? e : e <= 1 ? 100 * e + "%" : void 0, + ag = (e, t) => { + let o, i; + return /%$/.test(e) ? (o = parseFloat(e), i = parseFloat(t), o + i + "%") : /px$/.test(e) ? (o = parseInt(e, 10), i = parseInt(t, 10), o + i + "px") : void 0 + }, + sg = (e, t) => { + const o = e, + i = t, + r = 1.5707963267948966 - t, + n = Math.sin(1.5707963267948966), + a = Math.sin(i), + s = Math.sin(r), + l = Math.cos(r), + c = o / n; + return ce(l * (c * a), l * (c * s)) + }, + lg = (e, { + flip: t, + aspectRatio: o, + rotation: i, + center: r, + zoom: n, + scaleToFit: a + }) => { + const s = { + flipX: !1, + flipY: !1 + }, + l = !r || r && .5 === r.x && .5 === r.y; + t && t.horizontal && (s.flipX = t.horizontal), t && t.vertical && (s.flipY = t.vertical); + const c = ((e, t) => null != t ? 1 / t : e.width / e.height)(e, o), + d = !(!1 === a), + u = ((e, t, o = 1) => { + const i = e.height / e.width, + r = t; + let n = 1, + a = i; + a > r && (a = r, n = a / i); + const s = Math.max(1 / n, r / a), + l = e.width / (o * s * n); + return { + width: l, + height: l * t + } + })(e, o, n), + h = l ? e : ((e, t) => { + const o = t.x > .5 ? 1 - t.x : t.x, + i = t.y > .5 ? 1 - t.y : t.y; + return De(2 * o * e.width, 2 * i * e.height) + })(e, d ? r : { + x: .5, + y: .5 + }), + p = ((e, t) => { + let o = e.width, + i = o * t; + i > e.height && (i = e.height, o = i / t); + const r = .5 * (e.width - o), + n = .5 * (e.height - i); + return it(r, n, o, i) + })(e, o); + if ((o || !l || n) && (s.crop = yt(Ke(h), c)), "number" == typeof i && null !== i && 0 !== i) { + null != i && (s.rotation = i); + const t = ((e, t) => { + const o = e.width, + i = e.height, + r = sg(o, t), + n = sg(i, t), + a = ce(e.x + Math.abs(r.x), e.y - Math.abs(r.y)), + s = ce(e.x + e.width + Math.abs(n.y), e.y + Math.abs(n.x)), + l = ce(e.x - Math.abs(n.y), e.y + e.height - Math.abs(n.x)); + return { + width: Te(a, s), + height: Te(a, l) + } + })(p, i), + o = Math.max(t.width / h.width, t.height / h.height), + n = ce(r.x * e.width, r.y * e.height), + a = Ot(e, i), + l = Ve(a), + c = ce(.5 * (a.width - e.width), .5 * (a.height - e.height)), + d = mt({ + x: c.x + n.x - u.width / o * .5, + y: c.y + n.y - u.height / o * .5, + width: u.width / o, + height: u.height / o + }, i), + m = Ee(d.map(ue), i, l.x, l.y), + g = rt(et(m)), + $ = Ee(m.map(ue), -2 * i, g.x, g.y); + s.crop = et($) + } else null != n && at(s.crop, 1 / n); + return d || (s.cropLimitToImage = !1), s + }; +var cg = (e, t, o = {}) => { + const i = {}; + if (!((e = {}) => { + if ("markup" in e || "color" in e || "filter" in e) return !0; + const { + crop: t + } = e; + return !(!t || !("flip" in t || "center" in t || "aspectRatio" in t || "rotation" in t)) + })(o)) return o; + if (o.crop && Object.assign(i, lg(t, o.crop)), o.markup) { + const e = Array.isArray(o.markup) ? o.markup : Object.values(o.markup); + i.decoration = e.map((e => ((e, t, o) => { + const i = Object.keys(o).reduce(((t, i) => { + let r = o[i]; + return i = rg[i] || i, /px$/.test(r) ? r = ng(r) : /^(?:x|y|left|right|top|bottom|width|height|fontSize|borderWidth|strokeWidth)$/.test(i) && "number" == typeof r && ("strokeWidth" !== i && "borderWidth" !== i && "fontSize" !== i || (r = Math.min(e.width, e.height) * r + "px"), r = ng(r)), /color/i.test(i) && r && (r = Dh(r)), null === r && (r = void 0), t[i] = r, t + }), {}); + if ("line" === t && (i.lineDecoration.length >= 1 && (i.lineEnd = "arrow"), 2 === i.lineDecoration.length && (i.lineStart = "arrow"), i.x1 = i.x, i.y1 = i.y, i.x2 = ag(i.x, i.width), i.y2 = ag(i.y, i.height), delete i.x, delete i.y, delete i.width, delete i.height, delete i.lineDecoration, delete i.lineStyle), "text" === t) { + if (!Eo(i.y)) { + const t = Math.min(e.width, e.height); + i.y = t * (parseFloat(i.y) / 100) + } + i.y = i.y - i.fontSize, delete i.width, delete i.height, delete i.borderStyle, i.lineHeight = i.lineHeight || "120%" + } + if ("ellipse" === t) { + let t, o; + if (/%$/.test(i.width)) { + t = parseFloat(i.width) / 100, o = parseFloat(i.height) / 100; + const r = t * e.width, + n = o * e.height; + t = r / e.width * 100, o = n / e.height * 100 + } else t = i.width, o = i.height; + i.rx = .5 * t, i.ry = .5 * o, /%$/.test(i.width) && (i.rx += "%", i.ry += "%"), i.x = ag(i.x, i.rx), i.y = ag(i.y, i.ry), delete i.width, delete i.height, delete i.borderStyle + } + if ("rect" === t && delete i.borderStyle, "path" === t) { + let e, t = []; + for (const o of i.points) e ? Ce(e, o) < 1e-9 || (t.push(o), e = o, e = o) : (t.push(o), e = o); + i.points = t.map((e => ({ + x: ng(e.x), + y: ng(e.y) + }))) + } + return i + })(i.crop || t, e[0], e[1]))) + } + if (o.color || o.colors) { + const e = o.color || o.colors; + Object.keys(e).filter((t => e[t])).map((t => [t, Array.isArray(e[t].matrix) ? e[t].matrix : Object.values(e[t].matrix)])).forEach((([e, t]) => { + i.colorMatrix || (i.colorMatrix = {}), i.colorMatrix[e] = t + })) + } + if (o.filter || o.filters) { + const t = o.filters || o.filter; + i.colorMatrix || (i.colorMatrix = {}); + const r = e ? e.filterFunctions : og; + i.colorMatrix.filter = "string" == typeof t && r[t] ? r[t]() : t.matrix + } + const r = o.size ? o.size : !!o.resize && o.resize.size; + return r && r.width && r.height && (i.targetSize = { + width: r.width, + height: r.height + }), i +}; +let dg = null; +var ug = () => (null === dg && (dg = c() && !("[object OperaMini]" === Object.prototype.toString.call(window.operamini)) && "visibilityState" in document && "Promise" in window && "File" in window && "URL" in window && "createObjectURL" in window.URL && "performance" in window), dg); +const hg = { + base: 0, + min: -.25, + max: .25, + getLabel: e => Op(e / .25), + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (e.brightness) return e.brightness[4] + }, + setValue: (e, t) => e.update((e => ({ + ...e, + brightness: [1, 0, 0, 0, t, 0, 1, 0, 0, t, 0, 0, 1, 0, t, 0, 0, 0, 1, 0] + }))) + }, + pg = { + base: 1, + min: .5, + max: 1.5, + getLabel: e => Op(2 * (e - .5) - 1), + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (e.contrast) return e.contrast[0] + }, + setValue: (e, t) => e.update((e => ({ + ...e, + contrast: [t, 0, 0, 0, .5 * (1 - t), 0, t, 0, 0, .5 * (1 - t), 0, 0, t, 0, .5 * (1 - t), 0, 0, 0, 1, 0] + }))) + }, + mg = { + base: 1, + min: 0, + max: 2, + getLabel: e => Op(e - 1), + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (e.saturation) return (e.saturation[0] - .213) / .787 + }, + setValue: (e, t) => e.update((e => ({ + ...e, + saturation: [.213 + .787 * t, .715 - .715 * t, .072 - .072 * t, 0, 0, .213 - .213 * t, .715 + .285 * t, .072 - .072 * t, 0, 0, .213 - .213 * t, .715 - .715 * t, .072 + .928 * t, 0, 0, 0, 0, 0, 1, 0] + }))) + }, + gg = { + base: 1, + min: .5, + max: 1.5, + getLabel: e => Op(2 * (e - .5) - 1), + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (e.exposure) return e.exposure[0] + }, + setValue: (e, t) => e.update((e => ({ + ...e, + exposure: [t, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, 1, 0] + }))) + }, + $g = { + base: 1, + min: .15, + max: 4, + getLabel: e => Op(e < 1 ? (e - .15) / .85 - 1 : (e - 1) / 3), + getStore: ({ + imageGamma: e + }) => e + }, + fg = { + base: 0, + min: -1, + max: 1, + getStore: ({ + imageVignette: e + }) => e + }, + yg = { + base: 0, + min: -1, + max: 1, + getStore: ({ + imageConvolutionMatrix: e + }) => e, + getValue: e => { + if (e.clarity) return 0 === e.clarity[0] ? e.clarity[1] / -1 : e.clarity[1] / -2 + }, + setValue: (e, t) => { + e.update((e => ({ + ...e, + clarity: t >= 0 ? [0, -1 * t, 0, -1 * t, 1 + 4 * t, -1 * t, 0, -1 * t, 0] : [-1 * t, -2 * t, -1 * t, -2 * t, 1 + -3 * t, -2 * t, -1 * t, -2 * t, -1 * t] + }))) + } + }, + bg = { + base: 0, + min: -1, + max: 1, + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (!e.temperature) return; + const t = e.temperature[0]; + return t >= 1 ? (t - 1) / .1 : (1 - t) / -.15 + }, + setValue: (e, t) => e.update((e => ({ + ...e, + temperature: t > 0 ? [1 + .1 * t, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1 + .1 * -t, 0, 0, 0, 0, 0, 1, 0] : [1 + .15 * t, 0, 0, 0, 0, 0, 1 + .05 * t, 0, 0, 0, 0, 0, 1 + .15 * -t, 0, 0, 0, 0, 0, 1, 0] + }))) + }; +var xg = { + finetuneControlConfiguration: { + gamma: $g, + brightness: hg, + contrast: pg, + saturation: mg, + exposure: gg, + temperature: bg, + clarity: yg, + vignette: fg + }, + finetuneOptions: [ + ["brightness", e => e.finetuneLabelBrightness], + ["contrast", e => e.finetuneLabelContrast], + ["saturation", e => e.finetuneLabelSaturation], + ["exposure", e => e.finetuneLabelExposure], + ["temperature", e => e.finetuneLabelTemperature], + ["gamma", e => e.finetuneLabelGamma], !vc() && ["clarity", e => e.finetuneLabelClarity], + ["vignette", e => e.finetuneLabelVignette] + ].filter(Boolean) +}; +const vg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "solid", + frameSize: "2.5%" + }, + thumb: '' + }, + wg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "solid", + frameSize: "2.5%", + frameRound: !0 + }, + thumb: '' + }, + Sg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "line", + frameInset: "2.5%", + frameSize: ".3125%", + frameRadius: 0 + }, + thumb: '
' + }, + kg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "line", + frameAmount: 2, + frameInset: "2.5%", + frameSize: ".3125%", + frameOffset: "1.25%", + frameRadius: 0 + }, + thumb: '
' + }, + Cg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "edge", + frameInset: "2.5%", + frameOffset: "5%", + frameSize: ".3125%" + }, + thumb: '
' + }, + Tg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "edge", + frameInset: "2.5%", + frameSize: ".3125%" + }, + thumb: '
' + }, + Mg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "edge", + frameOffset: "1.5%", + frameSize: ".3125%" + }, + thumb: '
' + }, + Rg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "hook", + frameInset: "2.5%", + frameSize: ".3125%", + frameLength: "5%" + }, + thumb: '
' + }, + Pg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "polaroid" + }, + thumb: '' + }; +var Eg = { + frameStyles: { + solidSharp: vg, + solidRound: wg, + lineSingle: Sg, + lineMultiple: kg, + edgeSeparate: Cg, + edgeCross: Tg, + edgeOverlap: Mg, + hook: Rg, + polaroid: Pg + }, + frameOptions: [ + [void 0, e => e.labelNone], + ["solidSharp", e => e.frameLabelMatSharp], + ["solidRound", e => e.frameLabelMatRound], + ["lineSingle", e => e.frameLabelLineSingle], + ["lineMultiple", e => e.frameLabelLineMultiple], + ["edgeCross", e => e.frameLabelEdgeCross], + ["edgeSeparate", e => e.frameLabelEdgeSeparate], + ["edgeOverlap", e => e.frameLabelEdgeOverlap], + ["hook", e => e.frameLabelCornerHooks], + ["polaroid", e => e.frameLabelPolaroid] + ] + }, + Ig = e => e.charAt(0).toUpperCase() + e.slice(1); +let Ag = null; +var Lg = () => { + if (null === Ag) + if (c()) try { + Ag = !1 === document.fonts.check("16px TestNonExistingFont") + } catch (e) { + Ag = !1 + } else Ag = !1; + return Ag +}; +const zg = (e, t) => o => o[t ? `${t}${Ig(e)}` : e], + Fg = e => [e, "" + e], + Og = (e, t) => o => [e[o], zg(o, t)], + Dg = e => Array.isArray(e) && e.every(Eo) ? e.map(Fg) : e, + Bg = [1, .2549, .2118], + Wg = [1, 1, 1, 0], + Vg = { + brush: ["path", { + bitmap: !0, + drawMode: "add", + strokeWidth: "5%", + cursorStyle: "ellipse", + cursorSize: "strokeWidth", + disableStyle: ["strokeColor"], + settings: { + strokeWidth: { + control: "brushSize" + } + } + }], + lassoo: ["path", { + drawMode: "add", + disableStyle: ["strokeWidth", "strokeColor"], + pathClose: !0 + }], + rectangle: ["rectangle", { + disableStyle: ["backgroundColor", "strokeWidth", "strokeColor", "cornerRadius"], + drawMode: "add" + }], + ellipse: ["ellipse", { + disableStyle: ["backgroundColor", "strokeWidth", "strokeColor"], + drawMode: "add" + }] + }, + _g = ["brush", "lassoo", "rectangle", "ellipse"], + Ng = (e, t) => { + const { + tools: o = _g + } = t || {}; + return o.reduce(((t, o) => { + const [i, r] = Vg[o], n = Zg(i, { + ...r, + action: e + }, { + position: "absolute", + isSelection: !0 + }); + return Object.assign(t, { + [`selection-${o}-${e}`]: n + }) + }), {}) + }, + Hg = (e, t) => { + const { + tools: o = _g, + hideLabel: i = !0 + } = t || {}; + return o.map((t => [`selection-${t}-${e}`, zg(t, "shapeLabelToolSelection"), { + hideLabel: i, + icon: zg(t, "shapeIconToolSelection") + }])) + }, + jg = e => { + const { + hideLabel: t = !0 + } = e || {}; + return R$(["new", "add", "subtract"].map((e => [e, zg(e, "shapeLabelSelectionMode"), { + icon: zg(e, "shapeIconSelectionMode"), + hideLabel: t + }])), { + title: e => e.shapeTitleSelectionMode, + layout: "radio" + }) + }, + Ug = e => M$(e, { + title: e => e.shapeTitleBrushSize, + layout: "radio", + optionHideLabel: !0, + optionIcon: (e, t) => `` + }), + Gg = { + eraser: () => ({ + eraseRadius: 8, + cursorStyle: "ellipse", + cursorSize: "eraseRadius" + }), + path: () => ({ + points: [] + }), + line: () => ({ + x1: 0, + y1: 0, + x2: 0, + y2: 0, + disableErase: !1 + }), + rectangle: () => ({ + x: 0, + y: 0, + width: 0, + height: 0 + }), + ellipse: () => ({ + x: 0, + y: 0, + rx: 0, + ry: 0 + }), + text: () => ({ + x: 0, + y: 0, + text: "Text" + }) + }, + Zg = (e, t = {}, o) => { + if (!Gg[e]) return; + const { + position: i = "relative", + inputMode: r = "drag", + isSelection: n = !1 + } = o || {}; + return [{ + ...Gg[e](), + ...t + }, { + position: i, + inputMode: r, + isSelection: n + }] + }, + Xg = e => ({ + sharpie: Zg("path", { + bitmap: !0, + strokeJoin: "round", + strokeCap: "round", + strokeWidth: "0.5%", + strokeColor: [...Bg], + cursorStyle: "ellipse", + cursorSize: "strokeWidth", + disableErase: !1, + disableResize: !0, + disableMove: !0 + }), + eraser: Zg("eraser"), + path: Zg("path", { + pathClose: void 0, + strokeWidth: "0.5%", + strokeColor: [...Bg], + backgroundColor: [0, 0, 0, 0] + }, { + inputMode: "step" + }), + line: Zg("line", { + strokeColor: [...Bg], + strokeWidth: "0.5%" + }), + arrow: Zg("line", { + lineStart: "none", + lineEnd: "arrow-solid", + strokeColor: [...Bg], + strokeWidth: "0.5%" + }), + rectangle: Zg("rectangle", { + strokeColor: [...Wg], + backgroundColor: [...Bg] + }), + ellipse: Zg("ellipse", { + strokeColor: [...Wg], + backgroundColor: [...Bg] + }), + text: Zg("text", { + color: [...Bg], + fontSize: "2%" + }), + ...e + }), + Yg = (e, t, o) => [e, t || zg(e, "shapeLabelTool"), { + icon: zg(e, "shapeIconTool"), + ...o + }], + qg = (e = ["move", "view", "sharpie", "eraser", "path", "line", "arrow", "rectangle", "ellipse", "text", "preset"]) => e.map((e => T(e) ? Yg(e) : Array.isArray(e) ? S(e[1]) ? Yg(e[0], void 0, e[1]) : Yg(e[0], e[1], e[2]) : void 0)).filter(Boolean), + Kg = () => ({ + transparent: [1, 1, 1, 0], + white: [1, 1, 1], + silver: [.8667, .8667, .8667], + gray: [.6667, .6667, .6667], + black: [0, 0, 0], + navy: [0, .1216, .2471], + blue: [0, .4549, .851], + aqua: [.498, .8588, 1], + teal: [.2235, .8, .8], + olive: [.2392, .6, .4392], + green: [.1804, .8, .251], + yellow: [1, .8627, 0], + orange: [1, .5216, .1059], + red: [1, .2549, .2118], + maroon: [.5216, .0784, .2941], + fuchsia: [.9412, .0706, .7451], + purple: [.6941, .051, .7882] + }), + Jg = () => [16, 18, 20, 24, 30, 36, 48, 64, 72, 96, 128, 144], + Qg = Jg, + e$ = () => ({ + extraSmall: "2%", + small: "4%", + mediumSmall: "8%", + medium: "10%", + mediumLarge: "15%", + large: "20%", + extraLarge: "25%" + }), + t$ = () => ({ + extraSmall: "40%", + small: "60%", + mediumSmall: "100%", + medium: "120%", + mediumLarge: "140%", + large: "180%", + extraLarge: "220%" + }), + o$ = () => [1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 32, 48, 64], + i$ = () => ({ + extraSmall: "0.25%", + small: "0.5%", + mediumSmall: "1%", + medium: "1.75%", + mediumLarge: "2.5%", + large: "3.5%", + extraLarge: "5%" + }), + r$ = () => ["bar", "arrow", "arrowSolid", "circle", "circleSolid", "square", "squareSolid"], + n$ = () => [ + ["Helvetica, Arial, Verdana, 'Droid Sans', sans-serif", "Sans Serif"], + ["'Arial Black', 'Avenir-Black', 'Arial Bold'", "Black"], + ["'Arial Narrow', 'Futura-CondensedMedium'", "Narrow"], + ["'Trebuchet MS'", "Humanist"], + ["Georgia, 'Avenir-Black', 'Times New Roman', 'Droid Serif', serif", "Serif"], + ["Palatino", "Old-Style"], + ["'Times New Roman', 'TimesNewRomanPSMT'", "Transitional"], + ["Menlo, Monaco, 'Lucida Console', monospace", "Monospaced"], + ["'Courier New', monospace", "Slab Serif"] + ], + a$ = () => ["left", "center", "right"], + s$ = () => [ + ["normal", "bold"], + ["italic", "normal"], + ["italic", "bold"] + ], + l$ = e => Object.keys(e).map(Og(e, "shapeTitleColor")), + c$ = e => e.map(Fg), + d$ = e => Object.keys(e).map(Og(e, "labelSize")), + u$ = e => e.map(Fg), + h$ = e => Object.keys(e).map(Og(e, "labelSize")), + p$ = e => e.map(Fg), + m$ = e => Object.keys(e).map(Og(e, "labelSize")), + g$ = e => [...e], + $$ = e => e.map((e => [e, t => t["shapeLabelFontStyle" + e.filter((e => "normal" !== e)).map(Ig).join("")]])), + f$ = e => e.map((e => [vp(e), t => t["shapeTitleLineDecoration" + Ig(e)], { + icon: t => t["shapeIconLineDecoration" + Ig(e)] + }])), + y$ = (e, t) => { + const { + defaultKey: o, + defaultValue: i, + defaultOptions: r + } = t || {}, n = []; + return o && (n[0] = [i, e => e[o], { + ...r + }]), [...n, ...e] + }, + b$ = e => e.split(",").map((e => e.trim())).some((e => document.fonts.check("16px " + e))), + x$ = (e = {}) => ["ToggleSlider", { + ...e + }], + v$ = (e, t = {}) => ["Dropdown", { + ...t, + options: e + }], + w$ = (e, t = { + defaultKey: "labelDefault" + }) => ["Dropdown", { + title: e => e.shapeTitleFontFamily, + onload: ({ + options: e = [] + }) => { + Lg() && e.map((([e]) => e)).filter(Boolean).filter((e => !b$(e))).forEach((e => { + const t = "PinturaFontTest-" + e.replace(/[^a-zA-Z0-9]+/g, "").toLowerCase(); + document.getElementById(t) || document.body.append(p("span", { + textContent: " ", + id: t, + class: "PinturaFontTest", + style: `font-family:${e};font-size:0;color:transparent;` + })) + })) + }, + ondestroy: () => { + if (!Lg()) return; + document.querySelectorAll(".PinturaFontTest").forEach((e => e.remove())) + }, + optionLabelStyle: e => "font-family: " + e, + options: y$(e, t), + optionFilter: e => { + if (!Lg()) return !0; + const [t] = e; + if (!t) return !0; + return b$(t) + } + }], + S$ = (e, t = {}) => ["ColorPicker", { + options: y$(e), + ...t + }], + k$ = (e, t = {}) => S$(e, { + title: e => e.labelColor, + ...t + }), + C$ = (e, t = {}) => S$(e, { + title: e => e.shapeTitleBackgroundColor, + ...t + }), + T$ = (e, t = {}) => S$(e, { + title: e => e.shapeTitleStrokeColor, + options: y$(e), + buttonClass: "PinturaColorPickerButtonStroke", + onchange: (e, o) => { + const i = o.strokeWidth; + (Eo(i) || T(i) ? parseFloat(i) : 0) > 0 || (o.strokeWidth = t && t.defaultStrokeWidth || "0.5%") + }, + ...t + }), + M$ = (e, t) => { + const { + title: o, + optionHideLabel: i = !1, + layout: r, + optionIcon: n = !1 + } = t || {}, a = Dg(e), s = e.map((([e]) => T(e) ? parseFloat(e) : e)), l = Math.max(...s), c = Math.min(...s), d = l - c; + return ["radio" === r ? "RadioGroup" : "Dropdown", { + title: !1 === o ? void 0 : o || (e => e.shapeTitleStrokeWidth), + options: e => { + const o = t ? a.map((e => { + const [t, o, r = {}] = e, a = T(t) ? parseFloat(t) : t, s = (a - c) / d; + let l = void 0; + return "line" === n ? l = `` : "dot" === n ? l = `` : T(n) ? l = n : M(n) && (l = n(a, s)), [t, o, { + icon: l, + hideLabel: i, + ...r + }] + })) : a; + return Ao(e, "backgroundColor") ? y$(o, { + defaultKey: "shapeLabelStrokeNone" + }) : y$(o) + }, + onchange: (e, t) => { + if (!e) return; + const o = t.strokeColor || []; + if (o[3]) return; + const i = [...o]; + i[3] = 1, t.strokeColor = i + } + }] + }, + R$ = (e, t) => { + const { + title: o, + layout: i + } = t || {}; + return ["radio" === i ? "RadioGroup" : "Dropdown", { + title: o, + options: y$(e) + }] + }, + P$ = (e, t, o) => ["Dropdown", { + title: e => e[t], + options: y$(e, { + defaultKey: "labelNone", + defaultOptions: { + icon: '' + } + }), + optionIconStyle: o + }], + E$ = e => P$(e, "shapeTitleLineStart", "transform: scaleX(-1)"), + I$ = e => P$(e, "shapeTitleLineEnd"), + A$ = e => S$(e, { + title: e => e.shapeTitleTextColor, + options: y$(e) + }), + L$ = e => ["Dropdown", { + title: e => e.shapeTitleFontStyle, + optionLabelStyle: e => e && `font-style:${e[0]};font-weight:${e[1]}`, + options: y$(e, { + defaultKey: "shapeLabelFontStyleNormal" + }) + }], + z$ = e => ["ShorthandControl", e], + F$ = (e, t, o, i) => { + i || e.find((([e]) => e === o)) || (i = { + defaultKey: "labelAuto", + defaultValue: o + }); + const r = Dg(e); + return ["Dropdown", { + title: t, + options: y$(r, i), + ...i + }] + }, + O$ = (e, t) => F$(e, (e => e.shapeTitleFontSize), "4%", t), + D$ = (e, t) => F$(e, (e => e.shapeTitleLineHeight), "120%", t), + B$ = e => ["RadioGroup", { + title: e => e.shapeTitleTextAlign, + options: y$(e) + }], + W$ = { + colorOptions: () => l$({ + transparent: [1, 1, 1, 0], + white: [1, 1, 1], + silver: [.8667, .8667, .8667], + gray: [.6667, .6667, .6667], + black: [0, 0, 0], + navy: [0, .1216, .2471], + blue: [0, .4549, .851], + aqua: [.498, .8588, 1], + teal: [.2235, .8, .8], + olive: [.2392, .6, .4392], + green: [.1804, .8, .251], + yellow: [1, .8627, 0], + orange: [1, .5216, .1059], + red: [1, .2549, .2118], + maroon: [.5216, .0784, .2941], + fuchsia: [.9412, .0706, .7451], + purple: [.6941, .051, .7882] + }), + lineEndStyleOptions: () => f$(["bar", "arrow", "arrowSolid", "circle", "circleSolid", "square", "squareSolid"]), + fontFamilyOptions: () => g$([ + ["Helvetica, Arial, Verdana, 'Droid Sans', sans-serif", "Sans Serif"], + ["'Arial Black', 'Avenir-Black', 'Arial Bold'", "Black"], + ["'Arial Narrow', 'Futura-CondensedMedium'", "Narrow"], + ["'Trebuchet MS'", "Humanist"], + ["Georgia, 'Avenir-Black', 'Times New Roman', 'Droid Serif', serif", "Serif"], + ["Palatino", "Old-Style"], + ["'Times New Roman', 'TimesNewRomanPSMT'", "Transitional"], + ["Menlo, Monaco, 'Lucida Console', monospace", "Monospaced"], + ["'Courier New', monospace", "Slab Serif"] + ]), + fontStyleOptions: () => $$([ + ["normal", "bold"], + ["italic", "normal"], + ["italic", "bold"] + ]), + textAlignOptions: () => ["left", "center", "right"].map((e => [e, t => t["shapeTitleTextAlign" + Ig(e)], { + hideLabel: !0, + icon: t => t["shapeIconTextAlign" + Ig(e)] + }])), + strokeWidthOptions: () => m$({ + extraSmall: "0.25%", + small: "0.5%", + mediumSmall: "1%", + medium: "1.75%", + mediumLarge: "2.5%", + large: "3.5%", + extraLarge: "5%" + }), + brushSizeOptions: () => m$(Object.entries({ + extraSmall: "0.25%", + small: "0.5%", + mediumSmall: "1%", + medium: "1.75%", + mediumLarge: "2.5%", + large: "3.5%", + extraLarge: "5%" + }).reduce(((e, [t, o]) => (e[t] = 2 * parseFloat(o) + "%", e)), {})), + fontSizeOptions: () => d$({ + extraSmall: "2%", + small: "4%", + mediumSmall: "8%", + medium: "10%", + mediumLarge: "15%", + large: "20%", + extraLarge: "25%" + }), + lineHeightOptions: () => h$({ + extraSmall: "40%", + small: "60%", + mediumSmall: "100%", + medium: "120%", + mediumLarge: "140%", + large: "180%", + extraLarge: "220%" + }) + }, + V$ = new Intl.NumberFormat("default", { + minimumFractionDigits: 1, + maximumFractionDigits: 1 + }), + _$ = (e, t) => T(t) ? e + "%" : e, + N$ = (e, t, o, i) => T(i) ? Math.round(e / o * 100) + "%" : "" + V$.format(e), + H$ = { + getValue: e => parseFloat(e), + setValue: _$, + label: N$, + step: .05, + labelClass: "PinturaPercentageLabel" + }, + j$ = { + factory: z$, + options: { + title: "Text shadow", + controls: [ + ["ToggleSlider", "x", { + ...H$, + min: -100, + max: 100, + labelPrefix: "X" + }], + ["ToggleSlider", "y", { + ...H$, + min: -100, + max: 100, + labelPrefix: "Y" + }], + ["ToggleSlider", "blur", { + ...H$, + min: 0, + max: 25, + labelPrefix: e => e.shapeTitleTextShadowBlur + }], + ["ColorPicker", "color", { + enablePresets: !1 + }] + ] + } + }, + U$ = { + defaultColor: { + factory: k$, + items: "colorOptions" + }, + defaultNumber: { + factory: x$ + }, + defaultPercentage: { + factory: x$, + options: { + getValue: e => parseFloat(e), + setValue: e => e + "%", + step: .05, + label: (e, t, o) => Math.round(e / o * 100) + "%", + labelClass: "PinturaPercentageLabel" + } + }, + backgroundColor: { + items: "colorOptions", + factory: C$ + }, + strokeColor: { + items: "colorOptions", + factory: T$ + }, + strokeWidth: { + items: "strokeWidthOptions", + factory: M$ + }, + brushSize: { + items: "brushSizeOptions", + factory: Ug + }, + drawMode: { + factory: jg + }, + lineStart: { + items: "lineEndStyleOptions", + factory: E$ + }, + lineEnd: { + items: "lineEndStyleOptions", + factory: I$ + }, + color: { + items: "colorOptions", + factory: A$ + }, + fontFamily: { + items: "fontFamilyOptions", + factory: w$ + }, + fontStyle_fontWeight: { + items: "fontStyleOptions", + factory: L$ + }, + fontSize: { + items: "fontSizeOptions", + factory: O$ + }, + lineHeight: { + items: "lineHeightOptions", + factory: D$ + }, + textAlign: { + items: "textAlignOptions", + factory: B$ + }, + textShadowX_textShadowY_textShadowBlur_textShadowColor: j$, + textOutlineWidth_textOutlineColor: { + factory: z$, + options: { + title: "Text outline", + controls: [ + ["ToggleSlider", "width", { + getValue: e => parseFloat(e), + setValue: _$, + label: N$, + min: 0, + max: 15, + step: .05, + labelClass: "PinturaPercentageLabel", + labelPrefix: e => e.shapeTitleTextOutlineWidth + }], + ["ColorPicker", "color", { + enablePresets: !1 + }] + ] + } + }, + cornerRadius: { + factory: "defaultPercentage", + options: { + min: 0, + max: 50, + title: e => e.shapeTitleCornerRadius + } + }, + frameColor: { + factory: "defaultColor" + }, + frameSize: { + factory: "defaultPercentage", + options: { + min: .2, + max: 10, + title: e => e.labelSize + } + }, + frameInset: { + factory: "defaultPercentage", + options: { + min: .5, + max: 10, + title: e => e.labelOffset + } + }, + frameOffset: { + factory: "defaultPercentage", + options: { + min: .5, + max: 10, + title: e => e.labelOffset + } + }, + frameRadius: { + factory: "defaultPercentage", + options: { + min: .5, + max: 10, + title: e => e.labelRadius + } + }, + frameAmount: { + factory: "defaultNumber", + options: { + min: 1, + max: 5, + step: 1, + title: e => e.labelAmount + } + } + }, + G$ = (e = {}) => { + const t = { + ...U$, + ...e + }, + o = {}; + return Object.entries(t).forEach((([e, i]) => { + if (!/Options$/.test(e)) + if (U$[e] && S(i) && !Lo(i)) { + const { + component: i, + factory: r, + items: n, + options: a = {} + } = t[e]; + if (T(r)) o[e] = [r, a]; + else { + const s = U$[e].items; + let l = T(s) ? t[s] || W$[s]() : void 0; + T(n) && W$[n] ? l = t[n] ? t[n].every((e => !Array.isArray(e))) ? t[n].map((e => [e, e])) : t[n] : W$[n]() : (n || a.items) && (l = n || a.items); + let c = r || U$[e].factory; + M(c) ? o[e] = l ? c(l, a) : c(a) : i && (o[e] = [i, { + ...a, + items: n + }]) + } + } else o[e] = i + })), o + }; + +function Z$(e) { + let t, o, i, r, n; + const a = e[7].default, + s = rn(a, e, e[6], null); + return { + c() { + t = kn("div"), o = kn("div"), s && s.c(), An(o, "class", "PinturaToolbarInner"), An(t, "class", "PinturaToolbar"), An(t, "data-layout", e[1]), An(t, "data-overflow", e[0]) + }, + m(a, l) { + wn(a, t, l), bn(t, o), s && s.m(o, null), i = !0, r || (n = [Pn(o, "measure", e[3]), hn($c.call(null, o)), Pn(t, "measure", e[2]), hn($c.call(null, t))], r = !0) + }, + p(e, [o]) { + s && s.p && (!i || 64 & o) && sn(s, a, e, e[6], i ? an(a, e[6], o, null) : ln(e[6]), null), (!i || 2 & o) && An(t, "data-layout", e[1]), (!i || 1 & o) && An(t, "data-overflow", e[0]) + }, + i(e) { + i || (xa(s, e), i = !0) + }, + o(e) { + va(s, e), i = !1 + }, + d(e) { + e && Sn(t), s && s.d(e), r = !1, Kr(n) + } + } +} + +function X$(e, t, o) { + let i, r, { + $$slots: n = {}, + $$scope: a + } = t, + s = 0, + l = 0, + c = 0; + const d = () => { + o(0, r = "compact" === i && s > c ? "overflow" : void 0) + }; + return e.$$set = e => { + "$$scope" in e && o(6, a = e.$$scope) + }, e.$$.update = () => { + 48 & e.$$.dirty && o(1, i = l > c ? "compact" : "default") + }, [r, i, ({ + detail: e + }) => { + const { + width: t + } = e; + o(5, c = t), d() + }, ({ + detail: e + }) => { + const { + width: t + } = e; + t > l && o(4, l = t), s = t, r || d() + }, l, c, a, n] +} +class Y$ extends Fa { + constructor(e) { + super(), za(this, e, X$, Z$, Qr, {}) + } +} + +function q$(e) { + let t, o, i, r; + const n = e[5].default, + a = rn(n, e, e[4], null); + return { + c() { + t = kn("div"), a && a.c(), An(t, "class", e[0]) + }, + m(n, s) { + wn(n, t, s), a && a.m(t, null), o = !0, i || (r = [Pn(t, "measure", (function() { + Jr(e[1] && e[3]) && (e[1] && e[3]).apply(this, arguments) + })), hn(e[2].call(null, t))], i = !0) + }, + p(i, [r]) { + e = i, a && a.p && (!o || 16 & r) && sn(a, n, e, e[4], o ? an(n, e[4], r, null) : ln(e[4]), null), (!o || 1 & r) && An(t, "class", e[0]) + }, + i(e) { + o || (xa(a, e), o = !0) + }, + o(e) { + va(a, e), o = !1 + }, + d(e) { + e && Sn(t), a && a.d(e), i = !1, Kr(r) + } + } +} + +function K$(e, t, o) { + let { + $$slots: i = {}, + $$scope: r + } = t; + const n = qn(); + let { + class: a = null + } = t; + const s = Jn("measurable"); + let l = !1; + return Zn((() => o(1, l = !0))), e.$$set = e => { + "class" in e && o(0, a = e.class), "$$scope" in e && o(4, r = e.$$scope) + }, [a, l, s, ({ + detail: e + }) => n("measure", e), r, i] +} +class J$ extends Fa { + constructor(e) { + super(), za(this, e, K$, q$, Qr, { + class: 0 + }) + } +} +const Q$ = e => ({}), + ef = e => ({}), + tf = e => ({}), + of = e => ({}), + rf = e => ({}), + nf = e => ({}); + +function af(e) { + let t, o; + const i = e[4].header, + r = rn(i, e, e[3], nf); + return { + c() { + t = kn("div"), r && r.c(), An(t, "class", "PinturaUtilHeader") + }, + m(e, i) { + wn(e, t, i), r && r.m(t, null), o = !0 + }, + p(e, t) { + r && r.p && (!o || 8 & t) && sn(r, i, e, e[3], o ? an(i, e[3], t, rf) : ln(e[3]), nf) + }, + i(e) { + o || (xa(r, e), o = !0) + }, + o(e) { + va(r, e), o = !1 + }, + d(e) { + e && Sn(t), r && r.d(e) + } + } +} + +function sf(e) { + let t, o; + const i = e[4].footer, + r = rn(i, e, e[3], ef); + return { + c() { + t = kn("div"), r && r.c(), An(t, "class", "PinturaUtilFooter") + }, + m(e, i) { + wn(e, t, i), r && r.m(t, null), o = !0 + }, + p(e, t) { + r && r.p && (!o || 8 & t) && sn(r, i, e, e[3], o ? an(i, e[3], t, Q$) : ln(e[3]), ef) + }, + i(e) { + o || (xa(r, e), o = !0) + }, + o(e) { + va(r, e), o = !1 + }, + d(e) { + e && Sn(t), r && r.d(e) + } + } +} + +function lf(e) { + let t, o, i, r, n, a, s = e[1] && af(e); + const l = e[4].main, + c = rn(l, e, e[3], of), + d = c || function(e) { + let t, o; + return t = new J$({ + props: { + class: "PinturaStage" + } + }), t.$on("measure", e[5]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p: Gr, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } + }(e); + let u = e[2] && sf(e); + return { + c() { + s && s.c(), t = Mn(), o = kn("div"), d && d.c(), i = Mn(), u && u.c(), r = Mn(), n = Rn(), An(o, "class", "PinturaUtilMain") + }, + m(l, c) { + s && s.m(l, c), wn(l, t, c), wn(l, o, c), d && d.m(o, null), e[6](o), wn(l, i, c), u && u.m(l, c), wn(l, r, c), wn(l, n, c), a = !0 + }, + p(e, [o]) { + e[1] ? s ? (s.p(e, o), 2 & o && xa(s, 1)) : (s = af(e), s.c(), xa(s, 1), s.m(t.parentNode, t)) : s && (ya(), va(s, 1, 1, (() => { + s = null + })), ba()), c && c.p && (!a || 8 & o) && sn(c, l, e, e[3], a ? an(l, e[3], o, tf) : ln(e[3]), of), e[2] ? u ? (u.p(e, o), 4 & o && xa(u, 1)) : (u = sf(e), u.c(), xa(u, 1), u.m(r.parentNode, r)) : u && (ya(), va(u, 1, 1, (() => { + u = null + })), ba()) + }, + i(e) { + a || (xa(s), xa(d, e), xa(u), xa(false), a = !0) + }, + o(e) { + va(s), va(d, e), va(u), va(false), a = !1 + }, + d(a) { + s && s.d(a), a && Sn(t), a && Sn(o), d && d.d(a), e[6](null), a && Sn(i), u && u.d(a), a && Sn(r), a && Sn(n) + } + } +} + +function cf(e, t, o) { + let { + $$slots: i = {}, + $$scope: r + } = t, { + hasHeader: n = !!t.$$slots.header + } = t, { + hasFooter: a = !!t.$$slots.footer + } = t, { + root: s + } = t; + return e.$$set = e => { + o(7, t = Xr(Xr({}, t), cn(e))), "hasHeader" in e && o(1, n = e.hasHeader), "hasFooter" in e && o(2, a = e.hasFooter), "root" in e && o(0, s = e.root), "$$scope" in e && o(3, r = e.$$scope) + }, t = cn(t), [s, n, a, r, i, function(t) { + Qn.call(this, e, t) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + s = e, o(0, s) + })) + }] +} +class df extends Fa { + constructor(e) { + super(), za(this, e, cf, lf, Qr, { + hasHeader: 1, + hasFooter: 2, + root: 0 + }) + } +} + +function uf(e) { + let t, o; + return { + c() { + t = kn("div"), An(t, "class", "PinturaRangeInputMeter"), An(t, "style", o = `transform: translateX(${e[9].x-e[11].x}px) translateY(${e[9].y-e[11].y}px)`) + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[7] + }, + p(e, i) { + 128 & i[0] && (t.innerHTML = e[7]), 512 & i[0] && o !== (o = `transform: translateX(${e[9].x-e[11].x}px) translateY(${e[9].y-e[11].y}px)`) && An(t, "style", o) + }, + d(e) { + e && Sn(t) + } + } +} + +function hf(e) { + let t, o, i, r, n, a, s, l, c, d, u, h = e[9] && uf(e); + return { + c() { + t = kn("div"), o = kn("span"), i = Mn(), r = kn("button"), n = Tn(e[1]), s = Mn(), l = kn("div"), h && h.c(), An(o, "class", "PinturaRangeInputValue"), An(r, "class", "PinturaRangeInputReset"), An(r, "type", "button"), r.disabled = a = e[0] === e[2], An(l, "class", "PinturaRangeInputInner"), An(l, "style", e[8]), An(l, "data-value-limited", e[5]), An(t, "class", "PinturaRangeInput"), An(t, "tabindex", "0") + }, + m(a, p) { + wn(a, t, p), bn(t, o), o.innerHTML = e[3], bn(t, i), bn(t, r), bn(r, n), bn(t, s), bn(t, l), h && h.m(l, null), d || (u = [Pn(r, "click", e[16]), Pn(l, "interactionstart", e[12]), Pn(l, "interactionupdate", e[14]), Pn(l, "interactionend", e[15]), Pn(l, "interactionrelease", e[13]), hn(c = hd.call(null, l, { + inertia: e[6] + })), Pn(l, "measure", e[36]), hn($c.call(null, l)), Pn(t, "wheel", e[18], { + passive: !1 + }), Pn(t, "nudge", e[19]), hn(pd.call(null, t, { + direction: "horizontal", + preventDefault: !0 + }))], d = !0) + }, + p(e, t) { + 8 & t[0] && (o.innerHTML = e[3]), 2 & t[0] && Fn(n, e[1]), 5 & t[0] && a !== (a = e[0] === e[2]) && (r.disabled = a), e[9] ? h ? h.p(e, t) : (h = uf(e), h.c(), h.m(l, null)) : h && (h.d(1), h = null), 256 & t[0] && An(l, "style", e[8]), 32 & t[0] && An(l, "data-value-limited", e[5]), c && Jr(c.update) && 64 & t[0] && c.update.call(null, { + inertia: e[6] + }) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t), h && h.d(), d = !1, Kr(u) + } + } +} + +function pf(e, t, o) { + let i, n, a, s, l, c, d, u, h, { + labelReset: p = "Reset" + } = t, + { + direction: m = "x" + } = t, + { + min: g = 0 + } = t, + { + max: $ = 1 + } = t, + { + base: f = g + } = t, + { + value: y = 0 + } = t, + { + valueLabel: b = 0 + } = t, + { + valueMin: x + } = t, + { + valueMax: v + } = t, + { + oninputstart: w = r + } = t, + { + oninputmove: S = r + } = t, + { + oninputend: k = r + } = t, + { + elasticity: C = 0 + } = t, + { + nudgeMultiplier: T + } = t, + { + step: M = 8 + } = t; + const R = Jn("isAnimated"); + on(e, R, (e => o(6, u = e))); + const P = (e, t, o) => Math.ceil((e - o) / t) * t + o; + let E, I, A; + const L = { + x: 2, + y: 0 + }, + z = (e, t, o) => `M ${e-o} ${t} a ${o} ${o} 0 1 0 0 -1`; + let F, O = void 0, + D = !1, + B = { + snap: !1, + elastic: !1 + }; + const W = (e, t, o) => { + const i = e[m] + t[m], + r = rs(i, F[1][m], F[0][m]), + n = C ? r + md(i - r, C) : r, + a = o.elastic ? n : r, + s = ce(0, 0); + return s[m] = a, V.set(s, { + hard: o.snap + }), rs(N(s, m), g, $) + }, + V = ec(); + on(e, V, (e => o(9, h = e))); + const _ = (e, t) => { + const o = .5 * (E[t] - s[t]) - (hh(e, g, $) * s[t] - .5 * s[t]); + return { + x: "x" === t ? o : 0, + y: "y" === t ? o : 0 + } + }, + N = (e, t) => { + const o = -(e[t] - .5 * E[t]) / s[t]; + return g + o * i + }, + H = V.subscribe((e => { + e && O && S(rs(N(e, m), g, $)) + })), + j = e => { + const t = [_(null != x ? x : g, m), _(null != v ? v : $, m)], + o = { + x: "x" === m ? h.x + e : 0, + y: "y" === m ? h.y + e : 0 + }, + i = rs(o[m], t[1][m], t[0][m]), + r = { + ...h, + [m]: i + }; + un(V, h = r, h); + const n = rs(N(r, m), g, $); + w(), S(n), k(n) + }; + Yn((() => { + H() + })); + return e.$$set = e => { + "labelReset" in e && o(1, p = e.labelReset), "direction" in e && o(20, m = e.direction), "min" in e && o(21, g = e.min), "max" in e && o(22, $ = e.max), "base" in e && o(2, f = e.base), "value" in e && o(0, y = e.value), "valueLabel" in e && o(3, b = e.valueLabel), "valueMin" in e && o(23, x = e.valueMin), "valueMax" in e && o(24, v = e.valueMax), "oninputstart" in e && o(25, w = e.oninputstart), "oninputmove" in e && o(26, S = e.oninputmove), "oninputend" in e && o(27, k = e.oninputend), "elasticity" in e && o(28, C = e.elasticity), "nudgeMultiplier" in e && o(29, T = e.nudgeMultiplier), "step" in e && o(30, M = e.step) + }, e.$$.update = () => { + if (6291456 & e.$$.dirty[0] && o(32, i = $ - g), 10485760 & e.$$.dirty[0] && o(34, n = null != x ? Math.max(x, g) : g), 20971520 & e.$$.dirty[0] && o(33, a = null != v ? Math.min(v, $) : $), 6291460 & e.$$.dirty[0] && o(35, l = hh(f, g, $)), 16 & e.$$.dirty[0] | 16 & e.$$.dirty[1] && E) { + const e = .5 * E.y; + let t, i = 40 * l, + r = "", + n = E.y, + a = ""; + for (let o = 0; o <= 40; o++) { + const n = L.x + 10 * o, + s = e; + r += z(n, s, o % 5 == 0 ? 2 : .75) + " ", t = n + L.x, o === i && (a = ``) + } + o(7, I = ``), o(31, A = { + x: t - 2 * L.x, + y: n + }) + } + 16 & e.$$.dirty[0] | 1 & e.$$.dirty[1] && (s = E && A), 6291456 & e.$$.dirty[0] | 12 & e.$$.dirty[1] && o(5, c = n !== g || a !== $), 32 & e.$$.dirty[0] | 12 & e.$$.dirty[1] && o(8, d = c ? function(e, t) { + const o = 1 / 40, + i = hh(e, g, $), + r = hh(t, g, $); + return `--range-mask-from:${100*ne(P(i,o,0)-.0125)}%;--range-mask-to:${100*ne(P(r,o,0)-.0125)}%` + }(n, a) : ""), 1048657 & e.$$.dirty[0] | 2 & e.$$.dirty[1] && i && E && E.x && E.y && V.set(_(y, m), { + hard: !1 === u + }) + }, [y, p, f, b, E, c, u, I, d, h, R, L, () => { + D = !1, O = tn(V), F = [_(null != x ? x : g, m), _(null != v ? v : $, m)], w() + }, () => { + D = !0 + }, ({ + detail: e + }) => { + B.snap = !D, B.elastic = !D, W(O, e.translation, B) + }, ({ + detail: e + }) => { + B.snap = !1, B.elastic = !1; + const t = W(O, e.translation, B); + if (O = void 0, F = void 0, Math.abs(t - f) < .01) return k(f); + k(t) + }, () => { + o(0, y = rs(f, n, a)), w(), k(y) + }, V, e => { + e.preventDefault(), e.stopPropagation(); + const t = yd(e) * M; + j(t) + }, ({ + detail: e + }) => { + j(e[m] * Math.abs(T || 8)) + }, m, g, $, x, v, w, S, k, C, T, M, A, i, a, n, l, e => o(4, E = (e => ce(e.width, e.height))(e.detail))] +} +class mf extends Fa { + constructor(e) { + super(), za(this, e, pf, hf, Qr, { + labelReset: 1, + direction: 20, + min: 21, + max: 22, + base: 2, + value: 0, + valueLabel: 3, + valueMin: 23, + valueMax: 24, + oninputstart: 25, + oninputmove: 26, + oninputend: 27, + elasticity: 28, + nudgeMultiplier: 29, + step: 30 + }, null, [-1, -1]) + } +} +var gf = { + [q]: e => ({ + x: e.x, + y: e.y + }), + [te]: e => ({ + x: e.x + e.width, + y: e.y + }), + [K]: e => ({ + x: e.x + e.width, + y: e.y + }), + [oe]: e => ({ + x: e.x + e.width, + y: e.y + e.height + }), + [J]: e => ({ + x: e.x, + y: e.y + e.height + }), + [ie]: e => ({ + x: e.x, + y: e.y + e.height + }), + [Q]: e => ({ + x: e.x, + y: e.y + }), + [ee]: e => ({ + x: e.x, + y: e.y + }) +}; + +function $f(e, t, o) { + const i = e.slice(); + return i[14] = t[o].key, i[15] = t[o].translate, i[16] = t[o].scale, i[17] = t[o].type, i[18] = t[o].opacity, i +} + +function ff(e, t) { + let o, i, r, n, a, s, l, c; + return { + key: e, + first: null, + c() { + o = kn("div"), An(o, "role", "button"), An(o, "aria-label", i = `Drag ${t[17]} ${t[14]}`), An(o, "tabindex", r = "edge" === t[17] ? -1 : 0), An(o, "class", "PinturaRectManipulator"), An(o, "data-direction", n = t[14]), An(o, "data-shape", a = "" + ("edge" === t[17] ? "edge" : "" + t[0])), An(o, "style", s = `--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`), this.first = o + }, + m(e, i) { + wn(e, o, i), l || (c = [Pn(o, "nudge", (function() { + Jr(t[6](t[14])) && t[6](t[14]).apply(this, arguments) + })), hn(pd.call(null, o, { + preventDefault: !0 + })), Pn(o, "interactionstart", (function() { + Jr(t[5]("resizestart", t[14])) && t[5]("resizestart", t[14]).apply(this, arguments) + })), Pn(o, "interactionupdate", (function() { + Jr(t[5]("resizemove", t[14])) && t[5]("resizemove", t[14]).apply(this, arguments) + })), Pn(o, "interactionend", (function() { + Jr(t[5]("resizeend", t[14])) && t[5]("resizeend", t[14]).apply(this, arguments) + })), hn(hd.call(null, o))], l = !0) + }, + p(e, l) { + t = e, 2 & l && i !== (i = `Drag ${t[17]} ${t[14]}`) && An(o, "aria-label", i), 2 & l && r !== (r = "edge" === t[17] ? -1 : 0) && An(o, "tabindex", r), 2 & l && n !== (n = t[14]) && An(o, "data-direction", n), 3 & l && a !== (a = "" + ("edge" === t[17] ? "edge" : "" + t[0])) && An(o, "data-shape", a), 2 & l && s !== (s = `--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`) && An(o, "style", s) + }, + d(e) { + e && Sn(o), l = !1, Kr(c) + } + } +} + +function yf(e) { + let t, o = [], + i = new Map, + r = e[1]; + const n = e => e[14]; + for (let t = 0; t < r.length; t += 1) { + let a = $f(e, r, t), + s = n(a); + i.set(s, o[t] = ff(s, a)) + } + return { + c() { + for (let e = 0; e < o.length; e += 1) o[e].c(); + t = Rn() + }, + m(e, i) { + for (let t = 0; t < o.length; t += 1) o[t].m(e, i); + wn(e, t, i) + }, + p(e, [a]) { + 99 & a && (r = e[1], o = Ma(o, a, n, 1, e, r, i, t.parentNode, Ca, ff, t, $f)) + }, + i: Gr, + o: Gr, + d(e) { + for (let t = 0; t < o.length; t += 1) o[t].d(e); + e && Sn(t) + } + } +} + +function bf(e, t, o) { + let i, r, n, a, { + rect: s = null + } = t, + { + visible: l = !1 + } = t, + { + style: c + } = t; + const d = Jn("isAnimated"); + on(e, d, (e => o(11, a = e))); + const u = ec(void 0, { + precision: 1e-4, + stiffness: .2, + damping: .4 + }); + on(e, u, (e => o(10, n = e))); + const h = ec(0, { + precision: .001 + }); + let p; + on(e, h, (e => o(9, r = e))); + const m = qn(); + return e.$$set = e => { + "rect" in e && o(7, s = e.rect), "visible" in e && o(8, l = e.visible), "style" in e && o(0, c = e.style) + }, e.$$.update = () => { + 2304 & e.$$.dirty && u.set(l ? 1 : .5, { + hard: !1 === a + }), 2304 & e.$$.dirty && h.set(l ? 1 : 0, { + hard: !1 === a + }), 1664 & e.$$.dirty && o(1, i = Object.keys(Y).map(((e, t) => { + const o = Y[e], + i = gf[o](s), + a = 1 === o.length ? "edge" : "corner", + l = "corner" === a; + return { + key: o, + type: a, + scale: { + x: /^(t|b)$/.test(o) ? s.width : l ? rs(n, .5, 1.25) : 1, + y: /^(r|l)$/.test(o) ? s.height : l ? rs(n, .5, 1.25) : 1 + }, + translate: { + x: i.x, + y: i.y + }, + opacity: r + } + }))) + }, [c, i, d, u, h, (e, t) => ({ + detail: o + }) => { + p && t !== p || "resizestart" !== e && void 0 === p || ("resizestart" === e && (p = t), "resizeend" === e && (p = void 0), m(e, { + direction: t, + translation: o && o.translation + })) + }, e => ({ + detail: t + }) => { + m("resizestart", { + direction: e, + translation: { + x: 0, + y: 0 + } + }), m("resizemove", { + direction: e, + translation: t + }), m("resizeend", { + direction: e, + translation: { + x: 0, + y: 0 + } + }) + }, s, l, r, n, a] +} +class xf extends Fa { + constructor(e) { + super(), za(this, e, bf, yf, Qr, { + rect: 7, + visible: 8, + style: 0 + }) + } +} +var vf = e => { + function t(t, o) { + e.dispatchEvent(new CustomEvent(t, { + detail: o + })) + } + const o = o => { + o.preventDefault(), e.addEventListener("gesturechange", i), e.addEventListener("gestureend", r), t("gesturedown") + }, + i = e => { + e.preventDefault(), t("gestureupdate", e.scale) + }, + r = e => { + t("gestureup", e.scale), e.preventDefault(), n() + }, + n = () => { + e.removeEventListener("gesturechange", i), e.removeEventListener("gestureend", r) + }; + return e.addEventListener("gesturestart", o), { + destroy: () => { + n(), e.removeEventListener("gesturestart", o) + } + } + }, + wf = { + [q]: J, + [K]: Q, + [J]: q, + [Q]: K, + [ee]: oe, + [te]: ie, + [oe]: ee, + [ie]: te + }, + Sf = e => { + const t = e === Q || e === K, + o = e === q || e === J; + return [e === K || e === te || e === oe, e === Q || e === ie || e === ee, e === q || e === te || e === ee, e === J || e === oe || e === ie, t, o, t || o] + }, + kf = (e, t, o, i = {}) => { + const { + target: r, + translate: n + } = t, { + aspectRatio: a, + minSize: s, + maxSize: l + } = i, c = re[wf[r]], d = be(ce(e.x, e.y), ce(c[0] * e.width, c[1] * e.height)), u = re[r], h = be(Ye(e), ce(u[0] * e.width, u[1] * e.height)), [p, m, g, $, f, y, b] = Sf(r); + let x = n.x, + v = n.y; + f ? v = 0 : y && (x = 0); + const { + inner: w, + outer: S + } = Cf(d, r, o, { + aspectRatio: a, + minSize: s, + maxSize: l + }); + let [k, C, T, M] = bt(e); + if (p ? M = d.x : m && (C = d.x), $ ? k = d.y : g && (T = d.y), p) { + const e = w.x + w.width, + t = S.x + S.width; + C = rs(h.x + x, e, t) + } else if (m) { + const e = S.x, + t = w.x; + M = rs(h.x + x, e, t) + } + if ($) { + const e = w.y + w.height, + t = S.y + S.height; + T = rs(h.y + v, e, t) + } else if (g) { + const e = S.y, + t = w.y; + k = rs(h.y + v, e, t) + } + if (M > w.x && (M = w.x), C < w.x + w.width && (C = w.x + w.width), k > w.y && (k = w.y), T < w.y + w.height && (T = w.y + w.height), M < S.x) { + const e = S.x - M; + M = S.x, C += e + } + if (C > S.x + S.width) { + const e = C - (S.x + S.width); + C = S.x + S.width, M -= e + } + if (k < S.y) { + const e = S.y - k; + k = S.y, T += e + } + if (T > S.y + S.height) { + const e = T - (S.y + S.height); + T = S.y + S.height, k -= e + } + if (a) + if (b) { + let e = C - M, + t = T - k; + f ? (t = e / a, k = d.y - .5 * t, T = d.y + .5 * t) : y && (e = t * a, M = d.x - .5 * e, C = d.x + .5 * e) + } else { + const e = ce(h.x + x - d.x, h.y + v - d.y); + r === te ? (e.x = Math.max(0, e.x), e.y = Math.min(0, e.y)) : r === oe ? (e.x = Math.max(0, e.x), e.y = Math.max(0, e.y)) : r === ie ? (e.x = Math.min(0, e.x), e.y = Math.max(0, e.y)) : r === ee && (e.x = Math.min(0, e.x), e.y = Math.min(0, e.y)); + const t = me(e), + o = me(ce(w.width, w.height)), + i = me(ce(S.width, S.height)), + n = rs(t, o, i), + s = ce(a, 1), + l = we(ge(s), n); + r === te ? (C = d.x + l.x, k = d.y - l.y) : r === oe ? (C = d.x + l.x, T = d.y + l.y) : r === ie ? (M = d.x - l.x, T = d.y + l.y) : r === ee && (M = d.x - l.x, k = d.y - l.y) + } return it(M, k, C - M, T - k) + }; +const Cf = (e, t, o, i) => { + const { + aspectRatio: r, + minSize: n, + maxSize: a + } = i, s = t === K || t === te || t === oe, l = t === Q || t === ie || t === ee, c = t === q || t === te || t === ee, d = t === J || t === oe || t === ie, u = t === Q || t === K, h = t === q || t === J, p = Ye(o); + s ? (p.x = e.x, p.width -= e.x) : l && (p.width = e.x), d ? (p.y = e.y, p.height -= e.y) : c && (p.height = e.y); + const m = ((e, t) => Xe(0, 0, e, t))(Math.min(p.width, a.width), Math.min(p.height, a.height)); + if (r) + if (u) { + const t = Math.min(e.y, o.height - e.y); + m.height = Math.min(2 * t, m.height) + } else if (h) { + const t = Math.min(e.x, o.width - e.x); + m.width = Math.min(2 * t, m.width) + } + const g = r ? ze(ft(Ke(n), r)) : n, + $ = r ? ze(yt(m, r)) : m; + let f, y, b, x; + s ? f = e.x : l && (y = e.x), d ? b = e.y : c && (x = e.y), s ? y = f + g.width : l && (f = y - g.width), d ? x = b + g.height : c && (b = x - g.height), u ? (b = e.y - .5 * g.height, x = e.y + .5 * g.height) : h && (f = e.x - .5 * g.width, y = e.x + .5 * g.width); + const v = et([ce(f, b), ce(y, x)]); + s ? y = f + $.width : l && (f = y - $.width), d ? x = b + $.height : c && (b = x - $.height), u ? (b = e.y - .5 * $.height, x = e.y + .5 * $.height) : h && (f = e.x - .5 * $.width, y = e.x + .5 * $.width), f = Math.max(o.x, f), y = Math.min(o.x + o.width, y), b = Math.max(o.y, b), x = Math.min(o.y + o.height, x); + return { + inner: v, + outer: et([ce(f, b), ce(y, x)]) + } +}; +var Tf = e => 180 * e / Math.PI; + +function Mf(e) { + let t, o, i; + return o = new mf({ + props: { + elasticity: e[5], + min: e[9], + max: e[10], + value: e[11], + valueMin: Math.max(e[9], e[0]), + valueMax: Math.min(e[10], e[1]), + labelReset: e[6], + base: e[12], + valueLabel: Math.round(Tf(e[11])) + "°", + oninputstart: e[2], + oninputmove: e[17], + oninputend: e[18] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaImageRotator") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, [t]) { + const i = {}; + 32 & t && (i.elasticity = e[5]), 512 & t && (i.min = e[9]), 1024 & t && (i.max = e[10]), 2048 & t && (i.value = e[11]), 513 & t && (i.valueMin = Math.max(e[9], e[0])), 1026 & t && (i.valueMax = Math.min(e[10], e[1])), 64 & t && (i.labelReset = e[6]), 4096 & t && (i.base = e[12]), 2048 & t && (i.valueLabel = Math.round(Tf(e[11])) + "°"), 4 & t && (i.oninputstart = e[2]), 392 & t && (i.oninputmove = e[17]), 400 & t && (i.oninputend = e[18]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Rf(e, t, o) { + let i, n, a, s, l, c, d, { + rotation: u + } = t, + { + valueMin: h + } = t, + { + valueMax: p + } = t, + { + oninputstart: m = r + } = t, + { + oninputmove: g = r + } = t, + { + oninputend: $ = r + } = t, + { + elasticity: f = 0 + } = t, + { + labelReset: y + } = t, + { + rotationMin: b + } = t, + { + rotationMax: x + } = t; + return e.$$set = e => { + "rotation" in e && o(13, u = e.rotation), "valueMin" in e && o(0, h = e.valueMin), "valueMax" in e && o(1, p = e.valueMax), "oninputstart" in e && o(2, m = e.oninputstart), "oninputmove" in e && o(3, g = e.oninputmove), "oninputend" in e && o(4, $ = e.oninputend), "elasticity" in e && o(5, f = e.elasticity), "labelReset" in e && o(6, y = e.labelReset), "rotationMin" in e && o(14, b = e.rotationMin), "rotationMax" in e && o(15, x = e.rotationMax) + }, e.$$.update = () => { + 16384 & e.$$.dirty && o(9, i = b + 1e-9), 32768 & e.$$.dirty && o(10, n = x - 1e-9), 1536 & e.$$.dirty && o(12, a = i + .5 * (n - i)), 32768 & e.$$.dirty && o(16, s = 2 * x), 8192 & e.$$.dirty && o(8, l = Math.sign(u)), 73728 & e.$$.dirty && o(7, c = Math.round(Math.abs(u) / s) * s), 8576 & e.$$.dirty && o(11, d = u - l * c) + }, [h, p, m, g, $, f, y, c, l, i, n, d, a, u, b, x, s, e => g(l * c + e), e => $(l * c + e)] +} +class Pf extends Fa { + constructor(e) { + super(), za(this, e, Rf, Mf, Qr, { + rotation: 13, + valueMin: 0, + valueMax: 1, + oninputstart: 2, + oninputmove: 3, + oninputend: 4, + elasticity: 5, + labelReset: 6, + rotationMin: 14, + rotationMax: 15 + }) + } +} + +function Ef(e) { + let t, o, i, r, n; + return { + c() { + t = kn("div"), o = kn("p"), i = Tn(e[0]), r = Tn(" × "), n = Tn(e[1]), An(t, "class", "PinturaImageInfo") + }, + m(e, a) { + wn(e, t, a), bn(t, o), bn(o, i), bn(o, r), bn(o, n) + }, + p(e, [t]) { + 1 & t && Fn(i, e[0]), 2 & t && Fn(n, e[1]) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t) + } + } +} + +function If(e, t, o) { + let { + width: i + } = t, { + height: r + } = t; + return e.$$set = e => { + "width" in e && o(0, i = e.width), "height" in e && o(1, r = e.height) + }, [i, r] +} +class Af extends Fa { + constructor(e) { + super(), za(this, e, If, Ef, Qr, { + width: 0, + height: 1 + }) + } +} + +function Lf(e) { + let t, o; + return t = new Bu({ + props: { + class: "PinturaPresetListFilter", + layout: "row", + options: e[8], + selectedIndex: e[7], + onchange: e[10] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 256 & o && (i.options = e[8]), 128 & o && (i.selectedIndex = e[7]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function zf(e) { + let t, o; + return t = new sh({ + props: { + icon: e[0], + label: e[1], + labelClass: e[2], + hideLabel: e[3], + options: e[9], + selectedIndex: e[4], + onchange: e[5], + optionMapper: e[6], + $$slots: { + controls: [Lf] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, [o]) { + const i = {}; + 1 & o && (i.icon = e[0]), 2 & o && (i.label = e[1]), 4 & o && (i.labelClass = e[2]), 8 & o && (i.hideLabel = e[3]), 512 & o && (i.options = e[9]), 16 & o && (i.selectedIndex = e[4]), 32 & o && (i.onchange = e[5]), 64 & o && (i.optionMapper = e[6]), 262528 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} +const Ff = 'fill="none" stroke="currentColor"'; + +function Of(e, t, o) { + let i, n, a, { + icon: s + } = t, + { + label: l + } = t, + { + labelClass: c + } = t, + { + hideLabel: d + } = t, + { + options: u + } = t, + { + selectedIndex: h + } = t, + { + onchange: p + } = t, + { + optionMapper: m + } = t, + { + filter: g = "landscape" + } = t, + { + onfilterchange: $ = r + } = t; + const f = (e, t, o, i, r) => `\n `, + y = (e, t) => ``; + return e.$$set = e => { + "icon" in e && o(0, s = e.icon), "label" in e && o(1, l = e.label), "labelClass" in e && o(2, c = e.labelClass), "hideLabel" in e && o(3, d = e.hideLabel), "options" in e && o(12, u = e.options), "selectedIndex" in e && o(4, h = e.selectedIndex), "onchange" in e && o(5, p = e.onchange), "optionMapper" in e && o(6, m = e.optionMapper), "filter" in e && o(11, g = e.filter), "onfilterchange" in e && o(13, $ = e.onfilterchange) + }, e.$$.update = () => { + 6144 & e.$$.dirty && o(9, i = ((e, t) => (e || []).map((e => T(e[0]) ? (e[1] = e[1].map(t), e) : t(e))))(u, (e => t => { + const [o, i, r = {}] = t; + return Eo(o) && (r.hidden = "landscape" === e ? o < 1 : o > 1), [o, i, r] + })(g))), 2048 & e.$$.dirty && o(7, n = "landscape" === g ? 0 : 1), 128 & e.$$.dirty && o(8, a = [ + ["landscape", "Landscape", { + hideLabel: !0, + icon: f(2, 6, 19, 12, 2) + (0 === n ? y(9, 12) : "") + }], + ["portrait", "Portrait", { + hideLabel: !0, + icon: f(5, 3, 13, 18, 2) + (1 === n ? y(9, 12) : "") + }] + ]) + }, [s, l, c, d, h, p, m, n, a, i, e => { + o(11, g = e.value), $(e.value) + }, g, u, $] +} +class Df extends Fa { + constructor(e) { + super(), za(this, e, Of, zf, Qr, { + icon: 0, + label: 1, + labelClass: 2, + hideLabel: 3, + options: 12, + selectedIndex: 4, + onchange: 5, + optionMapper: 6, + filter: 11, + onfilterchange: 13 + }) + } +} +const Bf = e => ye(e, (e => ne(e, 6))), + Wf = e => vt(e, (e => ne(e, 6))), + Vf = (e, t, o = 1e-4) => Math.abs(e - t) < o; +var _f = (e, t, o, i, r = {}) => { + const { + aspectRatio: n + } = r; + e = Wf(e), i = i.map(Bf); + const a = lt(e, wf[o.target]), + s = ye(a, (e => ne(e, 6))), + l = n ? ft(r.minSize, n) : r.minSize, + c = n ? yt(r.maxSize, n) : r.maxSize, + d = lt(t, o.target); + if (Te(d, a) < 1) { + t = Ye(e); + const o = Math.min(l.width / e.width, l.height / e.height); + at(t, o, a) + } + t = st(Ye(t), l, c, a); + let u = Ye(t); + t = Wf(t); + const h = Et(i, 1), + p = xt(e), + m = xt(t), + g = p.findIndex((e => fe(ye(e, (e => ne(e, 6))), s))), + $ = e => h.map((t => Ct(t, e))).filter(Boolean).pop(); + if (n) { + const t = m.map(((e, t) => { + if (t === g) return; + const o = ce(a.x - e.x, a.y - e.y); + ge(o), we(o, .5); + const i = ce(a.x - o.x, a.y - o.y), + r = je(i, Bf(e)), + n = $(r); + if (!n) return; + const s = p[t]; + return { + intersection: n, + cornerDist: Te(a, s), + intersectionDist: Te(a, n) + } + })).filter(Boolean); + if (t.length) { + const o = t.reduce(((e, t) => { + const o = t.intersectionDist / t.cornerDist; + return o < e ? o : e + }), Number.MAX_SAFE_INTEGER); + u = Ye(e), at(u, o, a) + } + } else { + const e = 1 === o.target.length, + r = !(i[0].y === i[1].y || i[0].x === i[1].x), + n = p.map(((t, o) => { + if (o === g) return; + const i = m[o], + n = !Vf(i.x, s.x) && !Vf(i.y, s.y); + if (!e && !r && n) return; + if (e && (Vf(i.x, s.x) || Vf(i.y, s.y))) return; + const l = ue(e ? t : a), + c = xe(ue(l), i); + ge(c), we(c, .5), e ? be(l, c) : xe(l, c); + const d = je(l, i), + u = $(d); + return u || void 0 + })).filter(Boolean); + if (n.length) { + const [e, i, r, l] = Sf(o.target); + let [c, d, h, p] = bt(t); + n.forEach((({ + x: t, + y: o + }) => { + const n = ne(t, 6), + a = ne(o, 6); + r && !Vf(a, s.y) && (c = Math.max(c, o)), e && !Vf(n, s.x) && (d = Math.min(d, t)), l && !Vf(a, s.y) && (h = Math.min(h, o)), i && !Vf(n, s.x) && (p = Math.max(p, t)) + })), u = Je([c, d, h, p]), at(u, .9999, a) + } + } + return st(u, l, c, a), u +}; + +function Nf(e) { + let t, o; + return t = new dp({ + props: { + items: e[11] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 2048 & o[0] && (i.items = e[11]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Hf(e) { + let t, o, i; + return o = new Y$({ + props: { + $$slots: { + default: [Nf] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "header") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 2048 & t[0] | 1 & t[7] && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function jf(e) { + let t, o; + return t = new cd({ + props: { + onclick: e[87], + label: e[4].cropLabelButtonRecenter, + icon: e[4].cropIconButtonRecenter, + class: "PinturaButtonCenter", + disabled: !e[9], + hideLabel: !0, + style: `opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)` + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.label = e[4].cropLabelButtonRecenter), 16 & o[0] && (i.icon = e[4].cropIconButtonRecenter), 512 & o[0] && (i.disabled = !e[9]), 1610612736 & o[0] && (i.style = `opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)`), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Uf(e) { + let t, o; + return t = new xf({ + props: { + rect: e[8], + visible: e[12], + style: e[1] + } + }), t.$on("resizestart", e[67]), t.$on("resizemove", e[68]), t.$on("resizeend", e[69]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 256 & o[0] && (i.rect = e[8]), 4096 & o[0] && (i.visible = e[12]), 2 & o[0] && (i.style = e[1]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Gf(e) { + let t, o; + return t = new Af({ + props: { + width: Math.round(e[13].width), + height: Math.round(e[13].height) + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8192 & o[0] && (i.width = Math.round(e[13].width)), 8192 & o[0] && (i.height = Math.round(e[13].height)), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Zf(e) { + let t, o, i, r, n, a, s, l, c = e[21] && e[10] && jf(e), + d = e[21] && Uf(e), + u = e[22] && Gf(e); + return { + c() { + t = kn("div"), o = kn("div"), c && c.c(), i = Mn(), d && d.c(), n = Mn(), u && u.c(), An(o, "class", "PinturaStage"), An(t, "slot", "main") + }, + m(h, p) { + wn(h, t, p), bn(t, o), c && c.m(o, null), bn(o, i), d && d.m(o, null), e[161](o), bn(t, n), u && u.m(t, null), a = !0, s || (l = [hn($c.call(null, o)), Pn(o, "measure", e[159]), Pn(o, "wheel", (function() { + Jr(e[2] && e[86]) && (e[2] && e[86]).apply(this, arguments) + }), { + passive: !1 + }), Pn(o, "interactionstart", e[73]), Pn(o, "interactionupdate", e[74]), Pn(o, "interactionrelease", e[76]), Pn(o, "interactionend", e[75]), hn(r = hd.call(null, o, { + drag: !0, + inertia: !0, + pinch: e[2], + shouldStartInteraction: iy, + getEventPosition: e[162] + })), Pn(o, "gesturedown", e[83]), Pn(o, "gestureupdate", e[84]), Pn(o, "gestureup", e[85]), hn(vf.call(null, o))], s = !0) + }, + p(n, a) { + (e = n)[21] && e[10] ? c ? (c.p(e, a), 2098176 & a[0] && xa(c, 1)) : (c = jf(e), c.c(), xa(c, 1), c.m(o, i)) : c && (ya(), va(c, 1, 1, (() => { + c = null + })), ba()), e[21] ? d ? (d.p(e, a), 2097152 & a[0] && xa(d, 1)) : (d = Uf(e), d.c(), xa(d, 1), d.m(o, null)) : d && (ya(), va(d, 1, 1, (() => { + d = null + })), ba()), r && Jr(r.update) && 16777220 & a[0] && r.update.call(null, { + drag: !0, + inertia: !0, + pinch: e[2], + shouldStartInteraction: iy, + getEventPosition: e[162] + }), e[22] ? u ? (u.p(e, a), 4194304 & a[0] && xa(u, 1)) : (u = Gf(e), u.c(), xa(u, 1), u.m(t, null)) : u && (ya(), va(u, 1, 1, (() => { + u = null + })), ba()) + }, + i(e) { + a || (xa(c), xa(d), xa(u), a = !0) + }, + o(e) { + va(c), va(d), va(u), a = !1 + }, + d(o) { + o && Sn(t), c && c.d(), d && d.d(), e[161](null), u && u.d(), s = !1, Kr(l) + } + } +} + +function Xf(e) { + let t, o, i, r; + const n = [{ + class: "PinturaControlList" + }, { + tabs: e[7] + }, e[18]]; + let a = { + $$slots: { + default: [Yf, ({ + tab: e + }) => ({ + 216: e + }), ({ + tab: e + }) => [0, 0, 0, 0, 0, 0, e ? 1073741824 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < n.length; e += 1) a = Xr(a, n[e]); + t = new Fc({ + props: a + }), t.$on("select", e[160]); + const s = [{ + class: "PinturaControlPanels" + }, { + panelClass: "PinturaControlPanel" + }, { + panels: e[17] + }, e[18]]; + let l = { + $$slots: { + default: [Jf, ({ + panel: e + }) => ({ + 215: e + }), ({ + panel: e + }) => [0, 0, 0, 0, 0, 0, e ? 536870912 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < s.length; e += 1) l = Xr(l, s[e]); + return i = new Zc({ + props: l + }), { + c() { + Ia(t.$$.fragment), o = Mn(), Ia(i.$$.fragment) + }, + m(e, n) { + Aa(t, e, n), wn(e, o, n), Aa(i, e, n), r = !0 + }, + p(e, o) { + const r = 262272 & o[0] ? Ra(n, [n[0], 128 & o[0] && { + tabs: e[7] + }, 262144 & o[0] && Pa(e[18])]) : {}; + 1073741824 & o[6] | 1 & o[7] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r); + const a = 393216 & o[0] ? Ra(s, [s[0], s[1], 131072 & o[0] && { + panels: e[17] + }, 262144 & o[0] && Pa(e[18])]) : {}; + 511721496 & o[0] | 536870912 & o[6] | 1 & o[7] && (a.$$scope = { + dirty: o, + ctx: e + }), i.$set(a) + }, + i(e) { + r || (xa(t.$$.fragment, e), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(t.$$.fragment, e), va(i.$$.fragment, e), r = !1 + }, + d(e) { + La(t, e), e && Sn(o), La(i, e) + } + } +} + +function Yf(e) { + let t, o, i = e[216].label + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1073741824 & t[6] && i !== (i = e[216].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function qf(e) { + let t, o; + return t = new mf({ + props: { + elasticity: e[25] * e[43], + base: oy, + min: e[23], + max: ty, + valueMin: e[27][0], + valueMax: e[27][1], + value: e[28], + labelReset: e[4].labelReset, + valueLabel: Math.round(100 * e[28]) + "%", + oninputstart: e[80], + oninputmove: e[81], + oninputend: e[82] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 33554432 & o[0] && (i.elasticity = e[25] * e[43]), 8388608 & o[0] && (i.min = e[23]), 134217728 & o[0] && (i.valueMin = e[27][0]), 134217728 & o[0] && (i.valueMax = e[27][1]), 268435456 & o[0] && (i.value = e[28]), 16 & o[0] && (i.labelReset = e[4].labelReset), 268435456 & o[0] && (i.valueLabel = Math.round(100 * e[28]) + "%"), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Kf(e) { + let t, o; + return t = new Pf({ + props: { + elasticity: e[25] * e[43], + rotation: e[14], + labelReset: e[4].labelReset, + valueMin: e[26][0], + valueMax: e[26][1], + rotationMin: -e[3], + rotationMax: e[3], + oninputstart: e[70], + oninputmove: e[71], + oninputend: e[72] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 33554432 & o[0] && (i.elasticity = e[25] * e[43]), 16384 & o[0] && (i.rotation = e[14]), 16 & o[0] && (i.labelReset = e[4].labelReset), 67108864 & o[0] && (i.valueMin = e[26][0]), 67108864 & o[0] && (i.valueMax = e[26][1]), 8 & o[0] && (i.rotationMin = -e[3]), 8 & o[0] && (i.rotationMax = e[3]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Jf(e) { + let t, o, i, r; + const n = [Kf, qf], + a = []; + + function s(e, t) { + return e[215] === e[92] + "-rotation" ? 0 : e[215] === e[92] + "-zoom" ? 1 : -1 + } + return ~(t = s(e)) && (o = a[t] = n[t](e)), { + c() { + o && o.c(), i = Rn() + }, + m(e, o) { + ~t && a[t].m(e, o), wn(e, i, o), r = !0 + }, + p(e, r) { + let l = t; + t = s(e), t === l ? ~t && a[t].p(e, r) : (o && (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba()), ~t ? (o = a[t], o ? o.p(e, r) : (o = a[t] = n[t](e), o.c()), xa(o, 1), o.m(i.parentNode, i)) : o = null) + }, + i(e) { + r || (xa(o), r = !0) + }, + o(e) { + va(o), r = !1 + }, + d(e) { + ~t && a[t].d(e), e && Sn(i) + } + } +} + +function Qf(e) { + let t, o, i = e[19] && Xf(e); + return { + c() { + t = kn("div"), i && i.c(), An(t, "slot", "footer"), An(t, "style", e[16]) + }, + m(e, r) { + wn(e, t, r), i && i.m(t, null), o = !0 + }, + p(e, r) { + e[19] ? i ? (i.p(e, r), 524288 & r[0] && xa(i, 1)) : (i = Xf(e), i.c(), xa(i, 1), i.m(t, null)) : i && (ya(), va(i, 1, 1, (() => { + i = null + })), ba()), (!o || 65536 & r[0]) && An(t, "style", e[16]) + }, + i(e) { + o || (xa(i), o = !0) + }, + o(e) { + va(i), o = !1 + }, + d(e) { + e && Sn(t), i && i.d() + } + } +} + +function ey(e) { + let t, o, i; + + function r(t) { + e[163](t) + } + let n = { + hasHeader: e[20], + $$slots: { + footer: [Qf], + main: [Zf], + header: [Hf] + }, + $$scope: { + ctx: e + } + }; + return void 0 !== e[15] && (n.root = e[15]), t = new df({ + props: n + }), ta.push((() => Ea(t, "root", r))), t.$on("measure", e[164]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 1048576 & i[0] && (r.hasHeader = e[20]), 2146402302 & i[0] | 1 & i[7] && (r.$$scope = { + dirty: i, + ctx: e + }), !o && 32768 & i[0] && (o = !0, r.root = e[15], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} +const ty = 1, + oy = 0, + iy = (e, t) => e.target === t; + +function ry(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, T, M, R, P, E, A, L, z, F, O, D, B, W, V, _, N, U, G, Y, q, K, J, Q, ae, se, le, de, pe, $e, ye, ve, Se, ke, Ce, Te, Me, Re, Pe, Ee, Ie, Le, Oe, Be, je, Ue, Ge, Ze, Xe, qe = Gr, + Je = () => (qe(), qe = en(Qe, (e => o(12, A = e))), Qe); + e.$$.on_destroy.push((() => qe())); + let { + isActive: Qe + } = t; + Je(); + let { + stores: et + } = t, { + cropImageSelectionCornerStyle: tt = "circle" + } = t, { + cropWillRenderImageSelectionGuides: st = ((e, t) => { + const o = "rotate" == e; + return { + rows: o ? 5 : 3, + cols: o ? 5 : 3, + opacity: .25 * t + } + }) + } = t, { + cropAutoCenterImageSelectionTimeout: lt + } = t, { + cropEnableZoomMatchImageAspectRatio: ht = !0 + } = t, { + cropEnableRotateMatchImageAspectRatio: pt = "never" + } = t, { + cropEnableRotationInput: mt = !0 + } = t, { + cropEnableZoom: xt = !0 + } = t, { + cropEnableZoomInput: wt = !0 + } = t, { + cropEnableZoomAutoHide: St = !0 + } = t, { + cropEnableImageSelection: kt = !0 + } = t, { + cropEnableInfoIndicator: Ct = !1 + } = t, { + cropEnableZoomTowardsWheelPosition: Tt = !0 + } = t, { + cropEnableLimitWheelInputToCropSelection: Mt = !0 + } = t, { + cropEnableCenterImageSelection: Rt = !0 + } = t, { + cropEnableButtonRotateLeft: Pt = !0 + } = t, { + cropEnableButtonRotateRight: Et = !1 + } = t, { + cropEnableButtonFlipHorizontal: It = !0 + } = t, { + cropEnableButtonFlipVertical: At = !1 + } = t, { + cropSelectPresetOptions: Lt + } = t, { + cropEnableSelectPreset: zt = !0 + } = t, { + cropEnableFilterMatchAspectRatio: Ft = !0 + } = t, { + cropSelectPresetFilter: Ot = !1 + } = t, { + cropEnableButtonToggleCropLimit: Dt = !1 + } = t, { + cropWillRenderTools: Bt = j + } = t, { + cropActiveTransformTool: Wt = "rotation" + } = t, { + cropMinimizeToolbar: Vt = "auto" + } = t, { + cropInteractionFocus: _t = "image" + } = t, { + cropRotationRange: Nt = Z + } = t, { + cropMaskOpacity: Ht = .85 + } = t, { + locale: jt = {} + } = t; + const Ut = Jn("isAnimated"); + on(e, Ut, (e => o(138, L = e))); + const Gt = Jn("elasticityMultiplier"); + on(e, Gt, (e => o(25, Be = e))); + const Zt = Jn("redrawTrigger"); + on(e, Zt, (e => o(158, Oe = e))); + const Xt = Jn("imageIsStatic"); + on(e, Xt, (e => o(144, V = e))); + const Yt = Jn("imageStaticVisualCorners"); + on(e, Yt, (e => o(179, Ce = e))); + let qt = "idle"; + const Kt = Ba(); + on(e, Kt, (e => o(155, Ee = e))); + const Jt = () => void 0 === Se, + Qt = e => 1 / e, + eo = e => { + Ft && Ot !== e && (o(94, Ot = e), Se && 1 !== Se && to() && un(Vo, Se = Qt(Se), Se)) + }, + to = () => { + if (1 === Se || !i) return !1; + const e = Qt(Se); + return !!lu(Ee).find((([t]) => t === e)) + }, + oo = (e, t, o) => X(o) ? t.width === Math.round(e.height) || t.height === Math.round(e.width) : t.width === Math.round(e.width) || t.height === Math.round(e.height), + io = () => (Jt() || "always" === pt && to()) && ((e, t, o) => { + const i = He(_e(Ae(t), o), (e => Math.abs(Math.round(e)))), + r = Ve(i), + n = rt(e); + return fe(r, n) + })(_, ae, se) && oo(_, ae, se), + ro = e => { + if ("never" !== pt && io()) { + un(To, se += e, se); + const t = X(se), + o = t ? ae.height : ae.width, + i = t ? ae.width : ae.height; + un(Oo, _ = it(0, 0, o, i), _), Jt() || un(Vo, Se = H(o, i), Se) + } else un(To, se += e, se) + }, + { + history: no, + env: ao, + isInteracting: so, + isInteractingFraction: lo, + isTransformingImage: co, + rootRect: uo, + stageRect: ho, + utilRect: po, + utilRectPadded: mo, + rootLineColor: go, + allowPan: $o, + allowZoom: fo, + allowPlayPause: yo, + rangeInputElasticity: bo, + presentationScalar: xo, + utilTools: vo, + imagePreviewModifiers: wo, + imageOutlineOpacity: So, + imageFlipX: ko, + imageFlipY: Co, + imageRotation: To, + imageRotationRange: Mo, + imageOutputSize: Ro, + imageSelectionRect: Po, + imageSelectionRectSnapshot: Eo, + imageSelectionRectIntent: Io, + imageSelectionRectPresentation: Ao, + imageCropRectIntent: zo, + imageCropRectOrigin: Fo, + imageCropRect: Oo, + imageCropMinSize: Do, + imageCropMaxSize: Bo, + imageCropRange: Wo, + imageCropAspectRatio: Vo, + imageCropLimitToImage: _o, + imageSize: No, + imageScalar: Ho, + imageOverlayMarkup: jo, + stagePadded: Uo, + stageRecenter: Go + } = et; + let Zo; + on(e, ao, (e => o(139, z = e))), on(e, so, (e => o(143, W = e))), on(e, co, (e => o(172, J = e))), on(e, uo, (e => o(24, pe = e))), on(e, ho, (e => o(150, K = e))), on(e, mo, (e => o(147, G = e))), on(e, xo, (e => o(146, U = e))), on(e, vo, (e => o(181, Me = e))), on(e, wo, (e => o(171, D = e))), on(e, ko, (e => o(157, Le = e))), on(e, Co, (e => o(156, Ie = e))), on(e, To, (e => o(14, se = e))), on(e, Mo, (e => o(26, je = e))), on(e, Ro, (e => o(182, Re = e))), on(e, Po, (e => o(149, q = e))), on(e, Eo, (e => o(148, Y = e))), on(e, Io, (e => o(180, Te = e))), on(e, Ao, (e => o(142, B = e))), on(e, zo, (e => o(174, $e = e))), on(e, Fo, (e => o(176, ve = e))), on(e, Oo, (e => o(13, _ = e))), on(e, Do, (e => o(153, de = e))), on(e, Bo, (e => o(178, ke = e))), on(e, Wo, (e => o(175, ye = e))), on(e, Vo, (e => o(177, Se = e))), on(e, _o, (e => o(152, le = e))), on(e, No, (e => o(151, ae = e))), on(e, Ho, (e => o(145, N = e))), on(e, Uo, (e => o(141, O = e))); + const Xo = (e, t) => { + const o = { + target: e, + translate: t + }, + i = We(Ae(de), U), + r = We(Ae(ke), U); + let n = kf(Y, o, { + ...G, + x: 0, + y: 0 + }, { + aspectRatio: Se, + minSize: i, + maxSize: r + }); + if (n = ((e, t, o) => { + const [i, r, n, a] = bt(e), s = { + ...e + }; + if (i < t.y && (e.height = e.height - (t.y - i), e.y = t.y), r > t.x + t.width && (e.width = t.x + t.width - e.x), n > t.y + t.height && (e.height = t.y + t.height - e.y), a < t.x && (e.width = e.width - (t.x - a), e.x = t.x), o) { + const t = Math.min(1, s.width / e.width, s.height / e.height); + return ct(s, t) + } + return e + })(n, { + ...G, + x: 0, + y: 0 + }, Se), !le) return { + boundsLimited: n, + boundsIntent: n + }; + let a = _f(Y, n, o, Ce, { + aspectRatio: Se, + minSize: i, + maxSize: r + }); + return { + boundsLimited: a, + boundsIntent: a + } + }, + Yo = (e, t) => { + const o = { + target: e, + translate: t + }, + i = We(Ae(de), U), + r = We(Ae(ke), U), + n = ((e, t, o = {}) => { + const { + target: i, + translate: r + } = t, { + aspectRatio: n, + minSize: a + } = o, s = re[wf[i]], l = be(Ye(e), ce(s[0] * e.width, s[1] * e.height)), c = re[i], d = be(Ye(e), ce(c[0] * e.width, c[1] * e.height)), [u, h, p, m, g, $, f] = Sf(i); + let y = r.x, + b = r.y; + g ? b = 0 : $ && (y = 0); + let [x, v, w, S] = bt(e); + if (u ? S = l.x : h && (v = l.x), m ? x = l.y : p && (w = l.y), u ? v = d.x + y : h && (S = d.x + y), m ? w = d.y + b : p && (x = d.y + b), a && g && w - x < a.height) { + const e = a.height - (w - x); + x -= .5 * e, w += .5 * e + } + if (a && $ && v - S < a.width) { + const e = a.width - (v - S); + S -= .5 * e, v += .5 * e + } + if (n) + if (f) { + let e = v - S, + t = w - x; + g ? (t = e / n, x = l.y - .5 * t, w = l.y + .5 * t) : $ && (e = t * n, S = l.x - .5 * e, v = l.x + .5 * e) + } else { + const e = ce(d.x + y - l.x, d.y + b - l.y); + i === te ? (e.x = Math.max(0, e.x), e.y = Math.min(0, e.y)) : i === oe ? (e.x = Math.max(0, e.x), e.y = Math.max(0, e.y)) : i === ie ? (e.x = Math.min(0, e.x), e.y = Math.max(0, e.y)) : i === ee && (e.x = Math.min(0, e.x), e.y = Math.min(0, e.y)); + const t = me(e), + o = ce(n, 1), + r = we(ge(o), t); + i === te ? (v = l.x + r.x, x = l.y - r.y) : i === oe ? (v = l.x + r.x, w = l.y + r.y) : i === ie ? (S = l.x - r.x, w = l.y + r.y) : i === ee && (S = l.x - r.x, x = l.y - r.y) + } return it(S, x, v - S, w - x) + })(Y, o, { + aspectRatio: Se, + minSize: i + }); + return { + boundsLimited: kf(Y, o, { + ...G, + x: 0, + y: 0 + }, { + aspectRatio: Se, + minSize: i, + maxSize: r + }), + boundsIntent: n + } + }; + let qo = void 0, + Ko = void 0; + const Jo = ({ + translation: e, + scalar: t + }) => { + V && (t = 1, e = he(ue(e))); + const o = Math.min(q.width / _.width, q.height / _.height), + i = we(ue(e), 1 / o); + let r; + if (Ko) { + const t = xe(ue(Ko), e); + Ko = e, r = nt(Ye(_), t) + } else r = nt(Ye(qo), he(ue(i))), void 0 !== t && at(r, 1 / t); + un(zo, $e = r, $e), un(Oo, _ = r, _) + }, + Qo = Wa([Wo, Oo], (([e, t], o) => { + if (!t) return; + const [i, r] = e, n = ut(t); + o([ze(vt(ft(i, n), ne)), ze(vt(yt(r, n), ne))]) + })); + on(e, Qo, (e => o(173, Q = e))); + const ei = Wa([No, _o, Do, Bo, Wo, To], (([e, t, o, i, r, n], a) => { + if (!e) return; + const s = r[0], + l = r[1]; + let c, d; + t ? (c = ((e, t, o) => X(o) ? 1 - 1 / Math.min(e.height / t.width, e.width / t.height) : 1 - 1 / Math.min(e.width / t.width, e.height / t.height))(e, l, n), d = Math.min(s.width / o.width, s.height / o.height)) : (c = -1, d = 1); + a([c, d].map((e => ne(e)))) + })); + on(e, ei, (e => o(27, Ue = e))); + const ti = Wa([No, Oo, Wo, To], (([e, t, o, i], r) => { + if (!e || !t) return r(0); + let n; + const a = o[0], + s = o[1], + l = t.width, + c = t.height, + d = ut(t), + u = X(i) ? De(e.height, e.width) : e, + h = yt(u, d); + if (l <= h.width || c <= h.height) { + const e = h.width - a.width, + t = h.height - a.height; + n = 0 === e || 0 === t ? 1 : 1 - Math.min((l - a.width) / e, (c - a.height) / t) + } else { + const e = s.width - h.width, + t = s.height - h.height, + o = yt({ + width: e, + height: t + }, d); + n = -Math.min((l - h.width) / o.width, (c - h.height) / o.height) + } + r(n) + })); + on(e, ti, (e => o(28, Ge = e))); + const oi = e => { + const t = ut(qo); + let o, i, r; + const n = X(se) ? De(ae.height, ae.width) : ae, + a = yt(n, t); + if (e >= 0) { + const n = a.width - ye[0].width, + s = a.height - ye[0].height; + o = a.width - n * e, i = a.height - s * e, r = ft({ + width: o, + height: i + }, t) + } else { + const n = ye[1].width - a.width, + s = ye[1].height - a.height; + o = a.width + n * -e, i = a.height + s * -e, r = yt({ + width: o, + height: i + }, t) + } + o = r.width, i = r.height; + const s = qo.x + .5 * qo.width - .5 * o, + l = qo.y + .5 * qo.height - .5 * i; + un(Oo, _ = { + x: s, + y: l, + width: o, + height: i + }, _) + }; + let ii; + const ri = e => { + const t = at(Ye(ii), 1 / e); + un(zo, $e = t, $e), un(Oo, _ = t, _) + }; + let ni; + const ai = () => { + Go.set({}) + }; + let si; + const li = ec(0, { + precision: 1e-4 + }); + on(e, li, (e => o(29, Ze = e))); + const ci = ec(); + on(e, ci, (e => o(30, Xe = e))); + const di = Wa([Vo, Ro, Kt], (([e, t, o], r) => { + if (!i) return; + const n = lu(o), + a = [...n].map((e => e[0])).sort(((e, t) => Lo(e[0]) && !Lo(t[0]) ? 1 : -1)).find((o => { + if (Lo(o) && t) { + const [i, r] = o, n = t.width === i && t.height === r, a = e === H(i, r); + return n && a + } + return o === e + })); + if (!a) return r(void 0); + r(n.map((e => e[0])).findIndex((e => Lo(e) ? cs(e, a) : e === a))) + })); + on(e, di, (e => o(154, Pe = e))); + const ui = (e, t) => { + if (!i || -1 === e || void 0 === e) return; + const o = lu(t)[e][0]; + return o ? Lo(o) ? H(o[0], o[1]) : o : void 0 + }, + hi = Wa([go, Ao, lo], (([e, t, o], i) => { + const { + rows: r, + cols: n, + opacity: a + } = st(qt, o); + if (!t || a <= 0) return i([]); + const { + x: s, + y: l, + width: c, + height: d + } = t, u = c / n, h = d / r, p = []; + for (let t = 1; t <= r - 1; t++) { + const o = l + h * t; + p.push({ + id: "image-selection-guide-row-" + t, + points: [ce(s, o), ce(s + c, o)], + opacity: a, + strokeWidth: 1, + strokeColor: e + }) + } + for (let t = 1; t <= n - 1; t++) { + const o = s + u * t; + p.push({ + id: "image-selection-guide-col-" + t, + points: [ce(o, l), ce(o, l + d)], + opacity: a, + strokeWidth: 1, + strokeColor: e + }) + } + i(p) + })); + on(e, hi, (e => o(140, F = e))); + const pi = "crop-" + I(); + let mi, gi = pi + "-" + (mt ? Wt : "zoom"), + $i = gi, + fi = void 0; + const yi = ec(L ? 20 : 0); + on(e, yi, (e => o(137, E = e))); + return e.$$set = e => { + "isActive" in e && Je(o(0, Qe = e.isActive)), "stores" in e && o(96, et = e.stores), "cropImageSelectionCornerStyle" in e && o(1, tt = e.cropImageSelectionCornerStyle), "cropWillRenderImageSelectionGuides" in e && o(97, st = e.cropWillRenderImageSelectionGuides), "cropAutoCenterImageSelectionTimeout" in e && o(98, lt = e.cropAutoCenterImageSelectionTimeout), "cropEnableZoomMatchImageAspectRatio" in e && o(99, ht = e.cropEnableZoomMatchImageAspectRatio), "cropEnableRotateMatchImageAspectRatio" in e && o(100, pt = e.cropEnableRotateMatchImageAspectRatio), "cropEnableRotationInput" in e && o(101, mt = e.cropEnableRotationInput), "cropEnableZoom" in e && o(2, xt = e.cropEnableZoom), "cropEnableZoomInput" in e && o(102, wt = e.cropEnableZoomInput), "cropEnableZoomAutoHide" in e && o(103, St = e.cropEnableZoomAutoHide), "cropEnableImageSelection" in e && o(104, kt = e.cropEnableImageSelection), "cropEnableInfoIndicator" in e && o(105, Ct = e.cropEnableInfoIndicator), "cropEnableZoomTowardsWheelPosition" in e && o(106, Tt = e.cropEnableZoomTowardsWheelPosition), "cropEnableLimitWheelInputToCropSelection" in e && o(107, Mt = e.cropEnableLimitWheelInputToCropSelection), "cropEnableCenterImageSelection" in e && o(108, Rt = e.cropEnableCenterImageSelection), "cropEnableButtonRotateLeft" in e && o(109, Pt = e.cropEnableButtonRotateLeft), "cropEnableButtonRotateRight" in e && o(110, Et = e.cropEnableButtonRotateRight), "cropEnableButtonFlipHorizontal" in e && o(111, It = e.cropEnableButtonFlipHorizontal), "cropEnableButtonFlipVertical" in e && o(112, At = e.cropEnableButtonFlipVertical), "cropSelectPresetOptions" in e && o(113, Lt = e.cropSelectPresetOptions), "cropEnableSelectPreset" in e && o(114, zt = e.cropEnableSelectPreset), "cropEnableFilterMatchAspectRatio" in e && o(115, Ft = e.cropEnableFilterMatchAspectRatio), "cropSelectPresetFilter" in e && o(94, Ot = e.cropSelectPresetFilter), "cropEnableButtonToggleCropLimit" in e && o(116, Dt = e.cropEnableButtonToggleCropLimit), "cropWillRenderTools" in e && o(117, Bt = e.cropWillRenderTools), "cropActiveTransformTool" in e && o(118, Wt = e.cropActiveTransformTool), "cropMinimizeToolbar" in e && o(119, Vt = e.cropMinimizeToolbar), "cropInteractionFocus" in e && o(120, _t = e.cropInteractionFocus), "cropRotationRange" in e && o(3, Nt = e.cropRotationRange), "cropMaskOpacity" in e && o(121, Ht = e.cropMaskOpacity), "locale" in e && o(4, jt = e.locale) + }, e.$$.update = () => { + 4096 & e.$$.dirty[0] | 134217728 & e.$$.dirty[3] && Xt.set("selection" === _t && A), 1048576 & e.$$.dirty[3] && o(128, i = Lt && Array.isArray(Lt) && Lt.length), 1048576 & e.$$.dirty[3] | 16 & e.$$.dirty[4] && Kt.set(i ? Lt : []), 4096 & e.$$.dirty[0] && A && So.set(1), 4096 & e.$$.dirty[0] && $o.set(!A), 4096 & e.$$.dirty[0] && fo.set(!A), 4096 & e.$$.dirty[0] && A && yo.set(!0), 32768 & e.$$.dirty[4] && o(123, p = "overlay" === z.layoutMode), 1075838976 & e.$$.dirty[3] && o(127, v = zt && !p), 41943040 & e.$$.dirty[4] && o(136, l = G && q && gt(G, q)), 33558528 & e.$$.dirty[4] && o(134, c = !(!q || !l)), 33559552 & e.$$.dirty[4] && o(132, d = c && dt(q, l, (e => ne(e, 5)))), 16400 & e.$$.dirty[0] | 26148866 & e.$$.dirty[3] | 2013298968 & e.$$.dirty[4] | 15 & e.$$.dirty[5] && o(11, r = Oe && Bt([Pt && ["Button", "rotate-left", { + label: jt.cropLabelButtonRotateLeft, + labelClass: "PinturaToolbarContentWide", + icon: jt.cropIconButtonRotateLeft, + onclick: () => { + ro(-Math.PI / 2), no.write() + } + }], Et && ["Button", "rotate-right", { + label: jt.cropLabelButtonRotateRight, + labelClass: "PinturaToolbarContentWide", + icon: jt.cropIconButtonRotateRight, + onclick: () => { + ro(Math.PI / 2), no.write() + } + }], It && ["Button", "flip-horizontal", { + label: jt.cropLabelButtonFlipHorizontal, + labelClass: "PinturaToolbarContentWide", + icon: jt.cropIconButtonFlipHorizontal, + onclick: () => { + X(se) ? un(Co, Ie = !Ie, Ie) : un(ko, Le = !Le, Le), no.write() + } + }], At && ["Button", "flip-vertical", { + label: jt.cropLabelButtonFlipVertical, + labelClass: "PinturaToolbarContentWide", + icon: jt.cropIconButtonFlipVertical, + onclick: () => { + X(se) ? un(ko, Le = !Le, Le) : un(Co, Ie = !Ie, Ie), no.write() + } + }], v && i && [!1 === Ot ? "Dropdown" : Df, "select-preset", { + icon: du(jt.cropIconSelectPreset, jt, ui(Pe, Ee)), + label: du(jt.cropLabelSelectPreset, jt, ui(Pe, Ee)), + labelClass: "PinturaToolbarContentWide", + options: Ee, + filter: Ot, + onfilterchange: eo, + selectedIndex: Pe, + onchange: ({ + value: e + }) => { + Lo(e) ? (un(Vo, Se = H(e[0], e[1]), Se), un(Ro, Re = Fe(e), Re)) : un(Vo, Se = e, Se), d && ai(), no.write() + }, + optionMapper: e => { + let t = !1; + const o = Lo(e.value) ? e.value[0] / e.value[1] : e.value; + if (o) { + const e = ts(ae, se, o); + t = e.width < de.width || e.height < de.height + } + return e.icon = ((e, t = {}) => { + const { + width: o = 24, + height: i = 24, + bounds: r = 16, + radius: n = 3 + } = t; + let a, s, l, c, d = Lo(e) ? H(e[0], e[1]) : e, + u = !!d; + return d = u ? d : 1, l = d > 1 ? r : d * r, c = l / d, a = Math.round(.5 * (o - l)), s = Math.round(.5 * (i - c)), `` + })(e.value, { + bounds: 14 + }), { + ...e, + disabled: t + } + } + }], Dt && ["Dropdown", "select-crop-limit", { + icon: du(jt.cropIconCropBoundary, jt, le), + label: jt.cropLabelCropBoundary, + labelClass: "PinturaToolbarContentWide", + onchange: ({ + value: e + }) => { + un(_o, le = e, le), no.write() + }, + options: [ + [!0, jt.cropLabelCropBoundaryEdge, { + icon: du(jt.cropIconCropBoundary, jt, !0) + }], + [!1, jt.cropLabelCropBoundaryNone, { + icon: du(jt.cropIconCropBoundary, jt, !1) + }] + ] + }]].filter(Boolean), z, (() => Zt.set({}))).filter(Boolean)), 6144 & e.$$.dirty[0] | 1140850688 & e.$$.dirty[3] | 32768 & e.$$.dirty[4] && un(vo, Me = A && "never" !== Vt && ("always" === Vt || "short" === z.verticalSpace || p) ? r.map((([e, t, o]) => Array.isArray(o) ? [e, t, o] : [e, t, { + ...o, + hideLabel: !0 + }])) : [], Me), 268435456 & e.$$.dirty[4] && o(23, n = le ? 0 : -1), 75497472 & e.$$.dirty[4] && o(129, a = G && ce(-(K.x - G.x), -(K.y - G.y))), 262176 & e.$$.dirty[4] && o(130, s = B && ce(Hd(B.x + .5 * B.width + a.x), Hd(B.y + .5 * B.height + a.y))), 16777216 & e.$$.dirty[4] && o(133, u = null != Y), 8392704 & e.$$.dirty[4] && o(135, h = G && l && (l.height === G.height || l.width === G.width)), 6293504 & e.$$.dirty[4] && o(131, m = !h && U < 1 && N < 1), 1920 & e.$$.dirty[4] && o(9, g = c && !u && (!d || m)), 8192 & e.$$.dirty[0] | 1073745920 & e.$$.dirty[3] && o(22, $ = Ct && !!_ && !p), 262176 & e.$$.dirty[4] && o(8, b = B && a && { + x: B.x + a.x, + y: B.y + a.y, + width: B.width, + height: B.height + }), 256 & e.$$.dirty[0] | 1073743872 & e.$$.dirty[3] && o(21, f = kt && !!b && !p), 32800 & e.$$.dirty[3] | 1048640 & e.$$.dirty[4] && o(10, y = Rt && !!s && !lt && !V), 512 & e.$$.dirty[0] | 536870944 & e.$$.dirty[3] | 524288 & e.$$.dirty[4] && g && lt && !W && (clearTimeout(si), o(122, si = setTimeout(ai, lt))), 536870912 & e.$$.dirty[3] | 524288 & e.$$.dirty[4] && W && clearTimeout(si), 1536 & e.$$.dirty[0] | 16384 & e.$$.dirty[4] && li.set(y && g ? 1 : 0, { + hard: !1 === L + }), 16448 & e.$$.dirty[4] && ci.set(s, { + hard: !1 === L + }), 4096 & e.$$.dirty[0] | 131072 & e.$$.dirty[4] && (A && !O ? (un(wo, D.crop = { + maskOpacity: Ht, + maskMarkupOpacity: Ht + }, D), wo.set(D)) : (delete D.crop, wo.set(D))), 65536 & e.$$.dirty[4] && F && jo.update((e => { + const t = e.filter((e => !/^image\-selection\-guide/.test(e.id))); + return A ? [...t, ...F] : t + })), 32768 & e.$$.dirty[4] && o(126, x = "short" !== z.verticalSpace), 1140850688 & e.$$.dirty[3] | 4 & e.$$.dirty[4] && o(20, w = "never" === Vt && !p || x && "always" !== Vt), 4 & e.$$.dirty[0] | 512 & e.$$.dirty[3] && o(125, S = xt && wt), 1024 & e.$$.dirty[3] | 6 & e.$$.dirty[4] && o(124, k = St ? x && S : S), 256 & e.$$.dirty[3] | 1 & e.$$.dirty[4] && o(19, C = mt || k), 1 & e.$$.dirty[4] && (k || o(5, $i = gi)), 32 & e.$$.dirty[0] && o(18, T = { + name: pi, + selected: $i + }), 16 & e.$$.dirty[0] | 256 & e.$$.dirty[3] | 1 & e.$$.dirty[4] && o(7, M = [mt && { + id: pi + "-rotation", + label: jt.cropLabelTabRotation + }, k && { + id: pi + "-zoom", + label: jt.cropLabelTabZoom + }].filter(Boolean)), 128 & e.$$.dirty[0] && o(17, R = M.map((e => e.id))), 64 & e.$$.dirty[0] | 1073741824 & e.$$.dirty[3] && mi && !mi.children.length && p && mi.dispatchEvent(new CustomEvent("measure", { + detail: mi.rect + })), 4096 & e.$$.dirty[0] | 16384 & e.$$.dirty[4] && L && yi.set(A ? 0 : 20), 8192 & e.$$.dirty[4] && o(16, P = E ? `transform: translateY(${E}px)` : void 0) + }, [Qe, tt, xt, Nt, jt, $i, mi, M, b, g, y, r, A, _, se, fi, P, R, T, C, w, f, $, n, pe, Be, je, Ue, Ge, Ze, Xe, Ut, Gt, Zt, Xt, Yt, Kt, ao, so, co, uo, ho, mo, bo, xo, vo, wo, ko, Co, To, Mo, Ro, Po, Eo, Io, Ao, zo, Fo, Oo, Do, Bo, Wo, Vo, _o, No, Ho, Uo, () => { + qt = "select", un(so, W = !0, W), un(Eo, Y = Ye(q), Y), Zo = V ? Xo : Yo + }, ({ + detail: e + }) => { + const { + boundsLimited: t, + boundsIntent: o + } = Zo(e.direction, e.translation); + un(co, J = !0, J), un(Io, Te = o, Te), un(Po, q = t, q) + }, ({ + detail: e + }) => { + const { + boundsLimited: t + } = Zo(e.direction, e.translation); + un(co, J = !1, J), un(so, W = !1, W), un(Io, Te = void 0, Te), me(e.translation) && (un(Po, q = t, q), no.write()), un(Eo, Y = void 0, Y), qt = void 0 + }, () => { + qt = "rotate", un(so, W = !0, W), un(Fo, ve = Ye(_), ve) + }, e => { + un(co, J = !0, J), un(To, se = e, se) + }, e => { + un(co, J = !1, J), un(so, W = !1, W), un(To, se = e, se), no.write(), un(Fo, ve = void 0, ve) + }, () => { + qt = "pan", Ko = void 0, un(so, W = !0, W), qo = Ye(_) + }, ({ + detail: e + }) => { + un(co, J = !0, J), Jo(e) + }, ({ + detail: e + }) => { + un(co, J = !1, J), un(so, W = !1, W), (me(e.translation) > 0 || 0 !== e.scalar) && (Jo(e), no.write()), un(zo, $e = void 0, $e), qo = void 0 + }, ({ + detail: { + translation: e + } + }) => { + V && (e = he(ue(e))), Ko = e, un(so, W = !1, W) + }, Qo, ei, ti, () => { + qt = "zoom", un(so, W = !0, W), qo = Ye(_) + }, e => { + un(co, J = !1, J), oi(e) + }, e => { + oi(e), no.write(), un(co, J = !1, J), un(so, W = !1, W), qo = void 0 + }, () => { + qt = "zoom", qo || (ii = Ye(_), un(so, W = !0, W)) + }, ({ + detail: e + }) => { + ii && (un(co, J = !0, J), ri(e)) + }, ({ + detail: e + }) => { + ii && (un(co, J = !1, J), un(so, W = !1, W), ri(e), un(zo, $e = void 0, $e), ii = void 0, no.write()) + }, e => { + const t = Bp(e, pe, K); + if (Mt && !$t(q, t)) return; + qt = "zoom", un(so, W = !0, W), un(co, J = !0, J), e.preventDefault(), e.stopPropagation(); + const o = yd(e), + i = 1 + o / 100, + r = Ye(_), + n = 1 === Math.min(_.width / de.width, _.height / de.height); + if (ht && le) { + const e = oo(_, ae, se); + if (Jt() && e && o > 0 && d) { + un(so, W = !1, W), un(co, J = !1, J); + const e = X(se) ? Ke({ + height: ae.width, + width: ae.height + }) : Ke(ae); + if (dt(r, e)) return; + if (clearTimeout(ni), dt(no.state.crop, e)) return; + return un(Oo, _ = e, _), void no.write() + } + } + let a = rt(_); + if (Tt && "selection" !== _t && o < 0 && !n) { + const e = xe(ue(t), q), + o = Math.min(q.width / _.width, q.height / _.height), + i = at(Ye(q), 1.1); + a = $t(i, t) ? be(Ye(_), we(e, 1 / o)) : a + } + let s = at(Ye(_), i, a); + if (Ne(Q[1], s) || (s = ot(rt(s), Q[1])), Ne(s, Q[0]) || (s = ot(rt(s), Q[0])), dt(r, s, ne)) return un(so, W = !1, W), void un(co, J = !1, J); + un(Oo, _ = vt(s, (e => ne(e, 5))), _), un(so, W = !1, W), un(co, J = !1, J), clearTimeout(ni), ni = setTimeout((() => { + no.write() + }), 500) + }, ai, li, ci, di, hi, pi, yi, Ot, "crop", et, st, lt, ht, pt, mt, wt, St, kt, Ct, Tt, Mt, Rt, Pt, Et, It, At, Lt, zt, Ft, Dt, Bt, Wt, Vt, _t, Ht, si, p, k, S, x, v, i, a, s, m, d, u, c, h, l, E, L, z, F, O, B, W, V, N, U, G, Y, q, K, ae, le, de, Pe, Ee, Ie, Le, Oe, function(t) { + Qn.call(this, e, t) + }, ({ + detail: e + }) => o(5, $i = e), function(e) { + ta[e ? "unshift" : "push"]((() => { + mi = e, o(6, mi) + })) + }, e => Dp(e), function(e) { + fi = e, o(15, fi) + }, function(t) { + Qn.call(this, e, t) + }] +} +var ny = { + util: ["crop", class extends Fa { + constructor(e) { + super(), za(this, e, ry, ey, Qr, { + name: 95, + isActive: 0, + stores: 96, + cropImageSelectionCornerStyle: 1, + cropWillRenderImageSelectionGuides: 97, + cropAutoCenterImageSelectionTimeout: 98, + cropEnableZoomMatchImageAspectRatio: 99, + cropEnableRotateMatchImageAspectRatio: 100, + cropEnableRotationInput: 101, + cropEnableZoom: 2, + cropEnableZoomInput: 102, + cropEnableZoomAutoHide: 103, + cropEnableImageSelection: 104, + cropEnableInfoIndicator: 105, + cropEnableZoomTowardsWheelPosition: 106, + cropEnableLimitWheelInputToCropSelection: 107, + cropEnableCenterImageSelection: 108, + cropEnableButtonRotateLeft: 109, + cropEnableButtonRotateRight: 110, + cropEnableButtonFlipHorizontal: 111, + cropEnableButtonFlipVertical: 112, + cropSelectPresetOptions: 113, + cropEnableSelectPreset: 114, + cropEnableFilterMatchAspectRatio: 115, + cropSelectPresetFilter: 94, + cropEnableButtonToggleCropLimit: 116, + cropWillRenderTools: 117, + cropActiveTransformTool: 118, + cropMinimizeToolbar: 119, + cropInteractionFocus: 120, + cropRotationRange: 3, + cropMaskOpacity: 121, + locale: 4 + }, null, [-1, -1, -1, -1, -1, -1, -1, -1]) + } + get name() { + return this.$$.ctx[95] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get stores() { + return this.$$.ctx[96] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get cropImageSelectionCornerStyle() { + return this.$$.ctx[1] + } + set cropImageSelectionCornerStyle(e) { + this.$$set({ + cropImageSelectionCornerStyle: e + }), pa() + } + get cropWillRenderImageSelectionGuides() { + return this.$$.ctx[97] + } + set cropWillRenderImageSelectionGuides(e) { + this.$$set({ + cropWillRenderImageSelectionGuides: e + }), pa() + } + get cropAutoCenterImageSelectionTimeout() { + return this.$$.ctx[98] + } + set cropAutoCenterImageSelectionTimeout(e) { + this.$$set({ + cropAutoCenterImageSelectionTimeout: e + }), pa() + } + get cropEnableZoomMatchImageAspectRatio() { + return this.$$.ctx[99] + } + set cropEnableZoomMatchImageAspectRatio(e) { + this.$$set({ + cropEnableZoomMatchImageAspectRatio: e + }), pa() + } + get cropEnableRotateMatchImageAspectRatio() { + return this.$$.ctx[100] + } + set cropEnableRotateMatchImageAspectRatio(e) { + this.$$set({ + cropEnableRotateMatchImageAspectRatio: e + }), pa() + } + get cropEnableRotationInput() { + return this.$$.ctx[101] + } + set cropEnableRotationInput(e) { + this.$$set({ + cropEnableRotationInput: e + }), pa() + } + get cropEnableZoom() { + return this.$$.ctx[2] + } + set cropEnableZoom(e) { + this.$$set({ + cropEnableZoom: e + }), pa() + } + get cropEnableZoomInput() { + return this.$$.ctx[102] + } + set cropEnableZoomInput(e) { + this.$$set({ + cropEnableZoomInput: e + }), pa() + } + get cropEnableZoomAutoHide() { + return this.$$.ctx[103] + } + set cropEnableZoomAutoHide(e) { + this.$$set({ + cropEnableZoomAutoHide: e + }), pa() + } + get cropEnableImageSelection() { + return this.$$.ctx[104] + } + set cropEnableImageSelection(e) { + this.$$set({ + cropEnableImageSelection: e + }), pa() + } + get cropEnableInfoIndicator() { + return this.$$.ctx[105] + } + set cropEnableInfoIndicator(e) { + this.$$set({ + cropEnableInfoIndicator: e + }), pa() + } + get cropEnableZoomTowardsWheelPosition() { + return this.$$.ctx[106] + } + set cropEnableZoomTowardsWheelPosition(e) { + this.$$set({ + cropEnableZoomTowardsWheelPosition: e + }), pa() + } + get cropEnableLimitWheelInputToCropSelection() { + return this.$$.ctx[107] + } + set cropEnableLimitWheelInputToCropSelection(e) { + this.$$set({ + cropEnableLimitWheelInputToCropSelection: e + }), pa() + } + get cropEnableCenterImageSelection() { + return this.$$.ctx[108] + } + set cropEnableCenterImageSelection(e) { + this.$$set({ + cropEnableCenterImageSelection: e + }), pa() + } + get cropEnableButtonRotateLeft() { + return this.$$.ctx[109] + } + set cropEnableButtonRotateLeft(e) { + this.$$set({ + cropEnableButtonRotateLeft: e + }), pa() + } + get cropEnableButtonRotateRight() { + return this.$$.ctx[110] + } + set cropEnableButtonRotateRight(e) { + this.$$set({ + cropEnableButtonRotateRight: e + }), pa() + } + get cropEnableButtonFlipHorizontal() { + return this.$$.ctx[111] + } + set cropEnableButtonFlipHorizontal(e) { + this.$$set({ + cropEnableButtonFlipHorizontal: e + }), pa() + } + get cropEnableButtonFlipVertical() { + return this.$$.ctx[112] + } + set cropEnableButtonFlipVertical(e) { + this.$$set({ + cropEnableButtonFlipVertical: e + }), pa() + } + get cropSelectPresetOptions() { + return this.$$.ctx[113] + } + set cropSelectPresetOptions(e) { + this.$$set({ + cropSelectPresetOptions: e + }), pa() + } + get cropEnableSelectPreset() { + return this.$$.ctx[114] + } + set cropEnableSelectPreset(e) { + this.$$set({ + cropEnableSelectPreset: e + }), pa() + } + get cropEnableFilterMatchAspectRatio() { + return this.$$.ctx[115] + } + set cropEnableFilterMatchAspectRatio(e) { + this.$$set({ + cropEnableFilterMatchAspectRatio: e + }), pa() + } + get cropSelectPresetFilter() { + return this.$$.ctx[94] + } + set cropSelectPresetFilter(e) { + this.$$set({ + cropSelectPresetFilter: e + }), pa() + } + get cropEnableButtonToggleCropLimit() { + return this.$$.ctx[116] + } + set cropEnableButtonToggleCropLimit(e) { + this.$$set({ + cropEnableButtonToggleCropLimit: e + }), pa() + } + get cropWillRenderTools() { + return this.$$.ctx[117] + } + set cropWillRenderTools(e) { + this.$$set({ + cropWillRenderTools: e + }), pa() + } + get cropActiveTransformTool() { + return this.$$.ctx[118] + } + set cropActiveTransformTool(e) { + this.$$set({ + cropActiveTransformTool: e + }), pa() + } + get cropMinimizeToolbar() { + return this.$$.ctx[119] + } + set cropMinimizeToolbar(e) { + this.$$set({ + cropMinimizeToolbar: e + }), pa() + } + get cropInteractionFocus() { + return this.$$.ctx[120] + } + set cropInteractionFocus(e) { + this.$$set({ + cropInteractionFocus: e + }), pa() + } + get cropRotationRange() { + return this.$$.ctx[3] + } + set cropRotationRange(e) { + this.$$set({ + cropRotationRange: e + }), pa() + } + get cropMaskOpacity() { + return this.$$.ctx[121] + } + set cropMaskOpacity(e) { + this.$$set({ + cropMaskOpacity: e + }), pa() + } + get locale() { + return this.$$.ctx[4] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + }] +}; + +function ay(e) { + let t, o, i, r, n, a, s, l = e[77], + c = (M(e[77].label) ? e[77].label(e[2]) : e[77].label) + ""; + + function d(...t) { + return e[51](e[77], ...t) + } + const u = () => e[52](o, l), + h = () => e[52](null, l); + return { + c() { + t = kn("div"), o = kn("div"), i = Mn(), r = kn("span"), n = Tn(c), An(o, "class", dy), An(t, "slot", "option"), An(t, "class", "PinturaFilterOption") + }, + m(e, l) { + wn(e, t, l), bn(t, o), u(), bn(t, i), bn(t, r), bn(r, n), a || (s = [Pn(o, "measure", d), hn($c.call(null, o))], a = !0) + }, + p(t, o) { + l !== (e = t)[77] && (h(), l = e[77], u()), 4 & o[0] | 32768 & o[2] && c !== (c = (M(e[77].label) ? e[77].label(e[2]) : e[77].label) + "") && Fn(n, c) + }, + d(e) { + e && Sn(t), h(), a = !1, Kr(s) + } + } +} + +function sy(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[2], + layout: "row", + options: e[3], + selectedIndex: e[12], + onchange: e[32], + $$slots: { + option: [ay, ({ + option: e + }) => ({ + 77: e + }), ({ + option: e + }) => [0, 0, e ? 32768 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 4 & o[0] && (i.locale = e[2]), 8 & o[0] && (i.options = e[3]), 4096 & o[0] && (i.selectedIndex = e[12]), 1028 & o[0] | 98304 & o[2] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function ly(e) { + let t, o, i, r, n, a, s, l; + + function c(t) { + e[54](t) + } + + function d(t) { + e[55](t) + } + + function u(t) { + e[56](t) + } + let h = { + elasticity: e[13] * e[19], + onscroll: e[53], + $$slots: { + default: [sy] + }, + $$scope: { + ctx: e + } + }; + return void 0 !== e[4] && (h.maskFeatherStartOpacity = e[4]), void 0 !== e[5] && (h.maskFeatherEndOpacity = e[5]), void 0 !== e[6] && (h.maskFeatherSize = e[6]), o = new vd({ + props: h + }), ta.push((() => Ea(o, "maskFeatherStartOpacity", c))), ta.push((() => Ea(o, "maskFeatherEndOpacity", d))), ta.push((() => Ea(o, "maskFeatherSize", u))), o.$on("measure", e[57]), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "footer"), An(t, "style", e[11]) + }, + m(i, r) { + wn(i, t, r), Aa(o, t, null), a = !0, s || (l = [Pn(t, "transitionend", e[30]), Pn(t, "measure", e[58]), hn($c.call(null, t, { + observePosition: !0 + }))], s = !0) + }, + p(e, s) { + const l = {}; + 8192 & s[0] && (l.elasticity = e[13] * e[19]), 128 & s[0] && (l.onscroll = e[53]), 5132 & s[0] | 65536 & s[2] && (l.$$scope = { + dirty: s, + ctx: e + }), !i && 16 & s[0] && (i = !0, l.maskFeatherStartOpacity = e[4], ca((() => i = !1))), !r && 32 & s[0] && (r = !0, l.maskFeatherEndOpacity = e[5], ca((() => r = !1))), !n && 64 & s[0] && (n = !0, l.maskFeatherSize = e[6], ca((() => n = !1))), o.$set(l), (!a || 2048 & s[0]) && An(t, "style", e[11]) + }, + i(e) { + a || (xa(o.$$.fragment, e), a = !0) + }, + o(e) { + va(o.$$.fragment, e), a = !1 + }, + d(e) { + e && Sn(t), La(o), s = !1, Kr(l) + } + } +} + +function cy(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [ly] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[59]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16380 & o[0] | 65536 & o[2] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} +let dy = "PinturaFilterPreview"; + +function uy(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S = Gr, + k = () => (S(), S = en(P, (e => o(43, d = e))), P), + C = Gr, + T = () => (C(), C = en(R, (e => o(49, b = e))), R); + e.$$.on_destroy.push((() => S())), e.$$.on_destroy.push((() => C())); + let { + isActive: R + } = t; + T(); + let { + isActiveFraction: P + } = t; + k(); + let { + stores: E + } = t, { + locale: I + } = t, { + filterFunctions: A + } = t, { + filterOptions: L + } = t; + const z = Jn("elasticityMultiplier"); + on(e, z, (e => o(13, w = e))); + const { + history: F, + interfaceImages: O, + stageRectBase: D, + utilRect: B, + animation: W, + scrollElasticity: V, + imageSize: _, + imagePreview: N, + imageCropRect: H, + imageRotation: j, + imageFlipX: U, + imageFlipY: G, + imageBackgroundColor: Z, + imageGamma: X, + imageColorMatrix: Y, + allowPan: q, + allowZoom: K, + allowZoomControls: J, + allowPlayPause: Q + } = E; + on(e, O, (e => o(60, u = e))), on(e, D, (e => o(48, y = e))), on(e, B, (e => o(47, f = e))), on(e, W, (e => o(50, x = e))), on(e, _, (e => o(62, p = e))), on(e, N, (e => o(42, c = e))), on(e, Z, (e => o(61, h = e))), on(e, X, (e => o(44, m = e))), on(e, Y, (e => o(40, s = e))); + const ee = Ba({}); + on(e, ee, (e => o(46, $ = e))); + const te = (e, t) => un(ee, $[e.value] = t, $), + oe = Wa(ee, (e => { + if (!e[void 0]) return; + const t = e[void 0]; + return v && Be(v, t) ? v : Ae(t) + })); + on(e, oe, (e => o(63, v = e))); + const ie = Wa([R, oe, H, _, j, U, G], (([e, t, o, i, r, n, a], s) => { + if (!e || !t || !i) return g; + const l = Ke(i), + c = rt(l), + d = is(i, o, r), + u = rt(d), + h = xe(ue(c), u), + p = he(ue(h)), + m = Math.max(t.width / o.width, t.height / o.height); + s({ + origin: p, + translation: h, + rotation: { + x: a ? Math.PI : 0, + y: n ? Math.PI : 0, + z: r + }, + scale: m + }) + })); + on(e, ie, (e => o(45, g = e))); + const re = ec(x ? 20 : 0); + let ne; + on(e, re, (e => o(39, a = e))); + const ae = {}; + let se, le, de, pe, me, ge, $e = { + x: 0, + y: 0 + }; + const fe = Ba([]); + on(e, fe, (e => o(41, l = e))); + const ye = e => { + const t = { + ...e, + data: c, + size: p, + offset: { + ...e.offset + }, + mask: { + ...e.mask + }, + backgroundColor: h + }; + return t.opacity = d, t.offset.y += a, t.mask.y += a, t.id = "filter", t + }, + be = () => u.filter((e => "filter" !== e.id)); + Yn((() => { + O.set([]) + })); + return e.$$set = e => { + "isActive" in e && T(o(0, R = e.isActive)), "isActiveFraction" in e && k(o(1, P = e.isActiveFraction)), "stores" in e && o(34, E = e.stores), "locale" in e && o(2, I = e.locale), "filterFunctions" in e && o(35, A = e.filterFunctions), "filterOptions" in e && o(3, L = e.filterOptions) + }, e.$$.update = () => { + if (262144 & e.$$.dirty[1] && q.set(b), 262144 & e.$$.dirty[1] && K.set(b), 262144 & e.$$.dirty[1] && J.set(b), 262144 & e.$$.dirty[1] && b && Q.set(!1), 8 & e.$$.dirty[0] && o(38, i = lu(L)), 640 & e.$$.dirty[1] && o(12, r = ((e, t) => { + if (!e || !e.filter || !t) return 0; + const o = e.filter; + return t.findIndex((([e]) => { + if (!A[e]) return !1; + const t = A[e](); + return cs(t, o) + })) + })(s, i)), 786432 & e.$$.dirty[1] && x && re.set(b ? 0 : 20), 512 & e.$$.dirty[0] | 458752 & e.$$.dirty[1] && b && f && y && ge && o(37, me = { + x: y.x - f.x, + y: y.y - f.y + ge.y + }), 496 & e.$$.dirty[0] | 58096 & e.$$.dirty[1] && g && me && $e && pe && ne) { + const e = me.x + pe.x + $e.x, + t = me.y, + o = pe.x + me.x, + r = o + pe.width; + fe.set(i.map((([i], n) => { + const a = $[i], + l = $e.x + a.x, + c = l + a.width; + if (c < 0 || l > pe.width) return !1; + const d = e + a.x, + u = t + a.y, + h = (e => ({ + origin: ue(e.origin), + translation: ue(e.translation), + rotation: { + ...e.rotation + }, + scale: e.scale + }))(g); + h.offset = ce(.5 * a.width + d, .5 * a.height + u); + h.maskOpacity = 1, h.mask = it(d + 0, u, a.width + 0, a.height), h.maskFeather = [1, 0, 1, 0, 1, r, 1, r], l < de && se < 1 && (h.maskFeather[0] = se, h.maskFeather[1] = o, h.maskFeather[2] = 1, h.maskFeather[3] = o + de), c > pe.width - de && le < 1 && (h.maskFeather[4] = le, h.maskFeather[5] = r - de, h.maskFeather[6] = 1, h.maskFeather[7] = r), h.maskCornerRadius = ne[i]; + let p = s && Object.keys(s).filter((e => "filter" != e)).map((e => s[e])) || []; + return M(A[i]) && p.push(A[i]()), h.colorMatrix = p.length ? jr(p) : void 0, h.gamma = m, h + })).filter(Boolean)) + } + if (7424 & e.$$.dirty[1]) + if (d > 0 && l) { + const e = [...be(), ...l.map(ye)]; + O.set(e) + } else O.set(be()); + 256 & e.$$.dirty[1] && o(11, n = a ? `transform: translateY(${a}px)` : void 0) + }, [R, P, I, L, se, le, de, $e, pe, ge, ae, n, r, w, z, O, D, B, W, V, _, N, Z, X, Y, ee, te, oe, ie, re, e => { + e.target.className === dy && o(36, ne = Object.keys(ae).reduce(((e, t) => { + const o = ae[t], + i = getComputedStyle(o), + r = ["top-left", "top-right", "bottom-left", "bottom-right"].map((e => i.getPropertyValue(`border-${e}-radius`))).map(fd).map((e => 1.25 * e)); + return e[t] = r, e + }), {})) + }, fe, ({ + value: e + }) => { + un(Y, s = { + ...s, + filter: M(A[e]) ? A[e]() : void 0 + }, s), F.write() + }, "filter", E, A, ne, me, i, a, s, l, c, d, m, g, $, f, y, b, x, (e, t) => te(e, t.detail), function(e, t) { + ta[e ? "unshift" : "push"]((() => { + ae[t.value] = e, o(10, ae) + })) + }, e => o(7, $e = e), function(e) { + se = e, o(4, se) + }, function(e) { + le = e, o(5, le) + }, function(e) { + de = e, o(6, de) + }, e => o(8, pe = e.detail), e => o(9, ge = e.detail), function(t) { + Qn.call(this, e, t) + }] +} +var hy = { + util: ["filter", class extends Fa { + constructor(e) { + super(), za(this, e, uy, cy, Qr, { + name: 33, + isActive: 0, + isActiveFraction: 1, + stores: 34, + locale: 2, + filterFunctions: 35, + filterOptions: 3 + }, null, [-1, -1, -1]) + } + get name() { + return this.$$.ctx[33] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[1] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get stores() { + return this.$$.ctx[34] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[2] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get filterFunctions() { + return this.$$.ctx[35] + } + set filterFunctions(e) { + this.$$set({ + filterFunctions: e + }), pa() + } + get filterOptions() { + return this.$$.ctx[3] + } + set filterOptions(e) { + this.$$set({ + filterOptions: e + }), pa() + } + }] +}; + +function py(e) { + let t, o, i = e[43].label + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 4096 & t[1] && i !== (i = e[43].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function my(e) { + let t, o; + const i = [{ + class: "PinturaControlList" + }, { + tabs: e[1] + }, e[5]]; + let r = { + $$slots: { + default: [py, ({ + tab: e + }) => ({ + 43: e + }), ({ + tab: e + }) => [0, e ? 4096 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new Fc({ + props: r + }), t.$on("select", e[24]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 34 & o[0] ? Ra(i, [i[0], 2 & o[0] && { + tabs: e[1] + }, 32 & o[0] && Pa(e[5])]) : {}; + 12288 & o[1] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function gy(e) { + let t, o; + const i = [e[7][e[42]]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new mf({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 128 & o[0] | 2048 & o[1] ? Ra(i, [Pa(e[7][e[42]])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function $y(e) { + let t, o, i, r, n; + o = new vd({ + props: { + elasticity: e[6] * e[9], + class: "PinturaControlListScroller", + $$slots: { + default: [my] + }, + $$scope: { + ctx: e + } + } + }); + const a = [{ + class: "PinturaControlPanels" + }, { + panelClass: "PinturaControlPanel" + }, { + panels: e[4] + }, e[5]]; + let s = { + $$slots: { + default: [gy, ({ + panel: e + }) => ({ + 42: e + }), ({ + panel: e + }) => [0, e ? 2048 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < a.length; e += 1) s = Xr(s, a[e]); + return r = new Zc({ + props: s + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), i = Mn(), Ia(r.$$.fragment), An(t, "slot", "footer"), An(t, "style", e[3]) + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), Aa(r, t, null), n = !0 + }, + p(e, i) { + const s = {}; + 64 & i[0] && (s.elasticity = e[6] * e[9]), 38 & i[0] | 8192 & i[1] && (s.$$scope = { + dirty: i, + ctx: e + }), o.$set(s); + const l = 48 & i[0] ? Ra(a, [a[0], a[1], 16 & i[0] && { + panels: e[4] + }, 32 & i[0] && Pa(e[5])]) : {}; + 128 & i[0] | 10240 & i[1] && (l.$$scope = { + dirty: i, + ctx: e + }), r.$set(l), (!n || 8 & i[0]) && An(t, "style", e[3]) + }, + i(e) { + n || (xa(o.$$.fragment, e), xa(r.$$.fragment, e), n = !0) + }, + o(e) { + va(o.$$.fragment, e), va(r.$$.fragment, e), n = !1 + }, + d(e) { + e && Sn(t), La(o), La(r) + } + } +} + +function fy(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [$y] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[25]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 254 & o[0] | 8192 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function yy(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m = Gr, + g = () => (m(), m = en(f, (e => o(21, c = e))), f); + e.$$.on_destroy.push((() => m())); + let { + stores: $ + } = t, { + isActive: f + } = t; + g(); + let { + locale: y = {} + } = t, { + finetuneControlConfiguration: b + } = t, { + finetuneOptions: x + } = t, { + finetuneNudgePrecision: v + } = t; + const { + history: w, + animation: S, + scrollElasticity: k, + rangeInputElasticity: C, + imageColorMatrix: T, + imageConvolutionMatrix: R, + imageGamma: P, + imageVignette: E, + imageNoise: A, + allowPan: L, + allowZoom: z, + allowZoomControls: F, + allowPlayPause: O + } = $; + on(e, S, (e => o(22, d = e))); + const D = { + imageColorMatrix: T, + imageConvolutionMatrix: R, + imageGamma: P, + imageVignette: E, + imageNoise: A + }, + B = Jn("elasticityMultiplier"); + on(e, B, (e => o(6, h = e))); + const W = "finetune-" + I(), + V = Ba({}); + on(e, V, (e => o(23, u = e))); + const _ = Ba({}); + on(e, _, (e => o(7, p = e))); + let N = []; + const H = ec(d ? 20 : 0); + on(e, H, (e => o(20, l = e))); + return e.$$set = e => { + "stores" in e && o(15, $ = e.stores), "isActive" in e && g(o(0, f = e.isActive)), "locale" in e && o(16, y = e.locale), "finetuneControlConfiguration" in e && o(17, b = e.finetuneControlConfiguration), "finetuneOptions" in e && o(18, x = e.finetuneOptions), "finetuneNudgePrecision" in e && o(19, v = e.finetuneNudgePrecision) + }, e.$$.update = () => { + var t; + 2097152 & e.$$.dirty[0] && L.set(c), 2097152 & e.$$.dirty[0] && z.set(c), 2097152 & e.$$.dirty[0] && F.set(c), 2097152 & e.$$.dirty[0] && c && O.set(!0), 327680 & e.$$.dirty[0] && o(1, i = x ? x.map((([e, t]) => ({ + id: e, + label: M(t) ? t(y) : t + }))) : []), 2 & e.$$.dirty[0] && o(2, r = i.length && i[0].id), 4 & e.$$.dirty[0] && o(5, n = { + name: W, + selected: r + }), 2 & e.$$.dirty[0] && o(4, a = i.map((e => e.id))), 131072 & e.$$.dirty[0] && b && (t = b, N && N.forEach((e => e())), N = a.map((e => { + const { + getStore: o, + getValue: i = j + } = t[e]; + return o(D).subscribe((t => { + const o = null != t ? i(t) : t; + un(V, u = { + ...u, + [e]: o + }, u) + })) + }))), 8519680 & e.$$.dirty[0] && b && u && un(_, p = Object.keys(u).reduce(((e, t) => { + const { + base: o, + min: i, + max: r, + getLabel: n, + getStore: a, + setValue: s = ((e, t) => e.set(t)) + } = b[t], l = a(D), c = null != u[t] ? u[t] : o; + return e[t] = { + base: o, + min: i, + max: r, + value: c, + valueLabel: n ? n(c, i, r, r - i) : Math.round(100 * c), + oninputmove: e => { + s(l, e) + }, + oninputend: e => { + s(l, e), w.write() + }, + elasticity: h * C, + labelReset: y.labelReset, + nudgeMultiplier: v + }, e + }), {}), p), 6291456 & e.$$.dirty[0] && d && H.set(c ? 0 : 20), 1048576 & e.$$.dirty[0] && o(3, s = l ? `transform: translateY(${l}px)` : void 0) + }, [f, i, r, s, a, n, h, p, S, k, B, V, _, H, "finetune", $, y, b, x, v, l, c, d, u, ({ + detail: e + }) => o(2, r = e), function(t) { + Qn.call(this, e, t) + }] +} +var by = { + util: ["finetune", class extends Fa { + constructor(e) { + super(), za(this, e, yy, fy, Qr, { + name: 14, + stores: 15, + isActive: 0, + locale: 16, + finetuneControlConfiguration: 17, + finetuneOptions: 18, + finetuneNudgePrecision: 19 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[14] + } + get stores() { + return this.$$.ctx[15] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get locale() { + return this.$$.ctx[16] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get finetuneControlConfiguration() { + return this.$$.ctx[17] + } + set finetuneControlConfiguration(e) { + this.$$set({ + finetuneControlConfiguration: e + }), pa() + } + get finetuneOptions() { + return this.$$.ctx[18] + } + set finetuneOptions(e) { + this.$$set({ + finetuneOptions: e + }), pa() + } + get finetuneNudgePrecision() { + return this.$$.ctx[19] + } + set finetuneNudgePrecision(e) { + this.$$set({ + finetuneNudgePrecision: e + }), pa() + } + }] + }, + xy = (e, t) => { + const o = t.length; + return e < 0 ? e % o + o : e >= o ? e % o : e + }; + +function vy(e, t, o) { + const i = e.slice(); + return i[45] = t[o].key, i[46] = t[o].index, i[47] = t[o].translate, i[48] = t[o].scale, i[12] = t[o].rotate, i[49] = t[o].dir, i[50] = t[o].center, i[51] = t[o].type, i[2] = t[o].visible, i +} + +function wy(e) { + let t, o; + return { + c() { + t = kn("div"), An(t, "class", "PinturaShapeManipulator"), An(t, "data-control", "point"), An(t, "style", o = `pointer-events:none;transform: translate3d(${e[50].x}px, ${e[50].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`) + }, + m(e, o) { + wn(e, t, o) + }, + p(e, i) { + 56 & i[0] && o !== (o = `pointer-events:none;transform: translate3d(${e[50].x}px, ${e[50].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`) && An(t, "style", o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Sy(e, t) { + let o, i, r, n, a, s, l, c, d; + + function u(...e) { + return t[17](t[46], ...e) + } + let h = "edge" === t[51] && t[2] && wy(t); + return { + key: e, + first: null, + c() { + o = kn("div"), s = Mn(), h && h.c(), l = Rn(), An(o, "role", "button"), An(o, "aria-label", i = `Drag ${t[51]} ${t[45]}`), An(o, "tabindex", r = "edge" === t[51] ? -1 : 0), An(o, "class", "PinturaShapeManipulator"), An(o, "data-control", n = t[51]), An(o, "style", a = `cursor:${t[49]?t[49]+"-resize":"move"};opacity:${t[4]};--tx:${t[47].x};--ty:${t[47].y};--r:${"edge"===t[51]?t[12]:0}rad;--sx:${"point"===t[51]?t[5]:t[48].x};--sy:${"point"===t[51]?t[5]:t[48].y};`), this.first = o + }, + m(e, i) { + wn(e, o, i), wn(e, s, i), h && h.m(e, i), wn(e, l, i), c || (d = [Pn(o, "nudge", u), hn(pd.call(null, o, { + preventDefault: !0 + })), Pn(o, "interactionstart", (function() { + Jr(t[9]("start", t[46])) && t[9]("start", t[46]).apply(this, arguments) + })), Pn(o, "interactionupdate", (function() { + Jr(t[9]("move", t[46])) && t[9]("move", t[46]).apply(this, arguments) + })), Pn(o, "interactionend", (function() { + Jr(t[9]("end", t[46])) && t[9]("end", t[46]).apply(this, arguments) + })), hn(hd.call(null, o, { + observeKeys: !0 + }))], c = !0) + }, + p(e, s) { + t = e, 8 & s[0] && i !== (i = `Drag ${t[51]} ${t[45]}`) && An(o, "aria-label", i), 8 & s[0] && r !== (r = "edge" === t[51] ? -1 : 0) && An(o, "tabindex", r), 8 & s[0] && n !== (n = t[51]) && An(o, "data-control", n), 56 & s[0] && a !== (a = `cursor:${t[49]?t[49]+"-resize":"move"};opacity:${t[4]};--tx:${t[47].x};--ty:${t[47].y};--r:${"edge"===t[51]?t[12]:0}rad;--sx:${"point"===t[51]?t[5]:t[48].x};--sy:${"point"===t[51]?t[5]:t[48].y};`) && An(o, "style", a), "edge" === t[51] && t[2] ? h ? h.p(t, s) : (h = wy(t), h.c(), h.m(l.parentNode, l)) : h && (h.d(1), h = null) + }, + d(e) { + e && Sn(o), e && Sn(s), h && h.d(e), e && Sn(l), c = !1, Kr(d) + } + } +} + +function ky(e) { + let t, o, i, r; + return { + c() { + t = kn("div"), An(t, "role", "button"), An(t, "aria-label", "Drag rotator"), An(t, "tabindex", "0"), An(t, "class", "PinturaShapeManipulator"), An(t, "data-control", "rotate"), An(t, "style", o = `transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`) + }, + m(o, n) { + wn(o, t, n), i || (r = [Pn(t, "nudge", e[11]), hn(pd.call(null, t, { + preventDefault: !0 + })), Pn(t, "interactionstart", e[12]("start")), Pn(t, "interactionupdate", e[12]("move")), Pn(t, "interactionend", e[12]("end")), hn(hd.call(null, t, { + observeKeys: !0 + }))], i = !0) + }, + p(e, i) { + 49 & i[0] && o !== (o = `transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`) && An(t, "style", o) + }, + d(e) { + e && Sn(t), i = !1, Kr(r) + } + } +} + +function Cy(e) { + let t, o, i = [], + r = new Map, + n = e[3]; + const a = e => e[45]; + for (let t = 0; t < n.length; t += 1) { + let o = vy(e, n, t), + s = a(o); + r.set(s, i[t] = Sy(s, o)) + } + let s = e[1] && ky(e); + return { + c() { + for (let e = 0; e < i.length; e += 1) i[e].c(); + t = Mn(), s && s.c(), o = Rn() + }, + m(e, r) { + for (let t = 0; t < i.length; t += 1) i[t].m(e, r); + wn(e, t, r), s && s.m(e, r), wn(e, o, r) + }, + p(e, l) { + 1592 & l[0] && (n = e[3], i = Ma(i, l, a, 1, e, n, r, t.parentNode, Ca, Sy, t, vy)), e[1] ? s ? s.p(e, l) : (s = ky(e), s.c(), s.m(o.parentNode, o)) : s && (s.d(1), s = null) + }, + i: Gr, + o: Gr, + d(e) { + for (let t = 0; t < i.length; t += 1) i[t].d(e); + e && Sn(t), s && s.d(e), e && Sn(o) + } + } +} + +function Ty(e, t, o) { + let i, r, n, a; + const s = qn(), + l = .5 * Z, + c = G - l, + d = G + l, + u = -G, + h = u - l, + p = u + l, + m = U - l, + g = -U + l, + $ = l, + f = -l, + y = G - Z, + b = y - l, + x = y + l, + v = U - Z, + w = v - l, + S = v + l, + k = u - Z, + C = k + l, + T = k - l, + M = u + Z, + R = M + l, + P = M - l; + let { + visible: E = !1 + } = t, { + points: I = [] + } = t, { + rotatorPoint: A + } = t, { + enableDragEdges: L = !0 + } = t, { + enableDragPoints: z = !0 + } = t, { + enableRotatePoints: F = !0 + } = t; + const O = Jn("isAnimated"); + on(e, O, (e => o(16, r = e))); + const D = ec(.5, { + precision: 1e-4, + stiffness: .3, + damping: .7 + }); + on(e, D, (e => o(5, a = e))); + const B = ec(0, { + precision: .001, + stiffness: .3, + damping: .7 + }); + on(e, B, (e => o(4, n = e))); + const W = e => { + let t = ""; + return (e <= d && e >= c || e >= h && e <= p) && (t = "ns"), (e <= g || e >= m || e >= f && e <= $) && (t = "ew"), (e >= w && e <= S || e <= R && e >= P) && (t = "nesw"), (e >= b && e <= x || e <= C && e >= T) && (t = "nwse"), t + }, + V = (e, t) => { + s("resizestart", { + indexes: e, + translation: le() + }), s("resizemove", { + indexes: e, + translation: t + }), s("resizeend", { + indexes: e, + translation: le() + }) + }; + return e.$$set = e => { + "visible" in e && o(2, E = e.visible), "points" in e && o(13, I = e.points), "rotatorPoint" in e && o(0, A = e.rotatorPoint), "enableDragEdges" in e && o(14, L = e.enableDragEdges), "enableDragPoints" in e && o(15, z = e.enableDragPoints), "enableRotatePoints" in e && o(1, F = e.enableRotatePoints) + }, e.$$.update = () => { + 65540 & e.$$.dirty[0] && D.set(E ? 1 : .5, { + hard: !1 === r + }), 65540 & e.$$.dirty[0] && B.set(E ? 1 : 0, { + hard: !1 === r + }), 8192 & e.$$.dirty[0] && o(3, i = ((e, t) => { + let o = 0; + const i = Re(e), + r = [], + n = e.length; + for (; o < n; o++) { + const t = xy(o - 1, e), + n = xy(o + 1, e), + a = e[t], + s = e[o], + l = e[n], + c = Math.atan2(l.y - s.y, l.x - s.x); + if (z) { + const e = ge(ce(a.x - s.x, a.y - s.y)), + t = ge(ce(l.x - s.x, l.y - s.y)), + i = ce(e.x + t.x, e.y + t.y), + n = L ? z && W(Math.atan2(i.y, i.x)) : void 0; + r.push({ + index: [o], + key: "point-" + o, + type: "point", + scale: { + x: 1, + y: 1 + }, + translate: { + x: s.x, + y: s.y + }, + angle: void 0, + rotate: F, + center: s, + dir: n + }) + } + if (!L) continue; + if (Array.isArray(L) && !L.some((([e, t]) => o === e && n === t))) continue; + const d = ce(s.x + .5 * (l.x - s.x), s.y + .5 * (l.y - s.y)); + r.push({ + index: [o, n], + key: "edge-" + o, + type: "edge", + scale: { + x: Te(s, l), + y: 1 + }, + translate: { + x: s.x, + y: s.y + }, + angle: c, + rotate: c, + center: d, + visible: Array.isArray(L), + dir: W(Math.atan2(i.y - d.y, i.x - d.x)) + }) + } + return r + })(I)) + }, [A, F, E, i, n, a, O, D, B, (e, t) => ({ + detail: o + }) => { + const i = o && o.translation ? o.translation : ce(0, 0); + s("resize" + e, { + ...o, + indexes: t, + translation: i + }) + }, V, ({ + detail: e + }) => { + s("rotatestart", { + translation: le() + }), s("rotatemove", { + translation: e + }), s("rotateend", { + translation: le() + }) + }, e => ({ + detail: t + }) => { + const o = t && t.translation ? t.translation : ce(0, 0); + s("rotate" + e, { + ...t, + translation: o + }) + }, I, L, z, r, (e, { + detail: t + }) => V(e, t)] +} +class My extends Fa { + constructor(e) { + super(), za(this, e, Ty, Cy, Qr, { + visible: 2, + points: 13, + rotatorPoint: 0, + enableDragEdges: 14, + enableDragPoints: 15, + enableRotatePoints: 1 + }, null, [-1, -1]) + } +} +var Ry = (e, t) => { + const o = Dp(e); + return xe(o, t) + }, + Py = e => document.createTextNode(e), + Ey = e => (Gt() && e.endsWith("

") ? e.replace(/

<\/div>$/, "

") : e).replace(/

<\/div>/g, "
").replace(/<\/div>/g, "").replace(/
/g, "
"); + +function Iy(e) { + let t, o; + return { + c() { + t = kn("pre"), An(t, "class", "PinturaContentEditable"), An(t, "style", o = e[7] + ";position:absolute;z-index:-1;pointer-events:none;") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[0] + }, + p(e, i) { + 1 & i[0] && (t.innerHTML = e[0]), 128 & i[0] && o !== (o = e[7] + ";position:absolute;z-index:-1;pointer-events:none;") && An(t, "style", o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Ay(e) { + let t, o, i, r, n, a, s = e[8] && Iy(e); + return { + c() { + s && s.c(), t = Mn(), o = kn("pre"), An(o, "class", "PinturaContentEditable"), An(o, "data-wrap-content", i = e[4] || e[5] ? "wrap" : "nowrap"), An(o, "contenteditable", ""), An(o, "spellcheck", e[1]), An(o, "autocorrect", e[2]), An(o, "autocapitalize", e[3]), An(o, "style", r = e[8] ? e[15](e[7]) : e[7]) + }, + m(i, r) { + s && s.m(i, r), wn(i, t, r), wn(i, o, r), e[26](o), n || (a = [Pn(o, "input", e[13]), Pn(o, "compositionend", e[12]), Pn(o, "paste", e[14]), Pn(o, "keydown", e[10]), Pn(o, "keyup", e[11]), Pn(o, "blur", e[9])], n = !0) + }, + p(e, n) { + e[8] ? s ? s.p(e, n) : (s = Iy(e), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), 48 & n[0] && i !== (i = e[4] || e[5] ? "wrap" : "nowrap") && An(o, "data-wrap-content", i), 2 & n[0] && An(o, "spellcheck", e[1]), 4 & n[0] && An(o, "autocorrect", e[2]), 8 & n[0] && An(o, "autocapitalize", e[3]), 384 & n[0] && r !== (r = e[8] ? e[15](e[7]) : e[7]) && An(o, "style", r) + }, + i: Gr, + o: Gr, + d(i) { + s && s.d(i), i && Sn(t), i && Sn(o), e[26](null), n = !1, Kr(a) + } + } +} + +function Ly(e, t, o) { + let i, n, { + spellcheck: a = "false" + } = t, + { + autocorrect: s = "off" + } = t, + { + autocapitalize: l = "off" + } = t, + { + wrapLines: c = !0 + } = t, + { + allowNewline: d = !0 + } = t, + { + textFormat: u = "text" + } = t, + { + formatInput: h = j + } = t, + { + formatPaste: m = j + } = t, + { + style: g + } = t, + { + innerHTML: $ + } = t, + { + oninput: f = r + } = t, + { + enableTextStyleShortcuts: y = !1 + } = t; + const b = () => { + if (!v) return; + const e = document.createRange(); + e.selectNodeContents(v); + const t = R(); + t.removeAllRanges(), t.addRange(e) + }, + x = qn(); + let v; + document.execCommand("defaultParagraphSeparator", !1, "br"); + const w = e => e.replace(/<\/?(?:i|b|em|u|s|strike|strong|font)>/, "").replace(/style=".*?"/g, "").replace(/\n/gim, "
"), + S = () => { + o(0, $ = v.innerHTML); + const e = Ey($); + x("input", e), f(e), requestAnimationFrame((() => v && v.scrollTo(0, 0))) + }, + k = () => { + P(v); + const e = "html" === u ? v.innerHTML : w(v.innerHTML); + o(6, v.innerHTML = h(e), v), E(v), S() + }, + C = { + b: "bold", + i: "italic", + u: "underline", + s: "strikethrough" + }, + T = e => { + const t = p("span"); + return t.dataset.bookmark = e, t + }, + M = (e, t, o) => { + const i = T(o); + if (e.nodeType === Node.TEXT_NODE) { + const r = e.textContent; + if ("start" === o) { + const o = Py(r.substr(0, t)), + n = Py(r.substr(t)); + e.replaceWith(o, i, n) + } else { + const o = Py(r.substr(0, t)), + n = Py(r.substr(t)); + e.replaceWith(o, i, n) + } + } else e.nodeType === Node.ELEMENT_NODE && e.insertBefore(i, e.childNodes[t]) + }, + R = () => { + const e = v.getRootNode(); + return "getSelection" in e ? e.getSelection() : document.getSelection() + }, + P = e => { + const t = R(); + if (!t.getRangeAt || !t.rangeCount) return; + const o = t.getRangeAt(0), + { + startOffset: i, + endOffset: r, + startContainer: n, + endContainer: a + } = o; + if (e.contains(o.startContainer) && e.contains(o.endContainer)) + if (n.nodeType === Node.TEXT_NODE && n === a) { + const e = n.textContent, + t = e.substr(0, i), + o = T("start"), + a = r - i > 0 ? e.substr(i, r) : "", + s = T("end"), + l = e.substr(r); + n.replaceWith(t, o, a, s, l) + } else M(n, i, "start"), M(a, r + (n === a ? 1 : 0), "end") + }, + E = e => { + const t = I(e, "start"), + o = I(e, "end"); + if (!t || !o) return; + const i = document.createRange(); + i.setStart(t, 0), i.setEnd(o, 0); + const r = R(); + r.removeAllRanges(), r.addRange(i), t.remove(), o.remove() + }, + I = (e, t) => { + const o = e.children; + for (let e = 0; e < o.length; e++) { + const i = o[e]; + if (i.dataset.bookmark === t) return i; + if (i.children.length) { + const e = I(i, t); + if (e) return e + } + } + }; + let A; + return e.$$set = e => { + "spellcheck" in e && o(1, a = e.spellcheck), "autocorrect" in e && o(2, s = e.autocorrect), "autocapitalize" in e && o(3, l = e.autocapitalize), "wrapLines" in e && o(4, c = e.wrapLines), "allowNewline" in e && o(5, d = e.allowNewline), "textFormat" in e && o(16, u = e.textFormat), "formatInput" in e && o(17, h = e.formatInput), "formatPaste" in e && o(18, m = e.formatPaste), "style" in e && o(19, g = e.style), "innerHTML" in e && o(0, $ = e.innerHTML), "oninput" in e && o(20, f = e.oninput), "enableTextStyleShortcuts" in e && o(21, y = e.enableTextStyleShortcuts) + }, e.$$.update = () => { + var t; + if (64 & e.$$.dirty[0] && o(25, i = !!v), 33554433 & e.$$.dirty[0] && i && $ && (t = $) !== v.innerHTML && (o(6, v.innerHTML = t, v), v === document.activeElement && b()), 524336 & e.$$.dirty[0]) + if (!c && d) { + const e = g.includes(":right") ? "text-indent:-100px!important" : g.includes(":center") ? "" : "min-width:calc(100% + 100px)!important"; + o(7, A = g + ";overflow:visible;" + e) + } else o(7, A = g); + 524288 & e.$$.dirty[0] && o(8, n = g.includes("text-stroke")) + }, [$, a, s, l, c, d, v, A, n, () => { + x("blur") + }, e => { + if (/escape/i.test(e.code)) return e.stopPropagation(), void x("cancel"); + const t = e.ctrlKey || e.metaKey; + if ("html" === u && t && /b|i|u|s/.test(e.key)) return y && (e => { + const t = C[e]; + t && document.execCommand(t) + })(e.key), void e.preventDefault(); + /enter/i.test(e.code) && (e.stopPropagation(), e.isComposing || (t ? x("confirm") : (d || e.preventDefault(), document.execCommand("insertLineBreak"), e.preventDefault()))) + }, () => {}, e => { + "" !== e.data && k() + }, e => { + const { + inputType: t + } = e; + "insertCompositionText" !== t && "deleteCompositionText" !== t && k() + }, e => { + e.preventDefault(); + const t = e.clipboardData.getData("text/plain"), + o = "html" === u ? t : w(t), + i = m(o); + if (!i.length) return; + const r = R().getRangeAt(0); + r.deleteContents(), r.insertNode(document.createTextNode(i)), S() + }, e => e.replace("-webkit-text-stroke", "--text-stroke").replace("text-shadow", "--text-shadow"), u, h, m, g, f, y, () => k(), () => v && v.focus(), b, i, function(e) { + ta[e ? "unshift" : "push"]((() => { + v = e, o(6, v) + })) + }] +} +class zy extends Fa { + constructor(e) { + super(), za(this, e, Ly, Ay, Qr, { + spellcheck: 1, + autocorrect: 2, + autocapitalize: 3, + wrapLines: 4, + allowNewline: 5, + textFormat: 16, + formatInput: 17, + formatPaste: 18, + style: 19, + innerHTML: 0, + oninput: 20, + enableTextStyleShortcuts: 21, + confirm: 22, + focus: 23, + select: 24 + }, null, [-1, -1]) + } + get spellcheck() { + return this.$$.ctx[1] + } + set spellcheck(e) { + this.$$set({ + spellcheck: e + }), pa() + } + get autocorrect() { + return this.$$.ctx[2] + } + set autocorrect(e) { + this.$$set({ + autocorrect: e + }), pa() + } + get autocapitalize() { + return this.$$.ctx[3] + } + set autocapitalize(e) { + this.$$set({ + autocapitalize: e + }), pa() + } + get wrapLines() { + return this.$$.ctx[4] + } + set wrapLines(e) { + this.$$set({ + wrapLines: e + }), pa() + } + get allowNewline() { + return this.$$.ctx[5] + } + set allowNewline(e) { + this.$$set({ + allowNewline: e + }), pa() + } + get textFormat() { + return this.$$.ctx[16] + } + set textFormat(e) { + this.$$set({ + textFormat: e + }), pa() + } + get formatInput() { + return this.$$.ctx[17] + } + set formatInput(e) { + this.$$set({ + formatInput: e + }), pa() + } + get formatPaste() { + return this.$$.ctx[18] + } + set formatPaste(e) { + this.$$set({ + formatPaste: e + }), pa() + } + get style() { + return this.$$.ctx[19] + } + set style(e) { + this.$$set({ + style: e + }), pa() + } + get innerHTML() { + return this.$$.ctx[0] + } + set innerHTML(e) { + this.$$set({ + innerHTML: e + }), pa() + } + get oninput() { + return this.$$.ctx[20] + } + set oninput(e) { + this.$$set({ + oninput: e + }), pa() + } + get enableTextStyleShortcuts() { + return this.$$.ctx[21] + } + set enableTextStyleShortcuts(e) { + this.$$set({ + enableTextStyleShortcuts: e + }), pa() + } + get confirm() { + return this.$$.ctx[22] + } + get focus() { + return this.$$.ctx[23] + } + get select() { + return this.$$.ctx[24] + } +} +const Fy = ["i", "b", "u", "strike"].map((e => ({ + tag: e, + tagOpen: new RegExp(`<${e}>`, "g"), + tagClose: new RegExp(``, "g"), + placeholderOpen: new RegExp(`___${e}O___`, "g"), + placeholderClose: new RegExp(`___${e}C___`, "g") +}))); +var Oy = e => e = ((e, t = Fy) => (t.forEach((({ + tag: t, + placeholderOpen: o, + placeholderClose: i + }) => { + e = e.replace(o, `<${t}>`).replace(i, ``) + })), e))(e = (e = ((e, t = Fy) => (t.forEach((({ + tag: t, + tagOpen: o, + tagClose: i + }) => { + e = e.replace(o, `___${t}O___`).replace(i, `___${t}C___`) + })), e))(e)).replace(/ {2,}/g, " ").replace(/\u00a0/g, " ").split("\n").join("
")), + Dy = (e, t) => T(e) ? parseFloat(e) / 100 * t : e, + By = (e, t) => ({ + x: Vo(e.x, t.width), + y: Vo(e.y, t.height) + }); + +function Wy(e, t, o) { + const i = e.slice(); + return i[276] = t[o], i[278] = o, i +} + +function Vy(e, t) { + let o, i, r, n, a, s, l, c, d, u, h, p = t[276].name + ""; + + function m() { + return t[180](t[278]) + } + return r = new Oh({ + props: { + color: t[276].color + } + }), { + key: e, + first: null, + c() { + o = kn("li"), i = kn("button"), Ia(r.$$.fragment), n = Mn(), a = kn("span"), s = Tn(p), c = Mn(), An(i, "class", "PinturaShapeListItem"), An(i, "type", "button"), An(i, "aria-label", l = "Select shape " + t[276].name), this.first = o + }, + m(e, t) { + wn(e, o, t), bn(o, i), Aa(r, i, null), bn(i, n), bn(i, a), bn(a, s), bn(o, c), d = !0, u || (h = Pn(i, "click", m), u = !0) + }, + p(e, o) { + t = e; + const n = {}; + 1048576 & o[0] && (n.color = t[276].color), r.$set(n), (!d || 1048576 & o[0]) && p !== (p = t[276].name + "") && Fn(s, p), (!d || 1048576 & o[0] && l !== (l = "Select shape " + t[276].name)) && An(i, "aria-label", l) + }, + i(e) { + d || (xa(r.$$.fragment, e), d = !0) + }, + o(e) { + va(r.$$.fragment, e), d = !1 + }, + d(e) { + e && Sn(o), La(r), u = !1, h() + } + } +} + +function _y(e) { + let t, o; + return t = new My({ + props: { + visible: !0, + points: e[12], + rotatorPoint: e[26], + enableDragEdges: e[16], + enableDragPoints: e[28], + enableRotatePoints: e[14] + } + }), t.$on("resizestart", e[37]), t.$on("resizemove", e[38]), t.$on("resizeend", e[39]), t.$on("rotatestart", e[40]), t.$on("rotatemove", e[41]), t.$on("rotateend", e[42]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 4096 & o[0] && (i.points = e[12]), 67108864 & o[0] && (i.rotatorPoint = e[26]), 65536 & o[0] && (i.enableDragEdges = e[16]), 268435456 & o[0] && (i.enableDragPoints = e[28]), 16384 & o[0] && (i.enableRotatePoints = e[14]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ny(e) { + let t, o, i, r; + const n = [jy, Hy], + a = []; + + function s(e, t) { + return "modal" === e[4] ? 0 : "inline" === e[4] ? 1 : -1 + } + return ~(t = s(e)) && (o = a[t] = n[t](e)), { + c() { + o && o.c(), i = Rn() + }, + m(e, o) { + ~t && a[t].m(e, o), wn(e, i, o), r = !0 + }, + p(e, r) { + let l = t; + t = s(e), t === l ? ~t && a[t].p(e, r) : (o && (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba()), ~t ? (o = a[t], o ? o.p(e, r) : (o = a[t] = n[t](e), o.c()), xa(o, 1), o.m(i.parentNode, i)) : o = null) + }, + i(e) { + r || (xa(o), r = !0) + }, + o(e) { + va(o), r = !1 + }, + d(e) { + ~t && a[t].d(e), e && Sn(i) + } + } +} + +function Hy(e) { + let t, o, i, r, n, a = { + formatInput: e[44], + wrapLines: !!e[13].width, + textFormat: e[13].format, + enableTextStyleShortcuts: e[5], + allowNewline: e[27], + style: e[25] + }; + return o = new zy({ + props: a + }), e[183](o), o.$on("input", e[45]), o.$on("keyup", e[48]), o.$on("cancel", e[50]), o.$on("confirm", e[49]), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaInlineInput"), An(t, "style", e[24]) + }, + m(a, s) { + wn(a, t, s), Aa(o, t, null), i = !0, r || (n = Pn(t, "focusout", e[184]), r = !0) + }, + p(e, r) { + const n = {}; + 8192 & r[0] && (n.wrapLines = !!e[13].width), 8192 & r[0] && (n.textFormat = e[13].format), 32 & r[0] && (n.enableTextStyleShortcuts = e[5]), 134217728 & r[0] && (n.allowNewline = e[27]), 33554432 & r[0] && (n.style = e[25]), o.$set(n), (!i || 16777216 & r[0]) && An(t, "style", e[24]) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(i) { + i && Sn(t), e[183](null), La(o), r = !1, n() + } + } +} + +function jy(e) { + let t, o; + return t = new fp({ + props: { + panelOffset: e[2], + onconfirm: e[49], + oncancel: e[50], + buttonCancel: { + icon: e[6].shapeIconInputCancel, + label: e[6].shapeLabelInputCancel + }, + buttonConfirm: { + icon: e[6].shapeLabelInputConfirm, + label: e[6].shapeIconInputConfirm, + hideLabel: !0 + }, + $$slots: { + default: [Uy] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 4 & o[0] && (i.panelOffset = e[2]), 64 & o[0] && (i.buttonCancel = { + icon: e[6].shapeIconInputCancel, + label: e[6].shapeLabelInputCancel + }), 64 & o[0] && (i.buttonConfirm = { + icon: e[6].shapeLabelInputConfirm, + label: e[6].shapeIconInputConfirm, + hideLabel: !0 + }), 41943296 & o[0] | 1 & o[9] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Uy(e) { + let t, o, i; + return { + c() { + t = kn("textarea"), An(t, "spellcheck", "false"), An(t, "autocorrect", "off"), An(t, "autocapitalize", "off"), An(t, "style", e[25]) + }, + m(r, n) { + wn(r, t, n), e[181](t), On(t, e[23]), o || (i = [Pn(t, "keydown", e[47]), Pn(t, "keypress", e[46]), Pn(t, "keyup", e[48]), Pn(t, "input", e[45]), Pn(t, "input", e[182])], o = !0) + }, + p(e, o) { + 33554432 & o[0] && An(t, "style", e[25]), 8388608 & o[0] && On(t, e[23]) + }, + d(r) { + r && Sn(t), e[181](null), o = !1, Kr(i) + } + } +} + +function Gy(e) { + let t, o, i, r, n; + return o = new dp({ + props: { + items: e[21], + key: e[10] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaShapeControls"), An(t, "style", e[22]) + }, + m(a, s) { + wn(a, t, s), Aa(o, t, null), i = !0, r || (n = [Pn(t, "measure", e[185]), hn($c.call(null, t))], r = !0) + }, + p(e, r) { + const n = {}; + 2097152 & r[0] && (n.items = e[21]), 1024 & r[0] && (n.key = e[10]), o.$set(n), (!i || 4194304 & r[0]) && An(t, "style", e[22]) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o), r = !1, Kr(n) + } + } +} + +function Zy(e) { + let t, o, i, n, a, s, l, c, d, u, h = [], + p = new Map, + m = e[20]; + const g = e => e[276].id; + for (let t = 0; t < m.length; t += 1) { + let o = Wy(e, m, t), + i = g(o); + p.set(i, h[t] = Vy(i, o)) + } + let $ = e[15] && _y(e), + f = e[11] && Ny(e), + y = e[17] > 0 && Gy(e); + return { + c() { + t = kn("div"), o = kn("nav"), i = kn("ul"); + for (let e = 0; e < h.length; e += 1) h[e].c(); + n = Mn(), $ && $.c(), a = Mn(), f && f.c(), s = Mn(), y && y.c(), An(o, "class", "PinturaShapeList"), An(o, "data-visible", e[18]), An(t, "class", "PinturaShapeEditor"), An(t, "tabindex", "0") + }, + m(p, m) { + wn(p, t, m), bn(t, o), bn(o, i); + for (let e = 0; e < h.length; e += 1) h[e].m(i, null); + bn(t, n), $ && $.m(t, null), bn(t, a), f && f.m(t, null), bn(t, s), y && y.m(t, null), e[186](t), c = !0, d || (u = [Pn(o, "focusin", e[53]), Pn(o, "focusout", e[54]), Pn(t, "keydown", (function() { + Jr(e[0] ? r : e[43]) && (e[0] ? r : e[43]).apply(this, arguments) + })), Pn(t, "nudge", (function() { + Jr(e[0] ? r : e[52]) && (e[0] ? r : e[52]).apply(this, arguments) + })), Pn(t, "measure", e[179]), Pn(t, "pointermove", (function() { + Jr(e[0] ? r : e[55]) && (e[0] ? r : e[55]).apply(this, arguments) + })), Pn(t, "pointerleave", (function() { + Jr(e[0] ? r : e[56]) && (e[0] ? r : e[56]).apply(this, arguments) + })), Pn(t, "interactionstart", (function() { + Jr(e[0] ? r : e[31]) && (e[0] ? r : e[31]).apply(this, arguments) + })), Pn(t, "interactionupdate", (function() { + Jr(e[0] ? r : e[33]) && (e[0] ? r : e[33]).apply(this, arguments) + })), Pn(t, "interactioncancel", (function() { + Jr(e[0] ? r : e[32]) && (e[0] ? r : e[32]).apply(this, arguments) + })), Pn(t, "interactionrelease", (function() { + Jr(e[0] ? r : e[34]) && (e[0] ? r : e[34]).apply(this, arguments) + })), Pn(t, "interactionend", (function() { + Jr(e[0] ? r : e[35]) && (e[0] ? r : e[35]).apply(this, arguments) + })), hn($c.call(null, t)), hn(pd.call(null, t)), hn(l = hd.call(null, t, { + drag: !0, + inertia: !0, + multiTouch: !1, + observeKeys: !0, + shouldStartInteraction: Xy, + getEventPosition: e[187] + }))], d = !0) + }, + p(r, n) { + e = r, 1048706 & n[0] && (m = e[20], ya(), h = Ma(h, n, g, 1, e, m, p, i, Ta, Vy, null, Wy), ba()), (!c || 262144 & n[0]) && An(o, "data-visible", e[18]), e[15] ? $ ? ($.p(e, n), 32768 & n[0] && xa($, 1)) : ($ = _y(e), $.c(), xa($, 1), $.m(t, a)) : $ && (ya(), va($, 1, 1, (() => { + $ = null + })), ba()), e[11] ? f ? (f.p(e, n), 2048 & n[0] && xa(f, 1)) : (f = Ny(e), f.c(), xa(f, 1), f.m(t, s)) : f && (ya(), va(f, 1, 1, (() => { + f = null + })), ba()), e[17] > 0 ? y ? (y.p(e, n), 131072 & n[0] && xa(y, 1)) : (y = Gy(e), y.c(), xa(y, 1), y.m(t, null)) : y && (ya(), va(y, 1, 1, (() => { + y = null + })), ba()), l && Jr(l.update) && 8 & n[0] && l.update.call(null, { + drag: !0, + inertia: !0, + multiTouch: !1, + observeKeys: !0, + shouldStartInteraction: Xy, + getEventPosition: e[187] + }) + }, + i(e) { + if (!c) { + for (let e = 0; e < m.length; e += 1) xa(h[e]); + xa($), xa(f), xa(y), c = !0 + } + }, + o(e) { + for (let e = 0; e < h.length; e += 1) va(h[e]); + va($), va(f), va(y), c = !1 + }, + d(o) { + o && Sn(t); + for (let e = 0; e < h.length; e += 1) h[e].d(); + $ && $.d(), f && f.d(), y && y.d(), e[186](null), d = !1, Kr(u) + } + } +} +const Xy = (e, t) => e.target === t; + +function Yy(e, t, o) { + let i, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, M, R, P, E, A, L, z, F, O, D, B, W, V, _, N, H, U, G, Z, X, Y, q, K, J, Q, ee, te, oe, ie, re, ae, de, he = Gr, + me = () => (he(), he = en(Me, (e => o(175, oe = e))), Me); + e.$$.on_destroy.push((() => he())); + let { + uid: ve = I() + } = t, { + ui: Se + } = t, { + disabled: ke = !1 + } = t, { + shapes: Me + } = t; + me(); + let { + selection: Ie + } = t, { + offset: Ae + } = t, { + contextRotation: ze = 0 + } = t, { + contextFlipX: Fe = !1 + } = t, { + contextFlipY: Oe = !1 + } = t, { + contextZoom: Be = 1 + } = t, { + active: We = !1 + } = t, { + opacity: Ve = 1 + } = t, { + parentRect: _e + } = t, { + rootRect: Ne + } = t, { + utilRect: Ue + } = t, { + hoverColor: Ze + } = t, { + caretColor: Xe + } = t, { + gridColor: Ye + } = t, { + snapColor: qe + } = t, { + textInputMode: Ke = "inline" + } = t, { + oninteractionstart: Je = r + } = t, { + oninteractionupdate: ot = r + } = t, { + oninteractionrelease: nt = r + } = t, { + oninteractionend: at = r + } = t, { + oninteractioncancel: st = r + } = t, { + onaddshape: lt = r + } = t, { + onupdateshape: ct = r + } = t, { + onselectshape: dt = r + } = t, { + onblurshape: ut = r + } = t, { + onremoveshape: ht = r + } = t, { + ontapshape: pt = r + } = t, { + onhovershape: gt = r + } = t, { + onhovercanvas: $t = r + } = t, { + ontapcanvas: ft = r + } = t, { + onleavecanvas: vt = r + } = t, { + beforeSelectShape: wt = (() => !0) + } = t, { + beforeDeselectShape: St = (() => !0) + } = t, { + beforeRemoveShape: kt = (() => !0) + } = t, { + beforeUpdateShape: Ct = ((e, t) => t) + } = t, { + willRenderShapeControls: Tt = j + } = t, { + willRenderShapeTextControls: Pt = j + } = t, { + willStartInteraction: Et = ((e, t) => !0) + } = t, { + mapEditorPointToImagePoint: Ot + } = t, { + mapImagePointToEditorPoint: Dt + } = t, { + eraseRadius: Bt + } = t, { + selectRadius: Wt + } = t, { + enableButtonFlipVertical: Vt = !1 + } = t, { + enableTapToAddText: _t = !0 + } = t, { + enableTextStyleControls: Nt = !0 + } = t, { + locale: Ht + } = t, { + snapThreshold: jt = 0 + } = t, { + snapPointer: Ut = !0 + } = t, { + enableSnapToContext: Gt = !0 + } = t, { + gridSize: Zt = 0 + } = t; + const Xt = e => { + if (0 === jt) return []; + let t; + return Gt && (t = { + ..._e, + x: 0, + y: 0 + }), [...oe.filter((t => t !== e)).filter((e => !Li(e))).map((e => ur({ + ...e + }, _e))), t].filter(Boolean) + }, + Yt = (e, t, o, i) => 0 === e ? { + snapTargets: [] + } : { + snapThreshold: e, + gridSize: t, + gridRect: o, + snapTargets: Xt(i) + }, + qt = Jn("isAnimated"); + on(e, qt, (e => o(176, re = e))); + const Kt = e => e.set(tn(e)), + Jt = e => tn(e).find(Li), + Qt = (e, t) => { + if (!Jt(t)) return Bi(e), io(e, t) + }, + eo = e => { + Jt(e) && e.update((e => e.filter((e => !Li(e))))) + }, + to = e => { + const t = Jt(e); + if (t) return Wi(t), Kt(e), t + }, + oo = (e, t, o = ((e, t) => ({ + ...e, + ...t + }))) => { + Jt(t) && t.update((t => t.map((t => Li(t) ? o(t, e) : t)))) + }, + io = (e, t = Me) => (t.update((t => [...t, e])), e), + ro = (e, t, o) => { + const i = Ct({ + ...e + }, t, { + ...o + }); + return gr(e, i, o), e + }, + no = (e, t) => { + const o = Te(e, t), + i = $e(e, t), + r = Math.PI / 8, + n = r * Math.round(i / r) - ze % r; + t.x = e.x + o * Math.cos(n), t.y = e.y + o * Math.sin(n) + }, + ao = Jn("keysPressed"); + on(e, ao, (e => o(177, ae = e))); + const so = (e, t, o) => 0 === e || t && o ? e : t || o ? -e : e, + lo = e => { + if (null === e.x && null === e.y) return co(); + e.x && o(138, uo = Ot({ + x: e.x, + y: 0 + }).x), e.y && o(139, ho = Ot({ + x: 0, + y: e.y + }).y) + }, + co = () => { + o(138, uo = null), o(139, ho = null) + }; + let uo = null, + ho = null; + const po = (e, t) => { + const o = Dt(e); + return Ot(be(o, t)) + }, + mo = (e, t, o) => { + const i = (o - t) / e + 1; + return Array.from({ + length: i + }, ((o, i) => t + i * e)) + }, + go = e => { + let t = [], + o = [], + i = e.points; + if (void 0 !== e.x1 && (i = [{ + x: e.x1, + y: e.y1 + }, { + x: e.x2, + y: e.y2 + }]), i) { + const e = i.map(Dt), + r = et(e), + n = e[0], + a = e[e.length - 1]; + t = [r.x, r.x + .5 * r.width, r.x + r.width, n.x, a.x], o = [r.y, r.y + .5 * r.height, r.y + r.height, n.y, a.y] + } else if (e.text || void 0 !== e.width || void 0 !== e.rx) { + let i; + if (e.text && void 0 === e.height) { + const t = ii(e.text, e); + i = it(e.x, e.y, t.width, t.height) + } else i = void 0 !== e.width ? Qe(e) : Qe({ + x: e.x - e.rx, + y: e.y - e.ry, + width: 2 * e.rx, + height: 2 * e.ry + }); + const r = xt(i).map(Dt), + n = Math.abs(e.rotation) > 0 ? mt(i, e.rotation).map(Dt) : r, + a = et(n), + s = rt(a), + l = .5 * a.width, + c = .5 * a.height; + t = [s.x - l, s.x, s.x + l], o = [s.y - c, s.y, s.y + c] + } else if (void 0 !== e.x) { + const i = Dt(e); + t = [i.x], o = [i.y] + } + return { + x: t, + y: o + } + }, + $o = (e, t, o) => { + let i, r, n, a = Number.Infinity, + s = null, + l = null; + for (let c = 0; c < e.length; c++) { + r = e[c]; + for (let e = 0; e < t.length; e++) n = t[e], i = Math.abs(r - n), i < o && (null === l || i < a) && (a = i, s = r, l = n) + } + return { + origin: s, + target: l + } + }, + fo = (e, t, o, i, r) => { + const n = { + x: null, + y: null + }, + a = { + x: null, + y: null + }, + s = t.map(go); + if (i > 0) { + const e = Dt({ + x: 0, + y: 0 + }), + t = Dt({ + x: i, + y: i + }), + o = Dt({ + x: r.width, + y: r.height + }), + n = t.x - e.x, + a = mo(n, e.x, o.x), + l = mo(n, e.y, o.y); + s.push({ + x: a, + y: l + }) + } + return s.forEach((t => { + const { + snapTranslation: i, + snapLine: r + } = ((e, t, o) => { + const i = { + x: null, + y: null + }, + r = { + x: null, + y: null + }, + n = $o(e.x, t.x, o); + null !== n.target && (i.x = n.target, r.x = n.target - n.origin); + const a = $o(e.y, t.y, o); + return null !== a.target && (i.y = a.target, r.y = a.target - a.origin), { + snapTranslation: r, + snapLine: i + } + })(e, t, o); + null !== i.x && (null === a.x || Math.abs(i.x) < Math.abs(a.x)) && (a.x = i.x || 0, n.x = r.x), null !== i.y && (null === a.y || Math.abs(i.y) < Math.abs(a.y)) && (a.y = i.y || 0, n.y = r.y) + })), { + snapTranslation: a, + snapLines: n + } + }, + yo = (e, t) => (null !== t.x && (e.x += t.x), null !== t.y && (e.y += t.y), e), + bo = (e, t, o, i) => { + const { + snapThreshold: r = 0, + gridSize: n = 0, + gridRect: a, + snapTargets: s = [] + } = i || {}; + let l = null; + if (Mi(e)) { + if (r) { + const i = ur({ + ...e + }, _e), + l = po(xi(t), o), + c = po(vi(t), o), + d = go({ + ...i, + x1: l.x, + y1: l.y, + x2: c.x, + y2: c.y + }), + { + snapTranslation: u, + snapLines: h + } = fo(d, s, r, n, a); + yo(o, u), lo(h) + } + const i = po(xi(t), o), + c = po(vi(t), o); + l = { + x1: i.x, + y1: i.y, + x2: c.x, + y2: c.y + } + } else if (e.points) { + if (r) { + const i = ur({ + ...e + }, _e), + l = go({ + ...i, + points: t.points.map((e => po(e, o))) + }), + { + snapTranslation: c, + snapLines: d + } = fo(l, s, r, n, a); + yo(o, c), lo(d) + } + l = { + points: t.points.map((e => po(e, o))) + } + } else if (Ci(e) || wi(e) || Ti(e)) { + if (r) { + const i = ur({ + ...e + }, _e), + l = po(t, o), + c = go({ + ...i, + ...l + }), + { + snapTranslation: d, + snapLines: u + } = fo(c, s, r, n, a); + yo(o, d), lo(u) + } + l = po(t, o) + } + l && (ro(e, l, _e), Mo()) + }, + xo = { + 0: 1, + 1: 0, + 2: 3, + 3: 2 + }, + vo = { + 0: 3, + 1: 2, + 2: 1, + 3: 0 + }; + let wo; + const So = () => { + if (oe.length) return oe.find(Li) + }, + ko = () => { + if (oe.length) return oe.findIndex(Li) + }, + Co = () => { + const e = So(); + if (e) return Wi(e), Mo(), e + }, + To = () => { + if (!So()) return; + const e = [...oe]; + e.splice(ko(), 1), Me.set(e) + }, + Mo = () => { + Me.set(oe) + }, + Ro = (e, t = [], o = !0) => { + t.filter(Boolean).forEach((t => delete e[t])), o && Mo() + }, + Po = (e, t, o = !0) => { + e = Object.assign(e, t), o && Mo() + }, + Io = (e, t, o, i = !0) => { + e[t] = o, i && Mo() + }, + Lo = (e, t = !0) => { + oe.forEach((t => Po(t, e, !1))), t && Mo() + }, + zo = () => [...oe].reverse().find(Ii), + Fo = () => !!zo(), + Oo = e => { + if (!kt(e)) return !1; + Me.set(oe.filter((t => t !== e))), ht(e) + }, + Do = () => { + const e = zo(); + if (!e) return; + const t = oe.filter((e => Ni(e) && _i(e))), + o = t.findIndex((t => t === e)); + if (!1 === Oo(e)) return; + if (Bo = e, t.length - 1 <= 0) return Wo(); + const i = o - 1 < 0 ? t.length - 1 : o - 1; + Ho(t[i]) + }; + let Bo = void 0; + const Wo = (e = {}) => { + const { + storePrevious: t = !0 + } = e; + Object.keys(hr).forEach((e => hr[e] = {})); + const o = No(); + t && (Bo = o), Lo({ + isSelected: !1, + isEditing: !1, + _prerender: !1 + }), o && ut(o) + }, + No = () => oe.find(Ii), + Ho = (e, t = !0) => { + if (Li(e)) return; + const o = No() || Bo, + i = Ii(e); + Bo = void 0, wt(o, e) && (Wo(), (e => { + e.isSelected = !0 + })(e), !i && dt(e), t && Mo()) + }, + jo = e => { + or && or.confirm && e.isEditing && or.confirm(), Po(e, { + isSelected: !1, + isEditing: !1, + _prerender: !1 + }), ut(e) + }, + Uo = e => { + Po(e, { + isSelected: !0, + isEditing: !0, + _prerender: "inline" === Ke + }) + }, + Go = e => { + Po(e, { + isSelected: !0, + isEditing: !1, + _prerender: !1 + }) + }, + Zo = e => { + if (!e.length) return []; + const t = e.filter(kt); + return Me.set(oe.filter((e => !t.includes(e)))), t + }, + Yo = e => { + const t = ii(e.text, e); + return it(e.x, e.y, e.width ? Math.min(e.width, t.width) : t.width, e.height ? Math.min(e.height, t.height) : t.height) + }, + qo = e => { + if (zi(e)) return Qe(e); + if (Ti(e)) return tt(e); + const t = Yo(e); + return t.width = Math.max(10, e.width || t.width), t + }, + Ko = (e, t, o = 0, i = (() => !0)) => [...e].reverse().filter(i).map((e => ({ + shape: e, + priority: 1 + }))).filter((e => { + const { + shape: i + } = e, r = ur(gi(i), _e), n = o + .5 * (r.strokeWidth || 0); + if (Ci(r)) return Ft(t, n, r, i.rotation); + if (wi(r)) { + const o = qo(r), + a = Ft(t, n, o, i.rotation); + let s = !1; + if (a && !Ii(i)) { + const a = Yo(r); + "right" !== i.textAlign || i.flipX || (a.x = o.x + o.width - a.width), "center" === i.textAlign && (a.x = o.x + .5 * o.width - .5 * a.width), s = Ft(t, n, a, i.rotation, rt(o)), s || (e.priority = -1) + } + return a + } + return Ti(r) ? ((e, t, o, i, r, n) => { + const a = It(ce(o.x, o.y), o.rx, o.ry, i, r, n, 12); + return zt(e, t, a) + })(t, n, r, i.rotation, i.flipX, i.flipY) : Mi(r) ? At(t, Math.max(16, n), xi(r), vi(r)) : Ri(r) && r.pathClose ? zt(t, n, r.points) : !!Ri(r) && (1 === r.points.length ? Ce(t, r.points[0]) < n * n : Lt(t, Math.max(16, n), r.points)) + })).sort(((e, t) => e.priority < t.priority ? 1 : e.priority > t.priority ? -1 : 0)).map((e => e.shape)), + Jo = (e, t, o, i = 0) => { + const r = Math.abs(i), + n = je(t, o), + a = Ge(n, r), + s = (({ + start: e, + end: t + }, o) => { + if (0 === o) return [ce(e.x, e.y), ce(e.x, e.y), ce(t.x, t.y), ce(t.x, t.y)]; + const i = Math.atan2(t.y - e.y, t.x - e.x), + r = Math.sin(i) * o, + n = Math.cos(i) * o; + return [ce(r + e.x, -n + e.y), ce(-r + e.x, n + e.y), ce(-r + t.x, n + t.y), ce(r + t.x, -n + t.y)] + })(a, r); + return e.filter((e => { + const t = ur(gi(e), _e); + if (Mi(t) || Ri(t)) { + const e = t.points ? [...t.points] : [xi(t), vi(t)]; + return !!Mt(a, e) + } + return ((e, t) => !!e.find((e => Rt(e, t))) || !!t.find((t => Rt(t, e))))(s, ((e, t = 12) => { + if (Ci(e)) return mt(e, e.rotation, rt(e)); + if (wi(e)) { + const t = qo(e); + return mt(t, e.rotation, rt(t)) + } + return Ti(e) ? It(ce(e.x, e.y), e.rx, e.ry, e.rotation, e.flipX, e.flipY, t) : [] + })(t)) + })) + }; + let Qo = void 0, + ei = void 0, + ti = void 0, + oi = void 0, + ri = void 0, + ni = void 0, + ai = !1, + si = !1, + li = !1; + const ci = () => { + clearTimeout(ei), ei = void 0, o(141, li = !1), co() + }; + let di = null; + const ui = e => { + const t = Eo(e.rotation) && 0 !== e.rotation; + if (Ci(e)) { + if (e.width < 1 && e.height < 1) return; + const o = rt(e), + i = xt(e); + return (e.flipX || e.flipY) && Pe(i, e.flipX, e.flipY, o.x, o.y), t ? Ee(i, e.rotation, o.x, o.y) : i + } + if (Ti(e)) { + if (e.rx < 1 && e.ry < 1) return; + const o = e, + i = xt(tt(e)); + return (e.flipX || e.flipY) && Pe(i, e.flipX, e.flipY, o.x, o.y), t ? Ee(i, e.rotation, o.x, o.y) : i + } + if (Mi(e)) return [xi(e), vi(e)]; + if (Ri(e)) { + if (e.bitmap && !e.pathClose) { + const t = et(e.points); + t.x -= .5 * e.strokeWidth, t.y -= .5 * e.strokeWidth, t.width += e.strokeWidth, t.height += e.strokeWidth; + return ui({ + ...e, + ...t + }) + } + return [...e.points] + } + if (wi(e)) { + if (e.width < 5 && e.height < 5) return; + const o = qo(e); + o.width = Math.max(10, o.width); + const i = rt(o), + r = xt(o); + return (e.flipX || e.flipY) && Pe(r, e.flipX, e.flipY, i.x, i.y), t ? Ee(r, e.rotation, i.x, i.y) : r + } + return [] + }, + hi = e => { + const t = ui(e); + let o, i; + return e.flipY ? (o = Re([t[0], t[1]]), i = ge(ce(t[1].x - t[2].x, t[1].y - t[2].y))) : (o = Re([t[2], t[3]]), i = ge(ce(t[2].x - t[1].x, t[2].y - t[1].y))), we(i, 20 / Be), { + origin: o, + dir: i + } + }, + pi = e => t => t.id === e, + mi = e => { + const t = pi(e); + return e => e.filter((e => t => !e(t))(t)) + }, + $i = e => { + const t = pi(e), + o = mi(e); + return () => Se.update((e => e.some(t) ? o(e) : e)) + }, + fi = e => { + const t = mi(e); + return (...e) => { + Se.update((o => [...t(o), ...e.filter(Boolean)])) + } + }, + yi = $i("markup-hover"), + bi = fi("markup-hover"); + let Ei; + const Ai = "markup-manipulator-segment-" + ve, + Fi = (e, t) => { + const o = e[t], + i = t - 1 < 0 ? e[e.length - 1] : e[t - 1], + r = t + 1 < e.length ? e[t + 1] : e[0], + n = xe(ue(i), o); + ge(n); + const a = be(we(n, 10), o), + s = xe(ue(r), o); + ge(s); + return [a, o, be(we(s, 10), o)] + }, + Oi = $i(Ai), + Di = fi(Ai), + Xi = (e, t) => { + if (jt <= 0) return e; + if (t) return co(), e; + const o = Ot(e), + r = Xt(), + { + snapTranslation: n, + snapLines: a + } = fo(go(o), r, jt, Zt, i); + return lo(a), yo(e, n), e + }, + Yi = ec(0); + on(e, Yi, (e => o(178, de = e))); + const qi = "markup-grid-line-" + ve, + Ki = $i(qi), + Ji = fi(qi), + Qi = "markup-snap-line", + er = $i(Qi), + tr = fi(Qi); + let or; + const rr = e => { + o(8, or.innerHTML = Oy(e), or) + }, + nr = e => { + const t = void 0 === e.value ? e.innerHTML : e.value, + o = "text" === n.format ? Ey(t).split(/
|/g).join("\n").replace(/ /g, String.fromCharCode(160)).replace(/&/g, "&") : t; + return Si(n) && !1 !== n.disableNewline ? (e => { + const t = e.split(/[\n\r]/g); + return t.length > 1 ? t.map((e => e.trim())).filter((e => e.length)).join(" ") : t[0] + })(o) : o + }, + ar = () => { + const e = nr(or), + t = ji(n, e), + o = !0 === t ? e : t; + let i = E.x, + r = E.y; + if (!n.height) { + const e = mt({ + ...L + }, n.rotation), + t = ii(o, c), + a = mt({ + x: i, + y: r, + ...t + }, n.rotation), + [s, , l] = e, + [d, , u] = a; + let h = s, + p = d; + n.flipX && (h = l, p = u); + const m = xe(ue(h), p); + i += m.x, r += m.y + } + Po(n, { + x: T(P.x) ? Vo(i, _e.width) : i, + y: T(P.y) ? Vo(r, _e.height) : r, + text: o + }) + }, + sr = () => { + let e = s; + s && Co(), or && or.confirm && or.confirm(), ar(), Go(n), e ? lt(n) : ct(n) + }, + lr = () => { + s ? To() : (Po(n, { + text: P.text, + x: P.x, + y: P.y + }), Go(n)) + }, + cr = (e, t, { + flipX: o, + flipY: i, + rotation: r + }, n = "top left") => { + let a, s; + const [l, c, d, u] = mt(e, r), [h, p, m, g] = mt(t, r); + if ("top center" === n) { + a = Re(i ? [u, d] : [l, c]), s = Re(i ? [g, m] : [h, p]) + } else "top right" === n && !o || "top left" === n && o ? (a = i ? d : c, s = i ? m : p) : (a = i ? u : l, s = i ? g : h); + return xe(ue(a), s) + }, + dr = (e, t, o) => ce(T(e.x) ? Vo(t.x + o.x, _e.width) : t.x + o.x, T(e.y) ? Vo(t.y + o.y, _e.height) : t.y + o.y), + hr = {}, + pr = () => Uo(n), + $r = () => { + const e = He(ii(n.text, c), (e => Math.ceil(e))), + t = Ao(n, "height"), + o = !t && Ao(n, "width"), + i = n.id; + let r = hr[i]; + r || (hr[i] = {}, r = hr[i]); + const a = e => { + const { + width: t, + ...o + } = c, i = ii(n.text, o), r = cr(it(c.x, c.y, e.width, e.height), it(c.x, c.y, i.width, i.height), c, "top " + n.textAlign), a = !1 !== c.disableNewline; + Ro(n, ["width", "height", a && "textAlign"]), Po(n, { + ...dr(n, c, r) + }) + }, + s = t => { + const o = De(r.width || c.width || e.width, e.height), + i = r.textAlign || "left", + a = cr(it(c.x, c.y, t.width, t.height), it(c.x, c.y, o.width, o.height), c, "top " + i); + Ro(n, ["height"]), Po(n, { + ...dr(n, c, a), + width: T(n.width) ? Vo(o.width, _e.width) : o.width, + textAlign: i + }) + }, + l = t => { + const o = De(r.width || e.width, r.height || e.height), + i = r.textAlign || "left", + a = cr(it(c.x, c.y, t.width, t.height), it(c.x, c.y, o.width, o.height), c, "top " + i); + Po(n, { + ...dr(n, c, a), + width: T(n.width) ? Vo(o.width, _e.width) : o.width, + height: T(n.width) ? Vo(o.height, _e.height) : o.height, + textAlign: i + }) + }; + if (t) { + r.textAlign = n.textAlign, r.width = c.width, r.height = c.height; + const e = De(c.width, c.height); + Ui(n, "auto-height") ? s(e) : Ui(n, "auto-width") && a(e) + } else if (o) { + r.textAlign = n.textAlign, r.width = c.width; + const t = De(c.width, e.height); + Ui(n, "auto-width") ? a(t) : Ui(n, "fixed-size") && l(t) + } else { + r.textAlign = n.textAlign; + const t = De(Math.ceil(e.width), Math.ceil(e.height)); + Ui(n, "fixed-size") ? l(t) : Ui(n, "auto-height") && s(t) + } + }, + fr = e => { + e.stopPropagation(); + const t = n.flipX || !1; + Io(n, "flipX", !t), ct(n) + }, + yr = e => { + e.stopPropagation(); + const t = n.flipY || !1; + Io(n, "flipY", !t), ct(n) + }, + br = e => { + Io(n, "opacity", e) + }, + xr = e => { + br(e), ct(n) + }, + vr = e => { + e.stopPropagation(), e.target.blur(), Do() + }, + wr = e => { + e.stopPropagation(); + oe.findIndex((e => e === n)) !== oe.length - 1 && (Me.set(oe.filter((e => e !== n)).concat([n])), ct(n)) + }, + Sr = e => { + e.stopPropagation(), kr() + }, + kr = () => { + const e = gi(n); + e.id = I(); + const t = ce(50, -50); + if (Ao(e, "points")) { + const o = mr(e, ["points"], _e); + o.points.forEach((e => { + e.x += t.x, e.y += t.y + })), gr(e, o, _e) + } else if (Mi(e)) { + const o = mr(e, ["x1", "y1", "x2", "y2"], _e); + o.x1 += t.x, o.y1 += t.y, o.x2 += t.x, o.y2 += t.y, gr(e, o, _e) + } else { + const t = mr(e, ["x", "y"], _e); + t.x += 50, t.y -= 50, gr(e, t, _e) + } + Me.set([...oe, e]), lt(e), Ho(e) + }, + Cr = ec(0, { + stiffness: .2, + damping: .7 + }); + let Tr; + on(e, Cr, (e => o(17, ie = e))); + const Mr = (e, t) => { + const { + disableTextLayout: o = [] + } = t; + return "height" in t ? o.includes("auto-height") ? e.shapeIconButtonTextLayoutAutoWidth : e.shapeIconButtonTextLayoutAutoHeight : "width" in t ? o.includes("auto-width") ? e.shapeIconButtonTextLayoutFixedSize : e.shapeIconButtonTextLayoutAutoWidth : o.includes("fixed-size") ? e.shapeIconButtonTextLayoutAutoHeight : e.shapeIconButtonTextLayoutFixedSize + }, + Rr = (e, t) => { + const { + disableTextLayout: o = [] + } = t; + return "height" in t ? o.includes("auto-height") ? e.shapeTitleButtonTextLayoutAutoWidth : e.shapeTitleButtonTextLayoutAutoHeight : "width" in t ? o.includes("auto-width") ? e.shapeTitleButtonTextLayoutFixedSize : e.shapeTitleButtonTextLayoutAutoWidth : o.includes("fixed-size") ? e.shapeTitleButtonTextLayoutAutoHeight : e.shapeTitleButtonTextLayoutFixedSize + }; + let Pr = !1; + let Er = le(), + Ir = void 0; + const Ar = e => { + gt(e), o(142, Ei = e) + }; + let Lr; + Yn((() => { + er(), Ki(), Oi(), yi() + })); + return e.$$set = e => { + "uid" in e && o(57, ve = e.uid), "ui" in e && o(58, Se = e.ui), "disabled" in e && o(0, ke = e.disabled), "shapes" in e && me(o(1, Me = e.shapes)), "selection" in e && o(59, Ie = e.selection), "offset" in e && o(2, Ae = e.offset), "contextRotation" in e && o(60, ze = e.contextRotation), "contextFlipX" in e && o(61, Fe = e.contextFlipX), "contextFlipY" in e && o(62, Oe = e.contextFlipY), "contextZoom" in e && o(63, Be = e.contextZoom), "active" in e && o(64, We = e.active), "opacity" in e && o(65, Ve = e.opacity), "parentRect" in e && o(66, _e = e.parentRect), "rootRect" in e && o(3, Ne = e.rootRect), "utilRect" in e && o(67, Ue = e.utilRect), "hoverColor" in e && o(68, Ze = e.hoverColor), "caretColor" in e && o(69, Xe = e.caretColor), "gridColor" in e && o(70, Ye = e.gridColor), "snapColor" in e && o(71, qe = e.snapColor), "textInputMode" in e && o(4, Ke = e.textInputMode), "oninteractionstart" in e && o(72, Je = e.oninteractionstart), "oninteractionupdate" in e && o(73, ot = e.oninteractionupdate), "oninteractionrelease" in e && o(74, nt = e.oninteractionrelease), "oninteractionend" in e && o(75, at = e.oninteractionend), "oninteractioncancel" in e && o(76, st = e.oninteractioncancel), "onaddshape" in e && o(77, lt = e.onaddshape), "onupdateshape" in e && o(78, ct = e.onupdateshape), "onselectshape" in e && o(79, dt = e.onselectshape), "onblurshape" in e && o(80, ut = e.onblurshape), "onremoveshape" in e && o(81, ht = e.onremoveshape), "ontapshape" in e && o(82, pt = e.ontapshape), "onhovershape" in e && o(83, gt = e.onhovershape), "onhovercanvas" in e && o(84, $t = e.onhovercanvas), "ontapcanvas" in e && o(85, ft = e.ontapcanvas), "onleavecanvas" in e && o(86, vt = e.onleavecanvas), "beforeSelectShape" in e && o(87, wt = e.beforeSelectShape), "beforeDeselectShape" in e && o(88, St = e.beforeDeselectShape), "beforeRemoveShape" in e && o(89, kt = e.beforeRemoveShape), "beforeUpdateShape" in e && o(90, Ct = e.beforeUpdateShape), "willRenderShapeControls" in e && o(91, Tt = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(92, Pt = e.willRenderShapeTextControls), "willStartInteraction" in e && o(93, Et = e.willStartInteraction), "mapEditorPointToImagePoint" in e && o(94, Ot = e.mapEditorPointToImagePoint), "mapImagePointToEditorPoint" in e && o(95, Dt = e.mapImagePointToEditorPoint), "eraseRadius" in e && o(96, Bt = e.eraseRadius), "selectRadius" in e && o(97, Wt = e.selectRadius), "enableButtonFlipVertical" in e && o(98, Vt = e.enableButtonFlipVertical), "enableTapToAddText" in e && o(99, _t = e.enableTapToAddText), "enableTextStyleControls" in e && o(5, Nt = e.enableTextStyleControls), "locale" in e && o(6, Ht = e.locale), "snapThreshold" in e && o(100, jt = e.snapThreshold), "snapPointer" in e && o(101, Ut = e.snapPointer), "enableSnapToContext" in e && o(102, Gt = e.enableSnapToContext), "gridSize" in e && o(103, Zt = e.gridSize) + }, e.$$.update = () => { + var t, r; + 16 & e.$$.dirty[2] | 1024 & e.$$.dirty[3] && o(166, i = Zt > 0 ? { + x: 0, + y: 0, + ..._e + } : void 0), 1 & e.$$.dirty[0] | 1048576 & e.$$.dirty[5] && o(146, n = !ke && oe && (So() || zo())), 4194304 & e.$$.dirty[4] && o(173, a = !!n), 4194304 & e.$$.dirty[4] && o(160, s = n && Li(n)), 4194304 & e.$$.dirty[4] | 32 & e.$$.dirty[5] && o(10, l = n && !s ? n.id : void 0), 8 & e.$$.dirty[0] | 16 & e.$$.dirty[2] | 4194304 & e.$$.dirty[4] && o(13, c = Ne && n && ur(gi(n), _e)), 4194304 & e.$$.dirty[4] | 32 & e.$$.dirty[5] && o(144, d = !(!n || !s)), 8192 & e.$$.dirty[0] | 8 & e.$$.dirty[2] | 4194304 & e.$$.dirty[4] && o(172, u = n && Ve && ui(c) || []), 4194304 & e.$$.dirty[4] && o(174, h = n && (Gi(t = n) && Zi(t) && !0 !== t.disableResize && (zi(t) || ki(t) || Ti(t) || Mi(t) || Ri(t) && Ao(t, "pathClose"))) && !Pi(n)), 4194304 & e.$$.dirty[4] && o(14, p = n && (e => Gi(e) && !0 !== e.disableRotate && (zi(e) || Ao(e, "text") || Ti(e)))(n) && !Pi(n)), 4194304 & e.$$.dirty[4] | 524288 & e.$$.dirty[5] && o(16, m = h && Ao(n, "text") && !n.height ? [ + [1, 2], + [3, 0] + ] : (!n || !Mi(n) && !Ri(n)) && h), 65536 & e.$$.dirty[0] | 4194304 & e.$$.dirty[4] | 524288 & e.$$.dirty[5] && o(28, g = !!n && (!Array.isArray(m) && h)), 4194304 & e.$$.dirty[4] | 131072 & e.$$.dirty[5] && o(15, $ = n && u.length > 1), 4 & e.$$.dirty[3] | 131072 & e.$$.dirty[5] && o(170, f = u.map(Dt)), 4 & e.$$.dirty[0] | 32768 & e.$$.dirty[5] && o(12, y = f.map((e => ce(e.x - Ae.x, e.y - Ae.y)))), 4194304 & e.$$.dirty[4] | 262144 & e.$$.dirty[5] && o(27, b = a && (ki(n) ? !Ao(n, "disableNewline") || !n.disableNewline : !1 === n.disableNewline)), 4 & e.$$.dirty[3] | 262144 & e.$$.dirty[4] && (Ei && Dt && !Ii(Ei) && _i(Ei) ? (e => { + const t = ui(ur(gi(e), _e)); + if (!t) return; + const o = t.map(Dt), + i = !!e.pathClose || !(!e.bitmap && (Ri(e) || Mi(e))), + r = "hook" === e.selectionStyle, + n = r ? o.map(((e, t, o) => ({ + id: "markup-hover", + points: Fi(o, t), + strokeColor: [0, 0, 0, .1], + strokeWidth: 2 + }))) : [{ + id: "markup-hover", + points: o.map((e => ce(e.x + 1, e.y + 1))), + strokeColor: [0, 0, 0, .1], + strokeWidth: 2, + pathClose: i + }], + a = r ? o.map(((e, t, o) => ({ + id: "markup-hover", + points: Fi(o, t), + strokeColor: Ze, + strokeWidth: 2 + }))) : [{ + id: "markup-hover", + points: o, + strokeColor: Ze, + strokeWidth: 2, + pathClose: i + }]; + bi(...n, ...a) + })(Ei) : yi()), 61440 & e.$$.dirty[0] | 8 & e.$$.dirty[2] && o(171, x = $ && p && Ve && y && (e => { + const t = hi(e), + o = Dt({ + x: t.origin.x + t.dir.x, + y: t.origin.y + t.dir.y + }); + return { + origin: Dt(t.origin), + position: o + } + })(c)), 4 & e.$$.dirty[0] | 65536 & e.$$.dirty[5] && o(26, v = x && ce(x.position.x - Ae.x, x.position.y - Ae.y)), 4194304 & e.$$.dirty[5] && o(165, C = !!(ae || []).find((e => [91, 93, 17].includes(e)))), 256 & e.$$.dirty[3] | 1024 & e.$$.dirty[5] && o(167, w = !(C || !Ut)), 8 & e.$$.dirty[2] | 4718592 & e.$$.dirty[4] | 36896 & e.$$.dirty[5] && n && f && Ve > 0 && ((e, t, o) => { + if (!_i(t)) return; + const i = Ri(t), + r = i && Ao(t, "pathClose"), + n = r && (e => e.strokeWidth && ((e, t) => { + const o = e.strokeColor; + return !!o && (3 === o.length || o[3] > 0) + })(e))(t), + a = Li(t), + s = Pi(t), + l = "hook" === t.selectionStyle, + { + selectionOpacity: c = 1 + } = t; + if (a && i && !r) return; + const d = [], + h = [...f], + p = h[h.length - 1], + m = h[0], + g = (s ? .05 : .1) * e * c, + $ = g > 0, + y = (s ? .5 : 1) * e * c, + b = y > 0, + v = [0, 0, 0], + w = [1, 1, 1], + S = s ? 1 : 1.5; + ae.includes(16) && p && o && no(p, o); + const k = (h.length && r && a && o ? Ce(m, o) : 1 / 0) <= 256, + C = (h.length && r && a && o ? Ce(p, o) : 1 / 0) <= 256; + !k && o && h.push(o); + const T = h.length > 1, + M = !!t.pathClose || !(!t.bitmap && (Ri(t) || Mi(t))) || h.length > 2 && k; + T && $ && (l ? d.push(...h.map(((e, t, o) => ({ + id: Ai, + points: Fi(o, t), + strokeColor: v, + strokeWidth: 2, + opacity: g + })))) : d.push({ + id: Ai, + points: h.map((e => ce(e.x + 1, e.y + 1))), + pathClose: M, + strokeColor: v, + strokeWidth: 2, + opacity: g + })), r && $ && d.push(...h.map((e => ({ + id: Ai, + ...e, + rx: 2 * S, + ry: 2 * S, + backgroundColor: v, + opacity: g + })))), x && $ && d.push({ + id: Ai, + points: [ce(x.origin.x + 1, x.origin.y + 1), ce(x.position.x + 1, x.position.y + 1)], + strokeColor: v, + strokeWidth: 2, + opacity: g + }), T && b && (l ? d.push(...h.map(((e, t, o) => ({ + id: Ai, + points: Fi(o, t), + strokeColor: w, + strokeWidth: S, + opacity: y + })))) : d.push({ + id: Ai, + points: h, + pathClose: M, + strokeColor: w, + strokeWidth: S, + backgroundColor: a && r && t.backgroundColor && t.backgroundColor[3] > 0 ? t.backgroundColor : [0, 0, 0, 0], + opacity: y + })), r && d.push(...h.map((e => ({ + id: Ai, + ...e, + rx: 3 * S, + ry: 3 * S, + backgroundColor: [.5, .5, .5], + strokeWidth: S, + strokeColor: w + })))), r && a && f.length >= 3 && d.push({ + ...m, + id: Ai, + rx: S * (k ? 5 : 4), + ry: S * (k ? 5 : 4), + backgroundColor: k ? Ze : [.5, .5, .5], + strokeWidth: S, + strokeColor: w + }), r && a && n && !k && u.length >= 2 && d.push({ + ...p, + id: Ai, + rx: S * (C ? 5 : 4), + ry: S * (C ? 5 : 4), + backgroundColor: C ? Ze : [.5, .5, .5], + strokeWidth: S, + strokeColor: w + }), x && b && !l && d.push({ + id: Ai, + points: [{ + x: x.origin.x, + y: x.origin.y + }, { + x: x.position.x, + y: x.position.y + }], + strokeColor: w, + strokeWidth: S, + opacity: y + }), Di(...d) + })(Ve, n, s && Ri(n) ? Xi({ + ...Ir + }, !w) : void 0), 4194304 & e.$$.dirty[4] && (n || Oi()), 262144 & e.$$.dirty[4] && o(168, S = !!Ei), 65536 & e.$$.dirty[4] && o(169, k = !!oi), 524288 & e.$$.dirty[4] | 28672 & e.$$.dirty[5] && (!Ir || k || S || Xi({ + ...Ir + }, !w)), 256 & e.$$.dirty[2] | 1028 & e.$$.dirty[3] | 8390656 & e.$$.dirty[5] && Zt > 0 && i && Dt && ((e, t, o, i) => { + const r = Dt({ + x: 0, + y: 0 + }), + n = Dt({ + x: e, + y: e + }), + a = Dt({ + x: t.width, + y: t.height + }), + s = n.x - r.x; + if (Yi.set(s > 6 ? 1 : 0), i <= 0) return Ki(); + const l = mo(s, r.x, a.x).map((e => ({ + id: qi, + opacity: i, + points: [{ + x: e, + y: r.y + }, { + x: e, + y: a.y + }], + strokeWidth: 1, + strokeColor: o + }))), + c = mo(s, r.y, a.y).map((e => ({ + id: qi, + opacity: i, + points: [{ + x: r.x, + y: e + }, { + x: a.x, + y: e + }], + strokeWidth: 1, + strokeColor: o + }))); + Ji(...c, ...l) + })(Zt, i, Ye, de), 512 & e.$$.dirty[2] | 4 & e.$$.dirty[3] | 49152 & e.$$.dirty[4] | 1024 & e.$$.dirty[5] && Dt && (C ? er() : ((e, t, o) => { + if (null === e && null === t) return er(); + let i, r; + null !== e && (i = { + id: Qi, + strokeColor: o, + strokeWidth: 1.5, + points: [Dt({ + x: e, + y: 0 + }), Dt({ + x: e, + y: _e.height + })] + }), null !== t && (r = { + id: Qi, + strokeColor: o, + strokeWidth: 1.5, + points: [Dt({ + x: 0, + y: t + }), Dt({ + x: _e.width, + y: t + })] + }), tr(i, r) + })(uo, ho, qe)), 4 & e.$$.dirty[2] && (e => { + if (!e) return Lo({ + _prerender: !1 + }); + const t = oe.find((e => e.isEditing)); + t && Po(t, { + _prerender: "inline" === Ke + }) + })(We), 4194304 & e.$$.dirty[5] && ae && ae.length && (() => { + const [e] = ae; + 8 !== e && 46 !== e || Fo() && (n.isEditing || setTimeout((() => Do()), 0)) + })(), 272 & e.$$.dirty[0] && or && "inline" === Ke && or.focus(), 4194304 & e.$$.dirty[4] && o(164, M = n && wi(n)), 4194304 & e.$$.dirty[4] | 512 & e.$$.dirty[5] && o(11, R = M && !1 !== ji(n) && Pi(n)), 2048 & e.$$.dirty[0] && o(159, P = R ? { + ...n + } : void 0), 16 & e.$$.dirty[2] | 16 & e.$$.dirty[5] && o(161, E = P && ur({ + ...P + }, _e)), 64 & e.$$.dirty[5] && o(163, A = E && ii(E.text, E)), 320 & e.$$.dirty[5] && (L = E && it(E.x, E.y, A.width, A.height)), 2048 & e.$$.dirty[0] | 4194304 & e.$$.dirty[4] && o(23, z = R ? n.text : ""), 2056 & e.$$.dirty[0] | 16 & e.$$.dirty[2] | 4194304 & e.$$.dirty[4] && o(162, F = Ne && n && R && ur({ + ...gi(n), + width: Eo(n.width) ? Math.floor(n.width) : void 0, + height: Eo(n.height) ? Math.floor(n.height) : void 0 + }, _e)), 2064 & e.$$.dirty[0] | 128 & e.$$.dirty[5] && o(25, O = R && ((e, t) => { + const { + textAlign: o = "left", + fontFamily: i = "sans-serif", + fontWeight: r = "normal", + fontStyle: n = "normal", + letterSpacing: a = "normal", + textShadowX: s = 0, + textShadowY: l = 0, + textShadowBlur: c = 0, + textShadowColor: d, + textOutlineWidth: u = 0, + textOutlineColor: h + } = e, p = "!important", m = `caret-color:${B};text-align:${o}${p};font-family:${i}${p};font-weight:${r}${p};font-style:${n}${p};letter-spacing:${Eo(a)?a+"px":"normal"}${p}`; + if ("modal" === t) return m; + const g = u ? `;-webkit-text-stroke:${2*u}px ${_o(h)} ${p}` : "", + $ = c || s || l ? `;text-shadow:${s}px ${l}px ${c}px ${_o(d)} ${p}` : ""; + let f = e.fontSize, + y = 1, + b = ""; + f > 1e3 && Xo() && (y = f / 1e3, b = `transform-origin:0 0;transform:scale(${y})`, f = 1e3); + let x = e.lineHeight / y; + const v = _o(e.color), + w = .5 * Math.max(0, f - x); + return `--font-scalar:${y};--bottom-inset:${w}px;padding:${w}px 0 0${p};color:${v}${p};font-size:${f}px${p};line-height:${x}px${p};${m};${b}${g}${$}` + })(F, Ke)), 2052 & e.$$.dirty[0] | 536870912 & e.$$.dirty[1] | 2 & e.$$.dirty[2] | 128 & e.$$.dirty[5] && o(24, D = R && ((e, t, o, i) => { + let r, a; + e.width && e.height ? (r = rt(e), a = Le(e)) : (a = ii(n.text, c), a.width = c.width || a.width, r = ce(e.x + .5 * a.width, e.y + .5 * a.height)); + const s = Math.max(0, e.fontSize - e.lineHeight) + e.lineHeight, + l = Dt(r); + let d = l.x - t.x - .5 * a.width, + u = l.y - t.y - .5 * a.height, + h = e.flipX, + p = e.flipY, + m = e.rotation; + Fe && Oe ? (h = !h, p = !p) : Fe ? (h = !h, m = -m) : Oe && (p = !p, m = -m), m += i; + const g = o * (h ? -1 : 1), + $ = o * (p ? -1 : 1); + return `--line-height:${s}px;width:${a.width}px;height:${a.height}px;transform:translate(${d}px,${u}px) rotate(${m}rad) scale(${g}, ${$})` + })(F, Ae, Be, ze)), 128 & e.$$.dirty[2] && (B = _o(Xe)), 2320 & e.$$.dirty[0] && R && or && "inline" === Ke && rr(z), 72351744 & e.$$.dirty[4] && o(150, W = n && !d ? n : W), 67108864 & e.$$.dirty[4] && o(152, V = W && Hi(W)), 67108864 & e.$$.dirty[4] && o(147, _ = W && Ui(W)), 67108864 & e.$$.dirty[4] && o(149, N = W && (e => !0 !== e.disableDuplicate && Zi(e))(W)), 67108864 & e.$$.dirty[4] && o(148, H = W && Ni(W)), 67108864 & e.$$.dirty[4] && o(151, U = W && (e => !0 !== e.disableReorder)(W)), 67108864 & e.$$.dirty[4] && o(145, G = W && !1 !== ji(W)), 67108864 & e.$$.dirty[4] && o(153, Z = W && Ao(W, "backgroundImage") && Vi(W, "opacity")), 4194304 & e.$$.dirty[4] && o(155, X = n && "html" === n.format), 5242880 & e.$$.dirty[4] | 1 & e.$$.dirty[5] && o(158, Y = n && (!d || X)), 131072 & e.$$.dirty[4] | 2097160 & e.$$.dirty[5] && Cr.set(Y && !li ? 1 : 0, { + hard: !1 === re + }), 4096 & e.$$.dirty[0] | 12 & e.$$.dirty[5] && o(157, q = Y && y.length ? (r = et(y), ye(ce(r.x + .5 * r.width, r.y), Hd)) : q), 512 & e.$$.dirty[0] | 32 & e.$$.dirty[2] | 4 & e.$$.dirty[5] && o(156, K = q && Tr && Ue && (e => { + const t = Ue.x, + o = Ue.y, + i = t + Ue.width; + let r = Math.max(e.x - .5 * Tr.width, t), + n = Math.max(e.y - Tr.height - 16, o); + return r + Tr.width > i && (r = i - Tr.width), ce(r, n) + })(q)), 131072 & e.$$.dirty[0] | 2 & e.$$.dirty[5] && o(22, J = K && `transform: translate(${K.x}px, ${K.y}px);opacity:${ie}`), 2048 & e.$$.dirty[0] && o(154, Q = R ? "text" : "shape"), 1088 & e.$$.dirty[0] | 1610612736 & e.$$.dirty[2] | 32 & e.$$.dirty[3] | 2145386496 & e.$$.dirty[4] | 1048577 & e.$$.dirty[5] && o(21, ee = "text" === Q && Pt && X ? zp((() => Pt([ + ["div", "text-styles", { + class: "PinturaShapeControlsGroup" + }, + [...[ + ["bold", { + label: "B", + style: "font-weight:900;", + title: "Bold", + shortcut: ["CMD", "B"] + }], + ["italic", { + label: "I", + style: "font-family:Times New Roman;font-style:italic;", + title: "Italic", + shortcut: ["CMD", "I"] + }], + ["underline", { + label: "U", + style: "text-decoration:underline;", + title: "Underline", + shortcut: ["CMD", "U"] + }], + ["strikeThrough", { + label: "S", + style: "text-decoration:line-through;", + title: "Strikethrough", + shortcut: ["CMD", "S"] + }] + ].map((([e, t]) => ["Button", "style-" + e, { + onclick: () => document.execCommand(e), + ...t, + style: "font-size:1.25em;text-underline-offset:1px;text-decoration-thickness:1.5px;font-weight:400;" + t.style + }]))] + ], + ["div", "text-reset", { + class: "PinturaShapeControlsGroup" + }, + [ + ["Button", "style-reset", { + onclick: () => document.execCommand("removeFormat"), + style: "font-weight:400;", + label: 'T×', + title: "Remove styles" + }] + ] + ] + ], l))) : "shape" === Q && Tt && l ? zp((() => Tt([Z && ["div", "alpha", { + class: "PinturaShapeControlsGroup" + }, + [ + ["ToggleSlider", "adjust-opacity", { + onrelease: xr, + onchange: br, + step: .01, + value: Ao(n, "opacity") ? n.opacity : 1, + label: (e, t, o) => Math.round(e / o * 100) + "%", + min: 0, + max: 1, + direction: "x" + }] + ] + ], + ["div", "beta", { + class: "PinturaShapeControlsGroup" + }, + [V && ["Button", "flip-horizontal", { + onclick: fr, + label: Ht.shapeTitleButtonFlipHorizontal, + icon: Ht.shapeIconButtonFlipHorizontal, + hideLabel: !0 + }], V && Vt && ["Button", "flip-vertical", { + onclick: yr, + label: Ht.shapeTitleButtonFlipVertical, + icon: Ht.shapeIconButtonFlipVertical, + hideLabel: !0 + }], U && ["Button", "to-front", { + onclick: wr, + label: Ht.shapeTitleButtonMoveToFront, + icon: Ht.shapeIconButtonMoveToFront, + hideLabel: !0, + disabled: oe[oe.length - 1] === W + }], N && ["Button", "duplicate", { + onclick: Sr, + label: Ht.shapeTitleButtonDuplicate, + icon: Ht.shapeIconButtonDuplicate, + shortcut: ["CMD", "D"], + hideLabel: !0 + }], H && ["Button", "remove", { + onclick: vr, + label: Ht.shapeTitleButtonRemove, + icon: Ht.shapeIconButtonRemove, + shortcut: ["Backspace"], + hideLabel: !0 + }]].filter(Boolean) + ], G && _ && ["div", "gamma", { + class: "PinturaShapeControlsGroup" + }, + [ + ["Button", "text-layout", { + onclick: $r, + label: du(Rr, Ht, n), + icon: du(Mr, Ht, n), + hideLabel: !0 + }] + ] + ], G && ["div", "delta", { + class: "PinturaShapeControlsGroup" + }, + [ + ["Button", "edit-text", { + label: Ht.shapeLabelInputText, + onclick: pr + }] + ] + ] + ].filter(Boolean), l))) : []), 64 & e.$$.dirty[0] | 1048576 & e.$$.dirty[5] && o(20, te = oe.filter(_i).filter((e => e.id)).filter((e => !Li(e))).map((e => ({ + id: e.id, + color: wi(e) ? e.color : Mi(e) ? e.strokeColor : e.backgroundColor, + name: e.name || Ht["shapeLabelTool" + Ya(ir(e))] + })))) + }, [ke, Me, Ae, Ne, Ke, Nt, Ht, Ho, or, Tr, l, R, y, c, p, $, m, ie, Pr, Lr, te, ee, J, z, D, O, v, b, g, qt, ao, e => { + const { + origin: t + } = e.detail; + o(140, oi = void 0), ri = void 0, ni = void 0, ai = !1, ti = void 0, si = !1, co(), clearTimeout(ei), ei = setTimeout((() => o(141, li = !0)), 250); + const i = So(); + if (!i || Ri(i) && Ao(i, "pathClose") || Co(), Qo = Ot(ue(t)), i && Ri(i) && Ao(i, "pathClose")) return Je(e); + const r = Ko(oe, Qo, Wt, (e => _i(e))), + a = r.length && r.shift(); + if (n && Pi(n) && (sr(), _t && (si = !0)), !a && n && Pi(n) && jo(n), !Et(t)) return; + if (a && Ii(a)) return ai = !0, o(140, oi = a), ri = gi(oi), void(ni = ur(gi(oi), _e)); + ti = a || void 0; + !Je(e) && a && (Ho(a), o(140, oi = a), ri = gi(oi), ni = ur(gi(oi), _e)) + }, e => { + ci(), st(e) + }, e => { + const { + translation: t, + ctrlKey: o, + metaKey: r, + shiftKey: n, + position: a + } = e.detail; + if (oi) { + if (!Zi(oi)) return; + if (Pi(oi)) return; + if (n) { + let e = Math.abs(t.x), + o = Math.abs(t.y); + "x" === di && (o -= 64), "y" === di && (e -= 64), e > o ? (t.y = 0, di = "x") : o > e && (t.x = 0, di = "y") + } else di = null; + return bo(oi, ni, t, { + ...Yt(o || r ? 0 : jt, Zt, i, oi) + }) + } + ot(e) + }, e => { + ci(), oi ? Pi(oi) ? lr() : e.detail.isTap && ai && wi(oi) && !1 !== ji(oi) && Uo(oi) : nt(e) + }, e => { + const t = ti && e.detail.isTap; + if (e.detail.isTap && setTimeout((() => { + ft({ + target: oi || ti, + position: Qo + }, 0) + })), oi) return pt(oi), i = oi, r = ri, JSON.stringify(i) !== JSON.stringify(r) && ct(oi), void o(140, oi = void 0); + var i, r; + const n = No(), + a = !n || St(n, ti || void 0); + a && Wo({ + storePrevious: !1 + }), at(e), a && t && Ho(ti) + }, Yi, e => { + o(141, li = !0), o(140, oi = n), ni = c + }, e => { + if (!oi) return void o(141, li = !1); + const { + translation: t, + indexes: n, + shiftKey: a, + ctrlKey: s, + metaKey: l + } = e.detail; + ((e, t, o, i, n) => { + const { + snapThreshold: a = 0, + gridSize: s = 0, + gridRect: l, + snapTargets: c = [] + } = n || {}, d = a ? (e, t, o) => { + const { + snapTranslation: i, + snapLines: r + } = fo(go(e), c, a, s, l); + yo(t, i), lo(r); + const n = po(o(), t); + e.x = n.x, e.y = n.y + } : r; + if (Mi(e) || Ri(e) && Ao(e, "pathClose")) { + const [r] = o, n = ae.includes(16) ? no : (e, t) => t; + let a, s, l; + if (Mi(e)) 0 === r ? (a = () => xi(t), s = e => n(vi(t), e), l = (e, t) => { + e.x1 = t.x, e.y1 = t.y + }) : 1 === r && (a = () => vi(t), s = e => n(xi(t), e), l = (e, t) => { + e.x2 = t.x, e.y2 = t.y + }); + else { + const e = t.points; + a = () => ({ + ...e[r] + }), s = t => { + const o = e[xy(r - 1, e)], + i = e[xy(r + 1, e)]; + n(o, t), n(i, t) + }, l = (e, t) => e.points[r] = t + } + const c = po(a(), i); + d(c, i, a), s(c), l(e, c) + } else if (zi(e) || Ti(e) || ki(e)) { + let r, a, s = !1; + if (Ti(e)) r = tt(t); + else if (zi(e)) r = Qe(t); + else { + s = !0, r = Qe(t); + const e = ii(t.text, t); + r.height = e.height + } + e.aspectRatio ? a = e.aspectRatio : n.shiftKey && !s && (a = r.width / r.height); + const l = Qe(r), + c = rt(l), + u = e.rotation, + h = xt(l), + p = mt(l, u); + if (1 === o.length) { + let t = o[0]; + e.flipX && (t = xo[t]), e.flipY && (t = vo[t]); + const [r, n, s, l] = h, m = Dt(p[t]), g = be({ + ...m + }, i), $ = Ot(g); + d($, i, (() => Ot(m))); + const f = ce($.x - p[t].x, $.y - p[t].y), + y = pe(ue(f), -u), + b = ce(h[t].x + y.x, h[t].y + y.y); + let x; + 0 === t && (x = s), 1 === t && (x = l), 2 === t && (x = r), 3 === t && (x = n); + const v = et([x, b]); + if (a) { + const { + width: e, + height: t + } = yt(v, a), [o, i, r, n] = bt(v); + v.width = e, v.height = t, b.y < x.y && (v.y = r - t), b.x < x.x && (v.x = i - e) + } + const w = mt(v, u, c), + S = Re(w), + k = pe(w[0], -u, S), + C = pe(w[2], -u, S), + T = et([k, C]); + ro(e, Ti(e) ? se(T) : T, _e) + } else { + o = o.map((t => (e.flipX && (t = xo[t]), e.flipY && (t = vo[t]), t))); + const [t, r] = o.map((e => p[e])), n = { + x: t.x + .5 * (r.x - t.x), + y: t.y + .5 * (r.y - t.y) + }, [l, m] = o.map((e => h[e])), [g, $] = o.map((e => { + const t = e + 2; + return t < 4 ? h[t] : h[t - 4] + })), f = { + x: g.x + .5 * ($.x - g.x), + y: g.y + .5 * ($.y - g.y) + }, y = Dt(n), b = be({ + ...y + }, i), x = Ot(b); + d(x, i, (() => Ot(y))); + const v = ce(x.x - n.x, x.y - n.y), + w = pe(ue(v), -u), + S = xe(ue(l), m), + k = ye(S, (e => 1 - Math.abs(Math.sign(e)))), + C = ce(w.x * k.x, w.y * k.y); + be(l, C), be(m, C); + const T = et(h); + if (a) { + let e = T.width, + t = T.height; + 0 === k.y ? t = e / a : e = t * a, T.width = e, T.height = t, 0 === k.y ? T.y = f.y - .5 * t : T.x = f.x - .5 * e + } + const M = mt(T, u, c), + R = Re(M), + P = pe(M[0], -u, R), + E = pe(M[2], -u, R), + I = et([P, E]); + let A; + Ti(e) ? A = se(I) : zi(e) ? A = I : s && (A = { + x: I.x, + y: I.y, + width: I.width + }), ro(e, A, _e) + } + } + Mo() + })(oi, ni, n, t, { + shiftKey: a, + ...Yt(s || l ? 0 : jt, Zt, i, oi) + }) + }, e => { + if (!oi) return void o(141, li = !1); + Ho(oi); + const { + isTap: t + } = e.detail; + t && pt(oi), o(140, oi = void 0), o(141, li = !1), ct(n) + }, e => { + wo = hi(c).origin, o(141, li = !0), o(140, oi = n), ni = c + }, e => { + if (!oi) return void o(141, li = !1); + const { + translation: t, + shiftKey: i + } = e.detail; + ((e, t, o, i) => { + const r = qo(ur(gi(e), _e)), + n = rt(r), + a = po(wo, o); + let s = $e(a, n) + Math.PI / 2; + if (i.shiftKey) { + const e = Math.PI / 16; + s = e * Math.round(s / e) - ze % e + } + ro(e, { + rotation: s + }, _e), Mo() + })(oi, 0, t, { + shiftKey: i + }) + }, () => { + oi ? (Ho(oi), o(140, oi = void 0), o(141, li = !1), ct(n)) : o(141, li = !1) + }, e => { + const { + key: t + } = e, o = /escape/i.test(t); + if (Fo()) return o ? (e.preventDefault(), e.stopPropagation(), jo(n)) : void(N && "d" === t && (e.metaKey || e.ctrlKey) && (e.preventDefault(), e.stopPropagation(), kr())) + }, e => { + const t = ji(n, e); + return !0 === t ? e : t + }, ar, e => { + const { + target: t, + key: o + } = e, i = t.value || t.innerText, r = t.selectionStart || 0, a = t.selectionEnd || i.length, s = i.substring(0, r) + o + i.substring(a); + if (ji(n, s) !== s) return e.preventDefault() + }, e => Si(n) && /enter/i.test(e.code) && !1 !== n.disableNewline ? e.preventDefault() : /arrow/i.test(e.code) ? e.stopPropagation() : /escape/i.test(e.key) ? lr() : void 0, e => { + const { + key: t, + ctrlKey: o, + altKey: i + } = e; + if (/enter/i.test(t) && (o || i)) return sr() + }, sr, lr, Cr, e => { + const t = zo(); + t && (Pi(t) || Zi(t) && (o(140, oi = t), ni = ur(gi(oi), _e), bo(oi, ni, e.detail))) + }, e => { + o(18, Pr = !0) + }, ({ + relatedTarget: e + }) => { + e && e.classList.contains("shape-selector__button") || o(18, Pr = !1) + }, e => { + if ("touch" === e.pointerType || "PinturaShapeEditor" !== e.target.className) return void vt(); + (li || ei) && Ar(void 0); + const t = Ry(e, Ne); + o(143, Ir = ue(t)); + const i = ye(Ot(t), (e => Math.round(e))); + if (fe(i, Er)) return; + if (Er = ue(i), $t(li, t, i), li || ei) return; + if (d) return; + const [r] = Ko(oe, i, 0, _i); + r && Li(r) || Ar(r) + }, e => { + "touch" !== e.pointerType && vt() + }, ve, Se, Ie, ze, Fe, Oe, Be, We, Ve, _e, Ue, Ze, Xe, Ye, qe, Je, ot, nt, at, st, lt, ct, dt, ut, ht, pt, gt, $t, ft, vt, wt, St, kt, Ct, Tt, Pt, Et, Ot, Dt, Bt, Wt, Vt, _t, jt, Ut, Gt, Zt, Kt, Jt, Qt, eo, to, oo, io, (e, t = {}) => { + let o, r, n, a = Ti(e), + s = wi(e), + l = "relative" === t.position; + const c = Xt(), + d = e => { + if (!jt) return e; + const t = Ot(e), + { + snapTranslation: o, + snapLines: r + } = fo(go(t), c, jt, Zt, i); + return yo(e, o), lo(r), e + }, + u = !!No(), + h = t.isSelection ? Ie : Me, + p = "step" === t.inputMode; + if (Ri(e)) { + if (p) { + let t = !1; + const i = (e, o) => { + const i = Jt(h), + r = e && ce(Dy(e.x, _e.width), Dy(e.y, _e.height)), + n = r && Dt(r); + ae.includes(16) && n && no(n, o); + const a = Ot(o), + s = i.points.length ? i.points[0] : a, + c = ce(Dy(s.x, _e.width), Dy(s.y, _e.height)), + d = Dt(c), + u = Ce(d, o); + if (!t && 1 === i.points.length && u < 36) return eo(h); + if (i.points.length > 2 && u <= 256) { + i.pathClose = !0, _i(i) && Ho(i); + const e = to(h); + return void lt(e) + } + const p = i.strokeWidth && i.strokeColor && (void 0 === i.strokeColor[3] || i.strokeColor[3] > 0), + m = Ce(n, o); + if (p && i.points.length > 1 && m < 256) { + i.pathClose = !1, i.backgroundColor = [0, 0, 0, 0], _i(i) && Ho(i); + const e = to(h); + lt(e) + } else if (!(i.points.length > 0 && m < 100)) return l ? By(a, _e) : a + }; + return { + start: e => { + const a = Jt(h), + { + origin: s + } = e.detail; + if (r = 4, o = d(ue(s)), n = ue(o), a) { + const e = a.points[a.points.length - 1], + t = i(e, o); + return t && (a.points = [...a.points, t]), void oo({ + points: a.points + }, h) + } + t = !0 + }, + update: e => { + if (!t) return; + const r = Jt(h); + if (!r) return; + const n = r.points[0], + a = i(n, ce(o.x + e.detail.translation.x, o.y + e.detail.translation.y)); + a && (r.points[1] = a, oo({ + points: r.points + }, h)) + }, + release: e => e.detail.preventInertia(), + end: i => { + if (!t) return; + const r = Ot(o), + n = l ? By(r, _e) : r, + { + isTap: a + } = i.detail; + if (a) { + if (Ko(oe, r, 0, _i).length) return eo(h) + } + Qt({ + ...e, + points: [n] + }, h) + } + } + } + return { + start: t => { + const { + origin: i + } = t.detail; + r = 4, o = ue(i), n = ue(o); + const a = Ot(o), + s = l ? By(a, _e) : a; + Qt({ + ...e, + points: [s] + }, h) + }, + update: e => { + const t = Jt(h), + { + translation: i + } = e.detail, + a = ce(o.x + i.x, o.y + i.y), + s = Te(n, a); + if (ne(s, 5) <= r) return; + const c = $e(a, n), + d = r - s; + n.x += d * Math.cos(c), n.y += d * Math.sin(c); + const u = Ot(n), + p = l ? By(u, _e) : u; + oo({ + points: t.points.concat(p) + }, h) + }, + release: e => e.detail.preventInertia(), + cancel: () => { + eo(h) + }, + end: e => { + const t = Jt(h); + if (e.detail.isTap) { + let e = !1; + if (t.bitmap ? (ti && (e = !0), u && (e = !0)) : e = !0, e) return eo(h) + } + const o = to(h); + lt(o) + } + } + } + return a || s || Ci(e) ? { + start: t => { + const { + origin: i + } = t.detail; + o = d(ue(i)); + const r = Ot(o), + n = l ? By(r, _e) : r, + s = -1 * so(ze, Fe, Oe), + c = { + ...e, + rotation: s, + ...n + }; + c.flipX = Fe, c.flipY = Oe, delete c.position, c.opacity = 0; + (a ? ["rx", "ry"] : ["width", "height"]).forEach((e => { + c[e] = l ? "0%" : 0 + })), Qt(c, h) + }, + update: e => { + const t = Jt(h); + t.opacity = 1; + let { + aspectRatio: i + } = t, { + translation: r, + shiftKey: n, + ctrlKey: s + } = e.detail; + !i && n && (i = 1); + const l = d(ce(o.x + r.x, o.y + r.y)), + c = Ot(o), + u = Ot(l); + if (i) { + const e = et([c, u]), + t = yt(e, i); + u.x = c.x + t.width, u.y = c.y + t.height + } + const p = { + x: c.x + .5 * (u.x - c.x), + y: c.y + .5 * (u.y - c.y) + }, + m = so(ze, Fe, Oe); + pe(c, m, p), pe(u, m, p); + const g = Math.min(c.x, u.x), + $ = Math.min(c.y, u.y); + let f = Math.max(c.x, u.x) - g, + y = Math.max(c.y, u.y) - $, + b = {}; + a ? (s ? (b.x = c.x, b.y = c.y) : (b.x = g + .5 * f, b.y = $ + .5 * y), b.rx = .5 * f, b.ry = .5 * y) : (s ? (b.x = c.x - .5 * f, b.y = c.y - .5 * y) : (b.x = g, b.y = $), b.width = f, b.height = y), oo(b, h, ((e, t) => ro(e, t, _e))) + }, + release: e => { + e.detail.preventInertia() + }, + cancel: e => { + eo(h) + }, + end: e => { + const t = Jt(h); + if (e.detail.isTap) { + if (wi(t) && _t && si) return eo(h); + if (!wi(t) || !_t || ti) return eo(h); + delete t.width, delete t.height, !1 !== t.disableNewline && delete t.textAlign; + const e = ur({ + ...t + }, _e), + i = ii(t.text, e), + r = Ot({ + x: o.x, + y: o.y - .5 * i.height + }), + n = Ot({ + x: o.x + i.width, + y: o.y + .5 * i.height + }), + a = { + x: r.x + .5 * (n.x - r.x), + y: r.y + .5 * (n.y - r.y) + }, + s = so(ze, Fe, Oe); + pe(r, s, a), pe(n, s, a); + let l = Math.min(r.x, n.x), + c = Math.min(r.y, n.y); + l < 0 && (l = 0), c < 0 && (c = 0), l + i.width > _e.width && (l = _e.width - i.width), c + i.height > _e.height && (c = _e.height - i.height), t.x = T(t.x) ? Vo(l, _e.width) : l, t.y = T(t.y) ? Vo(c, _e.height) : c + } + if (t.opacity = 1, !wi(t)) { + const e = to(h); + lt(e) + } + _i(t) && Ho(t), wi(t) && Uo(t) + } + } : Mi(e) ? { + start: t => { + const { + origin: i + } = t.detail, r = Ot(d(i)), n = ye(r, Hd); + o = ue(i), Qt({ + ...e, + x1: l ? Vo(n.x, _e.width) : n.x, + y1: l ? Vo(n.y, _e.height) : n.y, + x2: l ? Vo(n.x, _e.width) : n.x, + y2: l ? Vo(n.y, _e.height) : n.y, + opacity: 0 + }, h) + }, + update: e => { + const { + translation: t + } = e.detail, i = d(be(ue(o), t)); + if (ae.includes(16)) { + const e = Te(o, i), + t = $e(o, i), + r = Math.PI / 4, + n = r * Math.round(t / r); + i.x = o.x + e * Math.cos(n), i.y = o.y + e * Math.sin(n) + } + const r = Ot(i); + oo({ + x2: l ? Vo(r.x, _e.width) : r.x, + y2: l ? Vo(r.y, _e.height) : r.y, + opacity: 1 + }, h) + }, + release: e => e.detail.preventInertia(), + cancel: e => { + eo(h) + }, + end: e => { + const t = Jt(h); + if (e.detail.isTap) return eo(h); + t.opacity = 1; + const o = to(h); + lt(o), _i(t) && Ho(o) + } + } : void 0 + }, () => { + let e, t; + const o = Bt * Bt, + i = (e, t, i = !1) => { + const r = Ce(e, t); + if (!i && r < 2) return !1; + const n = oe.filter((e => !e.disableErase)); + let a; + a = r < o ? Ko(oe, Ot(t), Bt) : Jo(n, Ot(e), Ot(t), Bt); + return Zo(a).forEach(ht), !0 + }; + return { + start: o => { + e = ce(Math.round(o.detail.origin.x), Math.round(o.detail.origin.y)), i(e, e, !0), t = e + }, + update: o => { + const { + translation: r + } = o.detail, n = ce(Math.round(e.x + r.x), Math.round(e.y + r.y)); + i(t, n) && (t = ue(n)) + }, + release: e => e.detail.preventInertia(), + end: () => {} + } + }, So, ko, e => { + if (!So()) return Bi(e), io(e) + }, Co, To, (e = {}) => ({ + id: I(), + ...e + }), Mo, Ro, Po, Io, (e, t, o = !0) => { + oe.forEach((o => Io(o, e, t, !1))), o && Mo() + }, Lo, zo, Fo, Oo, Do, Wo, jo, Uo, Go, Zo, Yo, qo, Ko, Jo, uo, ho, oi, li, Ei, Ir, d, G, n, _, H, N, W, U, V, Z, Q, X, K, q, Y, P, s, E, F, A, M, C, i, w, S, k, f, x, u, a, h, oe, re, ae, de, function(t) { + Qn.call(this, e, t) + }, e => Ho(Me[e]), function(e) { + ta[e ? "unshift" : "push"]((() => { + or = e, o(8, or) + })) + }, function() { + z = this.value, o(23, z), o(11, R), o(146, n), o(164, M), o(0, ke), o(175, oe) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + or = e, o(8, or) + })) + }, () => { + Lr && Lr.focus() + }, e => o(9, Tr = e.detail), function(e) { + ta[e ? "unshift" : "push"]((() => { + Lr = e, o(19, Lr) + })) + }, e => Ry(e, Ne)] +} +class qy extends Fa { + constructor(e) { + super(), za(this, e, Yy, Zy, Qr, { + uid: 57, + ui: 58, + disabled: 0, + shapes: 1, + selection: 59, + offset: 2, + contextRotation: 60, + contextFlipX: 61, + contextFlipY: 62, + contextZoom: 63, + active: 64, + opacity: 65, + parentRect: 66, + rootRect: 3, + utilRect: 67, + hoverColor: 68, + caretColor: 69, + gridColor: 70, + snapColor: 71, + textInputMode: 4, + oninteractionstart: 72, + oninteractionupdate: 73, + oninteractionrelease: 74, + oninteractionend: 75, + oninteractioncancel: 76, + onaddshape: 77, + onupdateshape: 78, + onselectshape: 79, + onblurshape: 80, + onremoveshape: 81, + ontapshape: 82, + onhovershape: 83, + onhovercanvas: 84, + ontapcanvas: 85, + onleavecanvas: 86, + beforeSelectShape: 87, + beforeDeselectShape: 88, + beforeRemoveShape: 89, + beforeUpdateShape: 90, + willRenderShapeControls: 91, + willRenderShapeTextControls: 92, + willStartInteraction: 93, + mapEditorPointToImagePoint: 94, + mapImagePointToEditorPoint: 95, + eraseRadius: 96, + selectRadius: 97, + enableButtonFlipVertical: 98, + enableTapToAddText: 99, + enableTextStyleControls: 5, + locale: 6, + snapThreshold: 100, + snapPointer: 101, + enableSnapToContext: 102, + gridSize: 103, + syncShapeCollection: 104, + getShapeDraft: 105, + addShapeDraft: 106, + discardShapeDraft: 107, + confirmShapeDraft: 108, + updateShapeDraft: 109, + addShape: 110, + createShape: 111, + eraseShape: 112, + getMarkupItemDraft: 113, + getMarkupItemDraftIndex: 114, + addMarkupItemDraft: 115, + confirmMarkupItemDraft: 116, + discardMarkupItemDraft: 117, + createMarkupItem: 118, + syncShapes: 119, + removeMarkupShapeProps: 120, + updateMarkupShape: 121, + updateMarkupShapeProperty: 122, + updateMarkupItemsShapeProperty: 123, + updateMarkupShapeItems: 124, + getActiveMarkupItem: 125, + hasActiveMarkupItem: 126, + removeShape: 127, + removeActiveMarkupItem: 128, + blurShapes: 129, + selectShape: 7, + deselectMarkupItem: 130, + editMarkupItem: 131, + finishEditMarkupItem: 132, + removeMarkupItems: 133, + getTextShapeRect: 134, + getMarkupShapeRect: 135, + getShapesNearPosition: 136, + getShapesBetweenPoints: 137 + }, null, [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) + } + get syncShapeCollection() { + return this.$$.ctx[104] + } + get getShapeDraft() { + return this.$$.ctx[105] + } + get addShapeDraft() { + return this.$$.ctx[106] + } + get discardShapeDraft() { + return this.$$.ctx[107] + } + get confirmShapeDraft() { + return this.$$.ctx[108] + } + get updateShapeDraft() { + return this.$$.ctx[109] + } + get addShape() { + return this.$$.ctx[110] + } + get createShape() { + return this.$$.ctx[111] + } + get eraseShape() { + return this.$$.ctx[112] + } + get getMarkupItemDraft() { + return this.$$.ctx[113] + } + get getMarkupItemDraftIndex() { + return this.$$.ctx[114] + } + get addMarkupItemDraft() { + return this.$$.ctx[115] + } + get confirmMarkupItemDraft() { + return this.$$.ctx[116] + } + get discardMarkupItemDraft() { + return this.$$.ctx[117] + } + get createMarkupItem() { + return this.$$.ctx[118] + } + get syncShapes() { + return this.$$.ctx[119] + } + get removeMarkupShapeProps() { + return this.$$.ctx[120] + } + get updateMarkupShape() { + return this.$$.ctx[121] + } + get updateMarkupShapeProperty() { + return this.$$.ctx[122] + } + get updateMarkupItemsShapeProperty() { + return this.$$.ctx[123] + } + get updateMarkupShapeItems() { + return this.$$.ctx[124] + } + get getActiveMarkupItem() { + return this.$$.ctx[125] + } + get hasActiveMarkupItem() { + return this.$$.ctx[126] + } + get removeShape() { + return this.$$.ctx[127] + } + get removeActiveMarkupItem() { + return this.$$.ctx[128] + } + get blurShapes() { + return this.$$.ctx[129] + } + get selectShape() { + return this.$$.ctx[7] + } + get deselectMarkupItem() { + return this.$$.ctx[130] + } + get editMarkupItem() { + return this.$$.ctx[131] + } + get finishEditMarkupItem() { + return this.$$.ctx[132] + } + get removeMarkupItems() { + return this.$$.ctx[133] + } + get getTextShapeRect() { + return this.$$.ctx[134] + } + get getMarkupShapeRect() { + return this.$$.ctx[135] + } + get getShapesNearPosition() { + return this.$$.ctx[136] + } + get getShapesBetweenPoints() { + return this.$$.ctx[137] + } +} + +function Ky(e) { + let t, o, i; + return o = new dp({ + props: { + items: e[2] + } + }), { + c() { + t = kn("ul"), Ia(o.$$.fragment), An(t, "class", "PinturaShapeStyleList") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 4 & t && (i.items = e[2]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Jy(e) { + let t, o; + return t = new vd({ + props: { + class: "PinturaShapeStyles", + elasticity: e[0], + $$slots: { + default: [Qy] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1 & o && (i.elasticity = e[0]), 131076 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Qy(e) { + let t, o, i; + return o = new dp({ + props: { + items: e[2] + } + }), { + c() { + t = kn("ul"), Ia(o.$$.fragment), An(t, "class", "PinturaShapeStyleList") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 4 & t && (i.items = e[2]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function eb(e) { + let t, o, i, r; + const n = [Jy, Ky], + a = []; + + function s(e, t) { + return e[1] ? 0 : 1 + } + return o = s(e), i = a[o] = n[o](e), { + c() { + t = kn("div"), i.c(), An(t, "style", e[3]) + }, + m(e, i) { + wn(e, t, i), a[o].m(t, null), r = !0 + }, + p(e, [l]) { + let c = o; + o = s(e), o === c ? a[o].p(e, l) : (ya(), va(a[c], 1, 1, (() => { + a[c] = null + })), ba(), i = a[o], i ? i.p(e, l) : (i = a[o] = n[o](e), i.c()), xa(i, 1), i.m(t, null)), (!r || 8 & l) && An(t, "style", e[3]) + }, + i(e) { + r || (xa(i), r = !0) + }, + o(e) { + va(i), r = !1 + }, + d(e) { + e && Sn(t), a[o].d() + } + } +} + +function tb(e, t, o) { + let i, r, n, a, s, l, { + isActive: c = !1 + } = t, + { + controls: d = [] + } = t, + { + locale: u + } = t, + { + scrollElasticity: h + } = t, + { + scrollEnable: p = !0 + } = t, + { + hideTitles: m = !1 + } = t, + { + willRenderControls: g = j + } = t; + const $ = Jn("redrawTrigger"); + on(e, $, (e => o(14, a = e))); + const f = Jn("env"); + on(e, f, (e => o(13, n = e))); + const y = Jn("isAnimated"); + on(e, y, (e => o(16, l = e))); + const b = ec(0, { + stiffness: .25, + damping: .9 + }); + return on(e, b, (e => o(15, s = e))), e.$$set = e => { + "isActive" in e && o(8, c = e.isActive), "controls" in e && o(9, d = e.controls), "locale" in e && o(10, u = e.locale), "scrollElasticity" in e && o(0, h = e.scrollElasticity), "scrollEnable" in e && o(1, p = e.scrollEnable), "hideTitles" in e && o(11, m = e.hideTitles), "willRenderControls" in e && o(12, g = e.willRenderControls) + }, e.$$.update = () => { + 65792 & e.$$.dirty && b.set(c ? 1 : 0, { + hard: !1 === l + }), 33024 & e.$$.dirty && o(3, i = `opacity:${s};${c?"":"pointer-events:none;"}${s<=0?"visibility:hidden":""}`), 32256 & e.$$.dirty && o(2, r = a && g(d.map((e => ["ShapeStyle", e.id, { + title: e.componentProps.title, + locale: u, + hideTitle: m, + items: [ + [e.component, e.id, e.componentProps] + ] + }])), n, (() => $.set({})))) + }, [h, p, r, i, $, f, y, b, c, d, u, m, g, n, a, s, l] +} +class ob extends Fa { + constructor(e) { + super(), za(this, e, tb, eb, Qr, { + isActive: 8, + controls: 9, + locale: 10, + scrollElasticity: 0, + scrollEnable: 1, + hideTitles: 11, + willRenderControls: 12 + }) + } +} + +function ib(e, t, o) { + const i = e.slice(); + return i[15] = t[o].key, i[6] = t[o].controls, i[16] = t[o].isActive, i +} + +function rb(e, t) { + let o, i, r; + return i = new ob({ + props: { + isActive: t[16], + controls: t[6], + locale: t[1], + scrollElasticity: t[2], + scrollEnable: t[3], + hideTitles: t[4], + willRenderControls: t[5] + } + }), { + key: e, + first: null, + c() { + o = Rn(), Ia(i.$$.fragment), this.first = o + }, + m(e, t) { + wn(e, o, t), Aa(i, e, t), r = !0 + }, + p(e, o) { + t = e; + const r = {}; + 128 & o && (r.isActive = t[16]), 128 & o && (r.controls = t[6]), 2 & o && (r.locale = t[1]), 4 & o && (r.scrollElasticity = t[2]), 8 & o && (r.scrollEnable = t[3]), 16 & o && (r.hideTitles = t[4]), 32 & o && (r.willRenderControls = t[5]), i.$set(r) + }, + i(e) { + r || (xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(o), La(i, e) + } + } +} + +function nb(e) { + let t, o, i, r = [], + n = new Map, + a = e[7]; + const s = e => e[15]; + for (let t = 0; t < a.length; t += 1) { + let o = ib(e, a, t), + i = s(o); + n.set(i, r[t] = rb(i, o)) + } + return { + c() { + t = kn("div"); + for (let e = 0; e < r.length; e += 1) r[e].c(); + An(t, "class", o = Mc(["PinturaShapeStyleEditor", !e[3] && "PinturaShapeStyleEditorOverflow", e[0]])) + }, + m(e, o) { + wn(e, t, o); + for (let e = 0; e < r.length; e += 1) r[e].m(t, null); + i = !0 + }, + p(e, [l]) { + 190 & l && (a = e[7], ya(), r = Ma(r, l, s, 1, e, a, n, t, Ta, rb, null, ib), ba()), (!i || 9 & l && o !== (o = Mc(["PinturaShapeStyleEditor", !e[3] && "PinturaShapeStyleEditorOverflow", e[0]]))) && An(t, "class", o) + }, + i(e) { + if (!i) { + for (let e = 0; e < a.length; e += 1) xa(r[e]); + i = !0 + } + }, + o(e) { + for (let e = 0; e < r.length; e += 1) va(r[e]); + i = !1 + }, + d(e) { + e && Sn(t); + for (let e = 0; e < r.length; e += 1) r[e].d() + } + } +} + +function ab(e, t, o) { + let i, r, n, { + class: a + } = t, + { + controls: s = {} + } = t, + { + shape: l + } = t, + { + onchange: c + } = t, + { + locale: d + } = t, + { + scrollElasticity: u + } = t, + { + scrollEnable: h = !0 + } = t, + { + hideTitles: p = !1 + } = t, + { + willRenderControls: m + } = t; + const g = []; + return e.$$set = e => { + "class" in e && o(0, a = e.class), "controls" in e && o(6, s = e.controls), "shape" in e && o(8, l = e.shape), "onchange" in e && o(9, c = e.onchange), "locale" in e && o(1, d = e.locale), "scrollElasticity" in e && o(2, u = e.scrollElasticity), "scrollEnable" in e && o(3, h = e.scrollEnable), "hideTitles" in e && o(4, p = e.hideTitles), "willRenderControls" in e && o(5, m = e.willRenderControls) + }, e.$$.update = () => { + 64 & e.$$.dirty && o(11, i = Object.keys(s).filter((e => s[e]))), 2304 & e.$$.dirty && o(10, r = l && Object.keys(l).length && i && Vi(l) ? (e => i.filter((t => t.split("_").every((t => Ao(e, t) && Vi(e, t))))).map((t => { + const o = (e.settings && e.settings[t] || {}).control || t, + i = t.split("_"), + r = i.length > 1 ? i.map((t => e[t])) : e[t]; + if (M(s[o])) { + const { + title: i, + component: n + } = s[o](r, (e => { + c({ + [t]: e + }) + }), { + selectedShapeId: e.id + }); + return { + id: o, + component: dp, + componentProps: { + title: i, + items: n + } + } + } + let [n, a] = s[o]; + if (T(n) && s[n]) { + const e = { + ...a + }; + [n, a] = s[n], a = { + ...a, + ...e + } + } + const l = M(a.options) ? a.options(e) : a.options; + return { + id: o, + component: n, + componentProps: { + ...a, + options: l, + locale: d, + value: r, + optionLabelClass: "PinturaButtonLabel", + onchange: o => { + const r = S(o) && !Lo(o) ? o.value : o; + a.onchange && a.onchange(r, e); + const n = i.length > 1 ? i.reduce(((e, t, o) => ({ + ...e, + [t]: Array.isArray(r) ? r[o] : r + })), {}) : { + [t]: r + }; + c(n) + } + } + } + })).filter(Boolean))(l) : []), 1280 & e.$$.dirty && o(7, n = ((e, t) => { + let o = g.find((t => t.key === e)); + return o || (o = { + key: e, + controls: t + }, g.push(o)), g.forEach((e => e.isActive = !1)), o.controls = t, o.isActive = !0, g + })(l && Object.keys(l).length ? Object.keys(l).join("_") : "none", r || [])) + }, [a, d, u, h, p, m, s, n, l, c, r, i] +} +class sb extends Fa { + constructor(e) { + super(), za(this, e, ab, nb, Qr, { + class: 0, + controls: 6, + shape: 8, + onchange: 9, + locale: 1, + scrollElasticity: 2, + scrollEnable: 3, + hideTitles: 4, + willRenderControls: 5 + }) + } +} +var lb = e => / { + a[l] = null + })), ba(), o = a[t], o ? o.p(e, r) : (o = a[t] = n[t](e), o.c()), xa(o, 1), o.m(i.parentNode, i)) + }, + i(e) { + r || (xa(o), r = !0) + }, + o(e) { + va(o), r = !1 + }, + d(e) { + a[t].d(e), e && Sn(i) + } + } +} + +function ub(e) { + let t, o, i, r, n = e[10] && pb(e); + return i = new vd({ + props: { + scrollAutoCancel: e[9], + elasticity: e[0], + $$slots: { + default: [mb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), n && n.c(), o = Mn(), Ia(i.$$.fragment), An(t, "class", "PinturaShapePresetsFlat") + }, + m(e, a) { + wn(e, t, a), n && n.m(t, null), bn(t, o), Aa(i, t, null), r = !0 + }, + p(e, r) { + e[10] ? n ? (n.p(e, r), 1024 & r && xa(n, 1)) : (n = pb(e), n.c(), xa(n, 1), n.m(t, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()); + const a = {}; + 512 & r && (a.scrollAutoCancel = e[9]), 1 & r && (a.elasticity = e[0]), 536871070 & r && (a.$$scope = { + dirty: r, + ctx: e + }), i.$set(a) + }, + i(e) { + r || (xa(n), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(n), va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), n && n.d(), La(i) + } + } +} + +function hb(e) { + let t, o, i, r, n; + o = new vd({ + props: { + elasticity: e[0], + class: "PinturaShapePresetsGroups", + $$slots: { + default: [xb] + }, + $$scope: { + ctx: e + } + } + }); + const a = [{ + class: "PinturaControlPanels" + }, { + panelClass: "PinturaControlPanel" + }, { + panels: e[11] + }, e[12]]; + let s = { + $$slots: { + default: [wb, ({ + panel: e, + panelIsActive: t + }) => ({ + 26: e, + 27: t + }), ({ + panel: e, + panelIsActive: t + }) => (e ? 67108864 : 0) | (t ? 134217728 : 0)] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < a.length; e += 1) s = Xr(s, a[e]); + return r = new Zc({ + props: s + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), i = Mn(), Ia(r.$$.fragment), An(t, "class", "PinturaShapePresetsGrouped") + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), Aa(r, t, null), n = !0 + }, + p(e, t) { + const i = {}; + 1 & t && (i.elasticity = e[0]), 536876128 & t && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i); + const n = 6144 & t ? Ra(a, [a[0], a[1], 2048 & t && { + panels: e[11] + }, 4096 & t && Pa(e[12])]) : {}; + 738206239 & t && (n.$$scope = { + dirty: t, + ctx: e + }), r.$set(n) + }, + i(e) { + n || (xa(o.$$.fragment, e), xa(r.$$.fragment, e), n = !0) + }, + o(e) { + va(o.$$.fragment, e), va(r.$$.fragment, e), n = !1 + }, + d(e) { + e && Sn(t), La(o), La(r) + } + } +} + +function pb(e) { + let t, o; + return t = new dp({ + props: { + items: e[10] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o && (i.items = e[10]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function mb(e) { + let t, o; + return t = new Vd({ + props: { + items: e[7], + onclickitem: e[1], + ongrabitem: e[2], + ondragitem: e[3], + ondropitem: e[4] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 128 & o && (i.items = e[7]), 2 & o && (i.onclickitem = e[1]), 4 & o && (i.ongrabitem = e[2]), 8 & o && (i.ondragitem = e[3]), 16 & o && (i.ondropitem = e[4]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function gb(e) { + let t, o; + return t = new dp({ + props: { + items: e[10] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o && (i.items = e[10]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function $b(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [fb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 805306368 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function fb(e) { + let t, o = e[28].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 268435456 & i && o !== (o = e[28].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function yb(e) { + let t, o, i = e[28].label + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 268435456 & t && i !== (i = e[28].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function bb(e) { + let t, o, i, r = e[28].icon && $b(e), + n = !e[28].hideLabel && yb(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[28].icon ? r ? (r.p(e, i), 268435456 & i && xa(r, 1)) : (r = $b(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[28].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = yb(e), n.c(), n.m(o.parentNode, o)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function xb(e) { + let t, o, i, r = e[10] && gb(e); + const n = [{ + class: "PinturaControlList" + }, { + tabs: e[5] + }, e[12], { + layout: "compact" + }]; + let a = { + $$slots: { + default: [bb, ({ + tab: e + }) => ({ + 28: e + }), ({ + tab: e + }) => e ? 268435456 : 0] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < n.length; e += 1) a = Xr(a, n[e]); + return o = new Fc({ + props: a + }), o.$on("select", e[18]), { + c() { + r && r.c(), t = Mn(), Ia(o.$$.fragment) + }, + m(e, n) { + r && r.m(e, n), wn(e, t, n), Aa(o, e, n), i = !0 + }, + p(e, i) { + e[10] ? r ? (r.p(e, i), 1024 & i && xa(r, 1)) : (r = gb(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()); + const a = 4128 & i ? Ra(n, [n[0], 32 & i && { + tabs: e[5] + }, 4096 & i && Pa(e[12]), n[3]]) : {}; + 805306368 & i && (a.$$scope = { + dirty: i, + ctx: e + }), o.$set(a) + }, + i(e) { + i || (xa(r), xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(r), va(o.$$.fragment, e), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), La(o, e) + } + } +} + +function vb(e) { + let t, o; + return t = new Vd({ + props: { + items: e[13][e[26]].items, + disabled: e[13][e[26]].disabled, + onclickitem: e[1], + ongrabitem: e[2], + ondragitem: e[3], + ondropitem: e[4] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 67117056 & o && (i.items = e[13][e[26]].items), 67117056 & o && (i.disabled = e[13][e[26]].disabled), 2 & o && (i.onclickitem = e[1]), 4 & o && (i.ongrabitem = e[2]), 8 & o && (i.ondragitem = e[3]), 16 & o && (i.ondropitem = e[4]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function wb(e) { + let t, o; + return t = new vd({ + props: { + scroll: e[27] ? { + scrollOffset: 0, + animate: !1 + } : void 0, + scrollAutoCancel: e[9], + elasticity: e[0], + $$slots: { + default: [vb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 134217728 & o && (i.scroll = e[27] ? { + scrollOffset: 0, + animate: !1 + } : void 0), 512 & o && (i.scrollAutoCancel = e[9]), 1 & o && (i.elasticity = e[0]), 603987998 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Sb(e) { + let t, o, i, r; + const n = [db, cb], + a = []; + + function s(e, t) { + return e[9] ? 0 : e[10] ? 1 : -1 + } + return ~(o = s(e)) && (i = a[o] = n[o](e)), { + c() { + t = kn("div"), i && i.c(), An(t, "class", "PinturaShapePresetsPalette") + }, + m(e, i) { + wn(e, t, i), ~o && a[o].m(t, null), r = !0 + }, + p(e, [r]) { + let l = o; + o = s(e), o === l ? ~o && a[o].p(e, r) : (i && (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba()), ~o ? (i = a[o], i ? i.p(e, r) : (i = a[o] = n[o](e), i.c()), xa(i, 1), i.m(t, null)) : i = null) + }, + i(e) { + r || (xa(i), r = !0) + }, + o(e) { + va(i), r = !1 + }, + d(e) { + e && Sn(t), ~o && a[o].d() + } + } +} + +function kb(e, t, o) { + let i, n, a, s, l, c, d, u, h, { + locale: p + } = t, + { + presets: m + } = t, + { + scrollElasticity: g + } = t, + { + enableSelectImage: $ = !0 + } = t, + { + willRenderPresetToolbar: f = j + } = t, + { + onaddpreset: y = r + } = t, + { + ongrabpreset: b + } = t, + { + ondragpreset: x + } = t, + { + ondroppreset: v + } = t; + const w = "presets-" + I(), + S = (e, t = "") => lb(e) ? e : Io(e) ? Bo(e, t) : `${t}`, + k = e => W(Vt(e)), + C = ["src", "alt", "thumb", "shape", "id", "mount", "disabled"], + M = e => e.map((e => (e => Lo(e) && T(e[0]) && Lo(e[1]))(e) ? { + ...e[2], + id: `${w}-${e[0].toLowerCase()}`, + label: e[0], + items: M(e[1]) + } : (e => { + let t, o, i, r, n, a, s, l = e; + return T(e) ? Io(e) ? (t = e, n = e, r = S(t, n)) : (t = e, n = k(t), r = S(t, n)) : (t = e.src, n = e.alt || (T(t) ? k(t) : T(e.thumb) ? k(e.thumb) : void 0), r = S(e.thumb || t, n), o = e.shape, a = e.mount, s = e.disabled, i = Object.keys(e).reduce(((t, o) => (C.includes(o) || (t[o] = e[o]), t)), {})), { + id: l, + src: t, + thumb: r, + shape: o, + shapeProps: i, + alt: n, + title: n, + mount: a, + disabled: s + } + })(e))); + return e.$$set = e => { + "locale" in e && o(14, p = e.locale), "presets" in e && o(15, m = e.presets), "scrollElasticity" in e && o(0, g = e.scrollElasticity), "enableSelectImage" in e && o(16, $ = e.enableSelectImage), "willRenderPresetToolbar" in e && o(17, f = e.willRenderPresetToolbar), "onaddpreset" in e && o(1, y = e.onaddpreset), "ongrabpreset" in e && o(2, b = e.ongrabpreset), "ondragpreset" in e && o(3, x = e.ondragpreset), "ondroppreset" in e && o(4, v = e.ondroppreset) + }, e.$$.update = () => { + 32768 & e.$$.dirty && o(7, i = M(m)), 128 & e.$$.dirty && o(9, n = i.length), 640 & e.$$.dirty && o(8, a = n && i.some((e => !!e.items))), 384 & e.$$.dirty && o(5, s = a && i), 384 & e.$$.dirty && o(13, l = a && i.reduce(((e, t) => (e[t.id] = t, e)), {})), 96 & e.$$.dirty && o(6, c = c || s && (s.find((e => !e.disabled)) || {}).id), 64 & e.$$.dirty && o(12, d = { + name: w, + selected: c + }), 32 & e.$$.dirty && o(11, u = s && s.map((e => e.id))), 212994 & e.$$.dirty && o(10, h = p && f([$ && ["Button", "browse", { + label: p.shapeLabelButtonSelectSticker, + icon: p.shapeIconButtonSelectSticker, + onclick: () => { + Lp().then((e => { + e && y(e) + })) + } + }]])) + }, [g, y, b, x, v, s, c, i, a, n, h, u, d, l, p, m, $, f, ({ + detail: e + }) => o(6, c = e)] +} +class Cb extends Fa { + constructor(e) { + super(), za(this, e, kb, Sb, Qr, { + locale: 14, + presets: 15, + scrollElasticity: 0, + enableSelectImage: 16, + willRenderPresetToolbar: 17, + onaddpreset: 1, + ongrabpreset: 2, + ondragpreset: 3, + ondroppreset: 4 + }) + } +} + +function Tb(e) { + let t, o, i, r; + return t = new dp({ + props: { + items: e[29] + } + }), i = new sb({ + props: { + locale: e[4], + shape: e[31] || e[49], + onchange: e[86], + controls: e[9], + scrollEnable: !1, + hideTitles: !0, + willRenderControls: e[163] + } + }), { + c() { + Ia(t.$$.fragment), o = Mn(), Ia(i.$$.fragment) + }, + m(e, n) { + Aa(t, e, n), wn(e, o, n), Aa(i, e, n), r = !0 + }, + p(e, o) { + const r = {}; + 536870912 & o[0] && (r.items = e[29]), t.$set(r); + const n = {}; + 16 & o[0] && (n.locale = e[4]), 262145 & o[1] && (n.shape = e[31] || e[49]), 512 & o[0] && (n.controls = e[9]), i.$set(n) + }, + i(e) { + r || (xa(t.$$.fragment, e), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(t.$$.fragment, e), va(i.$$.fragment, e), r = !1 + }, + d(e) { + La(t, e), e && Sn(o), La(i, e) + } + } +} + +function Mb(e) { + let t, o, i; + return o = new Y$({ + props: { + $$slots: { + default: [Tb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "header") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 536871440 & t[0] | 262145 & t[1] | 262144 & t[6] && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Rb(e) { + let t, o; + const i = [{ + locale: e[4] + }, { + ui: e[69] + }, { + shapes: e[5] + }, { + selection: e[58] + }, { + uid: e[19] + }, { + parentRect: e[37] + }, { + rootRect: e[55] + }, { + utilRect: e[39] + }, { + offset: e[50] + }, { + disabled: e[38] + }, { + contextRotation: e[22] + }, { + contextFlipX: e[23] + }, { + contextFlipY: e[24] + }, { + contextZoom: e[36].scale + }, { + active: e[35] + }, { + opacity: e[56] + }, { + hoverColor: e[57] + }, { + caretColor: e[57] + }, { + gridColor: [1, 1, 1, .125] + }, { + snapColor: e[57] + }, { + eraseRadius: e[47] + }, { + selectRadius: e[6] + }, { + enableButtonFlipVertical: e[10] + }, { + mapEditorPointToImagePoint: e[20] + }, { + mapImagePointToEditorPoint: e[21] + }, { + enableTapToAddText: e[13] + }, { + textInputMode: e[8] + }, { + snapThreshold: e[15] + }, { + snapPointer: !e[48] + }, { + enableSnapToContext: e[16] + }, { + gridSize: e[14] + }, { + willStartInteraction: e[96] + }, { + oninteractionstart: e[80] + }, { + oninteractionupdate: e[81] + }, { + oninteractionrelease: e[82] + }, { + oninteractionend: e[84] + }, { + oninteractioncancel: e[83] + }, { + onleavecanvas: e[88] + }, { + onhovercanvas: e[87] + }, { + onhovershape: e[90] + }, { + ontapcanvas: e[89] + }, { + onaddshape: e[155] + }, { + onselectshape: e[156] + }, { + onblurshape: e[157] + }, { + ontapshape: e[158] + }, { + onupdateshape: e[159] + }, { + onremoveshape: e[160] + }, e[42]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new qy({ + props: r + }), e[161](t), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 1106896240 & o[0] | 252381680 & o[1] | 511443072 & o[2] | 24 & o[3] ? Ra(i, [16 & o[0] && { + locale: e[4] + }, 128 & o[2] && { + ui: e[69] + }, 32 & o[0] && { + shapes: e[5] + }, 134217728 & o[1] && { + selection: e[58] + }, 524288 & o[0] && { + uid: e[19] + }, 64 & o[1] && { + parentRect: e[37] + }, 16777216 & o[1] && { + rootRect: e[55] + }, 256 & o[1] && { + utilRect: e[39] + }, 524288 & o[1] && { + offset: e[50] + }, 128 & o[1] && { + disabled: e[38] + }, 4194304 & o[0] && { + contextRotation: e[22] + }, 8388608 & o[0] && { + contextFlipX: e[23] + }, 16777216 & o[0] && { + contextFlipY: e[24] + }, 32 & o[1] && { + contextZoom: e[36].scale + }, 16 & o[1] && { + active: e[35] + }, 33554432 & o[1] && { + opacity: e[56] + }, 67108864 & o[1] && { + hoverColor: e[57] + }, 67108864 & o[1] && { + caretColor: e[57] + }, i[18], 67108864 & o[1] && { + snapColor: e[57] + }, 65536 & o[1] && { + eraseRadius: e[47] + }, 64 & o[0] && { + selectRadius: e[6] + }, 1024 & o[0] && { + enableButtonFlipVertical: e[10] + }, 1048576 & o[0] && { + mapEditorPointToImagePoint: e[20] + }, 2097152 & o[0] && { + mapImagePointToEditorPoint: e[21] + }, 8192 & o[0] && { + enableTapToAddText: e[13] + }, 256 & o[0] && { + textInputMode: e[8] + }, 32768 & o[0] && { + snapThreshold: e[15] + }, 131072 & o[1] && { + snapPointer: !e[48] + }, 65536 & o[0] && { + enableSnapToContext: e[16] + }, 16384 & o[0] && { + gridSize: e[14] + }, 8 & o[3] && { + willStartInteraction: e[96] + }, 262144 & o[2] && { + oninteractionstart: e[80] + }, 524288 & o[2] && { + oninteractionupdate: e[81] + }, 1048576 & o[2] && { + oninteractionrelease: e[82] + }, 4194304 & o[2] && { + oninteractionend: e[84] + }, 2097152 & o[2] && { + oninteractioncancel: e[83] + }, 67108864 & o[2] && { + onleavecanvas: e[88] + }, 33554432 & o[2] && { + onhovercanvas: e[87] + }, 268435456 & o[2] && { + onhovershape: e[90] + }, 134217728 & o[2] && { + ontapcanvas: e[89] + }, 1073741824 & o[0] | 16 & o[3] && { + onaddshape: e[155] + }, 1073741824 & o[0] && { + onselectshape: e[156] + }, 1073741824 & o[0] && { + onblurshape: e[157] + }, 1073741824 & o[0] && { + ontapshape: e[158] + }, 1073741824 & o[0] | 16 & o[3] && { + onupdateshape: e[159] + }, 1073741824 & o[0] | 16 & o[3] && { + onremoveshape: e[160] + }, 2048 & o[1] && Pa(e[42])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(o) { + e[161](null), La(t, o) + } + } +} + +function Pb(e) { + let t, o, i, n, a, s = e[51] && Rb(e); + return { + c() { + t = kn("div"), s && s.c(), An(t, "slot", "main"), An(t, "style", o = "cursor:" + e[46]) + }, + m(o, l) { + wn(o, t, l), s && s.m(t, null), e[162](t), i = !0, n || (a = [Pn(t, "keydown", e[85]), hn(bc.call(null, t)), Pn(t, "dropfiles", (function() { + Jr(e[12] ? e[95] : r) && (e[12] ? e[95] : r).apply(this, arguments) + })), hn($c.call(null, t)), Pn(t, "measure", e[151])], n = !0) + }, + p(r, n) { + (e = r)[51] ? s ? (s.p(e, n), 1048576 & n[1] && xa(s, 1)) : (s = Rb(e), s.c(), xa(s, 1), s.m(t, null)): s && (ya(), va(s, 1, 1, (() => { + s = null + })), ba()), (!i || 32768 & n[1] && o !== (o = "cursor:" + e[46])) && An(t, "style", o) + }, + i(e) { + i || (xa(s), i = !0) + }, + o(e) { + va(s), i = !1 + }, + d(o) { + o && Sn(t), s && s.d(), e[162](null), n = !1, Kr(a) + } + } +} + +function Eb(e) { + let t, o; + return t = new Cb({ + props: { + locale: e[4], + presets: e[18], + enableSelectImage: e[11], + willRenderPresetToolbar: e[43], + onaddpreset: e[94], + ongrabpreset: e[91], + ondragpreset: e[92], + ondroppreset: e[93], + scrollElasticity: e[44] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.locale = e[4]), 262144 & o[0] && (i.presets = e[18]), 2048 & o[0] && (i.enableSelectImage = e[11]), 4096 & o[1] && (i.willRenderPresetToolbar = e[43]), 8192 & o[1] && (i.scrollElasticity = e[44]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ib(e) { + let t, o, i, r = "stack" === e[7] && Ab(e), + n = (e[53] && e[34] || "row" === e[7]) && Fb(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + "stack" === e[7] ? r ? (r.p(e, i), 128 & i[0] && xa(r, 1)) : (r = Ab(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[53] && e[34] || "row" === e[7] ? n ? (n.p(e, i), 128 & i[0] | 4194312 & i[1] && xa(n, 1)) : (n = Fb(e), n.c(), xa(n, 1), n.m(o.parentNode, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function Ab(e) { + let t, o, i, r; + const n = [zb, Lb], + a = []; + + function s(e, t) { + return e[45] ? 0 : 1 + } + return o = s(e), i = a[o] = n[o](e), { + c() { + t = kn("div"), i.c(), An(t, "class", "PinturaControlPanels") + }, + m(e, i) { + wn(e, t, i), a[o].m(t, null), r = !0 + }, + p(e, r) { + let l = o; + o = s(e), o === l ? a[o].p(e, r) : (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba(), i = a[o], i ? i.p(e, r) : (i = a[o] = n[o](e), i.c()), xa(i, 1), i.m(t, null)) + }, + i(e) { + r || (xa(i), r = !0) + }, + o(e) { + va(i), r = !1 + }, + d(e) { + e && Sn(t), a[o].d() + } + } +} + +function Lb(e) { + let t, o, i; + return o = new sb({ + props: { + locale: e[4], + shape: e[31] || e[49], + onchange: e[86], + controls: e[9], + scrollElasticity: e[44], + willRenderControls: e[17] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaControlPanel") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 16 & t[0] && (i.locale = e[4]), 262145 & t[1] && (i.shape = e[31] || e[49]), 512 & t[0] && (i.controls = e[9]), 8192 & t[1] && (i.scrollElasticity = e[44]), 131072 & t[0] && (i.willRenderControls = e[17]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function zb(e) { + let t, o, i; + return o = new Cb({ + props: { + locale: e[4], + presets: e[18], + enableSelectImage: e[11], + willRenderPresetToolbar: e[43], + onaddpreset: e[94], + ongrabpreset: e[91], + ondragpreset: e[92], + ondroppreset: e[93], + scrollElasticity: e[44] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaControlPanel") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 16 & t[0] && (i.locale = e[4]), 262144 & t[0] && (i.presets = e[18]), 2048 & t[0] && (i.enableSelectImage = e[11]), 4096 & t[1] && (i.willRenderPresetToolbar = e[43]), 8192 & t[1] && (i.scrollElasticity = e[44]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Fb(e) { + let t, o; + return t = new vd({ + props: { + class: "PinturaControlListScroller", + elasticity: e[44], + $$slots: { + default: [Nb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8192 & o[1] && (i.elasticity = e[44]), 131729 & o[0] | 262155 & o[1] | 262144 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ob(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[4], + class: "PinturaControlList", + optionClass: "PinturaControlListOption", + layout: "row", + options: e[32], + selectedIndex: e[32].findIndex(e[152]), + onchange: e[79], + $$slots: { + option: [Vb, ({ + option: e + }) => ({ + 203: e + }), ({ + option: e + }) => [0, 0, 0, 0, 0, 0, e ? 131072 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.locale = e[4]), 2 & o[1] && (i.options = e[32]), 1 & o[0] | 2 & o[1] && (i.selectedIndex = e[32].findIndex(e[152])), 16 & o[0] | 393216 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Db(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Bb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] | 393216 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Bb(e) { + let t, o = (M(e[203].icon) ? e[203].icon(e[4]) : e[203].icon) + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 16 & i[0] | 131072 & i[6] && o !== (o = (M(e[203].icon) ? e[203].icon(e[4]) : e[203].icon) + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Wb(e) { + let t, o, i = (M(e[203].label) ? e[203].label(e[4]) : e[203].label) + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 16 & t[0] | 131072 & t[6] && i !== (i = (M(e[203].label) ? e[203].label(e[4]) : e[203].label) + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Vb(e) { + let t, o, i, r = e[203].icon && Db(e), + n = !e[203].hideLabel && Wb(e); + return { + c() { + t = kn("div"), r && r.c(), o = Mn(), n && n.c(), An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), r && r.m(t, null), bn(t, o), n && n.m(t, null), i = !0 + }, + p(e, i) { + e[203].icon ? r ? (r.p(e, i), 131072 & i[6] && xa(r, 1)) : (r = Db(e), r.c(), xa(r, 1), r.m(t, o)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[203].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Wb(e), n.c(), n.m(t, null)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + e && Sn(t), r && r.d(), n && n.d() + } + } +} + +function _b(e) { + let t, o; + return t = new sb({ + props: { + locale: e[4], + shape: e[31] || e[49], + onchange: e[86], + controls: e[9], + scrollEnable: !1, + hideTitles: !0, + willRenderControls: e[153] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.locale = e[4]), 262145 & o[1] && (i.shape = e[31] || e[49]), 512 & o[0] && (i.controls = e[9]), 131072 & o[0] && (i.willRenderControls = e[153]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Nb(e) { + let t, o, i, r = e[34] && Ob(e), + n = "row" === e[7] && _b(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[34] ? r ? (r.p(e, i), 8 & i[1] && xa(r, 1)) : (r = Ob(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), "row" === e[7] ? n ? (n.p(e, i), 128 & i[0] && xa(n, 1)) : (n = _b(e), n.c(), xa(n, 1), n.m(o.parentNode, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function Hb(e) { + let t, o; + return t = new vd({ + props: { + class: "PinturaControlListScroller", + elasticity: e[44], + $$slots: { + default: [Zb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8192 & o[1] && (i.elasticity = e[44]), 67108880 & o[0] | 8388608 & o[1] | 262144 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function jb(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Ub] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] | 393216 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ub(e) { + let t, o = (M(e[203].icon) ? e[203].icon(e[4]) : e[203].icon) + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 16 & i[0] | 131072 & i[6] && o !== (o = (M(e[203].icon) ? e[203].icon(e[4]) : e[203].icon) + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Gb(e) { + let t, o, i, r, n, a = (M(e[203].label) ? e[203].label(e[4]) : e[203].label) + "", + s = e[203].icon && jb(e); + return { + c() { + t = kn("div"), s && s.c(), o = Mn(), i = kn("span"), r = Tn(a), An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), s && s.m(t, null), bn(t, o), bn(t, i), bn(i, r), n = !0 + }, + p(e, i) { + e[203].icon ? s ? (s.p(e, i), 131072 & i[6] && xa(s, 1)) : (s = jb(e), s.c(), xa(s, 1), s.m(t, o)) : s && (ya(), va(s, 1, 1, (() => { + s = null + })), ba()), (!n || 16 & i[0] | 131072 & i[6]) && a !== (a = (M(e[203].label) ? e[203].label(e[4]) : e[203].label) + "") && Fn(r, a) + }, + i(e) { + n || (xa(s), n = !0) + }, + o(e) { + va(s), n = !1 + }, + d(e) { + e && Sn(t), s && s.d() + } + } +} + +function Zb(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[4], + class: "PinturaControlList", + optionClass: "PinturaControlListOption", + layout: "row", + options: e[54], + selectedIndex: e[54].findIndex(e[154]), + onchange: e[78], + $$slots: { + option: [Gb, ({ + option: e + }) => ({ + 203: e + }), ({ + option: e + }) => [0, 0, 0, 0, 0, 0, e ? 131072 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.locale = e[4]), 8388608 & o[1] && (i.options = e[54]), 67108864 & o[0] | 8388608 & o[1] && (i.selectedIndex = e[54].findIndex(e[154])), 16 & o[0] | 393216 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Xb(e) { + let t, o, i, r, n; + const a = [Ib, Eb], + s = []; + + function l(e, t) { + return e[52] ? 0 : e[45] ? 1 : -1 + }~(o = l(e)) && (i = s[o] = a[o](e)); + let c = e[33] && Hb(e); + return { + c() { + t = kn("div"), i && i.c(), r = Mn(), c && c.c(), An(t, "slot", "footer"), An(t, "style", e[40]) + }, + m(e, i) { + wn(e, t, i), ~o && s[o].m(t, null), bn(t, r), c && c.m(t, null), n = !0 + }, + p(e, d) { + let u = o; + o = l(e), o === u ? ~o && s[o].p(e, d) : (i && (ya(), va(s[u], 1, 1, (() => { + s[u] = null + })), ba()), ~o ? (i = s[o], i ? i.p(e, d) : (i = s[o] = a[o](e), i.c()), xa(i, 1), i.m(t, r)) : i = null), e[33] ? c ? (c.p(e, d), 4 & d[1] && xa(c, 1)) : (c = Hb(e), c.c(), xa(c, 1), c.m(t, null)) : c && (ya(), va(c, 1, 1, (() => { + c = null + })), ba()), (!n || 512 & d[1]) && An(t, "style", e[40]) + }, + i(e) { + n || (xa(i), xa(c), n = !0) + }, + o(e) { + va(i), va(c), n = !1 + }, + d(e) { + e && Sn(t), ~o && s[o].d(), c && c.d() + } + } +} + +function Yb(e) { + let t, o; + return t = new df({ + props: { + hasHeader: e[41], + $$slots: { + footer: [Xb], + main: [Pb], + header: [Mb] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[164]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o[1] && (i.hasHeader = e[41]), 2113929201 & o[0] | 134216703 & o[1] | 262144 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function qb(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, M, R, P, E, I, A, L, z, F, O, D, B, W, V, _, N, H, U, G, Z, X, Y, q, K, J, Q, ee, te, oe, ie, re, ne, ae, se, le, de, ue, he, pe, me, ge, $e, fe, ye = Gr, + be = () => (ye(), ye = en(Ee, (e => o(35, G = e))), Ee), + xe = Gr, + ve = () => (xe(), xe = en(Fe, (e => o(142, q = e))), Fe), + we = Gr, + Se = () => (we(), we = en(mt, (e => o(37, ie = e))), mt), + ke = Gr, + Ce = () => (ke(), ke = en(Ae, (e => o(149, pe = e))), Ae), + Me = Gr, + Pe = () => (Me(), Me = en(Ie, (e => o(56, $e = e))), Ie); + e.$$.on_destroy.push((() => ye())), e.$$.on_destroy.push((() => xe())), e.$$.on_destroy.push((() => we())), e.$$.on_destroy.push((() => ke())), e.$$.on_destroy.push((() => Me())); + let { + isActive: Ee + } = t; + be(); + let { + isActiveFraction: Ie + } = t; + Pe(); + let { + isVisible: Ae + } = t; + Ce(); + let { + stores: Le + } = t, { + locale: ze = {} + } = t, { + shapes: Fe + } = t; + ve(); + let { + toolbar: Oe = [] + } = t, { + toolShapes: De = {} + } = t, { + toolActive: Be + } = t, { + toolSelectRadius: We + } = t, { + toolRetainStyles: Ve = !1 + } = t, { + toolbarLayout: _e = "stack" + } = t, { + textInputMode: Ne + } = t, { + shapeControls: He = {} + } = t, { + enableButtonFlipVertical: je = !1 + } = t, { + enablePresetSelectImage: Ue = !0 + } = t, { + enablePresetDropImage: Ge = !0 + } = t, { + enableSelectToolToAddShape: Ze = !1 + } = t, { + enableAutoSelectMoveTool: Xe = ["line", "arrow", "path", "rectangle", "ellipse", "text"] + } = t, { + enableTapToAddText: Ye = !1 + } = t, { + enableMoveTool: qe = !1 + } = t, { + enableViewTool: Ke = !1 + } = t, { + enableToolShareStyles: Je = !0 + } = t, { + gridSize: Qe = 0 + } = t, { + snapThreshold: et = 0 + } = t, { + enableSnapToContext: tt = !0 + } = t, { + willRenderHeaderTools: ot = j + } = t, { + willRenderPresetToolbar: it + } = t, { + willRenderShapeStyleControls: nt + } = t, { + willStartInteraction: at + } = t, { + shapePresets: st = [] + } = t, { + utilKey: lt + } = t, { + mapScreenPointToImagePoint: ct + } = t, { + mapImagePointToScreenPoint: dt + } = t, { + imageRotation: ut = 0 + } = t, { + imageFlipX: ht = !1 + } = t, { + imageFlipY: pt = !1 + } = t, { + parentRect: mt + } = t; + Se(); + let { + hooks: gt = {} + } = t; + const ft = Jn("selection"); + on(e, ft, (e => o(148, de = e))); + const yt = Jn("isAnimated"); + on(e, yt, (e => o(139, Z = e))); + const bt = Jn("elasticityMultiplier"); + on(e, bt, (e => o(143, K = e))); + const xt = Jn("ui"); + on(e, xt, (e => o(174, ue = e))); + const vt = Jn("keysPressed"); + let wt; + on(e, vt, (e => o(146, se = e))); + const { + env: St, + history: kt, + rootRect: Ct, + rootColorSecondary: Tt, + enablePanInput: Mt, + enablePanInputStatus: Rt, + enableZoomInput: Pt, + stageRect: Et, + utilRectPadded: It, + scrollElasticity: At, + imageOverlayMarkup: Lt, + imagePreviewModifiers: zt, + imageCropRect: Ft, + shapePreprocessor: Ot, + stageScalar: Dt, + imageSelectionRect: Bt, + imageTransformsInterpolated: Wt, + imageSelectionPan: Vt, + imageSize: _t, + allowPan: Nt, + allowZoom: Ht, + allowZoomControls: jt, + allowPlayPause: Ut + } = Le; + on(e, St, (e => o(140, X = e))), on(e, Ct, (e => o(55, ge = e))), on(e, Tt, (e => o(57, fe = e))), on(e, Rt, (e => o(38, ne = e))), on(e, Et, (e => o(144, J = e))), on(e, It, (e => o(39, he = e))), on(e, zt, (e => o(150, me = e))), on(e, Ft, (e => o(173, re = e))), on(e, Ot, (e => o(147, le = e))), on(e, Dt, (e => o(171, te = e))), on(e, Bt, (e => o(172, oe = e))), on(e, Wt, (e => o(36, Q = e))), on(e, Vt, (e => o(170, ee = e))), on(e, _t, (e => o(145, ae = e))); + let Gt = 0, + Zt = {}; + const Xt = e => { + const [t, o] = wt[e]; + let i, r, n = "relative" === o.position; + const a = n ? "0%" : 0, + s = n ? "0%" : 0; + Ci(t) || wi(t) ? (r = n ? "20%" : .2 * ie.width, i = gi(t), i.x = a, i.y = s, gr(i, { + width: r, + height: r + }, ie)) : Ti(t) ? (r = n ? "10%" : .1 * ie.width, i = gi(t), i.x = a, i.y = s, gr(i, { + rx: r, + ry: r + }, ie)) : Mi(t) && (r = n ? "10%" : .1 * ie.width, i = gi(t), i.x1 = a, i.y1 = s, i.x2 = a, i.y2 = s), i && Promise.resolve().then((() => { + lo(ao(i, void 0, r)) + })) + }, + Yt = e => ct(Ry(e, ge)); + let qt, Kt, Jt = {}; + let Qt; + const eo = e => { + if (!(Ri(e) && Ao(e, "pathClose"))) return; + const t = [...e.strokeColor]; + t[3] = 1, qt.updateMarkupShape(e, { + pathClose: !1, + strokeColor: t + }, !1), qt.removeMarkupShapeProps(e, ["backgroundColor"], !1), qt.confirmMarkupItemDraft(), qt.selectShape(e) + }; + let to; + const oo = (e, t) => { + if (Eo(e)) return e; + if (e.endsWith("%")) { + return parseFloat(e) / 100 * t.width + } + }; + let io = void 0, + ro = void 0, + no = void 0; + const ao = (e, t, o) => { + let i = !1; + t || (i = !0, t = O ? ct(rt(J)) : rt(re)), t.x -= ie.x || 0, t.y -= ie.y || 0, (ht || pt) && (e.flipX = ht, e.flipY = pt); + const r = qt.getShapesNearPosition(q, t); + if (i && r.length) { + const e = .1 * Math.min(re.width, re.height); + t.x += Math.round(-e + Math.random() * e * 2), t.y += Math.round(-e + Math.random() * e * 2) + } + if (0 !== ut && (e.rotation = ht && pt ? -ut : ht || pt ? ut : -ut), Ao(e, "width") && Ao(e, "height")) { + const { + width: o, + height: i + } = mr(e, ["width", "height"], ie); + gr(e, { + x: t.x - .5 * o, + y: t.y - .5 * i + }, ie) + } else if (Ti(e)) gr(e, { + x: t.x, + y: t.y + }, ie); + else if (Mi(e)) { + const { + x1: i, + y1: r, + x2: n, + y2: a + } = mr(e, ["x1", "y1", "x2", "y2"], ie), s = Te(ce(i, r), ce(n, a)), l = T(o) ? rr(o, ie.width) : s; + gr(e, { + x1: t.x - l, + y1: t.y + l, + x2: t.x + l, + y2: t.y - l + }, ie) + } else if (Ri(e)) { + const { + points: o + } = mr(e, ["points"], ie), i = Re(o); + gr(e, { + points: o.map((e => ({ + x: e.x + t.x - i.x, + y: e.y + t.y - i.y + }))) + }, ie) + } + return e + }, + so = (e, t) => { + const o = ao(bi(e, re), t); + return e.shape && (Ao(e.shape, "x") && (o.x = e.shape.x), Ao(e.shape, "y") && (o.y = e.shape.y)), lo(o) + }, + lo = e => { + const { + beforeAddShape: t = (() => !0) + } = gt; + if (t(e)) return qt.addShape(e), qt.selectShape(e), D("addshape", e), kt.write(), e + }; + let co = !1; + const uo = () => { + kt.write() + }; + let ho; + const po = Jn("redrawTrigger"); + on(e, po, (e => o(141, Y = e))); + const mo = [], + go = ec(Z ? 20 : 0); + on(e, go, (e => o(138, U = e))); + return e.$$set = e => { + "isActive" in e && be(o(1, Ee = e.isActive)), "isActiveFraction" in e && Pe(o(2, Ie = e.isActiveFraction)), "isVisible" in e && Ce(o(3, Ae = e.isVisible)), "stores" in e && o(101, Le = e.stores), "locale" in e && o(4, ze = e.locale), "shapes" in e && ve(o(5, Fe = e.shapes)), "toolbar" in e && o(102, Oe = e.toolbar), "toolShapes" in e && o(103, De = e.toolShapes), "toolActive" in e && o(0, Be = e.toolActive), "toolSelectRadius" in e && o(6, We = e.toolSelectRadius), "toolRetainStyles" in e && o(104, Ve = e.toolRetainStyles), "toolbarLayout" in e && o(7, _e = e.toolbarLayout), "textInputMode" in e && o(8, Ne = e.textInputMode), "shapeControls" in e && o(9, He = e.shapeControls), "enableButtonFlipVertical" in e && o(10, je = e.enableButtonFlipVertical), "enablePresetSelectImage" in e && o(11, Ue = e.enablePresetSelectImage), "enablePresetDropImage" in e && o(12, Ge = e.enablePresetDropImage), "enableSelectToolToAddShape" in e && o(105, Ze = e.enableSelectToolToAddShape), "enableAutoSelectMoveTool" in e && o(106, Xe = e.enableAutoSelectMoveTool), "enableTapToAddText" in e && o(13, Ye = e.enableTapToAddText), "enableMoveTool" in e && o(107, qe = e.enableMoveTool), "enableViewTool" in e && o(108, Ke = e.enableViewTool), "enableToolShareStyles" in e && o(109, Je = e.enableToolShareStyles), "gridSize" in e && o(14, Qe = e.gridSize), "snapThreshold" in e && o(15, et = e.snapThreshold), "enableSnapToContext" in e && o(16, tt = e.enableSnapToContext), "willRenderHeaderTools" in e && o(110, ot = e.willRenderHeaderTools), "willRenderPresetToolbar" in e && o(111, it = e.willRenderPresetToolbar), "willRenderShapeStyleControls" in e && o(17, nt = e.willRenderShapeStyleControls), "willStartInteraction" in e && o(112, at = e.willStartInteraction), "shapePresets" in e && o(18, st = e.shapePresets), "utilKey" in e && o(19, lt = e.utilKey), "mapScreenPointToImagePoint" in e && o(20, ct = e.mapScreenPointToImagePoint), "mapImagePointToScreenPoint" in e && o(21, dt = e.mapImagePointToScreenPoint), "imageRotation" in e && o(22, ut = e.imageRotation), "imageFlipX" in e && o(23, ht = e.imageFlipX), "imageFlipY" in e && o(24, pt = e.imageFlipY), "parentRect" in e && Se(o(25, mt = e.parentRect)), "hooks" in e && o(113, gt = e.hooks) + }, e.$$.update = () => { + var t, ee, te, oe; + if (4194304 & e.$$.dirty[4] && o(123, i = se.includes(18)), 2098176 & e.$$.dirty[3] && (wt && De === wt || o(114, wt = De)), 16 & e.$$.dirty[1] && Nt.set(G), 16 & e.$$.dirty[1] && Ht.set(G), 16 & e.$$.dirty[1] && jt.set(G), 512 & e.$$.dirty[3] && o(33, r = Array.isArray(Oe) && Oe.length > 1 && Array.isArray(Oe[0][1])), 4 & e.$$.dirty[1] | 512 & e.$$.dirty[3] && o(54, n = r ? Oe.map(((e, t) => [t, e[0]])) : []), 67108864 & e.$$.dirty[0] | 4 & e.$$.dirty[1] | 512 & e.$$.dirty[3] && o(137, a = r ? Oe[Gt][1] : Oe), 262144 & e.$$.dirty[0] | 311296 & e.$$.dirty[3] | 8192 & e.$$.dirty[4] && o(32, s = ((e, { + willRenderPresetToolbar: t, + shapePresets: o, + enableViewTool: i, + enableMoveTool: n + }) => { + let a = 0 !== o.length || t ? e : e.filter((e => "preset" !== e[0])); + return r && (a = [ + ["move", e => e.shapeLabelToolMove, { + icon: e => e.shapeIconToolMove + }], + ["view", e => e.shapeLabelToolView, { + icon: e => e.shapeIconToolView + }], ...a + ]), a = n ? a : a.filter((e => "move" !== e[0])), i ? a : a.filter((e => "view" !== e[0])) + })(a, { + willRenderPresetToolbar: it, + shapePresets: st, + enableMoveTool: qe, + enableViewTool: Ke + })), 2 & e.$$.dirty[1] && o(135, d = !!s.length), 1 & e.$$.dirty[0] | 2 & e.$$.dirty[1] | 2048 & e.$$.dirty[4] && d && void 0 === Be && o(0, Be = s[0][0]), 67108865 & e.$$.dirty[0] | 4 & e.$$.dirty[1] | 4194304 & e.$$.dirty[3] | 8192 & e.$$.dirty[4] && r && o(115, Zt = { + ...Zt, + [Gt]: a.map((([e]) => e)).includes(Be) ? Be : Zt[Gt] || a[0][0] + }), 512 & e.$$.dirty[0] && o(134, l = !!Object.keys(He).length), 2 & e.$$.dirty[1] && o(34, c = s.length > 1), 12 & e.$$.dirty[1] && o(53, u = c || r), 1 & e.$$.dirty[0] && o(136, h = void 0 !== Be), 7168 & e.$$.dirty[4] && o(52, p = (!h || d) && l), 268435456 & e.$$.dirty[0] && o(30, D = ho && (t = ho, (e, o) => { + t.dispatchEvent(xp(e, o)) + })), 1073741825 & e.$$.dirty[0] | 16 & e.$$.dirty[1] && G && D && D("selectcontrol", Be), 524288 & e.$$.dirty[0] | 16 & e.$$.dirty[1] | 67108864 & e.$$.dirty[4] && (G ? un(zt, me[lt] = { + maskMarkupOpacity: .85 + }, me) : delete me[lt]), 1 & e.$$.dirty[0] | 2097152 & e.$$.dirty[3] && o(133, m = Be && wt[Be] ? wt[Be][1] : void 0), 512 & e.$$.dirty[4] && o(124, g = m && m.isSelection ? "selection" : "shapes"), 1073741824 & e.$$.dirty[3] | 1 & e.$$.dirty[4] && (e => { + if (!qt) return; + const t = qt.getShapeDraft(ft); + t && (e && (Kt = t.drawMode), qt.updateShapeDraft({ + drawMode: e ? "subtract" : Kt + }, ft)) + })("selection" === g && i), 134217729 & e.$$.dirty[0] && Be && qt) { + const e = qt.getMarkupItemDraft(); + e && eo(e) + } + if (1 & e.$$.dirty[0] && Be && qt && "move" !== Be && qt.blurShapes(), 16 & e.$$.dirty[1] | 33554432 & e.$$.dirty[4] && o(51, $ = pe && G), 256 & e.$$.dirty[1] | 1048576 & e.$$.dirty[4] && o(50, f = he && ce(J.x - he.x, J.y - he.y)), 512 & e.$$.dirty[0] && o(132, y = Object.keys(He)), 16 & e.$$.dirty[1] | 262144 & e.$$.dirty[4] && o(120, b = G && q.filter(Ii)[0]), 16 & e.$$.dirty[1] | 262144 & e.$$.dirty[4] && o(129, x = G && q.find((e => Ai(e)))), 16 & e.$$.dirty[1] | 262144 & e.$$.dirty[4] && o(49, v = G && q.find((e => Li(e)))), 1 & e.$$.dirty[0] | 16 & e.$$.dirty[1] | 2097152 & e.$$.dirty[3] && o(126, w = G && wt[Be] ? or(gi({ + ...wt[Be][0], + ...ue[lt] ? ue[lt][Be] : {} + })) : {}), 2097152 & e.$$.dirty[3] && wt && o(116, Jt = {}), 1 & e.$$.dirty[0] | 8454144 & e.$$.dirty[3] | 260 & e.$$.dirty[4] && o(125, S = w && Object.keys(w).reduce(((e, t) => { + const o = "disableStyle" === t, + i = "settings" === t, + r = !!y.find((e => e.split("_").includes(t))); + if (!o && !i && !r) return e; + if (void 0 === w[t]) return e; + if (!0 === w.disableStyle) return e; + if (w.disableStyle && w.disableStyle.includes(t)) return e; + if ("strokeWidth" === t && void 0 === Jt[t] && Ao(w, "points")) return e[t] = w[t], e; + const { + share: n = !0 + } = w.settings && w.settings[t] || {}, a = Je && n ? Jt : Jt[Be] || {}; + return e[t] = Ao(a, t) ? a[t] : w[t], e + }), {})), e.$$.dirty[4], 524289 & e.$$.dirty[0] | 2048 & e.$$.dirty[3] | 2 & e.$$.dirty[4] && (Ve ? ((e, t, o) => { + const i = ue[e], + r = i ? i[t] : {}; + xt.set({ + ...ue, + [e]: { + ...i, + [t]: { + ...r, + ...o + } + } + }) + })(lt, Be, S) : (ee = lt, xt.set({ + [ee]: {} + }))), 16 & e.$$.dirty[1] | 134217728 & e.$$.dirty[3] | 16777218 & e.$$.dirty[4] && o(31, k = de && G ? b || S : void 0), 1 & e.$$.dirty[1] | 8388608 & e.$$.dirty[4] && k && k.lineEnd && !le && console.warn("Set shapePreprocessor property to draw lineStart and lineEnd styles.\nhttps://pqina.nl/pintura/docs/v8/api/exports/#createshapepreprocessor"), 1 & e.$$.dirty[0] | 4 & e.$$.dirty[4] && o(48, C = Ao(w, "eraseRadius") || Ao(w, "points") && !Ao(w, "pathClose") || "move" === Be || "view" === Be), 64 & e.$$.dirty[1] | 4 & e.$$.dirty[4] && o(47, M = w && void 0 !== w.eraseRadius ? oo(w.eraseRadius, ie) : void 0), 16 & e.$$.dirty[1] | 4194304 & e.$$.dirty[4] && o(130, R = G && se.includes(32)), 1 & e.$$.dirty[0] | 16 & e.$$.dirty[1] && o(131, P = G && "view" === Be), 192 & e.$$.dirty[4] && o(128, E = P || R), 48 & e.$$.dirty[4] && o(127, I = !!E && (!!x || Gd(document.activeElement))), 16 & e.$$.dirty[1] | 24 & e.$$.dirty[4] && Mt.set(!G || E && !I), 16 & e.$$.dirty[1] | 8 & e.$$.dirty[4] && Pt.set(!G || !I), 64 & e.$$.dirty[1] | 6 & e.$$.dirty[4] && o(121, A = w.cursorStyle ? (({ + cursorStyle: e, + cursorSize: t + }, o, i) => { + let r; + const n = o[t]; + if (void 0 === n ? r = oo(t, i) : Eo(n) ? r = n : T(n) && (r = lr(t, o[t], i), "strokeWidth" === t && (r *= .5)), !(r <= 0 || void 0 === r)) return { + size: r, + style: e + } + })(w, { + ...w, + ...S + }, ie) : void 0), 67108864 & e.$$.dirty[3] | 2097152 & e.$$.dirty[4] && o(122, L = no && (oe = ae, (te = no).x >= 0 && te.y >= 0 && te.x <= oe.width && te.y <= oe.height)), 524288 & e.$$.dirty[0] | 160 & e.$$.dirty[1] | 1929379840 & e.$$.dirty[3] | 1 & e.$$.dirty[4]) + if (L && !io && A && !ne) { + const e = A.size * Q.scale, + t = { + id: "cursor-" + lt, + x: ro.x, + y: ro.y, + strokeWidth: .5, + strokeColor: [0, 0, 0] + }; + "ellipse" === A.style && (t.rx = e, t.ry = e); + const o = { + strokeWidth: 2.5, + strokeColor: [1, 1, 1], + opacity: .75 + }, + r = [{ + ...t, + ...o + }, t]; + if ("selection" === g && i) { + const t = e, + i = ro.x + t, + n = ro.y + t + 4, + a = { + id: "cursor-" + lt, + strokeWidth: .75, + strokeColor: [0, 0, 0], + points: [{ + x: i, + y: n + }, { + x: i + 4, + y: n + }] + }; + r.push({ + ...a, + ...o, + strokeWidth: 2, + points: [{ + x: i - .5, + y: n + }, { + x: i + 4.5, + y: n + }] + }, a) + }(e => { + Lt.update((t => [...t.filter((e => e.id !== "cursor-" + lt)), ...e])) + })(r) + } else Lt.update((e => e.filter((e => e.id !== "cursor-" + lt)))); + 1 & e.$$.dirty[0] | 128 & e.$$.dirty[1] | 956301312 & e.$$.dirty[3] && o(46, z = L ? ((e, t, o, i, r, n) => { + if (i) return r ? "grabbing" : "grab"; + if (e && !t) return "none"; + if (!t) return "move" === n ? "default" : "crosshair"; + let a = t || o; + return Ii(a) ? Ai(a) ? "modal" === Ne ? "default" : "text" : Zi(a) ? "move" : "default" : "default" + })(A, io, b, ne, false, Be) : "default"), 264193 & e.$$.dirty[0] | 262144 & e.$$.dirty[3] && o(45, F = "preset" === Be && (st.length > 0 || Ue || it)), 64 & e.$$.dirty[1] && (O = !Ao(ie, "x") && !Ao(ie, "y")), 524288 & e.$$.dirty[4] && o(44, B = K * At), 262144 & e.$$.dirty[3] | 196608 & e.$$.dirty[4] && o(43, W = Y && it ? e => zp((() => it(e, so, { + ...X + }, (() => po.set({}))))) : j), 1048576 & e.$$.dirty[3] && o(42, V = Object.keys(gt).reduce(((e, t) => ("beforeAddShape" === t || void 0 === gt[t] || (e[t] = gt[t]), e)), {})), 16 & e.$$.dirty[1] && (e => { + q && Fe.update((t => t.map((t => (t._prerender = !!e && Ai(t), t))))) + })(G), 131072 & e.$$.dirty[3] | 196608 & e.$$.dirty[4] && o(29, _ = Y && ot([], X, (() => po.set({})))), 536871424 & e.$$.dirty[0] && o(41, N = !!_.length || !!Object.keys(He).some((e => mo.includes(e)))), 16 & e.$$.dirty[1] | 32768 & e.$$.dirty[4] && Z && go.set(G ? 0 : 20), 16384 & e.$$.dirty[4] && o(40, H = U ? `transform: translateY(${U}px)` : void 0) + }, Ut.set(!1), [Be, Ee, Ie, Ae, ze, Fe, We, _e, Ne, He, je, Ue, Ge, Ye, Qe, et, tt, nt, st, lt, ct, dt, ut, ht, pt, mt, Gt, qt, ho, _, D, k, s, r, c, G, Q, ie, ne, he, H, N, V, W, B, F, z, M, C, v, f, $, p, u, n, ge, $e, fe, ft, yt, bt, xt, vt, St, Ct, Tt, Rt, Et, It, Lt, zt, Ft, Ot, Dt, Bt, Wt, Vt, _t, ({ + index: e + }, t) => { + o(26, Gt = e), o(0, Be = Zt[e]) + }, ({ + value: e + }, t) => { + o(0, Be = e), (Ze || /enter/i.test(t.key)) && Xt(e) + }, e => { + if ("eraser" === Be) Qt = qt.eraseShape(); + else if (Be && wt[Be]) { + const [e, t = {}] = wt[Be], { + drawMode: o + } = k; + "selection" === g && "new" === o && ft.set([]); + let r = {}; + "selection" === g && (D("selectiondown", [...de]), i && (Kt = e.drawMode, r.drawMode = "subtract")), Qt = qt.createShape({ + ...e, + ...S, + ...r + }, t) + } else Qt = void 0; + return !!Qt && (Qt.start(e), !0) + }, e => !!Qt && (Qt.update(e), !0), e => !!Qt && (Qt.release(e), !0), e => !!Qt && (Qt.cancel(e), Qt = void 0, !0), e => { + if (!Qt) return !1; + if (Qt.end(e), Qt = void 0, "selection" === g) { + if (e.detail.isTap) { + const [e] = wt[Be]; + e.bitmap || ft.set([]) + } + D("selectionup", [...de]) + } + const t = qt.getMarkupItemDraft(), + i = qe && (!0 === Xe || Array.isArray(Xe) && Xe.includes(Be)); + return t && !t.isEditing || !i || o(0, Be = "move"), !0 + }, e => { + const { + key: t + } = e, o = qt.getMarkupItemDraft(); + /escape/i.test(t) && o && (e.preventDefault(), e.stopPropagation(), qt.discardMarkupItemDraft(), Qt = void 0), /enter/i.test(t) && o && (e.preventDefault(), e.stopPropagation(), eo(o), Qt = void 0) + }, function(e) { + Object.keys(e).forEach((t => { + const { + retain: i = !0, + share: r = !0 + } = w.settings && w.settings[t] || {}; + i && (Je && r ? o(116, Jt[t] = e[t], Jt) : (Jt[Be] || o(116, Jt[Be] = {}, Jt), o(116, Jt[Be][t] = e[t], Jt))) + })), D("selectstyle", e), b && (qt.updateMarkupShape(b, e), clearTimeout(to), to = setTimeout((() => { + uo() + }), 200)) + }, (e, t, i) => { + o(118, ro = t), o(119, no = i) + }, () => { + o(119, no = void 0), o(118, ro = void 0) + }, e => { + D("markuptap", e) + }, e => o(117, io = e), () => { + co = !1 + }, (e, t) => { + if (co) return; + const { + beforeAddShape: o = (() => !0) + } = gt, i = Yt(t), r = qt.getMarkupItemDraft(), n = $t(re, { + x: i.x + (ie.x || 0), + y: i.y + (ie.y || 0) + }); + if (r && !n && qt.discardMarkupItemDraft(), n) { + if (!r) { + const r = bi(e, re), + n = ao(r, i); + return o(n) ? (Bi(n), void qt.addShape(n)) : (co = !0, void t.preventDefault()) + } + Ci(r) && (i.x -= .5 * r.width, i.y -= .5 * r.height), e.shape && (Ao(e.shape, "x") && (i.x = e.shape.x), Ao(e.shape, "y") && (i.y = e.shape.y)), qt.updateMarkupShape(r, i) + } + }, (e, t) => { + if (co) return; + const o = Yt(t); + if (!$t(re, { + x: o.x + (ie.x || 0), + y: o.y + (ie.y || 0) + })) return void qt.discardMarkupItemDraft(); + const i = qt.confirmMarkupItemDraft(); + qt.selectShape(i), D("addshape", i), kt.write() + }, e => so(e), e => { + return t = e.detail.resources, o = Yt(e.detail.event), t.forEach((e => so(e, o))); + var t, o + }, e => { + if (!at) return !0; + const t = rectClone(oe); + return rectScale(t, 1 / te), rectTranslate(t, ee), rectScale(t, Q.scale), at(e, { + ...t, + x: t.x + J.x, + y: t.y + J.y + }) + }, uo, po, mo, go, Le, Oe, De, Ve, Ze, Xe, qe, Ke, Je, ot, it, at, gt, wt, Zt, Jt, io, ro, no, b, A, L, i, g, S, w, I, E, x, R, P, y, m, l, d, h, a, U, Z, X, Y, q, K, J, ae, se, le, de, pe, me, function(t) { + Qn.call(this, e, t) + }, e => e[0] === Be, (e, t, o) => { + const i = e.filter((([, e]) => !mo.includes(e))); + return nt ? nt(i, t, o) : i + }, e => e[0] === Gt, e => { + Promise.resolve().then((() => { + D("addshape", e), uo() + })) + }, e => { + D("selectshape", e) + }, e => { + Promise.resolve().then((() => { + D("blurshape", e) + })) + }, e => { + D("tapshape", e) + }, e => { + D("updateshape", e), uo() + }, e => { + D("removeshape", e), uo() + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + qt = e, o(27, qt) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + ho = e, o(28, ho) + })) + }, e => e.filter((([, e]) => mo.includes(e))), function(t) { + Qn.call(this, e, t) + }] +} +class Kb extends Fa { + constructor(e) { + super(), za(this, e, qb, Yb, Qr, { + isActive: 1, + isActiveFraction: 2, + isVisible: 3, + stores: 101, + locale: 4, + shapes: 5, + toolbar: 102, + toolShapes: 103, + toolActive: 0, + toolSelectRadius: 6, + toolRetainStyles: 104, + toolbarLayout: 7, + textInputMode: 8, + shapeControls: 9, + enableButtonFlipVertical: 10, + enablePresetSelectImage: 11, + enablePresetDropImage: 12, + enableSelectToolToAddShape: 105, + enableAutoSelectMoveTool: 106, + enableTapToAddText: 13, + enableMoveTool: 107, + enableViewTool: 108, + enableToolShareStyles: 109, + gridSize: 14, + snapThreshold: 15, + enableSnapToContext: 16, + willRenderHeaderTools: 110, + willRenderPresetToolbar: 111, + willRenderShapeStyleControls: 17, + willStartInteraction: 112, + shapePresets: 18, + utilKey: 19, + mapScreenPointToImagePoint: 20, + mapImagePointToScreenPoint: 21, + imageRotation: 22, + imageFlipX: 23, + imageFlipY: 24, + parentRect: 25, + hooks: 113 + }, null, [-1, -1, -1, -1, -1, -1, -1]) + } + get isActive() { + return this.$$.ctx[1] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[2] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[3] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[101] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[4] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get shapes() { + return this.$$.ctx[5] + } + set shapes(e) { + this.$$set({ + shapes: e + }), pa() + } + get toolbar() { + return this.$$.ctx[102] + } + set toolbar(e) { + this.$$set({ + toolbar: e + }), pa() + } + get toolShapes() { + return this.$$.ctx[103] + } + set toolShapes(e) { + this.$$set({ + toolShapes: e + }), pa() + } + get toolActive() { + return this.$$.ctx[0] + } + set toolActive(e) { + this.$$set({ + toolActive: e + }), pa() + } + get toolSelectRadius() { + return this.$$.ctx[6] + } + set toolSelectRadius(e) { + this.$$set({ + toolSelectRadius: e + }), pa() + } + get toolRetainStyles() { + return this.$$.ctx[104] + } + set toolRetainStyles(e) { + this.$$set({ + toolRetainStyles: e + }), pa() + } + get toolbarLayout() { + return this.$$.ctx[7] + } + set toolbarLayout(e) { + this.$$set({ + toolbarLayout: e + }), pa() + } + get textInputMode() { + return this.$$.ctx[8] + } + set textInputMode(e) { + this.$$set({ + textInputMode: e + }), pa() + } + get shapeControls() { + return this.$$.ctx[9] + } + set shapeControls(e) { + this.$$set({ + shapeControls: e + }), pa() + } + get enableButtonFlipVertical() { + return this.$$.ctx[10] + } + set enableButtonFlipVertical(e) { + this.$$set({ + enableButtonFlipVertical: e + }), pa() + } + get enablePresetSelectImage() { + return this.$$.ctx[11] + } + set enablePresetSelectImage(e) { + this.$$set({ + enablePresetSelectImage: e + }), pa() + } + get enablePresetDropImage() { + return this.$$.ctx[12] + } + set enablePresetDropImage(e) { + this.$$set({ + enablePresetDropImage: e + }), pa() + } + get enableSelectToolToAddShape() { + return this.$$.ctx[105] + } + set enableSelectToolToAddShape(e) { + this.$$set({ + enableSelectToolToAddShape: e + }), pa() + } + get enableAutoSelectMoveTool() { + return this.$$.ctx[106] + } + set enableAutoSelectMoveTool(e) { + this.$$set({ + enableAutoSelectMoveTool: e + }), pa() + } + get enableTapToAddText() { + return this.$$.ctx[13] + } + set enableTapToAddText(e) { + this.$$set({ + enableTapToAddText: e + }), pa() + } + get enableMoveTool() { + return this.$$.ctx[107] + } + set enableMoveTool(e) { + this.$$set({ + enableMoveTool: e + }), pa() + } + get enableViewTool() { + return this.$$.ctx[108] + } + set enableViewTool(e) { + this.$$set({ + enableViewTool: e + }), pa() + } + get enableToolShareStyles() { + return this.$$.ctx[109] + } + set enableToolShareStyles(e) { + this.$$set({ + enableToolShareStyles: e + }), pa() + } + get gridSize() { + return this.$$.ctx[14] + } + set gridSize(e) { + this.$$set({ + gridSize: e + }), pa() + } + get snapThreshold() { + return this.$$.ctx[15] + } + set snapThreshold(e) { + this.$$set({ + snapThreshold: e + }), pa() + } + get enableSnapToContext() { + return this.$$.ctx[16] + } + set enableSnapToContext(e) { + this.$$set({ + enableSnapToContext: e + }), pa() + } + get willRenderHeaderTools() { + return this.$$.ctx[110] + } + set willRenderHeaderTools(e) { + this.$$set({ + willRenderHeaderTools: e + }), pa() + } + get willRenderPresetToolbar() { + return this.$$.ctx[111] + } + set willRenderPresetToolbar(e) { + this.$$set({ + willRenderPresetToolbar: e + }), pa() + } + get willRenderShapeStyleControls() { + return this.$$.ctx[17] + } + set willRenderShapeStyleControls(e) { + this.$$set({ + willRenderShapeStyleControls: e + }), pa() + } + get willStartInteraction() { + return this.$$.ctx[112] + } + set willStartInteraction(e) { + this.$$set({ + willStartInteraction: e + }), pa() + } + get shapePresets() { + return this.$$.ctx[18] + } + set shapePresets(e) { + this.$$set({ + shapePresets: e + }), pa() + } + get utilKey() { + return this.$$.ctx[19] + } + set utilKey(e) { + this.$$set({ + utilKey: e + }), pa() + } + get mapScreenPointToImagePoint() { + return this.$$.ctx[20] + } + set mapScreenPointToImagePoint(e) { + this.$$set({ + mapScreenPointToImagePoint: e + }), pa() + } + get mapImagePointToScreenPoint() { + return this.$$.ctx[21] + } + set mapImagePointToScreenPoint(e) { + this.$$set({ + mapImagePointToScreenPoint: e + }), pa() + } + get imageRotation() { + return this.$$.ctx[22] + } + set imageRotation(e) { + this.$$set({ + imageRotation: e + }), pa() + } + get imageFlipX() { + return this.$$.ctx[23] + } + set imageFlipX(e) { + this.$$set({ + imageFlipX: e + }), pa() + } + get imageFlipY() { + return this.$$.ctx[24] + } + set imageFlipY(e) { + this.$$set({ + imageFlipY: e + }), pa() + } + get parentRect() { + return this.$$.ctx[25] + } + set parentRect(e) { + this.$$set({ + parentRect: e + }), pa() + } + get hooks() { + return this.$$.ctx[113] + } + set hooks(e) { + this.$$set({ + hooks: e + }), pa() + } +} +var Jb = (e, t, o, i, r, n, a, s, l) => { + const c = ue(e), + d = .5 * o.width, + u = .5 * o.height, + h = .5 * t.width, + p = .5 * t.height, + m = r.x + i.x, + g = r.y + i.y; + s && (c.x = o.width - c.x), l && (c.y = o.height - c.y); + const $ = Math.cos(n), + f = Math.sin(n); + c.x -= d, c.y -= u; + const y = c.x * $ - c.y * f, + b = c.x * f + c.y * $; + c.x = d + y, c.y = u + b, c.x *= a, c.y *= a, c.x += h, c.y += p, c.x += m, c.y += g, c.x -= d * a, c.y -= u * a; + const x = (r.x - m) * a, + v = (r.y - g) * a, + w = x * $ - v * f, + S = x * f + v * $; + return c.x += w, c.y += S, c + }, + Qb = (e, t, o, i, r, n, a, s, l) => { + const c = ue(e), + d = Ve(o), + u = Ve(t), + h = ce(r.x + i.x, r.y + i.y), + p = Math.cos(n), + m = Math.sin(n); + c.x -= u.x, c.y -= u.y; + const g = (r.x - h.x) * a, + $ = (r.y - h.y) * a, + f = g * p - $ * m, + y = g * m + $ * p; + c.x -= f, c.y -= y, c.x -= h.x, c.y -= h.y, c.x /= a, c.y /= a; + const b = c.x * p + c.y * m, + x = c.x * m - c.y * p; + return c.x = b, c.y = -x, c.x += d.x, c.y += d.y, s && (c.x = o.width - c.x), l && (c.y = o.height - c.y), c + }, + ex = e => "boolean" == typeof e; + +function tx(e) { + let t, o, i; + + function r(t) { + e[58](t) + } + let n = { + utilKey: "annotate", + stores: e[4], + locale: e[5], + isActive: e[1], + isActiveFraction: e[2], + isVisible: e[3], + mapScreenPointToImagePoint: e[43], + mapImagePointToScreenPoint: e[42], + imageRotation: e[44], + imageFlipX: e[41], + imageFlipY: e[40], + shapes: e[46], + toolbar: e[20] || e[6], + toolShapes: e[21] || e[7], + toolRetainStyles: e[8], + enableSelectToolToAddShape: e[29], + enableTapToAddText: e[30], + enableViewTool: e[28], + enableMoveTool: e[32], + enableAutoSelectMoveTool: e[31], + snapThreshold: e[15], + gridSize: Eo(e[17]) ? e[17] : e[14], + enableSnapToContext: ex(e[18]) ? e[18] : e[16], + enableToolShareStyles: e[12], + shapeControls: e[22] || e[9], + shapePresets: e[26], + enableButtonFlipVertical: e[23], + parentRect: e[47], + enablePresetDropImage: e[25], + enablePresetSelectImage: e[24], + toolSelectRadius: e[10], + textInputMode: e[11], + willStartInteraction: e[13], + willRenderPresetToolbar: e[27] || e[19], + hooks: { + willRenderShapeControls: e[33], + willRenderShapeTextControls: e[34], + beforeAddShape: e[35], + beforeRemoveShape: e[36], + beforeDeselectShape: e[37], + beforeSelectShape: e[38], + beforeUpdateShape: e[39] + } + }; + return void 0 !== e[0] && (n.toolActive = e[0]), t = new Kb({ + props: n + }), ta.push((() => Ea(t, "toolActive", r))), t.$on("measure", e[59]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 16 & i[0] && (r.stores = e[4]), 32 & i[0] && (r.locale = e[5]), 2 & i[0] && (r.isActive = e[1]), 4 & i[0] && (r.isActiveFraction = e[2]), 8 & i[0] && (r.isVisible = e[3]), 4096 & i[1] && (r.mapScreenPointToImagePoint = e[43]), 2048 & i[1] && (r.mapImagePointToScreenPoint = e[42]), 8192 & i[1] && (r.imageRotation = e[44]), 1024 & i[1] && (r.imageFlipX = e[41]), 512 & i[1] && (r.imageFlipY = e[40]), 1048640 & i[0] && (r.toolbar = e[20] || e[6]), 2097280 & i[0] && (r.toolShapes = e[21] || e[7]), 256 & i[0] && (r.toolRetainStyles = e[8]), 536870912 & i[0] && (r.enableSelectToolToAddShape = e[29]), 1073741824 & i[0] && (r.enableTapToAddText = e[30]), 268435456 & i[0] && (r.enableViewTool = e[28]), 2 & i[1] && (r.enableMoveTool = e[32]), 1 & i[1] && (r.enableAutoSelectMoveTool = e[31]), 32768 & i[0] && (r.snapThreshold = e[15]), 147456 & i[0] && (r.gridSize = Eo(e[17]) ? e[17] : e[14]), 327680 & i[0] && (r.enableSnapToContext = ex(e[18]) ? e[18] : e[16]), 4096 & i[0] && (r.enableToolShareStyles = e[12]), 4194816 & i[0] && (r.shapeControls = e[22] || e[9]), 67108864 & i[0] && (r.shapePresets = e[26]), 8388608 & i[0] && (r.enableButtonFlipVertical = e[23]), 33554432 & i[0] && (r.enablePresetDropImage = e[25]), 16777216 & i[0] && (r.enablePresetSelectImage = e[24]), 1024 & i[0] && (r.toolSelectRadius = e[10]), 2048 & i[0] && (r.textInputMode = e[11]), 8192 & i[0] && (r.willStartInteraction = e[13]), 134742016 & i[0] && (r.willRenderPresetToolbar = e[27] || e[19]), 508 & i[1] && (r.hooks = { + willRenderShapeControls: e[33], + willRenderShapeTextControls: e[34], + beforeAddShape: e[35], + beforeRemoveShape: e[36], + beforeDeselectShape: e[37], + beforeSelectShape: e[38], + beforeUpdateShape: e[39] + }), !o && 1 & i[0] && (o = !0, r.toolActive = e[0], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function ox(e, t, o) { + let i, r, n, a, s, l, c, d, u; + let { + isActive: h + } = t, { + isActiveFraction: p + } = t, { + isVisible: m + } = t, { + stores: g + } = t, { + locale: $ = {} + } = t, { + markupEditorToolbar: f + } = t, { + markupEditorToolStyles: y + } = t, { + markupEditorToolRetainStyles: b + } = t, { + markupEditorShapeStyleControls: x + } = t, { + markupEditorToolSelectRadius: v + } = t, { + markupEditorTextInputMode: w + } = t, { + markupEditorToolShareStyles: S + } = t, { + markupEditorWillStartInteraction: k + } = t, { + markupEditorGridSize: C = 0 + } = t, { + markupEditorSnapThreshold: T = 0 + } = t, { + markupEditorSnapToContext: M = !1 + } = t, { + annotateGridSize: R + } = t, { + annotateSnapToContext: P + } = t, { + willRenderShapePresetToolbar: E + } = t, { + annotateTools: I + } = t, { + annotateToolShapes: A + } = t, { + annotateShapeControls: L + } = t, { + annotateActiveTool: z + } = t, { + annotateEnableButtonFlipVertical: F = !1 + } = t, { + annotateEnableSelectImagePreset: O = !1 + } = t, { + annotateEnableDropImagePreset: D = !0 + } = t, { + annotatePresets: B = [] + } = t, { + annotateWillRenderShapePresetToolbar: W + } = t, { + enableViewTool: V + } = t, { + enableSelectToolToAddShape: _ + } = t, { + enableTapToAddText: N + } = t, { + enableAutoSelectMoveTool: H + } = t, { + enableMoveTool: j + } = t, { + willRenderShapeControls: U + } = t, { + willRenderShapeTextControls: G + } = t, { + beforeAddShape: Z + } = t, { + beforeRemoveShape: X + } = t, { + beforeDeselectShape: Y + } = t, { + beforeSelectShape: q + } = t, { + beforeUpdateShape: K + } = t; + const { + rootRect: J, + imageAnnotation: Q, + imageSize: ee, + imageRotation: te, + imageFlipX: oe, + imageFlipY: ie, + imageTransforms: re, + imageTransformsInterpolated: ne + } = g; + return on(e, J, (e => o(57, d = e))), on(e, ee, (e => o(56, c = e))), on(e, te, (e => o(44, u = e))), on(e, oe, (e => o(41, a = e))), on(e, ie, (e => o(40, n = e))), on(e, re, (e => o(55, l = e))), on(e, ne, (e => o(54, s = e))), e.$$set = e => { + "isActive" in e && o(1, h = e.isActive), "isActiveFraction" in e && o(2, p = e.isActiveFraction), "isVisible" in e && o(3, m = e.isVisible), "stores" in e && o(4, g = e.stores), "locale" in e && o(5, $ = e.locale), "markupEditorToolbar" in e && o(6, f = e.markupEditorToolbar), "markupEditorToolStyles" in e && o(7, y = e.markupEditorToolStyles), "markupEditorToolRetainStyles" in e && o(8, b = e.markupEditorToolRetainStyles), "markupEditorShapeStyleControls" in e && o(9, x = e.markupEditorShapeStyleControls), "markupEditorToolSelectRadius" in e && o(10, v = e.markupEditorToolSelectRadius), "markupEditorTextInputMode" in e && o(11, w = e.markupEditorTextInputMode), "markupEditorToolShareStyles" in e && o(12, S = e.markupEditorToolShareStyles), "markupEditorWillStartInteraction" in e && o(13, k = e.markupEditorWillStartInteraction), "markupEditorGridSize" in e && o(14, C = e.markupEditorGridSize), "markupEditorSnapThreshold" in e && o(15, T = e.markupEditorSnapThreshold), "markupEditorSnapToContext" in e && o(16, M = e.markupEditorSnapToContext), "annotateGridSize" in e && o(17, R = e.annotateGridSize), "annotateSnapToContext" in e && o(18, P = e.annotateSnapToContext), "willRenderShapePresetToolbar" in e && o(19, E = e.willRenderShapePresetToolbar), "annotateTools" in e && o(20, I = e.annotateTools), "annotateToolShapes" in e && o(21, A = e.annotateToolShapes), "annotateShapeControls" in e && o(22, L = e.annotateShapeControls), "annotateActiveTool" in e && o(0, z = e.annotateActiveTool), "annotateEnableButtonFlipVertical" in e && o(23, F = e.annotateEnableButtonFlipVertical), "annotateEnableSelectImagePreset" in e && o(24, O = e.annotateEnableSelectImagePreset), "annotateEnableDropImagePreset" in e && o(25, D = e.annotateEnableDropImagePreset), "annotatePresets" in e && o(26, B = e.annotatePresets), "annotateWillRenderShapePresetToolbar" in e && o(27, W = e.annotateWillRenderShapePresetToolbar), "enableViewTool" in e && o(28, V = e.enableViewTool), "enableSelectToolToAddShape" in e && o(29, _ = e.enableSelectToolToAddShape), "enableTapToAddText" in e && o(30, N = e.enableTapToAddText), "enableAutoSelectMoveTool" in e && o(31, H = e.enableAutoSelectMoveTool), "enableMoveTool" in e && o(32, j = e.enableMoveTool), "willRenderShapeControls" in e && o(33, U = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(34, G = e.willRenderShapeTextControls), "beforeAddShape" in e && o(35, Z = e.beforeAddShape), "beforeRemoveShape" in e && o(36, X = e.beforeRemoveShape), "beforeDeselectShape" in e && o(37, Y = e.beforeDeselectShape), "beforeSelectShape" in e && o(38, q = e.beforeSelectShape), "beforeUpdateShape" in e && o(39, K = e.beforeUpdateShape) + }, e.$$.update = () => { + 125830656 & e.$$.dirty[1] && o(43, i = e => Qb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)), 125830656 & e.$$.dirty[1] && o(42, r = e => Jb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)) + }, [z, h, p, m, g, $, f, y, b, x, v, w, S, k, C, T, M, R, P, E, I, A, L, F, O, D, B, W, V, _, N, H, j, U, G, Z, X, Y, q, K, n, a, r, i, u, J, Q, ee, te, oe, ie, re, ne, "annotate", s, l, c, d, function(e) { + z = e, o(0, z) + }, function(t) { + Qn.call(this, e, t) + }] +} +var ix = { + util: ["annotate", class extends Fa { + constructor(e) { + super(), za(this, e, ox, tx, Qr, { + name: 53, + isActive: 1, + isActiveFraction: 2, + isVisible: 3, + stores: 4, + locale: 5, + markupEditorToolbar: 6, + markupEditorToolStyles: 7, + markupEditorToolRetainStyles: 8, + markupEditorShapeStyleControls: 9, + markupEditorToolSelectRadius: 10, + markupEditorTextInputMode: 11, + markupEditorToolShareStyles: 12, + markupEditorWillStartInteraction: 13, + markupEditorGridSize: 14, + markupEditorSnapThreshold: 15, + markupEditorSnapToContext: 16, + annotateGridSize: 17, + annotateSnapToContext: 18, + willRenderShapePresetToolbar: 19, + annotateTools: 20, + annotateToolShapes: 21, + annotateShapeControls: 22, + annotateActiveTool: 0, + annotateEnableButtonFlipVertical: 23, + annotateEnableSelectImagePreset: 24, + annotateEnableDropImagePreset: 25, + annotatePresets: 26, + annotateWillRenderShapePresetToolbar: 27, + enableViewTool: 28, + enableSelectToolToAddShape: 29, + enableTapToAddText: 30, + enableAutoSelectMoveTool: 31, + enableMoveTool: 32, + willRenderShapeControls: 33, + willRenderShapeTextControls: 34, + beforeAddShape: 35, + beforeRemoveShape: 36, + beforeDeselectShape: 37, + beforeSelectShape: 38, + beforeUpdateShape: 39 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[53] + } + get isActive() { + return this.$$.ctx[1] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[2] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[3] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[4] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[5] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get markupEditorToolbar() { + return this.$$.ctx[6] + } + set markupEditorToolbar(e) { + this.$$set({ + markupEditorToolbar: e + }), pa() + } + get markupEditorToolStyles() { + return this.$$.ctx[7] + } + set markupEditorToolStyles(e) { + this.$$set({ + markupEditorToolStyles: e + }), pa() + } + get markupEditorToolRetainStyles() { + return this.$$.ctx[8] + } + set markupEditorToolRetainStyles(e) { + this.$$set({ + markupEditorToolRetainStyles: e + }), pa() + } + get markupEditorShapeStyleControls() { + return this.$$.ctx[9] + } + set markupEditorShapeStyleControls(e) { + this.$$set({ + markupEditorShapeStyleControls: e + }), pa() + } + get markupEditorToolSelectRadius() { + return this.$$.ctx[10] + } + set markupEditorToolSelectRadius(e) { + this.$$set({ + markupEditorToolSelectRadius: e + }), pa() + } + get markupEditorTextInputMode() { + return this.$$.ctx[11] + } + set markupEditorTextInputMode(e) { + this.$$set({ + markupEditorTextInputMode: e + }), pa() + } + get markupEditorToolShareStyles() { + return this.$$.ctx[12] + } + set markupEditorToolShareStyles(e) { + this.$$set({ + markupEditorToolShareStyles: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[13] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + get markupEditorGridSize() { + return this.$$.ctx[14] + } + set markupEditorGridSize(e) { + this.$$set({ + markupEditorGridSize: e + }), pa() + } + get markupEditorSnapThreshold() { + return this.$$.ctx[15] + } + set markupEditorSnapThreshold(e) { + this.$$set({ + markupEditorSnapThreshold: e + }), pa() + } + get markupEditorSnapToContext() { + return this.$$.ctx[16] + } + set markupEditorSnapToContext(e) { + this.$$set({ + markupEditorSnapToContext: e + }), pa() + } + get annotateGridSize() { + return this.$$.ctx[17] + } + set annotateGridSize(e) { + this.$$set({ + annotateGridSize: e + }), pa() + } + get annotateSnapToContext() { + return this.$$.ctx[18] + } + set annotateSnapToContext(e) { + this.$$set({ + annotateSnapToContext: e + }), pa() + } + get willRenderShapePresetToolbar() { + return this.$$.ctx[19] + } + set willRenderShapePresetToolbar(e) { + this.$$set({ + willRenderShapePresetToolbar: e + }), pa() + } + get annotateTools() { + return this.$$.ctx[20] + } + set annotateTools(e) { + this.$$set({ + annotateTools: e + }), pa() + } + get annotateToolShapes() { + return this.$$.ctx[21] + } + set annotateToolShapes(e) { + this.$$set({ + annotateToolShapes: e + }), pa() + } + get annotateShapeControls() { + return this.$$.ctx[22] + } + set annotateShapeControls(e) { + this.$$set({ + annotateShapeControls: e + }), pa() + } + get annotateActiveTool() { + return this.$$.ctx[0] + } + set annotateActiveTool(e) { + this.$$set({ + annotateActiveTool: e + }), pa() + } + get annotateEnableButtonFlipVertical() { + return this.$$.ctx[23] + } + set annotateEnableButtonFlipVertical(e) { + this.$$set({ + annotateEnableButtonFlipVertical: e + }), pa() + } + get annotateEnableSelectImagePreset() { + return this.$$.ctx[24] + } + set annotateEnableSelectImagePreset(e) { + this.$$set({ + annotateEnableSelectImagePreset: e + }), pa() + } + get annotateEnableDropImagePreset() { + return this.$$.ctx[25] + } + set annotateEnableDropImagePreset(e) { + this.$$set({ + annotateEnableDropImagePreset: e + }), pa() + } + get annotatePresets() { + return this.$$.ctx[26] + } + set annotatePresets(e) { + this.$$set({ + annotatePresets: e + }), pa() + } + get annotateWillRenderShapePresetToolbar() { + return this.$$.ctx[27] + } + set annotateWillRenderShapePresetToolbar(e) { + this.$$set({ + annotateWillRenderShapePresetToolbar: e + }), pa() + } + get enableViewTool() { + return this.$$.ctx[28] + } + set enableViewTool(e) { + this.$$set({ + enableViewTool: e + }), pa() + } + get enableSelectToolToAddShape() { + return this.$$.ctx[29] + } + set enableSelectToolToAddShape(e) { + this.$$set({ + enableSelectToolToAddShape: e + }), pa() + } + get enableTapToAddText() { + return this.$$.ctx[30] + } + set enableTapToAddText(e) { + this.$$set({ + enableTapToAddText: e + }), pa() + } + get enableAutoSelectMoveTool() { + return this.$$.ctx[31] + } + set enableAutoSelectMoveTool(e) { + this.$$set({ + enableAutoSelectMoveTool: e + }), pa() + } + get enableMoveTool() { + return this.$$.ctx[32] + } + set enableMoveTool(e) { + this.$$set({ + enableMoveTool: e + }), pa() + } + get willRenderShapeControls() { + return this.$$.ctx[33] + } + set willRenderShapeControls(e) { + this.$$set({ + willRenderShapeControls: e + }), pa() + } + get willRenderShapeTextControls() { + return this.$$.ctx[34] + } + set willRenderShapeTextControls(e) { + this.$$set({ + willRenderShapeTextControls: e + }), pa() + } + get beforeAddShape() { + return this.$$.ctx[35] + } + set beforeAddShape(e) { + this.$$set({ + beforeAddShape: e + }), pa() + } + get beforeRemoveShape() { + return this.$$.ctx[36] + } + set beforeRemoveShape(e) { + this.$$set({ + beforeRemoveShape: e + }), pa() + } + get beforeDeselectShape() { + return this.$$.ctx[37] + } + set beforeDeselectShape(e) { + this.$$set({ + beforeDeselectShape: e + }), pa() + } + get beforeSelectShape() { + return this.$$.ctx[38] + } + set beforeSelectShape(e) { + this.$$set({ + beforeSelectShape: e + }), pa() + } + get beforeUpdateShape() { + return this.$$.ctx[39] + } + set beforeUpdateShape(e) { + this.$$set({ + beforeUpdateShape: e + }), pa() + } + }] +}; + +function rx(e) { + let t, o, i; + + function r(t) { + e[50](t) + } + let n = { + stores: e[4], + locale: e[5], + isActive: e[1], + isActiveFraction: e[2], + isVisible: e[3], + mapScreenPointToImagePoint: e[41], + mapImagePointToScreenPoint: e[40], + utilKey: "decorate", + shapes: e[43], + toolbar: e[19] || e[6], + toolShapes: e[20] || e[7], + toolRetainStyles: e[8], + shapeControls: e[21] || e[9], + shapePresets: e[25], + enableSelectToolToAddShape: e[27], + enableTapToAddText: e[28], + enableViewTool: e[29], + enableMoveTool: e[30], + enableAutoSelectMoveTool: e[31], + snapThreshold: e[15], + gridSize: Eo(e[17]) ? e[17] : e[14], + enableSnapToContext: ex(e[18]) ? e[18] : e[16], + enableToolShareStyles: e[12], + enablePresetSelectImage: e[23], + enablePresetDropImage: e[24], + enableButtonFlipVertical: e[22], + parentRect: e[42], + toolSelectRadius: e[10], + textInputMode: e[11], + willStartInteraction: e[39], + willRenderPresetToolbar: e[26] || e[13], + hooks: { + willRenderShapeControls: e[32], + willRenderShapeTextControls: e[33], + beforeAddShape: e[34], + beforeRemoveShape: e[35], + beforeDeselectShape: e[36], + beforeSelectShape: e[37], + beforeUpdateShape: e[38] + } + }; + return void 0 !== e[0] && (n.toolActive = e[0]), t = new Kb({ + props: n + }), ta.push((() => Ea(t, "toolActive", r))), t.$on("measure", e[51]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 16 & i[0] && (r.stores = e[4]), 32 & i[0] && (r.locale = e[5]), 2 & i[0] && (r.isActive = e[1]), 4 & i[0] && (r.isActiveFraction = e[2]), 8 & i[0] && (r.isVisible = e[3]), 1024 & i[1] && (r.mapScreenPointToImagePoint = e[41]), 512 & i[1] && (r.mapImagePointToScreenPoint = e[40]), 524352 & i[0] && (r.toolbar = e[19] || e[6]), 1048704 & i[0] && (r.toolShapes = e[20] || e[7]), 256 & i[0] && (r.toolRetainStyles = e[8]), 2097664 & i[0] && (r.shapeControls = e[21] || e[9]), 33554432 & i[0] && (r.shapePresets = e[25]), 134217728 & i[0] && (r.enableSelectToolToAddShape = e[27]), 268435456 & i[0] && (r.enableTapToAddText = e[28]), 536870912 & i[0] && (r.enableViewTool = e[29]), 1073741824 & i[0] && (r.enableMoveTool = e[30]), 1 & i[1] && (r.enableAutoSelectMoveTool = e[31]), 32768 & i[0] && (r.snapThreshold = e[15]), 147456 & i[0] && (r.gridSize = Eo(e[17]) ? e[17] : e[14]), 327680 & i[0] && (r.enableSnapToContext = ex(e[18]) ? e[18] : e[16]), 4096 & i[0] && (r.enableToolShareStyles = e[12]), 8388608 & i[0] && (r.enablePresetSelectImage = e[23]), 16777216 & i[0] && (r.enablePresetDropImage = e[24]), 4194304 & i[0] && (r.enableButtonFlipVertical = e[22]), 1024 & i[0] && (r.toolSelectRadius = e[10]), 2048 & i[0] && (r.textInputMode = e[11]), 256 & i[1] && (r.willStartInteraction = e[39]), 67117056 & i[0] && (r.willRenderPresetToolbar = e[26] || e[13]), 254 & i[1] && (r.hooks = { + willRenderShapeControls: e[32], + willRenderShapeTextControls: e[33], + beforeAddShape: e[34], + beforeRemoveShape: e[35], + beforeDeselectShape: e[36], + beforeSelectShape: e[37], + beforeUpdateShape: e[38] + }), !o && 1 & i[0] && (o = !0, r.toolActive = e[0], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function nx(e, t, o) { + let i, r, n, a, s; + let { + isActive: l + } = t, { + isActiveFraction: c + } = t, { + isVisible: d + } = t, { + stores: u + } = t, { + locale: h = {} + } = t, { + markupEditorToolbar: p + } = t, { + markupEditorToolStyles: m + } = t, { + markupEditorToolRetainStyles: g + } = t, { + markupEditorShapeStyleControls: $ + } = t, { + markupEditorToolSelectRadius: f + } = t, { + markupEditorTextInputMode: y + } = t, { + markupEditorToolShareStyles: b + } = t, { + willRenderShapePresetToolbar: x + } = t, { + markupEditorGridSize: v + } = t, { + markupEditorSnapThreshold: w + } = t, { + markupEditorSnapToContext: S = !0 + } = t, { + decorateGridSize: k + } = t, { + decorateSnapToContext: C + } = t, { + decorateTools: T + } = t, { + decorateToolShapes: M + } = t, { + decorateShapeControls: R + } = t, { + decorateActiveTool: P + } = t, { + decorateEnableButtonFlipVertical: E = !1 + } = t, { + decorateEnableSelectImagePreset: I = !1 + } = t, { + decorateEnableDropImagePreset: A = !0 + } = t, { + decoratePresets: L = [] + } = t, { + decorateWillRenderShapePresetToolbar: z + } = t, { + enableSelectToolToAddShape: F + } = t, { + enableTapToAddText: O + } = t, { + enableViewTool: D + } = t, { + enableMoveTool: B + } = t, { + enableAutoSelectMoveTool: W + } = t, { + willRenderShapeControls: V + } = t, { + willRenderShapeTextControls: _ + } = t, { + beforeAddShape: N + } = t, { + beforeRemoveShape: H + } = t, { + beforeDeselectShape: j + } = t, { + beforeSelectShape: U + } = t, { + beforeUpdateShape: G + } = t, { + markupEditorWillStartInteraction: Z + } = t; + const { + imageCropRect: X, + imageDecoration: Y, + imageSelectionRectPresentation: q, + imageTransformsInterpolated: K + } = u; + return on(e, q, (e => o(48, a = e))), on(e, K, (e => o(49, s = e))), e.$$set = e => { + "isActive" in e && o(1, l = e.isActive), "isActiveFraction" in e && o(2, c = e.isActiveFraction), "isVisible" in e && o(3, d = e.isVisible), "stores" in e && o(4, u = e.stores), "locale" in e && o(5, h = e.locale), "markupEditorToolbar" in e && o(6, p = e.markupEditorToolbar), "markupEditorToolStyles" in e && o(7, m = e.markupEditorToolStyles), "markupEditorToolRetainStyles" in e && o(8, g = e.markupEditorToolRetainStyles), "markupEditorShapeStyleControls" in e && o(9, $ = e.markupEditorShapeStyleControls), "markupEditorToolSelectRadius" in e && o(10, f = e.markupEditorToolSelectRadius), "markupEditorTextInputMode" in e && o(11, y = e.markupEditorTextInputMode), "markupEditorToolShareStyles" in e && o(12, b = e.markupEditorToolShareStyles), "willRenderShapePresetToolbar" in e && o(13, x = e.willRenderShapePresetToolbar), "markupEditorGridSize" in e && o(14, v = e.markupEditorGridSize), "markupEditorSnapThreshold" in e && o(15, w = e.markupEditorSnapThreshold), "markupEditorSnapToContext" in e && o(16, S = e.markupEditorSnapToContext), "decorateGridSize" in e && o(17, k = e.decorateGridSize), "decorateSnapToContext" in e && o(18, C = e.decorateSnapToContext), "decorateTools" in e && o(19, T = e.decorateTools), "decorateToolShapes" in e && o(20, M = e.decorateToolShapes), "decorateShapeControls" in e && o(21, R = e.decorateShapeControls), "decorateActiveTool" in e && o(0, P = e.decorateActiveTool), "decorateEnableButtonFlipVertical" in e && o(22, E = e.decorateEnableButtonFlipVertical), "decorateEnableSelectImagePreset" in e && o(23, I = e.decorateEnableSelectImagePreset), "decorateEnableDropImagePreset" in e && o(24, A = e.decorateEnableDropImagePreset), "decoratePresets" in e && o(25, L = e.decoratePresets), "decorateWillRenderShapePresetToolbar" in e && o(26, z = e.decorateWillRenderShapePresetToolbar), "enableSelectToolToAddShape" in e && o(27, F = e.enableSelectToolToAddShape), "enableTapToAddText" in e && o(28, O = e.enableTapToAddText), "enableViewTool" in e && o(29, D = e.enableViewTool), "enableMoveTool" in e && o(30, B = e.enableMoveTool), "enableAutoSelectMoveTool" in e && o(31, W = e.enableAutoSelectMoveTool), "willRenderShapeControls" in e && o(32, V = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(33, _ = e.willRenderShapeTextControls), "beforeAddShape" in e && o(34, N = e.beforeAddShape), "beforeRemoveShape" in e && o(35, H = e.beforeRemoveShape), "beforeDeselectShape" in e && o(36, j = e.beforeDeselectShape), "beforeSelectShape" in e && o(37, U = e.beforeSelectShape), "beforeUpdateShape" in e && o(38, G = e.beforeUpdateShape), "markupEditorWillStartInteraction" in e && o(39, Z = e.markupEditorWillStartInteraction) + }, e.$$.update = () => { + 262144 & e.$$.dirty[1] && o(47, i = s ? s.scale : 1), 196608 & e.$$.dirty[1] && o(41, r = e => { + const t = ue(e); + return t.x -= a.x, t.y -= a.y, t.x /= i, t.y /= i, t + }), 196608 & e.$$.dirty[1] && o(40, n = e => { + const t = ue(e); + return t.x *= i, t.y *= i, t.x += a.x, t.y += a.y, t + }) + }, [P, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, T, M, R, E, I, A, L, z, F, O, D, B, W, V, _, N, H, j, U, G, Z, n, r, X, Y, q, K, "decorate", i, a, s, function(e) { + P = e, o(0, P) + }, function(t) { + Qn.call(this, e, t) + }] +} +var ax = { + util: ["decorate", class extends Fa { + constructor(e) { + super(), za(this, e, nx, rx, Qr, { + name: 46, + isActive: 1, + isActiveFraction: 2, + isVisible: 3, + stores: 4, + locale: 5, + markupEditorToolbar: 6, + markupEditorToolStyles: 7, + markupEditorToolRetainStyles: 8, + markupEditorShapeStyleControls: 9, + markupEditorToolSelectRadius: 10, + markupEditorTextInputMode: 11, + markupEditorToolShareStyles: 12, + willRenderShapePresetToolbar: 13, + markupEditorGridSize: 14, + markupEditorSnapThreshold: 15, + markupEditorSnapToContext: 16, + decorateGridSize: 17, + decorateSnapToContext: 18, + decorateTools: 19, + decorateToolShapes: 20, + decorateShapeControls: 21, + decorateActiveTool: 0, + decorateEnableButtonFlipVertical: 22, + decorateEnableSelectImagePreset: 23, + decorateEnableDropImagePreset: 24, + decoratePresets: 25, + decorateWillRenderShapePresetToolbar: 26, + enableSelectToolToAddShape: 27, + enableTapToAddText: 28, + enableViewTool: 29, + enableMoveTool: 30, + enableAutoSelectMoveTool: 31, + willRenderShapeControls: 32, + willRenderShapeTextControls: 33, + beforeAddShape: 34, + beforeRemoveShape: 35, + beforeDeselectShape: 36, + beforeSelectShape: 37, + beforeUpdateShape: 38, + markupEditorWillStartInteraction: 39 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[46] + } + get isActive() { + return this.$$.ctx[1] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[2] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[3] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[4] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[5] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get markupEditorToolbar() { + return this.$$.ctx[6] + } + set markupEditorToolbar(e) { + this.$$set({ + markupEditorToolbar: e + }), pa() + } + get markupEditorToolStyles() { + return this.$$.ctx[7] + } + set markupEditorToolStyles(e) { + this.$$set({ + markupEditorToolStyles: e + }), pa() + } + get markupEditorToolRetainStyles() { + return this.$$.ctx[8] + } + set markupEditorToolRetainStyles(e) { + this.$$set({ + markupEditorToolRetainStyles: e + }), pa() + } + get markupEditorShapeStyleControls() { + return this.$$.ctx[9] + } + set markupEditorShapeStyleControls(e) { + this.$$set({ + markupEditorShapeStyleControls: e + }), pa() + } + get markupEditorToolSelectRadius() { + return this.$$.ctx[10] + } + set markupEditorToolSelectRadius(e) { + this.$$set({ + markupEditorToolSelectRadius: e + }), pa() + } + get markupEditorTextInputMode() { + return this.$$.ctx[11] + } + set markupEditorTextInputMode(e) { + this.$$set({ + markupEditorTextInputMode: e + }), pa() + } + get markupEditorToolShareStyles() { + return this.$$.ctx[12] + } + set markupEditorToolShareStyles(e) { + this.$$set({ + markupEditorToolShareStyles: e + }), pa() + } + get willRenderShapePresetToolbar() { + return this.$$.ctx[13] + } + set willRenderShapePresetToolbar(e) { + this.$$set({ + willRenderShapePresetToolbar: e + }), pa() + } + get markupEditorGridSize() { + return this.$$.ctx[14] + } + set markupEditorGridSize(e) { + this.$$set({ + markupEditorGridSize: e + }), pa() + } + get markupEditorSnapThreshold() { + return this.$$.ctx[15] + } + set markupEditorSnapThreshold(e) { + this.$$set({ + markupEditorSnapThreshold: e + }), pa() + } + get markupEditorSnapToContext() { + return this.$$.ctx[16] + } + set markupEditorSnapToContext(e) { + this.$$set({ + markupEditorSnapToContext: e + }), pa() + } + get decorateGridSize() { + return this.$$.ctx[17] + } + set decorateGridSize(e) { + this.$$set({ + decorateGridSize: e + }), pa() + } + get decorateSnapToContext() { + return this.$$.ctx[18] + } + set decorateSnapToContext(e) { + this.$$set({ + decorateSnapToContext: e + }), pa() + } + get decorateTools() { + return this.$$.ctx[19] + } + set decorateTools(e) { + this.$$set({ + decorateTools: e + }), pa() + } + get decorateToolShapes() { + return this.$$.ctx[20] + } + set decorateToolShapes(e) { + this.$$set({ + decorateToolShapes: e + }), pa() + } + get decorateShapeControls() { + return this.$$.ctx[21] + } + set decorateShapeControls(e) { + this.$$set({ + decorateShapeControls: e + }), pa() + } + get decorateActiveTool() { + return this.$$.ctx[0] + } + set decorateActiveTool(e) { + this.$$set({ + decorateActiveTool: e + }), pa() + } + get decorateEnableButtonFlipVertical() { + return this.$$.ctx[22] + } + set decorateEnableButtonFlipVertical(e) { + this.$$set({ + decorateEnableButtonFlipVertical: e + }), pa() + } + get decorateEnableSelectImagePreset() { + return this.$$.ctx[23] + } + set decorateEnableSelectImagePreset(e) { + this.$$set({ + decorateEnableSelectImagePreset: e + }), pa() + } + get decorateEnableDropImagePreset() { + return this.$$.ctx[24] + } + set decorateEnableDropImagePreset(e) { + this.$$set({ + decorateEnableDropImagePreset: e + }), pa() + } + get decoratePresets() { + return this.$$.ctx[25] + } + set decoratePresets(e) { + this.$$set({ + decoratePresets: e + }), pa() + } + get decorateWillRenderShapePresetToolbar() { + return this.$$.ctx[26] + } + set decorateWillRenderShapePresetToolbar(e) { + this.$$set({ + decorateWillRenderShapePresetToolbar: e + }), pa() + } + get enableSelectToolToAddShape() { + return this.$$.ctx[27] + } + set enableSelectToolToAddShape(e) { + this.$$set({ + enableSelectToolToAddShape: e + }), pa() + } + get enableTapToAddText() { + return this.$$.ctx[28] + } + set enableTapToAddText(e) { + this.$$set({ + enableTapToAddText: e + }), pa() + } + get enableViewTool() { + return this.$$.ctx[29] + } + set enableViewTool(e) { + this.$$set({ + enableViewTool: e + }), pa() + } + get enableMoveTool() { + return this.$$.ctx[30] + } + set enableMoveTool(e) { + this.$$set({ + enableMoveTool: e + }), pa() + } + get enableAutoSelectMoveTool() { + return this.$$.ctx[31] + } + set enableAutoSelectMoveTool(e) { + this.$$set({ + enableAutoSelectMoveTool: e + }), pa() + } + get willRenderShapeControls() { + return this.$$.ctx[32] + } + set willRenderShapeControls(e) { + this.$$set({ + willRenderShapeControls: e + }), pa() + } + get willRenderShapeTextControls() { + return this.$$.ctx[33] + } + set willRenderShapeTextControls(e) { + this.$$set({ + willRenderShapeTextControls: e + }), pa() + } + get beforeAddShape() { + return this.$$.ctx[34] + } + set beforeAddShape(e) { + this.$$set({ + beforeAddShape: e + }), pa() + } + get beforeRemoveShape() { + return this.$$.ctx[35] + } + set beforeRemoveShape(e) { + this.$$set({ + beforeRemoveShape: e + }), pa() + } + get beforeDeselectShape() { + return this.$$.ctx[36] + } + set beforeDeselectShape(e) { + this.$$set({ + beforeDeselectShape: e + }), pa() + } + get beforeSelectShape() { + return this.$$.ctx[37] + } + set beforeSelectShape(e) { + this.$$set({ + beforeSelectShape: e + }), pa() + } + get beforeUpdateShape() { + return this.$$.ctx[38] + } + set beforeUpdateShape(e) { + this.$$set({ + beforeUpdateShape: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[39] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + }] +}; + +function sx(e) { + let t, o; + return t = new Kb({ + props: { + stores: e[3], + locale: e[4], + isActive: e[0], + isActiveFraction: e[1], + isVisible: e[2], + mapScreenPointToImagePoint: e[25], + mapImagePointToScreenPoint: e[24], + utilKey: "sticker", + shapePresets: e[5], + shapes: e[6] ? e[34] : e[35], + toolActive: "preset", + imageFlipX: !!e[6] && e[23], + imageFlipY: !!e[6] && e[22], + imageRotation: e[6] ? e[30] : 0, + parentRect: e[6] ? e[36] : e[32], + snapThreshold: e[28], + gridSize: e[27], + enableSnapToContext: e[26], + enablePresetDropImage: e[7], + enablePresetSelectImage: e[29], + enableButtonFlipVertical: e[10] || e[8], + toolSelectRadius: e[14], + willStartInteraction: e[21], + willRenderPresetToolbar: e[11] || e[9] || e[15], + hooks: { + willRenderShapeControls: e[12], + willRenderShapeTextControls: e[13], + beforeAddShape: e[16], + beforeRemoveShape: e[17], + beforeDeselectShape: e[18], + beforeSelectShape: e[19], + beforeUpdateShape: e[20] + } + } + }), t.$on("measure", e[59]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8 & o[0] && (i.stores = e[3]), 16 & o[0] && (i.locale = e[4]), 1 & o[0] && (i.isActive = e[0]), 2 & o[0] && (i.isActiveFraction = e[1]), 4 & o[0] && (i.isVisible = e[2]), 33554432 & o[0] && (i.mapScreenPointToImagePoint = e[25]), 16777216 & o[0] && (i.mapImagePointToScreenPoint = e[24]), 32 & o[0] && (i.shapePresets = e[5]), 64 & o[0] && (i.shapes = e[6] ? e[34] : e[35]), 8388672 & o[0] && (i.imageFlipX = !!e[6] && e[23]), 4194368 & o[0] && (i.imageFlipY = !!e[6] && e[22]), 1073741888 & o[0] && (i.imageRotation = e[6] ? e[30] : 0), 64 & o[0] && (i.parentRect = e[6] ? e[36] : e[32]), 268435456 & o[0] && (i.snapThreshold = e[28]), 134217728 & o[0] && (i.gridSize = e[27]), 67108864 & o[0] && (i.enableSnapToContext = e[26]), 128 & o[0] && (i.enablePresetDropImage = e[7]), 536870912 & o[0] && (i.enablePresetSelectImage = e[29]), 1280 & o[0] && (i.enableButtonFlipVertical = e[10] || e[8]), 16384 & o[0] && (i.toolSelectRadius = e[14]), 2097152 & o[0] && (i.willStartInteraction = e[21]), 35328 & o[0] && (i.willRenderPresetToolbar = e[11] || e[9] || e[15]), 2043904 & o[0] && (i.hooks = { + willRenderShapeControls: e[12], + willRenderShapeTextControls: e[13], + beforeAddShape: e[16], + beforeRemoveShape: e[17], + beforeDeselectShape: e[18], + beforeSelectShape: e[19], + beforeUpdateShape: e[20] + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function lx(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f; + let { + isActive: y + } = t, { + isActiveFraction: b + } = t, { + isVisible: x + } = t, { + stores: v + } = t, { + locale: w = {} + } = t, { + stickers: S = [] + } = t, { + stickerForceEnable: k = !1 + } = t, { + stickerStickToImage: C = !1 + } = t, { + stickerEnableSelectImagePreset: T = !0 + } = t, { + stickerEnableDropImagePreset: M = !0 + } = t, { + stickerEnableButtonFlipVertical: R = !1 + } = t, { + stickerWillRenderShapePresetToolbar: P + } = t, { + stickerEnableSelectImage: E = !0 + } = t, { + stickersEnableButtonFlipVertical: I = !1 + } = t, { + stickersWillRenderShapePresetToolbar: A + } = t, { + markupEditorGridSize: L = 0 + } = t, { + markupEditorSnapThreshold: z = 0 + } = t, { + markupEditorSnapToContext: F = !1 + } = t, { + annotateGridSize: O + } = t, { + annotateSnapToContext: D + } = t, { + decorateGridSize: B + } = t, { + decorateSnapToContext: W + } = t, { + willRenderShapeControls: V + } = t, { + willRenderShapeTextControls: _ + } = t, { + markupEditorToolSelectRadius: N + } = t, { + willRenderShapePresetToolbar: H + } = t, { + beforeAddShape: j + } = t, { + beforeRemoveShape: U + } = t, { + beforeDeselectShape: G + } = t, { + beforeSelectShape: Z + } = t, { + beforeUpdateShape: X + } = t, { + markupEditorWillStartInteraction: Y + } = t; + const { + rootRect: q, + imageCropRect: K, + imageSelectionRectPresentation: J, + imageAnnotation: Q, + imageDecoration: ee, + imageSize: te, + imageTransforms: oe, + imageTransformsInterpolated: ie, + imageRotation: re, + imageFlipX: ne, + imageFlipY: ae + } = v; + return on(e, q, (e => o(58, $ = e))), on(e, J, (e => o(54, d = e))), on(e, te, (e => o(57, g = e))), on(e, oe, (e => o(56, m = e))), on(e, ie, (e => o(55, p = e))), on(e, re, (e => o(30, f = e))), on(e, ne, (e => o(23, h = e))), on(e, ae, (e => o(22, u = e))), e.$$set = e => { + "isActive" in e && o(0, y = e.isActive), "isActiveFraction" in e && o(1, b = e.isActiveFraction), "isVisible" in e && o(2, x = e.isVisible), "stores" in e && o(3, v = e.stores), "locale" in e && o(4, w = e.locale), "stickers" in e && o(5, S = e.stickers), "stickerForceEnable" in e && o(43, k = e.stickerForceEnable), "stickerStickToImage" in e && o(6, C = e.stickerStickToImage), "stickerEnableSelectImagePreset" in e && o(44, T = e.stickerEnableSelectImagePreset), "stickerEnableDropImagePreset" in e && o(7, M = e.stickerEnableDropImagePreset), "stickerEnableButtonFlipVertical" in e && o(8, R = e.stickerEnableButtonFlipVertical), "stickerWillRenderShapePresetToolbar" in e && o(9, P = e.stickerWillRenderShapePresetToolbar), "stickerEnableSelectImage" in e && o(45, E = e.stickerEnableSelectImage), "stickersEnableButtonFlipVertical" in e && o(10, I = e.stickersEnableButtonFlipVertical), "stickersWillRenderShapePresetToolbar" in e && o(11, A = e.stickersWillRenderShapePresetToolbar), "markupEditorGridSize" in e && o(46, L = e.markupEditorGridSize), "markupEditorSnapThreshold" in e && o(47, z = e.markupEditorSnapThreshold), "markupEditorSnapToContext" in e && o(48, F = e.markupEditorSnapToContext), "annotateGridSize" in e && o(49, O = e.annotateGridSize), "annotateSnapToContext" in e && o(50, D = e.annotateSnapToContext), "decorateGridSize" in e && o(51, B = e.decorateGridSize), "decorateSnapToContext" in e && o(52, W = e.decorateSnapToContext), "willRenderShapeControls" in e && o(12, V = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(13, _ = e.willRenderShapeTextControls), "markupEditorToolSelectRadius" in e && o(14, N = e.markupEditorToolSelectRadius), "willRenderShapePresetToolbar" in e && o(15, H = e.willRenderShapePresetToolbar), "beforeAddShape" in e && o(16, j = e.beforeAddShape), "beforeRemoveShape" in e && o(17, U = e.beforeRemoveShape), "beforeDeselectShape" in e && o(18, G = e.beforeDeselectShape), "beforeSelectShape" in e && o(19, Z = e.beforeSelectShape), "beforeUpdateShape" in e && o(20, X = e.beforeUpdateShape), "markupEditorWillStartInteraction" in e && o(21, Y = e.markupEditorWillStartInteraction) + }, e.$$.update = () => { + 16777216 & e.$$.dirty[1] && o(53, i = p ? p.scale : 1), 24576 & e.$$.dirty[1] && o(29, r = !1 !== T && E), 65536 & e.$$.dirty[1] && o(28, n = z), 64 & e.$$.dirty[0] | 1343488 & e.$$.dirty[1] && o(27, a = C ? Eo(O) ? O : L : Eo(B) ? B : L), 64 & e.$$.dirty[0] | 2752512 & e.$$.dirty[1] && o(26, s = C ? ex(D) ? D : F : ex(W) ? W : F), 12582976 & e.$$.dirty[0] | 264241152 & e.$$.dirty[1] && o(25, l = C ? e => Qb(e, $, g, p.origin, p.translation, m.rotation.z, p.scale, h, u) : e => { + const t = ue(e); + return t.x -= d.x, t.y -= d.y, t.x /= i, t.y /= i, t + }), 12582976 & e.$$.dirty[0] | 264241152 & e.$$.dirty[1] && o(24, c = C ? e => Jb(e, $, g, p.origin, p.translation, m.rotation.z, p.scale, h, u) : e => { + const t = ue(e); + return t.x *= i, t.y *= i, t.x += d.x, t.y += d.y, t + }) + }, [y, b, x, v, w, S, C, M, R, P, I, A, V, _, N, H, j, U, G, Z, X, Y, u, h, c, l, s, a, n, r, f, q, K, J, Q, ee, te, oe, ie, re, ne, ae, "sticker", k, T, E, L, z, F, O, D, B, W, i, d, p, m, g, $, function(t) { + Qn.call(this, e, t) + }] +} +var cx = { + util: ["sticker", class extends Fa { + constructor(e) { + super(), za(this, e, lx, sx, Qr, { + name: 42, + isActive: 0, + isActiveFraction: 1, + isVisible: 2, + stores: 3, + locale: 4, + stickers: 5, + stickerForceEnable: 43, + stickerStickToImage: 6, + stickerEnableSelectImagePreset: 44, + stickerEnableDropImagePreset: 7, + stickerEnableButtonFlipVertical: 8, + stickerWillRenderShapePresetToolbar: 9, + stickerEnableSelectImage: 45, + stickersEnableButtonFlipVertical: 10, + stickersWillRenderShapePresetToolbar: 11, + markupEditorGridSize: 46, + markupEditorSnapThreshold: 47, + markupEditorSnapToContext: 48, + annotateGridSize: 49, + annotateSnapToContext: 50, + decorateGridSize: 51, + decorateSnapToContext: 52, + willRenderShapeControls: 12, + willRenderShapeTextControls: 13, + markupEditorToolSelectRadius: 14, + willRenderShapePresetToolbar: 15, + beforeAddShape: 16, + beforeRemoveShape: 17, + beforeDeselectShape: 18, + beforeSelectShape: 19, + beforeUpdateShape: 20, + markupEditorWillStartInteraction: 21 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[42] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[1] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[2] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[3] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[4] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get stickers() { + return this.$$.ctx[5] + } + set stickers(e) { + this.$$set({ + stickers: e + }), pa() + } + get stickerForceEnable() { + return this.$$.ctx[43] + } + set stickerForceEnable(e) { + this.$$set({ + stickerForceEnable: e + }), pa() + } + get stickerStickToImage() { + return this.$$.ctx[6] + } + set stickerStickToImage(e) { + this.$$set({ + stickerStickToImage: e + }), pa() + } + get stickerEnableSelectImagePreset() { + return this.$$.ctx[44] + } + set stickerEnableSelectImagePreset(e) { + this.$$set({ + stickerEnableSelectImagePreset: e + }), pa() + } + get stickerEnableDropImagePreset() { + return this.$$.ctx[7] + } + set stickerEnableDropImagePreset(e) { + this.$$set({ + stickerEnableDropImagePreset: e + }), pa() + } + get stickerEnableButtonFlipVertical() { + return this.$$.ctx[8] + } + set stickerEnableButtonFlipVertical(e) { + this.$$set({ + stickerEnableButtonFlipVertical: e + }), pa() + } + get stickerWillRenderShapePresetToolbar() { + return this.$$.ctx[9] + } + set stickerWillRenderShapePresetToolbar(e) { + this.$$set({ + stickerWillRenderShapePresetToolbar: e + }), pa() + } + get stickerEnableSelectImage() { + return this.$$.ctx[45] + } + set stickerEnableSelectImage(e) { + this.$$set({ + stickerEnableSelectImage: e + }), pa() + } + get stickersEnableButtonFlipVertical() { + return this.$$.ctx[10] + } + set stickersEnableButtonFlipVertical(e) { + this.$$set({ + stickersEnableButtonFlipVertical: e + }), pa() + } + get stickersWillRenderShapePresetToolbar() { + return this.$$.ctx[11] + } + set stickersWillRenderShapePresetToolbar(e) { + this.$$set({ + stickersWillRenderShapePresetToolbar: e + }), pa() + } + get markupEditorGridSize() { + return this.$$.ctx[46] + } + set markupEditorGridSize(e) { + this.$$set({ + markupEditorGridSize: e + }), pa() + } + get markupEditorSnapThreshold() { + return this.$$.ctx[47] + } + set markupEditorSnapThreshold(e) { + this.$$set({ + markupEditorSnapThreshold: e + }), pa() + } + get markupEditorSnapToContext() { + return this.$$.ctx[48] + } + set markupEditorSnapToContext(e) { + this.$$set({ + markupEditorSnapToContext: e + }), pa() + } + get annotateGridSize() { + return this.$$.ctx[49] + } + set annotateGridSize(e) { + this.$$set({ + annotateGridSize: e + }), pa() + } + get annotateSnapToContext() { + return this.$$.ctx[50] + } + set annotateSnapToContext(e) { + this.$$set({ + annotateSnapToContext: e + }), pa() + } + get decorateGridSize() { + return this.$$.ctx[51] + } + set decorateGridSize(e) { + this.$$set({ + decorateGridSize: e + }), pa() + } + get decorateSnapToContext() { + return this.$$.ctx[52] + } + set decorateSnapToContext(e) { + this.$$set({ + decorateSnapToContext: e + }), pa() + } + get willRenderShapeControls() { + return this.$$.ctx[12] + } + set willRenderShapeControls(e) { + this.$$set({ + willRenderShapeControls: e + }), pa() + } + get willRenderShapeTextControls() { + return this.$$.ctx[13] + } + set willRenderShapeTextControls(e) { + this.$$set({ + willRenderShapeTextControls: e + }), pa() + } + get markupEditorToolSelectRadius() { + return this.$$.ctx[14] + } + set markupEditorToolSelectRadius(e) { + this.$$set({ + markupEditorToolSelectRadius: e + }), pa() + } + get willRenderShapePresetToolbar() { + return this.$$.ctx[15] + } + set willRenderShapePresetToolbar(e) { + this.$$set({ + willRenderShapePresetToolbar: e + }), pa() + } + get beforeAddShape() { + return this.$$.ctx[16] + } + set beforeAddShape(e) { + this.$$set({ + beforeAddShape: e + }), pa() + } + get beforeRemoveShape() { + return this.$$.ctx[17] + } + set beforeRemoveShape(e) { + this.$$set({ + beforeRemoveShape: e + }), pa() + } + get beforeDeselectShape() { + return this.$$.ctx[18] + } + set beforeDeselectShape(e) { + this.$$set({ + beforeDeselectShape: e + }), pa() + } + get beforeSelectShape() { + return this.$$.ctx[19] + } + set beforeSelectShape(e) { + this.$$set({ + beforeSelectShape: e + }), pa() + } + get beforeUpdateShape() { + return this.$$.ctx[20] + } + set beforeUpdateShape(e) { + this.$$set({ + beforeUpdateShape: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[21] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + }, ({ + stickers: e, + stickerEnableSelectImage: t, + stickerEnableSelectImagePreset: o, + stickerEnableDropImagePreset: i, + stickerForceEnable: r + }) => e && e.length || t || o || i || r] +}; + +function dx(e) { + let t, o, i, r, n, a = (e[14](e[34].value) || "") + "", + s = (M(e[34].label) ? e[34].label(e[1]) : e[34].label) + ""; + return { + c() { + t = kn("div"), o = new Bn(!1), i = Mn(), r = kn("span"), n = Tn(s), o.a = i, An(t, "slot", "option") + }, + m(e, s) { + wn(e, t, s), o.m(a, t), bn(t, i), bn(t, r), bn(r, n) + }, + p(e, t) { + 8 & t[1] && a !== (a = (e[14](e[34].value) || "") + "") && o.p(a), 2 & t[0] | 8 & t[1] && s !== (s = (M(e[34].label) ? e[34].label(e[1]) : e[34].label) + "") && Fn(n, s) + }, + d(e) { + e && Sn(t) + } + } +} + +function ux(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[1], + class: "PinturaControlList", + layout: "row", + options: e[2], + selectedIndex: e[6], + onchange: e[12], + $$slots: { + option: [dx, ({ + option: e + }) => ({ + 34: e + }), ({ + option: e + }) => [0, e ? 8 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 2 & o[0] && (i.locale = e[1]), 4 & o[0] && (i.options = e[2]), 64 & o[0] && (i.selectedIndex = e[6]), 2 & o[0] | 24 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function hx(e) { + let t, o, i, r, n; + return o = new sb({ + props: { + locale: e[1], + class: "PinturaControlPanels", + shape: e[4], + onchange: e[13], + controls: e[3], + scrollElasticity: e[7] + } + }), r = new vd({ + props: { + elasticity: e[10], + $$slots: { + default: [ux] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), i = Mn(), Ia(r.$$.fragment), An(t, "slot", "footer"), An(t, "style", e[5]) + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), Aa(r, t, null), n = !0 + }, + p(e, i) { + const a = {}; + 2 & i[0] && (a.locale = e[1]), 16 & i[0] && (a.shape = e[4]), 8 & i[0] && (a.controls = e[3]), 128 & i[0] && (a.scrollElasticity = e[7]), o.$set(a); + const s = {}; + 70 & i[0] | 16 & i[1] && (s.$$scope = { + dirty: i, + ctx: e + }), r.$set(s), (!n || 32 & i[0]) && An(t, "style", e[5]) + }, + i(e) { + n || (xa(o.$$.fragment, e), xa(r.$$.fragment, e), n = !0) + }, + o(e) { + va(o.$$.fragment, e), va(r.$$.fragment, e), n = !1 + }, + d(e) { + e && Sn(t), La(o), La(r) + } + } +} + +function px(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [hx] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[23]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 254 & o[0] | 16 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function mx(e, t, o) { + let i, r, n, a, s, l, c, d, u = Gr, + h = () => (u(), u = en(p, (e => o(20, s = e))), p); + e.$$.on_destroy.push((() => u())); + let { + isActive: p + } = t; + h(); + let { + stores: m + } = t, { + locale: g = {} + } = t, { + frameStyles: $ = {} + } = t, { + frameOptions: f = [] + } = t, { + markupEditorShapeStyleControls: y + } = t; + const b = Jn("elasticityMultiplier"); + on(e, b, (e => o(22, d = e))); + const { + history: x, + animation: v, + scrollElasticity: w, + imageFrame: S, + allowPan: k, + allowZoom: C, + allowZoomControls: T, + allowPlayPause: M + } = m; + on(e, v, (e => o(21, l = e))), on(e, S, (e => o(4, c = e))); + let R = {}; + let P; + const E = ec(l ? 20 : 0); + return on(e, E, (e => o(19, a = e))), e.$$set = e => { + "isActive" in e && h(o(0, p = e.isActive)), "stores" in e && o(17, m = e.stores), "locale" in e && o(1, g = e.locale), "frameStyles" in e && o(18, $ = e.frameStyles), "frameOptions" in e && o(2, f = e.frameOptions), "markupEditorShapeStyleControls" in e && o(3, y = e.markupEditorShapeStyleControls) + }, e.$$.update = () => { + 1048576 & e.$$.dirty[0] && k.set(s), 1048576 & e.$$.dirty[0] && C.set(s), 1048576 & e.$$.dirty[0] && T.set(s), 1048576 & e.$$.dirty[0] && s && M.set(!0), 4194304 & e.$$.dirty[0] && o(7, i = d * w), 20 & e.$$.dirty[0] && o(6, r = c ? f.findIndex((([e]) => e === c.id)) : 0), 3145728 & e.$$.dirty[0] && l && E.set(s ? 0 : 20), 524288 & e.$$.dirty[0] && o(5, n = a ? `transform: translateY(${a}px)` : void 0) + }, [p, g, f, y, c, n, r, i, b, v, w, S, ({ + value: e + }) => { + const t = $[e]; + if (!t || !t.shape) return S.set(void 0), void x.write(); + const { + shape: o + } = t, i = { + id: e, + ...gi(o), + ...Object.keys(R).reduce(((e, t) => o[t] ? (e[t] = R[t], e) : e), {}) + }; + S.set(i), x.write() + }, function(e) { + Ao(e, "frameColor") && (R.frameColor = e.frameColor), c && (gr(c, e), S.set(c), clearTimeout(P), P = setTimeout((() => { + x.write() + }), 200)) + }, e => { + const t = $[e]; + var o; + if (t && t.thumb) return o = t.thumb, /div/i.test(o) || lb(o) ? o : /rect|path|circle|line|/i.test(o) ? `` : `` + }, E, "frame", m, $, a, s, l, d, function(t) { + Qn.call(this, e, t) + }] +} +var gx = { + util: ["frame", class extends Fa { + constructor(e) { + super(), za(this, e, mx, px, Qr, { + name: 16, + isActive: 0, + stores: 17, + locale: 1, + frameStyles: 18, + frameOptions: 2, + markupEditorShapeStyleControls: 3 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[16] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get stores() { + return this.$$.ctx[17] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[1] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get frameStyles() { + return this.$$.ctx[18] + } + set frameStyles(e) { + this.$$set({ + frameStyles: e + }), pa() + } + get frameOptions() { + return this.$$.ctx[2] + } + set frameOptions(e) { + this.$$set({ + frameOptions: e + }), pa() + } + get markupEditorShapeStyleControls() { + return this.$$.ctx[3] + } + set markupEditorShapeStyleControls(e) { + this.$$set({ + markupEditorShapeStyleControls: e + }), pa() + } + }, ({ + src: e + }) => e && !Sp(e)] +}; + +function $x(e) { + let t, o, i, r, n, a, s, l; + return { + c() { + t = kn("div"), o = kn("input"), r = Mn(), n = kn("label"), a = Tn(e[1]), An(o, "id", e[0]), An(o, "type", "number"), An(o, "min", "1"), An(o, "inputmode", "numeric"), An(o, "pattern", "[0-9]*"), An(o, "data-state", e[3]), An(o, "autocomplete", "off"), An(o, "placeholder", e[4]), o.value = i = void 0 === e[5] ? "" : e[7](e[5] + ""), An(n, "for", e[0]), An(n, "title", e[2]), An(n, "aria-label", e[2]), An(t, "class", "PinturaInputDimension") + }, + m(i, c) { + wn(i, t, c), bn(t, o), bn(t, r), bn(t, n), bn(n, a), s || (l = Pn(o, "input", e[8]), s = !0) + }, + p(e, [t]) { + 1 & t && An(o, "id", e[0]), 8 & t && An(o, "data-state", e[3]), 16 & t && An(o, "placeholder", e[4]), 160 & t && i !== (i = void 0 === e[5] ? "" : e[7](e[5] + "")) && o.value !== i && (o.value = i), 2 & t && Fn(a, e[1]), 1 & t && An(n, "for", e[0]), 4 & t && An(n, "title", e[2]), 4 & t && An(n, "aria-label", e[2]) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t), s = !1, l() + } + } +} + +function fx(e, t, o) { + let { + id: i + } = t, { + label: r + } = t, { + title: n + } = t, { + state: a + } = t, { + placeholder: s + } = t, { + value: l + } = t, { + onchange: c + } = t, { + format: d = (e => e.replace(/\D/g, "")) + } = t; + return e.$$set = e => { + "id" in e && o(0, i = e.id), "label" in e && o(1, r = e.label), "title" in e && o(2, n = e.title), "state" in e && o(3, a = e.state), "placeholder" in e && o(4, s = e.placeholder), "value" in e && o(5, l = e.value), "onchange" in e && o(6, c = e.onchange), "format" in e && o(7, d = e.format) + }, [i, r, n, a, s, l, c, d, e => c(d(e.currentTarget.value))] +} +class yx extends Fa { + constructor(e) { + super(), za(this, e, fx, $x, Qr, { + id: 0, + label: 1, + title: 2, + state: 3, + placeholder: 4, + value: 5, + onchange: 6, + format: 7 + }) + } +} + +function bx(e) { + let t; + return { + c() { + t = Cn("g") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[2] + }, + p(e, o) { + 4 & o && (t.innerHTML = e[2]) + }, + d(e) { + e && Sn(t) + } + } +} + +function xx(e) { + let t, o, i, r, n, a, s, l; + return n = new td({ + props: { + $$slots: { + default: [bx] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), o = kn("input"), i = Mn(), r = kn("label"), Ia(n.$$.fragment), An(o, "id", e[0]), An(o, "class", "implicit"), An(o, "type", "checkbox"), o.checked = e[1], An(r, "for", e[0]), An(r, "title", e[3]) + }, + m(c, d) { + wn(c, t, d), bn(t, o), bn(t, i), bn(t, r), Aa(n, r, null), a = !0, s || (l = Pn(o, "change", e[5]), s = !0) + }, + p(e, [t]) { + (!a || 1 & t) && An(o, "id", e[0]), (!a || 2 & t) && (o.checked = e[1]); + const i = {}; + 68 & t && (i.$$scope = { + dirty: t, + ctx: e + }), n.$set(i), (!a || 1 & t) && An(r, "for", e[0]), (!a || 8 & t) && An(r, "title", e[3]) + }, + i(e) { + a || (xa(n.$$.fragment, e), a = !0) + }, + o(e) { + va(n.$$.fragment, e), a = !1 + }, + d(e) { + e && Sn(t), La(n), s = !1, l() + } + } +} + +function vx(e, t, o) { + let { + id: i + } = t, { + locked: r + } = t, { + icon: n + } = t, { + title: a + } = t, { + onchange: s + } = t; + return e.$$set = e => { + "id" in e && o(0, i = e.id), "locked" in e && o(1, r = e.locked), "icon" in e && o(2, n = e.icon), "title" in e && o(3, a = e.title), "onchange" in e && o(4, s = e.onchange) + }, [i, r, n, a, s, e => s(e.currentTarget.checked)] +} +class wx extends Fa { + constructor(e) { + super(), za(this, e, vx, xx, Qr, { + id: 0, + locked: 1, + icon: 2, + title: 3, + onchange: 4 + }) + } +} + +function Sx(e) { + let t; + return { + c() { + t = Tn("Save") + }, + m(e, o) { + wn(e, t, o) + }, + d(e) { + e && Sn(t) + } + } +} + +function kx(e) { + let t, o, i, r, n, a, s, l, c, d, u, h, p, m = e[1].resizeLabelFormCaption + ""; + return l = new dp({ + props: { + items: e[4] + } + }), d = new cd({ + props: { + type: "submit", + class: "implicit", + $$slots: { + default: [Sx] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("form"), o = kn("div"), i = kn("fieldset"), r = kn("legend"), n = Tn(m), a = Mn(), s = kn("div"), Ia(l.$$.fragment), c = Mn(), Ia(d.$$.fragment), An(r, "class", "implicit"), An(s, "class", "PinturaFieldsetInner"), An(o, "class", "PinturaFormInner"), An(t, "slot", "footer"), An(t, "style", e[3]) + }, + m(m, g) { + wn(m, t, g), bn(t, o), bn(o, i), bn(i, r), bn(r, n), bn(i, a), bn(i, s), Aa(l, s, null), e[65](s), bn(o, c), Aa(d, o, null), u = !0, h || (p = [Pn(s, "focusin", e[15]), Pn(s, "focusout", e[16]), Pn(t, "submit", En(e[17]))], h = !0) + }, + p(e, o) { + (!u || 2 & o[0]) && m !== (m = e[1].resizeLabelFormCaption + "") && Fn(n, m); + const i = {}; + 16 & o[0] && (i.items = e[4]), l.$set(i); + const r = {}; + 16 & o[3] && (r.$$scope = { + dirty: o, + ctx: e + }), d.$set(r), (!u || 8 & o[0]) && An(t, "style", e[3]) + }, + i(e) { + u || (xa(l.$$.fragment, e), xa(d.$$.fragment, e), u = !0) + }, + o(e) { + va(l.$$.fragment, e), va(d.$$.fragment, e), u = !1 + }, + d(o) { + o && Sn(t), La(l), e[65](null), La(d), h = !1, Kr(p) + } + } +} + +function Cx(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [kx] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[66]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 30 & o[0] | 16 & o[3] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Tx(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, M, R, P, E, A, L, z, F = Gr, + O = () => (F(), F = en(B, (e => o(49, p = e))), B); + e.$$.on_destroy.push((() => F())); + const D = (e, t = 0, o = 9999) => { + if (T(e) && !(e = e.replace(/\D/g, "")).length) return; + const i = Math.round(e); + return Number.isNaN(i) ? void 0 : rs(i, t, o) + }; + let { + isActive: B + } = t; + O(); + let { + stores: W + } = t, { + locale: V = {} + } = t, { + resizeMinSize: _ = De(1, 1) + } = t, { + resizeMaxSize: N = De(9999, 9999) + } = t, { + resizeAspectRatioLocked: U = !1 + } = t, { + resizeEnableButtonLockAspectRatio: G = !0 + } = t, { + resizeSizePresetOptions: Z + } = t, { + resizeWidthPresetOptions: X + } = t, { + resizeHeightPresetOptions: Y + } = t, { + resizeWillRenderFooter: q = j + } = t; + const K = ec(0, { + stiffness: .15, + damping: .3 + }); + on(e, K, (e => o(54, y = e))); + const { + animation: J, + imageSize: Q, + imageCropRect: ee, + imageCropRectAspectRatio: te, + imageCropAspectRatio: oe, + imageOutputSize: ie, + imageSelectionZoom: re, + imageSelectionPan: ne, + history: ae, + env: se, + allowPan: ce, + allowZoom: de, + allowZoomControls: ue, + allowPlayPause: he + } = W; + on(e, J, (e => o(50, m = e))), on(e, Q, (e => o(73, A = e))), on(e, ee, (e => o(52, $ = e))), on(e, te, (e => o(53, f = e))), on(e, oe, (e => o(72, M = e))), on(e, ie, (e => o(61, C = e))), on(e, re, (e => o(74, L = e))), on(e, ne, (e => o(75, z = e))), on(e, se, (e => o(51, g = e))); + const pe = I(); + let me, ge, $e, fe, ye, be, xe = le(); + const ve = (e, t, o, i, r) => null != e && o !== t ? e >= i[t] && e <= r[t] ? "valid" : "invalid" : "undetermined", + we = (e, t, o) => Math.round(null != e ? e / t : o.height), + Se = () => { + U && ge && $e && ("width" === fe ? o(39, $e = Math.round(ge / f)) : "height" === fe ? o(38, ge = Math.round($e * f)) : ("width" === ye ? o(39, $e = Math.round(ge / f)) : "height" === ye && o(38, ge = Math.round($e * f)), ke())) + }, + ke = e => { + let t = D(ge), + i = D($e), + r = t, + n = i, + a = r && n, + s = e || f; + if (!r && !n) return; + r && !n ? n = Math.round(r / s) : n && !r && (r = Math.round(n * s)), s = e || a ? H(r, n) : f; + let l = De(r, n); + Ne(N, l) || (l = yt(N, s)), Ne(l, _) || (l = ft(_, s)), o(38, ge = null != t ? Math.round(l.width) : void 0), o(39, $e = null != i ? Math.round(l.height) : void 0) + }, + Ce = () => { + ke(); + const { + width: e, + height: t + } = C || {}; + e === ge && t === $e || (ge || $e ? (ge && $e && un(oe, M = ge / $e, M), un(ie, C = De(ge, $e), C)) : (un(oe, M = A.width / A.height, M), un(oe, M = void 0, M), un(ie, C = void 0, C)), ae.write()) + }, + Te = ie.subscribe((e => { + if (!e) return o(38, ge = void 0), void o(39, $e = void 0); + o(38, ge = e.width), o(39, $e = e.height), ke() + })), + Me = oe.subscribe((e => { + (ge || $e) && e && (ge && $e && H(ge, $e) !== e ? (o(39, $e = ge / e), ke(e)) : ke()) + })), + Re = e => T(e[0]) ? (e[1] = e[1].map(Re), e) : Eo(e) ? [e, "" + e] : e, + Pe = e => { + if (T(e[0])) return e[1] = e[1].map(Pe), e; + let [t, o] = e; + if (Eo(t) && Eo(o)) { + const [e, i] = [t, o]; + o = `${e} × ${i}`, t = [e, i] + } + return [t, o] + }, + Ee = Ba(); + on(e, Ee, (e => o(60, k = e))); + const Ie = Ba(); + on(e, Ie, (e => o(64, E = e))); + const Ae = Ba(); + on(e, Ae, (e => o(58, w = e))); + const Le = Ba(); + on(e, Le, (e => o(63, P = e))); + const ze = Ba(); + on(e, ze, (e => o(56, x = e))); + const Oe = Ba(); + on(e, Oe, (e => o(62, R = e))); + const Be = Wa([ie, Ie], (([e, t], o) => { + if (!t) return o(-1); + const i = t.findIndex((([t]) => { + if (!t && !e) return !0; + if (!t) return !1; + const [o, i] = t; + return e.width === o && e.height === i + })); + o(i < 0 ? 0 : i) + })); + on(e, Be, (e => o(59, S = e))); + const We = Wa([ie, Le], (([e, t], o) => { + if (!t) return o(-1); + const i = t.findIndex((([t]) => !t && !e || !!t && e.width === t)); + o(i < 0 ? 0 : i) + })); + on(e, We, (e => o(57, v = e))); + const Ve = Wa([ie, Oe], (([e, t], o) => { + if (!t) return o(-1); + const i = t.findIndex((([t]) => !t && !e || !!t && e.height === t)); + o(i < 0 ? 0 : i) + })); + on(e, Ve, (e => o(55, b = e))); + let _e = void 0, + He = void 0; + const je = Jn("redrawTrigger"), + Ue = ec(m ? 20 : 0); + return on(e, Ue, (e => o(48, h = e))), Yn((() => { + Te(), Me() + })), e.$$set = e => { + "isActive" in e && O(o(0, B = e.isActive)), "stores" in e && o(30, W = e.stores), "locale" in e && o(1, V = e.locale), "resizeMinSize" in e && o(31, _ = e.resizeMinSize), "resizeMaxSize" in e && o(32, N = e.resizeMaxSize), "resizeAspectRatioLocked" in e && o(28, U = e.resizeAspectRatioLocked), "resizeEnableButtonLockAspectRatio" in e && o(33, G = e.resizeEnableButtonLockAspectRatio), "resizeSizePresetOptions" in e && o(34, Z = e.resizeSizePresetOptions), "resizeWidthPresetOptions" in e && o(35, X = e.resizeWidthPresetOptions), "resizeHeightPresetOptions" in e && o(36, Y = e.resizeHeightPresetOptions), "resizeWillRenderFooter" in e && o(37, q = e.resizeWillRenderFooter) + }, e.$$.update = () => { + var t; + 262144 & e.$$.dirty[1] && ce.set(!p), 262144 & e.$$.dirty[1] && de.set(!p), 262144 & e.$$.dirty[1] && ue.set(!p), 262144 & e.$$.dirty[1] && p && he.set(!0), 536870920 & e.$$.dirty[1] && Z && (un(Ee, k = Z.map(Pe), k), un(Ie, E = lu(k), E)), 536870912 & e.$$.dirty[1] && o(47, a = !!k), 268435456 & e.$$.dirty[1] | 4 & e.$$.dirty[2] && o(46, i = S > -1 && E[S][1]), 134217744 & e.$$.dirty[1] && X && (un(Ae, w = X.map(Re), w), un(Le, P = lu(w), P)), 134283264 & e.$$.dirty[1] && o(44, s = !a && w), 67108864 & e.$$.dirty[1] | 2 & e.$$.dirty[2] && o(45, r = v > -1 && P[v][1]), 33554464 & e.$$.dirty[1] && Y && (un(ze, x = Y.map(Re), x), un(Oe, R = lu(x), R)), 33619968 & e.$$.dirty[1] && o(43, l = !a && x), 16777216 & e.$$.dirty[1] | 1 & e.$$.dirty[2] && o(42, n = b > -1 && R[b][1]), 77824 & e.$$.dirty[1] && o(41, c = !a && !s && !l), 268435458 & e.$$.dirty[0] | 1072824263 & e.$$.dirty[1] && o(4, d = je && zp((() => { + return q([a && ["Dropdown", "size-presets", { + label: i, + options: k, + onchange: e => { + return (t = e.value) && !_e && (_e = { + ...$ + }, He = M), t ? (un(oe, M = H(t[0], t[1]), M), un(ie, C = Fe(t), C)) : (un(ee, $ = _e, $), un(oe, M = He, M), un(ie, C = void 0, C), _e = void 0, He = void 0), void ae.write(); + var t + }, + selectedIndex: S + }], s && ["Dropdown", "width-presets", { + label: r, + options: w, + onchange: e => { + o(38, ge = e.value), Ce() + }, + selectedIndex: v + }], s && l && ["span", "times", { + class: "PinturaResizeLabel", + innerHTML: "×" + }], l && ["Dropdown", "height-presets", { + label: n, + options: x, + onchange: e => { + o(39, $e = e.value), Ce() + }, + selectedIndex: b + }], c && [yx, "width-input", { + id: "width-" + pe, + title: V.resizeTitleInputWidth, + label: V.resizeLabelInputWidth, + placeholder: (e = D($e), t = f, d = $, Math.round(null != e ? e * t : d.width)), + value: ge, + state: ve(D(ge), "width", fe, _, N), + onchange: e => { + o(38, ge = e), Se() + } + }], c && G && [wx, "aspect-ratio-lock", { + id: "aspect-ratio-lock-" + pe, + title: V.resizeTitleButtonMaintainAspectRatio, + icon: T(V.resizeIconButtonMaintainAspectRatio) ? V.resizeIconButtonMaintainAspectRatio : V.resizeIconButtonMaintainAspectRatio(U, y), + locked: U, + onchange: e => { + o(28, U = e), Se() + } + }], c && [yx, "height-input", { + id: "height-" + pe, + title: V.resizeTitleInputHeight, + label: V.resizeLabelInputHeight, + placeholder: we(D(ge), f, $), + value: $e, + state: ve(D($e), "height", fe, _, N), + onchange: e => { + o(39, $e = e), Se() + } + }]].filter(Boolean), { + ...g + }, (() => je.set({}))); + var e, t, d + })).filter(Boolean)), 268435456 & e.$$.dirty[0] && K.set(U ? 1 : 0), 512 & e.$$.dirty[1] && fe && (ye = fe), 262144 & e.$$.dirty[1] && p && (xe = z, be = L), 1074003968 & e.$$.dirty[1] && (p ? (t = C, un(ne, z = le(), z), un(re, L = t && $ ? t.width / $.width || t.height / $.height : 1, L)) : (un(ne, z = xe, z), un(re, L = be, L))), 786432 & e.$$.dirty[1] && m && Ue.set(p ? 0 : 20), 131072 & e.$$.dirty[1] && o(3, u = h ? `transform: translateY(${h}px)` : void 0) + }, [B, V, me, u, d, K, J, Q, ee, te, oe, ie, re, ne, se, e => { + const t = e.target.id; + /width/.test(t) ? o(40, fe = "width") : /height/.test(t) ? o(40, fe = "height") : /aspectRatio/i.test(t) ? o(40, fe = "lock") : o(40, fe = void 0) + }, e => { + me.contains(e.relatedTarget) || Ce(), o(40, fe = void 0) + }, Ce, Ee, Ie, Ae, Le, ze, Oe, Be, We, Ve, Ue, U, "resize", W, _, N, G, Z, X, Y, q, ge, $e, fe, c, n, l, s, r, i, a, h, p, m, g, $, f, y, b, x, v, w, S, k, C, R, P, E, function(e) { + ta[e ? "unshift" : "push"]((() => { + me = e, o(2, me) + })) + }, function(t) { + Qn.call(this, e, t) + }] +} +var Mx = { + util: ["resize", class extends Fa { + constructor(e) { + super(), za(this, e, Tx, Cx, Qr, { + name: 29, + isActive: 0, + stores: 30, + locale: 1, + resizeMinSize: 31, + resizeMaxSize: 32, + resizeAspectRatioLocked: 28, + resizeEnableButtonLockAspectRatio: 33, + resizeSizePresetOptions: 34, + resizeWidthPresetOptions: 35, + resizeHeightPresetOptions: 36, + resizeWillRenderFooter: 37 + }, null, [-1, -1, -1, -1]) + } + get name() { + return this.$$.ctx[29] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get stores() { + return this.$$.ctx[30] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[1] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get resizeMinSize() { + return this.$$.ctx[31] + } + set resizeMinSize(e) { + this.$$set({ + resizeMinSize: e + }), pa() + } + get resizeMaxSize() { + return this.$$.ctx[32] + } + set resizeMaxSize(e) { + this.$$set({ + resizeMaxSize: e + }), pa() + } + get resizeAspectRatioLocked() { + return this.$$.ctx[28] + } + set resizeAspectRatioLocked(e) { + this.$$set({ + resizeAspectRatioLocked: e + }), pa() + } + get resizeEnableButtonLockAspectRatio() { + return this.$$.ctx[33] + } + set resizeEnableButtonLockAspectRatio(e) { + this.$$set({ + resizeEnableButtonLockAspectRatio: e + }), pa() + } + get resizeSizePresetOptions() { + return this.$$.ctx[34] + } + set resizeSizePresetOptions(e) { + this.$$set({ + resizeSizePresetOptions: e + }), pa() + } + get resizeWidthPresetOptions() { + return this.$$.ctx[35] + } + set resizeWidthPresetOptions(e) { + this.$$set({ + resizeWidthPresetOptions: e + }), pa() + } + get resizeHeightPresetOptions() { + return this.$$.ctx[36] + } + set resizeHeightPresetOptions(e) { + this.$$set({ + resizeHeightPresetOptions: e + }), pa() + } + get resizeWillRenderFooter() { + return this.$$.ctx[37] + } + set resizeWillRenderFooter(e) { + this.$$set({ + resizeWillRenderFooter: e + }), pa() + } + }, ({ + src: e + }) => e && !Sp(e)] +}; + +function Rx(e) { + let t, o; + return t = new Kb({ + props: { + stores: e[3], + locale: e[4], + isActive: e[0], + isActiveFraction: e[1], + isVisible: e[2], + mapScreenPointToImagePoint: e[9], + mapImagePointToScreenPoint: e[8], + utilKey: "redact", + imageRotation: e[10], + imageFlipX: e[7], + imageFlipY: e[6], + shapes: e[11], + toolbar: ["rect"], + toolShapes: { + rectangle: [{ + x: 0, + y: 0, + width: 0, + height: 0 + }] + }, + toolActive: "rectangle", + parentRect: e[13], + enablePresetDropImage: !1, + enablePresetSelectImage: !1, + willStartInteraction: e[5], + hooks: { + willRenderShapeControls: e[24] + } + } + }), t.$on("measure", e[25]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, [o]) { + const i = {}; + 8 & o && (i.stores = e[3]), 16 & o && (i.locale = e[4]), 1 & o && (i.isActive = e[0]), 2 & o && (i.isActiveFraction = e[1]), 4 & o && (i.isVisible = e[2]), 512 & o && (i.mapScreenPointToImagePoint = e[9]), 256 & o && (i.mapImagePointToScreenPoint = e[8]), 1024 & o && (i.imageRotation = e[10]), 128 & o && (i.imageFlipX = e[7]), 64 & o && (i.imageFlipY = e[6]), 32 & o && (i.willStartInteraction = e[5]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Px(e, t, o) { + let i, r, n, a, s, l, c, d, u; + let { + isActive: h + } = t, { + isActiveFraction: p + } = t, { + isVisible: m + } = t, { + stores: g + } = t, { + locale: $ = {} + } = t, { + markupEditorWillStartInteraction: f + } = t; + const { + imageRedaction: y, + rootRect: b, + imageSize: x, + imageRotation: v, + imageFlipX: w, + imageFlipY: S, + imageTransforms: k, + imageTransformsInterpolated: C + } = g; + on(e, b, (e => o(23, d = e))), on(e, x, (e => o(22, c = e))), on(e, v, (e => o(10, u = e))), on(e, w, (e => o(7, a = e))), on(e, S, (e => o(6, n = e))), on(e, k, (e => o(21, l = e))), on(e, C, (e => o(20, s = e))); + return e.$$set = e => { + "isActive" in e && o(0, h = e.isActive), "isActiveFraction" in e && o(1, p = e.isActiveFraction), "isVisible" in e && o(2, m = e.isVisible), "stores" in e && o(3, g = e.stores), "locale" in e && o(4, $ = e.locale), "markupEditorWillStartInteraction" in e && o(5, f = e.markupEditorWillStartInteraction) + }, e.$$.update = () => { + 15728832 & e.$$.dirty && o(9, i = e => Qb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)), 15728832 & e.$$.dirty && o(8, r = e => Jb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)) + }, [h, p, m, g, $, f, n, a, r, i, u, y, b, x, v, w, S, k, C, "redact", s, l, c, d, e => { + const t = Am(e[0]); + return Bm("to-front", t), e + }, function(t) { + Qn.call(this, e, t) + }] +} +var Ex = { + util: ["redact", class extends Fa { + constructor(e) { + super(), za(this, e, Px, Rx, Qr, { + name: 19, + isActive: 0, + isActiveFraction: 1, + isVisible: 2, + stores: 3, + locale: 4, + markupEditorWillStartInteraction: 5 + }) + } + get name() { + return this.$$.ctx[19] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[1] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[2] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[3] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[4] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[5] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + }, ({ + src: e + }) => e && !Sp(e)] +}; + +function Ix(e) { + let t, o, i = (M(e[32].label) ? e[32].label(e[1]) : e[32].label) + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 2 & t[0] | 2 & t[1] && i !== (i = (M(e[32].label) ? e[32].label(e[1]) : e[32].label) + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Ax(e) { + let t, o, i, r = (e[11](e[32].value) || "") + "", + n = e[32].label && Ix(e); + return { + c() { + t = kn("div"), o = new Bn(!1), i = Mn(), n && n.c(), o.a = i, An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), o.m(r, t), bn(t, i), n && n.m(t, null) + }, + p(e, i) { + 2 & i[1] && r !== (r = (e[11](e[32].value) || "") + "") && o.p(r), e[32].label ? n ? n.p(e, i) : (n = Ix(e), n.c(), n.m(t, null)) : n && (n.d(1), n = null) + }, + d(e) { + e && Sn(t), n && n.d() + } + } +} + +function Lx(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[1], + class: "PinturaControlList", + layout: "row", + options: e[2], + selectedIndex: e[4], + onchange: e[10], + $$slots: { + option: [Ax, ({ + option: e + }) => ({ + 32: e + }), ({ + option: e + }) => [0, e ? 2 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 2 & o[0] && (i.locale = e[1]), 4 & o[0] && (i.options = e[2]), 16 & o[0] && (i.selectedIndex = e[4]), 2 & o[0] | 6 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function zx(e) { + let t, o, i; + return o = new vd({ + props: { + elasticity: e[5], + $$slots: { + default: [Lx] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "footer"), An(t, "style", e[3]) + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, r) { + const n = {}; + 32 & r[0] && (n.elasticity = e[5]), 22 & r[0] | 4 & r[1] && (n.$$scope = { + dirty: r, + ctx: e + }), o.$set(n), (!i || 8 & r[0]) && An(t, "style", e[3]) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Fx(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [zx] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[22]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 62 & o[0] | 4 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ox(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p = Gr, + m = () => (p(), p = en(g, (e => o(17, l = e))), g); + e.$$.on_destroy.push((() => p())); + let { + isActive: g + } = t; + m(); + let { + stores: $ + } = t, { + locale: f = {} + } = t, { + fillOptions: y = [] + } = t; + const b = e => e.map((e => (e => Lo(e) && T(e[0]) && Lo(e[1]))(e) ? [e[0], b(e[1]), e[2]] : (e => [Array.isArray(e) && 3 === e.length ? [...e, 1] : e, void 0, { + disabled: !1 + }])(e))), + x = Jn("elasticityMultiplier"); + on(e, x, (e => o(21, h = e))); + const { + history: v, + animation: w, + scrollElasticity: S, + imageBackgroundColor: k, + imageBackgroundImage: C, + allowPan: M, + allowZoom: R, + allowZoomControls: P, + allowPlayPause: E + } = $; + on(e, w, (e => o(18, c = e))), on(e, k, (e => o(20, u = e))), on(e, C, (e => o(19, d = e))); + const I = ec(c ? 20 : 0); + return on(e, I, (e => o(16, s = e))), e.$$set = e => { + "isActive" in e && m(o(0, g = e.isActive)), "stores" in e && o(14, $ = e.stores), "locale" in e && o(1, f = e.locale), "fillOptions" in e && o(15, y = e.fillOptions) + }, e.$$.update = () => { + 32768 & e.$$.dirty[0] && o(2, i = b(y)), 131072 & e.$$.dirty[0] && M.set(l), 131072 & e.$$.dirty[0] && R.set(l), 131072 & e.$$.dirty[0] && P.set(l), 131072 & e.$$.dirty[0] && l && E.set(!0), 2097152 & e.$$.dirty[0] && o(5, r = h * S), 1572868 & e.$$.dirty[0] && o(4, n = i.findIndex((([e]) => d ? e === d : Array.isArray(e) ? cs(e, u) : void 0)) || 0), 393216 & e.$$.dirty[0] && c && I.set(l ? 0 : 20), 65536 & e.$$.dirty[0] && o(3, a = s ? `transform: translateY(${s}px)` : void 0) + }, [g, f, i, a, n, r, x, w, k, C, ({ + value: e + }) => { + T(e) && (un(k, u = void 0, u), un(C, d = e, d)), Lo(e) && (un(k, u = e, u), un(C, d = void 0, d)), v.write() + }, e => { + if (T(e)) return `
`; + if (Lo(e)) { + const [t, o, i, r] = e.map(((e, t) => t < 3 ? Math.round(255 * e) : e)); + return `
` + } + return "
" + }, I, "fill", $, y, s, l, c, d, u, h, function(t) { + Qn.call(this, e, t) + }] +} +var Dx = { + util: ["fill", class extends Fa { + constructor(e) { + super(), za(this, e, Ox, Fx, Qr, { + name: 13, + isActive: 0, + stores: 14, + locale: 1, + fillOptions: 15 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[13] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get stores() { + return this.$$.ctx[14] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[1] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get fillOptions() { + return this.$$.ctx[15] + } + set fillOptions(e) { + this.$$set({ + fillOptions: e + }), pa() + } + }, ({ + src: e, + fillOptions: t + }) => e && !Sp(e) && t && t.length] +}; + +function Bx(e) { + let t, o, i; + + function r(t) { + e[41](t) + } + let n = { + utilKey: "retouch", + stores: e[4], + locale: e[5], + isActive: e[1], + isActiveFraction: e[2], + isVisible: e[3], + mapScreenPointToImagePoint: e[26], + mapImagePointToScreenPoint: e[25], + imageRotation: e[27], + imageFlipX: e[24], + imageFlipY: e[23], + toolbar: e[6], + toolbarLayout: "stack", + shapes: e[29], + toolShapes: e[7], + enableViewTool: e[14], + enableMoveTool: e[13], + enableToolShareStyles: !1, + shapeControls: e[8], + enablePresetSelectImage: !1, + enablePresetDropImage: !1, + parentRect: e[30], + willStartInteraction: e[12], + willRenderHeaderTools: e[10] || e[17], + willRenderShapeStyleControls: e[9], + hooks: { + willRenderShapeControls: e[11] || e[15], + willRenderShapeTextControls: e[16], + beforeAddShape: e[18], + beforeRemoveShape: e[19], + beforeDeselectShape: e[20], + beforeSelectShape: e[21], + beforeUpdateShape: e[22] + } + }; + return void 0 !== e[0] && (n.toolActive = e[0]), t = new Kb({ + props: n + }), ta.push((() => Ea(t, "toolActive", r))), t.$on("measure", e[42]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 16 & i[0] && (r.stores = e[4]), 32 & i[0] && (r.locale = e[5]), 2 & i[0] && (r.isActive = e[1]), 4 & i[0] && (r.isActiveFraction = e[2]), 8 & i[0] && (r.isVisible = e[3]), 67108864 & i[0] && (r.mapScreenPointToImagePoint = e[26]), 33554432 & i[0] && (r.mapImagePointToScreenPoint = e[25]), 134217728 & i[0] && (r.imageRotation = e[27]), 16777216 & i[0] && (r.imageFlipX = e[24]), 8388608 & i[0] && (r.imageFlipY = e[23]), 64 & i[0] && (r.toolbar = e[6]), 128 & i[0] && (r.toolShapes = e[7]), 16384 & i[0] && (r.enableViewTool = e[14]), 8192 & i[0] && (r.enableMoveTool = e[13]), 256 & i[0] && (r.shapeControls = e[8]), 4096 & i[0] && (r.willStartInteraction = e[12]), 132096 & i[0] && (r.willRenderHeaderTools = e[10] || e[17]), 512 & i[0] && (r.willRenderShapeStyleControls = e[9]), 8226816 & i[0] && (r.hooks = { + willRenderShapeControls: e[11] || e[15], + willRenderShapeTextControls: e[16], + beforeAddShape: e[18], + beforeRemoveShape: e[19], + beforeDeselectShape: e[20], + beforeSelectShape: e[21], + beforeUpdateShape: e[22] + }), !o && 1 & i[0] && (o = !0, r.toolActive = e[0], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Wx(e, t, o) { + let i, r, n, a, s, l, c, d, u; + let { + isActive: h + } = t, { + isActiveFraction: p + } = t, { + isVisible: m + } = t, { + stores: g + } = t, { + locale: $ = {} + } = t, { + retouchTools: f + } = t, { + retouchToolShapes: y + } = t, { + retouchShapeControls: b + } = t, { + retouchActiveTool: x + } = t, { + retouchWillRenderShapeStyleControls: v + } = t, { + retouchWillRenderHeaderTools: w + } = t, { + retouchWillRenderShapeControls: S + } = t, { + markupEditorWillStartInteraction: k + } = t, { + retouchEnableMoveTool: C + } = t, { + retouchEnableViewTool: T + } = t, { + willRenderShapeControls: M + } = t, { + willRenderShapeTextControls: R + } = t, { + willRenderHeaderTools: P + } = t, { + beforeAddShape: E + } = t, { + beforeRemoveShape: I + } = t, { + beforeDeselectShape: A + } = t, { + beforeSelectShape: L + } = t, { + beforeUpdateShape: z + } = t; + const { + rootRect: F, + imageManipulation: O, + imageSize: D, + imageRotation: B, + imageFlipX: W, + imageFlipY: V, + imageTransforms: _, + imageTransformsInterpolated: N + } = g; + return on(e, F, (e => o(40, d = e))), on(e, D, (e => o(39, c = e))), on(e, B, (e => o(27, u = e))), on(e, W, (e => o(24, a = e))), on(e, V, (e => o(23, n = e))), on(e, _, (e => o(38, l = e))), on(e, N, (e => o(37, s = e))), e.$$set = e => { + "isActive" in e && o(1, h = e.isActive), "isActiveFraction" in e && o(2, p = e.isActiveFraction), "isVisible" in e && o(3, m = e.isVisible), "stores" in e && o(4, g = e.stores), "locale" in e && o(5, $ = e.locale), "retouchTools" in e && o(6, f = e.retouchTools), "retouchToolShapes" in e && o(7, y = e.retouchToolShapes), "retouchShapeControls" in e && o(8, b = e.retouchShapeControls), "retouchActiveTool" in e && o(0, x = e.retouchActiveTool), "retouchWillRenderShapeStyleControls" in e && o(9, v = e.retouchWillRenderShapeStyleControls), "retouchWillRenderHeaderTools" in e && o(10, w = e.retouchWillRenderHeaderTools), "retouchWillRenderShapeControls" in e && o(11, S = e.retouchWillRenderShapeControls), "markupEditorWillStartInteraction" in e && o(12, k = e.markupEditorWillStartInteraction), "retouchEnableMoveTool" in e && o(13, C = e.retouchEnableMoveTool), "retouchEnableViewTool" in e && o(14, T = e.retouchEnableViewTool), "willRenderShapeControls" in e && o(15, M = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(16, R = e.willRenderShapeTextControls), "willRenderHeaderTools" in e && o(17, P = e.willRenderHeaderTools), "beforeAddShape" in e && o(18, E = e.beforeAddShape), "beforeRemoveShape" in e && o(19, I = e.beforeRemoveShape), "beforeDeselectShape" in e && o(20, A = e.beforeDeselectShape), "beforeSelectShape" in e && o(21, L = e.beforeSelectShape), "beforeUpdateShape" in e && o(22, z = e.beforeUpdateShape) + }, e.$$.update = () => { + 25165824 & e.$$.dirty[0] | 960 & e.$$.dirty[1] && o(26, i = e => Qb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)), 25165824 & e.$$.dirty[0] | 960 & e.$$.dirty[1] && o(25, r = e => Jb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)) + }, [x, h, p, m, g, $, f, y, b, v, w, S, k, C, T, M, R, P, E, I, A, L, z, n, a, r, i, u, F, O, D, B, W, V, _, N, "retouch", s, l, c, d, function(e) { + x = e, o(0, x) + }, function(t) { + Qn.call(this, e, t) + }] +} +var Vx = { + util: ["retouch", class extends Fa { + constructor(e) { + super(), za(this, e, Wx, Bx, Qr, { + name: 36, + isActive: 1, + isActiveFraction: 2, + isVisible: 3, + stores: 4, + locale: 5, + retouchTools: 6, + retouchToolShapes: 7, + retouchShapeControls: 8, + retouchActiveTool: 0, + retouchWillRenderShapeStyleControls: 9, + retouchWillRenderHeaderTools: 10, + retouchWillRenderShapeControls: 11, + markupEditorWillStartInteraction: 12, + retouchEnableMoveTool: 13, + retouchEnableViewTool: 14, + willRenderShapeControls: 15, + willRenderShapeTextControls: 16, + willRenderHeaderTools: 17, + beforeAddShape: 18, + beforeRemoveShape: 19, + beforeDeselectShape: 20, + beforeSelectShape: 21, + beforeUpdateShape: 22 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[36] + } + get isActive() { + return this.$$.ctx[1] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[2] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[3] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[4] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[5] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get retouchTools() { + return this.$$.ctx[6] + } + set retouchTools(e) { + this.$$set({ + retouchTools: e + }), pa() + } + get retouchToolShapes() { + return this.$$.ctx[7] + } + set retouchToolShapes(e) { + this.$$set({ + retouchToolShapes: e + }), pa() + } + get retouchShapeControls() { + return this.$$.ctx[8] + } + set retouchShapeControls(e) { + this.$$set({ + retouchShapeControls: e + }), pa() + } + get retouchActiveTool() { + return this.$$.ctx[0] + } + set retouchActiveTool(e) { + this.$$set({ + retouchActiveTool: e + }), pa() + } + get retouchWillRenderShapeStyleControls() { + return this.$$.ctx[9] + } + set retouchWillRenderShapeStyleControls(e) { + this.$$set({ + retouchWillRenderShapeStyleControls: e + }), pa() + } + get retouchWillRenderHeaderTools() { + return this.$$.ctx[10] + } + set retouchWillRenderHeaderTools(e) { + this.$$set({ + retouchWillRenderHeaderTools: e + }), pa() + } + get retouchWillRenderShapeControls() { + return this.$$.ctx[11] + } + set retouchWillRenderShapeControls(e) { + this.$$set({ + retouchWillRenderShapeControls: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[12] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + get retouchEnableMoveTool() { + return this.$$.ctx[13] + } + set retouchEnableMoveTool(e) { + this.$$set({ + retouchEnableMoveTool: e + }), pa() + } + get retouchEnableViewTool() { + return this.$$.ctx[14] + } + set retouchEnableViewTool(e) { + this.$$set({ + retouchEnableViewTool: e + }), pa() + } + get willRenderShapeControls() { + return this.$$.ctx[15] + } + set willRenderShapeControls(e) { + this.$$set({ + willRenderShapeControls: e + }), pa() + } + get willRenderShapeTextControls() { + return this.$$.ctx[16] + } + set willRenderShapeTextControls(e) { + this.$$set({ + willRenderShapeTextControls: e + }), pa() + } + get willRenderHeaderTools() { + return this.$$.ctx[17] + } + set willRenderHeaderTools(e) { + this.$$set({ + willRenderHeaderTools: e + }), pa() + } + get beforeAddShape() { + return this.$$.ctx[18] + } + set beforeAddShape(e) { + this.$$set({ + beforeAddShape: e + }), pa() + } + get beforeRemoveShape() { + return this.$$.ctx[19] + } + set beforeRemoveShape(e) { + this.$$set({ + beforeRemoveShape: e + }), pa() + } + get beforeDeselectShape() { + return this.$$.ctx[20] + } + set beforeDeselectShape(e) { + this.$$set({ + beforeDeselectShape: e + }), pa() + } + get beforeSelectShape() { + return this.$$.ctx[21] + } + set beforeSelectShape(e) { + this.$$set({ + beforeSelectShape: e + }), pa() + } + get beforeUpdateShape() { + return this.$$.ctx[22] + } + set beforeUpdateShape(e) { + this.$$set({ + beforeUpdateShape: e + }), pa() + } + }, ({ + src: e + }) => e && !Sp(e)] +}; +const _x = '', + Nx = ''; +var Hx = { + labelReset: "Reset", + labelDefault: "Default", + labelAuto: "Auto", + labelNone: "None", + labelEdit: "Edit", + labelClose: "Close", + labelSupportError: e => e.join(", ") + " not supported on this browser", + labelColor: "Color", + labelWidth: "Width", + labelSize: "Size", + labelOffset: "Offset", + labelAmount: "Amount", + labelInset: "Inset", + labelRadius: "Radius", + labelColorPalette: "Color palette", + labelSizeExtraSmall: "Extra small", + labelSizeSmall: "Small", + labelSizeMediumSmall: "Medium small", + labelSizeMedium: "Medium", + labelSizeMediumLarge: "Medium large", + labelSizeLarge: "Large", + labelSizeExtraLarge: "Extra large", + labelButtonCancel: "Cancel", + labelButtonUndo: "Undo", + labelButtonRedo: "Redo", + labelButtonRevert: "Revert", + labelButtonExport: "Done", + labelZoomIn: "Zoom in", + labelZoomOut: "Zoom out", + labelZoomFit: "Fit to view", + labelZoomActual: "Actual size", + iconZoomIn: '', + iconZoomOut: '', + iconSupportError: '', + iconButtonClose: _x, + iconButtonRevert: '', + iconButtonUndo: '', + iconButtonRedo: '', + iconButtonExport: '', + statusLabelButtonClose: "Close", + statusIconButtonClose: _x, + statusLabelLoadImage: e => e && e.task ? e.error ? "IMAGE_TOO_SMALL" === e.error.code ? "Minimum image size is {minWidth} × {minHeight}" : "Error loading image" : "blob-to-bitmap" === e.task ? "Preparing image…" : "Loading image…" : "Waiting for image", + statusLabelProcessImage: e => { + if (e && e.task) return "store" === e.task ? e.error ? "Error uploading image" : "Uploading image…" : e.error ? "Error processing image" : "Processing image…" + } +}; +const jx = { + shapeLabelButtonSelectSticker: "Select image", + shapeIconButtonSelectSticker: '', + shapeIconButtonFlipHorizontal: '', + shapeIconButtonFlipVertical: '', + shapeIconButtonRemove: '', + shapeIconButtonDuplicate: '', + shapeIconButtonMoveToFront: '', + shapeIconButtonTextLayoutAutoWidth: "" + Nx, + shapeIconButtonTextLayoutAutoHeight: '' + Nx, + shapeIconButtonTextLayoutFixedSize: '' + Nx, + shapeTitleButtonTextLayoutAutoWidth: "Auto width", + shapeTitleButtonTextLayoutAutoHeight: "Auto height", + shapeTitleButtonTextLayoutFixedSize: "Fixed size", + shapeTitleButtonFlipHorizontal: "Flip Horizontal", + shapeTitleButtonFlipVertical: "Flip Vertical", + shapeTitleButtonRemove: "Remove", + shapeTitleButtonDuplicate: "Duplicate", + shapeTitleButtonMoveToFront: "Move to front", + shapeLabelInputText: "Edit text", + shapeIconInputCancel: '', + shapeIconInputConfirm: '', + shapeLabelInputCancel: "Cancel", + shapeLabelInputConfirm: "Confirm", + shapeLabelStrokeNone: "No outline", + shapeLabelFontStyleNormal: "Normal", + shapeLabelFontStyleBold: "Bold", + shapeLabelFontStyleItalic: "Italic", + shapeLabelFontStyleItalicBold: "Bold Italic", + shapeTitleBackgroundColor: "Fill color", + shapeTitleCornerRadius: "Corner radius", + shapeTitleFontFamily: "Font", + shapeTitleFontSize: "Font size", + shapeTitleFontStyle: "Font style", + shapeTitleLineHeight: "Line height", + shapeTitleLineStart: "Start", + shapeTitleLineEnd: "End", + shapeTitleStrokeWidth: "Line width", + shapeTitleStrokeColor: "Line color", + shapeTitleLineDecorationBar: "Bar", + shapeTitleLineDecorationCircle: "Circle", + shapeTitleLineDecorationSquare: "Square", + shapeTitleLineDecorationArrow: "Arrow", + shapeTitleLineDecorationCircleSolid: "Circle solid", + shapeTitleLineDecorationSquareSolid: "Square solid", + shapeTitleLineDecorationArrowSolid: "Arrow solid", + shapeIconLineDecorationBar: '', + shapeIconLineDecorationCircle: '', + shapeIconLineDecorationSquare: '', + shapeIconLineDecorationArrow: '', + shapeIconLineDecorationCircleSolid: '', + shapeIconLineDecorationSquareSolid: '', + shapeIconLineDecorationArrowSolid: '', + shapeTitleColorTransparent: "Transparent", + shapeTitleColorWhite: "White", + shapeTitleColorSilver: "Silver", + shapeTitleColorGray: "Gray", + shapeTitleColorBlack: "Black", + shapeTitleColorNavy: "Navy", + shapeTitleColorBlue: "Blue", + shapeTitleColorAqua: "Aqua", + shapeTitleColorTeal: "Teal", + shapeTitleColorOlive: "Olive", + shapeTitleColorGreen: "Green", + shapeTitleColorYellow: "Yellow", + shapeTitleColorOrange: "Orange", + shapeTitleColorRed: "Red", + shapeTitleColorMaroon: "Maroon", + shapeTitleColorFuchsia: "Fuchsia", + shapeTitleColorPurple: "Purple", + shapeTitleTextOutline: "Text outline", + shapeTitleTextOutlineWidth: "Width", + shapeTitleTextShadow: "Text shadow", + shapeTitleTextShadowBlur: "Blur", + shapeTitleTextColor: "Font color", + shapeTitleTextAlign: "Text align", + shapeTitleTextAlignLeft: "Left align text", + shapeTitleTextAlignCenter: "Center align text", + shapeTitleTextAlignRight: "Right align text", + shapeIconTextAlignLeft: '', + shapeIconTextAlignCenter: '', + shapeIconTextAlignRight: '', + shapeLabelToolMove: "Move", + shapeLabelToolView: "View", + shapeLabelToolSharpie: "Sharpie", + shapeLabelToolEraser: "Eraser", + shapeLabelToolPath: "Path", + shapeLabelToolRectangle: "Rectangle", + shapeLabelToolEllipse: "Ellipse", + shapeLabelToolArrow: "Arrow", + shapeLabelToolLine: "Line", + shapeLabelToolText: "Text", + shapeLabelToolPreset: "Stickers", + shapeIconToolView: '', + shapeIconToolMove: '', + shapeIconToolSharpie: '', + shapeIconToolEraser: '', + shapeIconToolPath: '', + shapeIconToolRectangle: '', + shapeIconToolEllipse: '', + shapeIconToolArrow: '', + shapeIconToolLine: '', + shapeIconToolText: '', + shapeIconToolPreset: '', + shapeTitleSelectionMode: "Selection mode", + shapeTitleBrushSize: "Brush size", + shapeLabelSelectionModeNew: "New", + shapeLabelSelectionModeAdd: "Add", + shapeLabelSelectionModeSubtract: "Remove", + shapeLabelToolSelectionBrush: "Brush", + shapeLabelToolSelectionLassoo: "Lassoo", + shapeLabelToolSelectionRectangle: "Rectangle marquee", + shapeLabelToolSelectionEllipse: "Ellipse marquee", + shapeIconSelectionModeNew: '', + shapeIconSelectionModeAdd: '', + shapeIconSelectionModeSubtract: '', + shapeIconToolSelectionBrush: '', + shapeIconToolSelectionLassoo: '', + shapeIconToolSelectionRectangle: '', + shapeIconToolSelectionEllipse: '' +}; +var Ux = { + cropLabel: "Crop", + cropIcon: '', + cropIconButtonRecenter: '', + cropIconButtonRotateLeft: '', + cropIconButtonRotateRight: '', + cropIconButtonFlipVertical: '', + cropIconButtonFlipHorizontal: '', + cropIconSelectPreset: (e, t) => { + const [o, i, r] = t ? [t < 1 ? 1 : .3, 1 === t ? .85 : .5, t > 1 ? 1 : .3] : [.2, .3, .4]; + return `\n \n \n \n ` + }, + cropIconCropBoundary: (e, t) => { + const [o, i, r, n] = t ? [.3, 1, 0, 0] : [0, 0, .3, 1]; + return `\n \n \n \n \n ` + }, + cropLabelButtonRecenter: "Recenter", + cropLabelButtonRotateLeft: "Rotate left", + cropLabelButtonRotateRight: "Rotate right", + cropLabelButtonFlipHorizontal: "Flip horizontal", + cropLabelButtonFlipVertical: "Flip vertical", + cropLabelSelectPreset: "Crop shape", + cropLabelCropBoundary: "Crop boundary", + cropLabelCropBoundaryEdge: "Edge of image", + cropLabelCropBoundaryNone: "None", + cropLabelTabRotation: "Rotation", + cropLabelTabZoom: "Scale" + }, + Gx = { + fillLabel: "Fill", + fillIcon: '\n \n \n \n \n \n \n \n ' + }, + Zx = { + frameLabel: "Frame", + frameIcon: '\n \n \n ', + frameLabelMatSharp: "Mat", + frameLabelMatRound: "Bevel", + frameLabelLineSingle: "Line", + frameLabelLineMultiple: "Zebra", + frameLabelEdgeSeparate: "Inset", + frameLabelEdgeOverlap: "Plus", + frameLabelEdgeCross: "Lumber", + frameLabelCornerHooks: "Hook", + frameLabelPolaroid: "Polaroid" + }, + Xx = { + redactLabel: "Redact", + redactIcon: '' + }, + Yx = { + retouchLabel: "Retouch", + retouchIcon: '\n \n ' + }, + qx = (e, t) => { + const o = Object.getOwnPropertyDescriptors(e); + Object.keys(o).forEach((i => { + o[i].get ? Object.defineProperty(t, i, { + get: () => e[i], + set: t => e[i] = t + }) : t[i] = e[i] + })) + }, + Kx = e => { + const t = {}, + { + sub: o, + pub: i + } = Go(); + c() && null !== document.doctype || console.warn("Browser is in quirks mode, add to page to fix render issues"); + const n = ws(); + qx(n, t); + const a = ((e, t) => { + const o = {}, + i = new fm({ + target: e, + props: { + stores: t, + pluginComponents: Array.from(km) + } + }); + let r = !1; + const n = () => { + r || (c() && window.removeEventListener("pagehide", n), i && (r = !0, i.$destroy())) + }; + vm || (vm = new Set(Xc(fm).filter((e => !bm.includes(e))))), vm.forEach((e => { + Object.defineProperty(o, e, { + get: () => i[e], + set: xm.includes(e) ? t => { + i[e] = { + ...i[e], + ...t + } + } : t => i[e] = t + }) + })), Object.defineProperty(o, "previewImageData", { + get: () => i.imagePreviewCurrent + }), wm.forEach((e => { + const t = Sm[e], + r = t[0]; + Object.defineProperty(o, e, { + get: () => i.pluginInterface[r][e], + set: o => { + const r = t.reduce(((t, r) => (t[r] = { + ...i.pluginOptions[r], + [e]: o + }, t)), {}); + i.pluginOptions = { + ...i.pluginOptions, + ...r + } + } + }) + })), Object.defineProperty(o, "element", { + get: () => i.root, + set: () => {} + }); + const a = i.history; + return qa(o, { + on: (e, t) => { + if (r) return () => {}; + if (/undo|redo|revert|writehistory/.test(e)) return a.on(e, t); + const o = [i.sub(e, t), i.$on(e, (e => t(e instanceof CustomEvent && !e.detail ? void 0 : e)))].filter(Boolean); + return () => o.forEach((e => e())) + }, + updateImagePreview: e => { + i.imagePreviewSrc = e + }, + close: () => !r && i.pub("close"), + destroy: n + }), Object.defineProperty(o, "history", { + get: () => ({ + undo: () => a.undo(), + redo: () => a.redo(), + revert: () => a.revert(), + get: () => a.get(), + getCollapsed: () => a.get().splice(0, a.index + 1), + set: e => a.set(e), + write: e => a.write(e), + get length() { + return a.length() + }, + get index() { + return a.index + }, + set index(e) { + a.index = e + } + }) + }), c() && window.addEventListener("pagehide", n), o + })(e, n.stores); + qx(a, t); + const s = ["loadImage", "processImage", "abortProcessImage", "abortLoadImage"].map((e => a.on(e, (t => { + const o = n[e](t && t.detail); + o instanceof Promise && o.catch(r) + })))), + l = (e, t) => { + const i = o(e, t), + r = n.on(e, t), + s = a.on(e, t); + return () => { + i(), r(), s() + } + }; + t.handleEvent = r; + const d = Tm.map((e => l(e, (o => t.handleEvent(e, o))))); + return qa(t, { + on: l, + updateImage: e => new Promise(((o, i) => { + const r = t.history.get(), + a = t.history.index, + s = t.imageState; + n.loadImage(e).then((e => { + t.history.set(r), t.history.index = a, t.imageState = s, o(e) + })).catch(i) + })), + close: () => { + i("close") + }, + destroy: () => { + [...s, ...d].forEach((e => e())), a.destroy(), n.destroy(), i("destroy") + } + }), setTimeout((() => i("init", t)), 0), t + }; +const Jx = "pintura-editor"; +var Qx = () => new Promise((e => { + if (!ev) return e([]); + var t; + t = Jx, document.createElement(t).constructor === HTMLElement && customElements.define(Jx, ev), customElements.whenDefined(Jx).then((() => e(document.querySelectorAll(Jx)))) +})); +const ev = c() && class extends HTMLElement { + constructor() { + super(), this._editor = void 0, this._unsubs = void 0 + } + static get observedAttributes() { + return ["src"] + } + attributeChangedCallback(e, t, o) { + this[e] = o + } + connectedCallback() { + this._editor = Kx(this), qx(this._editor, this), this._editor.src = this.getAttribute("src"), this._unsubs = Mm(this._editor, this) + } + disconnectedCallback() { + this._editor.destroy(), this._unsubs.forEach((e => e())) + } +}; +var tv = (e, t = {}) => { + const o = T(e) ? document.querySelector(e) : e; + if (!Dt(o)) return; + t.class = t.class ? "pintura-editor " + t.class : "pintura-editor"; + const i = Kx(o); + return Object.assign(i, t) +}; +const { + document: ov, + window: iv +} = ka; + +function rv(e) { + let t, o, i, r; + return la(e[27]), { + c() { + t = Mn(), o = kn("div"), An(o, "class", e[4]), An(o, "style", e[5]) + }, + m(n, a) { + wn(n, t, a), wn(n, o, a), e[28](o), i || (r = [Pn(iv, "keydown", e[10]), Pn(iv, "orientationchange", e[11]), Pn(iv, "resize", e[27]), Pn(ov.body, "focusin", (function() { + Jr(!e[1] && e[7]) && (!e[1] && e[7]).apply(this, arguments) + })), Pn(ov.body, "focusout", (function() { + Jr(e[2] && e[8]) && (e[2] && e[8]).apply(this, arguments) + })), Pn(o, "wheel", e[9], { + passive: !1 + })], i = !0) + }, + p(t, i) { + e = t, 16 & i[0] && An(o, "class", e[4]), 32 & i[0] && An(o, "style", e[5]) + }, + i: Gr, + o: Gr, + d(n) { + n && Sn(t), n && Sn(o), e[28](null), i = !1, Kr(r) + } + } +} + +function nv(e, t, o) { + let i, r, n, a, s, l, d, u; + const h = qn(); + let { + root: m + } = t, { + preventZoomViewport: g = !0 + } = t, { + preventScrollBodyIfNeeded: $ = !0 + } = t, { + preventFooterOverlapIfNeeded: f = !0 + } = t, { + class: y + } = t, b = !0, x = !1, v = !1, w = c() && document.documentElement, S = c() && document.body, k = c() && document.head; + const C = ec(0, { + precision: .001, + damping: .5 + }); + on(e, C, (e => o(26, u = e))); + const T = C.subscribe((e => { + v && e >= 1 ? (o(19, v = !1), o(1, b = !1), h("show")) : x && e <= 0 && (o(18, x = !1), o(1, b = !0), h("hide")) + })); + let M = !1, + R = void 0, + P = void 0, + E = void 0; + const I = () => document.querySelector("meta[name=viewport]"), + A = () => Array.from(document.querySelectorAll("meta[name=theme-color]")); + let L; + const z = (e, t) => { + const o = () => { + e() ? t() : requestAnimationFrame(o) + }; + requestAnimationFrame(o) + }; + let F, O, D = 0, + B = void 0; + const W = () => { + O || (O = p("div", { + style: "position:fixed;height:100vh;top:0" + }), S.append(O)) + }; + Zn((() => { + f && mo() && W() + })), Xn((() => { + O && (o(21, B = O.offsetHeight), O.remove(), O = void 0) + })); + let V = void 0; + const _ = () => w.style.setProperty("--pintura-document-height", window.innerHeight + "px"); + return Yn((() => { + w.classList.remove("PinturaModalBodyLock"), T() + })), e.$$set = e => { + "root" in e && o(0, m = e.root), "preventZoomViewport" in e && o(12, g = e.preventZoomViewport), "preventScrollBodyIfNeeded" in e && o(13, $ = e.preventScrollBodyIfNeeded), "preventFooterOverlapIfNeeded" in e && o(14, f = e.preventFooterOverlapIfNeeded), "class" in e && o(15, y = e.class) + }, e.$$.update = () => { + 67895298 & e.$$.dirty[0] && o(25, i = v || x ? u : b ? 0 : 1), 4096 & e.$$.dirty[0] && (r = "width=device-width,height=device-height,initial-scale=1" + (g ? ",maximum-scale=1,user-scalable=0" : "")), 786434 & e.$$.dirty[0] && o(22, n = !v && !b && !x), 12 & e.$$.dirty[0] && (M || o(20, F = D)), 2097160 & e.$$.dirty[0] && o(24, a = Eo(B) ? "--viewport-pad-footer:" + (B > D ? 0 : 1) : ""), 51380224 & e.$$.dirty[0] && o(5, s = `opacity:${i};height:${F}px;--editor-modal:1;${a}`), 32768 & e.$$.dirty[0] && o(4, l = Mc(["pintura-editor", "PinturaModal", y])), 8192 & e.$$.dirty[0] && o(23, d = $ && mo() && /15_/.test(navigator.userAgent)), 12582912 & e.$$.dirty[0] && d && (e => { + e ? (V = window.scrollY, w.classList.add("PinturaDocumentLock"), _(), window.addEventListener("resize", _)) : (window.removeEventListener("resize", _), w.classList.remove("PinturaDocumentLock"), Eo(V) && window.scrollTo(0, V), V = void 0) + })(n) + }, [m, b, M, D, l, s, C, e => { + Gd(e.target) && (o(2, M = !0), L = D) + }, e => { + if (Gd(e.target)) + if (clearTimeout(undefined), L === D) o(2, M = !1); + else { + const e = D; + z((() => D !== e), (() => o(2, M = !1))) + } + }, e => { + e.target && /PinturaStage/.test(e.target.className) && e.preventDefault() + }, e => { + const { + key: t + } = e; + if (!/escape/i.test(t)) return; + const o = e.target; + if (o && /input|textarea/i.test(o.nodeName)) return; + const i = document.querySelectorAll(".PinturaModal"); + i[i.length - 1] === m && h("close") + }, W, g, $, f, y, () => { + if (v || !b) return; + o(19, v = !0); + const e = I() || p("meta", { + name: "viewport" + }); + R = !R && e.getAttribute("content"), e.setAttribute("content", r + (/cover/.test(R) ? ",viewport-fit=cover" : "")), e.parentNode || k.append(e); + const t = getComputedStyle(m).getPropertyValue("--color-background"), + i = A(); + if (i.length) P = i.map((e => e.getAttribute("content"))); + else { + const e = p("meta", { + name: "theme-color" + }); + k.append(e), i.push(e) + } + i.forEach((e => e.setAttribute("content", `rgb(${t})`))), clearTimeout(E), E = setTimeout((() => C.set(1)), 250) + }, () => { + if (x || b) return; + clearTimeout(E), o(18, x = !0); + const e = I(); + R ? e.setAttribute("content", R) : e.remove(); + const t = A(); + P ? t.forEach(((e, t) => { + e.setAttribute("content", P[t]) + })) : t.forEach((e => e.remove())), C.set(0) + }, x, v, F, B, n, d, a, i, u, function() { + o(3, D = iv.innerHeight) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + m = e, o(0, m) + })) + }] +} +class av extends Fa { + constructor(e) { + super(), za(this, e, nv, rv, Qr, { + root: 0, + preventZoomViewport: 12, + preventScrollBodyIfNeeded: 13, + preventFooterOverlapIfNeeded: 14, + class: 15, + show: 16, + hide: 17 + }, null, [-1, -1]) + } + get root() { + return this.$$.ctx[0] + } + set root(e) { + this.$$set({ + root: e + }), pa() + } + get preventZoomViewport() { + return this.$$.ctx[12] + } + set preventZoomViewport(e) { + this.$$set({ + preventZoomViewport: e + }), pa() + } + get preventScrollBodyIfNeeded() { + return this.$$.ctx[13] + } + set preventScrollBodyIfNeeded(e) { + this.$$set({ + preventScrollBodyIfNeeded: e + }), pa() + } + get preventFooterOverlapIfNeeded() { + return this.$$.ctx[14] + } + set preventFooterOverlapIfNeeded(e) { + this.$$set({ + preventFooterOverlapIfNeeded: e + }), pa() + } + get class() { + return this.$$.ctx[15] + } + set class(e) { + this.$$set({ + class: e + }), pa() + } + get show() { + return this.$$.ctx[16] + } + get hide() { + return this.$$.ctx[17] + } +} +const sv = (e, t, o, i) => { + const r = ce(t.x - e.x, t.y - e.y), + n = ge(r), + a = 5 * o; + let s; + s = i ? .5 * a : Math.ceil(.5 * (a - 1)); + const l = we(ue(n), s); + return { + anchor: ue(e), + offset: l, + normal: n, + solid: i, + size: a, + sizeHalf: s + } + }, + lv = ({ + anchor: e, + solid: t, + normal: o, + offset: i, + size: r, + sizeHalf: n, + strokeWidth: a, + strokeColor: s, + strokeJoin: l, + strokeCap: c, + bitmap: d + }, u) => { + const h = e.x, + p = e.y, + m = we(ue(o), r), + g = ce(h + m.x, p + m.y); + if (we(m, .55), t) { + be(u, i); + const e = we(ue(o), .5 * n); + return [{ + points: [ce(h - e.x, p - e.y), ce(g.x - m.y, g.y + m.x), ce(g.x + m.y, g.y - m.x)], + pathClose: !0, + backgroundColor: s + }] + } { + const e = we((e => { + const t = e.x; + return e.x = -e.y, e.y = t, e + })(ue(o)), .5), + t = ce(h - e.x, p - e.y), + i = ce(h + e.x, p + e.y); + return [{ + points: [ce(g.x + m.y, g.y - m.x), t, ce(h, p), i, ce(g.x - m.y, g.y + m.x)], + pathClose: !1, + strokeWidth: a, + strokeColor: s, + strokeJoin: l, + strokeCap: c, + bitmap: d + }] + } + }, + cv = ({ + anchor: e, + solid: t, + offset: o, + normal: i, + sizeHalf: r, + strokeWidth: n, + strokeColor: a + }, s) => (be(s, o), t && be(s, he(ue(i))), [{ + x: e.x, + y: e.y, + rx: r, + ry: r, + backgroundColor: t ? a : void 0, + strokeWidth: t ? void 0 : n, + strokeColor: t ? void 0 : a + }]), + dv = ({ + anchor: e, + offset: t, + strokeWidth: o, + strokeColor: i, + strokeJoin: r, + strokeCap: n, + bitmap: a + }) => [{ + points: [ce(e.x - t.y, e.y + t.x), ce(e.x + t.y, e.y - t.x)], + strokeWidth: o, + strokeColor: i, + strokeJoin: r, + strokeCap: n, + bitmap: a + }], + uv = ({ + anchor: e, + solid: t, + offset: o, + normal: i, + sizeHalf: r, + strokeWidth: n, + strokeColor: a + }, s) => { + return be(s, o), [{ + x: e.x - r, + y: e.y - r, + width: 2 * r, + height: 2 * r, + rotation: (l = i, Math.atan2(l.y, l.x)), + backgroundColor: t ? a : void 0, + strokeWidth: t ? void 0 : n, + strokeColor: t ? void 0 : a + }]; + var l + }, + hv = (e = {}) => t => { + if (!t.lineStart && !t.lineEnd) return; + const o = [], + { + lineStart: i, + lineEnd: r, + strokeWidth: n, + strokeColor: a, + strokeJoin: s, + strokeCap: l, + bitmap: c + } = t, + d = ce(t.x1, t.y1), + u = ce(t.x2, t.y2), + h = [d, u]; + if (i) { + const [t, r] = i.split("-"), h = e[t]; + if (h) { + const e = sv(d, u, n, !!r); + o.push(...h({ + ...e, + strokeColor: a, + strokeWidth: n, + strokeJoin: s, + strokeCap: l, + bitmap: c + }, d)) + } + } + if (r) { + const [t, i] = r.split("-"), h = e[t]; + if (h) { + const e = sv(u, d, n, !!i); + o.push(...h({ + ...e, + strokeColor: a, + strokeWidth: n, + strokeJoin: s, + strokeCap: l, + bitmap: c + }, u)) + } + } + return [{ + points: h, + strokeWidth: n, + strokeColor: a, + strokeJoin: s, + strokeCap: l, + bitmap: c + }, ...o] + }, + pv = () => ({ + arrow: lv, + circle: cv, + square: uv, + bar: dv + }), + mv = (e, t) => { + const o = parseFloat(e) * t; + return T(e) ? o + "%" : o + }, + gv = (e, t) => T(e) ? rr(e, t) : e, + $v = e => [{ + ...e, + frameStyle: "line", + frameInset: 0, + frameOffset: 0, + frameSize: e.frameSize ? mv(e.frameSize, 2) : "2.5%", + frameRadius: e.frameRound ? mv(e.frameSize, 2) : 0 + }], + fv = ({ + width: e, + height: t, + frameImage: o, + frameSize: i = "15%", + frameOutset: r = 0, + frameSlices: n = { + x1: .15, + y1: .15, + x2: .85, + y2: .85 + } + }, { + isPreview: a + }) => { + if (!o) return []; + const s = Math.sqrt(e * t), + l = gv(i, s), + c = a ? l : Math.round(l), + d = c, + u = gv(r, s), + h = 2 * u, + { + x1: p, + x2: m, + y1: g, + y2: $ + } = n, + f = { + x0: 0, + y0: 0, + x1: c, + y1: d, + x2: e - c, + y2: t - d, + x3: e, + y3: t, + cw: c, + ch: d, + ew: e - c - c, + eh: t - d - d + }, + y = a ? 1 : 0, + b = 2 * y, + x = u > 0, + v = { + expandsCanvas: x, + width: f.cw, + height: f.ch, + backgroundImage: o + }; + return [{ + expandsCanvas: x, + x: f.x1 - y - u, + y: f.y0 - u, + width: f.ew + b + h, + height: f.ch, + backgroundCorners: [{ + x: p, + y: 0 + }, { + x: m, + y: 0 + }, { + x: m, + y: g + }, { + x: p, + y: g + }], + backgroundImage: o + }, { + expandsCanvas: x, + x: f.x1 - y - u, + y: f.y2 + u, + width: f.ew + b + h, + height: f.ch, + backgroundCorners: [{ + x: p, + y: $ + }, { + x: m, + y: $ + }, { + x: m, + y: 1 + }, { + x: p, + y: 1 + }], + backgroundImage: o + }, { + expandsCanvas: x, + x: f.x0 - u, + y: f.y1 - y - u, + width: f.cw, + height: f.eh + b + h, + backgroundCorners: [{ + x: 0, + y: g + }, { + x: p, + y: g + }, { + x: p, + y: $ + }, { + x: 0, + y: $ + }], + backgroundImage: o + }, { + expandsCanvas: x, + x: f.x2 + u, + y: f.y1 - y - u, + width: f.cw, + height: f.eh + b + h, + backgroundCorners: [{ + x: m, + y: g + }, { + x: 1, + y: g + }, { + x: 1, + y: $ + }, { + x: m, + y: $ + }], + backgroundImage: o + }, { + ...v, + x: f.x0 - u, + y: f.y0 - u, + backgroundCorners: [{ + x: 0, + y: 0 + }, { + x: p, + y: 0 + }, { + x: p, + y: g + }, { + x: 0, + y: g + }] + }, { + ...v, + x: f.x2 + u, + y: f.y0 - u, + backgroundCorners: [{ + x: m, + y: 0 + }, { + x: 1, + y: 0 + }, { + x: 1, + y: g + }, { + x: m, + y: g + }] + }, { + ...v, + x: f.x2 + u, + y: f.y2 + u, + backgroundCorners: [{ + x: m, + y: $ + }, { + x: 1, + y: $ + }, { + x: 1, + y: 1 + }, { + x: m, + y: 1 + }] + }, { + ...v, + x: f.x0 - u, + y: f.y2 + u, + backgroundCorners: [{ + x: 0, + y: $ + }, { + x: p, + y: $ + }, { + x: p, + y: 1 + }, { + x: 0, + y: 1 + }] + }] + }, + yv = ({ + x: e, + y: t, + width: o, + height: i, + frameInset: r = "3.5%", + frameSize: n = ".25%", + frameColor: a = [1, 1, 1], + frameOffset: s = "5%", + frameAmount: l = 1, + frameRadius: c = 0, + expandsCanvas: d = !1 + }, { + isPreview: u + }) => { + const h = Math.sqrt(o * i); + let p = gv(n, h); + const m = gv(r, h), + g = gv(s, h); + let $ = 0; + u || (p = Math.max(1, Math.round(p)), $ = p % 2 == 0 ? 0 : .5); + const f = gv(mv(c, l), h); + return new Array(l).fill(void 0).map(((r, n) => { + const s = g * n; + let l = e + m + s, + c = t + m + s, + h = e + o - m - s, + y = t + i - m - s; + u || (l = Math.round(l), c = Math.round(c), h = Math.round(h), y = Math.round(y)); + return { + x: l + $, + y: c + $, + width: h - l, + height: y - c, + cornerRadius: f > 0 ? f - s : 0, + strokeWidth: p, + strokeColor: a, + expandsCanvas: d + } + })) + }, + bv = ({ + x: e, + y: t, + width: o, + height: i, + frameSize: r = ".25%", + frameOffset: n = 0, + frameInset: a = "2.5%", + frameColor: s = [1, 1, 1] + }, { + isPreview: l + }) => { + const c = Math.sqrt(o * i); + let d = gv(r, c), + u = gv(a, c), + h = gv(n, c), + p = 0; + l || (d = Math.max(1, Math.round(d)), u = Math.round(u), h = Math.round(h), p = d % 2 == 0 ? 0 : .5); + const m = h - u, + g = e + u + p, + $ = t + u + p, + f = e + o - u - p, + y = t + i - u - p; + return [{ + points: [ce(g + m, $), ce(f - m, $)] + }, { + points: [ce(f, $ + m), ce(f, y - m)] + }, { + points: [ce(f - m, y), ce(g + m, y)] + }, { + points: [ce(g, y - m), ce(g, $ + m)] + }].map((e => (e.strokeWidth = d, e.strokeColor = s, e))) + }, + xv = ({ + x: e, + y: t, + width: o, + height: i, + frameSize: r = ".25%", + frameInset: n = "2.5%", + frameLength: a = "2.5%", + frameColor: s = [1, 1, 1] + }, { + isPreview: l + }) => { + const c = Math.sqrt(o * i); + let d = gv(r, c), + u = gv(n, c), + h = gv(a, c), + p = 0; + l || (d = Math.max(1, Math.round(d)), u = Math.round(u), h = Math.round(h), p = d % 2 == 0 ? 0 : .5); + const m = e + u + p, + g = t + u + p, + $ = e + o - u - p, + f = t + i - u - p; + return [{ + points: [ce(m, g + h), ce(m, g), ce(m + h, g)] + }, { + points: [ce($ - h, g), ce($, g), ce($, g + h)] + }, { + points: [ce($, f - h), ce($, f), ce($ - h, f)] + }, { + points: [ce(m + h, f), ce(m, f), ce(m, f - h)] + }].map((e => (e.strokeWidth = d, e.strokeColor = s, e))) + }, + vv = ({ + x: e, + y: t, + width: o, + height: i, + frameColor: r = [1, 1, 1] + }, { + isPreview: n + }) => { + const a = Math.sqrt(o * i), + s = .1 * a; + let l = .2 * a, + c = 0; + const d = .5 * s; + return n ? c = 1 : l = Math.ceil(l), r.length = 3, [{ + id: "border", + x: e - d + c, + y: t - d + c, + width: o + s - 2 * c, + height: i + l - 2 * c, + frameStyle: "line", + frameInset: 0, + frameOffset: 0, + frameSize: s, + frameColor: r, + expandsCanvas: !0 + }, { + id: "chin", + x: e - d, + y: i - c, + width: o + s, + height: l, + backgroundColor: r, + expandsCanvas: !0 + }].filter(Boolean) + }, + wv = (e = {}) => (t, o) => { + if (!Ao(t, "frameStyle")) return; + const i = t.frameStyle, + r = e[i]; + if (!r) return; + const { + frameStyle: n, + ...a + } = t; + return r(a, o) + }, + Sv = () => ({ + solid: $v, + hook: xv, + line: yv, + edge: bv, + polaroid: vv, + nine: fv + }), + kv = e => { + const t = (o, i = { + isPreview: !0 + }) => { + const r = e.map((e => { + const r = e(o, i); + if (r) return r.map((e => t(e, i))) + })).filter(Boolean).flat(); + return r.length ? r.flat().map(((e, t) => (e.id = o.id + "_" + t, e))) : o + }; + return t + }; +"undefined" != typeof window && (e => { + if (!e) return; + const [t, o, i, r] = [ + [108, 111, 99, 97, 116, 105, 111, 110], + [82, 101, 103, 69, 120, 112], + [116, 101, 115, 116], + [112, 113, 105, 110, 97, 92, 46, 110, 108] + ].map((e => e.map((e => String.fromCharCode(e))).join(""))); + e._clpdx4s = new e[o](r)[i](e[t]) +})(window); +const Cv = ol, + Tv = rl, + Mv = (e, ...t) => (o, i) => { + var r; + r = e, (Array.isArray(r) || M(r)) && (t = [e, ...t]); + const n = S(e) ? e : {}; + t = Array.isArray(t) ? t.reduce(((e, t) => [...e, ...Array.isArray(t) ? [...t] : [t]]), []) : t; + for (let e = 0; e < t.length; e++) { + const r = t[e](o, i, n); + if (Array.isArray(r)) return r + } + }, + Rv = () => ({ + read: s, + apply: w + }), + Pv = (e = {}) => { + const { + blurAmount: t, + dataSizeScalar: o, + scrambleAmount: i, + backgroundColor: r + } = e; + return (e, n) => (async (e, t = {}) => { + if (!e) return; + const { + width: o, + height: i + } = e, { + dataSize: r = 96, + dataSizeScalar: n = 1, + scrambleAmount: a = 4, + blurAmount: s = 6, + outputFormat: l = "canvas", + backgroundColor: c = [0, 0, 0] + } = t, d = Math.round(r * n), u = Math.min(d / o, d / i), h = Math.floor(o * u), m = Math.floor(i * u), f = p("canvas", { + width: h, + height: m + }), y = f.getContext("2d", { + willReadFrequently: !0 + }); + if (c.length = 3, y.fillStyle = _o(c), y.fillRect(0, 0, h, m), $(e)) { + const t = p("canvas", { + width: o, + height: i + }); + t.getContext("2d", { + willReadFrequently: !0 + }).putImageData(e, 0, 0), y.drawImage(t, 0, 0, h, m), g(t) + } else y.drawImage(e, 0, 0, h, m); + const b = y.getImageData(0, 0, h, m), + x = []; + if (a > 0 && x.push([Zl, { + amount: a + }]), s > 0) + for (let e = 0; e < s; e++) x.push([Co, { + matrix: Xl + }]); + let v; + if (x.length) { + const e = (t, o) => `(err, imageData) => {\n(${t[o][0].toString()})(Object.assign({ imageData: imageData }, filterInstructions[${o}]), \n${t[o+1]?e(t,o+1):"done"})\n}`, + t = `function (options, done) {\nconst filterInstructions = options.filterInstructions;\nconst imageData = options.imageData;\n(${e(x,0)})(null, imageData)\n}`, + o = await L(t, [{ + imageData: b, + filterInstructions: x.map((e => e[1])) + }], [b.data.buffer]); + v = wo(o) + } else v = b; + return "canvas" === l ? (y.putImageData(v, 0, 0), f) : v + })(e, { + blurAmount: t, + scrambleAmount: i, + backgroundColor: r, + ...n, + dataSizeScalar: o || n.dataSizeScalar + }) + }, + Ev = ws, + Iv = () => (() => { + const e = bs.map(xs), + t = Xa.map((([e]) => e)).filter((e => !ys.includes(e))); + return e.concat(t) + })().concat((vm = new Set(Xc(fm).filter((e => !bm.includes(e)))), [...vm, ...wm])), + Av = qg, + Lv = Xg, + zv = G$, + Fv = (e, t) => e.find((e => e.id === t)), + Ov = (e, t, o) => e.map((e => e.id !== t ? e : o(e))), + Dv = { + markupEditorToolbar: qg(), + markupEditorToolStyles: Xg(), + markupEditorShapeStyleControls: G$() + }, + Bv = Cm, + Wv = ny, + Vv = hy, + _v = by, + Nv = ix, + Hv = ax, + jv = cx, + Uv = gx, + Gv = Ex, + Zv = Mx, + Xv = Dx, + Yv = Vx, + qv = xg, + Kv = ig, + Jv = Eg, + Qv = Hx, + ew = jx, + tw = Ux, + ow = Gx, + iw = { + filterLabel: "Filter", + filterIcon: '', + filterLabelChrome: "Chrome", + filterLabelFade: "Fade", + filterLabelCold: "Cold", + filterLabelWarm: "Warm", + filterLabelPastel: "Pastel", + filterLabelMonoDefault: "Mono", + filterLabelMonoNoir: "Noir", + filterLabelMonoWash: "Wash", + filterLabelMonoStark: "Stark", + filterLabelSepiaDefault: "Sepia", + filterLabelSepiaBlues: "Blues", + filterLabelSepiaRust: "Rust", + filterLabelSepiaColor: "Color" + }, + rw = { + finetuneLabel: "Finetune", + finetuneIcon: '', + finetuneLabelBrightness: "Brightness", + finetuneLabelContrast: "Contrast", + finetuneLabelSaturation: "Saturation", + finetuneLabelExposure: "Exposure", + finetuneLabelTemperature: "Temperature", + finetuneLabelGamma: "Gamma", + finetuneLabelClarity: "Clarity", + finetuneLabelVignette: "Vignette" + }, + nw = { + resizeLabel: "Resize", + resizeIcon: '', + resizeLabelFormCaption: "Image output size", + resizeLabelInputWidth: "w", + resizeTitleInputWidth: "Width", + resizeLabelInputHeight: "h", + resizeTitleInputHeight: "Height", + resizeTitleButtonMaintainAspectRatio: "Maintain aspectratio", + resizeIconButtonMaintainAspectRatio: (e, t) => `` + }, + aw = { + decorateLabel: "Decorate", + decorateIcon: '' + }, + sw = { + annotateLabel: "Annotate", + annotateIcon: '' + }, + lw = { + stickerLabel: "Sticker", + stickerIcon: '' + }, + cw = Zx, + dw = Xx, + uw = Yx, + hw = (e, t, o = {}) => (T(t) ? Array.from(document.querySelectorAll(t)) : t).filter(Boolean).map((t => e(t, C(o)))), + pw = tv, + mw = (e = {}, t) => { + const { + sub: o, + pub: i + } = Go(), n = {}, a = ((e = {}, t) => new av({ + target: t || document.body, + props: { + class: e.class, + preventZoomViewport: e.preventZoomViewport, + preventScrollBodyIfNeeded: e.preventScrollBodyIfNeeded, + preventFooterOverlapIfNeeded: e.preventFooterOverlapIfNeeded + } + }))(e, t), s = () => { + a.hide && a.hide() + }, l = () => { + a.show && a.show() + }, c = Kx(a.root); + qx(c, n), n.handleEvent = r, c.handleEvent = (e, t) => { + if ("init" === e) return n.handleEvent(e, n); + n.handleEvent(e, t) + }, c.on("close", (async () => { + const { + willClose: t + } = e; + if (!t) return s(); + await t() && s() + })); + const d = (e, t) => /show|hide/.test(e) ? o(e, t) : c.on(e, t), + u = ["show", "hide"].map((e => d(e, (t => n.handleEvent(e, t))))), + h = () => { + u.forEach((e => e())), s(), a.$destroy(), c.destroy() + }; + return qa(n, { + on: d, + destroy: h, + hide: s, + show: l + }), Object.defineProperty(n, "modal", { + get: () => a.root, + set: () => {} + }), a.$on("close", c.close), a.$on("show", (() => i("show"))), a.$on("hide", (() => { + i("hide"), !1 !== e.enableAutoDestroy && h() + })), !1 !== e.enableAutoHide && c.on("process", s), c.on("loadstart", l), !1 !== e.enableButtonClose && (e.enableButtonClose = !0), delete e.class, Object.assign(n, e), n + }, + gw = (e, t) => tv(e, { + ...t, + layout: "overlay" + }), + $w = (e, t) => hw(pw, e, t), + fw = kv, + yw = (e = []) => kv([wv(Sv()), hv(pv()), ...e]), + bw = (e = {}) => { + let t, o = void 0; + Array.isArray(e.imageReader) || (o = e.imageReader, delete e.imageReader), Array.isArray(e.imageWriter) ? t = Tv() : (t = M(e.imageWriter) ? e.imageWriter : Tv(e.imageWriter), delete e.imageWriter); + let i = void 0; + return M(e.imageScrambler) || (i = e.imageScrambler, delete e.imageScrambler), { + imageReader: Cv(o), + imageWriter: t, + imageOrienter: Rv(), + imageScrambler: Pv(i) + } + }, + xw = (e, t = {}) => { + const o = bw(t), + i = "function" == typeof t.shapePreprocessor ? t.shapePreprocessor : yw(t.shapePreprocessor); + return delete t.shapePreprocessor, t = Va([{ + ...o, + shapePreprocessor: i, + stickerStickToImage: !0 + }, t]), Ss(e, t) + }, + vw = (e = {}) => { + Cm(Wv, Vv, _v, Nv, Hv, jv, Uv, Gv, Zv, Xv); + const t = bw(e), + o = { + ...Qv, + ...ew, + ...tw, + ...ow, + ...iw, + ...rw, + ...cw, + ...dw, + ...nw, + ...aw, + ...sw, + ...lw, + ...e.locale + }; + delete e.locale; + const i = "function" == typeof e.shapePreprocessor ? e.shapePreprocessor : yw(e.shapePreprocessor); + if (delete e.shapePreprocessor, e.markupEditorShapeStyleControls) { + Object.entries(e.markupEditorShapeStyleControls).every((([e, t]) => /Options$/.test(e) || !Array.isArray(t))) && (e.markupEditorShapeStyleControls = zv({ + ...e.markupEditorShapeStyleControls + })) + } + return Va([{ + ...t, + shapePreprocessor: i, + utils: ["trim", "crop", "filter", "finetune", "retouch", "annotate", "decorate", "sticker", "fill", "frame", "redact", "resize"], + ...qv, + ...Kv, + ...Jv, + ...Dv, + stickerStickToImage: !0, + locale: o + }, e]) + }, + ww = async (e = {}) => { + const t = await Qx(); + return t.forEach((t => Object.assign(t, C(e)))), t + }, Sw = e => ww(vw(e)), kw = (e, t) => mw(vw(e), t), Cw = (e, t) => pw(e, vw(t)), Tw = (e, t) => gw(e, vw(t)), Mw = (e, t) => hw(Cw, e, t), Rw = (e, t, o, i) => new Promise((async (r, n) => { + const { + format: a = "canvas", + backgroundColor: s = [0, 0, 0], + foregroundColor: l = [1, 1, 1], + scope: c = "mask", + padding: d = 0, + maxSize: u = t, + targetSize: h, + forceSquareCanvas: m = !1, + precision: g = 7 + } = i || {}, { + flipX: $, + flipY: f, + rotation: y + } = o, b = Math.min(1, 2048 / t.width), x = We({ + ...t + }, b), v = _e({ + ...t + }, y), w = _e({ + ...x + }, y), S = { + x: .5 * (x.width - w.width), + y: .5 * (x.height - w.height), + ...w + }, k = void 0 === l || 0 === l[3], C = k ? [1, 1, 1] : l, T = { + imageAnnotation: e.map((e => ((e, t, o) => { + const i = { + ...e + }; + return br(i, t), i.width || i.rx ? i.backgroundColor = o : i.points && !i.pathClose ? (i.strokeJoin = "round", i.strokeCap = "round", i.strokeColor = o) : i.points && (i.backgroundColor = o, i.strokeColor = [0, 0, 0, 0]), i + })(e, b, C))), + imageBackgroundColor: "image" === c ? [0, 0, 0] : void 0, + imageCropLimitToImage: !1, + imageCrop: S, + imageFlipX: $, + imageFlipY: f, + imageRotation: y, + imageWriter: { + format: "canvas" + } + }, { + dest: M + } = await xw(p("canvas", x), { + ...T + }), R = M.getContext("2d", { + desynchronized: !0, + willReadFrequently: !0 + }); + let P, E; + { + const e = Number.MAX_SAFE_INTEGER, + { + width: t, + height: o + } = M, + i = R.getImageData(0, 0, t, o).data; + let r, n, a = Math.max(1, parseInt(g, 10)), + s = t - a, + l = o - a, + [c, d, h, p] = [e, -e, -e, e]; + for (r = 0; r <= l; r += a) + for (n = 0; n <= s; n += a) { + i[4 * (n + r * t) + 3] <= 32 || (n < p ? p = n : n > d && (d = n), r < c ? c = r : r > h && (h = r)) + } + const m = Je([c - g, d + g, h + g, p - g]), + $ = rt(m), + f = Math.min(m.width, u.width), + y = Math.min(m.height, u.height); + P = it($.x - .5 * f, $.y - .5 * y, f, y) + } + at(P, 1 / b, le()); + let I = d, + A = d; + if ("mask" === c) { + const e = ze(P); + if (e.width += 2 * I, e.height += 2 * A, m) { + const t = Math.max(e.width, e.height); + I += .5 * (t - e.width), A += .5 * (t - e.height), e.width = t, e.height = t + } + let t = 1; + h && (t = Math.min(h.width / e.width, h.height / e.height, 1)), We(e, t); + const o = p("canvas", e), + i = o.getContext("2d"); + + i.fillStyle = _o(s), i.fillRect(0, 0, o.width, o.height), k && (i.globalCompositeOperation = "destination-out"), i.scale(t, t), i.drawImage(M, -P.x + I, -P.y + A, v.width, v.height), E = o + } else E = M; + const L = Ke(t); + L.x += .5 * (v.width - t.width), L.y += .5 * (v.height - t.height); + const [z] = mt(L, y), F = rt({ + ...P + }), O = ce(F.x - z.x, F.y - z.y); + P.x = Math.cos(y) * O.x + Math.sin(y) * O.y - .5 * P.width, P.y = Math.cos(y) * O.y - Math.sin(y) * O.x - .5 * P.height; + const D = { + ...P + }; + if (D.x = P.x, D.y = P.y, $ && f ? (D.flipX = !0, D.flipY = !0, D.rotation = -y) : $ ? (D.flipX = !0, D.rotation = y) : f ? (D.flipY = !0, D.rotation = y) : D.rotation = -y, $ || f) { + const e = { + x: D.x + .5 * D.width, + y: D.y + .5 * D.height + }; + $ && (e.x = Math.abs(t.width - e.x), D.x = e.x - .5 * D.width), f && (e.y = Math.abs(t.height - e.y), D.y = e.y - .5 * D.height) + } + if (I || A) { + const e = I / (P.width + 2 * I), + t = A / (P.height + 2 * A); + D.backgroundCorners = [{ + x: e, + y: t + }, { + x: 1 - e, + y: t + }, { + x: 1 - e, + y: 1 - t + }, { + x: e, + y: 1 - t + }], P.x -= I, P.y -= A, P.width += 2 * I, P.height += 2 * A + } + const B = { + canvas: E, + rect: P, + shape: D + }; + "blob" !== a ? r({ + ...B, + blob: void 0 + }) : E.toBlob((e => r({ + ...B, + blob: e + }))) + })), Pw = async (e, t, o, i, r, n) => { + const { + retouches: a = [], + maxSize: s = t, + targetSize: l, + padding: c = 0, + mimeType: d, + foregroundColor: u, + maskFormat: h = "blob", + imageFormat: p = "blob", + forceSquareCanvas: m = !1, + didCreateDraft: g = (() => {}) + } = n || {}, $ = [...i], f = [...a], y = new AbortController, { + blob: b, + canvas: x, + rect: v, + shape: w + } = await Rw($, t, o, { + scope: "mask", + format: h, + padding: c, + maxSize: s, + targetSize: l, + forceSquareCanvas: m, + foregroundColor: u + }), S = ((e, t = {}) => ({ + id: e, + ...t, + selectionStyle: "hook", + disableStyle: ["backgroundColor", "cornerRadius", "opacity", "strokeWidth", "strokeColor"], + disableFlip: !0, + disableReorder: !0, + disableMove: !0, + disableRotate: !0, + disableDuplicate: !0, + disableSelect: !0 + }))(I(), { + ...w + }); + var k; + k = S, Object.assign(k, { + status: "loading", + cornerRadius: 15, + strokeWidth: 1.5, + strokeColor: [0, 0, 0, .25], + backgroundColor: [0, 0, 0, .1], + selectionOpacity: 0 + }), g(S, { + selection: $ + }); + let C = {}; + (d || l || "canvas" === p) && (C = { + imageWriter: {} + }, d && (C.imageWriter.mimeType = d), l && (C.imageWriter.targetSize = l), p && (C.imageWriter.format = p)); + const { + flipX: T, + flipY: M, + rotation: R + } = o, { + dest: P + } = await xw(e, { + imageFlipX: T, + imageFlipY: M, + imageRotation: R, + imageCrop: v, + imageManipulation: f, + imageCropLimitToImage: !1, + ...C + }); + let E; + try { + await r(P, b || x, { + shape: S, + controller: y + }), E = "ok" + } catch { + E = "error" + } + return (e => (Object.assign(e, { + selectionOpacity: 1, + cornerRadius: 0, + strokeWidth: 0, + strokeColor: [0, 0, 0, 0], + backgroundColor: [0, 0, 0, 0] + }), "error" !== e.status && delete e.status, e))({ + ...S, + status: E, + disableSelect: !1 + }) + }; +export { + Cw as appendDefaultEditor, Mw as appendDefaultEditors, pw as appendEditor, $w as appendEditors, Dm as appendNode, N as blobToFile, F as canvasToBlob, Dh as colorStringToColorArray, Kg as createDefaultColorOptions, n$ as createDefaultFontFamilyOptions, e$ as createDefaultFontScaleOptions, Jg as createDefaultFontSizeOptions, s$ as createDefaultFontStyleOptions, Sv as createDefaultFrameStyles, Rv as createDefaultImageOrienter, Cv as createDefaultImageReader, Pv as createDefaultImageScrambler, Tv as createDefaultImageWriter, r$ as createDefaultLineEndStyleOptions, pv as createDefaultLineEndStyles, Qg as createDefaultLineHeightOptions, t$ as createDefaultLineHeightScaleOptions, Mv as createDefaultMediaWriter, yw as createDefaultShapePreprocessor, i$ as createDefaultStrokeScaleOptions, o$ as createDefaultStrokeWidthOptions, a$ as createDefaultTextAlignOptions, Ev as createEditor, wv as createFrameStyleProcessor, hv as createLineEndProcessor, C$ as createMarkupEditorBackgroundColorControl, Ug as createMarkupEditorBrushSizeControl, k$ as createMarkupEditorColorControl, l$ as createMarkupEditorColorOptions, A$ as createMarkupEditorFontColorControl, w$ as createMarkupEditorFontFamilyControl, g$ as createMarkupEditorFontFamilyOptions, d$ as createMarkupEditorFontScaleOptions, O$ as createMarkupEditorFontSizeControl, c$ as createMarkupEditorFontSizeOptions, L$ as createMarkupEditorFontStyleControl, $$ as createMarkupEditorFontStyleOptions, I$ as createMarkupEditorLineEndStyleControl, f$ as createMarkupEditorLineEndStyleOptions, D$ as createMarkupEditorLineHeightControl, u$ as createMarkupEditorLineHeightOptions, h$ as createMarkupEditorLineHeightScaleOptions, E$ as createMarkupEditorLineStartStyleControl, R$ as createMarkupEditorOptionControl, v$ as createMarkupEditorOptionsControl, jg as createMarkupEditorSelectionModeControl, Ng as createMarkupEditorSelectionToolStyles, Hg as createMarkupEditorSelectionTools, zv as createMarkupEditorShapeStyleControls, T$ as createMarkupEditorStrokeColorControl, m$ as createMarkupEditorStrokeScaleOptions, M$ as createMarkupEditorStrokeWidthControl, p$ as createMarkupEditorStrokeWidthOptions, B$ as createMarkupEditorTextAlignControl, Zg as createMarkupEditorToolStyle, Lv as createMarkupEditorToolStyles, Av as createMarkupEditorToolbar, Lm as createNode, Pw as createRetouchShape, fw as createShapePreprocessor, ww as defineCustomElements, Sw as defineDefaultCustomElements, kl as degToRad, Mm as dispatchEditorEvents, hg as effectBrightness, yg as effectClarity, pg as effectContrast, gg as effectExposure, $g as effectGamma, mg as effectSaturation, bg as effectTemperature, fg as effectVignette, Hm as filterChrome, Gm as filterCold, jm as filterFade, Zm as filterInvert, Xm as filterMonoDefault, Ym as filterMonoNoir, Km as filterMonoStark, qm as filterMonoWash, Nm as filterPastel, Qm as filterSepiaBlues, tg as filterSepiaColor, Jm as filterSepiaDefault, eg as filterSepiaRust, Um as filterWarm, Wm as findNode, Tg as frameEdgeCross, Mg as frameEdgeOverlap, Cg as frameEdgeSeparate, Rg as frameHook, kg as frameLineMultiple, Sg as frameLineSingle, Pg as framePolaroid, wg as frameSolidRound, vg as frameSolidSharp, vw as getEditorDefaults, Iv as getEditorProps, Fv as getShapeById, I as getUniqueId, Gl as imageStateToCanvas, Om as insertNodeAfter, Fm as insertNodeBefore, ug as isSupported, cg as legacyDataToImageState, Qv as locale_en_gb, Dv as markup_editor_defaults, ew as markup_editor_locale_en_gb, Rm as naturalAspectRatioToNumber, kw as openDefaultEditor, mw as openEditor, Tw as overlayDefaultEditor, gw as overlayEditor, Nv as plugin_annotate, sw as plugin_annotate_locale_en_gb, Wv as plugin_crop, tw as plugin_crop_locale_en_gb, Hv as plugin_decorate, aw as plugin_decorate_locale_en_gb, Xv as plugin_fill, ow as plugin_fill_locale_en_gb, Vv as plugin_filter, Kv as plugin_filter_defaults, iw as plugin_filter_locale_en_gb, _v as plugin_finetune, qv as plugin_finetune_defaults, rw as plugin_finetune_locale_en_gb, Uv as plugin_frame, Jv as plugin_frame_defaults, cw as plugin_frame_locale_en_gb, Gv as plugin_redact, dw as plugin_redact_locale_en_gb, Zv as plugin_resize, nw as plugin_resize_locale_en_gb, Yv as plugin_retouch, uw as plugin_retouch_locale_en_gb, jv as plugin_sticker, lw as plugin_sticker_locale_en_gb, xw as processDefaultImage, Ss as processImage, Bm as removeNode, Rw as selectionToMask, Bv as setPlugins, vr as shapeGetCenter, xr as shapeGetLength, wr as shapeGetLevel, Mp as supportsWebGL, _m as updateNode, Ov as updateShapeById +}; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/annotate/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/annotate/de_DE.js new file mode 100644 index 0000000..8d20098 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/annotate/de_DE.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Anmerken', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/annotate/index.js b/src/components/@pqina/pintura/locale/de_DE/annotate/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/annotate/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/core/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/core/de_DE.js new file mode 100644 index 0000000..67f3c19 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/core/de_DE.js @@ -0,0 +1,235 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'Zurücksetzen', + labelDefault: 'Standard', + labelAuto: 'Autom.', + labelNone: 'Keine', + labelEdit: 'Bearbeiten', + labelClose: 'Schließen', + labelSupportError: (features) => + `${features.join(', ')} wird in diesem Browser nicht unterstützt`, + + // defaults + labelColor: 'Farbe', + labelWidth: 'Breite', + labelSize: 'Größe', + labelOffset: 'Versatz', + labelAmount: 'Betragen', + labelInset: 'Vertiefung', + labelRadius: 'Radius', + + // controls + labelColorPalette: 'Farbpalette', + + // sizes + labelSizeExtraSmall: 'Extraklein', + labelSizeSmall: 'Klein', + labelSizeMediumSmall: 'Mittelklein', + labelSizeMedium: 'Mittel', + labelSizeMediumLarge: 'Mittelgroß', + labelSizeLarge: 'Groß', + labelSizeExtraLarge: 'Extragroß', + + // unused? + labelButtonRevert: 'Rückgängig', + labelButtonCancel: 'Abbrechen', + labelButtonUndo: 'Zurücknehmen', + labelButtonRedo: 'Erneut durchführen', + labelButtonExport: 'Fertig', + + // zoom + labelZoomIn: 'Hineinzoomen', + labelZoomOut: 'Rauszoomen', + labelZoomFit: 'Zoom passen', + labelZoomActual: 'Tatsächlichen Größe', + iconZoomIn: '', + iconZoomOut: '', + + // icon + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Schließen', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Warten auf Bild'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'Mindestgröße ist {minWidth} × {minHeight}' + : 'Fehler beim Laden des Bilds'; + if (state.task === 'blob-to-bitmap') return 'Bild wird geladen…'; + return 'Vorschau wird erstellt…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Fehler beim Hochladen des Bilds'; + return 'Bild wird hochgeladen…'; + } + if (state.error) return 'Fehler bei Bildverarbeitung'; + return 'Bild wird verarbeitet…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'Bild wählen', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Autom. Breite', + shapeTitleButtonTextLayoutAutoHeight: 'Autom. Höhe', + shapeTitleButtonTextLayoutFixedSize: 'Fixierte Größe', + + shapeTitleButtonFlipHorizontal: 'Horizontal spiegeln', + shapeTitleButtonFlipVertical: 'Vertikal spiegeln', + shapeTitleButtonRemove: 'Entfernen', + shapeTitleButtonDuplicate: 'Duplizieren', + shapeTitleButtonMoveToFront: 'Nach vorne bewegen', + + shapeLabelInputText: 'Text bearbeiten', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: 'Abbrechen', + shapeLabelInputConfirm: 'Bestätigen', + + shapeLabelStrokeNone: 'Keine Kontur', + + shapeLabelFontStyleNormal: 'Normal', + shapeLabelFontStyleBold: 'Fett', + shapeLabelFontStyleItalic: 'Kursiv', + shapeLabelFontStyleItalicBold: 'Fett kursiv', + + shapeTitleBackgroundColor: 'Füllfarbe', + + shapeTitleCornerRadius: 'Eckenradius', + + shapeTitleFontFamily: 'Schriftart', + shapeTitleFontSize: 'Schriftgröße', + shapeTitleFontStyle: 'Schriftstil', + + shapeTitleLineHeight: 'Zeilenhöhe', + + shapeTitleLineStart: 'Start', + shapeTitleLineEnd: 'Ende', + shapeTitleStrokeWidth: 'Linienbreite', + shapeTitleStrokeColor: 'Linienfarbe', + + shapeTitleLineDecorationBar: 'Balken', + shapeTitleLineDecorationCircle: 'Kreis', + shapeTitleLineDecorationSquare: 'Quadrat', + shapeTitleLineDecorationArrow: 'Pfeil', + shapeTitleLineDecorationCircleSolid: 'Vollfarbe-Kreis', + shapeTitleLineDecorationSquareSolid: 'Vollfarbe-Quadrat', + shapeTitleLineDecorationArrowSolid: 'Vollfarbe-Pfeil', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Transparent', + shapeTitleColorWhite: 'Weiß', + shapeTitleColorSilver: 'Silber', + shapeTitleColorGray: 'Grau', + shapeTitleColorBlack: 'Schwarz', + shapeTitleColorNavy: 'Marineblau', + shapeTitleColorBlue: 'Blau', + shapeTitleColorAqua: 'Aquamarin', + shapeTitleColorTeal: 'Blaugrün', + shapeTitleColorOlive: 'Olive', + shapeTitleColorGreen: 'Grün', + shapeTitleColorYellow: 'Gelb', + shapeTitleColorOrange: 'Orange', + shapeTitleColorRed: 'Rot', + shapeTitleColorMaroon: 'Kastanienbraun', + shapeTitleColorFuchsia: 'Purpurrot', + shapeTitleColorPurple: 'Lila', + + shapeTitleTextOutline: 'Textumriss', + shapeTitleTextOutlineWidth: 'Breite', + shapeTitleTextShadow: 'Textschatten', + shapeTitleTextShadowBlur: 'Unschärfe', + + shapeTitleTextColor: 'Schriftfarbe', + shapeTitleTextAlign: 'Textausrichtung', + shapeTitleTextAlignLeft: 'Text links ausrichten', + shapeTitleTextAlignCenter: 'Text zentrieren', + shapeTitleTextAlignRight: 'Text rechts ausrichten', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Verschieben', + shapeLabelToolView: 'Sehen', + shapeLabelToolSharpie: 'Marker', + shapeLabelToolEraser: 'Radierer', + shapeLabelToolPath: 'Pfad', + shapeLabelToolRectangle: 'Rechteck', + shapeLabelToolEllipse: 'Ellipse', + shapeLabelToolArrow: 'Pfeil', + shapeLabelToolLine: 'Linie', + shapeLabelToolText: 'Text', + shapeLabelToolPreset: 'Sticker', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Auswahlmodus', + shapeTitleBrushSize: 'Pinselgröße', + + shapeLabelSelectionModeNew: 'Neu', + shapeLabelSelectionModeAdd: 'Hinzufügen', + shapeLabelSelectionModeSubtract: 'Entfernen', + + shapeLabelToolSelectionBrush: 'Pinsel', + shapeLabelToolSelectionLassoo: 'Lasso', + shapeLabelToolSelectionRectangle: 'Rechteckauswahl', + shapeLabelToolSelectionEllipse: 'Ellipsenauswahl', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/de_DE/core/index.js b/src/components/@pqina/pintura/locale/de_DE/core/index.js new file mode 100644 index 0000000..4009f5e --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './de_DE.js'; diff --git a/src/components/@pqina/pintura/locale/de_DE/crop/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/crop/de_DE.js new file mode 100644 index 0000000..d74f4c2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/crop/de_DE.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'Zuschneiden', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Neu zentrieren', + cropLabelButtonRotateLeft: 'Nach links drehen', + cropLabelButtonRotateRight: 'Nach rechts drehen', + cropLabelButtonFlipHorizontal: 'Horizontal spiegeln', + cropLabelButtonFlipVertical: 'Vertikal spiegeln', + + cropLabelSelectPreset: 'Form zuschneiden', + + cropLabelCropBoundary: 'Rand zuschneiden', + cropLabelCropBoundaryEdge: 'Bildkante', + cropLabelCropBoundaryNone: 'Keine', + + cropLabelTabRotation: 'Drehung', + cropLabelTabZoom: 'Skalieren', +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/crop/index.js b/src/components/@pqina/pintura/locale/de_DE/crop/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/crop/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/decorate/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/decorate/de_DE.js new file mode 100644 index 0000000..d35aa98 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/decorate/de_DE.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Verzieren', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/decorate/index.js b/src/components/@pqina/pintura/locale/de_DE/decorate/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/decorate/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/fill/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/fill/de_DE.js new file mode 100644 index 0000000..8195fd2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/fill/de_DE.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Füllen', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/fill/index.js b/src/components/@pqina/pintura/locale/de_DE/fill/index.js new file mode 100644 index 0000000..f20add4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/fill/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; diff --git a/src/components/@pqina/pintura/locale/de_DE/filter/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/filter/de_DE.js new file mode 100644 index 0000000..d44314b --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/filter/de_DE.js @@ -0,0 +1,19 @@ +export default { + filterLabel: 'Filter', + filterIcon: + '', + + filterLabelChrome: 'Chrom', + filterLabelFade: 'Verblassen', + filterLabelCold: 'Kalt', + filterLabelWarm: 'Warm', + filterLabelPastel: 'Pastell', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Verwaschen', + filterLabelMonoStark: 'Hart', + filterLabelSepiaDefault: 'Sepia', + filterLabelSepiaBlues: 'Blues', + filterLabelSepiaRust: 'Rost', + filterLabelSepiaColor: 'Farbe', +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/filter/index.js b/src/components/@pqina/pintura/locale/de_DE/filter/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/filter/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/finetune/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/finetune/de_DE.js new file mode 100644 index 0000000..4bd6e01 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/finetune/de_DE.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Feinabstimmung', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Helligkeit', + finetuneLabelContrast: 'Kontrast', + finetuneLabelSaturation: 'Sättigung', + finetuneLabelExposure: 'Belichtung', + finetuneLabelTemperature: 'Temperatur', + finetuneLabelGamma: 'Gamma', + finetuneLabelClarity: 'Schärfe', + finetuneLabelVignette: 'Vignette', +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/finetune/index.js b/src/components/@pqina/pintura/locale/de_DE/finetune/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/finetune/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/frame/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/frame/de_DE.js new file mode 100644 index 0000000..3ac645a --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/frame/de_DE.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Rahmen', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Matt', + frameLabelMatRound: 'Abgeschrägt', + frameLabelLineSingle: 'Linie', + frameLabelLineMultiple: 'Zebra', + frameLabelEdgeSeparate: 'Vertiefung', + frameLabelEdgeOverlap: 'Plus', + frameLabelEdgeCross: 'Holz', + frameLabelCornerHooks: 'Haken', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/frame/index.js b/src/components/@pqina/pintura/locale/de_DE/frame/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/frame/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/index.d.ts b/src/components/@pqina/pintura/locale/de_DE/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/de_DE/index.js b/src/components/@pqina/pintura/locale/de_DE/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/redact/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/redact/de_DE.js new file mode 100644 index 0000000..089706b --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/redact/de_DE.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'Redigieren', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/redact/index.js b/src/components/@pqina/pintura/locale/de_DE/redact/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/redact/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/resize/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/resize/de_DE.js new file mode 100644 index 0000000..5807a1a --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/resize/de_DE.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Skalieren', + resizeIcon: + '', + + resizeLabelFormCaption: 'Bildausgabe-Größe', + + resizeLabelInputWidth: 'b', + resizeTitleInputWidth: 'Breite', + resizeLabelInputHeight: 'h', + resizeTitleInputHeight: 'Höhe', + + resizeTitleButtonMaintainAspectRatio: 'Seitenverhältnis bewahren', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/resize/index.js b/src/components/@pqina/pintura/locale/de_DE/resize/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/resize/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/retouch/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/retouch/de_DE.js new file mode 100644 index 0000000..e7975e8 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/retouch/de_DE.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'Retuschieren', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/retouch/index.js b/src/components/@pqina/pintura/locale/de_DE/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/de_DE/sticker/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/sticker/de_DE.js new file mode 100644 index 0000000..8e41e17 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/sticker/de_DE.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Sticker', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/sticker/index.js b/src/components/@pqina/pintura/locale/de_DE/sticker/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/sticker/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/de_DE/trim/de_DE.js b/src/components/@pqina/pintura/locale/de_DE/trim/de_DE.js new file mode 100644 index 0000000..a6670ad --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/trim/de_DE.js @@ -0,0 +1,60 @@ +export default { + trimLabel: 'Schneiden', + trimIcon: ``, + + trimLabelPlay: 'Abspielen', + trimLabelPause: 'Pausieren', + + trimLabelMute: 'Stummschalten', + trimLabelUnmute: 'Stummschaltung aufheben', + + trimLabelSplit: 'Split', + trimLabelMerge: 'Zusammenführen', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Warten auf Medium'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'Mindestgröße ist {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'Sekunde' : 'Sekunden'; + return `Die Mindestvideodauer beträgt {minDuration} ${unit}`; + } else { + return 'Fehler beim Laden des Medium'; + } + } + if (state.task === 'blob-to-bitmap') return 'Medium wird geladen…'; + return 'Vorschau wird erstellt…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Fehler beim Hochladen des Medium'; + return 'Medium wird hochgeladen…'; + } + if (state.error) return 'Fehler bei Medienverarbeitung'; + return 'Medium wird verarbeitet…'; + }, + + cropLabelCropBoundaryEdge: 'Rand der Medium', +}; diff --git a/src/components/@pqina/pintura/locale/de_DE/trim/index.js b/src/components/@pqina/pintura/locale/de_DE/trim/index.js new file mode 100644 index 0000000..4c52683 --- /dev/null +++ b/src/components/@pqina/pintura/locale/de_DE/trim/index.js @@ -0,0 +1 @@ +export { default } from './de_DE.js'; \ No newline at end of file diff --git a/src/components/@pqina/pintura/locale/en_GB/annotate/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/annotate/en_GB.js new file mode 100644 index 0000000..e3e9493 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/annotate/en_GB.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Annotate', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/annotate/index.js b/src/components/@pqina/pintura/locale/en_GB/annotate/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/annotate/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/core/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/core/en_GB.js new file mode 100644 index 0000000..bce4293 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/core/en_GB.js @@ -0,0 +1,235 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'Reset', + labelDefault: 'Default', + labelAuto: 'Auto', + labelNone: 'None', + labelEdit: 'Edit', + labelClose: 'Close', + labelSupportError: (features) => `${features.join(', ')} not supported on this browser`, + + // defaults + labelColor: 'Color', + labelWidth: 'Width', + labelSize: 'Size', + labelOffset: 'Offset', + labelAmount: 'Amount', + labelInset: 'Inset', + labelRadius: 'Radius', + + // controls + labelColorPalette: 'Color palette', + + // sizes + labelSizeExtraSmall: 'Extra small', + labelSizeSmall: 'Small', + labelSizeMediumSmall: 'Medium small', + labelSizeMedium: 'Medium', + labelSizeMediumLarge: 'Medium large', + labelSizeLarge: 'Large', + labelSizeExtraLarge: 'Extra large', + + // default buttons + + labelButtonCancel: 'Cancel', + labelButtonUndo: 'Undo', + labelButtonRedo: 'Redo', + labelButtonRevert: 'Revert', + labelButtonExport: 'Done', + + // zoom + labelZoomIn: 'Zoom in', + labelZoomOut: 'Zoom out', + labelZoomFit: 'Fit to view', + labelZoomActual: 'Actual size', + iconZoomIn: '', + iconZoomOut: '', + + // icons + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Close', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Waiting for image'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'Minimum image size is {minWidth} × {minHeight}' + : 'Error loading image'; + if (state.task === 'blob-to-bitmap') return 'Preparing image…'; + return 'Loading image…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Error uploading image'; + return 'Uploading image…'; + } + if (state.error) return 'Error processing image'; + return 'Processing image…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'Select image', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Auto width', + shapeTitleButtonTextLayoutAutoHeight: 'Auto height', + shapeTitleButtonTextLayoutFixedSize: 'Fixed size', + + shapeTitleButtonFlipHorizontal: 'Flip Horizontal', + shapeTitleButtonFlipVertical: 'Flip Vertical', + shapeTitleButtonRemove: 'Remove', + shapeTitleButtonDuplicate: 'Duplicate', + shapeTitleButtonMoveToFront: 'Move to front', + + shapeLabelInputText: 'Edit text', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: 'Cancel', + shapeLabelInputConfirm: 'Confirm', + + shapeLabelStrokeNone: 'No outline', + + shapeLabelFontStyleNormal: 'Normal', + shapeLabelFontStyleBold: 'Bold', + shapeLabelFontStyleItalic: 'Italic', + shapeLabelFontStyleItalicBold: 'Bold Italic', + + shapeTitleBackgroundColor: 'Fill color', + + shapeTitleCornerRadius: 'Corner radius', + + shapeTitleFontFamily: 'Font', + shapeTitleFontSize: 'Font size', + shapeTitleFontStyle: 'Font style', + shapeTitleLineHeight: 'Line height', + + shapeTitleLineStart: 'Start', + shapeTitleLineEnd: 'End', + shapeTitleStrokeWidth: 'Line width', + shapeTitleStrokeColor: 'Line color', + + shapeTitleLineDecorationBar: 'Bar', + shapeTitleLineDecorationCircle: 'Circle', + shapeTitleLineDecorationSquare: 'Square', + shapeTitleLineDecorationArrow: 'Arrow', + shapeTitleLineDecorationCircleSolid: 'Circle solid', + shapeTitleLineDecorationSquareSolid: 'Square solid', + shapeTitleLineDecorationArrowSolid: 'Arrow solid', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Transparent', + shapeTitleColorWhite: 'White', + shapeTitleColorSilver: 'Silver', + shapeTitleColorGray: 'Gray', + shapeTitleColorBlack: 'Black', + shapeTitleColorNavy: 'Navy', + shapeTitleColorBlue: 'Blue', + shapeTitleColorAqua: 'Aqua', + shapeTitleColorTeal: 'Teal', + shapeTitleColorOlive: 'Olive', + shapeTitleColorGreen: 'Green', + shapeTitleColorYellow: 'Yellow', + shapeTitleColorOrange: 'Orange', + shapeTitleColorRed: 'Red', + shapeTitleColorMaroon: 'Maroon', + shapeTitleColorFuchsia: 'Fuchsia', + shapeTitleColorPurple: 'Purple', + + shapeTitleTextOutline: 'Text outline', + shapeTitleTextOutlineWidth: 'Width', + + shapeTitleTextShadow: 'Text shadow', + shapeTitleTextShadowBlur: 'Blur', + + shapeTitleTextColor: 'Font color', + shapeTitleTextAlign: 'Text align', + shapeTitleTextAlignLeft: 'Left align text', + shapeTitleTextAlignCenter: 'Center align text', + shapeTitleTextAlignRight: 'Right align text', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Move', + shapeLabelToolView: 'View', + shapeLabelToolSharpie: 'Sharpie', + shapeLabelToolEraser: 'Eraser', + shapeLabelToolPath: 'Path', + shapeLabelToolRectangle: 'Rectangle', + shapeLabelToolEllipse: 'Ellipse', + shapeLabelToolArrow: 'Arrow', + shapeLabelToolLine: 'Line', + shapeLabelToolText: 'Text', + shapeLabelToolPreset: 'Stickers', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Selection mode', + shapeTitleBrushSize: 'Brush size', + + shapeLabelSelectionModeNew: 'New', + shapeLabelSelectionModeAdd: 'Add', + shapeLabelSelectionModeSubtract: 'Remove', + + shapeLabelToolSelectionBrush: 'Brush', + shapeLabelToolSelectionLassoo: 'Lassoo', + shapeLabelToolSelectionRectangle: 'Rectangle marquee', + shapeLabelToolSelectionEllipse: 'Ellipse marquee', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/en_GB/core/index.js b/src/components/@pqina/pintura/locale/en_GB/core/index.js new file mode 100644 index 0000000..8e466e6 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/crop/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/crop/en_GB.js new file mode 100644 index 0000000..f1ff19b --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/crop/en_GB.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'Crop', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Recenter', + cropLabelButtonRotateLeft: 'Rotate left', + cropLabelButtonRotateRight: 'Rotate right', + cropLabelButtonFlipHorizontal: 'Flip horizontal', + cropLabelButtonFlipVertical: 'Flip vertical', + + cropLabelSelectPreset: 'Crop shape', + + cropLabelCropBoundary: 'Crop boundary', + cropLabelCropBoundaryEdge: 'Edge of image', + cropLabelCropBoundaryNone: 'None', + + cropLabelTabRotation: 'Rotation', + cropLabelTabZoom: 'Scale', +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/crop/index.js b/src/components/@pqina/pintura/locale/en_GB/crop/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/crop/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/decorate/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/decorate/en_GB.js new file mode 100644 index 0000000..508197c --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/decorate/en_GB.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Decorate', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/decorate/index.js b/src/components/@pqina/pintura/locale/en_GB/decorate/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/decorate/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/fill/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/fill/en_GB.js new file mode 100644 index 0000000..1f3c5a4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/fill/en_GB.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Fill', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/fill/index.js b/src/components/@pqina/pintura/locale/en_GB/fill/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/fill/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/filter/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/filter/en_GB.js new file mode 100644 index 0000000..0c0a66f --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/filter/en_GB.js @@ -0,0 +1,18 @@ +export default { + filterLabel: 'Filter', + filterIcon: + '', + filterLabelChrome: 'Chrome', + filterLabelFade: 'Fade', + filterLabelCold: 'Cold', + filterLabelWarm: 'Warm', + filterLabelPastel: 'Pastel', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Wash', + filterLabelMonoStark: 'Stark', + filterLabelSepiaDefault: 'Sepia', + filterLabelSepiaBlues: 'Blues', + filterLabelSepiaRust: 'Rust', + filterLabelSepiaColor: 'Color', +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/filter/index.js b/src/components/@pqina/pintura/locale/en_GB/filter/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/filter/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/finetune/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/finetune/en_GB.js new file mode 100644 index 0000000..f012ff7 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/finetune/en_GB.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Finetune', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Brightness', + finetuneLabelContrast: 'Contrast', + finetuneLabelSaturation: 'Saturation', + finetuneLabelExposure: 'Exposure', + finetuneLabelTemperature: 'Temperature', + finetuneLabelGamma: 'Gamma', + finetuneLabelClarity: 'Clarity', + finetuneLabelVignette: 'Vignette', +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/finetune/index.js b/src/components/@pqina/pintura/locale/en_GB/finetune/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/finetune/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/frame/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/frame/en_GB.js new file mode 100644 index 0000000..3f00587 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/frame/en_GB.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Frame', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Mat', + frameLabelMatRound: 'Bevel', + frameLabelLineSingle: 'Line', + frameLabelLineMultiple: 'Zebra', + frameLabelEdgeSeparate: 'Inset', + frameLabelEdgeOverlap: 'Plus', + frameLabelEdgeCross: 'Lumber', + frameLabelCornerHooks: 'Hook', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/frame/index.js b/src/components/@pqina/pintura/locale/en_GB/frame/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/frame/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/index.d.ts b/src/components/@pqina/pintura/locale/en_GB/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/en_GB/index.js b/src/components/@pqina/pintura/locale/en_GB/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/redact/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/redact/en_GB.js new file mode 100644 index 0000000..affc557 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/redact/en_GB.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'Redact', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/redact/index.js b/src/components/@pqina/pintura/locale/en_GB/redact/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/redact/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/resize/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/resize/en_GB.js new file mode 100644 index 0000000..2de862b --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/resize/en_GB.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Resize', + resizeIcon: + '', + + resizeLabelFormCaption: 'Image output size', + + resizeLabelInputWidth: 'w', + resizeTitleInputWidth: 'Width', + resizeLabelInputHeight: 'h', + resizeTitleInputHeight: 'Height', + + resizeTitleButtonMaintainAspectRatio: 'Maintain aspectratio', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/resize/index.js b/src/components/@pqina/pintura/locale/en_GB/resize/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/resize/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/retouch/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/retouch/en_GB.js new file mode 100644 index 0000000..712fe13 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/retouch/en_GB.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'Retouch', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/retouch/index.js b/src/components/@pqina/pintura/locale/en_GB/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/sticker/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/sticker/en_GB.js new file mode 100644 index 0000000..8e41e17 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/sticker/en_GB.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Sticker', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/sticker/index.js b/src/components/@pqina/pintura/locale/en_GB/sticker/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/sticker/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/en_GB/trim/en_GB.js b/src/components/@pqina/pintura/locale/en_GB/trim/en_GB.js new file mode 100644 index 0000000..8b2d0b3 --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/trim/en_GB.js @@ -0,0 +1,60 @@ +export default { + trimLabel: 'Trim', + trimIcon: ``, + + trimLabelPlay: 'Play', + trimLabelPause: 'Pause', + + trimLabelMute: 'Mute', + trimLabelUnmute: 'Unmute', + + trimLabelSplit: 'Split', + trimLabelMerge: 'Merge', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Waiting for media'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'Minimum media size is {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'second' : 'seconds'; + return `Minimum video duration is {minDuration} ${unit}`; + } else { + return 'Error loading media'; + } + } + if (state.task === 'blob-to-bitmap') return 'Preparing media…'; + return 'Loading media…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Error uploading media'; + return 'Uploading media…'; + } + if (state.error) return 'Error processing media'; + return 'Processing media…'; + }, + + cropLabelCropBoundaryEdge: 'Edge of media', +}; diff --git a/src/components/@pqina/pintura/locale/en_GB/trim/index.js b/src/components/@pqina/pintura/locale/en_GB/trim/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/en_GB/trim/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/annotate/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/annotate/es_ES.js new file mode 100644 index 0000000..d848b4b --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/annotate/es_ES.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Añadir nota', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/annotate/index.js b/src/components/@pqina/pintura/locale/es_ES/annotate/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/annotate/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/core/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/core/es_ES.js new file mode 100644 index 0000000..53e990d --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/core/es_ES.js @@ -0,0 +1,231 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'Restaurar', + labelDefault: 'Predeterminado', + labelAuto: 'Automático', + labelNone: 'Ninguno', + labelEdit: 'Editar', + labelClose: 'Cerrar', + labelSupportError: (features) => `Este navegador no soporta ${features.join(', ')}`, + + // defaults + labelColor: 'Color', + labelWidth: 'Ancho', + labelSize: 'Tamaño', + labelOffset: 'Desplazamiento', + labelAmount: 'Monto', + labelInset: 'Insertar', + labelRadius: 'Radio', + + // controls + labelColorPalette: 'Paleta de color', + + // sizes + labelSizeExtraSmall: 'Extra pequeña', + labelSizeSmall: 'Pequeña', + labelSizeMediumSmall: 'Mediana pequeña', + labelSizeMedium: 'Mediano', + labelSizeMediumLarge: 'Mediano grande', + labelSizeLarge: 'Grande', + labelSizeExtraLarge: 'Extra grande', + + // unused? + labelButtonRevert: 'Revertir', + labelButtonCancel: 'Cancelar', + labelButtonUndo: 'Deshacer', + labelButtonRedo: 'Rehacer', + labelButtonExport: 'Finalizado', + + // zoom + labelZoomIn: 'Dar un golpe de zoom', + labelZoomOut: 'Disminuir el zoom', + labelZoomFit: 'Zoom para ajustar', + labelZoomActual: 'Tamaño real', + iconZoomIn: '', + iconZoomOut: '', + + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Cerrar', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Esperando imagen'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'Tamaño mínmo de {minWidth} × {minHeight}' + : 'Error de carga de la imagen'; + if (state.task === 'blob-to-bitmap') return 'Preparando imagen…'; + return 'Cargando imagen…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Error de subida de imagen'; + return 'Subiendo imagen…'; + } + if (state.error) return 'Error de proceso de imagen'; + return 'Procesando imagen…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'Seleccionar imagen', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Ancho automático', + shapeTitleButtonTextLayoutAutoHeight: 'Alto automático', + shapeTitleButtonTextLayoutFixedSize: 'Tamaño fijo', + + shapeTitleButtonFlipHorizontal: 'Posición horizontal', + shapeTitleButtonFlipVertical: 'Posición vertical', + shapeTitleButtonRemove: 'Eliminar', + shapeTitleButtonDuplicate: 'Duplicar', + shapeTitleButtonMoveToFront: 'Enviar al fondo', + + shapeLabelInputText: 'Editar texto', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: 'Cancelar', + shapeLabelInputConfirm: 'Confirmar', + + shapeLabelStrokeNone: 'Sin contorno', + + shapeLabelFontStyleNormal: 'Normal', + shapeLabelFontStyleBold: 'Negrita', + shapeLabelFontStyleItalic: 'Itálica', + shapeLabelFontStyleItalicBold: 'Negrita itálica', + + shapeTitleBackgroundColor: 'Color de relleno', + shapeTitleCornerRadius: 'Radio de esquina', + + shapeTitleFontFamily: 'Fuente', + shapeTitleFontSize: 'Tamaño de fuente', + shapeTitleFontStyle: 'Estilo de fuente', + shapeTitleLineHeight: 'Linipaŝo', + + shapeTitleLineStart: 'Comienzo', + shapeTitleLineEnd: 'Fin', + shapeTitleStrokeWidth: 'Ancho de línea', + shapeTitleStrokeColor: 'Color de línea', + + shapeTitleLineDecorationBar: 'Barra', + shapeTitleLineDecorationCircle: 'Círculo', + shapeTitleLineDecorationSquare: 'Cuadrado', + shapeTitleLineDecorationArrow: 'Flecha', + shapeTitleLineDecorationCircleSolid: 'Círculo sólido', + shapeTitleLineDecorationSquareSolid: 'Cuadrado sólido', + shapeTitleLineDecorationArrowSolid: 'Flecha sólida', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Transparente', + shapeTitleColorWhite: 'Blanco', + shapeTitleColorSilver: 'Plateado', + shapeTitleColorGray: 'Gris', + shapeTitleColorBlack: 'Negro', + shapeTitleColorNavy: 'Azul marino', + shapeTitleColorBlue: 'Azul', + shapeTitleColorAqua: 'Cian vívido', + shapeTitleColorTeal: 'Verde petróleo', + shapeTitleColorOlive: 'Oliva', + shapeTitleColorGreen: 'Verde', + shapeTitleColorYellow: 'Amarillo', + shapeTitleColorOrange: 'Naranja', + shapeTitleColorRed: 'Rojo', + shapeTitleColorMaroon: 'Marrón', + shapeTitleColorFuchsia: 'Fucsia', + shapeTitleColorPurple: 'Violeta', + + shapeTitleTextOutline: 'Contorno del texto', + shapeTitleTextOutlineWidth: 'Anchura', + shapeTitleTextShadow: 'Sombra del texto', + shapeTitleTextShadowBlur: 'Desenfoque', + + shapeTitleTextColor: 'Color de fuente', + shapeTitleTextAlign: 'Alinear texto', + shapeTitleTextAlignLeft: 'Alinear texto a la izquierda', + shapeTitleTextAlignCenter: 'Alinear texto al centro', + shapeTitleTextAlignRight: 'Alinear texto a la derecha', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Mover', + shapeLabelToolView: 'Mirar', + shapeLabelToolSharpie: 'Puntero', + shapeLabelToolEraser: 'Borrador', + shapeLabelToolPath: 'Camino', + shapeLabelToolRectangle: 'Rectángulo', + shapeLabelToolEllipse: 'Elipse', + shapeLabelToolArrow: 'Flecha', + shapeLabelToolLine: 'Línea', + shapeLabelToolText: 'Texto', + shapeLabelToolPreset: 'Sticker', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Modo de selección', + shapeTitleBrushSize: 'Tamaño del pincel', + + shapeLabelSelectionModeNew: 'Nuevo', + shapeLabelSelectionModeAdd: 'Añadir', + shapeLabelSelectionModeSubtract: 'Eliminar', + + shapeLabelToolSelectionBrush: 'Pincel', + shapeLabelToolSelectionLassoo: 'Lazo', + shapeLabelToolSelectionRectangle: 'Selección rectangular', + shapeLabelToolSelectionEllipse: 'Selección elíptica', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/es_ES/core/index.js b/src/components/@pqina/pintura/locale/es_ES/core/index.js new file mode 100644 index 0000000..24b9696 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/crop/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/crop/es_ES.js new file mode 100644 index 0000000..0b1a3d2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/crop/es_ES.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'Recortar', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Recentrar', + cropLabelButtonRotateLeft: 'Rotar a la izquierda', + cropLabelButtonRotateRight: 'Rotar a la derecha', + cropLabelButtonFlipHorizontal: 'Posición horizontal', + cropLabelButtonFlipVertical: 'Posición vertical', + + cropLabelSelectPreset: 'Recortar forma', + + cropLabelCropBoundary: 'Límite de recorte', + cropLabelCropBoundaryEdge: 'Borde de imagen', + cropLabelCropBoundaryNone: 'Ninguno', + + cropLabelTabRotation: 'Rotación', + cropLabelTabZoom: 'Escalar', +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/crop/index.js b/src/components/@pqina/pintura/locale/es_ES/crop/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/crop/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/decorate/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/decorate/es_ES.js new file mode 100644 index 0000000..9fa960f --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/decorate/es_ES.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Decorar', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/decorate/index.js b/src/components/@pqina/pintura/locale/es_ES/decorate/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/decorate/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/fill/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/fill/es_ES.js new file mode 100644 index 0000000..ad0564e --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/fill/es_ES.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Rellenar', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/fill/index.js b/src/components/@pqina/pintura/locale/es_ES/fill/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/fill/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/filter/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/filter/es_ES.js new file mode 100644 index 0000000..0ab620b --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/filter/es_ES.js @@ -0,0 +1,18 @@ +export default { + filterLabel: 'Filtro', + filterIcon: + '', + filterLabelChrome: 'Cromado', + filterLabelFade: 'Atenuar', + filterLabelCold: 'Frío', + filterLabelWarm: 'Cálido', + filterLabelPastel: 'Pastel', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Negro', + filterLabelMonoWash: 'Lavado', + filterLabelMonoStark: 'Dorado', + filterLabelSepiaDefault: 'Sepia', + filterLabelSepiaBlues: 'Azules', + filterLabelSepiaRust: 'Óxido', + filterLabelSepiaColor: 'Color', +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/filter/index.js b/src/components/@pqina/pintura/locale/es_ES/filter/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/filter/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/finetune/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/finetune/es_ES.js new file mode 100644 index 0000000..d5c9696 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/finetune/es_ES.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Ajuste fino', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Brillo', + finetuneLabelContrast: 'Contraste', + finetuneLabelSaturation: 'Saturación', + finetuneLabelExposure: 'Exposición', + finetuneLabelTemperature: 'Temperatura', + finetuneLabelGamma: 'Gama', + finetuneLabelClarity: 'Nitidez', + finetuneLabelVignette: 'Viñeta', +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/finetune/index.js b/src/components/@pqina/pintura/locale/es_ES/finetune/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/finetune/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/frame/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/frame/es_ES.js new file mode 100644 index 0000000..f7c5c6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/frame/es_ES.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Marco', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Mate', + frameLabelMatRound: 'Biselado', + frameLabelLineSingle: 'Línea', + frameLabelLineMultiple: 'Cebra', + frameLabelEdgeSeparate: 'Insertar', + frameLabelEdgeOverlap: 'Más', + frameLabelEdgeCross: 'Madera', + frameLabelCornerHooks: 'Gancho', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/frame/index.js b/src/components/@pqina/pintura/locale/es_ES/frame/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/frame/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/index.d.ts b/src/components/@pqina/pintura/locale/es_ES/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/es_ES/index.js b/src/components/@pqina/pintura/locale/es_ES/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/redact/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/redact/es_ES.js new file mode 100644 index 0000000..34628bc --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/redact/es_ES.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'Redactar', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/redact/index.js b/src/components/@pqina/pintura/locale/es_ES/redact/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/redact/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/resize/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/resize/es_ES.js new file mode 100644 index 0000000..7b65cb9 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/resize/es_ES.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Redimensionar', + resizeIcon: + '', + + resizeLabelFormCaption: 'Tamaño de imagen de salida', + + resizeLabelInputWidth: 'a', + resizeTitleInputWidth: 'Ancho', + resizeLabelInputHeight: 'h', + resizeTitleInputHeight: 'Alto', + + resizeTitleButtonMaintainAspectRatio: 'Mantener relacion de aspecto', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/resize/index.js b/src/components/@pqina/pintura/locale/es_ES/resize/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/resize/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/retouch/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/retouch/es_ES.js new file mode 100644 index 0000000..0067734 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/retouch/es_ES.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'Retocar', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/retouch/index.js b/src/components/@pqina/pintura/locale/es_ES/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/sticker/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/sticker/es_ES.js new file mode 100644 index 0000000..8e41e17 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/sticker/es_ES.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Sticker', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/sticker/index.js b/src/components/@pqina/pintura/locale/es_ES/sticker/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/sticker/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/es_ES/trim/es_ES.js b/src/components/@pqina/pintura/locale/es_ES/trim/es_ES.js new file mode 100644 index 0000000..eb691c8 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/trim/es_ES.js @@ -0,0 +1,65 @@ +export default { + trimLabel: 'Recortar', + trimIcon: ``, + + trimLabelPlay: 'Reproduce', + trimLabelPause: 'Pausar', + + trimLabelMute: 'Silenciar', + trimLabelUnmute: 'Activar', + + trimLabelSplit: 'Dividir', + trimLabelMerge: 'Fusionar', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Esperando media'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'Tamaño mínmo de {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'segundo' : 'segundos'; + return `La duración mínima del video es de {minDuration} ${unit}`; + } else { + return 'Error al cargar media'; + } + } + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'Tamaño mínmo de {minWidth} × {minHeight}' + : 'Error al cargar media'; + if (state.task === 'blob-to-bitmap') return 'Preparando media…'; + return 'Cargando media…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Error de subida media'; + return 'Subiendo media…'; + } + if (state.error) return 'Error de proceso media'; + return 'Procesando media…'; + }, + + cropLabelCropBoundaryEdge: 'Borde de media', +}; diff --git a/src/components/@pqina/pintura/locale/es_ES/trim/index.js b/src/components/@pqina/pintura/locale/es_ES/trim/index.js new file mode 100644 index 0000000..647bdb2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/es_ES/trim/index.js @@ -0,0 +1 @@ +export { default } from './es_ES.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/annotate/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/annotate/fr_FR.js new file mode 100644 index 0000000..4a50e68 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/annotate/fr_FR.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Annoter', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/annotate/index.js b/src/components/@pqina/pintura/locale/fr_FR/annotate/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/annotate/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/core/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/core/fr_FR.js new file mode 100644 index 0000000..11b32d7 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/core/fr_FR.js @@ -0,0 +1,232 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'Réinitialiser', + labelDefault: 'Par défaut', + labelAuto: 'Auto', + labelNone: 'Aucun', + labelEdit: 'Modifier', + labelClose: 'Fermer', + labelSupportError: (features) => `${features.join(', ')} non pris en charge dans ce navigateur`, + + // defaults + labelColor: 'Couleur', + labelWidth: 'Largeur', + labelSize: 'Taille', + labelOffset: 'Décalage', + labelAmount: 'Quantité', + labelInset: 'Encart', + labelRadius: 'Radius', + + // controls + labelColorPalette: 'Palette de couleurs', + + // sizes + labelSizeExtraSmall: 'Extra petit', + labelSizeSmall: 'Petit', + labelSizeMediumSmall: 'Moyen petit', + labelSizeMedium: 'Moyen', + labelSizeMediumLarge: 'Moyen grand', + labelSizeLarge: 'Grand', + labelSizeExtraLarge: 'Extra grand', + + // unused? + labelButtonRevert: 'Rétablir', + labelButtonCancel: 'Annuler', + labelButtonUndo: 'Annuler', + labelButtonRedo: 'Refaire', + labelButtonExport: 'Terminé', + + // zoom + labelZoomIn: 'Zoomer', + labelZoomOut: 'Dézoomer', + labelZoomFit: 'taille adaptée', + labelZoomActual: 'Grandeur réelle', + iconZoomIn: '', + iconZoomOut: '', + + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Fermer', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return `Attente de l'image`; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'La taille minimale est de {minWidth} × {minHeight}' + : `Erreur de chargement de l'image`; + if (state.task === 'blob-to-bitmap') return `Préparer l'image…`; + return `Chargement de l'image…`; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return `Erreur de transfert de l'image`; + return `Transfert de l'image…`; + } + if (state.error) return `Erreur de traitement de l'image`; + return `Traitement de l'image…`; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: `Sélection de l'image`, + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Largeur auto', + shapeTitleButtonTextLayoutAutoHeight: 'Hauteur auto', + shapeTitleButtonTextLayoutFixedSize: 'Taille fixe', + + shapeTitleButtonFlipHorizontal: 'Retournement horizontal', + shapeTitleButtonFlipVertical: 'Retournement vertical', + shapeTitleButtonRemove: 'Supprimer', + shapeTitleButtonDuplicate: 'Dupliquer', + shapeTitleButtonMoveToFront: `Déplacer vers l'avant`, + + shapeLabelInputText: 'Modifier le texte', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: 'Annuler', + shapeLabelInputConfirm: 'Confirmer', + + shapeLabelStrokeNone: 'Aucun contour', + + shapeLabelFontStyleNormal: 'Normal', + shapeLabelFontStyleBold: 'Gras', + shapeLabelFontStyleItalic: 'Italique', + shapeLabelFontStyleItalicBold: 'Italique gras', + + shapeTitleBackgroundColor: 'Couleur de remplissage', + + shapeTitleCornerRadius: `Rayon d'angle`, + + shapeTitleFontFamily: 'Police', + shapeTitleFontSize: 'Taille de police', + shapeTitleFontStyle: 'Style de police', + shapeTitleLineHeight: 'Interlignage', + + shapeTitleLineStart: 'Début', + shapeTitleLineEnd: 'Fin', + shapeTitleStrokeWidth: 'Épaisseur de trait', + shapeTitleStrokeColor: 'Couleur de trait', + + shapeTitleLineDecorationBar: 'Barre', + shapeTitleLineDecorationCircle: 'Cercle', + shapeTitleLineDecorationSquare: 'Carré', + shapeTitleLineDecorationArrow: 'Flèche', + shapeTitleLineDecorationCircleSolid: 'Disque', + shapeTitleLineDecorationSquareSolid: 'Carré plein', + shapeTitleLineDecorationArrowSolid: 'Flèche pleine', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Transparent', + shapeTitleColorWhite: 'Blanc', + shapeTitleColorSilver: 'Argent', + shapeTitleColorGray: 'Gris', + shapeTitleColorBlack: 'Noir', + shapeTitleColorNavy: 'Marine', + shapeTitleColorBlue: 'Bleu', + shapeTitleColorAqua: 'Eau', + shapeTitleColorTeal: 'Sarcelle', + shapeTitleColorOlive: 'Olive', + shapeTitleColorGreen: 'Vert', + shapeTitleColorYellow: 'Jaune', + shapeTitleColorOrange: 'Orange', + shapeTitleColorRed: 'Rouge', + shapeTitleColorMaroon: 'Maroon', + shapeTitleColorFuchsia: 'Fuchsia', + shapeTitleColorPurple: 'Violet', + + shapeTitleTextOutline: 'Contour du texte', + shapeTitleTextOutlineWidth: 'Largeur', + shapeTitleTextShadow: 'Ombre du texte', + shapeTitleTextShadowBlur: 'Flou', + + shapeTitleTextColor: 'Couleur de police', + shapeTitleTextAlign: 'Alignement du texte', + shapeTitleTextAlignLeft: 'Alignement gauche du texte', + shapeTitleTextAlignCenter: 'Alignement central du texte', + shapeTitleTextAlignRight: 'Alignement droite du texte', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Déplacer', + shapeLabelToolView: 'Voir', + shapeLabelToolSharpie: 'Pointe', + shapeLabelToolEraser: 'Gomme', + shapeLabelToolPath: 'Chemin', + shapeLabelToolRectangle: 'Rectangle', + shapeLabelToolEllipse: 'Ellipse', + shapeLabelToolArrow: 'Flèche', + shapeLabelToolLine: 'Trait', + shapeLabelToolText: 'Texte', + shapeLabelToolPreset: 'Autocollants', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Mode de sélection', + shapeTitleBrushSize: 'Taille du pinceau', + + shapeLabelSelectionModeNew: 'Nouveau', + shapeLabelSelectionModeAdd: 'Ajouter', + shapeLabelSelectionModeSubtract: 'Retirer', + + shapeLabelToolSelectionBrush: 'Brosse', + shapeLabelToolSelectionLassoo: 'Lasso', + shapeLabelToolSelectionRectangle: 'Sélection rectangulaire', + shapeLabelToolSelectionEllipse: 'Sélection elliptique', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/fr_FR/core/index.js b/src/components/@pqina/pintura/locale/fr_FR/core/index.js new file mode 100644 index 0000000..faf9826 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/crop/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/crop/fr_FR.js new file mode 100644 index 0000000..e212b4a --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/crop/fr_FR.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'Rogner', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Recentrer', + cropLabelButtonRotateLeft: 'Pivoter à gauche', + cropLabelButtonRotateRight: 'Pivoter à droite', + cropLabelButtonFlipHorizontal: 'Retournement horizontal', + cropLabelButtonFlipVertical: 'Retournement vertical', + + cropLabelSelectPreset: 'Forme du rognage', + + cropLabelCropBoundary: 'Limite de rognage', + cropLabelCropBoundaryEdge: `Limite de l'image`, + cropLabelCropBoundaryNone: 'Aucun', + + cropLabelTabRotation: 'Rotation', + cropLabelTabZoom: 'Échelonner', +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/crop/index.js b/src/components/@pqina/pintura/locale/fr_FR/crop/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/crop/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/decorate/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/decorate/fr_FR.js new file mode 100644 index 0000000..8b99b4e --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/decorate/fr_FR.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Décorer', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/decorate/index.js b/src/components/@pqina/pintura/locale/fr_FR/decorate/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/decorate/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/fill/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/fill/fr_FR.js new file mode 100644 index 0000000..1e5bf74 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/fill/fr_FR.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Remplir', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/fill/index.js b/src/components/@pqina/pintura/locale/fr_FR/fill/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/fill/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/filter/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/filter/fr_FR.js new file mode 100644 index 0000000..9ab054c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/filter/fr_FR.js @@ -0,0 +1,18 @@ +export default { + filterLabel: 'Filtre', + filterIcon: + '', + filterLabelChrome: 'Chrome', + filterLabelFade: 'Fondu', + filterLabelCold: 'Froid', + filterLabelWarm: 'Chaud', + filterLabelPastel: 'Pastel', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Délavé', + filterLabelMonoStark: 'Austère', + filterLabelSepiaDefault: 'Sépia', + filterLabelSepiaBlues: 'Blues', + filterLabelSepiaRust: 'Rouille', + filterLabelSepiaColor: 'Couleur', +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/filter/index.js b/src/components/@pqina/pintura/locale/fr_FR/filter/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/filter/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/finetune/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/finetune/fr_FR.js new file mode 100644 index 0000000..1118da3 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/finetune/fr_FR.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Affiner', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Luminosité', + finetuneLabelContrast: 'Contraste', + finetuneLabelSaturation: 'Saturation', + finetuneLabelExposure: 'Exposition', + finetuneLabelTemperature: 'Température', + finetuneLabelGamma: 'Gamma', + finetuneLabelClarity: 'Netteté', + finetuneLabelVignette: 'Vignette', +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/finetune/index.js b/src/components/@pqina/pintura/locale/fr_FR/finetune/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/finetune/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/frame/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/frame/fr_FR.js new file mode 100644 index 0000000..b76f820 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/frame/fr_FR.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Cadre', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Mat', + frameLabelMatRound: 'Biseau', + frameLabelLineSingle: 'Trait', + frameLabelLineMultiple: 'Zèbre', + frameLabelEdgeSeparate: 'Encart', + frameLabelEdgeOverlap: 'Plus', + frameLabelEdgeCross: 'Charpente', + frameLabelCornerHooks: 'Crochet', + frameLabelPolaroid: 'Polaroïd', +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/frame/index.js b/src/components/@pqina/pintura/locale/fr_FR/frame/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/frame/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/index.d.ts b/src/components/@pqina/pintura/locale/fr_FR/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/index.js b/src/components/@pqina/pintura/locale/fr_FR/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/redact/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/redact/fr_FR.js new file mode 100644 index 0000000..88ab049 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/redact/fr_FR.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'Rédiger', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/redact/index.js b/src/components/@pqina/pintura/locale/fr_FR/redact/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/redact/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/resize/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/resize/fr_FR.js new file mode 100644 index 0000000..b4b9659 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/resize/fr_FR.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Redimensionner', + resizeIcon: + '', + + resizeLabelFormCaption: `Taille de sortie d'image`, + + resizeLabelInputWidth: 'l', + resizeTitleInputWidth: 'Largeur', + resizeLabelInputHeight: 'h', + resizeTitleInputHeight: 'Hauteur', + + resizeTitleButtonMaintainAspectRatio: `Maintenir le rapport d'apparence`, + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/resize/index.js b/src/components/@pqina/pintura/locale/fr_FR/resize/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/resize/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/retouch/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/retouch/fr_FR.js new file mode 100644 index 0000000..3c8031f --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/retouch/fr_FR.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'Retoucher', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/retouch/index.js b/src/components/@pqina/pintura/locale/fr_FR/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/sticker/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/sticker/fr_FR.js new file mode 100644 index 0000000..c2df366 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/sticker/fr_FR.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Autocollant', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/sticker/index.js b/src/components/@pqina/pintura/locale/fr_FR/sticker/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/sticker/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/fr_FR/trim/fr_FR.js b/src/components/@pqina/pintura/locale/fr_FR/trim/fr_FR.js new file mode 100644 index 0000000..5b50cd6 --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/trim/fr_FR.js @@ -0,0 +1,61 @@ +export default { + trimLabel: 'Découper', + trimIcon: ``, + + trimLabelPlay: 'Lire', + trimLabelPause: 'Pause', + + trimLabelMute: 'Couper le son', + trimLabelUnmute: 'Réactiver', + + trimLabelSplit: 'Diviser', + trimLabelMerge: 'Fusionner', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return `Attente de média`; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'La taille minimale est de {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'seconde' : 'secondes'; + return `La durée minimale de la vidéo est de {minDuration} ${unit}`; + } else { + return 'Erreur de chargement du média'; + } + } + if (state.task === 'blob-to-bitmap') return `Préparer du média…`; + return `Chargement de media…`; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return `Erreur de transfert de média`; + return `Transfert de média…`; + } + if (state.error) return `Erreur de traitement de média`; + return `Traitement de média…`; + }, + + cropLabelCropBoundaryEdge: `Limite de média`, +}; diff --git a/src/components/@pqina/pintura/locale/fr_FR/trim/index.js b/src/components/@pqina/pintura/locale/fr_FR/trim/index.js new file mode 100644 index 0000000..e3f6e6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/fr_FR/trim/index.js @@ -0,0 +1 @@ +export { default } from './fr_FR.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/annotate/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/annotate/hi_IN.js new file mode 100644 index 0000000..5d1a835 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/annotate/hi_IN.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'टिप्पणी जोड़ें', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/annotate/index.js b/src/components/@pqina/pintura/locale/hi_IN/annotate/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/annotate/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/core/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/core/hi_IN.js new file mode 100644 index 0000000..8d0185d --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/core/hi_IN.js @@ -0,0 +1,235 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'रीसेट', + labelDefault: 'डिफ़ॉल्ट', + labelAuto: 'ऑटो', + labelNone: 'कोई नहीं', + labelEdit: 'संपादित करें', + labelClose: 'बंद करें', + labelSupportError: (features) => `इस ब्राउज़र पर ${features.join(', ')} समर्थित नहीं हैं`, + + // defaults + labelColor: 'रंग', + labelWidth: 'चौड़ाई', + labelSize: 'आकार', + labelOffset: 'ऑफ़सेट', + labelAmount: 'मात्रा', + labelInset: 'इनसेट', + labelRadius: 'त्रिज्या', + + // controls + labelColorPalette: 'रंग पैलेट', + + // sizes + labelSizeExtraSmall: 'बहुत छोटा', + labelSizeSmall: 'छोटा', + labelSizeMediumSmall: 'मध्यम छोटा', + labelSizeMedium: 'मध्यम', + labelSizeMediumLarge: 'मध्यम बड़ा', + labelSizeLarge: 'बड़ा', + labelSizeExtraLarge: 'बहुत बड़ा', + + // default buttons + + labelButtonCancel: 'रद्द करें', + labelButtonUndo: 'पूर्ववत करें', + labelButtonRedo: 'पुन: करें', + labelButtonRevert: 'पूर्व स्थिति में लौटें', + labelButtonExport: 'पूर्ण', + + // zoom + labelZoomIn: 'ज़ूम इन', + labelZoomOut: 'ज़ूम आउट', + labelZoomFit: 'दृश्य को फिट करें', + labelZoomActual: 'वास्तविक आकार', + iconZoomIn: '', + iconZoomOut: '', + + // icons + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'बंद करें', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'छवि के लिए प्रतीक्षा कर रहा है'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'न्यूनतम छवि आकार है {minWidth} × {minHeight}' + : 'छवि लोड करने में त्रुटि'; + if (state.task === 'blob-to-bitmap') return 'छवि को तैयार कर रहा है…'; + return 'छवि लोड हो रही है…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'छवि अपलोड करने में त्रुटि'; + return 'छवि अपलोड हो रही है…'; + } + if (state.error) return 'छवि को प्रोसेस करने में त्रुटि'; + return 'छवि को प्रोसेस किया जा रहा है…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'छवि का चयन करें', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'ऑटो चौड़ाई', + shapeTitleButtonTextLayoutAutoHeight: 'ऑटो ऊंचाई', + shapeTitleButtonTextLayoutFixedSize: 'निर्दिष्ट आकार', + + shapeTitleButtonFlipHorizontal: 'हॉरिज़ॉन्टल फ्लिप', + shapeTitleButtonFlipVertical: 'वर्टिकल फ्लिप', + shapeTitleButtonRemove: 'हटाएँ', + shapeTitleButtonDuplicate: 'कॉपी करें', + shapeTitleButtonMoveToFront: 'आगे ले जाएं', + + shapeLabelInputText: 'टेक्स्ट संपादित करें', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + + shapeLabelInputCancel: 'रद्द करें', + shapeLabelInputConfirm: 'पुष्टि करें', + + shapeLabelStrokeNone: 'कोई आउटलाइन नहीं', + + shapeLabelFontStyleNormal: 'सामान्य', + shapeLabelFontStyleBold: 'बोल्ड', + shapeLabelFontStyleItalic: 'इटैलिक', + shapeLabelFontStyleItalicBold: 'बोल्ड इटैलिक', + + shapeTitleBackgroundColor: 'भरना', + + shapeTitleCornerRadius: 'कोने की त्रिज्या', + + shapeTitleFontFamily: 'फ़ॉन्ट', + shapeTitleFontSize: 'फ़ॉन्ट आकार', + shapeTitleFontStyle: 'फ़ॉन्ट शैली', + shapeTitleLineHeight: 'लाइन ऊंचाई', + + shapeTitleLineStart: 'शुरू', + shapeTitleLineEnd: 'अंत', + shapeTitleStrokeWidth: 'रेखा चौड़ाई', + shapeTitleStrokeColor: 'रेखा रंग', + + shapeTitleLineDecorationBar: 'लाइन', + shapeTitleLineDecorationCircle: 'वृत्त', + shapeTitleLineDecorationSquare: 'वर्ग', + shapeTitleLineDecorationArrow: 'तीर', + shapeTitleLineDecorationCircleSolid: 'भरी हुई वृत्त', + shapeTitleLineDecorationSquareSolid: 'भरी हुई वर्ग', + shapeTitleLineDecorationArrowSolid: 'भरी हुई तीर', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'पारदर्शी', + shapeTitleColorWhite: 'सफ़ेद', + shapeTitleColorSilver: 'चाँदी', + shapeTitleColorGray: 'धूसर', + shapeTitleColorBlack: 'काला', + shapeTitleColorNavy: 'नेवी ब्लू', + shapeTitleColorBlue: 'नीला', + shapeTitleColorAqua: 'एक्वा', + shapeTitleColorTeal: 'टील', + shapeTitleColorOlive: 'जैतूनी', + shapeTitleColorGreen: 'हरा', + shapeTitleColorYellow: 'पीला', + shapeTitleColorOrange: 'नारंगी', + shapeTitleColorRed: 'लाल', + shapeTitleColorMaroon: 'मैरून', + shapeTitleColorFuchsia: 'फ़्यूशिया', + shapeTitleColorPurple: 'बैंगनी', + + shapeTitleTextOutline: 'पाठ की रूपरेखा', + shapeTitleTextOutlineWidth: 'चौड़ाई', + shapeTitleTextShadow: 'पाठ की छाया', + shapeTitleTextShadowBlur: 'धुंधलापन', + + shapeTitleTextColor: 'फ़ॉन्ट रंग', + shapeTitleTextAlign: 'टेक्स्ट संरेखित करें', + shapeTitleTextAlignLeft: 'बाएं ओर संरेखित करें', + shapeTitleTextAlignCenter: 'मध्य संरेखित करें', + shapeTitleTextAlignRight: 'दाएं ओर संरेखित करें', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'हटाएं', + shapeLabelToolView: 'देखें', + shapeLabelToolSharpie: 'शार्पी', + shapeLabelToolEraser: 'इरेसर', + shapeLabelToolPath: 'पथ', + shapeLabelToolRectangle: 'आयत', + shapeLabelToolEllipse: 'दीर्घवृत्त', + shapeLabelToolArrow: 'तीर', + shapeLabelToolLine: 'रेखा', + shapeLabelToolText: 'टेक्स्ट', + shapeLabelToolPreset: 'स्टिकर', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'चयन मोड', + shapeTitleBrushSize: 'ब्रश का आकार', + + shapeLabelSelectionModeNew: 'नया', + shapeLabelSelectionModeAdd: 'जोड़ें', + shapeLabelSelectionModeSubtract: 'हटाएं', + + shapeLabelToolSelectionBrush: 'ब्रश', + shapeLabelToolSelectionLassoo: 'लासू', + shapeLabelToolSelectionRectangle: 'आयताकार चयन', + shapeLabelToolSelectionEllipse: 'दीर्घवृत्त चयन', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/hi_IN/core/index.js b/src/components/@pqina/pintura/locale/hi_IN/core/index.js new file mode 100644 index 0000000..6618401 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/crop/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/crop/hi_IN.js new file mode 100644 index 0000000..f346d94 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/crop/hi_IN.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'क्रॉप करें', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'फिर से केंद्रित करें', + cropLabelButtonRotateLeft: 'बाएं ओर घुमाएं', + cropLabelButtonRotateRight: 'दाएं ओर घुमाएं', + cropLabelButtonFlipHorizontal: 'क्षैतिज फ्लिप करें', + cropLabelButtonFlipVertical: 'ऊर्ध्वाधर फ्लिप करें', + + cropLabelSelectPreset: 'क्रॉप आकार', + + cropLabelCropBoundary: 'क्रॉप सीमा', + cropLabelCropBoundaryEdge: 'छवि की सीमा', + cropLabelCropBoundaryNone: 'कोई नहीं', + + cropLabelTabRotation: 'घुमाव', + cropLabelTabZoom: 'स्केल', +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/crop/index.js b/src/components/@pqina/pintura/locale/hi_IN/crop/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/crop/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/decorate/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/decorate/hi_IN.js new file mode 100644 index 0000000..6421dfa --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/decorate/hi_IN.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'सजावट जोड़ें', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/decorate/index.js b/src/components/@pqina/pintura/locale/hi_IN/decorate/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/decorate/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/fill/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/fill/hi_IN.js new file mode 100644 index 0000000..e7b6084 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/fill/hi_IN.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'भरना', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/fill/index.js b/src/components/@pqina/pintura/locale/hi_IN/fill/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/fill/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/filter/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/filter/hi_IN.js new file mode 100644 index 0000000..44300f5 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/filter/hi_IN.js @@ -0,0 +1,18 @@ +export default { + filterLabel: 'फ़िल्टर', + filterIcon: + '', + filterLabelChrome: 'Chrome', + filterLabelFade: 'Fade', + filterLabelCold: 'Cold', + filterLabelWarm: 'Warm', + filterLabelPastel: 'Pastel', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Wash', + filterLabelMonoStark: 'Stark', + filterLabelSepiaDefault: 'Sepia', + filterLabelSepiaBlues: 'Blues', + filterLabelSepiaRust: 'Rust', + filterLabelSepiaColor: 'Color', +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/filter/index.js b/src/components/@pqina/pintura/locale/hi_IN/filter/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/filter/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/finetune/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/finetune/hi_IN.js new file mode 100644 index 0000000..e45397b --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/finetune/hi_IN.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'फाइनट्यून', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Brightness', + finetuneLabelContrast: 'Contrast', + finetuneLabelSaturation: 'Saturation', + finetuneLabelExposure: 'Exposure', + finetuneLabelTemperature: 'Temperature', + finetuneLabelGamma: 'Gamma', + finetuneLabelClarity: 'Clarity', + finetuneLabelVignette: 'Vignette', +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/finetune/index.js b/src/components/@pqina/pintura/locale/hi_IN/finetune/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/finetune/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/frame/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/frame/hi_IN.js new file mode 100644 index 0000000..e958287 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/frame/hi_IN.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'फ्रेम', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Mat', + frameLabelMatRound: 'Bevel', + frameLabelLineSingle: 'Line', + frameLabelLineMultiple: 'Zebra', + frameLabelEdgeSeparate: 'Inset', + frameLabelEdgeOverlap: 'Plus', + frameLabelEdgeCross: 'Lumber', + frameLabelCornerHooks: 'Hook', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/frame/index.js b/src/components/@pqina/pintura/locale/hi_IN/frame/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/frame/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/index.d.ts b/src/components/@pqina/pintura/locale/hi_IN/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/index.js b/src/components/@pqina/pintura/locale/hi_IN/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/redact/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/redact/hi_IN.js new file mode 100644 index 0000000..9c1bcd5 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/redact/hi_IN.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'हटाएं', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/redact/index.js b/src/components/@pqina/pintura/locale/hi_IN/redact/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/redact/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/resize/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/resize/hi_IN.js new file mode 100644 index 0000000..6fc11eb --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/resize/hi_IN.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'आकार बदलें', + resizeIcon: + '', + + resizeLabelFormCaption: 'छवि आउटपुट आकार', + + resizeLabelInputWidth: 'w', + resizeTitleInputWidth: 'चौड़ाई', + resizeLabelInputHeight: 'h', + resizeTitleInputHeight: 'ऊंचाई', + + resizeTitleButtonMaintainAspectRatio: 'प्रतिस्थापन अनुपात बनाएँ', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/resize/index.js b/src/components/@pqina/pintura/locale/hi_IN/resize/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/resize/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/retouch/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/retouch/hi_IN.js new file mode 100644 index 0000000..8991494 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/retouch/hi_IN.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'सुधारना', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/retouch/index.js b/src/components/@pqina/pintura/locale/hi_IN/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/sticker/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/sticker/hi_IN.js new file mode 100644 index 0000000..c8330ee --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/sticker/hi_IN.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'स्टिकर', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/sticker/index.js b/src/components/@pqina/pintura/locale/hi_IN/sticker/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/sticker/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/hi_IN/trim/hi_IN.js b/src/components/@pqina/pintura/locale/hi_IN/trim/hi_IN.js new file mode 100644 index 0000000..620c950 --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/trim/hi_IN.js @@ -0,0 +1,59 @@ +export default { + trimLabel: 'ट्रिम', + trimIcon: ``, + + trimLabelPlay: 'प्ले', + trimLabelPause: 'पॉज़', + + trimLabelMute: 'म्यूट', + trimLabelUnmute: 'अनम्यूट', + + trimLabelSplit: 'विभाजित करें', + trimLabelMerge: 'विलय करें', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'मीडिया की प्रतीक्षा की जा रही है'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'न्यूनतम मीडिया आकार है {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + return `न्यूनतम वीडियो अवधि {minDuration} सेकंड है`; + } else { + return 'मीडिया लोड करने में त्रुटि'; + } + } + if (state.task === 'blob-to-bitmap') return 'मीडिया तैयार कर रहे हैं…'; + return 'मीडिया लोड हो रही है…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'मीडिया अपलोड करते समय त्रुटि हुई'; + return 'मीडिया अपलोड हो रहा है…'; + } + if (state.error) return 'मीडिया को प्रोसेस करने में त्रुटि'; + return 'मीडिया प्रोसेस हो रहा है…'; + }, + + cropLabelCropBoundaryEdge: 'मीडिया की सीमा', +}; diff --git a/src/components/@pqina/pintura/locale/hi_IN/trim/index.js b/src/components/@pqina/pintura/locale/hi_IN/trim/index.js new file mode 100644 index 0000000..9de8a4c --- /dev/null +++ b/src/components/@pqina/pintura/locale/hi_IN/trim/index.js @@ -0,0 +1 @@ +export { default } from './hi_IN.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/annotate/index.js b/src/components/@pqina/pintura/locale/it_IT/annotate/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/annotate/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/annotate/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/annotate/it_IT.js new file mode 100644 index 0000000..f9d902c --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/annotate/it_IT.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Annotare', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/core/index.js b/src/components/@pqina/pintura/locale/it_IT/core/index.js new file mode 100644 index 0000000..fde8fe3 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/core/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/core/it_IT.js new file mode 100644 index 0000000..18b4e65 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/core/it_IT.js @@ -0,0 +1,232 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generici + labelReset: 'Resetta', + labelDefault: 'Default', + labelAuto: 'Auto', + labelNone: 'Nessuno', + labelEdit: 'Modifica', + labelClose: 'Chiudi', + labelSupportError: (features) => `${features.join(', ')} non supportate su questo browser`, + + // predefiniti + labelColor: 'Colore', + labelWidth: 'Larghezza', + labelSize: 'Dimensione', + labelOffset: 'Offset', + labelAmount: 'Quantità', + labelInset: 'Inset', + labelRadius: 'Raggio', + + // controls + labelColorPalette: 'Palette di colori', + + // sizes + labelSizeExtraSmall: 'Extra piccolo', + labelSizeSmall: 'Piccolo', + labelSizeMediumSmall: 'Medio piccolo', + labelSizeMedium: 'Medio', + labelSizeMediumLarge: 'Medio grande', + labelSizeLarge: 'Grande', + labelSizeExtraLarge: 'Extra grande', + + // default buttons + labelButtonCancel: 'Annulla', + labelButtonUndo: 'Disfare', + labelButtonRedo: 'Rifare', + labelButtonRevert: 'Ripristina', + labelButtonExport: 'Esportare', + + // zoom + labelZoomIn: 'Ingrandisci', + labelZoomOut: 'Rimpicciolisci', + labelZoomFit: 'Adatta alla vista', + labelZoomActual: 'Dimensioni reali', + iconZoomIn: '', + iconZoomOut: '', + + // icons + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Chiudi', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'In attesa di immagine'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? "La dimensione minima dell'immagine è {minWidth} × {minHeight}" + : "Errore durante il caricamento dell'immagine"; + if (state.task === 'blob-to-bitmap') return 'Preparazione immagine in corso…'; + return 'Caricamento immagine in corso…'; + }, + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return "Errore durante il caricamento dell'immagine"; + return 'Caricamento immagine in corso…'; + } + if (state.error) return "Errore durante l'elaborazione dell'immagine"; + return 'Elaborazione immagine in corso…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'Seleziona immagine', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Larghezza automatica', + shapeTitleButtonTextLayoutAutoHeight: 'Altezza automatica', + shapeTitleButtonTextLayoutFixedSize: 'Dimensione fissa', + + shapeTitleButtonFlipHorizontal: 'Capovolgi orizzontalmente', + shapeTitleButtonFlipVertical: 'Capovolgi verticalmente', + shapeTitleButtonRemove: 'Rimuovi', + shapeTitleButtonDuplicate: 'Duplica', + shapeTitleButtonMoveToFront: 'Sposta in primo piano', + + shapeLabelInputText: 'Modifica', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: 'Annulla', + shapeLabelInputConfirm: 'Conferma', + + shapeLabelStrokeNone: 'Nessun contorno', + + shapeLabelFontStyleNormal: 'Normale', + shapeLabelFontStyleBold: 'Grassetto', + shapeLabelFontStyleItalic: 'Corsivo', + shapeLabelFontStyleItalicBold: 'Grassetto corsivo', + + shapeTitleBackgroundColor: 'Colore di riempimento', + + shapeTitleCornerRadius: "Raggio dell'angolo", + + shapeTitleFontFamily: 'Font', + shapeTitleFontSize: 'Dimensione del font', + shapeTitleFontStyle: 'Stile del font', + shapeTitleLineHeight: 'Altezza della riga', + + shapeTitleLineStart: 'Inizio', + shapeTitleLineEnd: 'Fine', + shapeTitleStrokeWidth: 'Spessore della linea', + shapeTitleStrokeColor: 'Colore della linea', + + shapeTitleLineDecorationBar: 'Barra', + shapeTitleLineDecorationCircle: 'Cerchio', + shapeTitleLineDecorationSquare: 'Quadrato', + shapeTitleLineDecorationArrow: 'Freccia', + shapeTitleLineDecorationCircleSolid: 'Cerchio pieno', + shapeTitleLineDecorationSquareSolid: 'Quadrato pieno', + shapeTitleLineDecorationArrowSolid: 'Freccia piena', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Trasparente', + shapeTitleColorWhite: 'Bianco', + shapeTitleColorSilver: 'Argento', + shapeTitleColorGray: 'Grigio', + shapeTitleColorBlack: 'Nero', + shapeTitleColorNavy: 'Blu scuro', + shapeTitleColorBlue: 'Blu', + shapeTitleColorAqua: 'Acqua', + shapeTitleColorTeal: 'Teal', + shapeTitleColorOlive: 'Oliva', + shapeTitleColorGreen: 'Verde', + shapeTitleColorYellow: 'Giallo', + shapeTitleColorOrange: 'Arancione', + shapeTitleColorRed: 'Rosso', + shapeTitleColorMaroon: 'Marrone', + shapeTitleColorFuchsia: 'Fucsia', + shapeTitleColorPurple: 'Porpora', + + shapeTitleTextOutline: 'Contorno testo', + shapeTitleTextOutlineWidth: 'Larghezza', + shapeTitleTextShadow: 'Ombra del testo', + shapeTitleTextShadowBlur: 'Sfocatura', + + shapeTitleTextColor: 'Colore del font', + shapeTitleTextAlign: 'Allineamento del testo', + shapeTitleTextAlignLeft: 'Allinea a sinistra il testo', + shapeTitleTextAlignCenter: 'Centra il testo', + shapeTitleTextAlignRight: 'Allinea a destra il testo', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Sposta', + shapeLabelToolView: 'Visualizza', + shapeLabelToolSharpie: 'Pennarello', + shapeLabelToolEraser: 'Cancellino', + shapeLabelToolPath: 'Percorso', + shapeLabelToolRectangle: 'Rettangolo', + shapeLabelToolEllipse: 'Ellisse', + shapeLabelToolArrow: 'Freccia', + shapeLabelToolLine: 'Linea', + shapeLabelToolText: 'Testo', + shapeLabelToolPreset: 'Adesivi', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Modalità di selezione', + shapeTitleBrushSize: 'Dimensione del pennello', + + shapeLabelSelectionModeNew: 'Nuovo', + shapeLabelSelectionModeAdd: 'Aggiungi', + shapeLabelSelectionModeSubtract: 'Rimuovi', + + shapeLabelToolSelectionBrush: 'Pennello', + shapeLabelToolSelectionLassoo: 'Lazo', + shapeLabelToolSelectionRectangle: 'Selezione rettangolare', + shapeLabelToolSelectionEllipse: 'Selezione ellittica', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/it_IT/crop/index.js b/src/components/@pqina/pintura/locale/it_IT/crop/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/crop/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/crop/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/crop/it_IT.js new file mode 100644 index 0000000..a94f166 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/crop/it_IT.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'Ritaglia', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Ricentra', + cropLabelButtonRotateLeft: 'Ruota a sinistra', + cropLabelButtonRotateRight: 'Ruota a destra', + cropLabelButtonFlipHorizontal: 'Capovolgi orizzontalmente', + cropLabelButtonFlipVertical: 'Capovolgi verticalmente', + + cropLabelSelectPreset: 'Forma ritaglio', + + cropLabelCropBoundary: 'Bordo del ritaglio', + cropLabelCropBoundaryEdge: "Bordo dell'immagine", + cropLabelCropBoundaryNone: 'Nessuno', + + cropLabelTabRotation: 'Rotazione', + cropLabelTabZoom: 'Scala', +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/decorate/index.js b/src/components/@pqina/pintura/locale/it_IT/decorate/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/decorate/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/decorate/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/decorate/it_IT.js new file mode 100644 index 0000000..8560da0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/decorate/it_IT.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Decorare', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/fill/index.js b/src/components/@pqina/pintura/locale/it_IT/fill/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/fill/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/fill/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/fill/it_IT.js new file mode 100644 index 0000000..fb07dff --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/fill/it_IT.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Riempire', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/filter/index.js b/src/components/@pqina/pintura/locale/it_IT/filter/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/filter/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/filter/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/filter/it_IT.js new file mode 100644 index 0000000..6ec78cf --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/filter/it_IT.js @@ -0,0 +1,19 @@ +export default { + filterLabel: 'Filtro', + filterIcon: + '', + + filterLabelChrome: 'Chrome', + filterLabelFade: 'Sbiadito', + filterLabelCold: 'Freddo', + filterLabelWarm: 'Caldo', + filterLabelPastel: 'Pastello', + filterLabelMonoDefault: 'Monocromatico', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Lavato', + filterLabelMonoStark: 'Stark', + filterLabelSepiaDefault: 'Sepia', + filterLabelSepiaBlues: 'Blu', + filterLabelSepiaRust: 'Ruggine', + filterLabelSepiaColor: 'Colore', +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/finetune/index.js b/src/components/@pqina/pintura/locale/it_IT/finetune/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/finetune/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/finetune/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/finetune/it_IT.js new file mode 100644 index 0000000..2711ed2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/finetune/it_IT.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Raffina', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Luminosità', + finetuneLabelContrast: 'Contrasto', + finetuneLabelSaturation: 'Saturazione', + finetuneLabelExposure: 'Esposizione', + finetuneLabelTemperature: 'Temperatura', + finetuneLabelGamma: 'Gamma', + finetuneLabelClarity: 'Chiarore', + finetuneLabelVignette: 'Vignetta', +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/frame/index.js b/src/components/@pqina/pintura/locale/it_IT/frame/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/frame/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/frame/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/frame/it_IT.js new file mode 100644 index 0000000..578c450 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/frame/it_IT.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Cornice', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Cornice dritta', + frameLabelMatRound: 'Cornice smussata', + frameLabelLineSingle: 'Linea singola', + frameLabelLineMultiple: 'Linee multiple', + frameLabelEdgeSeparate: 'Bordo separato', + frameLabelEdgeOverlap: 'Bordo sovrapposto', + frameLabelEdgeCross: 'Croce', + frameLabelCornerHooks: 'Angoli a uncino', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/index.d.ts b/src/components/@pqina/pintura/locale/it_IT/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/it_IT/index.js b/src/components/@pqina/pintura/locale/it_IT/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/redact/index.js b/src/components/@pqina/pintura/locale/it_IT/redact/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/redact/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/redact/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/redact/it_IT.js new file mode 100644 index 0000000..5230688 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/redact/it_IT.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'Redigere', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/resize/index.js b/src/components/@pqina/pintura/locale/it_IT/resize/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/resize/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/resize/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/resize/it_IT.js new file mode 100644 index 0000000..f40bde6 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/resize/it_IT.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Ridimensiona', + resizeIcon: + '', + + resizeLabelFormCaption: "Dimensioni dell'immagine di output", + + resizeLabelInputWidth: 'l', + resizeTitleInputWidth: 'Larghezza', + resizeLabelInputHeight: 'a', + resizeTitleInputHeight: 'Altezza', + + resizeTitleButtonMaintainAspectRatio: 'Mantieni proporzioni', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/retouch/index.js b/src/components/@pqina/pintura/locale/it_IT/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/retouch/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/retouch/it_IT.js new file mode 100644 index 0000000..f3ea70d --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/retouch/it_IT.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'Ritoccare', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/sticker/index.js b/src/components/@pqina/pintura/locale/it_IT/sticker/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/sticker/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/sticker/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/sticker/it_IT.js new file mode 100644 index 0000000..7c6f1b1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/sticker/it_IT.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Etichetta', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/it_IT/trim/index.js b/src/components/@pqina/pintura/locale/it_IT/trim/index.js new file mode 100644 index 0000000..511bac0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/trim/index.js @@ -0,0 +1 @@ +export { default } from './it_IT.js'; diff --git a/src/components/@pqina/pintura/locale/it_IT/trim/it_IT.js b/src/components/@pqina/pintura/locale/it_IT/trim/it_IT.js new file mode 100644 index 0000000..15b8388 --- /dev/null +++ b/src/components/@pqina/pintura/locale/it_IT/trim/it_IT.js @@ -0,0 +1,60 @@ +export default { + trimLabel: 'Taglia', + trimIcon: ``, + + trimLabelPlay: 'Riproduci', + trimLabelPause: 'Pausa', + + trimLabelMute: 'Disattiva audio', + trimLabelUnmute: 'Attiva audio', + + trimLabelSplit: 'Dividi', + trimLabelMerge: 'Unisci', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'In attesa del media'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'Le dimensioni minime del media sono {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'secondo' : 'secondi'; + return `La durata minima del video è di {minDuration} ${unit}`; + } else { + return 'Errore nel caricamento del media'; + } + } + if (state.task === 'blob-to-bitmap') return 'Preparazione del media in corso…'; + return 'Caricamento del media in corso…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return "Errore durante l'upload del media"; + return 'Upload del media in corso…'; + } + if (state.error) return "Errore durante l'elaborazione del media"; + return 'Elaborazione del media in corso…'; + }, + + cropLabelCropBoundaryEdge: 'Bordo del media', +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/annotate/index.js b/src/components/@pqina/pintura/locale/ja_JP/annotate/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/annotate/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/annotate/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/annotate/ja_JP.js new file mode 100644 index 0000000..ff96a8c --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/annotate/ja_JP.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: '注釈', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/core/index.js b/src/components/@pqina/pintura/locale/ja_JP/core/index.js new file mode 100644 index 0000000..038c158 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/core/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/core/ja_JP.js new file mode 100644 index 0000000..20b737f --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/core/ja_JP.js @@ -0,0 +1,234 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'リセット', + labelDefault: 'デフォルト', + labelAuto: '自動', + labelNone: 'なし', + labelEdit: '編集', + labelClose: '閉じる', + labelSupportError: (features) => + `${features.join(', ')} はこのブラウザではサポートされていません`, + + // defaults + labelColor: '色', + labelWidth: '幅', + labelSize: 'サイズ', + labelOffset: 'オフセット', + labelAmount: '量', + labelInset: 'インセット', + labelRadius: '半径', + + // controls + labelColorPalette: 'カラーパレット', + + // sizes + labelSizeExtraSmall: '超小', + labelSizeSmall: '小', + labelSizeMediumSmall: '中小', + labelSizeMedium: '中', + labelSizeMediumLarge: '中大', + labelSizeLarge: '大', + labelSizeExtraLarge: '超大', + + // default buttons + labelButtonCancel: 'キャンセル', + labelButtonUndo: '元に戻す', + labelButtonRedo: 'やり直し', + labelButtonRevert: '元に戻す', + labelButtonExport: '完了', + + // zoom + labelZoomIn: 'ズームイン', + labelZoomOut: 'ズームアウト', + labelZoomFit: 'ビューに合わせる', + labelZoomActual: '実際のサイズ', + iconZoomIn: '', + iconZoomOut: '', + + // icons + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: '閉じる', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return '画像を待っています'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? '最小画像サイズは {minWidth} × {minHeight} です' + : '画像の読み込みエラー'; + if (state.task === 'blob-to-bitmap') return '画像を準備中…'; + return '画像を読み込んでいます…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return '画像のアップロードエラー'; + return '画像をアップロード中…'; + } + if (state.error) return '画像の処理エラー'; + return '画像を処理中…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: '画像を選択', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: '自動幅', + shapeTitleButtonTextLayoutAutoHeight: '自動高さ', + shapeTitleButtonTextLayoutFixedSize: '固定サイズ', + + shapeTitleButtonFlipHorizontal: '水平反転', + shapeTitleButtonFlipVertical: '垂直反転', + shapeTitleButtonRemove: '削除', + shapeTitleButtonDuplicate: '複製', + shapeTitleButtonMoveToFront: '前面に移動', + + shapeLabelInputText: 'テキストを編集', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: 'キャンセル', + shapeLabelInputConfirm: '確認', + + shapeLabelStrokeNone: 'アウトラインなし', + + shapeLabelFontStyleNormal: '通常', + shapeLabelFontStyleBold: '太字', + shapeLabelFontStyleItalic: 'イタリック', + shapeLabelFontStyleItalicBold: '太字イタリック', + + shapeTitleBackgroundColor: '塗り色', + + shapeTitleCornerRadius: '角の半径', + + shapeTitleFontFamily: 'フォント', + shapeTitleFontSize: 'フォントサイズ', + shapeTitleFontStyle: 'フォントスタイル', + shapeTitleLineHeight: '行の高さ', + + shapeTitleLineStart: '開始', + shapeTitleLineEnd: '終了', + shapeTitleStrokeWidth: '線の幅', + shapeTitleStrokeColor: '線の色', + + shapeTitleLineDecorationBar: 'バー', + shapeTitleLineDecorationCircle: '円', + shapeTitleLineDecorationSquare: '四角', + shapeTitleLineDecorationArrow: '矢印', + shapeTitleLineDecorationCircleSolid: '塗りつぶし円', + shapeTitleLineDecorationSquareSolid: '塗りつぶし四角', + shapeTitleLineDecorationArrowSolid: '塗りつぶし矢印', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: '透明', + shapeTitleColorWhite: '白', + shapeTitleColorSilver: '銀', + shapeTitleColorGray: '灰色', + shapeTitleColorBlack: '黒', + shapeTitleColorNavy: '紺', + shapeTitleColorBlue: '青', + shapeTitleColorAqua: '水色', + shapeTitleColorTeal: 'ティール', + shapeTitleColorOlive: 'オリーブ', + shapeTitleColorGreen: '緑', + shapeTitleColorYellow: '黄色', + shapeTitleColorOrange: 'オレンジ', + shapeTitleColorRed: '赤', + shapeTitleColorMaroon: '栗色', + shapeTitleColorFuchsia: 'フューシャ', + shapeTitleColorPurple: '紫', + + shapeTitleTextOutline: 'テキストのアウトライン', + shapeTitleTextOutlineWidth: '幅', + shapeTitleTextShadow: 'テキストの影', + shapeTitleTextShadowBlur: 'ぼかし', + + shapeTitleTextColor: 'フォントの色', + shapeTitleTextAlign: 'テキストの位置', + shapeTitleTextAlignLeft: '左揃え', + shapeTitleTextAlignCenter: '中央揃え', + shapeTitleTextAlignRight: '右揃え', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: '移動', + shapeLabelToolView: '表示', + shapeLabelToolSharpie: 'シャーピー', + shapeLabelToolEraser: '消しゴム', + shapeLabelToolPath: 'パス', + shapeLabelToolRectangle: '長方形', + shapeLabelToolEllipse: '楕円', + shapeLabelToolArrow: '矢印', + shapeLabelToolLine: '線', + shapeLabelToolText: 'テキスト', + shapeLabelToolPreset: 'ステッカー', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: '選択モード', + shapeTitleBrushSize: 'ブラシのサイズ', + + shapeLabelSelectionModeNew: '新しい', + shapeLabelSelectionModeAdd: '追加', + shapeLabelSelectionModeSubtract: '削除', + + shapeLabelToolSelectionBrush: 'ブラシ', + shapeLabelToolSelectionLassoo: 'ラッソ', + shapeLabelToolSelectionRectangle: '矩形選択', + shapeLabelToolSelectionEllipse: '楕円選択', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/ja_JP/crop/index.js b/src/components/@pqina/pintura/locale/ja_JP/crop/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/crop/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/crop/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/crop/ja_JP.js new file mode 100644 index 0000000..017f47a --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/crop/ja_JP.js @@ -0,0 +1,55 @@ +export default { + cropLabel: 'トリミング', + + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: '再センタリング', + cropLabelButtonRotateLeft: '左に回転', + cropLabelButtonRotateRight: '右に回転', + cropLabelButtonFlipHorizontal: '水平反転', + cropLabelButtonFlipVertical: '垂直反転', + + cropLabelSelectPreset: 'トリミングの形', + + cropLabelCropBoundary: 'トリミングの境界', + cropLabelCropBoundaryEdge: '画像の端', + cropLabelCropBoundaryNone: 'なし', + + cropLabelTabRotation: '回転', + cropLabelTabZoom: '拡大縮小', +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/decorate/index.js b/src/components/@pqina/pintura/locale/ja_JP/decorate/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/decorate/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/decorate/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/decorate/ja_JP.js new file mode 100644 index 0000000..34dfc5d --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/decorate/ja_JP.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: '装飾', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/fill/index.js b/src/components/@pqina/pintura/locale/ja_JP/fill/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/fill/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/fill/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/fill/ja_JP.js new file mode 100644 index 0000000..49c694c --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/fill/ja_JP.js @@ -0,0 +1,12 @@ +export default { + fillLabel: '塗りつぶし', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/filter/index.js b/src/components/@pqina/pintura/locale/ja_JP/filter/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/filter/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/filter/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/filter/ja_JP.js new file mode 100644 index 0000000..ec8cf3b --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/filter/ja_JP.js @@ -0,0 +1,19 @@ +export default { + filterLabel: 'フィルター', + filterIcon: + '', + + filterLabelChrome: 'クローム', + filterLabelFade: 'フェード', + filterLabelCold: '冷たい', + filterLabelWarm: '暖かい', + filterLabelPastel: 'パステル', + filterLabelMonoDefault: 'モノ', + filterLabelMonoNoir: 'ノワール', + filterLabelMonoWash: 'ウォッシュ', + filterLabelMonoStark: 'スターク', + filterLabelSepiaDefault: 'セピア', + filterLabelSepiaBlues: 'ブルース', + filterLabelSepiaRust: 'ラスト', + filterLabelSepiaColor: 'カラー', +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/finetune/index.js b/src/components/@pqina/pintura/locale/ja_JP/finetune/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/finetune/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/finetune/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/finetune/ja_JP.js new file mode 100644 index 0000000..771ecf3 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/finetune/ja_JP.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: '微調整', + finetuneIcon: + '', + + finetuneLabelBrightness: '明るさ', + finetuneLabelContrast: 'コントラスト', + finetuneLabelSaturation: '彩度', + finetuneLabelExposure: '露出', + finetuneLabelTemperature: '色温度', + finetuneLabelGamma: 'ガンマ', + finetuneLabelClarity: 'クラリティ', + finetuneLabelVignette: 'ビネット', +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/frame/index.js b/src/components/@pqina/pintura/locale/ja_JP/frame/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/frame/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/frame/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/frame/ja_JP.js new file mode 100644 index 0000000..d0912ad --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/frame/ja_JP.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'フレーム', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'マット', + frameLabelMatRound: 'ベベル', + frameLabelLineSingle: 'ライン', + frameLabelLineMultiple: 'ゼブラ', + frameLabelEdgeSeparate: 'インセット', + frameLabelEdgeOverlap: 'プラス', + frameLabelEdgeCross: 'ランバー', + frameLabelCornerHooks: 'フック', + frameLabelPolaroid: 'ポラロイド', +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/index.d.ts b/src/components/@pqina/pintura/locale/ja_JP/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/index.js b/src/components/@pqina/pintura/locale/ja_JP/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/redact/index.js b/src/components/@pqina/pintura/locale/ja_JP/redact/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/redact/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/redact/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/redact/ja_JP.js new file mode 100644 index 0000000..ff26608 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/redact/ja_JP.js @@ -0,0 +1,4 @@ +export default { + redactLabel: '修正', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/resize/index.js b/src/components/@pqina/pintura/locale/ja_JP/resize/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/resize/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/resize/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/resize/ja_JP.js new file mode 100644 index 0000000..c8c5615 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/resize/ja_JP.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'リサイズ', + resizeIcon: + '', + + resizeLabelFormCaption: '画像出力サイズ', + + resizeLabelInputWidth: '幅', + resizeTitleInputWidth: '幅', + resizeLabelInputHeight: '高さ', + resizeTitleInputHeight: '高さ', + + resizeTitleButtonMaintainAspectRatio: 'アスペクト比を維持', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/retouch/index.js b/src/components/@pqina/pintura/locale/ja_JP/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/retouch/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/retouch/ja_JP.js new file mode 100644 index 0000000..e0df829 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/retouch/ja_JP.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: '修正', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/sticker/index.js b/src/components/@pqina/pintura/locale/ja_JP/sticker/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/sticker/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/sticker/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/sticker/ja_JP.js new file mode 100644 index 0000000..4700843 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/sticker/ja_JP.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'ステッカー', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/ja_JP/trim/index.js b/src/components/@pqina/pintura/locale/ja_JP/trim/index.js new file mode 100644 index 0000000..d49a0e1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/trim/index.js @@ -0,0 +1 @@ +export { default } from './ja_JP.js'; diff --git a/src/components/@pqina/pintura/locale/ja_JP/trim/ja_JP.js b/src/components/@pqina/pintura/locale/ja_JP/trim/ja_JP.js new file mode 100644 index 0000000..8824189 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ja_JP/trim/ja_JP.js @@ -0,0 +1,61 @@ +export default { + trimLabel: 'トリム', + + trimIcon: ``, + + trimLabelPlay: '再生', + trimLabelPause: '一時停止', + + trimLabelMute: 'ミュート', + trimLabelUnmute: 'ミュート解除', + + trimLabelSplit: '分割', + trimLabelMerge: 'マージ', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'メディア待ち'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return '最小メディアサイズは {minWidth} × {minHeight} です'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? '秒' : '秒'; + return `最小ビデオの長さは {minDuration} ${unit} です`; + } else { + return 'メディアの読み込みエラー'; + } + } + if (state.task === 'blob-to-bitmap') return 'メディアを準備中…'; + return 'メディアを読み込み中…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'メディアのアップロードエラー'; + return 'メディアをアップロード中…'; + } + if (state.error) return 'メディアの処理エラー'; + return 'メディアを処理中…'; + }, + + cropLabelCropBoundaryEdge: 'メディアの端', +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/annotate/index.js b/src/components/@pqina/pintura/locale/ko_KR/annotate/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/annotate/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/annotate/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/annotate/ko_KR.js new file mode 100644 index 0000000..5a0b897 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/annotate/ko_KR.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: '주석 달기', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/core/index.js b/src/components/@pqina/pintura/locale/ko_KR/core/index.js new file mode 100644 index 0000000..79b5d28 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/core/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/core/ko_KR.js new file mode 100644 index 0000000..84468d4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/core/ko_KR.js @@ -0,0 +1,234 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: '재설정', + labelDefault: '기본', + labelAuto: '자동', + labelNone: '없음', + labelEdit: '편집', + labelClose: '닫기', + labelSupportError: (features) => `${features.join(', ')} not supported on this browser`, + + // defaults + labelColor: '색상', + labelWidth: '너비', + labelSize: '크기', + labelOffset: '오프셋', + labelAmount: '양', + labelInset: '삽입', + labelRadius: '반경', + + // controls + labelColorPalette: '색상 팔레트', + + // sizes + labelSizeExtraSmall: '매우 작은', + labelSizeSmall: '작은', + labelSizeMediumSmall: '중간 작은', + labelSizeMedium: '중간', + labelSizeMediumLarge: '중간 큰', + labelSizeLarge: '큰', + labelSizeExtraLarge: '매우 큰', + + // default buttons + + labelButtonCancel: '취소', + labelButtonUndo: '실행 취소', + labelButtonRedo: '다시 실행', + labelButtonRevert: '되돌리기', + labelButtonExport: '완료', + + // zoom + labelZoomIn: '확대', + labelZoomOut: '축소', + labelZoomFit: '화면에 맞추기', + labelZoomActual: 'Actual size', + iconZoomIn: '', + iconZoomOut: '', + + // icons + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Close', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return '이미지 대기 중'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? '최소 이미지 크기는 {minWidth} × {minHeight}' + : '이미지 로딩 오류'; + if (state.task === 'blob-to-bitmap') return '이미지 준비 중…'; + return '이미지 로딩 중…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return '이미지 업로드 오류'; + return '이미지 업로드 중…'; + } + if (state.error) return '이미지 처리 오류'; + return '이미지 처리 중…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: '이미지 선택', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: '자동 너비', + shapeTitleButtonTextLayoutAutoHeight: '자동 높이', + shapeTitleButtonTextLayoutFixedSize: '고정 크기', + + shapeTitleButtonFlipHorizontal: '수평 뒤집기', + shapeTitleButtonFlipVertical: '수직 뒤집기', + shapeTitleButtonRemove: '제거', + shapeTitleButtonDuplicate: '복제', + shapeTitleButtonMoveToFront: '앞으로 이동', + + shapeLabelInputText: '텍스트 편집', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: '취소', + shapeLabelInputConfirm: '확인', + + shapeLabelStrokeNone: '윤곽선 없음', + + shapeLabelFontStyleNormal: '보통', + shapeLabelFontStyleBold: '굵게', + shapeLabelFontStyleItalic: '이탤릭', + shapeLabelFontStyleItalicBold: '굵은 이탤릭', + + shapeTitleBackgroundColor: '채우기 색상', + + shapeTitleCornerRadius: '모서리 반경', + + shapeTitleFontFamily: '글꼴', + shapeTitleFontSize: '글꼴 크기', + shapeTitleFontStyle: '글꼴 스타일', + shapeTitleLineHeight: '줄 높이', + + shapeTitleLineStart: '시작', + shapeTitleLineEnd: '끝', + shapeTitleStrokeWidth: '선 너비', + shapeTitleStrokeColor: '선 색상', + + shapeTitleLineDecorationBar: '바', + shapeTitleLineDecorationCircle: '원', + shapeTitleLineDecorationSquare: '사각형', + shapeTitleLineDecorationArrow: '화살표', + shapeTitleLineDecorationCircleSolid: '실제 원', + shapeTitleLineDecorationSquareSolid: '실제 사각형', + shapeTitleLineDecorationArrowSolid: '실제 화살표', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: '투명', + shapeTitleColorWhite: '흰색', + shapeTitleColorSilver: '은색', + shapeTitleColorGray: '회색', + shapeTitleColorBlack: '검정색', + shapeTitleColorNavy: '해군색', + shapeTitleColorBlue: '파란색', + shapeTitleColorAqua: '아쿠아', + shapeTitleColorTeal: '청록색', + shapeTitleColorOlive: '올리브', + shapeTitleColorGreen: '녹색', + shapeTitleColorYellow: '노란색', + shapeTitleColorOrange: '주황색', + shapeTitleColorRed: '빨간색', + shapeTitleColorMaroon: '적갈색', + shapeTitleColorFuchsia: '자홍색', + shapeTitleColorPurple: '보라색', + + shapeTitleTextOutline: '텍스트 윤곽', + shapeTitleTextOutlineWidth: '너비', + shapeTitleTextShadow: '텍스트 그림자', + shapeTitleTextShadowBlur: '흐림', + + shapeTitleTextColor: '글꼴 색상', + shapeTitleTextAlign: '텍스트 정렬', + shapeTitleTextAlignLeft: '왼쪽 정렬 텍스트', + shapeTitleTextAlignCenter: '중앙 정렬 텍스트', + shapeTitleTextAlignRight: '오른쪽 정렬 텍스트', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: '이동', + shapeLabelToolView: '보기', + shapeLabelToolSharpie: '샤피', + shapeLabelToolEraser: '지우개', + shapeLabelToolPath: '경로', + shapeLabelToolRectangle: '사각형', + shapeLabelToolEllipse: '타원', + shapeLabelToolArrow: '화살표', + shapeLabelToolLine: '선', + shapeLabelToolText: '텍스트', + shapeLabelToolPreset: '스티커', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: '선택 모드', + shapeTitleBrushSize: '브러시 크기', + + shapeLabelSelectionModeNew: '새로운', + shapeLabelSelectionModeAdd: '추가', + shapeLabelSelectionModeSubtract: '제거', + + shapeLabelToolSelectionBrush: '브러시', + shapeLabelToolSelectionLassoo: 'Lassoo', + shapeLabelToolSelectionRectangle: 'Rectangle marquee', + shapeLabelToolSelectionEllipse: 'Ellipse marquee', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/ko_KR/crop/index.js b/src/components/@pqina/pintura/locale/ko_KR/crop/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/crop/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/crop/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/crop/ko_KR.js new file mode 100644 index 0000000..4c3c210 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/crop/ko_KR.js @@ -0,0 +1,54 @@ +export default { + cropLabel: '자르기', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: '재중심', + cropLabelButtonRotateLeft: '왼쪽으로 회전', + cropLabelButtonRotateRight: '오른쪽으로 회전', + cropLabelButtonFlipHorizontal: '수평 뒤집기', + cropLabelButtonFlipVertical: '수직 뒤집기', + + cropLabelSelectPreset: '자르기 형태', + + cropLabelCropBoundary: '자르기 경계', + cropLabelCropBoundaryEdge: '이미지의 가장자리', + cropLabelCropBoundaryNone: '없음', + + cropLabelTabRotation: '회전', + cropLabelTabZoom: '스케일', +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/decorate/index.js b/src/components/@pqina/pintura/locale/ko_KR/decorate/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/decorate/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/decorate/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/decorate/ko_KR.js new file mode 100644 index 0000000..b6421b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/decorate/ko_KR.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: '장식하기', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/fill/index.js b/src/components/@pqina/pintura/locale/ko_KR/fill/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/fill/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/fill/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/fill/ko_KR.js new file mode 100644 index 0000000..d00e772 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/fill/ko_KR.js @@ -0,0 +1,12 @@ +export default { + fillLabel: '채우기', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/filter/index.js b/src/components/@pqina/pintura/locale/ko_KR/filter/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/filter/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/filter/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/filter/ko_KR.js new file mode 100644 index 0000000..5a7ce45 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/filter/ko_KR.js @@ -0,0 +1,18 @@ +export default { + filterLabel: '필터', + filterIcon: + '', + filterLabelChrome: 'Chrome', + filterLabelFade: 'Fade', + filterLabelCold: 'Cold', + filterLabelWarm: 'Warm', + filterLabelPastel: 'Pastel', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Wash', + filterLabelMonoStark: 'Stark', + filterLabelSepiaDefault: 'Sepia', + filterLabelSepiaBlues: 'Blues', + filterLabelSepiaRust: 'Rust', + filterLabelSepiaColor: 'Color', +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/finetune/index.js b/src/components/@pqina/pintura/locale/ko_KR/finetune/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/finetune/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/finetune/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/finetune/ko_KR.js new file mode 100644 index 0000000..8484740 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/finetune/ko_KR.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: '미세 조정', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Brightness', + finetuneLabelContrast: 'Contrast', + finetuneLabelSaturation: 'Saturation', + finetuneLabelExposure: 'Exposure', + finetuneLabelTemperature: 'Temperature', + finetuneLabelGamma: 'Gamma', + finetuneLabelClarity: 'Clarity', + finetuneLabelVignette: 'Vignette', +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/frame/index.js b/src/components/@pqina/pintura/locale/ko_KR/frame/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/frame/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/frame/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/frame/ko_KR.js new file mode 100644 index 0000000..4cb5a26 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/frame/ko_KR.js @@ -0,0 +1,17 @@ +export default { + frameLabel: '프레임', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Mat', + frameLabelMatRound: 'Bevel', + frameLabelLineSingle: 'Line', + frameLabelLineMultiple: 'Zebra', + frameLabelEdgeSeparate: 'Inset', + frameLabelEdgeOverlap: 'Plus', + frameLabelEdgeCross: 'Lumber', + frameLabelCornerHooks: 'Hook', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/index.d.ts b/src/components/@pqina/pintura/locale/ko_KR/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/index.js b/src/components/@pqina/pintura/locale/ko_KR/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/redact/index.js b/src/components/@pqina/pintura/locale/ko_KR/redact/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/redact/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/redact/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/redact/ko_KR.js new file mode 100644 index 0000000..39f7b80 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/redact/ko_KR.js @@ -0,0 +1,4 @@ +export default { + redactLabel: '검열', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/resize/index.js b/src/components/@pqina/pintura/locale/ko_KR/resize/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/resize/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/resize/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/resize/ko_KR.js new file mode 100644 index 0000000..3d5d434 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/resize/ko_KR.js @@ -0,0 +1,18 @@ +export default { + resizeLabel: '크기 조정', + resizeIcon: '', + + resizeLabelFormCaption: '이미지 출력 크기', + + resizeLabelInputWidth: 'w', + resizeTitleInputWidth: '너비', + resizeLabelInputHeight: 'h', + resizeTitleInputHeight: '높이', + + resizeTitleButtonMaintainAspectRatio: '종횡비 유지', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/retouch/index.js b/src/components/@pqina/pintura/locale/ko_KR/retouch/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/retouch/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/retouch/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/retouch/ko_KR.js new file mode 100644 index 0000000..b59bb55 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/retouch/ko_KR.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: '리터치', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/sticker/index.js b/src/components/@pqina/pintura/locale/ko_KR/sticker/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/sticker/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/sticker/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/sticker/ko_KR.js new file mode 100644 index 0000000..7011ff5 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/sticker/ko_KR.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: '스티커', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/ko_KR/trim/index.js b/src/components/@pqina/pintura/locale/ko_KR/trim/index.js new file mode 100644 index 0000000..e2744cb --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/trim/index.js @@ -0,0 +1 @@ +export { default } from './ko_KR.js'; diff --git a/src/components/@pqina/pintura/locale/ko_KR/trim/ko_KR.js b/src/components/@pqina/pintura/locale/ko_KR/trim/ko_KR.js new file mode 100644 index 0000000..5050e30 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ko_KR/trim/ko_KR.js @@ -0,0 +1,60 @@ +export default { + trimLabel: '자르기', + trimIcon: ``, + + trimLabelPlay: '재생', + trimLabelPause: '일시 정지', + + trimLabelMute: '음소거', + trimLabelUnmute: '음소거 해제', + + trimLabelSplit: '분할', + trimLabelMerge: '병합', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return '미디어 대기 중'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return '최소 미디어 크기는 {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? '초' : '초'; + return `최소 비디오 길이는 {minDuration} ${unit}`; + } else { + return '미디어 로딩 오류'; + } + } + if (state.task === 'blob-to-bitmap') return '미디어 준비 중…'; + return '미디어 로딩 중…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return '미디어 업로드 오류'; + return '미디어 업로드 중…'; + } + if (state.error) return '미디어 처리 오류'; + return '미디어 처리 중…'; + }, + + cropLabelCropBoundaryEdge: '미디어 가장자리', +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/annotate/index.js b/src/components/@pqina/pintura/locale/nb_NO/annotate/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/annotate/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/annotate/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/annotate/nb_NO.js new file mode 100644 index 0000000..4a50e68 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/annotate/nb_NO.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Annoter', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/core/index.js b/src/components/@pqina/pintura/locale/nb_NO/core/index.js new file mode 100644 index 0000000..177b770 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/core/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/core/nb_NO.js new file mode 100644 index 0000000..9bfd41e --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/core/nb_NO.js @@ -0,0 +1,222 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + labelReset: 'Tilbakestill', + labelDefault: 'Standard', + labelAuto: 'Auto', + labelNone: 'Ingen', + labelEdit: 'Rediger', + labelClose: 'Lukk', + labelSupportError: (features) => `${features.join(', ')} støttes ikke på denne nettleseren`, + labelColor: 'Farge', + labelWidth: 'Bredde', + labelSize: 'Størrelse', + labelOffset: 'Forskyvning', + labelAmount: 'Mengde', + labelInset: 'Innsetting', + labelRadius: 'Radius', + labelColorPalette: 'Fargepalett', + labelSizeExtraSmall: 'Ekstra liten', + labelSizeSmall: 'Liten', + labelSizeMediumSmall: 'Medium liten', + labelSizeMedium: 'Medium', + labelSizeMediumLarge: 'Medium stor', + labelSizeLarge: 'Stor', + labelSizeExtraLarge: 'Ekstra stor', + labelButtonCancel: 'Avbryt', + labelButtonUndo: 'Angre', + labelButtonRedo: 'Gjenta', + labelButtonRevert: 'Tilbakestill', + labelButtonExport: 'Ferdig', + labelZoomIn: 'Zoom inn', + labelZoomOut: 'Zoom ut', + labelZoomFit: 'Tilpass til visning', + labelZoomActual: 'Faktisk størrelse', + + iconZoomIn: '', + iconZoomOut: '', + + // icons + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Lukk', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Venter på bilde'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'Minimum bildestørrelse er {minWidth} × {minHeight}' + : 'Feil ved lasting av bilde'; + if (state.task === 'blob-to-bitmap') return 'Forbereder bilde…'; + return 'Laster bilde…'; + }, + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Feil ved opplasting av bilde'; + return 'Laster opp bilde…'; + } + if (state.error) return 'Feil ved behandling av bilde'; + return 'Behandler bilde…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'Velg bilde', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Auto bredde', + shapeTitleButtonTextLayoutAutoHeight: 'Auto høyde', + shapeTitleButtonTextLayoutFixedSize: 'Fast størrelse', + + shapeTitleButtonFlipHorizontal: 'Vend horisontalt', + shapeTitleButtonFlipVertical: 'Vend vertikalt', + shapeTitleButtonRemove: 'Fjern', + shapeTitleButtonDuplicate: 'Dupliser', + shapeTitleButtonMoveToFront: 'Flytt til forgrunnen', + + shapeLabelInputText: 'Rediger tekst', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + + shapeLabelInputCancel: 'Avbryt', + shapeLabelInputConfirm: 'Bekreft', + + shapeLabelStrokeNone: 'Ingen ramme', + + shapeLabelFontStyleNormal: 'Normal', + shapeLabelFontStyleBold: 'Fet', + shapeLabelFontStyleItalic: 'Kursiv', + shapeLabelFontStyleItalicBold: 'Fet kursiv', + + shapeTitleBackgroundColor: 'Fyllfarge', + + shapeTitleCornerRadius: 'Hjørne radius', + + shapeTitleFontFamily: 'Skrift', + shapeTitleFontSize: 'Skriftstørrelse', + shapeTitleFontStyle: 'Skriftstil', + shapeTitleLineHeight: 'Linje høyde', + + shapeTitleLineStart: 'Start', + shapeTitleLineEnd: 'Slutt', + shapeTitleStrokeWidth: 'Linjebredde', + shapeTitleStrokeColor: 'Linjefarge', + + shapeTitleLineDecorationBar: 'Linje', + shapeTitleLineDecorationCircle: 'Sirkel', + shapeTitleLineDecorationSquare: 'Firkant', + shapeTitleLineDecorationArrow: 'Pil', + shapeTitleLineDecorationCircleSolid: 'Fylt sirkel', + shapeTitleLineDecorationSquareSolid: 'Fylt firkant', + shapeTitleLineDecorationArrowSolid: 'Fylt pil', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Gjennomsiktig', + shapeTitleColorWhite: 'Hvit', + shapeTitleColorSilver: 'Sølv', + shapeTitleColorGray: 'Grå', + shapeTitleColorBlack: 'Svart', + shapeTitleColorNavy: 'Marineblå', + shapeTitleColorBlue: 'Blå', + shapeTitleColorAqua: 'Turkis', + shapeTitleColorTeal: 'Blågrønn', + shapeTitleColorOlive: 'Oliven', + shapeTitleColorGreen: 'Grønn', + shapeTitleColorYellow: 'Gul', + shapeTitleColorOrange: 'Oransje', + shapeTitleColorRed: 'Rød', + shapeTitleColorMaroon: 'Rødbrun', + shapeTitleColorFuchsia: 'Fuchsia', + shapeTitleColorPurple: 'Lilla', + + shapeTitleTextOutline: 'Tekstkontur', + shapeTitleTextOutlineWidth: 'Bredde', + shapeTitleTextShadow: 'Tekstskygge', + shapeTitleTextShadowBlur: 'Uskarphet', + + shapeTitleTextColor: 'Skriftfarge', + shapeTitleTextAlign: 'Tekstjustering', + shapeTitleTextAlignLeft: 'Venstrejuster tekst', + shapeTitleTextAlignCenter: 'Midtstill tekst', + shapeTitleTextAlignRight: 'Høyrejuster tekst', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Flytt', + shapeLabelToolView: 'Vis', + shapeLabelToolSharpie: 'Tusj', + shapeLabelToolEraser: 'Slett', + shapeLabelToolPath: 'Sti', + shapeLabelToolRectangle: 'Rektangel', + shapeLabelToolEllipse: 'Ellipse', + shapeLabelToolArrow: 'Pil', + shapeLabelToolLine: 'Linje', + shapeLabelToolText: 'Tekst', + shapeLabelToolPreset: 'Stickers', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Utvalgsmodus', + shapeTitleBrushSize: 'Penselstørrelse', + + shapeLabelSelectionModeNew: 'Ny', + shapeLabelSelectionModeAdd: 'Legg til', + shapeLabelSelectionModeSubtract: 'Fjern', + + shapeLabelToolSelectionBrush: 'Pensel', + shapeLabelToolSelectionLassoo: 'Lasso', + shapeLabelToolSelectionRectangle: 'Rektangelutvalg', + shapeLabelToolSelectionEllipse: 'Ellipseutvalg', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/nb_NO/crop/index.js b/src/components/@pqina/pintura/locale/nb_NO/crop/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/crop/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/crop/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/crop/nb_NO.js new file mode 100644 index 0000000..51c94ac --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/crop/nb_NO.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'Beskjær', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Senter', + cropLabelButtonRotateLeft: 'Roter venstre', + cropLabelButtonRotateRight: 'Roter høyre', + cropLabelButtonFlipHorizontal: 'Vend horisontalt', + cropLabelButtonFlipVertical: 'Vend vertikalt', + + cropLabelSelectPreset: 'Klippeform', + + cropLabelCropBoundary: 'Klippegrense', + cropLabelCropBoundaryEdge: 'Kanten av bildet', + cropLabelCropBoundaryNone: 'Ingen', + + cropLabelTabRotation: 'Rotasjon', + cropLabelTabZoom: 'Skala', +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/decorate/index.js b/src/components/@pqina/pintura/locale/nb_NO/decorate/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/decorate/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/decorate/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/decorate/nb_NO.js new file mode 100644 index 0000000..e86573f --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/decorate/nb_NO.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Dekorer', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/fill/index.js b/src/components/@pqina/pintura/locale/nb_NO/fill/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/fill/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/fill/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/fill/nb_NO.js new file mode 100644 index 0000000..1f3c5a4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/fill/nb_NO.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Fill', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/filter/index.js b/src/components/@pqina/pintura/locale/nb_NO/filter/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/filter/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/filter/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/filter/nb_NO.js new file mode 100644 index 0000000..b9cff25 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/filter/nb_NO.js @@ -0,0 +1,19 @@ +export default { + filterLabel: 'Filter', + filterIcon: + '', + + filterLabelChrome: 'Krom', + filterLabelFade: 'Fade', + filterLabelCold: 'Kald', + filterLabelWarm: 'Varm', + filterLabelPastel: 'Pastell', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Vask', + filterLabelMonoStark: 'Stark', + filterLabelSepiaDefault: 'Sepia', + filterLabelSepiaBlues: 'Blå', + filterLabelSepiaRust: 'Rust', + filterLabelSepiaColor: 'Farge', +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/finetune/index.js b/src/components/@pqina/pintura/locale/nb_NO/finetune/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/finetune/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/finetune/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/finetune/nb_NO.js new file mode 100644 index 0000000..0960d6f --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/finetune/nb_NO.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Finjuster', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Lysstyrke', + finetuneLabelContrast: 'Kontrast', + finetuneLabelSaturation: 'Metning', + finetuneLabelExposure: 'Eksponering', + finetuneLabelTemperature: 'Temperatur', + finetuneLabelGamma: 'Gamma', + finetuneLabelClarity: 'Klarhet', + finetuneLabelVignette: 'Vignett', +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/frame/index.js b/src/components/@pqina/pintura/locale/nb_NO/frame/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/frame/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/frame/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/frame/nb_NO.js new file mode 100644 index 0000000..e5f1225 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/frame/nb_NO.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Ramme', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Mat', + frameLabelMatRound: 'Fas', + frameLabelLineSingle: 'Linje', + frameLabelLineMultiple: 'Zebra', + frameLabelEdgeSeparate: 'Innsetting', + frameLabelEdgeOverlap: 'Plus', + frameLabelEdgeCross: 'Tømmer', + frameLabelCornerHooks: 'Krok', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/index.d.ts b/src/components/@pqina/pintura/locale/nb_NO/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/index.js b/src/components/@pqina/pintura/locale/nb_NO/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/redact/index.js b/src/components/@pqina/pintura/locale/nb_NO/redact/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/redact/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/redact/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/redact/nb_NO.js new file mode 100644 index 0000000..f575284 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/redact/nb_NO.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'Rediger', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/resize/index.js b/src/components/@pqina/pintura/locale/nb_NO/resize/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/resize/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/resize/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/resize/nb_NO.js new file mode 100644 index 0000000..cb02a0b --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/resize/nb_NO.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Endre størrelse', + resizeIcon: + '', + + resizeLabelFormCaption: 'Størrelse på bildeutdata', + + resizeLabelInputWidth: 'b', + resizeTitleInputWidth: 'Bredde', + resizeLabelInputHeight: 'h', + resizeTitleInputHeight: 'Høyde', + + resizeTitleButtonMaintainAspectRatio: 'Behold aspektforhold', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/retouch/index.js b/src/components/@pqina/pintura/locale/nb_NO/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/retouch/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/retouch/nb_NO.js new file mode 100644 index 0000000..af96bdb --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/retouch/nb_NO.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'Retusjere', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/sticker/index.js b/src/components/@pqina/pintura/locale/nb_NO/sticker/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/sticker/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/sticker/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/sticker/nb_NO.js new file mode 100644 index 0000000..8e41e17 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/sticker/nb_NO.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Sticker', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/nb_NO/trim/index.js b/src/components/@pqina/pintura/locale/nb_NO/trim/index.js new file mode 100644 index 0000000..e46d31d --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/trim/index.js @@ -0,0 +1 @@ +export { default } from './nb_NO.js'; diff --git a/src/components/@pqina/pintura/locale/nb_NO/trim/nb_NO.js b/src/components/@pqina/pintura/locale/nb_NO/trim/nb_NO.js new file mode 100644 index 0000000..759795c --- /dev/null +++ b/src/components/@pqina/pintura/locale/nb_NO/trim/nb_NO.js @@ -0,0 +1,60 @@ +export default { + trimLabel: 'Klipp', + trimIcon: ``, + + trimLabelPlay: 'Spill', + trimLabelPause: 'Pause', + + trimLabelMute: 'Stille', + trimLabelUnmute: 'Aktiver lyd', + + trimLabelSplit: 'Del', + trimLabelMerge: 'Slå sammen', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Venter på media'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'Minimum mediestørrelse er {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'secund' : 'secunder'; + return `Minimum videovarighet er {minDuration} ${unit}`; + } else { + return 'Feil ved lasting av media'; + } + } + if (state.task === 'blob-to-bitmap') return 'Forbereder media…'; + return 'Laster media…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Feil ved opplasting av media'; + return 'Laster opp media…'; + } + if (state.error) return 'Feil ved prosessering av media'; + return 'Prosessering av media…'; + }, + + cropLabelCropBoundaryEdge: 'Kanten av media', +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/annotate/index.js b/src/components/@pqina/pintura/locale/nl_NL/annotate/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/annotate/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/annotate/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/annotate/nl_NL.js new file mode 100644 index 0000000..d562eef --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/annotate/nl_NL.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Annoteren', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/core/index.js b/src/components/@pqina/pintura/locale/nl_NL/core/index.js new file mode 100644 index 0000000..7f6e91a --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/core/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/core/nl_NL.js new file mode 100644 index 0000000..e4cc85b --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/core/nl_NL.js @@ -0,0 +1,233 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'Resetten', + labelDefault: 'Standaard', + labelAuto: 'Automatisch', + labelNone: 'Geen', + labelEdit: 'Bewerken', + labelClose: 'Sluiten', + labelSupportError: (features) => `${features.join(', ')} niet ondersteund op deze browser`, + + // defaults + labelColor: 'Kleur', + labelWidth: 'Breedte', + labelSize: 'Afmeting', + labelOffset: 'Offset', + labelAmount: 'Aantal', + labelInset: 'Inzet', + labelRadius: 'Straal', + + // controls + labelColorPalette: 'Kleurenpalet', + + // sizes + labelSizeExtraSmall: 'Extra klein', + labelSizeSmall: 'Klein', + labelSizeMediumSmall: 'Gemiddeld klein', + labelSizeMedium: 'Gemiddeld', + labelSizeMediumLarge: 'Gemiddeld groot', + labelSizeLarge: 'Groot', + labelSizeExtraLarge: 'Extra groot', + + // default buttons + labelButtonCancel: 'Annuleren', + labelButtonUndo: 'ongedaan maken', + labelButtonRedo: 'Opnieuw doen', + labelButtonRevert: 'Terugdraaien', + labelButtonExport: 'Klaar', + + // zoom + labelZoomIn: 'Zoom in', + labelZoomOut: 'Zoom uit', + labelZoomFit: 'Passend maken', + labelZoomActual: 'Echte grootte', + iconZoomIn: '', + iconZoomOut: '', + + // icons + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Sluiten', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Wacht op afbeelding'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'Minimale afbeelding grootte is {minWidth} × {minHeight}' + : 'Probleem met laden afbeelding'; + if (state.task === 'blob-to-bitmap') return 'Bezig met voorbereiden afbeelding…'; + return 'Bezig met laden afbeelding…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Probleem met uploaden van afbeelding'; + return 'Afbeelding aan het uploaden…'; + } + if (state.error) return 'Probleem met verwerken van afbeelding'; + return 'Bezig met verwerken van afbeelding…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'Afbeelding selecteren', + + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Automatische breedte', + shapeTitleButtonTextLayoutAutoHeight: 'Automatische hoogte', + shapeTitleButtonTextLayoutFixedSize: 'Vaste afmetingen', + + shapeTitleButtonFlipHorizontal: 'Spiegel Horizontaal', + shapeTitleButtonFlipVertical: 'Spiegel Verticaal', + shapeTitleButtonRemove: 'Verwijderen', + shapeTitleButtonDuplicate: 'Dupliceren', + shapeTitleButtonMoveToFront: 'Naar voren verplaatsen', + + shapeLabelInputText: 'Text bewerken', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: 'Annuleren', + shapeLabelInputConfirm: 'Bevestigen', + + shapeLabelStrokeNone: 'Geen rand', + + shapeLabelFontStyleNormal: 'Normal', + shapeLabelFontStyleBold: 'Bold', + shapeLabelFontStyleItalic: 'Italic', + shapeLabelFontStyleItalicBold: 'Bold Italic', + + shapeTitleBackgroundColor: 'Achtergrond kleur', + shapeTitleCornerRadius: 'Hoekradius', + + shapeTitleFontFamily: 'Lettertype', + shapeTitleFontSize: 'Lettertype grootte', + shapeTitleFontStyle: 'Lettertype stijl', + shapeTitleLineHeight: 'Lijnhoogte', + + shapeTitleLineStart: 'Start', + shapeTitleLineEnd: 'Eind', + shapeTitleStrokeWidth: 'Lijn dikte', + shapeTitleStrokeColor: 'Lijn kleur', + + shapeTitleLineDecorationBar: 'Balk', + shapeTitleLineDecorationCircle: 'Circel', + shapeTitleLineDecorationSquare: 'Vierkant', + shapeTitleLineDecorationArrow: 'Pijl', + shapeTitleLineDecorationCircleSolid: 'Circel gevuld', + shapeTitleLineDecorationSquareSolid: 'Vierkant gevuld', + shapeTitleLineDecorationArrowSolid: 'Pijl gevuld', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Transparant', + shapeTitleColorWhite: 'Wit', + shapeTitleColorSilver: 'Zilver', + shapeTitleColorGray: 'Grijs', + shapeTitleColorBlack: 'Zwart', + shapeTitleColorNavy: 'Marine', + shapeTitleColorBlue: 'Blauw', + shapeTitleColorAqua: 'Water', + shapeTitleColorTeal: 'Groenblauw', + shapeTitleColorOlive: 'Olijf', + shapeTitleColorGreen: 'Groen', + shapeTitleColorYellow: 'Geel', + shapeTitleColorOrange: 'Oranje', + shapeTitleColorRed: 'Rood', + shapeTitleColorMaroon: 'Kastanjebruin', + shapeTitleColorFuchsia: 'Fuchsia', + shapeTitleColorPurple: 'Paars', + + shapeTitleTextOutline: 'Tekstomlijning', + shapeTitleTextOutlineWidth: 'Breedte', + shapeTitleTextShadow: 'Tekstschaduw', + shapeTitleTextShadowBlur: 'Vervaging', + + shapeTitleTextColor: 'Lettertype kleur', + shapeTitleTextAlign: 'Tekst uitlijning', + shapeTitleTextAlignLeft: 'Tekst links uitlijnen', + shapeTitleTextAlignCenter: 'Tekst midden uitlijnen', + shapeTitleTextAlignRight: 'Tekst rechts uitlijnen', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Verplaatsen', + shapeLabelToolView: 'Bekijken', + shapeLabelToolSharpie: 'Sharpie', + shapeLabelToolEraser: 'Gom', + shapeLabelToolPath: 'Pad', + shapeLabelToolRectangle: 'Rechthoek', + shapeLabelToolEllipse: 'Ovaal', + shapeLabelToolArrow: 'Pijl', + shapeLabelToolLine: 'Lijn', + shapeLabelToolText: 'Tekst', + shapeLabelToolPreset: 'Stickers', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Selectiemodus', + shapeTitleBrushSize: 'Penseelgrootte', + + shapeLabelSelectionModeNew: 'Nieuw', + shapeLabelSelectionModeAdd: 'Toevoegen', + shapeLabelSelectionModeSubtract: 'Verwijderen', + + shapeLabelToolSelectionBrush: 'Penseel', + shapeLabelToolSelectionLassoo: 'Lasso', + shapeLabelToolSelectionRectangle: 'Rechthoek selectie', + shapeLabelToolSelectionEllipse: 'Ellips selectie', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/nl_NL/crop/index.js b/src/components/@pqina/pintura/locale/nl_NL/crop/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/crop/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/crop/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/crop/nl_NL.js new file mode 100644 index 0000000..fa5ab9c --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/crop/nl_NL.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'Bijsnijden', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Centreren', + cropLabelButtonRotateLeft: 'Roteer linksom', + cropLabelButtonRotateRight: 'Roteer rechtsom', + cropLabelButtonFlipHorizontal: 'Spiegel horizontaal', + cropLabelButtonFlipVertical: 'Spiegel verticaal', + + cropLabelSelectPreset: 'Kies bijsnijdvorm', + + cropLabelCropBoundary: 'Bijsnijd grens', + cropLabelCropBoundaryEdge: 'Rand van afbeelding', + cropLabelCropBoundaryNone: 'Geen', + + cropLabelTabRotation: 'Rotatie', + cropLabelTabZoom: 'Schalen', +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/decorate/index.js b/src/components/@pqina/pintura/locale/nl_NL/decorate/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/decorate/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/decorate/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/decorate/nl_NL.js new file mode 100644 index 0000000..ad84e46 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/decorate/nl_NL.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Versieren', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/fill/index.js b/src/components/@pqina/pintura/locale/nl_NL/fill/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/fill/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/fill/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/fill/nl_NL.js new file mode 100644 index 0000000..6434b80 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/fill/nl_NL.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Vullen', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/filter/index.js b/src/components/@pqina/pintura/locale/nl_NL/filter/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/filter/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/filter/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/filter/nl_NL.js new file mode 100644 index 0000000..6983da0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/filter/nl_NL.js @@ -0,0 +1,18 @@ +export default { + filterLabel: 'Filteren', + filterIcon: + '', + filterLabelChrome: 'Chrome', + filterLabelFade: 'Fade', + filterLabelCold: 'Cold', + filterLabelWarm: 'Warm', + filterLabelPastel: 'Pastel', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Wash', + filterLabelMonoStark: 'Stark', + filterLabelSepiaDefault: 'Sepia', + filterLabelSepiaBlues: 'Blues', + filterLabelSepiaRust: 'Rust', + filterLabelSepiaColor: 'Color', +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/finetune/index.js b/src/components/@pqina/pintura/locale/nl_NL/finetune/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/finetune/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/finetune/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/finetune/nl_NL.js new file mode 100644 index 0000000..4cbc207 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/finetune/nl_NL.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Kleuren', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Helderheid', + finetuneLabelContrast: 'Contrast', + finetuneLabelSaturation: 'Verzadiging', + finetuneLabelExposure: 'Belichting', + finetuneLabelTemperature: 'Temperatuur', + finetuneLabelGamma: 'Gamma', + finetuneLabelClarity: 'Scherpte', + finetuneLabelVignette: 'Vignet', +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/frame/index.js b/src/components/@pqina/pintura/locale/nl_NL/frame/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/frame/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/frame/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/frame/nl_NL.js new file mode 100644 index 0000000..38d89e7 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/frame/nl_NL.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Kader', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Mat', + frameLabelMatRound: 'Bevel', + frameLabelLineSingle: 'Line', + frameLabelLineMultiple: 'Zebra', + frameLabelEdgeSeparate: 'Inset', + frameLabelEdgeOverlap: 'Plus', + frameLabelEdgeCross: 'Lumber', + frameLabelCornerHooks: 'Hook', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/index.d.ts b/src/components/@pqina/pintura/locale/nl_NL/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/index.js b/src/components/@pqina/pintura/locale/nl_NL/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/redact/index.js b/src/components/@pqina/pintura/locale/nl_NL/redact/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/redact/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/redact/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/redact/nl_NL.js new file mode 100644 index 0000000..15cad00 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/redact/nl_NL.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'Redigeren', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/resize/index.js b/src/components/@pqina/pintura/locale/nl_NL/resize/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/resize/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/resize/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/resize/nl_NL.js new file mode 100644 index 0000000..9871114 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/resize/nl_NL.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Schalen', + resizeIcon: + '', + + resizeLabelFormCaption: 'Afbeelding grootte', + + resizeLabelInputWidth: 'b', + resizeTitleInputWidth: 'Breedte', + resizeLabelInputHeight: 'h', + resizeTitleInputHeight: 'Hoogte', + + resizeTitleButtonMaintainAspectRatio: 'Vehoudingen behouden', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/retouch/index.js b/src/components/@pqina/pintura/locale/nl_NL/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/retouch/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/retouch/nl_NL.js new file mode 100644 index 0000000..dc4f7b0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/retouch/nl_NL.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'Retoucheren', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/sticker/index.js b/src/components/@pqina/pintura/locale/nl_NL/sticker/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/sticker/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/sticker/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/sticker/nl_NL.js new file mode 100644 index 0000000..5a6aae4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/sticker/nl_NL.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Stickers', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/nl_NL/trim/index.js b/src/components/@pqina/pintura/locale/nl_NL/trim/index.js new file mode 100644 index 0000000..1fea4b2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/trim/index.js @@ -0,0 +1 @@ +export { default } from './nl_NL.js'; diff --git a/src/components/@pqina/pintura/locale/nl_NL/trim/nl_NL.js b/src/components/@pqina/pintura/locale/nl_NL/trim/nl_NL.js new file mode 100644 index 0000000..e4a43c2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/nl_NL/trim/nl_NL.js @@ -0,0 +1,61 @@ +export default { + trimLabel: 'Bijsnijden', + trimIcon: ``, + + trimLabelPlay: 'Afspelen', + trimLabelPause: 'Pauzeren', + + trimLabelMute: 'Dempen', + trimLabelUnmute: 'Dempen opheffen', + + trimLabelSplit: 'Splitsen', + trimLabelMerge: 'Samenvoegen', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Wacht op media'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'Minimale media grootte is {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'seconde' : 'seconden'; + return `Minimale video duur is {minDuration} ${unit}`; + } else { + return 'Probleem met laden media'; + } + } + if (state.task === 'blob-to-bitmap') return 'Bezig met voorbereiden media…'; + return 'Bezig met laden media…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Probleem met uploaden van media'; + return 'Media aan het uploaden…'; + } + if (state.error) return 'Probleem met verwerken van media'; + return 'Bezig met verwerken van media…'; + }, + + cropLabelCropBoundaryEdge: 'Rand van media', +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/annotate/index.js b/src/components/@pqina/pintura/locale/pt_PT/annotate/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/annotate/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/annotate/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/annotate/pt_PT.js new file mode 100644 index 0000000..8329e8b --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/annotate/pt_PT.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Anotar', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/core/index.js b/src/components/@pqina/pintura/locale/pt_PT/core/index.js new file mode 100644 index 0000000..3463acc --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/core/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/core/pt_PT.js new file mode 100644 index 0000000..748e728 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/core/pt_PT.js @@ -0,0 +1,236 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'Redefinir', + labelDefault: 'Padrão', + labelAuto: 'Auto', + labelNone: 'Nenhum', + labelEdit: 'Editar', + labelClose: 'Fechar', + labelSupportError: (features) => `${features.join(', ')} não é suportado neste navegador`, + + // defaults + labelColor: 'Cor', + labelWidth: 'Largura', + labelSize: 'Tamanho', + labelOffset: 'Deslocamento', + labelAmount: 'Quantidade', + labelInset: 'Reentrância', + labelRadius: 'Raio', + + // controls + labelColorPalette: 'Paleta de cores', + + // sizes + labelSizeExtraSmall: 'Extra pequeno', + labelSizeSmall: 'Pequeno', + labelSizeMediumSmall: 'Médio pequeno', + labelSizeMedium: 'Médio', + labelSizeMediumLarge: 'Médio grande', + labelSizeLarge: 'Grande', + labelSizeExtraLarge: 'Extra grande', + + // default buttons + + labelButtonCancel: 'Cancelar', + labelButtonUndo: 'Desfazer', + labelButtonRedo: 'Refazer', + labelButtonRevert: 'Reverter', + labelButtonExport: 'Concluir', + + // zoom + labelZoomIn: 'Aumentar zoom', + labelZoomOut: 'Diminuir zoom', + labelZoomFit: 'Ajustar à visualização', + labelZoomActual: 'Tamanho real', + iconZoomIn: '', + iconZoomOut: '', + + // icons + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Fechar', + statusIconButtonClose: IconCross, + + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Aguardando imagem'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'O tamanho mínimo da imagem é {minWidth} × {minHeight}' + : 'Erro ao carregar a imagem'; + if (state.task === 'blob-to-bitmap') return 'Preparando imagem…'; + return 'Carregando imagem…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Erro ao enviar imagem'; + return 'Enviando imagem…'; + } + if (state.error) return 'Erro ao processar imagem'; + return 'Processando imagem…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'Selecionar imagem', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Largura automática', + shapeTitleButtonTextLayoutAutoHeight: 'Altura automática', + shapeTitleButtonTextLayoutFixedSize: 'Tamanho fixo', + + shapeTitleButtonFlipHorizontal: 'Inverter horizontalmente', + shapeTitleButtonFlipVertical: 'Inverter verticalmente', + shapeTitleButtonRemove: 'Remover', + shapeTitleButtonDuplicate: 'Duplicar', + shapeTitleButtonMoveToFront: 'Mover para frente', + + shapeLabelInputText: 'Editar texto', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + + shapeLabelInputCancel: 'Cancelar', + shapeLabelInputConfirm: 'Confirmar', + + shapeLabelStrokeNone: 'Sem contorno', + + shapeLabelFontStyleNormal: 'Normal', + shapeLabelFontStyleBold: 'Negrito', + shapeLabelFontStyleItalic: 'Itálico', + shapeLabelFontStyleItalicBold: 'Itálico negrito', + + shapeTitleBackgroundColor: 'Cor de preenchimento', + + shapeTitleCornerRadius: 'Raio do canto', + + shapeTitleFontFamily: 'Fonte', + shapeTitleFontSize: 'Tamanho da fonte', + shapeTitleFontStyle: 'Estilo da fonte', + shapeTitleLineHeight: 'Altura da linha', + + shapeTitleLineStart: 'Iniciar', + shapeTitleLineEnd: 'Terminar', + shapeTitleStrokeWidth: 'Largura da linha', + shapeTitleStrokeColor: 'Cor da linha', + + shapeTitleLineDecorationBar: 'Barra', + shapeTitleLineDecorationCircle: 'Círculo', + shapeTitleLineDecorationSquare: 'Quadrado', + shapeTitleLineDecorationArrow: 'Seta', + shapeTitleLineDecorationCircleSolid: 'Círculo sólido', + shapeTitleLineDecorationSquareSolid: 'Quadrado sólido', + shapeTitleLineDecorationArrowSolid: 'Seta sólida', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Transparente', + shapeTitleColorWhite: 'Branco', + shapeTitleColorSilver: 'Prata', + shapeTitleColorGray: 'Cinza', + shapeTitleColorBlack: 'Preto', + shapeTitleColorNavy: 'Marinho', + shapeTitleColorBlue: 'Azul', + shapeTitleColorAqua: 'Aqua', + shapeTitleColorTeal: 'Verde-azulado', + shapeTitleColorOlive: 'Oliva', + shapeTitleColorGreen: 'Verde', + shapeTitleColorYellow: 'Amarelo', + shapeTitleColorOrange: 'Laranja', + shapeTitleColorRed: 'Vermelho', + shapeTitleColorMaroon: 'Bordô', + shapeTitleColorFuchsia: 'Fúcsia', + shapeTitleColorPurple: 'Roxo', + + shapeTitleTextOutline: 'Contorno do texto', + shapeTitleTextOutlineWidth: 'Largura', + shapeTitleTextShadow: 'Sombra do texto', + shapeTitleTextShadowBlur: 'Desfoque', + + shapeTitleTextColor: 'Cor do texto', + shapeTitleTextAlign: 'Alinhar texto', + shapeTitleTextAlignLeft: 'Alinhar à esquerda', + shapeTitleTextAlignCenter: 'Centralizar', + shapeTitleTextAlignRight: 'Alinhar à direita', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Mover', + shapeLabelToolView: 'Visualizar', + shapeLabelToolSharpie: 'Marcador', + shapeLabelToolEraser: 'Borracha', + shapeLabelToolPath: 'Caminho', + shapeLabelToolRectangle: 'Retângulo', + shapeLabelToolEllipse: 'Elipse', + shapeLabelToolArrow: 'Seta', + shapeLabelToolLine: 'Linha', + shapeLabelToolText: 'Texto', + shapeLabelToolPreset: 'Adesivos', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Modo de seleção', + shapeTitleBrushSize: 'Tamanho do pincel', + + shapeLabelSelectionModeNew: 'Novo', + shapeLabelSelectionModeAdd: 'Adicionar', + shapeLabelSelectionModeSubtract: 'Remover', + + shapeLabelToolSelectionBrush: 'Pincel', + shapeLabelToolSelectionLassoo: 'Laço', + shapeLabelToolSelectionRectangle: 'Seleção retangular', + shapeLabelToolSelectionEllipse: 'Seleção elíptica', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/pt_PT/crop/index.js b/src/components/@pqina/pintura/locale/pt_PT/crop/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/crop/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/crop/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/crop/pt_PT.js new file mode 100644 index 0000000..76d709c --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/crop/pt_PT.js @@ -0,0 +1,55 @@ +export default { + cropLabel: 'Cortar', + + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Recentrar', + cropLabelButtonRotateLeft: 'Rodar para a esquerda', + cropLabelButtonRotateRight: 'Rodar para a direita', + cropLabelButtonFlipHorizontal: 'Inverter horizontalmente', + cropLabelButtonFlipVertical: 'Inverter verticalmente', + + cropLabelSelectPreset: 'Formato do corte', + + cropLabelCropBoundary: 'Limites do corte', + cropLabelCropBoundaryEdge: 'Borda da imagem', + cropLabelCropBoundaryNone: 'Nenhum', + + cropLabelTabRotation: 'Rotação', + cropLabelTabZoom: 'Escala', +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/decorate/index.js b/src/components/@pqina/pintura/locale/pt_PT/decorate/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/decorate/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/decorate/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/decorate/pt_PT.js new file mode 100644 index 0000000..9fa960f --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/decorate/pt_PT.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Decorar', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/fill/index.js b/src/components/@pqina/pintura/locale/pt_PT/fill/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/fill/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/fill/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/fill/pt_PT.js new file mode 100644 index 0000000..164a46c --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/fill/pt_PT.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Preencher', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/filter/index.js b/src/components/@pqina/pintura/locale/pt_PT/filter/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/filter/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/filter/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/filter/pt_PT.js new file mode 100644 index 0000000..25750b0 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/filter/pt_PT.js @@ -0,0 +1,19 @@ +export default { + filterLabel: 'Filtro', + filterIcon: + '', + + filterLabelChrome: 'Chrome', + filterLabelFade: 'Desvanecer', + filterLabelCold: 'Frio', + filterLabelWarm: 'Quente', + filterLabelPastel: 'Pastel', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Lavagem', + filterLabelMonoStark: 'Acentuado', + filterLabelSepiaDefault: 'Sépia', + filterLabelSepiaBlues: 'Azuis', + filterLabelSepiaRust: 'Ferrugem', + filterLabelSepiaColor: 'Colorido', +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/finetune/index.js b/src/components/@pqina/pintura/locale/pt_PT/finetune/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/finetune/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/finetune/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/finetune/pt_PT.js new file mode 100644 index 0000000..f534849 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/finetune/pt_PT.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Ajuste Fino', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Brilho', + finetuneLabelContrast: 'Contraste', + finetuneLabelSaturation: 'Saturação', + finetuneLabelExposure: 'Exposição', + finetuneLabelTemperature: 'Temperatura', + finetuneLabelGamma: 'Gama', + finetuneLabelClarity: 'Clareza', + finetuneLabelVignette: 'Vinheta', +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/frame/index.js b/src/components/@pqina/pintura/locale/pt_PT/frame/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/frame/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/frame/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/frame/pt_PT.js new file mode 100644 index 0000000..5ed43d1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/frame/pt_PT.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Moldura', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Fosco', + frameLabelMatRound: 'Chanfrado', + frameLabelLineSingle: 'Linha', + frameLabelLineMultiple: 'Listrado', + frameLabelEdgeSeparate: 'Separado', + frameLabelEdgeOverlap: 'Superposto', + frameLabelEdgeCross: 'Cruzado', + frameLabelCornerHooks: 'Gancho', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/index.d.ts b/src/components/@pqina/pintura/locale/pt_PT/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/index.js b/src/components/@pqina/pintura/locale/pt_PT/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/redact/index.js b/src/components/@pqina/pintura/locale/pt_PT/redact/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/redact/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/redact/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/redact/pt_PT.js new file mode 100644 index 0000000..a48aa9a --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/redact/pt_PT.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'Redigir', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/resize/index.js b/src/components/@pqina/pintura/locale/pt_PT/resize/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/resize/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/resize/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/resize/pt_PT.js new file mode 100644 index 0000000..114b317 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/resize/pt_PT.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Redimensionar', + resizeIcon: + '', + + resizeLabelFormCaption: 'Tamanho de saída da imagem', + + resizeLabelInputWidth: 'l', + resizeTitleInputWidth: 'Largura', + resizeLabelInputHeight: 'a', + resizeTitleInputHeight: 'Altura', + + resizeTitleButtonMaintainAspectRatio: 'Manter proporção', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/retouch/index.js b/src/components/@pqina/pintura/locale/pt_PT/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/retouch/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/retouch/pt_PT.js new file mode 100644 index 0000000..0067734 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/retouch/pt_PT.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'Retocar', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/sticker/index.js b/src/components/@pqina/pintura/locale/pt_PT/sticker/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/sticker/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/sticker/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/sticker/pt_PT.js new file mode 100644 index 0000000..2bb5305 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/sticker/pt_PT.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Adesivo', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/pt_PT/trim/index.js b/src/components/@pqina/pintura/locale/pt_PT/trim/index.js new file mode 100644 index 0000000..890b019 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/trim/index.js @@ -0,0 +1 @@ +export { default } from './pt_PT.js'; diff --git a/src/components/@pqina/pintura/locale/pt_PT/trim/pt_PT.js b/src/components/@pqina/pintura/locale/pt_PT/trim/pt_PT.js new file mode 100644 index 0000000..8d2b2d6 --- /dev/null +++ b/src/components/@pqina/pintura/locale/pt_PT/trim/pt_PT.js @@ -0,0 +1,60 @@ +export default { + trimLabel: 'Cortar', + trimIcon: ``, + + trimLabelPlay: 'Reproduzir', + trimLabelPause: 'Pausar', + + trimLabelMute: 'Mudo', + trimLabelUnmute: 'Ativar som', + + trimLabelSplit: 'Dividir', + trimLabelMerge: 'Mesclar', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Aguardando mídia'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'O tamanho mínimo da mídia é {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'segundo' : 'segundos'; + return `Duração mínima do vídeo é de {minDuration} ${unit}`; + } else { + return 'Erro ao carregar mídia'; + } + } + if (state.task === 'blob-to-bitmap') return 'Preparando mídia…'; + return 'Carregando mídia…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Erro ao enviar mídia'; + return 'Enviando mídia…'; + } + if (state.error) return 'Erro ao processar mídia'; + return 'Processando mídia…'; + }, + + cropLabelCropBoundaryEdge: 'Borda da mídia', +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/annotate/index.js b/src/components/@pqina/pintura/locale/ru_RU/annotate/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/annotate/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/annotate/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/annotate/ru_RU.js new file mode 100644 index 0000000..01ae076 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/annotate/ru_RU.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Аннотировать', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/core/index.js b/src/components/@pqina/pintura/locale/ru_RU/core/index.js new file mode 100644 index 0000000..f8439d4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/core/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/core/ru_RU.js new file mode 100644 index 0000000..fb48e38 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/core/ru_RU.js @@ -0,0 +1,231 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'Сброс', + labelDefault: 'По умолчанию', + labelAuto: 'Авто', + labelNone: 'Нет', + labelEdit: 'Изменить', + labelClose: 'Закрыть', + labelSupportError: (features) => `${features.join(', ')} не поддерживается в этом браузере`, + + // defaults + labelColor: 'Цвет', + labelWidth: 'Ширина', + labelSize: 'Размер', + labelOffset: 'Смещение', + labelAmount: 'Количество', + labelInset: 'Вставка', + labelRadius: 'Радиус', + + // controls + labelColorPalette: 'Цветовая палитра', + + // sizes + labelSizeExtraSmall: 'Очень маленький', + labelSizeSmall: 'Маленький', + labelSizeMedium: 'Средний', + labelSizeMediumSmall: 'Средний-маленький', + labelSizeMediumLarge: 'Средний-большой', + labelSizeLarge: 'Большой', + labelSizeExtraLarge: 'Очень большой', + + // unused? + labelButtonRevert: 'Вернуть', + labelButtonCancel: 'Отмена', + labelButtonUndo: 'Возврат', + labelButtonRedo: 'Повтор', + labelButtonExport: 'Готово', + + // zoom + labelZoomIn: 'Приблизить', + labelZoomOut: 'Уменьшить', + labelZoomFit: 'Подходящий', + labelZoomActual: 'Pеальный размер', + iconZoomIn: '', + iconZoomOut: '', + + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Закрыть', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Ожидание изображения'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'Минимальный размер: {minWidth} × {minHeight}' + : 'Ошибка загрузки изображения'; + if (state.task === 'blob-to-bitmap') return 'Подготовка образа…'; + return 'Загрузка изображения…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Ошибка загрузки изображения'; + return 'Загрузка изображения…'; + } + if (state.error) return 'Ошибка обработки изображения'; + return 'Обработка изображения…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'Выбрать изображение', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Автоширина', + shapeTitleButtonTextLayoutAutoHeight: 'Автовысота', + shapeTitleButtonTextLayoutFixedSize: 'Фиксированный размер', + + shapeTitleButtonFlipHorizontal: 'Отразить по горизонтали', + shapeTitleButtonFlipVertical: 'Отразить по вертикали', + shapeTitleButtonRemove: 'Убрать', + shapeTitleButtonDuplicate: 'Дублировать', + shapeTitleButtonMoveToFront: 'Переместить вперед', + + shapeLabelInputText: 'Изменить текст', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: 'Отмена', + shapeLabelInputConfirm: 'Подтвердить', + + shapeLabelStrokeNone: 'Нет контура', + + shapeLabelFontStyleNormal: 'Обычный', + shapeLabelFontStyleBold: 'Жирный', + shapeLabelFontStyleItalic: 'Курсив', + shapeLabelFontStyleItalicBold: 'Жирный курсив', + + shapeTitleBackgroundColor: 'Цвет заливки', + shapeTitleCornerRadius: 'Угловой радиус', + + shapeTitleFontFamily: 'Шрифт', + shapeTitleFontSize: 'Размер шрифта', + shapeTitleFontStyle: 'Стиль шрифта', + shapeTitleLineHeight: 'Интерлиньяж', + + shapeTitleLineStart: 'Начало', + shapeTitleLineEnd: 'Конец', + shapeTitleStrokeWidth: 'Ширина линии', + shapeTitleStrokeColor: 'Цвет линии', + + shapeTitleLineDecorationBar: 'Полоса', + shapeTitleLineDecorationCircle: 'Круг', + shapeTitleLineDecorationSquare: 'Квадрат', + shapeTitleLineDecorationArrow: 'Стрелка', + shapeTitleLineDecorationCircleSolid: 'Цветной круг', + shapeTitleLineDecorationSquareSolid: 'Цветной квадрат', + shapeTitleLineDecorationArrowSolid: 'Цветная стрелка', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Прозрачно', + shapeTitleColorWhite: 'Белый', + shapeTitleColorSilver: 'Серебристый', + shapeTitleColorGray: 'Серый', + shapeTitleColorBlack: 'Черный', + shapeTitleColorNavy: 'Темно-синий', + shapeTitleColorBlue: 'Синий', + shapeTitleColorAqua: 'Голубой', + shapeTitleColorTeal: 'Бирюзовый', + shapeTitleColorOlive: 'Оливковый', + shapeTitleColorGreen: 'Зеленый', + shapeTitleColorYellow: 'Желтый', + shapeTitleColorOrange: 'Оранжевый', + shapeTitleColorRed: 'Красный', + shapeTitleColorMaroon: 'Каштановый', + shapeTitleColorFuchsia: 'Фуксия', + shapeTitleColorPurple: 'Фиолетовый', + + shapeTitleTextOutline: 'Контур текста', + shapeTitleTextOutlineWidth: 'Ширина', + shapeTitleTextShadow: 'Тень текста', + shapeTitleTextShadowBlur: 'Размытие', + + shapeTitleTextColor: 'Цвет шрифта', + shapeTitleTextAlign: 'Выравнивание текста', + shapeTitleTextAlignLeft: 'Выровнять текст по левому краю', + shapeTitleTextAlignCenter: 'Выровнять текст по центру', + shapeTitleTextAlignRight: 'Выровнять текст по правому краю', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Перемещаться', + shapeLabelToolView: 'Смотреть', + shapeLabelToolSharpie: 'Маркер', + shapeLabelToolEraser: 'Ластик', + shapeLabelToolPath: 'путь', + shapeLabelToolRectangle: 'Прямоугольник', + shapeLabelToolEllipse: 'Эллипс', + shapeLabelToolArrow: 'Стрелка', + shapeLabelToolLine: 'Линия', + shapeLabelToolText: 'Текст', + shapeLabelToolPreset: 'Стикеры', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Режим выбора', + shapeTitleBrushSize: 'Размер кисти', + + shapeLabelSelectionModeNew: 'Новый', + shapeLabelSelectionModeAdd: 'Добавить', + shapeLabelSelectionModeSubtract: 'Удалить', + + shapeLabelToolSelectionBrush: 'Кисть', + shapeLabelToolSelectionLassoo: 'Лассо', + shapeLabelToolSelectionRectangle: 'Прямоугольное выделение', + shapeLabelToolSelectionEllipse: 'Эллиптическое выделение', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/ru_RU/crop/index.js b/src/components/@pqina/pintura/locale/ru_RU/crop/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/crop/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/crop/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/crop/ru_RU.js new file mode 100644 index 0000000..e044a97 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/crop/ru_RU.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'Обрезать', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Заново отцентровать', + cropLabelButtonRotateLeft: 'Вращать влево', + cropLabelButtonRotateRight: 'Вращать вправо', + cropLabelButtonFlipHorizontal: 'Отразить по горизонтали', + cropLabelButtonFlipVertical: 'Отразить по вертикали', + + cropLabelSelectPreset: 'Обрезать фигуру', + + cropLabelCropBoundary: 'Обрезать за границей', + cropLabelCropBoundaryEdge: 'Край изображения', + cropLabelCropBoundaryNone: 'Нет', + + cropLabelTabRotation: 'Вращение', + cropLabelTabZoom: 'Увеличить', +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/decorate/index.js b/src/components/@pqina/pintura/locale/ru_RU/decorate/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/decorate/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/decorate/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/decorate/ru_RU.js new file mode 100644 index 0000000..b38261c --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/decorate/ru_RU.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Украсить', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/fill/index.js b/src/components/@pqina/pintura/locale/ru_RU/fill/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/fill/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/fill/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/fill/ru_RU.js new file mode 100644 index 0000000..aa89112 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/fill/ru_RU.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Заливка', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/filter/index.js b/src/components/@pqina/pintura/locale/ru_RU/filter/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/filter/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/filter/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/filter/ru_RU.js new file mode 100644 index 0000000..0ddd3d7 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/filter/ru_RU.js @@ -0,0 +1,18 @@ +export default { + filterLabel: 'Фильтр', + filterIcon: + '', + filterLabelChrome: 'Хром', + filterLabelFade: 'Выцветание', + filterLabelCold: 'Холодный', + filterLabelWarm: 'Теплый', + filterLabelPastel: 'Пастель', + filterLabelMonoDefault: 'Моно', + filterLabelMonoNoir: 'Нуар', + filterLabelMonoWash: 'Размытие', + filterLabelMonoStark: 'Резко', + filterLabelSepiaDefault: 'Сепия', + filterLabelSepiaBlues: 'Оттенки синего', + filterLabelSepiaRust: 'Ржавчина', + filterLabelSepiaColor: 'Цвет', +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/finetune/index.js b/src/components/@pqina/pintura/locale/ru_RU/finetune/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/finetune/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/finetune/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/finetune/ru_RU.js new file mode 100644 index 0000000..8f7ef31 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/finetune/ru_RU.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Подстройка', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Яркость', + finetuneLabelContrast: 'Контраст', + finetuneLabelSaturation: 'Насыщенность', + finetuneLabelExposure: 'Экспозиция', + finetuneLabelTemperature: 'Температура', + finetuneLabelGamma: 'Гамма', + finetuneLabelClarity: 'Четкость', + finetuneLabelVignette: 'Виньетка', +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/frame/index.js b/src/components/@pqina/pintura/locale/ru_RU/frame/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/frame/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/frame/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/frame/ru_RU.js new file mode 100644 index 0000000..42f7a6e --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/frame/ru_RU.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Рамка', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Матовая', + frameLabelMatRound: 'С фаской', + frameLabelLineSingle: 'Линия', + frameLabelLineMultiple: 'Зебра', + frameLabelEdgeSeparate: 'Вставка', + frameLabelEdgeOverlap: 'Плюс', + frameLabelEdgeCross: 'Дерево', + frameLabelCornerHooks: 'Крюк', + frameLabelPolaroid: 'Полароид', +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/index.d.ts b/src/components/@pqina/pintura/locale/ru_RU/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/index.js b/src/components/@pqina/pintura/locale/ru_RU/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/redact/index.js b/src/components/@pqina/pintura/locale/ru_RU/redact/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/redact/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/redact/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/redact/ru_RU.js new file mode 100644 index 0000000..b5d9989 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/redact/ru_RU.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'редактировать', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/resize/index.js b/src/components/@pqina/pintura/locale/ru_RU/resize/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/resize/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/resize/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/resize/ru_RU.js new file mode 100644 index 0000000..f9c0280 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/resize/ru_RU.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Изменить размер', + resizeIcon: + '', + + resizeLabelFormCaption: 'Размер вывода изображения', + + resizeLabelInputWidth: 'ш', + resizeTitleInputWidth: 'Ширина', + resizeLabelInputHeight: 'в', + resizeTitleInputHeight: 'Высота', + + resizeTitleButtonMaintainAspectRatio: 'Сохранять пропорции', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/retouch/index.js b/src/components/@pqina/pintura/locale/ru_RU/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/retouch/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/retouch/ru_RU.js new file mode 100644 index 0000000..1d88e70 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/retouch/ru_RU.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'ретушь', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/sticker/index.js b/src/components/@pqina/pintura/locale/ru_RU/sticker/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/sticker/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/sticker/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/sticker/ru_RU.js new file mode 100644 index 0000000..6d55861 --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/sticker/ru_RU.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Стикер', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/ru_RU/trim/index.js b/src/components/@pqina/pintura/locale/ru_RU/trim/index.js new file mode 100644 index 0000000..3b7daac --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/trim/index.js @@ -0,0 +1 @@ +export { default } from './ru_RU.js'; diff --git a/src/components/@pqina/pintura/locale/ru_RU/trim/ru_RU.js b/src/components/@pqina/pintura/locale/ru_RU/trim/ru_RU.js new file mode 100644 index 0000000..c058a6c --- /dev/null +++ b/src/components/@pqina/pintura/locale/ru_RU/trim/ru_RU.js @@ -0,0 +1,60 @@ +export default { + trimLabel: 'Обрезать', + trimIcon: ``, + + trimLabelPlay: 'Проиграть', + trimLabelPause: 'Приостановить', + + trimLabelMute: 'Выключить', + trimLabelUnmute: 'Включить', + + trimLabelSplit: 'Разделить', + trimLabelMerge: 'Объединить', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Waiting for media'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'Minimum media size is {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'second' : 'seconds'; + return `Minimum video duration is {minDuration} ${unit}`; + } else { + return 'Error loading media'; + } + } + if (state.task === 'blob-to-bitmap') return 'Preparing media…'; + return 'Loading media…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Error uploading media'; + return 'Uploading media…'; + } + if (state.error) return 'Error processing media'; + return 'Processing media…'; + }, + + cropLabelCropBoundaryEdge: 'Edge of media', +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/annotate/index.js b/src/components/@pqina/pintura/locale/sv_SE/annotate/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/annotate/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/annotate/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/annotate/sv_SE.js new file mode 100644 index 0000000..9b9fbc2 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/annotate/sv_SE.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: 'Kommentera', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/core/index.js b/src/components/@pqina/pintura/locale/sv_SE/core/index.js new file mode 100644 index 0000000..8a37bbf --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/core/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/core/sv_SE.js new file mode 100644 index 0000000..6bad344 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/core/sv_SE.js @@ -0,0 +1,234 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: 'Återställ', + labelDefault: 'Standard', + labelAuto: 'Auto', + labelNone: 'Inget', + labelEdit: 'Redigera', + labelClose: 'Stäng', + labelSupportError: (features) => `${features.join(', ')} stöds inte på den här webbläsaren`, + + // defaults + labelColor: 'Färg', + labelWidth: 'Bredd', + labelSize: 'Storlek', + labelOffset: 'Förskjutning', + labelAmount: 'Mängd', + labelInset: 'Insats', + labelRadius: 'Radie', + + // controls + labelColorPalette: 'Färgpalett', + + // sizes + labelSizeExtraSmall: 'Extra liten', + labelSizeSmall: 'Liten', + labelSizeMediumSmall: 'Medium liten', + labelSizeMedium: 'Medium', + labelSizeMediumLarge: 'Medium stor', + labelSizeLarge: 'Stor', + labelSizeExtraLarge: 'Extra stor', + + // default buttons + + labelButtonCancel: 'Avbryt', + labelButtonUndo: 'Ångra', + labelButtonRedo: 'Gör om', + labelButtonRevert: 'Återgå', + labelButtonExport: 'Klar', + + // zoom + labelZoomIn: 'Zooma in', + labelZoomOut: 'Zooma ut', + labelZoomFit: 'Passa till visning', + labelZoomActual: 'Verklig storlek', + iconZoomIn: '', + iconZoomOut: '', + + // icons + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: 'Close', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Väntar på bild'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? 'Minsta bildstorlek är {minWidth} × {minHeight}' + : 'Fel vid laddning av bild'; + if (state.task === 'blob-to-bitmap') return 'Förbereder bild…'; + return 'Laddar bild…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Fel vid uppladdning av bild'; + return 'Laddar upp bild…'; + } + if (state.error) return 'Fel vid behandling av bild'; + return 'Bearbetar bild…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: 'Välj bild', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: 'Automatisk bredd', + shapeTitleButtonTextLayoutAutoHeight: 'Automatisk höjd', + shapeTitleButtonTextLayoutFixedSize: 'Fast storlek', + + shapeTitleButtonFlipHorizontal: 'Vänd horisontellt', + shapeTitleButtonFlipVertical: 'Vänd vertikalt', + shapeTitleButtonRemove: 'Ta bort', + shapeTitleButtonDuplicate: 'Duplicera', + shapeTitleButtonMoveToFront: 'Flytta framåt', + + shapeLabelInputText: 'Redigera text', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: 'Avbryt', + shapeLabelInputConfirm: 'Bekräfta', + + shapeLabelStrokeNone: 'Ingen kant', + + shapeLabelFontStyleNormal: 'Normal', + shapeLabelFontStyleBold: 'Fet', + shapeLabelFontStyleItalic: 'Kursiv', + shapeLabelFontStyleItalicBold: 'Fet kursiv', + + shapeTitleBackgroundColor: 'Fyllningsfärg', + + shapeTitleCornerRadius: 'Hörnradie', + + shapeTitleFontFamily: 'Typsnitt', + shapeTitleFontSize: 'Typsnittstorlek', + shapeTitleFontStyle: 'Typsnittsstil', + shapeTitleLineHeight: 'Linjehöjd', + + shapeTitleLineStart: 'Start', + shapeTitleLineEnd: 'Slut', + shapeTitleStrokeWidth: 'Linjebredd', + shapeTitleStrokeColor: 'Linjefärg', + + shapeTitleLineDecorationBar: 'Linje', + shapeTitleLineDecorationCircle: 'Cirkel', + shapeTitleLineDecorationSquare: 'Fyrkant', + shapeTitleLineDecorationArrow: 'Pil', + shapeTitleLineDecorationCircleSolid: 'Fylld cirkel', + shapeTitleLineDecorationSquareSolid: 'Fylld fyrkant', + shapeTitleLineDecorationArrowSolid: 'Fylld pil', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: 'Transparent', + shapeTitleColorWhite: 'Vit', + shapeTitleColorSilver: 'Silver', + shapeTitleColorGray: 'Grå', + shapeTitleColorBlack: 'Svart', + shapeTitleColorNavy: 'Marinblå', + shapeTitleColorBlue: 'Blå', + shapeTitleColorAqua: 'Aquagrön', + shapeTitleColorTeal: 'Blågrön', + shapeTitleColorOlive: 'Olivgrön', + shapeTitleColorGreen: 'Grön', + shapeTitleColorYellow: 'Gul', + shapeTitleColorOrange: 'Orange', + shapeTitleColorRed: 'Röd', + shapeTitleColorMaroon: 'Brunröd', + shapeTitleColorFuchsia: 'Fuchsia', + shapeTitleColorPurple: 'Lila', + + shapeTitleTextOutline: 'Textkontur', + shapeTitleTextOutlineWidth: 'Bredd', + shapeTitleTextShadow: 'Textskugga', + shapeTitleTextShadowBlur: 'Oskärpa', + + shapeTitleTextColor: 'Typsnittsfärg', + shapeTitleTextAlign: 'Textjustering', + shapeTitleTextAlignLeft: 'Vänsterjusterad text', + shapeTitleTextAlignCenter: 'Centrerad text', + shapeTitleTextAlignRight: 'Högerjusterad text', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: 'Flytta', + shapeLabelToolView: 'Visa', + shapeLabelToolSharpie: 'Penn', + shapeLabelToolEraser: 'Suddgummi', + shapeLabelToolPath: 'Sökväg', + shapeLabelToolRectangle: 'Rektangel', + shapeLabelToolEllipse: 'Ellips', + shapeLabelToolArrow: 'Pil', + shapeLabelToolLine: 'Linje', + shapeLabelToolText: 'Text', + shapeLabelToolPreset: 'Bilder', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: 'Urvalsläge', + shapeTitleBrushSize: 'Penselstorlek', + + shapeLabelSelectionModeNew: 'Ny', + shapeLabelSelectionModeAdd: 'Lägg till', + shapeLabelSelectionModeSubtract: 'Ta bort', + + shapeLabelToolSelectionBrush: 'Pensel', + shapeLabelToolSelectionLassoo: 'Lasso', + shapeLabelToolSelectionRectangle: 'Rektangelmarkering', + shapeLabelToolSelectionEllipse: 'Ellipsmarkering', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/sv_SE/crop/index.js b/src/components/@pqina/pintura/locale/sv_SE/crop/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/crop/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/crop/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/crop/sv_SE.js new file mode 100644 index 0000000..04457ec --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/crop/sv_SE.js @@ -0,0 +1,54 @@ +export default { + cropLabel: 'Beskär', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: 'Centrera om', + cropLabelButtonRotateLeft: 'Rotera åt vänster', + cropLabelButtonRotateRight: 'Rotera åt höger', + cropLabelButtonFlipHorizontal: 'Vänd horisontellt', + cropLabelButtonFlipVertical: 'Vänd vertikalt', + + cropLabelSelectPreset: 'Beskärningsform', + + cropLabelCropBoundary: 'Beskärningsgräns', + cropLabelCropBoundaryEdge: 'Bildkant', + cropLabelCropBoundaryNone: 'Ingen', + + cropLabelTabRotation: 'Rotation', + cropLabelTabZoom: 'Skala', +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/decorate/index.js b/src/components/@pqina/pintura/locale/sv_SE/decorate/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/decorate/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/decorate/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/decorate/sv_SE.js new file mode 100644 index 0000000..6f87f34 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/decorate/sv_SE.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: 'Dekorera', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/fill/index.js b/src/components/@pqina/pintura/locale/sv_SE/fill/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/fill/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/fill/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/fill/sv_SE.js new file mode 100644 index 0000000..1f3c5a4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/fill/sv_SE.js @@ -0,0 +1,12 @@ +export default { + fillLabel: 'Fill', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/filter/index.js b/src/components/@pqina/pintura/locale/sv_SE/filter/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/filter/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/filter/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/filter/sv_SE.js new file mode 100644 index 0000000..1f77ace --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/filter/sv_SE.js @@ -0,0 +1,18 @@ +export default { + filterLabel: 'Filtrera', + filterIcon: + '', + filterLabelChrome: 'Chrome', + filterLabelFade: 'Fade', + filterLabelCold: 'Kall', + filterLabelWarm: 'Varm', + filterLabelPastel: 'Pastell', + filterLabelMonoDefault: 'Mono', + filterLabelMonoNoir: 'Noir', + filterLabelMonoWash: 'Wash', + filterLabelMonoStark: 'Stark', + filterLabelSepiaDefault: 'Sepia', + filterLabelSepiaBlues: 'Blåton', + filterLabelSepiaRust: 'Rost', + filterLabelSepiaColor: 'Färg', +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/finetune/index.js b/src/components/@pqina/pintura/locale/sv_SE/finetune/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/finetune/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/finetune/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/finetune/sv_SE.js new file mode 100644 index 0000000..8832657 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/finetune/sv_SE.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: 'Finjustera', + finetuneIcon: + '', + + finetuneLabelBrightness: 'Ljusstyrka', + finetuneLabelContrast: 'Kontrast', + finetuneLabelSaturation: 'Mättnad', + finetuneLabelExposure: 'Exponering', + finetuneLabelTemperature: 'Temperatur', + finetuneLabelGamma: 'Gamma', + finetuneLabelClarity: 'Tydlighet', + finetuneLabelVignette: 'Vignett', +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/frame/index.js b/src/components/@pqina/pintura/locale/sv_SE/frame/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/frame/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/frame/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/frame/sv_SE.js new file mode 100644 index 0000000..5022a27 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/frame/sv_SE.js @@ -0,0 +1,17 @@ +export default { + frameLabel: 'Ram', + frameIcon: ` + + + `, + + frameLabelMatSharp: 'Skarp kant', + frameLabelMatRound: 'Rundad kant', + frameLabelLineSingle: 'Linje', + frameLabelLineMultiple: 'Zebramönster', + frameLabelEdgeSeparate: 'Inbäddad', + frameLabelEdgeOverlap: 'Överlappande', + frameLabelEdgeCross: 'Korsad', + frameLabelCornerHooks: 'Krok', + frameLabelPolaroid: 'Polaroid', +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/index.d.ts b/src/components/@pqina/pintura/locale/sv_SE/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/index.js b/src/components/@pqina/pintura/locale/sv_SE/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/redact/index.js b/src/components/@pqina/pintura/locale/sv_SE/redact/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/redact/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/redact/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/redact/sv_SE.js new file mode 100644 index 0000000..2e8afb9 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/redact/sv_SE.js @@ -0,0 +1,4 @@ +export default { + redactLabel: 'Redigera', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/resize/index.js b/src/components/@pqina/pintura/locale/sv_SE/resize/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/resize/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/resize/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/resize/sv_SE.js new file mode 100644 index 0000000..a239f71 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/resize/sv_SE.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: 'Ändra storlek', + resizeIcon: + '', + + resizeLabelFormCaption: 'Bildutdata storlek', + + resizeLabelInputWidth: 'b', + resizeTitleInputWidth: 'Bredd', + resizeLabelInputHeight: 'h', + resizeTitleInputHeight: 'Höjd', + + resizeTitleButtonMaintainAspectRatio: 'Behåll proportionerna', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/retouch/index.js b/src/components/@pqina/pintura/locale/sv_SE/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/retouch/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/retouch/sv_SE.js new file mode 100644 index 0000000..35f062c --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/retouch/sv_SE.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: 'Retuschera', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/sticker/index.js b/src/components/@pqina/pintura/locale/sv_SE/sticker/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/sticker/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/sticker/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/sticker/sv_SE.js new file mode 100644 index 0000000..e89f4e8 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/sticker/sv_SE.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: 'Klistra', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/sv_SE/trim/index.js b/src/components/@pqina/pintura/locale/sv_SE/trim/index.js new file mode 100644 index 0000000..5665352 --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/trim/index.js @@ -0,0 +1 @@ +export { default } from './sv_SE.js'; diff --git a/src/components/@pqina/pintura/locale/sv_SE/trim/sv_SE.js b/src/components/@pqina/pintura/locale/sv_SE/trim/sv_SE.js new file mode 100644 index 0000000..bc4825e --- /dev/null +++ b/src/components/@pqina/pintura/locale/sv_SE/trim/sv_SE.js @@ -0,0 +1,60 @@ +export default { + trimLabel: 'Beskär', + trimIcon: ``, + + trimLabelPlay: 'Spela', + trimLabelPause: 'Paus', + + trimLabelMute: 'Ljud av', + trimLabelUnmute: 'Ljud på', + + trimLabelSplit: 'Dela', + trimLabelMerge: 'Slå samman', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return 'Väntar på media'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return 'Minimum media storlek är {minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + const unit = state.error.metadata.minDuration === 1 ? 'sekund' : 'sekunder'; + return `Minsta videolängd är {minDuration} ${unit}`; + } else { + return 'Fel vid laddning av media'; + } + } + if (state.task === 'blob-to-bitmap') return 'Förbereder media…'; + return 'Laddar media…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return 'Fel vid uppladdning av media'; + return 'Laddar upp media…'; + } + if (state.error) return 'Fel vid bearbetning av media'; + return 'Bearbetar media…'; + }, + + cropLabelCropBoundaryEdge: 'Media-kant', +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/annotate/index.js b/src/components/@pqina/pintura/locale/zh_CN/annotate/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/annotate/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/annotate/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/annotate/zh_CN.js new file mode 100644 index 0000000..de25267 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/annotate/zh_CN.js @@ -0,0 +1,5 @@ +export default { + annotateLabel: '批注', + annotateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/core/index.js b/src/components/@pqina/pintura/locale/zh_CN/core/index.js new file mode 100644 index 0000000..52b8c7a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/core/index.js @@ -0,0 +1 @@ +export { default, MarkupEditor } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/core/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/core/zh_CN.js new file mode 100644 index 0000000..bd2b601 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/core/zh_CN.js @@ -0,0 +1,231 @@ +const IconCross = + ''; + +const CharacterA = + ''; + +export default { + // generic + labelReset: '重置', + labelDefault: '默认', + labelAuto: '自动', + labelNone: '无', + labelEdit: '编辑', + labelClose: '关闭', + labelSupportError: (features) => `'此浏览器不支持${features.join(', ')}`, + + // defaults + labelColor: '颜色', + labelWidth: '宽', + labelSize: '尺寸', + labelOffset: '偏移', + labelAmount: '数量', + labelInset: '套印', + labelRadius: '半径', + + // controls + labelColorPalette: '调色板', + + // sizes + labelSizeExtraSmall: '特小', + labelSizeSmall: '小', + labelSizeMediumSmall: '中小', + labelSizeMedium: '中等', + labelSizeMediumLarge: '中大', + labelSizeLarge: '大', + labelSizeExtraLarge: '特大', + + // unused? + labelButtonRevert: '还原', + labelButtonCancel: '取消', + labelButtonUndo: '撤销', + labelButtonRedo: '重做', + labelButtonExport: '完成', + + // zoom + labelZoomIn: '放大', + labelZoomOut: '缩小', + labelZoomFit: '适应', + labelZoomActual: '实际尺寸', + iconZoomIn: '', + iconZoomOut: '', + + iconSupportError: ``, + iconButtonClose: IconCross, + iconButtonRevert: ``, + iconButtonUndo: ``, + iconButtonRedo: ``, + iconButtonExport: ``, + + // status + statusLabelButtonClose: '关闭', + statusIconButtonClose: IconCross, + statusLabelLoadImage: (state) => { + if (!state || !state.task) return '正在等待图像'; + if (state.error) + return state.error.code === 'IMAGE_TOO_SMALL' + ? '最小尺寸为{minWidth} × {minHeight}' + : '加载图像出错'; + if (state.task === 'blob-to-bitmap') return '创建预览…'; + return '图像加载中…'; + }, + + // processing status message + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return '上传图像时出错'; + return 'U正在上传图像…'; + } + if (state.error) return '处理图像时出错'; + return '图像处理中…'; + }, +}; + +export const MarkupEditor = { + shapeLabelButtonSelectSticker: '选择图像', + shapeIconButtonSelectSticker: ``, + + shapeIconButtonFlipHorizontal: ``, + shapeIconButtonFlipVertical: ``, + shapeIconButtonRemove: ``, + shapeIconButtonDuplicate: ``, + shapeIconButtonMoveToFront: ``, + + shapeIconButtonTextLayoutAutoWidth: `${CharacterA}`, + shapeIconButtonTextLayoutAutoHeight: `${CharacterA}`, + shapeIconButtonTextLayoutFixedSize: `${CharacterA}`, + + shapeTitleButtonTextLayoutAutoWidth: '自动宽度', + shapeTitleButtonTextLayoutAutoHeight: '自动高度', + shapeTitleButtonTextLayoutFixedSize: '固定尺寸', + + shapeTitleButtonFlipHorizontal: '水平翻转', + shapeTitleButtonFlipVertical: '垂直翻转', + shapeTitleButtonRemove: '删除', + shapeTitleButtonDuplicate: '重复', + shapeTitleButtonMoveToFront: '移到前面', + + shapeLabelInputText: '编辑文本', + + shapeIconInputCancel: ``, + shapeIconInputConfirm: ``, + shapeLabelInputCancel: '取消', + shapeLabelInputConfirm: '确认', + + shapeLabelStrokeNone: '无边框', + + shapeLabelFontStyleNormal: '常规', + shapeLabelFontStyleBold: '黑体', + shapeLabelFontStyleItalic: '斜体', + shapeLabelFontStyleItalicBold: '粗斜体', + + shapeTitleBackgroundColor: '填充颜色', + shapeTitleCornerRadius: '拐角半径', + + shapeTitleFontFamily: '字体', + shapeTitleFontSize: '字体大小', + shapeTitleFontStyle: '字体风格', + shapeTitleLineHeight: '行距', + + shapeTitleLineStart: '开始', + shapeTitleLineEnd: '结束', + shapeTitleStrokeWidth: '线宽', + shapeTitleStrokeColor: '线颜色', + + shapeTitleLineDecorationBar: '条形图', + shapeTitleLineDecorationCircle: '圆形', + shapeTitleLineDecorationSquare: '方形', + shapeTitleLineDecorationArrow: '箭头', + shapeTitleLineDecorationCircleSolid: '实心圆', + shapeTitleLineDecorationSquareSolid: '实心方形', + shapeTitleLineDecorationArrowSolid: '实心箭头', + + shapeIconLineDecorationBar: ``, + shapeIconLineDecorationCircle: ``, + shapeIconLineDecorationSquare: ``, + shapeIconLineDecorationArrow: ``, + shapeIconLineDecorationCircleSolid: ``, + shapeIconLineDecorationSquareSolid: ``, + shapeIconLineDecorationArrowSolid: ``, + + shapeTitleColorTransparent: '透明', + shapeTitleColorWhite: '白色', + shapeTitleColorSilver: '银色', + shapeTitleColorGray: '灰色', + shapeTitleColorBlack: '黑色', + shapeTitleColorNavy: '海军蓝', + shapeTitleColorBlue: '蓝色', + shapeTitleColorAqua: '浅绿色', + shapeTitleColorTeal: '蓝绿色', + shapeTitleColorOlive: '橄榄绿', + shapeTitleColorGreen: '绿色', + shapeTitleColorYellow: '黄色', + shapeTitleColorOrange: '橙色', + shapeTitleColorRed: '红色', + shapeTitleColorMaroon: '栗色', + shapeTitleColorFuchsia: '紫红色', + shapeTitleColorPurple: '紫色', + + shapeTitleTextOutline: '文字轮廓', + shapeTitleTextOutlineWidth: '宽度', + shapeTitleTextShadow: '文字阴影', + shapeTitleTextShadowBlur: '模糊', + + shapeTitleTextColor: '字体颜色', + shapeTitleTextAlign: '文本对齐', + shapeTitleTextAlignLeft: '左对齐文本', + shapeTitleTextAlignCenter: '居中对齐文本', + shapeTitleTextAlignRight: '右对齐文本', + + shapeIconTextAlignLeft: ``, + shapeIconTextAlignCenter: ``, + shapeIconTextAlignRight: ``, + + shapeLabelToolMove: '移动', + shapeLabelToolView: '看', + shapeLabelToolSharpie: '记号笔', + shapeLabelToolEraser: '橡皮擦', + shapeLabelToolPath: '画路', + shapeLabelToolRectangle: '矩形', + shapeLabelToolEllipse: '椭圆', + shapeLabelToolArrow: '箭头', + shapeLabelToolLine: '线条', + shapeLabelToolText: '文本', + shapeLabelToolPreset: '贴纸', + + shapeIconToolView: ``, + shapeIconToolMove: ``, + shapeIconToolSharpie: ``, + shapeIconToolEraser: ``, + shapeIconToolPath: ``, + shapeIconToolRectangle: ``, + shapeIconToolEllipse: ``, + shapeIconToolArrow: ``, + shapeIconToolLine: ``, + shapeIconToolText: ``, + shapeIconToolPreset: ``, + + shapeTitleSelectionMode: '选择模式', + shapeTitleBrushSize: '画笔大小', + + shapeLabelSelectionModeNew: '新的', + shapeLabelSelectionModeAdd: '添加', + shapeLabelSelectionModeSubtract: '移除', + + shapeLabelToolSelectionBrush: '画笔', + shapeLabelToolSelectionLassoo: '套索', + shapeLabelToolSelectionRectangle: '矩形选框', + shapeLabelToolSelectionEllipse: '椭圆选框', + + shapeIconSelectionModeNew: ``, + shapeIconSelectionModeAdd: ``, + shapeIconSelectionModeSubtract: ``, + shapeIconToolSelectionBrush: ``, + shapeIconToolSelectionLassoo: ``, + shapeIconToolSelectionRectangle: ``, + shapeIconToolSelectionEllipse: ``, +}; + +// deprecated +export const ShapeEditor = MarkupEditor; diff --git a/src/components/@pqina/pintura/locale/zh_CN/crop/index.js b/src/components/@pqina/pintura/locale/zh_CN/crop/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/crop/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/crop/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/crop/zh_CN.js new file mode 100644 index 0000000..b38c5e8 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/crop/zh_CN.js @@ -0,0 +1,54 @@ +export default { + cropLabel: '裁剪', + cropIcon: + '', + cropIconButtonRecenter: ``, + cropIconButtonRotateLeft: + '', + cropIconButtonRotateRight: + '', + cropIconButtonFlipVertical: + '', + cropIconButtonFlipHorizontal: + '', + + cropIconSelectPreset: (locale, aspectRatio) => { + const [a, b, c] = !aspectRatio + ? [0.2, 0.3, 0.4] + : [ + aspectRatio < 1 ? 1 : 0.3, + aspectRatio === 1 ? 0.85 : 0.5, + aspectRatio > 1 ? 1 : 0.3, + ]; + return ` + + + + `; + }, + + cropIconCropBoundary: (locale, isBoundToImage) => { + const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1]; + return ` + + + + + `; + }, + + cropLabelButtonRecenter: '重新居中', + cropLabelButtonRotateLeft: '左旋转', + cropLabelButtonRotateRight: '右旋转', + cropLabelButtonFlipHorizontal: '水平翻转', + cropLabelButtonFlipVertical: '垂直翻转', + + cropLabelSelectPreset: '裁剪形状', + + cropLabelCropBoundary: '裁剪边界', + cropLabelCropBoundaryEdge: '图像边缘', + cropLabelCropBoundaryNone: '无', + + cropLabelTabRotation: '旋转', + cropLabelTabZoom: '缩放', +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/decorate/index.js b/src/components/@pqina/pintura/locale/zh_CN/decorate/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/decorate/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/decorate/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/decorate/zh_CN.js new file mode 100644 index 0000000..da177d1 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/decorate/zh_CN.js @@ -0,0 +1,5 @@ +export default { + decorateLabel: '装饰', + decorateIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/fill/index.js b/src/components/@pqina/pintura/locale/zh_CN/fill/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/fill/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/fill/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/fill/zh_CN.js new file mode 100644 index 0000000..d2b7e36 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/fill/zh_CN.js @@ -0,0 +1,12 @@ +export default { + fillLabel: '填充', + fillIcon: ` + + + + + + + + `, +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/filter/index.js b/src/components/@pqina/pintura/locale/zh_CN/filter/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/filter/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/filter/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/filter/zh_CN.js new file mode 100644 index 0000000..46114e4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/filter/zh_CN.js @@ -0,0 +1,18 @@ +export default { + filterLabel: '滤镜', + filterIcon: + '', + filterLabelChrome: '镶边', + filterLabelFade: '淡化', + filterLabelCold: '冷', + filterLabelWarm: '暖', + filterLabelPastel: '彩笔', + filterLabelMonoDefault: '单色', + filterLabelMonoNoir: '黑色', + filterLabelMonoWash: '渍洗', + filterLabelMonoStark: '黑白紫', + filterLabelSepiaDefault: '棕褐', + filterLabelSepiaBlues: '蓝调', + filterLabelSepiaRust: '铁锈色', + filterLabelSepiaColor: '颜色', +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/finetune/index.js b/src/components/@pqina/pintura/locale/zh_CN/finetune/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/finetune/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/finetune/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/finetune/zh_CN.js new file mode 100644 index 0000000..9a6d55a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/finetune/zh_CN.js @@ -0,0 +1,14 @@ +export default { + finetuneLabel: '微调', + finetuneIcon: + '', + + finetuneLabelBrightness: '亮度', + finetuneLabelContrast: '对比度', + finetuneLabelSaturation: '饱和度', + finetuneLabelExposure: '曝光度', + finetuneLabelTemperature: '温度', + finetuneLabelGamma: '伽玛', + finetuneLabelClarity: '清晰度', + finetuneLabelVignette: '晕影', +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/frame/index.js b/src/components/@pqina/pintura/locale/zh_CN/frame/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/frame/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/frame/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/frame/zh_CN.js new file mode 100644 index 0000000..3e38cb4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/frame/zh_CN.js @@ -0,0 +1,17 @@ +export default { + frameLabel: '图框', + frameIcon: ` + + + `, + + frameLabelMatSharp: '无光泽', + frameLabelMatRound: '凹凸效果', + frameLabelLineSingle: '线条', + frameLabelLineMultiple: '斑纹', + frameLabelEdgeSeparate: '套印', + frameLabelEdgeOverlap: '+字形', + frameLabelEdgeCross: '木材', + frameLabelCornerHooks: '挂钩', + frameLabelPolaroid: '宝丽莱', +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/index.d.ts b/src/components/@pqina/pintura/locale/zh_CN/index.d.ts new file mode 100644 index 0000000..457d34b --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/index.d.ts @@ -0,0 +1,15 @@ +export const LocaleAnnotate: { [key: string]: any }; +export const LocaleCore: { [key: string]: any }; +export const LocaleCrop: { [key: string]: any }; +export const LocaleDecorate: { [key: string]: any }; +export const LocaleFilter: { [key: string]: any }; +export const LocaleFinetune: { [key: string]: any }; +export const LocaleFrame: { [key: string]: any }; +export const LocaleResize: { [key: string]: any }; +export const LocaleRedact: { [key: string]: any }; +export const LocaleSticker: { [key: string]: any }; +export const LocaleTrim: { [key: string]: any }; +export const LocaleFill: { [key: string]: any }; +export const LocaleMarkupEditor: { [key: string]: any }; + +export {}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/index.js b/src/components/@pqina/pintura/locale/zh_CN/index.js new file mode 100644 index 0000000..455ea61 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/index.js @@ -0,0 +1,42 @@ +import Annotate from './annotate/index.js'; +import Core, { MarkupEditor } from './core/index.js'; +import Crop from './crop/index.js'; +import Decorate from './decorate/index.js'; +import Filter from './filter/index.js'; +import Finetune from './finetune/index.js'; +import Frame from './frame/index.js'; +import Resize from './resize/index.js'; +import Redact from './redact/index.js'; +import Sticker from './sticker/index.js'; +import Trim from './trim/index.js'; +import Fill from './fill/index.js'; + +export const LocaleAnnotate = Annotate; +export const LocaleCore = Core; +export const LocaleCrop = Crop; +export const LocaleDecorate = Decorate; +export const LocaleFilter = Filter; +export const LocaleFinetune = Finetune; +export const LocaleFrame = Frame; +export const LocaleResize = Resize; +export const LocaleRedact = Redact; +export const LocaleSticker = Sticker; +export const LocaleTrim = Trim; +export const LocaleFill = Fill; +export const LocaleMarkupEditor = MarkupEditor; + +export default { + ...Core, + ...MarkupEditor, + ...Annotate, + ...Crop, + ...Decorate, + ...Filter, + ...Finetune, + ...Frame, + ...Resize, + ...Redact, + ...Sticker, + ...Fill, + ...Trim, +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/redact/index.js b/src/components/@pqina/pintura/locale/zh_CN/redact/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/redact/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/redact/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/redact/zh_CN.js new file mode 100644 index 0000000..e4667e4 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/redact/zh_CN.js @@ -0,0 +1,4 @@ +export default { + redactLabel: '纂', + redactIcon: ``, +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/resize/index.js b/src/components/@pqina/pintura/locale/zh_CN/resize/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/resize/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/resize/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/resize/zh_CN.js new file mode 100644 index 0000000..5b3bcaa --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/resize/zh_CN.js @@ -0,0 +1,19 @@ +export default { + resizeLabel: '调整大小', + resizeIcon: + '', + + resizeLabelFormCaption: '图像输出大小', + + resizeLabelInputWidth: '宽', + resizeTitleInputWidth: '宽', + resizeLabelInputHeight: '高', + resizeTitleInputHeight: '高', + + resizeTitleButtonMaintainAspectRatio: '保持纵横比', + + resizeIconButtonMaintainAspectRatio: (active, activeFraction) => + ``, +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/retouch/index.js b/src/components/@pqina/pintura/locale/zh_CN/retouch/index.js new file mode 100644 index 0000000..9dbd89a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/retouch/index.js @@ -0,0 +1 @@ +export { default } from './en_GB.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/retouch/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/retouch/zh_CN.js new file mode 100644 index 0000000..3664474 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/retouch/zh_CN.js @@ -0,0 +1,6 @@ +export default { + retouchLabel: '修饰', + retouchIcon: ` + + `, +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/sticker/index.js b/src/components/@pqina/pintura/locale/zh_CN/sticker/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/sticker/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/sticker/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/sticker/zh_CN.js new file mode 100644 index 0000000..f2bd069 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/sticker/zh_CN.js @@ -0,0 +1,5 @@ +export default { + stickerLabel: '贴纸', + stickerIcon: + '', +}; diff --git a/src/components/@pqina/pintura/locale/zh_CN/trim/index.js b/src/components/@pqina/pintura/locale/zh_CN/trim/index.js new file mode 100644 index 0000000..8fd209a --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/trim/index.js @@ -0,0 +1 @@ +export { default } from './zh_CN.js'; diff --git a/src/components/@pqina/pintura/locale/zh_CN/trim/zh_CN.js b/src/components/@pqina/pintura/locale/zh_CN/trim/zh_CN.js new file mode 100644 index 0000000..1827967 --- /dev/null +++ b/src/components/@pqina/pintura/locale/zh_CN/trim/zh_CN.js @@ -0,0 +1,59 @@ +export default { + trimLabel: '修剪', + trimIcon: ``, + + trimLabelPlay: '玩', + trimLabelPause: '暂停', + + trimLabelMute: '静音', + trimLabelUnmute: '取消静音', + + trimLabelSplit: '分裂', + trimLabelMerge: '合并', + + trimIconButtonMute: + '', + trimIconButtonUnmute: + '', + + trimIconButtonPlay: '', + trimIconButtonPause: + '', + + trimIconButtonSplit: ` + + + `, + trimIconButtonMerge: ` + + + `, + + // overrides, replace image with media + statusLabelLoadImage: (state) => { + if (!state || !state.task) return '正在等待图像'; + if (state.error) { + if (state.error.code === 'IMAGE_TOO_SMALL') { + return '最小尺寸为{minWidth} × {minHeight}'; + } else if (state.error.code === 'VIDEO_TOO_SHORT') { + return `最短视频时长为 {minDuration} 秒`; + } else { + return '加载图像出错'; + } + } + if (state.task === 'blob-to-bitmap') return '创建预览…'; + return '图像加载中…'; + }, + + statusLabelProcessImage: (state) => { + if (!state || !state.task) return undefined; + if (state.task === 'store') { + if (state.error) return '上传图像时出错'; + return 'U正在上传图像…'; + } + if (state.error) return '处理图像时出错'; + return '图像处理中…'; + }, + + cropLabelCropBoundaryEdge: '图像边缘', +}; diff --git a/src/components/@pqina/pintura/package.json b/src/components/@pqina/pintura/package.json new file mode 100644 index 0000000..9eb82c5 --- /dev/null +++ b/src/components/@pqina/pintura/package.json @@ -0,0 +1,10 @@ +{ + "version": "8.71.2", + "name": "@pqina/pintura", + "description": "This package is for testing purposes only. Visit https://pqina.nl/pintura to purchase a valid license.", + "browser": "pintura.js", + "main": "pintura.js", + "types": "pintura.d.ts", + "type": "module", + "license": "https://pqina.nl/pintura/license" +} \ No newline at end of file diff --git a/src/components/@pqina/pintura/pintura-iife.js b/src/components/@pqina/pintura/pintura-iife.js new file mode 100644 index 0000000..ef7bee2 --- /dev/null +++ b/src/components/@pqina/pintura/pintura-iife.js @@ -0,0 +1,11 @@ +/*! + * Pintura v8.71.2 - Test version + * (c) 2018-2024 PQINA Inc. - All Rights Reserved + * License: https://pqina.nl/pintura/license/ + * + * This version of Pintura is for testing purposes only. + * Visit https://pqina.nl/pintura/ to obtain a commercial license. + */ +/* eslint-disable */ + +var pintura=function(e){"use strict";const t=[{value:65504,name:"jfif"},{value:65498,name:"sos"},{value:65505,subvalue:17784,name:"exif"},{value:65505,subvalue:26740,name:"xmp"},{value:65506,subvalue:19792,name:"mpf"}];var o=e=>{if(65496!==e.getUint16(0))return;const o=e.byteLength;let i,r=2,n=void 0;for(;rt.value===i&&(!t.subvalue||t.subvalue===e.getUint16(r+2+2))));if(o){const{name:t}=o;n||(n={}),n[t]||(n[t]={offset:r,size:e.getUint16(r+2)})}if(65498===i)break;r+=2+e.getUint16(r+2)}return n};var i=(e,t,i)=>{if(!e)return;const r=new DataView(e),n=o(r);if(!n||!n.exif)return;const a=((e,t)=>{if(65505!==e.getUint16(t))return;const o=e.getUint16(t+2);if(t+=4,1165519206!==e.getUint32(t))return;t+=6;const i=e.getUint16(t);if(18761!==i&&19789!==i)return;const r=18761===i;if(t+=2,42!==e.getUint16(t,r))return;t+=e.getUint32(t+2,r);const n=i=>{const n=[];let a=t;const s=Math.min(e.byteLength,t+o-16);for(;a{const o=n(t);if(o.length)return e.getUint16(o[0]+8,r)},write:(t,o)=>{const i=n(t);return!!i.length&&(i.forEach((t=>e.setUint16(t+8,o,r))),!0)}}})(r,n.exif.offset);return a?void 0===i?a.read(t):a.write(t,i):void 0};const r="__pqina_webapi__";var n=e=>window[r]?window[r][e]:window[e],a=(...e)=>{};const s={ArrayBuffer:"readAsArrayBuffer"};var l=async(e,t=[0,e.size],o)=>await((e,t=a,o={})=>new Promise(((i,r)=>{const{dataFormat:a=s.ArrayBuffer}=o,l=new(n("FileReader"));l.onload=()=>i(l.result),l.onerror=()=>r(l.error),l.onprogress=t,l[a](e)})))(e.slice(...t),o),c=async(e,t)=>{const o=await l(e,[0,262144],t);return i(o,274)||1};let d=null;var u=()=>(null===d&&(d="undefined"!=typeof window&&void 0!==window.document),d);let h=null;var p=()=>new Promise((e=>{if(null===h){const t="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";let o=u()?new Image:{};return o.onload=()=>{h=1===o.naturalWidth,o=void 0,e(h)},void(o.src=t)}return e(h)})),m=e=>e.getContext("2d").getImageData(0,0,e.width,e.height),g=(e,t,o=[])=>{const i=document.createElement(e),r=Object.getOwnPropertyDescriptors(i.__proto__);for(const e in t)"style"===e?i.style.cssText=t[e]:r[e]&&r[e].set||/textContent|innerHTML/.test(e)||"function"==typeof t[e]?i[e]=t[e]:i.setAttribute(e,t[e]);return o.forEach((e=>i.appendChild(e))),i};const $={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]};var f=e=>{e.width=1,e.height=1;const t=e.getContext("2d");t&&t.clearRect(0,0,1,1)},y=e=>"data"in e,b=e=>u()?RegExp(e).test(window.navigator.userAgent):void 0;let x=null;var v=()=>(null===x&&(x=b(/Android/)),x),w=(e,t)=>{const o=g("canvas",{width:e.width,height:e.height});return o.getContext("2d",t).drawImage(e,0,0),o},S=async(e,t=1)=>{const o=await p(),[i,r]=o||t<5?[e.width,e.height]:[e.height,e.width],n=g("canvas",{width:i,height:r}),a=n.getContext("2d",{willReadFrequently:!0});if(y(e)&&!o&&t>1){const t=g("canvas",{width:e.width,height:e.height});t.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),e=t}if(!o&&t>1&&a.transform.apply(a,((e,t,o=-1)=>(-1===o&&(o=1),$[o](e,t)))(e.width,e.height,t)),y(e)){if(a.putImageData(e,0,0),v())return w(n)}else a.drawImage(e,0,0);return e instanceof HTMLCanvasElement&&f(e),n},k=async(e,t=1)=>1===t||await p()?e:m(await S(e,t)),C=e=>"object"==typeof e;const T=e=>e instanceof HTMLElement?e:C(e)?M(e):e,M=e=>{let t;return Array.isArray(e)?(t=[],e.forEach(((e,o)=>{t[o]=T(e)}))):(t={},Object.keys(e).forEach((o=>{const i=e[o];t[o]=T(i)}))),t};var R=e=>"string"==typeof e,P=e=>"function"==typeof e,E=(e,t)=>new Promise(((o,i)=>{const r=()=>o(((e,{width:t,height:o,canvasMemoryLimit:i,contextOptions:r})=>{let n=t||e.naturalWidth,a=o||e.naturalHeight;n||a||(n=300,a=150);const s=n*a;if(i&&s>i){const e=Math.sqrt(i)/Math.sqrt(s);n=Math.floor(n*e),a=Math.floor(a*e)}const l=g("canvas");return l.width=n,l.height=a,l.getContext("2d",r).drawImage(e,0,0,n,a),l})(e,t));e.complete&&e.width?r():(e.onload=r,e.onerror=()=>i(new Error("Failed to load image")))})),I=()=>"createImageBitmap"in window,A=e=>/svg/.test(e.type),L=()=>Math.random().toString(36).substring(2,9);const z=new Map;var F=(e,t,o)=>new Promise(((i,r)=>{const n=e.toString();let a=z.get(n);if(!a){const t=(e=>`function () {self.onmessage = function (message) {(${e.toString()}).apply(null, message.data.content.concat([function (err, response) {\n response = response || {};\n const transfer = 'data' in response ? [response.data.buffer] : 'width' in response ? [response] : [];\n return self.postMessage({ id: message.data.id, content: response, error: err }, transfer);\n}]))}}`)(e),o=URL.createObjectURL((e=>new Blob(["(","function"==typeof e?e.toString():e,")()"],{type:"application/javascript"}))(t)),i=new Map,r=new Worker(o);a={url:o,worker:r,messages:i,terminationTimeout:void 0,terminate:()=>{clearTimeout(a.terminationTimeout),a.worker.terminate(),URL.revokeObjectURL(o),z.delete(n)}},r.onmessage=function(e){const{id:t,content:o,error:r}=e.data;if(clearTimeout(a.terminationTimeout),a.terminationTimeout=setTimeout((()=>{i.size>0||a.terminate()}),500),!i.has(t))return;const n=i.get(t);i.delete(t),null!=r?n.reject(r):n.resolve(o)},z.set(n,a)}const s=L();a.messages.set(s,{resolve:i,reject:r}),a.worker.postMessage({id:s,content:t},o)})),D=async(e,t)=>{const o=async()=>{const o=await(async(e,t)=>{const o=g("img",{src:URL.createObjectURL(e)}),i=await E(o,t);return URL.revokeObjectURL(o.src),i})(e,{canvasMemoryLimit:t,contextOptions:{willReadFrequently:!0}}),i=m(o);return f(o),i};if(v())return await o();let i;if(I()&&!A(e)&&"OffscreenCanvas"in window)try{i=await F(((e,t,o)=>{createImageBitmap(e).then((e=>{let i=e.width,r=e.height;const n=i*r;if(t&&n>t){const e=Math.sqrt(t)/Math.sqrt(n);i=Math.floor(i*e),r=Math.floor(r*e)}const a=new OffscreenCanvas(i,r),s=a.getContext("2d",{willReadFrequently:!0});s.drawImage(e,0,0,i,r);const l=s.getImageData(0,0,a.width,a.height);o(null,l)})).catch((e=>{o(e)}))}),[e,t])}catch(e){}return i&&i.width?i:await o()},O=(e,t,o)=>new Promise(((i,r)=>{try{e.toBlob((e=>{if(!e)return r(new Error("Failed to create blob"));i(e)}),t,o)}catch(e){r(e)}})),B=async(e,t,o)=>{const i=await S(e),r=await O(i,t,o);return f(i),r};const W={matroska:"mkv"};var _=e=>{const t=(e.match(/\/([a-z0-9]+)/)||[])[1];if(/^x/.test(t)){const[,t=""]=e.split("/x-");return W[t]}return t},V=e=>e.substr(0,e.lastIndexOf("."))||e;const N=/avif|bmp|gif|jpg|jpeg|jpe|jif|jfif|png|svg|tiff|webp/;var H=e=>{return e&&(t=(o=e,o.split(".").pop()).toLowerCase(),N.test(t)?"image/"+(/jfif|jif|jpe|jpg/.test(t)?"jpeg":"svg"===t?"svg+xml":t):"");var t,o},j=(e,t,o)=>{const i=(new Date).getTime(),r=e.type.length&&!/null|text/.test(e.type),a=r?e.type:o,s=((e,t)=>{const o=H(e);if(o===t)return e;const i=_(t)||o;return`${V(e)}.${i}`})(t,a);try{return new(n("File"))([e],s,{lastModified:i,type:r?e.type:a})}catch(t){const o=r?e.slice():e.slice(0,e.size,a);return o.lastModified=i,o.name=s,o}},U=(e,t)=>e/t,G=e=>e;const Z=Math.PI,X=Math.PI/2,Y=X/2;var q=e=>{const t=Math.abs(e)%Math.PI;return t>Y&&tparseFloat(e.toFixed(t));const le=(e,t,o)=>o+(e-o)*t,ce=e=>({x:e.x+.5*e.width,y:e.y+.5*e.height,rx:.5*e.width,ry:.5*e.height}),de=()=>ue(0,0),ue=(e,t)=>({x:e,y:t}),he=e=>ue(e.pageX,e.pageY),pe=e=>ue(e.x,e.y),me=e=>(e.x=-e.x,e.y=-e.y,e),ge=(e,t,o=de())=>{const i=Math.cos(t),r=Math.sin(t),n=e.x-o.x,a=e.y-o.y;return e.x=o.x+i*n-r*a,e.y=o.y+r*n+i*a,e},$e=e=>Math.sqrt(e.x*e.x+e.y*e.y),fe=e=>{const t=Math.sqrt(e.x*e.x+e.y*e.y);return 0===t?de():(e.x/=t,e.y/=t,e)},ye=(e,t)=>Math.atan2(t.y-e.y,t.x-e.x),be=(e,t)=>e.x===t.x&&e.y===t.y,xe=(e,t)=>(e.x=t(e.x),e.y=t(e.y),e),ve=(e,t)=>(e.x+=t.x,e.y+=t.y,e),we=(e,t)=>(e.x-=t.x,e.y-=t.y,e),Se=(e,t)=>(e.x/=t,e.y/=t,e),ke=(e,t)=>(e.x*=t,e.y*=t,e),Ce=(e,t)=>e.x*t.x+e.y*t.y,Te=(e,t)=>e.x*t.y-e.y*t.x,Me=(e,t=de())=>{const o=e.x-t.x,i=e.y-t.y;return o*o+i*i},Re=(e,t=de())=>Math.sqrt(Me(e,t)),Pe=(e,t,o)=>(e.x=le(e.x,t,o.x),e.y=le(e.y,t,o.y),e),Ee=e=>{let t=0,o=0;return e.forEach((e=>{t+=e.x,o+=e.y})),ue(t/e.length,o/e.length)},Ie=(e,t,o,i,r)=>(e.forEach((e=>{e.x=t?i-(e.x-i):e.x,e.y=o?r-(e.y-r):e.y})),e),Ae=(e,t,o,i)=>{const r=Math.sin(t),n=Math.cos(t);return e.forEach((e=>{e.x-=o,e.y-=i;const t=e.x*n-e.y*r,a=e.x*r+e.y*n;e.x=o+t,e.y=i+a})),e},Le=(e,t)=>({width:e,height:t}),ze=e=>Le(e.width,e.height),Fe=e=>Le(e.width,e.height),De=e=>Le(e.width,e.height),Oe=e=>Le(e[0],e[1]),Be=e=>{return/img/i.test(e.nodeName)?Le((t=e).naturalWidth,t.naturalHeight):Fe(e);var t},We=(e,t)=>Le(e,t),_e=(e,t,o=G)=>o(e.width)===o(t.width)&&o(e.height)===o(t.height),Ve=(e,t)=>(e.width*=t,e.height*=t,e),Ne=e=>ue(.5*e.width,.5*e.height),He=(e,t)=>{const o=Math.abs(t),i=Math.abs(Math.cos(o)),r=Math.abs(Math.sin(o)),n=i*e.width+r*e.height,a=r*e.width+i*e.height;return e.width=n,e.height=a,e},je=(e,t)=>e.width>=t.width&&e.height>=t.height,Ue=(e,t)=>(e.width=t(e.width),e.height=t(e.height),e),Ge=(e,t)=>({start:e,end:t}),Ze=e=>Ge(pe(e.start),pe(e.end)),Xe=(e,t)=>{if(0===t)return e;const o=ue(e.start.x-e.end.x,e.start.y-e.end.y),i=fe(o),r=ke(i,t);return e.start.x+=r.x,e.start.y+=r.y,e.end.x-=r.x,e.end.y-=r.y,e},Ye=[ue(-1,-1),ue(-1,1),ue(1,1),ue(1,-1)],qe=(e,t,o,i)=>({x:e,y:t,width:o,height:i}),Ke=e=>qe(e.x,e.y,e.width,e.height),Je=()=>qe(0,0,0,0),Qe=e=>qe(0,0,e.width,e.height),et=e=>qe(e[3],e[0],e[1]-e[3],e[2]-e[0]),tt=e=>qe(e.x||0,e.y||0,e.width||0,e.height||0),ot=e=>{let t=e[0].x,o=e[0].x,i=e[0].y,r=e[0].y;return e.forEach((e=>{t=Math.min(t,e.x),o=Math.max(o,e.x),i=Math.min(i,e.y),r=Math.max(r,e.y)})),qe(t,i,o-t,r-i)},it=e=>nt(e.x-e.rx,e.y-e.ry,2*e.rx,2*e.ry),rt=(e,t)=>qe(e.x-.5*t.width,e.y-.5*t.height,t.width,t.height),nt=(e,t,o,i)=>qe(e,t,o,i),at=e=>ue(e.x+.5*e.width,e.y+.5*e.height),st=(e,t)=>(e.x+=t.x,e.y+=t.y,e),lt=(e,t,o)=>(o=o||at(e),e.x=t*(e.x-o.x)+o.x,e.y=t*(e.y-o.y)+o.y,e.width=t*e.width,e.height=t*e.height,e),ct=(e,t,o,i)=>{const r=(i.x-e.x)/e.width,n=(i.y-e.y)/e.height;let a=Math.max(t.width,e.width),s=Math.max(t.height,e.height);return a=Math.min(o.width,a),s=Math.min(o.height,s),e.x=i.x-r*a,e.y=i.y-n*s,e.width=a,e.height=s,e},dt=(e,t)=>{const[o,i]=ae[t],r=o*e.width,n=i*e.height;return ue(e.x+r,e.y+n)},ut=(e,t)=>(e.x*=t,e.y*=t,e.width*=t,e.height*=t,e),ht=(e,t,o=G)=>o(e.x)===o(t.x)&&o(e.y)===o(t.y)&&o(e.width)===o(t.width)&&o(e.height)===o(t.height),pt=e=>U(e.width,e.height),mt=(e,t,o,i,r)=>(e.x=t,e.y=o,e.width=i,e.height=r,e),gt=(e,t)=>(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e),$t=(e,t,o)=>(o||(o=at(e)),wt(e).map((e=>ge(e,t,o)))),ft=(e,t)=>qe(.5*e.width-.5*t.width,.5*e.height-.5*t.height,t.width,t.height),yt=(e,t)=>!(t.xe.x+e.width)&&!(t.y>e.y+e.height))),bt=(e,t,o=de())=>{if(0===e.width||0===e.height)return Je();const i=pt(e);t||(t=i);let r=e.width,n=e.height;return t>i?r=n*t:n=r/t,qe(o.x+.5*(e.width-r),o.y+.5*(e.height-n),r,n)},xt=(e,t=pt(e),o=de())=>{if(0===e.width||0===e.height)return Je();let i=e.width,r=i/t;return r>e.height&&(r=e.height,i=r*t),qe(o.x+.5*(e.width-i),o.y+.5*(e.height-r),i,r)},vt=e=>[Math.min(e.y,e.y+e.height),Math.max(e.x,e.x+e.width),Math.max(e.y,e.y+e.height),Math.min(e.x,e.x+e.width)],wt=e=>[ue(e.x,e.y),ue(e.x+e.width,e.y),ue(e.x+e.width,e.y+e.height),ue(e.x,e.y+e.height)],St=(e,t)=>{if(e)return e.x=t(e.x),e.y=t(e.y),e.width=t(e.width),e.height=t(e.height),e},kt=(e,t,o=at(e))=>wt(e).map(((e,i)=>{const r=Ye[i];return ue(le(e.x,1+r.x*t.x,o.x),le(e.y,1+r.y*t.y,o.y))})),Ct=e=>(e.x=0,e.y=0,e),Tt=e=>{const t=e[0],o=e[e.length-1];e=be(t,o)?e:[...e,t];const i=t.x,r=t.y;let n,a,s,l=0,c=0,d=0,u=0;const h=e.length;for(;ch-1?0:c+1],s=(n.y-r)*(a.x-i)-(a.y-r)*(n.x-i),l+=s,d+=(n.x+a.x-2*i)*s,u+=(n.y+a.y-2*r)*s;return s=3*l,ue(i+d/s,r+u/s)},Mt=(e,t)=>Rt(e.start,e.end,t.start,t.end),Rt=(e,t,o,i)=>{const r=(i.y-o.y)*(t.x-e.x)-(i.x-o.x)*(t.y-e.y);if(0===r)return;const n=((i.x-o.x)*(e.y-o.y)-(i.y-o.y)*(e.x-o.x))/r,a=((t.x-e.x)*(e.y-o.y)-(t.y-e.y)*(e.x-o.x))/r;return n<0||n>1||a<0||a>1?void 0:ue(e.x+n*(t.x-e.x),e.y+n*(t.y-e.y))},Pt=(e,t,{ignoreIdenticalLines:o=!1,breakOnIntersection:i=!1}={})=>{const r=t.length,n=[];for(let a=0;a{let o=0,i=0,r=!1;const n=t.length;for(o=0,i=n-1;oe.y!=t[i].y>e.y&&e.x<(t[i].x-t[o].x)*(e.y-t[o].y)/(t[i].y-t[o].y)+t[o].x&&(r=!r);return r},It=e=>{const t=[];for(let o=0;oIt(e).map((e=>Xe(e,t))),Lt=(e,t,o,i=0,r=!1,n=!1,a=12)=>{const s=[];for(let i=0;i{const r=ue(e.x-o.x,e.y-o.y),n=ue(i.x-o.x,i.y-o.y),a=Ce(n,n);let s=Ce(r,n)/a;s=s<0?0:s,s=s>1?1:s;const l=ue(n.x*s+o.x-e.x,n.y*s+o.y-e.y);return Ce(l,l)<=t*t},Ft=(e,t,o)=>{const i=o.length;for(let r=0;r!!Et(e,o)||(!!Ft(e,t,o)||zt(e,t,o[0],o[o.length-1])),Ot=(e,t,o,i,r)=>Dt(e,t,$t(o,i,r||at(o)));var Bt=(e,t)=>{const o=Qe(e),i=at(o),r=$t(o,t,i);return Ct(ot(r))},Wt=(e,t)=>e instanceof HTMLElement&&(!t||new RegExp(`^${t}$`,"i").test(e.nodeName)),_t=e=>e instanceof File,Vt=async(e,t,o)=>{const i=await O(e,t,o);return j(i,"canvas")},Nt=e=>e.split("/").pop().split(/\?|\#/).shift();const Ht=u()&&!!Node.prototype.replaceChildren?(e,t)=>e.replaceChildren(t):(e,t)=>{for(;e.lastChild;)e.removeChild(e.lastChild);void 0!==t&&e.append(t)},jt=u()&&g("div",{class:"PinturaMeasure",style:"position:absolute;left:0;top:0;width:99999px;height:0;pointer-events:none;contain:strict;margin:0;padding:0;"});let Ut;var Gt=e=>(Ht(jt,e),jt.parentNode||document.body.append(jt),clearTimeout(Ut),Ut=setTimeout((()=>{jt.remove()}),500),e);let Zt=null;var Xt=()=>(null===Zt&&(Zt=u()&&/^((?!chrome|android).)*(safari|iphone|ipad)/i.test(navigator.userAgent)),Zt),Yt=e=>new Promise(((t,o)=>{let i=!1;!e.parentNode&&Xt()&&(i=!0,e.style.cssText="position:absolute;visibility:hidden;pointer-events:none;left:0;top:0;width:0;height:0;",Gt(e));const r=()=>{const o=e.naturalWidth,r=e.naturalHeight;o&&r&&(i&&e.remove(),clearInterval(n),t({width:o,height:r}))};e.onerror=e=>{clearInterval(n),o(e)};const n=setInterval(r,1);r()})),qt=e=>new Promise(((t,o)=>{const i=()=>{t({width:e.videoWidth,height:e.videoHeight})};if(e.readyState>=1)return i();e.onloadedmetadata=i,e.onerror=()=>o(e.error)})),Kt=e=>/^image/.test(e.type),Jt=e=>new Promise((t=>{const o=R(e)?e:URL.createObjectURL(e),i=()=>{const e=new Image;e.src=o,t(e)};if(e instanceof Blob&&Kt(e))return i();const r=document.createElement("video");r.preload="metadata",r.onloadedmetadata=()=>t(r),r.onerror=i,r.src=o})),Qt=e=>"VIDEO"===e.nodeName,eo=async e=>{let t,o;t=e.src?e:await Jt(e);try{o=Qt(t)?await qt(t):await Yt(t)}finally{_t(e)&&URL.revokeObjectURL(t.src)}return o};var to=async e=>{const t=await eo(e),o=await(e=>new Promise(((t,o)=>{if(e.complete)return t(e);e.onload=()=>t(e),e.onerror=()=>o(new Error("Failed to load image"))})))(e),i=g("canvas",t);i.getContext("2d",{willReadFrequently:!0}).drawImage(o,0,0);const r=await O(i);return j(r,Nt(o.src))},oo=(e=0,t=!0)=>new(n("ProgressEvent"))("progress",{loaded:100*e,total:100,lengthComputable:t}),io=(e,t,o=(e=>e))=>e.getAllResponseHeaders().indexOf(t)>=0?o(e.getResponseHeader(t)):void 0,ro=e=>{if(!e)return null;const t=e.split(/filename=|filename\*=.+''/).splice(1).map((e=>e.trim().replace(/^["']|[;"']{0,2}$/g,""))).filter((e=>e.length));return t.length?decodeURI(t[t.length-1]):null};const no="URL_REQUEST";class ao extends Error{constructor(e,t,o){super(e),this.name="EditorError",this.code=t,this.metadata=o}}var so=(e,t)=>{const{headers:o={},credentials:i}=t||{};Object.entries(o).forEach((([t,o])=>e.setRequestHeader(t,o))),i&&(e.withCredentials="omit"!==i)},lo=(e,t,o)=>/^data:/.test(e)?(async(e,t="data-uri",o=a)=>{o(oo(0));const i=await fetch(e);o(oo(.33));const r=await i.blob();let n;Kt(r)||(n="image/"+(e.includes(",/9j/")?"jpeg":"png")),o(oo(.66));const s=j(r,t,n);return o(oo(1)),s})(e,void 0,t):((e,t,o)=>new Promise(((i,r)=>{const n=()=>r(new ao("Error fetching image",no,a)),a=new XMLHttpRequest;a.onprogress=t,a.onerror=n,a.onload=()=>{if(!a.response||a.status>=300||a.status<200)return n();const t=io(a,"Content-Type"),o=io(a,"Content-Disposition",ro)||Nt(e);i(j(a.response,o,t||H(o)))};const{willRequest:s}=o;Promise.resolve(s&&s(e,{resourceType:"image"})).then((t=>{if(!1===t)return r("Image load rejected");a.open("GET",e),so(a,t),a.responseType="blob",a.send()})).catch(console.error)})))(e,t,o),co=e=>e instanceof Blob&&!(e instanceof File),uo=e=>"close"in e,ho=async(e,t,o)=>{if(_t(e)||co(e))return e;if(R(e))return await lo(e,t,o);if(Wt(e,"canvas"))return await Vt(e);if(Wt(e,"img"))return await to(e);if(y(e)||uo(e))return await Vt(await S(e));throw new ao("Invalid image source","invalid-image-source")};let po=null;var mo=()=>(null===po&&(po=u()&&/^mac/i.test(navigator.platform)),po);let go=null;var $o=()=>(null===go&&(go=u()&&(b(/iPhone|iPad|iPod/)||mo()&&navigator.maxTouchPoints>=1)),go),fo=async(e,t=1)=>await p()||$o()||t<5?e:We(e.height,e.width),yo=e=>/jpeg/.test(e.type),bo=e=>{return"object"!=typeof(t=e)||t.constructor!=Object?e:JSON.stringify(e);var t},xo=(e,t=0,o)=>(0===t||(e.translate(o.x,o.y),e.rotate(t),e.translate(-o.x,-o.y)),e),vo=(e,t,o)=>(e.scale(t,o),e),wo=async(e,t={})=>{const{flipX:o,flipY:i,rotation:r,crop:n}=t,a=Fe(e),s=o||i,l=!!r,c=n&&(n.x||n.y||n.width||n.height),d=c&&ht(n,Qe(a)),u=c&&!d;if(!s&&!l&&!u)return e;let h,p=g("canvas",{width:e.width,height:e.height});if(p.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),s){const e=g("canvas",{width:p.width,height:p.height}).getContext("2d",{willReadFrequently:!0});vo(e,o?-1:1,i?-1:1),e.drawImage(p,o?-p.width:0,i?-p.height:0),e.restore(),f(p),p=e.canvas}if(l){const e=Ue(De(ot($t(tt(p),r))),Math.floor),t=g("canvas",{width:n.width,height:n.height}).getContext("2d",{willReadFrequently:!0});((e,t,o)=>{e.translate(t,o)})(t,-n.x,-n.y),xo(t,r,Ne(e)),t.drawImage(p,.5*(e.width-p.width),.5*(e.height-p.height)),t.restore(),f(p),p=t.canvas}else if(u){return h=p.getContext("2d",{willReadFrequently:!0}).getImageData(n.x,n.y,n.width,n.height),f(p),h}return h=p.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,p.width,p.height),f(p),h},So=(e,t)=>{const{imageData:o,width:i,height:r}=e,n=o.width,a=o.height,s=Math.round(i),l=Math.round(r),c=o.data,d=new Uint8ClampedArray(s*l*4),u=n/s,h=a/l,p=Math.ceil(.5*u),m=Math.ceil(.5*h);for(let e=0;e1)continue;if(i=2*u*u*u-3*u*u+1,i<=0)continue;t=4*(e+o*n);const h=c[t+3];f+=i*h,a+=i,h<255&&(i=i*h/250),l+=i*c[t],g+=i*c[t+1],$+=i*c[t+2],r+=i}}d[o]=l/r,d[o+1]=g/r,d[o+2]=$/r,d[o+3]=f/a}t(null,{data:d,width:s,height:l})},ko=e=>{if(e instanceof ImageData)return e;let t;try{t=new ImageData(e.width,e.height)}catch(o){t=g("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},Co=async(e,t={},o)=>{const{width:i,height:r,fit:n,upscale:a}=t;if(!i&&!r)return e;let s=i,l=r;if(i?r||(l=i):s=r,"force"!==n){const t=s/e.width,o=l/e.height;let i=1;if("cover"===n?i=Math.max(t,o):"contain"===n&&(i=Math.min(t,o)),i>1&&!1===a)return e;s=Math.round(e.width*i),l=Math.round(e.height*i)}return s=Math.max(s,1),l=Math.max(l,1),e.width===s&&e.height===l?e:o?o(e,s,l):(e=await F(So,[{imageData:e,width:s,height:l}],[e.data.buffer]),ko(e))},To=(e,t)=>{const{imageData:o,matrix:i}=e;if(!i)return t(null,o);const r=new Uint8ClampedArray(o.width*o.height*4),n=o.data,a=n.length,s=i[0],l=i[1],c=i[2],d=i[3],u=i[4],h=i[5],p=i[6],m=i[7],g=i[8],$=i[9],f=i[10],y=i[11],b=i[12],x=i[13],v=i[14],w=i[15],S=i[16],k=i[17],C=i[18],T=i[19];let M=0,R=0,P=0,E=0,I=0,A=0,L=0,z=0,F=0,D=0,O=0,B=0;for(;M{const{imageData:o,matrix:i}=e;if(!i)return t(null,o);let r=i.reduce(((e,t)=>e+t));r=r<=0?1:r;const n=o.width,a=o.height,s=o.data;let l=0,c=0,d=0;const u=Math.round(Math.sqrt(i.length)),h=Math.floor(u/2);let p=0,m=0,g=0,$=0,f=0,y=0,b=0,x=0,v=0,w=0;const S=new Uint8ClampedArray(n*a*4);for(d=0;d=a&&(b=0),x<0&&(x=n-1),x>=n&&(x=0),v=4*(b*n+x),w=i[y*u+f],p+=s[v]*w,m+=s[v+1]*w,g+=s[v+2]*w,$+=s[v+3]*w;S[l]=p/r,S[l+1]=m/r,S[l+2]=g/r,S[l+3]=$/r,l+=4}t(null,{data:S,width:n,height:a})},Ro=(e,t)=>{let{imageData:o,strength:i}=e;if(!i)return t(null,o);const r=new Uint8ClampedArray(o.width*o.height*4),n=o.width,a=o.height,s=o.data,l=(e,t)=>(c=e-w,d=t-S,Math.sqrt(c*c+d*d));let c,d,u,h,p,m,g,$,f,y,b,x=0,v=0,w=.5*n,S=.5*a,k=l(0,0);for(i>0?(u=0,h=0,p=0):(i=Math.abs(i),u=1,h=1,p=1),v=0;v{const{imageData:o,level:i,monochrome:r=!1}=e;if(!i)return t(null,o);const n=new Uint8ClampedArray(o.width*o.height*4),a=o.data,s=a.length;let l,c,d,u=0;const h=()=>255*(2*Math.random()-1)*i,p=r?()=>{const e=h();return[e,e,e]}:()=>[h(),h(),h()];for(;u{const{imageData:o,level:i}=e;if(!i)return t(null,o);const r=new Uint8ClampedArray(o.width*o.height*4),n=o.data,a=n.length;let s,l,c,d=0;for(;d{const{colorMatrix:o,convolutionMatrix:i,gamma:r,noise:n,vignette:a}=t,s=[];if(i&&s.push([Mo,{matrix:i.clarity}]),r>0&&s.push([Eo,{level:1/r}]),o&&!(e=>{const t=e.length;let o;const i=t>=20?6:t>=16?5:3;for(let r=0;r0||n<0)&&s.push([Po,{level:n}]),(a>0||a<0)&&s.push([Ro,{strength:a}]),!s.length)return e;const l=(e,t)=>`(err, imageData) => {\n (${e[t][0].toString()})(Object.assign({ imageData: imageData }, filterInstructions[${t}]), \n ${e[t+1]?l(e,t+1):"done"})\n }`,c=`function (options, done) {\n const filterInstructions = options.filterInstructions;\n const imageData = options.imageData;\n (${l(s,0)})(null, imageData)\n }`;return e=await F(c,[{imageData:e,filterInstructions:s.map((e=>e[1]))}],[e.data.buffer]),ko(e)},Ao=e=>"number"==typeof e,Lo=e=>R(e)&&null!==e.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g),zo=(e,t)=>e.hasOwnProperty(t),Fo=e=>Array.isArray(e);let Do=64,Oo=102,Bo=112,Wo=!1;var _o=(e,t)=>(!Wo&&u()&&(/^win/i.test(navigator.platform)&&(Oo=103),($o()||mo())&&(Do=63.5,Oo=110,Bo=123),Wo=!0),`${e}`),Vo=e=>e instanceof Blob,No=(e,t)=>e/t*100+"%",Ho=e=>`rgba(${Math.round(255*e[0])}, ${Math.round(255*e[1])}, ${Math.round(255*e[2])}, ${Ao(e[3])?e[3]:1})`,jo=e=>Object.values(e).join("_");const Uo=async(e,t=0)=>{const o=g("canvas",{width:80,height:80}).getContext("2d");return await((e=0)=>new Promise((t=>{setTimeout(t,e)})))(t),o.drawImage(e,0,0,80,80),!((e=>!new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data.buffer).some((e=>0!==e)))(o)&&t<=256)||await Uo(e,t+16)},Go=new Map;var Zo=e=>new Promise(((t,o)=>{const i=new FileReader;i.onerror=()=>o(i.error),i.onload=()=>t(i.result),i.readAsDataURL(e)})),Xo=()=>{let e=[];return{sub:(t,o)=>(e.push({event:t,callback:o}),()=>e=e.filter((e=>e.event!==t||e.callback!==o))),pub:(t,o)=>{e.filter((e=>e.event===t)).forEach((e=>e.callback(o)))}}};let Yo=null;var qo=()=>(null===Yo&&(Yo=b(/Firefox/)),Yo);const Ko=32,Jo=({color:e=[0,0,0],fontSize:t=16,fontFamily:o="sans-serif",fontVariant:i="normal",fontWeight:r="normal",fontStyle:n="normal",textAlign:a="left",letterSpacing:s="normal",lineHeight:l=20},c=1)=>`font-size:${t*c}px;font-style:${n};font-weight:${r};font-family:${o};font-variant:${i};line-height:${l*c}px;text-align:${a};letter-spacing:${Ao(s)?s+"px":"normal"};color:${Ho(e)};`,Qo=(e,t,o=1)=>{const{width:i,height:r,disableNewline:n}=t,a=!i,s=!1===n?((e="")=>e.split("\n").length)(e):void 0,l=a?"normal":"break-word",c=a&&!s?"nowrap":"pre-line";return`max-width:none;min-width:auto;width:${a?"auto":i*o+"px"};height:${r?r*o+"px":"auto"};margin-top:0;margin-bottom:0;padding-top:${(({fontSize:e=16,lineHeight:t=20}={})=>.5*Math.max(0,e-t))(t)*o}px;word-break:${l};word-wrap:normal;white-space:${c};`},ei=new Map,ti=e=>{const t=[];for(const o of Array.from(e.childNodes))o.nodeType===Node.TEXT_NODE?t.push(ii(o)):t.push(...ti(o));return t},oi="pointer-events:none;visibility:hidden;position:absolute;left:0;top:0;",ii=e=>{const t=e.nodeValue;if(!t)return[];const o=t.length,i=document.createRange();i.selectNodeContents(e);const r=[];for(let n=0;n({rect:n[t],text:e})))},ri=new Map,ni=(e="",t)=>{const{width:o=0,height:i=0}=t;if(o&&i)return We(o,i);let{fontSize:r=16,fontFamily:n,lineHeight:a=20,fontWeight:s,fontStyle:l,fontVariant:c,letterSpacing:d}=t;const u=jo({text:e,fontFamily:n,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:r,letterSpacing:d,lineHeight:a,width:o});let h=ri.get(u);if(h)return h;let p=1;r>1e3&&qo()&&(p=r/1e3,r=1e3,a/=p);const m=Gt(g("pre",{contenteditable:"true",spellcheck:"false",style:`${oi}${Jo({...t,fontSize:r,lineHeight:a})};${Qo(e,t)}"`,innerHTML:e})).getBoundingClientRect();return h=Fe(m),h.height+=Math.max(0,r-a),h=Ue(h,(e=>e*p)),o&&(h.width=o),ri.set(u,h),h},ai=new Map,si=(e,t)=>new Promise(((o,i)=>{let r=ai.get(e);void 0===r&&(r=((e,t)=>{const{sub:o,pub:i}=Xo();let r,n;return Promise.resolve(t&&t(e,{resourceType:"stylesheet"})).then((t=>{if(!1===t)return n="requestPrevented",i("error",n);const{headers:o,credentials:a}=t||{};fetch(e,{headers:o,credentials:a}).then((e=>e.text())).then((e=>{r=e,i("load",r)})).catch((e=>{n=e,i("error",n)}))})),{sub:(e,t)=>"load"===e&&r?t(r):"error"===e&&n?t(n):void o(e,t)}})(e,t),ai.set(e,r)),r.sub("load",o),r.sub("error",i)})),li=async(e,t)=>{let o;try{o=await si(e,t)}catch(e){return[]}const i=g("style",{innerHTML:o,id:L()});document.head.append(i);const r=Array.from(document.styleSheets).find((e=>e.ownerNode.id===i.id));return i.remove(),Array.from(r.cssRules)},ci=new Map,di=async(e,t)=>{if(ci.has(e.href))return ci.get(e.href);let o;try{o=Array.from(e.cssRules);for(const e of(e=>e.filter((e=>e instanceof CSSImportRule)))(o)){const i=e.href;if(ci.has(i)){const e=ci.get(i);o=[...o,...e];continue}const r=await li(i,t);ci.set(i,r),o=[...o,...r]}}catch(i){const r=e.href;o=await li(r,t),ci.set(r,o)}return(e=>e.filter((e=>e instanceof CSSFontFaceRule)))(o)},ui=(e,t)=>e.style.getPropertyValue(t),hi=(e,t)=>{if(!e.style)return!1;return ui(e,"font-family").replace(/^"|"$/g,"")==t},pi=async(e,t)=>{const o=((e,t)=>{const o=[];for(const i of e)hi(i,t)&&o.push(i);return o})(await(async e=>{const t=Array.from(document.styleSheets).map((t=>di(t,e))),o=await Promise.all(t),i=[];return o.forEach((e=>i.push(...e))),i})(t),e);return o.length?o.map((e=>{const t=e.parentStyleSheet.href&&new URL(e.parentStyleSheet.href),o=t?t.origin+(e=>e.pathname.split("/").slice(0,-1).join("/"))(t)+"/":"",i=e.style.getPropertyValue("src").match(/url\("?(.*?)"?\)/)[1],r=Array.from(e.style).filter((e=>"src"!=e)).reduce(((t,o)=>t+=o+":"+ui(e,o)+";"),"");return[/^http/.test(i)?i:o+i,r]})):[]},mi=new Map,gi=new Map;var $i=async(e="",t)=>{if(!e.length)return;let{color:o,imageWidth:i=300,imageHeight:r=150,paddingTop:n=0,paddingRight:a=Ko,paddingBottom:s=0,paddingLeft:l=Ko,fontFamily:c,fontSize:d,pixelRatio:u=1,willRequest:h,outline:p,blur:m}=t,g=1,$="";d>1e3&&qo()&&(g=d/1e3,$=`transform-origin:0 0;transform:scale(${g})`);const f=u/g,y=(i+l+a)*u,b=(r+s+n)*u,x=await(async(e,t)=>{if(mi.get(e))return;let o=gi.get(e);if(!o){const r=await pi(e,t);if(!r.length)return void mi.set(e,!0);const n=[];for(const[e,t]of r){const o=await fetch(e).then((e=>e.blob())),r=!(i=o.type)||/woff2/.test(i)?"woff2":/woff/.test(i)?"woff":/ttf|truetype/.test(i)?"truetype":/otf|opentype/.test(i)?"opentype":/svg/.test(i)?"svg":"woff2",a=await Zo(o);n.push(`@font-face { src:url(${a}) format('${r}');${t};font-display:block; }`)}o=n.join(""),gi.set(e,o)}var i;return o})(c,h);const v=e.replace(/%/g,"%25").replace(/#/g,"%23").replace(/ /g," ").replace(/&(?!#\d{4};|[a-z]+;)/gi,"&").replace(/
|\n/g,"
"),w=`top:${n*f}px;right:${a*f}px;bottom:${s*f}px;left:${l*f}px`;let S=o,k="",C="";if(p||m){const e=Ho(o);p&&(S=[0,0,0,0],k=`-webkit-text-stroke: ${2*p*f}px ${e}`),m&&(Xt()?C=`filter:blur(${m*f*.4}px)`:(S=[0,0,0,0],C=`text-shadow: 0 0 ${m*f}px ${e}`))}return((e,{safariCacheKey:t="*"}={})=>new Promise(((o,i)=>{const r=new Image;r.onerror=()=>i(new Error("Failed to load SVG")),r.onload=()=>{if(!Xt()||!e.includes("@font-face")||Go.has(t))return o(r);Uo(r).then((()=>{Go.set(t,!0),o(r)}))},r.src="data:image/svg+xml,"+e})))(`
${x?``:""}
${v}
`,{safariCacheKey:c})};const fi=e=>{const t={...e};return M(t)},yi=(e,t={})=>{const o=pt(e);let i,r;const n=t.width||t.rx,a=t.height||t.ry;if(n&&a)return ze(t);if(n||a){i=parseFloat(n||Number.MAX_SAFE_INTEGER),r=parseFloat(a||Number.MAX_SAFE_INTEGER);const e=Math.min(i,r);R(n)||R(a)?(i=e+"%",r=e*o+"%"):(i=e,r=e)}else{const e=10;i=e+"%",r=e*o+"%"}return{[(t.width?"width":t.rx?"rx":void 0)||"width"]:i,[(t.width?"height":t.rx?"ry":void 0)||"height"]:r}},bi=(e,t={})=>{return{width:void 0,height:void 0,...t,aspectRatio:1,backgroundImage:(o=_o(e),"data:image/svg+xml,"+o.replace("<","%3C").replace(">","%3E"))};var o},xi=(e,t={})=>({backgroundColor:[0,0,0,0],...Ri(t)?{}:{width:void 0,height:void 0,aspectRatio:void 0},...t,backgroundImage:R(e)?e:Vo(e)?URL.createObjectURL(e):e}),vi=(e,t)=>{let o;if(R(e)||Vo(e)){const i={...yi(t),backgroundSize:"contain"};o=Lo(e)?bi(e,i):xi(e,i)}else if(e.src){const i=yi(t,e.shape||e),r={...e.shape,...i};if(e.width&&e.height&&!zo(r,"aspectRatio")){const e=gr(i,"width",t),o=gr(i,"height",t);r.aspectRatio=U(e,o)}r.backgroundSize||e.shape||e.width&&e.height||(r.backgroundSize="contain"),o=Lo(e.src)?bi(e.src,r):xi(e.src,r)}else e.shape&&(o=fi(e.shape));return zo(o,"backgroundImage")&&(zo(o,"backgroundColor")||(o.backgroundColor=[0,0,0,0]),zo(o,"disableStyle")||(o.disableStyle=["cornerRadius","backgroundColor","strokeColor","strokeWidth"])),t?pr(o,t):o},wi=e=>ue(e.x1,e.y1),Si=e=>ue(e.x2,e.y2),ki=e=>zo(e,"text"),Ci=e=>ki(e)&&!(Bi(e)||zo(e,"width")),Ti=e=>ki(e)&&(Bi(e)||zo(e,"width")),Mi=e=>!ki(e)&&Wi(e),Ri=e=>zo(e,"rx"),Pi=e=>zo(e,"x1"),Ei=e=>zo(e,"points"),Ii=e=>ki(e)&&e.isEditing,Ai=e=>!zo(e,"opacity")||e.opacity>0,Li=e=>e.isSelected,zi=e=>e.isEditing,Fi=e=>e._isDraft,Di=e=>zo(e,"width")&&zo(e,"height"),Oi=e=>{const t=zo(e,"right"),o=zo(e,"bottom");return t||o},Bi=e=>(zo(e,"x")||zo(e,"left"))&&zo(e,"right")||(zo(e,"y")||zo(e,"top"))&&zo(e,"bottom"),Wi=e=>Di(e)||Bi(e),_i=e=>(e._isDraft=!0,e),Vi=e=>(e._isDraft=!1,e),Ni=(e,t)=>!0!==e.disableStyle&&(!Fo(e.disableStyle)||!t||!e.disableStyle.includes(t)),Hi=e=>!0!==e.disableSelect,ji=e=>!0!==e.disableRemove,Ui=e=>!e.disableFlip&&(!Fi(e)&&!Oi(e)&&(e=>zo(e,"backgroundImage")||zo(e,"text"))(e)),Gi=(e,t)=>!!ki(e)&&(!0!==e.disableInput&&(P(e.disableInput)?e.disableInput(null!=t?t:e.text):t||!0)),Zi=(e,t)=>!0!==e.disableTextLayout&&(!Fo(e.disableTextLayout)||!t||!e.disableTextLayout.includes(t)),Xi=e=>!0!==e.disableManipulate&&!Fi(e)&&!Oi(e),Yi=e=>Xi(e)&&!0!==e.disableMove,qi=e=>(delete e.left,delete e.right,delete e.top,delete e.bottom,e),Ki=e=>(delete e.rotation,e),Ji=e=>(e.strokeWidth=e.strokeWidth||1,e.strokeColor=e.strokeColor||[0,0,0],e),Qi=e=>(e.backgroundColor=e.backgroundColor?e.backgroundColor:e.strokeWidth||e.backgroundImage?void 0:[0,0,0],e),er=e=>{let t=e.text;t=t.replace(/&(#[0-9]+|[a-z]+);/gi,((e,t)=>`___${t}___`)),t=t.replace(/&/,"&"),e.text=t.replace(/___(#[0-9]+|[a-z]+)___/gi,((e,t)=>`&${t};`))},tr=e=>{if(e.fontSize=e.fontSize||"4%",e.fontFamily=e.fontFamily||"sans-serif",e.fontWeight=e.fontWeight||"normal",e.fontStyle=e.fontStyle||"normal",e.fontVariant=e.fontVariant||"normal",e.lineHeight=e.lineHeight||"120%",e.color=e.color||[0,0,0],e.format="html"===e.format?"html":"text",e.textShadow){const[t,o,i,r]=e.textShadow;e.textShadowX=t,e.textShadowY=o,e.textShadowBlur=i,e.textShadowColor=r,delete e.textShadow}if(e.textOutline){const[t,o]=e.textOutline;e.textOutlineWidth=t,e.textOutlineColor=o,delete e.textOutline}return"html"===e.format?er(e):(e=>{er(e);let t=e.text;t=t.replace(//g,"<"),e.text=t})(e),Ci(e)?or(e):ir(e)},or=e=>(!1!==e.disableNewline&&(delete e.textAlign,e.text=e.text.replace(/\n/g," ")),qi(e)),ir=e=>(e.textAlign=e.textAlign||"left",e),rr=e=>((e=>{R(e.id)||(e.id=L()),zo(e,"rotation")||(e.rotation=0),zo(e,"opacity")||(e.opacity=1),zo(e,"disableErase")||(e.disableErase=!0)})(e),ki(e)?tr(e):Mi(e)?(e=>{e.cornerRadius=e.cornerRadius||0,e.strokeWidth=e.strokeWidth||0,e.strokeColor=e.strokeColor||[0,0,0],Qi(e)})(e):Ei(e)?(e=>{Ji(e),Ki(e),zo(e,"pathClose")||(e.disableResize=!0,zo(e,"disableMove")||(e.disableMove=!0)),qi(e)})(e):Pi(e)?(e=>{Ji(e),e.lineStart=e.lineStart||void 0,e.lineEnd=e.lineEnd||void 0,Ki(e),qi(e)})(e):Ri(e)&&(e=>{e.strokeWidth=e.strokeWidth||0,e.strokeColor=e.strokeColor||[0,0,0],Qi(e)})(e),e),nr=e=>ki(e)?"text":Mi(e)?"rectangle":Ei(e)?"path":Pi(e)?"line":Ri(e)?"ellipse":void 0,ar=(e,t)=>parseFloat(e)/100*t,sr=new RegExp(/^x|left|right|^width|rx|fontSize|eraseRadius|feather|cornerRadius|strokeWidth|strokeDash/,"i"),lr=new RegExp(/^y|top|bottom|^height|ry/,"i"),cr=(e,t,{width:o,height:i})=>{if(Array.isArray(t))return t.map((t=>(C(t)&&hr(t,{width:o,height:i}),R(t)&&(t=cr(e,t,{width:o,height:i})),t)));if("string"!=typeof t)return t;if(!t.endsWith("%"))return t;const r=parseFloat(t)/100;return sr.test(e)?se(o*r,6):lr.test(e)?se(i*r,6):t},dr=cr,ur=["lineHeight","textOutlineWidth","textShadowX","textShadowY","textShadowBlur"],hr=(e,t)=>{Object.entries(e).map((([o,i])=>{e[o]=cr(o,i,t)})),e.text&&ur.filter((t=>R(e[t]))).forEach((t=>{var o,i;e[t]=(o=e[t],i=e.fontSize,Math.round(i*(parseFloat(o)/100)))}))},pr=(e,t)=>(hr(e,t),xr(e,t),e),mr=(e,t)=>{let o;return/^x|width|rx|fontSize|strokeWidth|cornerRadius/.test(e)?o=t.width:/^y|height|ry/.test(e)&&(o=t.height),o},gr=(e,t,o)=>Array.isArray(e[t])?e[t].map((e=>Object.entries(e).reduce(((e,[t,i])=>(e[t]=R(i)?ar(i,mr(t,o)):i,e)),{}))):R(e[t])?ar(e[t],mr(t,o)):e[t],$r=(e,t,o)=>t.reduce(((t,i)=>{const r=gr(e,i,o);return t[i]=r,t}),{}),fr=(e,t,o)=>(Object.keys(t).forEach((i=>((e,t,o,i)=>{if(!R(e[t]))return e[t]=o,e;const r=mr(t,i);return e[t]=void 0===r?o:No(o,r),e})(e,i,t[i],o))),e),yr=(e,t)=>{const o=e.filter((e=>e.x<0||e.y<0||e.x1<0||e.y1<0)).reduce(((e,t)=>{const[o,i,r,n]=(e=>{const t=Je(),o=e.strokeWidth||0;if(Mi(e))t.x=e.x-.5*o,t.y=e.y-.5*o,t.width=e.width+o,t.height=e.height+o;else if(Pi(e)){const{x1:i,y1:r,x2:n,y2:a}=e,s=Math.abs(Math.min(i,n)),l=Math.abs(Math.max(i,n)),c=Math.abs(Math.min(r,a)),d=Math.abs(Math.min(r,a));t.x=s+.5*o,t.y=l+.5*o,t.width=l-s+o,t.height=d-c+o}else Ri(e)&&(t.x=e.x-e.rx+.5*o,t.y=e.y-e.ry+.5*o,t.width=2*e.rx+o,t.height=2*e.ry+o);return t&&zo(e,"rotation")&&$t(t,e.rotation),vt(t)})(t);return e.top=Math.min(o,e.top),e.left=Math.min(n,e.left),e.bottom=Math.max(r,e.bottom),e.right=Math.max(i,e.right),e}),{top:0,right:0,bottom:0,left:0});return o.right>0&&(o.right-=t.width),o.bottom>0&&(o.bottom-=t.height),o},br=(e,t,o)=>{const i=fi(e);pr(i,t);const r=o(i);return Array.isArray(r)?r:[r]},xr=(e,t)=>{if(zo(e,"left")&&(e.x=e.left),zo(e,"right")&&!R(e.right)){const o=t.width-e.right;zo(e,"left")?(e.x=e.left,e.width=Math.max(0,o-e.left)):zo(e,"width")&&(e.x=o-e.width)}if(zo(e,"top")&&(e.y=e.top),zo(e,"bottom")&&!R(e.bottom)){const o=t.height-e.bottom;zo(e,"top")?(e.y=e.top,e.height=Math.max(0,o-e.top)):zo(e,"height")&&(e.y=o-e.height)}return e},vr=(e,t)=>(Ei(e)&&e.points.filter((e=>Ao(e.x))).forEach((e=>{e.x*=t,e.y*=t})),Pi(e)&&Ao(e.x1)&&(e.x1*=t,e.y1*=t,e.x2*=t,e.y2*=t),Ao(e.x)&&Ao(e.y)&&(e.x*=t,e.y*=t),Ao(e.width)&&Ao(e.height)&&(e.width*=t,e.height*=t),Ao(e.rx)&&Ao(e.ry)&&(e.rx*=t,e.ry*=t),(e=>Ao(e.strokeWidth)&&e.strokeWidth>0)(e)&&(e.strokeWidth*=t),ki(e)&&(e._scale=t,Ao(e.fontSize)&&(e.fontSize*=t),Ao(e.lineHeight)&&(e.lineHeight*=t),Ao(e.width)&&!Ao(e.height)&&(e.width*=t)),zo(e,"cornerRadius")&&Ao(e.cornerRadius)&&(e.cornerRadius*=t),e),wr=e=>{if(Mi(e))return ue(e.x+.5*e.width,e.y+.5*e.height);if(Ri(e))return ue(e.x,e.y);if(e.text){if(Ti(e)){const t=e.height||ni(e.text,e).height;return ue(e.x+.5*e.width,e.y+.5*t)}const t=ni(e.text,e);return ue(e.x+.5*t.width,e.y+.5*t.height)}return Ei(e)?Ee(e.points):Pi(e)?Ee([wi(e),Si(e)]):void 0};var Sr=e=>/canvas/i.test(e.nodeName),kr=(e,t)=>new Promise(((o,i)=>{let r=e,n=!1;const a=()=>{n||(n=!0,P(t)&&Promise.resolve().then((()=>t(We(r.naturalWidth,r.naturalHeight)))))};if(r.src||(r=new Image,R(e)&&new URL(e,location.href).origin!==location.origin&&(r.crossOrigin="anonymous"),r.src=R(e)?e:URL.createObjectURL(e)),r.complete)return a(),o(r);P(t)&&Yt(r).then(a).catch(i),r.onload=()=>{a(),o(r)},r.onerror=()=>i(new Error("Failed to load image"))}));const Cr=new Map([]),Tr=(e,t={})=>new Promise(((o,i)=>{const{onMetadata:r=a,onLoad:n=o,onError:s=i,onComplete:l=a}=t;let c=Cr.get(e);if(c||(c={loading:!1,complete:!1,error:!1,image:void 0,size:void 0,bus:Xo()},Cr.set(e,c)),c.bus.sub("meta",r),c.bus.sub("load",n),c.bus.sub("error",s),c.bus.sub("complete",l),Sr(e)){const t=e,o=t.cloneNode();c.complete=!0,c.image=o,c.size=Be(t)}if(c.complete)return c.bus.pub("meta",{size:c.size}),c.error?c.bus.pub("error",c.error):c.bus.pub("load",c.image),c.bus.pub("complete"),void(c.bus=Xo());c.loading||(c.loading=!0,kr(e,(e=>{c.size=e,c.bus.pub("meta",{size:e})})).then((e=>{c.image=e,c.bus.pub("load",e)})).catch((e=>{c.error=e,c.bus.pub("error",e)})).finally((()=>{c.complete=!0,c.loading=!1,c.bus.pub("complete"),c.bus=Xo()})))})),Mr=(e,t,o,i)=>e.drawImage(t,o.x,o.x,o.width,o.height,i.x,i.y,i.width,i.height);var Rr=async(e,t,o,i,r=Mr,n)=>{e.save(),e.clip(),await r(e,t,o,i,n),e.restore()};const Pr=(e,t,o,i,r)=>{const n=Ke(e);if(i){const e=St(ot(i),se);return e.x*=o.width,e.width*=o.width,e.y*=o.height,e.height*=o.height,{srcRect:e,destRect:n}}const a=nt(0,0,o.width,o.height);if("contain"===t){const t=xt(e,pt(a));n.width=t.width,n.height=t.height,r?(n.x+=r.x,n.y+=r.y):(n.x+=t.x,n.y+=t.y)}else if("cover"===t){const e=bt(n,a.width/a.height);n.width=e.width,n.height=e.height,r?(n.x+=r.x,n.y+=r.y):(n.x+=e.x,n.y+=e.y)}else t?(n.width=t.width,n.height=t.height,r&&(n.x+=r.x,n.y+=r.y)):r&&(n.width=o.width,n.height=o.height,n.x+=r.x,n.y+=r.y);return{srcRect:a,destRect:n}},Er=(e,t)=>(t.cornerRadius>0?((e,t,o,i,r,n)=>{i<2*n&&(n=i/2),r<2*n&&(n=r/2),e.beginPath(),e.moveTo(t+n,o),e.arcTo(t+i,o,t+i,o+r,n),e.arcTo(t+i,o+r,t,o+r,n),e.arcTo(t,o+r,t,o,n),e.arcTo(t,o,t+i,o,n),e.closePath()})(e,t.x,t.y,t.width,t.height,t.cornerRadius):e.rect(t.x,t.y,t.width,t.height),e),Ir=(e,t)=>(t.backgroundColor&&e.fill(),e),Ar=(e,t)=>(t.strokeWidth&&e.stroke(),e);var Lr=async(e,t,o={})=>{const{drawImage:i}=o;if(e.lineWidth=t.strokeWidth?t.strokeWidth:1,e.strokeStyle=t.strokeColor?Ho(t.strokeColor):"none",e.fillStyle=t.backgroundColor?Ho(t.backgroundColor):"none",e.globalAlpha=t.opacity,t.backgroundImage){let o;if(o=Sr(t.backgroundImage)?t.backgroundImage:await Tr(t.backgroundImage),Er(e,t),Ir(e,t),"repeat"===t.backgroundRepeat){const r=t.backgroundPosition||{x:0,y:0},{srcRect:n,destRect:a}=Pr(t,t.backgroundSize||Be(o),Be(o),t.backgroundCorners,{x:0,y:0}),s=document.createElement("canvas");s.width=a.width,s.height=a.height;const l=s.getContext("2d",{willReadFrequently:!1,desynchronized:!0});await i(l,o,n,{...a,x:0,y:0});const c=e.createPattern(s,"repeat");e.fillStyle=c,e.save(),e.beginPath(),e.rect(t.x+r.x,t.y+r.y,t.width-r.x,t.height-r.y),e.clip(),e.translate(a.x+r.x,a.y+r.y),e.fill(),f(s),e.restore()}else{const{srcRect:r,destRect:n}=Pr(t,t.backgroundSize,Be(o),t.backgroundCorners,t.backgroundPosition);await Rr(e,o,r,n,i,{feather:t.feather})}return e.beginPath(),Er(e,t),Ar(e,t),[]}return Er(e,t),Ir(e,t),Ar(e,t),[]},zr=async(e,t,o={})=>new Promise((async(i,r)=>{const{drawImage:n}=o;if(e.lineWidth=t.strokeWidth||1,e.strokeStyle=t.strokeColor?Ho(t.strokeColor):"none",e.fillStyle=t.backgroundColor?Ho(t.backgroundColor):"none",e.globalAlpha=t.opacity,e.ellipse(t.x,t.y,t.rx,t.ry,0,0,2*Math.PI),t.backgroundColor&&e.fill(),t.backgroundImage){let o;try{o=await Tr(t.backgroundImage)}catch(e){r(e)}const a=nt(t.x-t.rx,t.y-t.ry,2*t.rx,2*t.ry),{srcRect:s,destRect:l}=Pr(a,t.backgroundSize,Be(o),t.backgroundCorners,t.backgroundPosition);await Rr(e,o,s,l,n),t.strokeWidth&&e.stroke(),i([])}else t.strokeWidth&&e.stroke(),i([])})),Fr=async(e,t,o)=>{const i=t.width&&t.height?Fe(t):ni(t.text,t),r={x:t.x,y:t.y,width:i.width,height:i.height};if(Lr(e,{...t,...r,options:o}),!t.text.length)return[];const{textOutlineWidth:n=0,textShadowX:a=0,textShadowY:s=0,textShadowBlur:l=0,textShadowColor:c,outline:d,blur:u,...h}=t;return t.height&&(e.rect(r.x-n+Math.min(a,0),r.y-n+Math.min(s,0),r.width+n+n+Math.abs(a)+l,r.height+n+Math.abs(s)+l),e.save(),e.clip()),(a||s||l)&&(e.save(),e.translate(a,s),await Dr(e,r,t,{...o,paddingLeft:Ko+l,paddingRight:Ko+l,paddingTop:l,paddingBottom:l,shapeExtendedProps:{color:c,blur:l}}),e.restore()),n&&await Dr(e,r,t,{...o,paddingLeft:Ko+n,paddingRight:Ko+n,paddingTop:n,paddingBottom:n,shapeExtendedProps:{color:t.textOutlineColor,outline:n}}),t.height&&e.restore(),await Dr(e,r,h,{...o,paddingLeft:Ko,paddingRight:Ko,paddingTop:0,paddingBottom:0}),[]};const Dr=async(e,t,o,i)=>{const{willRequest:r,shapeExtendedProps:n,paddingLeft:a,paddingRight:s,paddingTop:l,paddingBottom:c}=i,d=await $i(o.text,{...o,...n,...t,paddingLeft:a,paddingRight:s,paddingTop:l,paddingBottom:c,imageWidth:t.width,imageHeight:t.height,willRequest:r});e.drawImage(d,o.x-a,o.y-l,d.width,d.height)};var Or=async(e,t)=>new Promise((async o=>{e.lineWidth=t.strokeWidth||1,e.strokeStyle=t.strokeColor?Ho(t.strokeColor):"none",e.globalAlpha=t.opacity;let i=wi(t),r=Si(t);e.moveTo(i.x,i.y),e.lineTo(r.x,r.y),t.strokeWidth&&e.stroke(),o([])})),Br=async(e,t)=>new Promise(((o,i)=>{if(t.bitmap&&1===t.points.length)return void zr(e,{x:t.points[0].x,y:t.points[0].y,rx:.5*t.strokeWidth,ry:.5*t.strokeWidth,backgroundColor:t.strokeColor}).then((()=>o([])));e.lineWidth=t.strokeWidth||1,e.strokeStyle=t.strokeColor?Ho(t.strokeColor):"none",e.fillStyle=t.backgroundColor?Ho(t.backgroundColor):"none",e.globalAlpha=t.opacity;const{points:r}=t;e.lineCap=t.strokeCap,e.lineJoin=t.strokeJoin,e.setLineDash(t.strokeDash||[]),t.pathClose&&e.beginPath(),e.moveTo(r[0].x,r[0].y);const n=r.length;for(let t=1;tt||o?(e.translate(i.x,i.y),e.scale(t?-1:1,o?-1:1),e.translate(-i.x,-i.y),e):e;const _r=async(e,t,o)=>{e.globalCompositeOperation="subtract"===t.drawMode?"destination-out":"source-over";const i=wr(t);let r;if(xo(e,t.rotation,i),Wr(e,t.flipX,t.flipY,i),Mi(t)?r=Lr:Ri(t)?r=zr:Pi(t)?r=Or:Ei(t)?r=Br:ki(t)&&(r=Fr),r){const i=await r(e,t,o);if(!i.length)return[];return[t,...await Vr(e,i,o)]}return[]};var Vr=async(e,t,o)=>{let i=[];for(const r of t)e.save(),e.beginPath(),i=[...i,...await _r(e,r,o)],e.restore();return i},Nr=async(e,t={})=>{const{shapes:o=[],contextBounds:i=e,transform:r=a,drawImage:n,willRequest:s,canvasMemoryLimit:l,computeShape:c=G,preprocessShape:d=G}=t;if(!o.length)return e;const u=g("canvas");u.width=i.width,u.height=i.height;const h=u.getContext("2d",{willReadFrequently:!0});h.putImageData(e,i.x||0,i.y||0);const p=o.map(fi).map(c).map(d).flat();r(h),await Vr(h,p,{drawImage:n,canvasMemoryLimit:l,willRequest:s});const m=h.getImageData(0,0,u.width,u.height);return f(u),m},Hr=async(e,t={})=>{const{backgroundColor:o,backgroundImage:i}=t,r=!(!o||o&&0===o[3]);if(!i&&!r)return e;const n=g("canvas");n.width=e.width,n.height=e.height;const a=n.getContext("2d",{willReadFrequently:!0});if(a.putImageData(e,0,0),a.globalCompositeOperation="destination-over",r&&(a.fillStyle=Ho(o),a.fillRect(0,0,n.width,n.height)),i){let t;t=Sr(i)?i:await Tr(i);const{srcRect:o,destRect:r}=Pr({x:0,y:0,width:e.width,height:e.height},"cover",{width:t.width,height:t.height});a.drawImage(t,o.x,o.y,o.width,o.height,r.x,r.y,r.width,r.height)}const s=a.getImageData(0,0,n.width,n.height);return f(n),s},jr=e=>e.length?e.reduce(((e,t)=>((e,t)=>{const o=new Array(20);return o[0]=e[0]*t[0]+e[1]*t[5]+e[2]*t[10]+e[3]*t[15],o[1]=e[0]*t[1]+e[1]*t[6]+e[2]*t[11]+e[3]*t[16],o[2]=e[0]*t[2]+e[1]*t[7]+e[2]*t[12]+e[3]*t[17],o[3]=e[0]*t[3]+e[1]*t[8]+e[2]*t[13]+e[3]*t[18],o[4]=e[0]*t[4]+e[1]*t[9]+e[2]*t[14]+e[3]*t[19]+e[4],o[5]=e[5]*t[0]+e[6]*t[5]+e[7]*t[10]+e[8]*t[15],o[6]=e[5]*t[1]+e[6]*t[6]+e[7]*t[11]+e[8]*t[16],o[7]=e[5]*t[2]+e[6]*t[7]+e[7]*t[12]+e[8]*t[17],o[8]=e[5]*t[3]+e[6]*t[8]+e[7]*t[13]+e[8]*t[18],o[9]=e[5]*t[4]+e[6]*t[9]+e[7]*t[14]+e[8]*t[19]+e[9],o[10]=e[10]*t[0]+e[11]*t[5]+e[12]*t[10]+e[13]*t[15],o[11]=e[10]*t[1]+e[11]*t[6]+e[12]*t[11]+e[13]*t[16],o[12]=e[10]*t[2]+e[11]*t[7]+e[12]*t[12]+e[13]*t[17],o[13]=e[10]*t[3]+e[11]*t[8]+e[12]*t[13]+e[13]*t[18],o[14]=e[10]*t[4]+e[11]*t[9]+e[12]*t[14]+e[13]*t[19]+e[14],o[15]=e[15]*t[0]+e[16]*t[5]+e[17]*t[10]+e[18]*t[15],o[16]=e[15]*t[1]+e[16]*t[6]+e[17]*t[11]+e[18]*t[16],o[17]=e[15]*t[2]+e[16]*t[7]+e[17]*t[12]+e[18]*t[17],o[18]=e[15]*t[3]+e[16]*t[8]+e[17]*t[13]+e[18]*t[18],o[19]=e[15]*t[4]+e[16]*t[9]+e[17]*t[14]+e[18]*t[19]+e[19],o})([...e],t)),e.shift()):[],Ur=(e,t)=>{const o=e.width*e.height,i=t.reduce(((e,t)=>(t.width>e.width&&t.height>e.height&&(e.width=t.width,e.height=t.height),e)),{width:0,height:0}),r=i.width*i.height;return((e,t=2)=>Math.round(e*t)/t)(Math.max(.5,.5+(1-r/o)/2),5)};function Gr(){}const Zr=e=>e;function Xr(e,t){for(const o in t)e[o]=t[o];return e}function Yr(e){return e()}function qr(){return Object.create(null)}function Kr(e){e.forEach(Yr)}function Jr(e){return"function"==typeof e}function Qr(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function en(e,...t){if(null==e)return Gr;const o=e.subscribe(...t);return o.unsubscribe?()=>o.unsubscribe():o}function tn(e){let t;return en(e,(e=>t=e))(),t}function on(e,t,o){e.$$.on_destroy.push(en(t,o))}function rn(e,t,o,i){if(e){const r=nn(e,t,o,i);return e[0](r)}}function nn(e,t,o,i){return e[1]&&i?Xr(o.ctx.slice(),e[1](i(t))):o.ctx}function an(e,t,o,i){if(e[2]&&i){const r=e[2](i(o));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],o=Math.max(t.dirty.length,r.length);for(let i=0;i32){const t=[],o=e.ctx.length/32;for(let e=0;ewindow.performance.now():()=>Date.now(),gn=pn?e=>requestAnimationFrame(e):Gr;const $n=new Set;function fn(e){$n.forEach((t=>{t.c(e)||($n.delete(t),t.f())})),0!==$n.size&&gn(fn)}function yn(e){let t;return 0===$n.size&&gn(fn),{promise:new Promise((o=>{$n.add(t={c:e,f:o})})),abort(){$n.delete(t)}}}function bn(e,t){e.appendChild(t)}function xn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function vn(e){const t=kn("style");return function(e,t){bn(e.head||e,t),t.sheet}(xn(e),t),t.sheet}function wn(e,t,o){e.insertBefore(t,o||null)}function Sn(e){e.parentNode.removeChild(e)}function kn(e){return document.createElement(e)}function Cn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Tn(e){return document.createTextNode(e)}function Mn(){return Tn(" ")}function Rn(){return Tn("")}function Pn(e,t,o,i){return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function En(e){return function(t){return t.preventDefault(),e.call(this,t)}}function In(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function An(e,t,o){null==o?e.removeAttribute(t):e.getAttribute(t)!==o&&e.setAttribute(t,o)}function Ln(e,t){const o=Object.getOwnPropertyDescriptors(e.__proto__);for(const i in t)null==t[i]?e.removeAttribute(i):"style"===i?e.style.cssText=t[i]:"__value"===i?e.value=e[i]=t[i]:o[i]&&o[i].set?e[i]=t[i]:An(e,i,t[i])}function zn(e,t){Object.keys(t).forEach((o=>{!function(e,t,o){t in e?e[t]="boolean"==typeof e[t]&&""===o||o:An(e,t,o)}(e,o,t[o])}))}function Fn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function Dn(e,t){e.value=null==t?"":t}function On(e,t,{bubbles:o=!1,cancelable:i=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(e,o,i,t),r}class Bn{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,o=null){this.e||(this.is_svg?this.e=Cn(t.nodeName):this.e=kn(t.nodeName),this.t=t,this.c(e)),this.i(o)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t>>0}(d)}_${s}`,h=xn(e),{stylesheet:p,rules:m}=_n.get(h)||function(e,t){const o={stylesheet:vn(t),rules:{}};return _n.set(e,o),o}(h,e);m[u]||(m[u]=!0,p.insertRule(`@keyframes ${u} ${d}`,p.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?g+", ":""}${u} ${i}ms linear ${r}ms 1 both`,Nn+=1,u}function jn(e,t){const o=(e.style.animation||"").split(", "),i=o.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),r=o.length-i.length;r&&(e.style.animation=i.join(", "),Nn-=r,Nn||gn((()=>{Nn||(_n.forEach((e=>{const{ownerNode:t}=e.stylesheet;t&&Sn(t)})),_n.clear())})))}function Un(e){Vn=e}function Gn(){if(!Vn)throw new Error("Function called outside component initialization");return Vn}function Zn(e){Gn().$$.on_mount.push(e)}function Xn(e){Gn().$$.after_update.push(e)}function Yn(e){Gn().$$.on_destroy.push(e)}function qn(){const e=Gn();return(t,o,{cancelable:i=!1}={})=>{const r=e.$$.callbacks[t];if(r){const n=On(t,o,{cancelable:i});return r.slice().forEach((t=>{t.call(e,n)})),!n.defaultPrevented}return!0}}function Kn(e,t){return Gn().$$.context.set(e,t),t}function Jn(e){return Gn().$$.context.get(e)}function Qn(e,t){const o=e.$$.callbacks[t.type];o&&o.slice().forEach((e=>e.call(this,t)))}const ea=[],ta=[],oa=[],ia=[],ra=Promise.resolve();let na=!1;function aa(){na||(na=!0,ra.then(pa))}function sa(){return aa(),ra}function la(e){oa.push(e)}function ca(e){ia.push(e)}const da=new Set;let ua,ha=0;function pa(){const e=Vn;do{for(;ha{$a.delete(e),i&&(o&&e.d(1),i())})),e.o(t)}else i&&i()}const wa={duration:0};function Sa(e,t,o,i){let r=t(e,o),n=i?0:1,a=null,s=null,l=null;function c(){l&&jn(e,l)}function d(e,t){const o=e.b-n;return t*=Math.abs(o),{a:n,b:e.b,d:o,duration:t,start:e.start,end:e.start+t,group:e.group}}function u(t){const{delay:o=0,duration:i=300,easing:u=Zr,tick:h=Gr,css:p}=r||wa,m={start:mn()+o,b:t};t||(m.group=fa,fa.r+=1),a||s?s=m:(p&&(c(),l=Hn(e,n,t,i,o,u,p)),t&&h(0,1),a=d(m,i),la((()=>ga(e,t,"start"))),yn((t=>{if(s&&t>s.start&&(a=d(s,i),s=null,ga(e,a.b,"start"),p&&(c(),l=Hn(e,n,a.b,a.duration,0,u,r.css))),a)if(t>=a.end)h(n=a.b,1-n),ga(e,a.b,"end"),s||(a.b?c():--a.group.r||Kr(a.group.c)),a=null;else if(t>=a.start){const e=t-a.start;n=a.a+a.d*u(e/a.duration),h(n,1-n)}return!(!a&&!s)})))}return{run(e){Jr(r)?(ua||(ua=Promise.resolve(),ua.then((()=>{ua=null}))),ua).then((()=>{r=r(),u(e)})):u(e)},end(){c(),a=s=null}}}const ka="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Ca(e,t){e.d(1),t.delete(e.key)}function Ta(e,t){va(e,1,1,(()=>{t.delete(e.key)}))}function Ma(e,t,o,i,r,n,a,s,l,c,d,u){let h=e.length,p=n.length,m=h;const g={};for(;m--;)g[e[m].key]=m;const $=[],f=new Map,y=new Map;for(m=p;m--;){const e=u(r,n,m),s=o(e);let l=a.get(s);l?i&&l.p(e,t):(l=c(s,e),l.c()),f.set(s,$[m]=l),s in g&&y.set(s,Math.abs(m-g[s]))}const b=new Set,x=new Set;function v(e){xa(e,1),e.m(s,d),a.set(e.key,e),d=e.first,p--}for(;h&&p;){const t=$[p-1],o=e[h-1],i=t.key,r=o.key;t===o?(d=t.first,h--,p--):f.has(r)?!a.has(i)||b.has(i)?v(t):x.has(r)?h--:y.get(i)>y.get(r)?(x.add(i),v(t)):(b.add(r),h--):(l(o,a),h--)}for(;h--;){const t=e[h];f.has(t.key)||l(t,a)}for(;p;)v($[p-1]);return $}function Ra(e,t){const o={},i={},r={$$scope:1};let n=e.length;for(;n--;){const a=e[n],s=t[n];if(s){for(const e in a)e in s||(i[e]=1);for(const e in s)r[e]||(o[e]=s[e],r[e]=1);e[n]=s}else for(const e in a)r[e]=1}for(const e in i)e in o||(o[e]=void 0);return o}function Pa(e){return"object"==typeof e&&null!==e?e:{}}function Ea(e,t,o){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=o,o(e.$$.ctx[i]))}function Ia(e){e&&e.c()}function Aa(e,t,o,i){const{fragment:r,after_update:n}=e.$$;r&&r.m(t,o),i||la((()=>{const t=e.$$.on_mount.map(Yr).filter(Jr);e.$$.on_destroy?e.$$.on_destroy.push(...t):Kr(t),e.$$.on_mount=[]})),n.forEach(la)}function La(e,t){const o=e.$$;null!==o.fragment&&(Kr(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function za(e,t,o,i,r,n,a,s=[-1]){const l=Vn;Un(e);const c=e.$$={fragment:null,ctx:[],props:n,update:Gr,not_equal:r,bound:qr(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:qr(),dirty:s,skip_bound:!1,root:t.target||l.$$.root};a&&a(c.root);let d=!1;if(c.ctx=o?o(e,t.props||{},((t,o,...i)=>{const n=i.length?i[0]:o;return c.ctx&&r(c.ctx[t],c.ctx[t]=n)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](n),d&&function(e,t){-1===e.$$.dirty[0]&&(ea.push(e),aa(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const e=o.indexOf(t);-1!==e&&o.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Da=[];function Oa(e,t){return{subscribe:Ba(e,t).subscribe}}function Ba(e,t=Gr){let o;const i=new Set;function r(t){if(Qr(e,t)&&(e=t,o)){const t=!Da.length;for(const t of i)t[1](),Da.push(t,e);if(t){for(let e=0;e{i.delete(s),0===i.size&&(o(),o=null)}}}}function Wa(e,t,o){const i=!Array.isArray(e),r=i?[e]:e,n=t.length<2;return Oa(o,(e=>{let o=!1;const a=[];let s=0,l=Gr;const c=()=>{if(s)return;l();const o=t(i?a[0]:a,e);n?e(o):l=Jr(o)?o:Gr},d=r.map(((e,t)=>en(e,(e=>{a[t]=e,s&=~(1<{s|=1<e.reduce(((e,t)=>Object.assign(e,t)),{});const Va=e=>({updateValue:e}),Na=e=>({defaultValue:e}),Ha=e=>({store:e}),ja=e=>({store:(t,o)=>Wa(...e(o))}),Ua=e=>({store:(t,o)=>{const[i,r,n=(()=>!1)]=e(o);let a,s=!0;return Wa(i,((e,t)=>{r(e,(e=>{!s&&n(a,e)||(a=e,s=!1,t(e))}))}))}}),Ga=e=>({store:(t,o)=>{const[i,r={},n]=e(o);let a=[];const s={},l=e=>i(e,s),c=e=>{(a.length||e.length)&&(a=e,d())},d=()=>{const e=a.map(l);n&&e.sort(n),a=[...e],h(e)};Object.entries(r).map((([e,t])=>t.subscribe((t=>{s[e]=t,t&&d()}))));const{subscribe:u,set:h}=Ba(t||[]);return{set:c,update:e=>c(e(a)),subscribe:u}}});var Za=e=>{const t={},o={};return e.forEach((([e,...i])=>{const r=_a(i),n=t[e]=((e,t,o)=>{const{store:i=(e=>Ba(e)),defaultValue:r=a,updateValue:n}=o,s=i(r(),t,e),{subscribe:l,update:c=a}=s;let d;const u=e=>{let t=!0;d&&d(),d=l((o=>{if(t)return t=!1;e(o),d(),d=void 0}))},h=n?n(e):G;return s.set=e=>c((t=>h(e,t,u))),s.defaultValue=r,s})(o,t,r),s={get:()=>tn(n),set:n.set};Object.defineProperty(o,e,s)})),{stores:t,accessors:o}};var Xa=[["src",Ha((()=>{let e;const{subscribe:t,set:o}=Ba(),i=t=>{e!==t&&(e=t,o(e))};return{set:i,subscribe:t,update:t=>i(t(e))}}))],["imageReader"],["imageWriter"],["imageScrambler"],["imageRedactionRendering",Na((()=>"pixelated"))],["images",Na((()=>[]))],["shapePreprocessor"],["willRequestResource"],["willRequest"]],Ya=e=>e.charAt(0).toUpperCase()+e.slice(1),qa=(e,t)=>{Object.keys(t).forEach((o=>{const i=P(t[o])?{value:t[o],writable:!1}:t[o];Object.defineProperty(e,o,i)}))};const Ka=(e,t)=>{let o,i,r,n,a,s,l,c,d,u;const h=t.length;for(o=0;oh-1?0:o+1],n=i.x-e.x,a=i.y-e.y,s=r.x-e.x,l=r.y-e.y,c=n-s,d=a-l,u=c*a-d*n,u<-1e-5)return!1;return!0},Ja=1e4;var Qa=(e,t)=>{const o=It(t),i=de();wt(e).forEach((e=>{ve(e,i),Ka(e,t)||o.forEach((t=>{const o=Math.atan2(t.start.y-t.end.y,t.start.x-t.end.x),r=Math.sin(Math.PI-o)*Ja,n=Math.cos(Math.PI-o)*Ja,a=ue(e.x+r,e.y+n),s=Xe(Ze(t),Ja),l=Mt(Ge(e,a),s);l&&ve(i,we(pe(l),e))}))}));const r=Ke(e);ve(r,i);return!!wt(r).every((e=>Ka(e,t)))&&(gt(e,r),!0)},es=(e,t)=>{const o=wt(e),i=At(t,5),r=at(e),n=[];o.forEach((e=>{const t=((e,t)=>{if(0===t)return e;const o=ue(e.start.x-e.end.x,e.start.y-e.end.y),i=fe(o),r=ke(i,t);return e.end.x+=r.x,e.end.y+=r.y,e})(Ge(pe(r),pe(e)),1e6);let o=!1;i.map(Ze).forEach((e=>{const i=Mt(t,e);i&&!o&&(n.push(i),o=!0)}))}));const a=Re(n[0],n[2]){const i=Qe(e),r=at(i),n=kt(i,o,r).map((e=>ge(e,t,r))),a=ot(n);return n.map((e=>we(e,a)))},os=(e,t=0,o=pt(e))=>{let i,r;if(0!==t){const n=Math.atan2(1,o),a=Math.sign(t)*t,s=a%Math.PI,l=a%X;let c;c=s>Y&&sY?a:X-l:l>Y?X-l:a;const d=Math.min(Math.abs(e.height/Math.sin(n+c)),Math.abs(e.width/Math.cos(n-c)));i=Math.cos(n)*d,r=i/o}else i=e.width,r=i/o,r>e.height&&(r=e.height,i=r*o);return We(i,r)},is=(e,t,o,i,r,n,a,s)=>{const l=ze(a),c=ze(s),d=se(Math.max(t.width/c.width,t.height/c.height)),u=se(Math.min(t.width/l.width,t.height/l.height)),h=Ke(t);if(u<1||d>1){const o=at(e),i=at(t),r=u<1?u:d,n=(i.x+o.x)/2,a=(i.y+o.y)/2,s=h.width/r,l=h.height/r;mt(h,n-.5*s,a-.5*l,s,l)}return n?(((e,t,o=0,i=de(),r)=>{if(Ao(o)&&0!==o||i.x||i.y){const r=pt(e),n=ts(t,o,i),a=os(t,o,r);if(!(e.widtha.width&&(e.width=a.width,e.x+=t),e.height>a.height&&(e.height=a.height,e.y+=o)}Qa(e,n),es(e,n)&&Qa(e,n)}else{const o=pt(e);e.width=Math.min(e.width,t.width),e.height=Math.min(e.height,t.height),e.x=Math.max(e.x,0),e.x+e.width>t.width&&(e.x-=e.x+e.width-t.width),e.y=Math.max(e.y,0),e.y+e.height>t.height&&(e.y-=e.y+e.height-t.height);const i=at(e),n=xt(e,o);n.width=Math.max(r.width,n.width),n.height=Math.max(r.height,n.height),n.x=i.x-.5*n.width,n.y=i.y-.5*n.height,gt(e,n)}})(h,o,i,r,l),{crop:h}):{crop:h}},rs=(e,t,o)=>{const i=Qe(e),r=at(i),n=$t(i,o,r),a=at(Ct(ot(n))),s=at(t),l=ge(s,-o,a),c=we(l,a),d=xe(ve(r,c),se);return nt(d.x-.5*t.width,d.y-.5*t.height,t.width,t.height)},ns=(e,t,o)=>Math.max(t,Math.min(e,o));const as=["cropLimitToImage","cropMinSize","cropMaxSize","cropAspectRatio","flipX","flipY","rotation","crop","colorMatrix","convolutionMatrix","gamma","vignette","manipulation","redaction","annotation","decoration","selection","frame","backgroundColor","backgroundImage","targetSize","metadata","trim","volume","minDuration","maxDuration"],ss=e=>Fo(e)?e.map(ss):co(e)||_t(e)?e:C(e)?{...e}:e,ls=e=>e.map((e=>Object.entries(e).reduce(((e,[t,o])=>(t.startsWith("_")||(e[t]=o),e)),{})));const cs=(e,t)=>e===t;var ds=(e,t,o=cs)=>{if(e.length!==t.length)return!1;for(let i=0;i{const i=xe(at(e),(e=>se(e,8))),r=Qe(t),n=at(r),a=$t(r,o,n),s=xe(Ne(ot(a)),(e=>se(e,8))),l=Math.abs(s.x-i.x),c=Math.abs(s.y-i.y);return l<1&&c<1},hs=(e,t,o,i,r)=>{if(!r)return[-1/0,1/0];const n=Math.max(o.width/i.width,o.height/i.height),a=We(i.width*n,i.height*n),s=(l=a,Math.sqrt(l.width*l.width+l.height*l.height));var l;if(s{const{context:o,props:i}=t;return e._isFormatted||((e=rr(e))._isFormatted=!0,Object.assign(e,i)),e._isDraft||!Bi(e)||e._context&&ht(o,e._context)||(xr(e,o),e._context={...o}),e},ms=(e,t)=>(e._isFormatted||(e.disableMove=!0,e.disableSelect=!0,e.disableResize=!0,e.disableRotate=!0),ps(e,t));var gs=[["file"],["size"],["loadState"],["processState"],["aspectRatio",ja((({size:e})=>[e,e=>e?pt(e):void 0]))],["perspectiveX",Na((()=>0))],["perspectiveY",Na((()=>0))],["perspective",ja((({perspectiveX:e,perspectiveY:t})=>[[e,t],([e,t])=>({x:e,y:t})]))],["rotation",Na((()=>0)),Va((e=>(t,o,i)=>{if(t===o)return t;const{loadState:r,size:n,rotationRange:a,cropMinSize:s,cropMaxSize:l,crop:c,perspective:d,cropLimitToImage:u,cropOrigin:h}=e;if(!c||!r||!r.beforeComplete)return t;const p=u&&((e,t,o)=>{const i=os(t,o,pt(e));return _e(Ue(i,Math.round),Ue(ze(e),Math.round))})(c,n,o),m=u&&us(c,n,o),g=((e,t,o,i,r,n,a,s,l,c)=>{const d=ze(l),u=ze(c);a&&(u.width=Math.min(c.width,r.width),u.height=Math.min(c.height,r.height));let h=!1;const p=(t,o)=>{const l=rs(r,i,t),c=Qe(r),m=at(c),g=kt(c,n,m),$=we(pe(m),Tt(g)),f=ge(at(l),o,m),y=we(pe(m),f);g.forEach((e=>ge(e,o,m)));const b=ot(g),x=Tt(g),v=ve(we(we(x,y),b),$),w=nt(v.x-.5*l.width,v.y-.5*l.height,l.width,l.height);if(s&<(w,s.width/w.width),a){const e=ts(r,o,n);es(w,e)}const S=se(Math.min(w.width/d.width,w.height/d.height),8),k=se(Math.max(w.width/u.width,w.height/u.height),8);return(S<1||k>1)&&se(Math.abs(o-t))===se(Math.PI/2)&&!h?(h=!0,p(e,e+Math.sign(o-t)*Math.PI)):{rotation:o,crop:St(w,(e=>se(e,8)))}},m=Math.sign(t)*Math.round(Math.abs(t)/X)*X,g=ns(t,m+o[0],m+o[1]);return p(e,g)})(o,t,a,c,n,d,u,h,s,l);if(p&&m){const e=os(n,t,pt(g.crop));g.crop.x+=.5*g.crop.width,g.crop.y+=.5*g.crop.height,g.crop.x-=.5*e.width,g.crop.y-=.5*e.height,g.crop.width=e.width,g.crop.height=e.height}return i((()=>{e.crop=St(g.crop,(e=>se(e,8)))})),g.rotation}))],["flipX",Na((()=>!1))],["flipY",Na((()=>!1))],["flip",ja((({flipX:e,flipY:t})=>[[e,t],([e,t])=>({x:e,y:t})]))],["isRotatedSideways",Ua((({rotation:e})=>[[e],([e],t)=>t(q(e)),(e,t)=>e!==t]))],["crop",Va((e=>(t,o=t)=>{const{loadState:i,size:r,cropMinSize:n,cropMaxSize:a,cropLimitToImage:s,cropAspectRatio:l,rotation:c,perspective:d}=e;if(!t&&!o||!i||!i.beforeComplete)return t;t||(t=Qe(os(r,c,l||pt(r))));const u=is(o,t,r,c,d,s,n,a),h=St(u.crop,(e=>se(e,8)));return ht(o,h)?o:h}))],["cropAspectRatio",Va((e=>(t,o)=>{const{loadState:i,crop:r,size:n,rotation:a,cropLimitToImage:s}=e,l=(e=>{if(e){if(/:/.test(e)){const[t,o]=e.split(":");return t/o}return parseFloat(e)}})(t);if(!l)return;if(!r||!i||!i.beforeComplete)return l;const c=o?Math.abs(t-o):1;if(us(r,n,a)&&s&&c>=.1){const o=((e,t)=>{const o=e.width,i=e.height;return q(t)&&(e.width=i,e.height=o),e})(ze(n),a);e.crop=St(xt(Qe(o),t),se)}else{const t={width:r.height*l,height:r.height},o=.5*(r.width-t.width),i=.5*(r.height-t.height);e.crop=St(nt(r.x+o,r.y+i,t.width,t.height),se)}return l}))],["cropOrigin"],["cropMinSize",Na((()=>({width:1,height:1})))],["cropMaxSize",Na((()=>({width:32768,height:32768})))],["cropLimitToImage",Na((()=>!0)),Va((e=>(t,o,i)=>{const{crop:r}=e;return r?(!o&&t&&i((()=>e.crop=Ke(e.crop))),t):t}))],["cropSize",Ua((({crop:e})=>[[e],([e],t)=>{e&&t(We(e.width,e.height))},(e,t)=>_e(e,t)]))],["cropRectAspectRatio",ja((({cropSize:e})=>[[e],([e],t)=>{e&&t(se(pt(e),5))}]))],["cropRange",Ua((({size:e,rotation:t,cropRectAspectRatio:o,cropMinSize:i,cropMaxSize:r,cropLimitToImage:n})=>[[e,t,o,i,r,n],([e,t,o,i,r,n],a)=>{if(!e)return;a(((e,t,o,i,r,n)=>{const a=ze(i),s=ze(r);return n?[a,Ue(os(e,t,o),Math.round)]:[a,s]})(e,t,o,i,r,n))},(e,t)=>ds(e,t)]))],["rotationRange",Ua((({size:e,isRotatedSideways:t,cropMinSize:o,cropSize:i,cropLimitToImage:r})=>[[e,t,o,i,r],([e,t,o,i,r],n)=>{if(!e||!i)return;n(hs(e,t,o,i,r))},(e,t)=>ds(e,t)]))],["backgroundColor",Va((()=>e=>((e=[0,0,0,0],t=1)=>4===e.length?e:[...e,t])(e)))],["backgroundImage"],["targetSize"],["colorMatrix"],["convolutionMatrix"],["gamma"],["noise"],["vignette"],["duration"],["minDuration",Na((()=>1/24))],["maxDuration",Na((()=>1/0))],["trim"],["volume",Na((()=>1))],["redaction",Ga((({size:e})=>[ps,{context:e}]))],["manipulation",Ga((({size:e})=>[ps,{context:e}]))],["annotation",Ga((({size:e})=>[ps,{context:e}]))],["decoration",Ga((({crop:e})=>[ps,{context:e}]))],["selection",Ga((({size:e})=>[ms,{context:e}]))],["frame",Va((()=>e=>{if(!e)return;const t={frameStyle:void 0,x:0,y:0,width:"100%",height:"100%",disableStyle:["backgroundColor","strokeColor","strokeWidth"]};return R(e)?t.frameStyle=e:Object.assign(t,e),t}))],["metadata"],["state",Ha(((e,t,o)=>{const i=as.map((e=>t[e]));let r=!1;const n=Ba({}),{subscribe:a}=Wa([...i,n],((e,t)=>{if(r)return;const o=as.reduce(((t,o,i)=>(t[o]=ss(e[i]),t)),{});o.crop&&St(o.crop,Math.round),o.manipulation=o.manipulation&&ls(o.manipulation),o.redaction=o.redaction&&ls(o.redaction),o.annotation=o.annotation&&ls(o.annotation),o.decoration=o.decoration&&ls(o.decoration),o.selection=o.selection&&ls(o.selection),t(o)})),s=e=>{e&&(r=!0,o.cropOrigin=void 0,as.filter((t=>zo(e,t))).forEach((t=>{const i=e[t];o[t]=null===i?void 0:ss(i)})),r=!1,n.set({}))};return{set:s,update:e=>s(e(null)),subscribe:a}}))]],$s=async(e,t,o={},i)=>{const{ontaskstart:r,ontaskprogress:n,ontaskend:s,token:l}=i;let c=!1;const d={cancel:a};l.cancel=()=>{c=!0,d.cancel()};for(const[i,a]of t.entries()){if(c)return;const[t,l]=a;r(i,l);try{e=await t(e,{...o,taskCancelToken:d},(e=>n(i,l,e)))}catch(e){throw c=!0,e}s(i,l)}return e};const fs=["loadstart","loadabort","loaderror","loadprogress","load","processstart","processabort","processerror","processprogress","process"],ys=["flip","cropOrigin","isRotatedSideways","perspective","perspectiveX","perspectiveY","cropRange"],bs=["images"],xs=gs.map((([e])=>e)).filter((e=>!ys.includes(e))),vs=e=>"image"+Ya(e),ws=e=>zo(e,"crop");var Ss=()=>{const{stores:e,accessors:t}=Za(Xa),{sub:o,pub:i}=Xo(),r=()=>t.images?t.images[0]:{};let n={};const s={};xs.forEach((e=>{Object.defineProperty(t,vs(e),{get:()=>{const t=r();if(t)return t.accessors[e]},set:t=>{n[vs(e)]=t,s[vs(e)]=t;const o=r();o&&(o.accessors[e]=t)}})}));const l=()=>t.images&&t.images[0],c=e.src.subscribe((e=>{if(!e)return t.images=[];t.imageReader&&(t.images.length&&(n={}),u(e))})),d=e.imageReader.subscribe((e=>{e&&(t.images.length||t.src&&u(t.src))})),u=e=>{Promise.resolve().then((()=>p(e,n))).catch((()=>{}))};let h;const p=(e,o={})=>new Promise(((r,c)=>{let d=l();const u=!(!1===o.cropLimitToImage||!1===o.imageCropLimitToImage||!1===s.imageCropLmitedToImage),p=o.cropMinSize||o.imageCropMinSize||s.imageCropMinSize,m=u?p:d&&d.accessors.cropMinSize,$=o.minDuration||o.imageMinDuration;d&&g(),d=(({minSize:e={width:1,height:1},minDuration:t=0}={})=>{const{stores:o,accessors:i}=Za(gs),{pub:r,sub:n}=Xo(),s=(e,t)=>{const o=()=>i[e]||{},n=t=>{i[e]={...o(),...t,timeStamp:Date.now()}},a=()=>o().error,s=e=>{a()||(n({error:e}),r(t+"error",{...o()}))};return{start(){r(t+"start")},onabort(){n({abort:!0}),r(t+"abort",{...o()})},ontaskstart(e,i){a()||(n({index:e,task:i,taskProgress:void 0,taskLengthComputable:void 0}),r(t+"taskstart",{...o()}))},ontaskprogress(e,i,s){a()||(n({index:e,task:i,taskProgress:s.loaded/s.total,taskLengthComputable:s.lengthComputable}),r(t+"taskprogress",{...o()}),r(t+"progress",{...o()}))},ontaskend(e,i){a()||(n({index:e,task:i}),r(t+"taskend",{...o()}))},ontaskerror(e){s(e)},error(e){s(e)},beforeComplete(e){a()||(n({beforeComplete:!0}),r("before"+t,e))},complete(e){a()||(n({complete:!0}),r(t,e))}}};return qa(i,{read:(o,{reader:r},n={})=>{if(!r)return;Object.assign(i,{file:void 0,size:void 0,loadState:void 0});let l={cancel:a},c=!1;const d=s("loadState","load"),u={token:l,...d},h={src:o,size:void 0,dest:void 0,duration:void 0};return Promise.resolve().then((async()=>{try{if(d.start(),c)return d.onabort();const o=await $s(h,r,n,u);if(c)return d.onabort();const{size:a,duration:s,dest:p}=o||{};if(!a||!a.width||!a.height)throw new ao("Image size missing","IMAGE_SIZE_MISSING",o);if(s>0&&s{c=!0,l&&l.cancel(),d.onabort()}},write:(e,t)=>{if(!i.loadState.complete)return;i.processState=void 0;const o=s("processState","process"),r={src:i.file,imageState:i.state,dest:void 0};if(P(e)&&(e=e(i.file,i.state)),!e)return o.start(),void o.complete(r);let n={cancel:a},l=!1;const c=t,d={token:n,...o};return Promise.resolve().then((async()=>{try{if(o.start(),l)return o.onabort();const t=await $s(r,e,c,d);if(l)return o.onabort();o.complete(t)}catch(e){o.error(e)}finally{n=void 0}})),()=>{l=!0,n&&n.cancel()}},on:n}),{accessors:i,stores:o}})({minSize:m,minDuration:$}),fs.map((e=>{return d.accessors.on(e,(t=e,e=>i(t,e)));var t}));const f=()=>{n={},y.forEach((e=>e()))},y=[];y.push(d.accessors.on("loaderror",(e=>{f(),c(e)}))),y.push(d.accessors.on("loadabort",(()=>{f(),c({name:"AbortError"})}))),y.push(d.accessors.on("load",(e=>{h=void 0,f(),r(e)}))),y.push(d.accessors.on("beforeload",(()=>((e,o)=>{if(ws(o))return void(t.imageState=o);if(!o.imageCrop){const t=e.accessors.size,i=o.imageRotation||0,r=He(ze(t),i),n=Qe(r);n.width=se(Math.abs(n.width),6),n.height=se(Math.abs(n.height),6);const a=o.imageCropAspectRatio||(o.imageCropLimitToImage?pt(t):pt(n));let s;o.imageCropLimitToImage?s=xt(n,a):(s=bt(n,a),s.x=(t.width-s.width)/2,s.y=(t.height-s.height)/2),o.imageCrop=s}if(e.accessors.duration&&!o.imageTrim&&o.imageMaxDuration){const{duration:t}=e.accessors;o.imageTrim=[[0,Math.min(o.imageMaxDuration/t,1)]]}const i=["imageCropLimitToImage","imageCrop","imageCropAspectRatio","imageRotation"];i.filter((e=>zo(o,e))).forEach((e=>{t[e]=o[e],delete o[e]}));const r=Object.keys(o).filter((e=>!i.includes(e))).reduce(((e,t)=>(e[t]=o[t],e)),{});Object.assign(t,r)})(d,o)))),t.images=[d],o.imageReader&&(t.imageReader=o.imageReader),o.imageWriter&&(t.imageWriter=o.imageWriter),h=d.accessors.read(e,{reader:t.imageReader},{willRequest:t.willRequest})}));let m;const g=()=>{const e=l();e&&(h&&h(),e.accessors.loadState=void 0,t.images=[])};return Object.defineProperty(t,"stores",{get:()=>e}),qa(t,{on:o,loadImage:p,abortLoadImage:()=>{h&&h(),t.images=[]},editImage:(e,o)=>new Promise(((i,r)=>{p(e,o).then((()=>{const{images:e}=t,o=e[0],n=()=>{a(),s()},a=o.accessors.on("processerror",(e=>{n(),r(e)})),s=o.accessors.on("process",(e=>{n(),i(e)}))})).catch(r)})),removeImage:g,processImage:(e,o)=>new Promise(((i,r)=>{try{const n=[],a=()=>{m=void 0,n.forEach((e=>e()))};(async()=>{if((e=>R(e)||Vo(e)||Wt(e))(e))try{await p(e,o)}catch(e){r(e)}else e&&(ws(e)?t.imageState=e:Object.assign(t,e));const s=l();if(!s)return r("no image");n.push(s.accessors.on("processerror",(e=>{a(),r(e)}))),n.push(s.accessors.on("processabort",(()=>{a(),r({name:"AbortError"})}))),n.push(s.accessors.on("process",(e=>{a(),i(e)}))),m=s.accessors.write(t.imageWriter,{redactionRenderStyle:t.imageRedactionRendering,shapePreprocessor:t.shapePreprocessor||G,imageScrambler:t.imageScrambler,willRequest:t.willRequest,willRequestResource:t.willRequestResource})})()}catch(e){r(e)}})),abortProcessImage:()=>{const e=l();e&&(m&&m(),e.accessors.processState=void 0)},destroy:()=>{c&&c(),d&&d()}}),t};const ks=(e,t)=>{const{processImage:o}=Ss();return o(e,t)};var Cs=()=>Xt()?$o()?/15_|16_/.test(navigator.userAgent)?14745600:16777216:/15_/.test(navigator.userAgent)?16777216:1/0:1/0,Ts=(e,t)=>Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,o)=>(t[o]=e[o],t)),{}),Ms=e=>new Promise((t=>{if(e.duration===1/0)return e.ontimeupdate=()=>{e.ontimeupdate=void 0,t(e)},void(e.currentTime=Number.MAX_SAFE_INTEGER);t(e)}));const Rs=({imageDataResizer:e,canvasMemoryLimit:t}={})=>async(o,i,r,n,a)=>{r.width=Math.max(r.width,1),r.height=Math.max(r.height,1),n.width=Math.max(n.width,1),n.height=Math.max(n.height,1);const{dest:s}=await ks(i,{imageReader:il(),imageWriter:nl({format:"canvas",targetSize:{...n,upscale:!0},imageDataResizer:e,canvasMemoryLimit:t}),imageCrop:r}),{feather:l=0}=a||{};if(l>0){const e=g("canvas");e.width=s.width,e.height=s.height;const t=e.getContext("2d",{willReadFrequently:!0}),o=1/l;let i=0;for(i=0;ie),o)=>async(i,r,n)=>{n(oo(0,!1));let a=!1;const s=await e(...t(i,r,(e=>{a=!0,n(e)})));return o&&o(i,s),a||n(oo(1,!1)),i},Es=({willRequest:e,srcProp:t="src",destProp:o="dest"}={})=>[Ps(ho,((o,i,r)=>[o[t],r,{...i,willRequest:e}]),((e,t)=>e[o]=t)),"any-to-file"],Is=({srcProp:e="dest",destProp:t="dest"}={})=>[Ps((async e=>{if(/octet-stream/.test(e.type)){console.warn(`Pintura: File has unknown mime type "${e.type}", make sure your server sets the correct Content-Type header.`);let t="image";const o=await Jt(e);/video/i.test(o.nodeName)&&(t="video");const i={type:t+"/unknown"};return _t(e)?new File([e],e.name,{...i,lastModified:e.lastModified}):new Blob([e],i)}return e}),(t=>[t[e]]),((e,o)=>e[t]=o)),"any-to-file"],As=({srcProp:e="src",destProp:t="size"}={})=>[Ps(eo,(t=>[t[e]]),((e,o)=>e[t]=o)),"read-image-size"],Ls=async e=>{const t=await Jt(e);if(Qt(t))return await(e=>new Promise(((t,o)=>{const i=()=>{Ms(e).then((()=>{t(e.duration)}))};if(e.readyState>=1)return i();e.onloadedmetadata=i,e.onerror=()=>o(e.error)})))(t)},zs=({srcProp:e="src",destProp:t="duration"}={})=>[Ps(Ls,(t=>[t[e]]),((e,o)=>e[t]=o)),"read-media-duration"],Fs=({srcSize:e="size",srcOrientation:t="orientation",destSize:o="size"}={})=>[Ps(fo,(o=>[o[e],o[t]]),((e,t)=>e[o]=t)),"image-size-match-orientation"],Ds=({srcProp:e="src",destProp:t="head"}={})=>[Ps(((e,t)=>yo(e)?l(e,t):void 0),(t=>[t[e],[0,262144],onprogress]),((e,o)=>e[t]=o)),"read-image-head"],Os=({srcProp:e="head",destProp:t="orientation"}={})=>[Ps(i,(t=>[t[e],274]),((e,o=1)=>e[t]=o)),"read-exif-orientation-tag"],Bs=({srcProp:e="head"}={})=>[Ps(i,(t=>[t[e],274,1])),"clear-exif-orientation-tag"],Ws=({srcImageSize:e="size",srcCanvasSize:t="imageData",srcImageState:o="imageState",destImageSize:i="size",destScalar:r="scalar"}={})=>[Ps(((e,t)=>[Math.min(t.width/e.width,t.height/e.height),Fe(t)]),(i=>[i[e],i[t],i[o]]),((e,[t,o])=>{e[r]=t,e[i]=o})),"calculate-canvas-scalar"],_s=({srcProp:e="src",destProp:t="imageData",canvasMemoryLimit:o}={})=>[Ps(D,(t=>[t[e],o]),((e,o)=>e[t]=o)),"blob-to-image-data"],Vs=({srcImageData:e="imageData",srcOrientation:t="orientation"}={})=>[Ps(k,(o=>[o[e],o[t]]),((e,t)=>e.imageData=t)),"image-data-match-orientation"],Ns=({srcImageData:e="imageData",srcImageState:t="imageState"}={})=>[Ps(Hr,(o=>[o[e],{backgroundColor:o[t].backgroundColor,backgroundImage:o[t].backgroundImage}]),((e,t)=>e.imageData=t)),"image-data-fill"],Hs=({srcImageData:e="imageData",srcImageState:t="imageState",destScalar:o="scalar"}={})=>[Ps(wo,(i=>{const r=i[o];let{crop:n}=i[t];return n&&1!==r&&(n=lt(Ke(n),r,de())),[i[e],{crop:n,rotation:i[t].rotation,flipX:i[t].flipX,flipY:i[t].flipY}]}),((e,t)=>e.imageData=t)),"image-data-crop"],js=({targetSize:e={width:void 0,height:void 0,fit:void 0,upscale:void 0},imageDataResizer:t,srcProp:o="imageData",srcImageState:i="imageState",destImageScaledSize:r="imageScaledSize"})=>[Ps(Co,(r=>{const n=Math.min(e.width||Number.MAX_SAFE_INTEGER,r[i].targetSize&&r[i].targetSize.width||Number.MAX_SAFE_INTEGER),a=Math.min(e.height||Number.MAX_SAFE_INTEGER,r[i].targetSize&&r[i].targetSize.height||Number.MAX_SAFE_INTEGER);return[r[o],{width:n,height:a,fit:e.fit||"contain",upscale:(s=r[i],!!(s.targetSize&&s.targetSize.width||s.targetSize&&s.targetSize.height)||(e.upscale||!1))},t];var s}),((e,t)=>{_e(e.imageData,t)||(e[r]=Fe(t)),e.imageData=t})),"image-data-resize"],Us=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData"}={})=>[Ps(Io,(o=>{const{colorMatrix:i}=o[t],r=i&&Object.keys(i).map((e=>i[e])).filter(Boolean);return[o[e],{colorMatrix:r&&jr(r),convolutionMatrix:o[t].convolutionMatrix,gamma:o[t].gamma,noise:o[t].noise,vignette:o[t].vignette}]}),((e,t)=>e[o]=t)),"image-data-filter"],Gs=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData",destScalar:i="scalar"}={})=>[Ps((async(e,t,o,i,r,n)=>{if(!t||!i.length)return e;let a;try{const r={dataSizeScalar:Ur(e,i)};o&&o[3]>0&&(r.backgroundColor=[...o]),a=await t(e,r)}catch(e){}const s=g("canvas");s.width=e.width,s.height=e.height;const l=s.getContext("2d",{willReadFrequently:!0});if(l.putImageData(e,0,0),"auto"===n){const t=Math.sqrt(e.width*e.height);l.filter=`blur(${Math.round(t/100)}px)`}const c=new Path2D;i.forEach((e=>{const t=nt(e.x,e.y,e.width,e.height);ut(t,r);const o=$t(Ke(t),e.rotation),i=new Path2D;o.forEach(((e,t)=>{if(0===t)return i.moveTo(e.x,e.y);i.lineTo(e.x,e.y)})),c.addPath(i)})),l.clip(c,"nonzero"),l.imageSmoothingEnabled=!1,l.drawImage(a,0,0,s.width,s.height),f(a);const d=l.getImageData(0,0,s.width,s.height);return f(s),d}),((o,{imageScrambler:r,redactionRenderStyle:n})=>[o[e],r,o[t].backgroundColor,o[t].redaction,o[i],n]),((e,t)=>e[o]=t)),"image-data-redact"],Zs=({srcImageData:e="imageData",srcSize:t="size",srcImageState:o="imageState",srcShapes:i="annotation",destImageData:r="imageData",destImageScaledSize:n="imageScaledSize",destScalar:a="scalar",imageDataResizer:s,canvasMemoryLimit:l}={})=>[Ps(Nr,((r,{shapePreprocessor:c,willRequestResource:d,willRequest:u})=>{const h=r[o][i];if(!h.length)return[r[e]];const p=r[a],{crop:m}=r[o],g=r[t];let $=p;const f=r[n];f&&($=Math.min(f.width/m.width,f.height/m.height));const y={width:g.width/p,height:g.height/p};return[r[e],{shapes:h,computeShape:e=>(e=pr(e,y),e=Ts(e,["left","right","top","bottom"]),e=vr(e,$)),transform:e=>{const i=r[t],{rotation:s=0,flipX:l,flipY:c,cropLimitToImage:d}=r[o],u=r[a],{crop:h=Qe(i)}=r[o],p=r[n],m=p?Math.min(p.width/h.width,p.height/h.height):1,g={width:i.width/u*m,height:i.height/u*m},$=Bt(g,s),f=$.width,y=$.height,b=.5*g.width-.5*f,x=.5*g.height-.5*y,v=Ne(g);e.translate(-b,-x),e.translate(-h.x*m,-h.y*m),e.translate(v.x,v.y),e.rotate(s),e.translate(-v.x,-v.y),e.scale(l?-1:1,c?-1:1),e.translate(l?-g.width:0,c?-g.height:0),d&&(e.rect(0,0,g.width,g.height),e.clip())},drawImage:Rs({imageDataResizer:s,canvasMemoryLimit:l}),preprocessShape:e=>c(e,{isPreview:!1,...r[o]}),canvasMemoryLimit:l,willRequest:u||d}]}),((e,t)=>e[r]=t)),"image-data-annotate"],Xs=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData",destImageScaledSize:i="imageScaledSize",imageDataResizer:r,canvasMemoryLimit:n,destScalar:a="scalar"}={})=>[Ps(Nr,((o,{shapePreprocessor:s,willRequestResource:l,willRequest:c})=>{let{decoration:d}=o[t];if("undefined"!=typeof window&&(e=>{if(e&&e._clpdx4s)return;const[i]=[[85,110,108,105,99,101,110,115,101,100,32,80,105,110,116,117,114,97,32,105,110,115,116,97,110,99,101,32]].map((e=>e.map((e=>String.fromCharCode(e))).join(""))),{width:r,height:n}=o[t].crop,a=n/15;d=[...d,{x:.5*-a,y:.5*-a,width:1.5*r,height:1.25*n,text:Array(50).fill(i).join(""),fontWeight:900,lineHeight:a,fontSize:a,color:[1,1,1,.05]}]})(window),!d.length)return[o[e]];let u=o[a];const{crop:h}=o[t],p=o[i];if(p){const e=Math.min(p.width/h.width,p.height/h.height);u=e}return[o[e],{shapes:d,drawImage:Rs({imageDataResizer:r,canvasMemoryLimit:n}),computeShape:e=>(e=pr(e,h),e=Ts(e,["left","right","top","bottom"]),e=vr(e,u)),preprocessShape:e=>s(e,{isPreview:!1,...o[t]}),canvasMemoryLimit:n,willRequest:c||l}]}),((e,t)=>e[o]=t)),"image-data-decorate"],Ys=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData",destImageScaledSize:i="imageScaledSize",imageDataResizer:r,canvasMemoryLimit:n,destScalar:a="scalar"}={})=>[Ps(Nr,((o,{shapePreprocessor:s,willRequestResource:l,willRequest:c})=>{const d=o[t].frame;if(!d)return[o[e]];const u=o[a];let{crop:h}=o[t];h&&1!==u&&(h=lt(Ke(h),u,de()));const p={...h},m=yr(br(d,p,s),p);p.x=Math.abs(m.left),p.y=Math.abs(m.top),p.width+=Math.abs(m.left)+Math.abs(m.right),p.height+=Math.abs(m.top)+Math.abs(m.bottom);const g=o[i],$=g?Math.min(g.width/h.width,g.height/h.height):1;return ut(p,$),p.x=Math.floor(p.x),p.y=Math.floor(p.y),p.width=Math.floor(p.width),p.height=Math.floor(p.height),[o[e],{shapes:[d],contextBounds:p,computeShape:t=>pr(t,o[e]),transform:e=>{e.translate(p.x,p.y)},drawImage:Rs({imageDataResizer:r,canvasMemoryLimit:n}),preprocessShape:e=>s(e,{isPreview:!1,...o[t]}),canvasMemoryLimit:n,willRequest:c||l}]}),((e,t)=>e[o]=t)),"image-data-frame"],qs=({mimeType:e,quality:t,srcImageData:o="imageData",srcFile:i="src",destBlob:r="blob"}={})=>[Ps(B,(r=>[r[o],e||H(r[i].name)||r[i].type,t]),((e,t)=>e[r]=t)),"image-data-to-blob"],Ks=({srcImageData:e="imageData",srcOrientation:t="orientation",destCanvas:o="dest"}={})=>[Ps(S,(o=>[o[e],o[t]]),((e,t)=>e[o]=t)),"image-data-to-canvas"],Js=async(e,t)=>{if(!yo(e)||!t)return e;const i=new DataView(t),r=o(i);if(!r||!r.exif)return e;const n=["exif","mpf","xmp"].reduce(((e,t)=>r[t]?Math.max(e,r[t].offset+r[t].size):e),0);return((e,t,o=[0,e.size])=>t?new Blob([t,e.slice(...o)],{type:e.type}):e)(e,t.slice(0,n+2),[20])},Qs=(e="blob",t="head",o="blob")=>[Ps(Js,(o=>[o[e],o[t]]),((e,t)=>e[o]=t)),"blob-write-image-head"],el=({renameFile:e,srcBlob:t="blob",srcFile:o="src",destFile:i="dest",defaultFilename:r}={})=>[Ps(j,(i=>[i[t],e?e(i[o]):i[o].name||`${r}.${_(i[t].type)}`]),((e,t)=>e[i]=t)),"blob-to-file"],tl=({url:e="./",dataset:t=(e=>[["dest",e.dest,e.dest.name],["imageState",e.imageState]]),destStore:o="store",credentials:i,headers:r={}})=>[Ps((async(t,o)=>await((e,t,o)=>new Promise(((i,r)=>{const{token:n={},beforeSend:s=a,onprogress:l=a}=o;n.cancel=()=>c.abort();const c=new XMLHttpRequest;c.upload.onprogress=l,c.onload=()=>c.status>=200&&c.status<300?i(c):r(c),c.onerror=()=>r(c),c.ontimeout=()=>r(c),c.open("POST",encodeURI(e)),s(c),c.send(t instanceof FormData?t:t.reduce(((e,t)=>(e.append(...t.map(bo)),e)),new FormData))})))(e,t,{onprogress:o,beforeSend:e=>so(e,{headers:r,credentials:i})})),((e,o,i)=>[t(e),i]),((e,t)=>e[o]=t)),"store"],ol=e=>[Ps((t=>e&&e.length?(Object.keys(t).forEach((o=>{e.includes(o)||delete t[o]})),t):t)),"prop-filter"],il=(e={})=>{const{orientImage:t=!0,outputProps:o=["src","dest","size","duration"],preprocessImageFile:i,request:r={}}=e;return[Es({willRequest:()=>r}),Is(),i&&[Ps(i,((e,t,o)=>[e.dest,t,o]),((e,t)=>e.dest=t)),"preprocess-image-file"],As({srcProp:"dest"}),zs({srcProp:"dest"}),t&&Ds({srcProp:"dest"}),t&&Os(),t&&Fs(),ol(o)].filter(Boolean)},rl=e=>e&&(R(e)?tl({url:e}):P(e)?[e,"store"]:tl(e)),nl=(e={})=>(t,o,i={})=>{if(!Kt(t))return;let{canvasMemoryLimit:r=Cs(),orientImage:n=!0,copyImageHead:a=!0,mimeType:s,quality:l,renameFile:c,targetSize:d,imageDataResizer:u,store:h,format:p="file",outputProps:m=["src","dest","imageState","store"],preprocessImageSource:g,preprocessImageState:$,postprocessImageData:f,postprocessImageBlob:y}={...e,...i};return"blob"===p&&(p="file"),[g&&[Ps(g,((e,t,o)=>[e.src,t,o,e.imageState]),((e,t)=>e.src=t)),"preprocess-image-source"],(n||a)&&Ds(),n&&Os(),As(),$&&[Ps($,((e,t,o,i)=>[e.imageState,t,o,{size:e.size,orientation:e.orientation}]),((e,t)=>e.imageState=t)),"preprocess-image-state"],_s({canvasMemoryLimit:r}),n&&Fs(),n&&Vs(),Ws(),Gs(),Hs(),js({imageDataResizer:u,targetSize:d}),Zs({imageDataResizer:u,canvasMemoryLimit:r,srcShapes:"manipulation"}),Us(),Ns(),Zs({imageDataResizer:u,canvasMemoryLimit:r,srcShapes:"annotation"}),Xs({imageDataResizer:u,canvasMemoryLimit:r}),Ys({imageDataResizer:u,canvasMemoryLimit:r}),f&&[Ps(f,((e,t,o)=>[e.imageData,t,o]),((e,t)=>e.imageData=t)),"postprocess-image-data"],"file"===p?qs({mimeType:s,quality:l}):"canvas"===p?Ks():[e=>(e.dest=e.imageData,e)],"file"===p&&n&&Bs(),"file"===p&&a&&Qs(),y&&[Ps(y,(({blob:e,imageData:t,src:o},i,r)=>[{blob:e,imageData:t,src:o},i,r]),((e,t)=>e.blob=t)),"postprocess-image-file"],"file"===p&&el({defaultFilename:"image",renameFile:c}),"file"===p?rl(h):P(h)&&[h,"store"],ol(m)].filter(Boolean)};var al=(e,t,o,i,r,n,a,s,l,c,d)=>{if(!(e&&t&&o&&i&&s))return;s*=n;const u=Ct(Ke(t)),h=at(u),p=at(e),m=Qe(o),g=at(m),$=rs(o,i,l),f=at($),y=we(pe(g),f),b=we(pe(p),h);y.x+=b.x,y.y+=b.y;const x=me(pe(y));x.x+=b.x,x.y+=b.y;const v=at(st(st(Ke(r),a),e)),w=we(v,p);return ve(y,w),{origin:x,translation:y,rotation:{x:d?Math.PI:0,y:c?Math.PI:0,z:l},scale:s}};let sl=null;var ll=()=>{if(null===sl)if("WebGL2RenderingContext"in window){let e;try{e=g("canvas"),sl=!!e.getContext("webgl2")}catch(e){sl=!1}e&&f(e),e=void 0}else sl=!1;return sl},cl=e=>0==(e&e-1),dl=(e,t={},o="",i="")=>Object.keys(t).filter((e=>!C(t[e]))).reduce(((e,r)=>e.replace(new RegExp(o+r+i),t[r])),e);const ul={head:"#version 300 es\n\nin vec4 aPosition;uniform mat4 uMatrix;",text:"\nin vec2 aTexCoord;out vec2 vTexCoord;",matrix:"\ngl_Position=uMatrix*vec4(aPosition.x,aPosition.y,0,1);"},hl={head:"#version 300 es\nprecision highp float;\n\nout vec4 fragColor;",mask:"\nuniform float uMaskFeather[8];uniform float uMaskBounds[4];uniform float uMaskOpacity;float mask(float x,float y,float bounds[4],float opacity){return 1.0-(1.0-(smoothstep(bounds[3],bounds[3]+1.0,x)*(1.0-smoothstep(bounds[1]-1.0,bounds[1],x))*(1.0-step(bounds[0],y))*step(bounds[2],y)))*(1.0-opacity);}",init:"\nfloat a=1.0;vec4 fillColor=uColor;vec4 textureColor=texture(uTexture,vTexCoord);textureColor*=(1.0-step(uRepeat.y,vTexCoord.y))*step(0.0,vTexCoord.y)*(1.0-step(uRepeat.x,vTexCoord.x))*step(0.0,vTexCoord.x);",colorize:"\nif(uTextureColor.a!=0.0&&textureColor.a>0.0){vec3 colorFlattened=textureColor.rgb/textureColor.a;if(colorFlattened.r>=.9999&&colorFlattened.g==0.0&&colorFlattened.b>=.9999){textureColor.rgb=uTextureColor.rgb*textureColor.a;}textureColor*=uTextureColor.a;}",maskapply:"\nfloat m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);",maskfeatherapply:"\nfloat leftFeatherOpacity=step(uMaskFeather[1],gl_FragCoord.x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],gl_FragCoord.x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],gl_FragCoord.x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],gl_FragCoord.x));a*=leftFeatherOpacity*rightFeatherOpacity;",rectaa:"\nvec2 scaledPoint=vec2(vRectCoord.x*uSize.x,vRectCoord.y*uSize.y);a*=smoothstep(0.0,uEdgeFeather,uSize.x-scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,uSize.y-scaledPoint.y);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.y);",cornerradius:"\nvec2 s=(uSize-2.0)*.5;vec2 r=(vRectCoord*uSize)-1.0;vec2 p=r-s;float cornerRadius=uCornerRadius[0];bool left=r.x{const i=e.createShader(o),r=((e,t,o)=>(t=dl(t,o===e.VERTEX_SHADER?ul:hl,"##").trim(),ll()?t:(t=(t=t.replace(/#version.+/gm,"").trim()).replace(/^\/\/\#/gm,"#"),o===e.VERTEX_SHADER&&(t=t.replace(/in /gm,"attribute ").replace(/out /g,"varying ")),o===e.FRAGMENT_SHADER&&(t=t.replace(/in /gm,"varying ").replace(/out.*?;/gm,"").replace(/texture\(/g,"texture2D(").replace(/fragColor/g,"gl_FragColor")),""+t)))(e,t,o);return e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)||console.error(e.getShaderInfoLog(i)),i},ml=(e,t,o,i,r)=>{const n=pl(e,t,e.VERTEX_SHADER),a=pl(e,o,e.FRAGMENT_SHADER),s=e.createProgram();e.attachShader(s,n),e.attachShader(s,a),e.linkProgram(s);const l={};return i.forEach((t=>{l[t]=e.getAttribLocation(s,t)})),r.forEach((t=>{l[t]=e.getUniformLocation(s,t)})),{program:s,locations:l,destroy(){e.detachShader(s,n),e.detachShader(s,a),e.deleteShader(n),e.deleteShader(a),e.deleteProgram(s)}}},gl=e=>"VIDEO"!==e.nodeName&&(!!ll()||cl(e.width)&&cl(e.height)),$l=(e,t,o,i)=>(e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),((e,t,o)=>{e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,gl(t)?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,o.filterParam),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,o.wrapParam),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,o.wrapParam),gl(t)&&e.generateMipmap(e.TEXTURE_2D)})(e,o,i),e.bindTexture(e.TEXTURE_2D,null),t),fl=(e,t=1)=>e?[e[0],e[1],e[2],Ao(e[3])?t*e[3]:t]:[0,0,0,0],yl=()=>{const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},bl=(e,t,o,i,r,n,a)=>{const s=1/(t-o),l=1/(i-r),c=1/(n-a);e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+o)*s,e[13]=(r+i)*l,e[14]=(a+n)*c,e[15]=1},xl=(e,t,o,i)=>{e[12]=e[0]*t+e[4]*o+e[8]*i+e[12],e[13]=e[1]*t+e[5]*o+e[9]*i+e[13],e[14]=e[2]*t+e[6]*o+e[10]*i+e[14],e[15]=e[3]*t+e[7]*o+e[11]*i+e[15]},vl=(e,t)=>{e[0]*=t,e[1]*=t,e[2]*=t,e[3]*=t,e[4]*=t,e[5]*=t,e[6]*=t,e[7]*=t,e[8]*=t,e[9]*=t,e[10]*=t,e[11]*=t},wl=(e,t)=>{const o=Math.sin(t),i=Math.cos(t),r=e[4],n=e[5],a=e[6],s=e[7],l=e[8],c=e[9],d=e[10],u=e[11];e[4]=r*i+l*o,e[5]=n*i+c*o,e[6]=a*i+d*o,e[7]=s*i+u*o,e[8]=l*i-r*o,e[9]=c*i-n*o,e[10]=d*i-a*o,e[11]=u*i-s*o},Sl=(e,t)=>{const o=Math.sin(t),i=Math.cos(t),r=e[0],n=e[1],a=e[2],s=e[3],l=e[8],c=e[9],d=e[10],u=e[11];e[0]=r*i-l*o,e[1]=n*i-c*o,e[2]=a*i-d*o,e[3]=s*i-u*o,e[8]=r*o+l*i,e[9]=n*o+c*i,e[10]=a*o+d*i,e[11]=s*o+u*i},kl=(e,t)=>{const o=Math.sin(t),i=Math.cos(t),r=e[0],n=e[1],a=e[2],s=e[3],l=e[4],c=e[5],d=e[6],u=e[7];e[0]=r*i+l*o,e[1]=n*i+c*o,e[2]=a*i+d*o,e[3]=s*i+u*o,e[4]=l*i-r*o,e[5]=c*i-n*o,e[6]=d*i-a*o,e[7]=u*i-s*o};var Cl=e=>e*Math.PI/180,Tl=(e,t)=>ll()?e.getContext("webgl2",t):e.getContext("webgl",t)||e.getContext("experimental-webgl",t);const Ml=(e,t)=>{const o=e.length;return t>=o?e[t%o]:t<0?e[t%o+o]:e[t]},Rl=(e,t,o,i)=>{const r=ue(o.x-t.x,o.y-t.y),n=ue(i.x-o.x,i.y-o.y),a=ue(t.x-i.x,t.y-i.y),s=ue(e.x-t.x,e.y-t.y),l=ue(e.x-o.x,e.y-o.y),c=ue(e.x-i.x,e.y-i.y),d=Te(r,s),u=Te(n,l),h=Te(a,c);return d<=0&&u<=0&&h<=0},Pl=e=>{if(e.length<3)return[];if((e=>{const t=e.length;for(let o=0;o{let t,o,i,r,n,a=0;const s=e.length;for(t=0;t3;){if($<=0)return[];for($--,r=0;r{const n=fe(ue(i.x-o.x,i.y-o.y)),a=fe(ue(r.x-i.x,r.y-i.y)),s=fe(ue(n.x+a.x,n.y+a.y)),l=ue(-s.y,s.x),c=ue(-n.y,n.x),d=Math.min(1/Ce(l,c),5);e[t]=i.x,e[t+1]=i.y,e[t+2]=l.x*d,e[t+3]=l.y*d,e[t+4]=-1,e[t+5]=i.x,e[t+6]=i.y,e[t+7]=l.x*d,e[t+8]=l.y*d,e[t+9]=1},Il=e=>{const t=new Float32Array(8);return t[0]=e[3].x,t[1]=e[3].y,t[2]=e[0].x,t[3]=e[0].y,t[4]=e[2].x,t[5]=e[2].y,t[6]=e[1].x,t[7]=e[1].y,t},Al=(e,t=0,o,i)=>{const r=wt(e),n=e.x+.5*e.width,a=e.y+.5*e.height;return(o||i)&&Ie(r,o,i,n,a),0!==t&&Ae(r,t,n,a),r},Ll=(e,t,o,i,r)=>{const n=Math.min(20,Math.max(4,Math.round(i/2)));let a=0,s=0,l=0,c=0,d=0;for(;d{if(null!==zl)return zl;let e=g("canvas");const t=Tl(e);return zl=t?t.getParameter(t.MAX_TEXTURE_SIZE):void 0,f(e),e=void 0,zl},Dl=()=>u()&&!!window.chrome;const Ol=new Float32Array([0,1,0,0,1,1,1,0]),Bl=new Float32Array([1,0,0,0,1,1,0,1]),Wl=u()&&qo(),_l=[0,0,0,0,1,0,0,0,0],Vl=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Nl=[0,0,0,0],Hl=[0,0,0,0],jl=(e,t,o,i,r)=>{if(!o||!i)return Ol;let n=i.x/o.width,a=i.y/o.height,s=e/o.width/r,l=t/o.height/r;s-=n,l-=a;return new Float32Array([-n,l,-n,-a,s,l,s,-a])};var Ul=(e,t={})=>{const{alpha:o=!1}=t,i={width:0,height:0},r={width:0,height:0},n=Fl()||1024;let a,s,l;const c=yl(),d=yl();let u,h,p,m,g,$,y,b,x,v=0,w=0,S=0,k=1;const C=new Map([]),T=()=>{P.stencilOp(P.KEEP,P.KEEP,P.KEEP),P.stencilFunc(P.ALWAYS,1,255),P.stencilMask(255)},M=Cl(30),R=Math.tan(M/2),P=Tl(e,{alpha:o,antialias:!1,premultipliedAlpha:!0,stencil:!0});if(!P)return;P.getExtension("OES_standard_derivatives"),P.disable(P.DEPTH_TEST),P.enable(P.STENCIL_TEST),P.enable(P.BLEND),P.blendFunc(P.ONE,P.ONE_MINUS_SRC_ALPHA),P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!(!o&&qo())),T();const E=P.createTexture();P.bindTexture(P.TEXTURE_2D,E),P.texImage2D(P.TEXTURE_2D,0,P.RGBA,1,1,0,P.RGBA,P.UNSIGNED_BYTE,new Uint8Array(Nl)),C.set(0,E);const I=P.createTexture();C.set(2,I);const A=P.createFramebuffer(),L=P.createTexture();C.set(1,L);const z=P.createFramebuffer(),F=ml(P,"\n##head\n##text\nvoid main(){vTexCoord=aTexCoord;gl_Position=uMatrix*aPosition;}","\n##head\nin vec2 vTexCoord;uniform sampler2D uTexture;uniform sampler2D uTextureOverlay;uniform sampler2D uTextureBlend;uniform vec2 uTextureSize;uniform float uOpacity;uniform int uAntialias;uniform vec4 uOverlayColor;uniform mat4 uColorMatrix;uniform vec4 uColorOffset;uniform float uClarityKernel[9];uniform float uClarityKernelWeight;uniform float uColorGamma;uniform float uColorVignette;uniform float uMaskClip;uniform float uMaskOpacity;uniform float uMaskBounds[4];uniform float uMaskCornerRadius[4];uniform float uMaskFeather[8];vec4 applyGamma(vec4 c,float g){c.r=pow(c.r,g);c.g=pow(c.g,g);c.b=pow(c.b,g);return c;}vec4 applyColorMatrix(vec4 c,mat4 m,vec4 o){return(c*m)+(o*c.a);}vec4 applyConvolutionMatrix(vec4 c,float k0,float k1,float k2,float k3,float k4,float k5,float k6,float k7,float k8,float w){vec2 pixel=vec2(1)/uTextureSize;vec4 colorSum=texture(uTexture,vTexCoord-pixel)*k0+texture(uTexture,vTexCoord+pixel*vec2(0.0,-1.0))*k1+texture(uTexture,vTexCoord+pixel*vec2(1.0,-1.0))*k2+texture(uTexture,vTexCoord+pixel*vec2(-1.0,0.0))*k3+texture(uTexture,vTexCoord)*k4+texture(uTexture,vTexCoord+pixel*vec2(1.0,0.0))*k5+texture(uTexture,vTexCoord+pixel*vec2(-1.0,1.0))*k6+texture(uTexture,vTexCoord+pixel*vec2(0.0,1.0))*k7+texture(uTexture,vTexCoord+pixel)*k8;vec4 color=vec4(clamp((colorSum/w),0.0,1.0).rgb,c.a);return color;}vec4 applyVignette(vec4 c,vec2 pos,vec2 center,float v){float d=distance(pos,center)/length(center);float f=1.0-(d*abs(v));if(v>0.0){c.rgb*=f;}else if(v<0.0){c.rgb+=(1.0-f)*(1.0-c.rgb);}return c;}vec4 blendPremultipliedAlpha(vec4 back,vec4 front){return front+(back*(1.0-front.a));}void main(){float x=gl_FragCoord.x;float y=gl_FragCoord.y;float a=1.0;float maskTop=uMaskBounds[0];float maskRight=uMaskBounds[1];float maskBottom=uMaskBounds[2];float maskLeft=uMaskBounds[3];float leftFeatherOpacity=step(uMaskFeather[1],x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],x));a*=leftFeatherOpacity*rightFeatherOpacity;float overlayColorAlpha=(smoothstep(maskLeft,maskLeft+1.0,x)*(1.0-smoothstep(maskRight-1.0,maskRight,x))*(1.0-step(maskTop,y))*step(maskBottom,y));if(uOverlayColor.a==0.0){a*=overlayColorAlpha;}vec2 offset=vec2(maskLeft,maskBottom);vec2 size=vec2(maskRight-maskLeft,maskTop-maskBottom)*.5;vec2 center=offset.xy+size.xy;int pixelX=int(step(center.x,x));int pixelY=int(step(y,center.y));float cornerRadius=0.0;if(pixelX==0&&pixelY==0)cornerRadius=uMaskCornerRadius[0];if(pixelX==1&&pixelY==0)cornerRadius=uMaskCornerRadius[1];if(pixelX==0&&pixelY==1)cornerRadius=uMaskCornerRadius[2];if(pixelX==1&&pixelY==1)cornerRadius=uMaskCornerRadius[3];float cornerOffset=sign(cornerRadius)*length(max(abs(gl_FragCoord.xy-size-offset)-size+cornerRadius,0.0))-cornerRadius;float cornerOpacity=1.0-smoothstep(0.0,1.0,cornerOffset);a*=cornerOpacity;if(uAntialias==1){vec2 scaledPoint=vec2(vTexCoord.x*uTextureSize.x,vTexCoord.y*uTextureSize.y);a*=smoothstep(0.0,1.0,uTextureSize.x-scaledPoint.x);a*=smoothstep(0.0,1.0,uTextureSize.y-scaledPoint.y);a*=smoothstep(0.0,1.0,scaledPoint.x);a*=smoothstep(0.0,1.0,scaledPoint.y);}vec4 color=texture(uTexture,vTexCoord);if(uClarityKernelWeight!=-1.0){color=applyConvolutionMatrix(color,uClarityKernel[0],uClarityKernel[1],uClarityKernel[2],uClarityKernel[3],uClarityKernel[4],uClarityKernel[5],uClarityKernel[6],uClarityKernel[7],uClarityKernel[8],uClarityKernelWeight);}color=blendPremultipliedAlpha(color,texture(uTextureBlend,vTexCoord));color=applyGamma(color,uColorGamma);color=applyColorMatrix(color,uColorMatrix,uColorOffset);color*=a;if(uColorVignette!=0.0){vec2 pos=gl_FragCoord.xy-offset;color=applyVignette(color,pos,center-offset,uColorVignette);}color=blendPremultipliedAlpha(color,texture(uTextureOverlay,vTexCoord));if(overlayColorAlpha<=0.0){color*=1.0-uOverlayColor.a;}color*=uOpacity;fragColor=color;}",["aPosition","aTexCoord"],["uMatrix","uTexture","uTextureBlend","uTextureOverlay","uTextureSize","uColorGamma","uColorVignette","uColorOffset","uColorMatrix","uClarityKernel","uClarityKernelWeight","uOpacity","uMaskOpacity","uMaskBounds","uMaskCornerRadius","uMaskFeather","uOverlayColor","uAntialias"]),D=P.createBuffer(),O=P.createBuffer();P.bindBuffer(P.ARRAY_BUFFER,O),P.bufferData(P.ARRAY_BUFFER,Ol,P.STATIC_DRAW);const B=P.createBuffer();P.bindBuffer(P.ARRAY_BUFFER,B),P.bufferData(P.ARRAY_BUFFER,Bl,P.STATIC_DRAW);const W=ml(P,"#version 300 es\n\nin vec4 aPosition;in vec2 aNormal;in float aMiter;out vec2 vNormal;out float vMiter;out float vWidth;uniform float uWidth;uniform float uSharpness;uniform mat4 uMatrix;void main(){vMiter=aMiter;vNormal=aNormal;vWidth=(uWidth*.5)+uSharpness;gl_Position=uMatrix*vec4(aPosition.x+(aNormal.x*vWidth*aMiter),aPosition.y+(aNormal.y*vWidth*aMiter),0,1);}","\n##head\n##mask\nin vec2 vNormal;in float vMiter;in float vWidth;uniform float uWidth;uniform vec4 uColor;uniform vec4 uCanvasColor;void main(){vec4 fillColor=uColor;float m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);if(m<=0.0)discard;fillColor.a*=clamp(smoothstep(vWidth-.5,vWidth-1.0,abs(vMiter)*vWidth),0.0,1.0);fillColor.rgb*=fillColor.a;fillColor.rgb*=m;fillColor.rgb+=(1.0-m)*(uCanvasColor.rgb*fillColor.a);fragColor=fillColor;}",["aPosition","aNormal","aMiter"],["uColor","uCanvasColor","uMatrix","uWidth","uSharpness","uMaskBounds","uMaskOpacity"]),_=P.createBuffer();Dl()&&(P.bindBuffer(P.ARRAY_BUFFER,_),P.bufferData(P.ARRAY_BUFFER,1,P.DYNAMIC_DRAW));const V=(e,t,o,i=!1)=>{const{program:r,locations:n}=W;P.useProgram(r),P.enableVertexAttribArray(n.aPosition),P.enableVertexAttribArray(n.aNormal),P.enableVertexAttribArray(n.aMiter);const a=((e,t)=>{let o,i,r,n=0;const a=e.length,s=new Float32Array(10*(t?a+1:a)),l=e[0],c=e[a-1];for(n=0;n{const a=Math.min(Math.min(4096,n)/o.width,Math.min(4096,n)/o.height,r),l=Math.floor(a*o.width),c=Math.floor(a*o.height);_e(o,Q[e])?P.bindFramebuffer(P.FRAMEBUFFER,t):(P.bindTexture(P.TEXTURE_2D,C.get(e)),P.texImage2D(P.TEXTURE_2D,0,P.RGBA,l,c,0,P.RGBA,P.UNSIGNED_BYTE,null),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.LINEAR),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),P.bindFramebuffer(P.FRAMEBUFFER,t),P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,C.get(e),0),Q[e]=o);const h=o.width*s,p=o.height*s;var m,g;bl(d,0,h,p,0,-1,1),xl(d,0,p,0),g=1,(m=d)[0]*=g,m[1]*=g,m[2]*=g,m[3]*=g,((e,t)=>{e[4]*=t,e[5]*=t,e[6]*=t,e[7]*=t})(d,-1),u=d,P.viewport(0,0,l,c),P.colorMask(!0,!0,!0,!0),P.clearColor(0,0,0,0),P.clear(P.COLOR_BUFFER_BIT),x=[1,0,1,0,1,Math.max(i.width,o.width),1,Math.max(i.width,o.width)]},te=(e,t)=>{const{forceRelease:o=!1}=t||{},{src:i}=J.get(e);i instanceof HTMLCanvasElement&&(o||i.dataset.retain||f(i)),J.delete(e),P.deleteTexture(e)},oe=e=>J.get(e).isRotatedVideo;return{drawPath:(e,t=0,o=!1,i=!1,r,n,a,l,c)=>{if(e.length<2)return;const d=e.map((e=>({x:e.x*s,y:e.y*s}))),h=r*s;if(h>0&&V(d,h,fl(n,c),a),d.length<3||!l||0===l[3]||!a)return;const p=Pl(d),m=new Float32Array(6*p.length);p.forEach((([e,t,o],i)=>{const r=6*i;m[r+0]=e.x,m[r+1]=e.y,m[r+2]=t.x,m[r+3]=t.y,m[r+4]=o.x,m[r+5]=o.y})),((e,t)=>{const{program:o,locations:i}=N;P.useProgram(o),P.enableVertexAttribArray(i.aPosition),P.uniform4fv(i.uColor,t),P.uniformMatrix4fv(i.uMatrix,!1,u),P.uniform1fv(i.uMaskBounds,y),P.uniform1f(i.uMaskOpacity,$),P.uniform4f(i.uCanvasColor,v,w,S,k),P.bindBuffer(P.ARRAY_BUFFER,H),P.bufferData(P.ARRAY_BUFFER,e,P.STATIC_DRAW),P.vertexAttribPointer(i.aPosition,2,P.FLOAT,!1,0,0),P.drawArrays(P.TRIANGLES,0,e.length/2),P.disableVertexAttribArray(i.aPosition)})(m,fl(l,c))},drawRect:(e,t=0,o=!1,i=!1,r,n,a,l,c,d=!1,h,p,m,g,f,b=1/s,C,T)=>{const M=ut(Ke(e),s),R=r.map((t=>((e,t)=>Math.floor(ns(e,0,Math.min(.5*(t.width-1),.5*(t.height-1)))))(t||0,e))).map((e=>e*s));if(n||a){const e=Ke(M);e.x-=.5,e.y-=.5,e.width+=1,e.height+=1;const r=Al(e,t,o,i),p=Il(r);let m;C&&(m=fl(C),0===m[3]&&(m[3]=.001));const I=l&&d?[e.width/l.width,e.height/l.height]:[1,1];((e,t,o,i,r,n=E,a,l=1,c=Nl,d=Ol,h=x,p=1,m)=>{const{program:g,locations:f}=j;P.useProgram(g),P.enableVertexAttribArray(f.aPosition),P.enableVertexAttribArray(f.aTexCoord),P.enableVertexAttribArray(f.aRectCoord),P.uniform4fv(f.uColor,r),P.uniform2fv(f.uSize,[t,o]),P.uniform2fv(f.uPosition,[e[2],e[3]]),P.uniform2fv(f.uRepeat,a),P.uniform1i(f.uInverted,m?1:0),P.uniform1fv(f.uCornerRadius,i),P.uniform4f(f.uCanvasColor,v,w,S,k),P.uniform1fv(f.uMaskFeather,h.map(((e,t)=>t%2==0?e:e*s))),P.uniform1fv(f.uMaskBounds,y),P.uniform1f(f.uMaskOpacity,$),P.uniform1f(f.uEdgeFeather,Math.max(0,p)),P.uniformMatrix4fv(f.uMatrix,!1,u),P.uniform1i(f.uTexture,4),P.uniform4fv(f.uTextureColor,c),P.uniform1f(f.uTextureOpacity,l),P.activeTexture(P.TEXTURE0+4),P.bindTexture(P.TEXTURE_2D,n),P.bindBuffer(P.ARRAY_BUFFER,Z),P.bufferData(P.ARRAY_BUFFER,d,P.STATIC_DRAW),P.vertexAttribPointer(f.aTexCoord,2,P.FLOAT,!1,0,0),P.bindBuffer(P.ARRAY_BUFFER,X),P.bufferData(P.ARRAY_BUFFER,Ol,P.STATIC_DRAW),P.vertexAttribPointer(f.aRectCoord,2,P.FLOAT,!1,0,0),P.bindBuffer(P.ARRAY_BUFFER,G),P.bufferData(P.ARRAY_BUFFER,e,P.STATIC_DRAW),P.vertexAttribPointer(f.aPosition,2,P.FLOAT,!1,0,0),P.drawArrays(P.TRIANGLE_STRIP,0,e.length/2),P.disableVertexAttribArray(f.aPosition),P.disableVertexAttribArray(f.aTexCoord),P.disableVertexAttribArray(f.aRectCoord)})(p,e.width,e.height,R,fl(n,g),a,I,g,m,h?new Float32Array(h):jl(e.width,e.height,l,c,s),f,b*s,T)}p&&(p=Math.min(p,M.width,M.height),V(((e,t,o,i,r,n,a,s)=>{const l=[];if(n.every((e=>0===e)))l.push(ue(e,t),ue(e+o,t),ue(e+o,t+i),ue(e,t+i));else{const[r,a,s,c]=n,d=e,u=e+o,h=t,p=t+i;l.push(ue(d+r,h)),Ll(l,u-a,h+a,a,-1),l.push(ue(u,h+a)),Ll(l,u-c,p-c,c,0),l.push(ue(u-c,p)),Ll(l,d+s,p-s,s,1),l.push(ue(d,p-s)),Ll(l,d+r,h+r,r,2)}return(a||s)&&Ie(l,a,s,e+.5*o,t+.5*i),r&&Ae(l,r,e+.5*o,t+.5*i),l})(M.x,M.y,M.width,M.height,t,R,o,i),p*s,fl(m,g),!0))},drawEllipse:(e,t,o,i,r,n,a,l,c,d,h,p,m,g,f)=>{const b=ut(nt(e.x-t,e.y-o,2*t,2*o),s);if(a||l){const e=Ke(b);e.x-=.5,e.y-=.5,e.width+=1,e.height+=1;const t=Al(e,i,r,n);((e,t,o,i,r=E,n=Ol,a=1,s=!1)=>{const{program:l,locations:c}=Y;P.useProgram(l),P.enableVertexAttribArray(c.aPosition),P.enableVertexAttribArray(c.aTexCoord),P.uniformMatrix4fv(c.uMatrix,!1,u),P.uniform2fv(c.uRadius,[.5*t,.5*o]),P.uniform1i(c.uInverted,s?1:0),P.uniform4fv(c.uColor,i),P.uniform4f(c.uCanvasColor,v,w,S,k),P.uniform2fv(c.uRepeat,[1,1]),P.uniform1fv(c.uMaskBounds,y),P.uniform1f(c.uMaskOpacity,$),P.uniform1i(c.uTexture,4),P.uniform1f(c.uTextureOpacity,a),P.activeTexture(P.TEXTURE0+4),P.bindTexture(P.TEXTURE_2D,r),P.bindBuffer(P.ARRAY_BUFFER,K),P.bufferData(P.ARRAY_BUFFER,n,P.STATIC_DRAW),P.vertexAttribPointer(c.aTexCoord,2,P.FLOAT,!1,0,0),P.bindBuffer(P.ARRAY_BUFFER,q),P.bufferData(P.ARRAY_BUFFER,e,P.STATIC_DRAW),P.vertexAttribPointer(c.aPosition,2,P.FLOAT,!1,0,0),P.drawArrays(P.TRIANGLE_STRIP,0,e.length/2),P.disableVertexAttribArray(c.aPosition),P.disableVertexAttribArray(c.aTexCoord)})(Il(t),e.width,e.height,fl(a,g),l,h?new Float32Array(h):jl(e.width,e.height,c,d,s),g,f)}p&&V(((e,t,o,i,r,n,a)=>{const s=.5*Math.abs(o),l=.5*Math.abs(i),c=Math.abs(o)+Math.abs(i),d=Math.max(20,Math.round(c/6));return Lt(ue(e+s,t+l),s,l,r,n,a,d)})(b.x,b.y,b.width,b.height,i,r,n),p*s,fl(m,g),!0)},drawImage:(e,t,o,r,n,l,c,d,u,h,p=Vl,m=1,g,f=1,x=0,v=b,w=Hl,S=Nl,k=!1,T=!1,E=!0)=>{const I=t.width*s,A=t.height*s,L=-.5*I,z=.5*A,W=.5*I,_=-.5*A,V=new Float32Array([L,_,0,L,z,0,W,_,0,W,z,0]);P.bindBuffer(P.ARRAY_BUFFER,D),P.bufferData(P.ARRAY_BUFFER,V,P.STATIC_DRAW);const N=t.height/2/R*(i.height/t.height)*-1;n*=s,l*=s,o*=s,r*=s;const{program:H,locations:j}=F,U=yl();((e,t,o,i,r)=>{const n=1/Math.tan(t/2),a=1/(i-r);e[0]=n/o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+i)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*i*a,e[15]=0})(U,M,a,1,2*-N),xl(U,n,-l,N),xl(U,o,-r,0),kl(U,-u),vl(U,h),xl(U,-o,r,0),Sl(U,d),wl(U,c),P.useProgram(H),P.enableVertexAttribArray(j.aPosition),P.enableVertexAttribArray(j.aTexCoord),P.uniform1i(j.uTexture,3),P.uniform2f(j.uTextureSize,t.width,t.height),P.activeTexture(P.TEXTURE0+3),P.bindTexture(P.TEXTURE_2D,e);const G=T?1:0,Z=C.get(G);P.uniform1i(j.uTextureBlend,G),P.activeTexture(P.TEXTURE0+G),P.bindTexture(P.TEXTURE_2D,Z);const X=k?2:0,Y=C.get(X);P.uniform1i(j.uTextureOverlay,X),P.activeTexture(P.TEXTURE0+X),P.bindTexture(P.TEXTURE_2D,Y),P.bindBuffer(P.ARRAY_BUFFER,D),P.vertexAttribPointer(j.aPosition,3,P.FLOAT,!1,0,0);const q=Wl&&oe(e);let K;P.bindBuffer(P.ARRAY_BUFFER,q?B:O),P.vertexAttribPointer(j.aTexCoord,2,P.FLOAT,!1,0,0),P.uniformMatrix4fv(j.uMatrix,!1,U),P.uniform4fv(j.uOverlayColor,S),!g||ds(g,_l)?(g=_l,K=-1):(K=g.reduce(((e,t)=>e+t),0),K=K<=0?1:K),P.uniform1fv(j.uClarityKernel,g),P.uniform1f(j.uClarityKernelWeight,K),P.uniform1f(j.uColorGamma,1/f),P.uniform1f(j.uColorVignette,x),P.uniform1i(j.uAntialias,E?1:0),P.uniform4f(j.uColorOffset,p[4],p[9],p[14],p[19]),P.uniformMatrix4fv(j.uColorMatrix,!1,[p[0],p[1],p[2],p[3],p[5],p[6],p[7],p[8],p[10],p[11],p[12],p[13],p[15],p[16],p[17],p[18]]),P.uniform1f(j.uOpacity,m),P.uniform1f(j.uMaskOpacity,$),P.uniform1fv(j.uMaskBounds,y),P.uniform1fv(j.uMaskCornerRadius,w.map((e=>e*s))),P.uniform1fv(j.uMaskFeather,v.map(((e,t)=>t%2==0?e:e*s))),P.drawArrays(P.TRIANGLE_STRIP,0,4),P.disableVertexAttribArray(j.aPosition),P.disableVertexAttribArray(j.aTexCoord)},textureFilterNearest:P.NEAREST,textureFilterLinear:P.LINEAR,textureClamp:P.CLAMP_TO_EDGE,textureRepeat:P.REPEAT,textureCreate:()=>P.createTexture(),textureUpdate:(e,t,o)=>(J.set(e,{src:t,options:o,isRotatedVideo:"VIDEO"===t.nodeName&&(t.dataset&&90==t.dataset.rotation||270==t.dataset.rotation)}),$l(P,e,t,o)),textureGetSize:e=>{const{src:t,options:o}=J.get(e),i=Fe(t);return o.scalar?Ue(i,(e=>e/o.scalar)):i},textureDelete:te,enablePreviewStencil:()=>{P.stencilOp(P.KEEP,P.KEEP,P.REPLACE),P.stencilFunc(P.ALWAYS,1,255),P.stencilMask(255)},applyPreviewStencil:()=>{P.stencilFunc(P.EQUAL,1,255),P.stencilMask(0)},disablePreviewStencil:T,setCanvasColor(e){v=e[0],w=e[1],S=e[2],k=o?e[3]:1,P.clear(P.COLOR_BUFFER_BIT)},resetCanvasMatrix:()=>{bl(c,0,i.width,i.height,0,-1,1)},updateCanvasMatrix(e,t,o,r,n){const a=e.width,l=e.height,d=i.width*(.5/s),u=i.height*(.5/s),h={x:d+(o.x+t.x),y:u+(o.y+t.y)},p={x:h.x-t.x,y:h.y-t.y},m=.5*a,g=.5*l;ge(p,n.z,h),Pe(p,r,h);xl(c,(p.x-m)*s,(p.y-g)*s,0),xl(c,m*s,g*s,0),kl(c,n.z);const $=n.x>Math.PI/2;wl(c,$?Math.PI:0);const f=n.y>Math.PI/2;Sl(c,f?Math.PI:0),vl(c,r),xl(c,-m*s,-g*s,0)},drawToCanvas(){P.bindFramebuffer(P.FRAMEBUFFER,null),u=c,P.viewport(0,0,P.drawingBufferWidth,P.drawingBufferHeight),P.colorMask(!0,!0,!0,!0),P.clearColor(v,w,S,k),P.clear(P.COLOR_BUFFER_BIT),x=[1,0,1,0,1,i.width,1,i.width]},drawToImageBlendBuffer(e,t){ee(1,z,e,t)},drawToImageOverlayBuffer(e,t){ee(2,A,e,t)},enableMask(e,t){const o=e.x*s,r=e.y*s,n=e.width*s,a=e.height*s;g=o,p=g+n,h=i.height-r,m=i.height-(r+a),$=1-t,y=[h,p,m,g]},disableMask(){g=0,p=i.width,h=i.height,m=0,$=1,y=[h,p,m,g]},resize:(t,o,n)=>{s=n,l=1===s?.75:1,r.width=t,r.height=o,i.width=t*s,i.height=o*s,a=U(i.width,i.height),e.width=i.width,e.height=i.height,bl(c,0,i.width,i.height,0,-1,1),b=[1,0,1,0,1,r.width,1,r.width]},release(){Array.from(J.keys()).forEach((e=>te(e,{forceRelease:!0}))),J.clear(),C.forEach((e=>{P.deleteTexture(e)})),C.clear(),F.destroy(),W.destroy(),N.destroy(),j.destroy(),Y.destroy(),e.width=1,e.height=1,e=void 0}}},Gl=e=>e%2==0?e:e+1;var Zl=(e,t)=>{const{imageData:o,amount:i=1}=e,r=Math.round(2*Math.max(1,i)),n=Math.round(.5*r),a=o.width,s=o.height,l=new Uint8ClampedArray(a*s*4),c=o.data;let d,u,h,p,m,g=0,$=0,f=0;const y=a*s*4-4;for(h=0;h.5&&(f=(-n+Math.round(Math.random()*r))*(4*a)),m=Math.min(Math.max(0,g+$+f),y),l[g]=c[m],l[g+1]=c[m+1],l[g+2]=c[m+2],l[g+3]=c[m+3],g+=4;t(null,{data:l,width:o.width,height:o.height})};const Xl=[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625];function Yl(e){return Math.sqrt(1- --e*e)}function ql(e){return"[object Date]"===Object.prototype.toString.call(e)}function Kl(e,t){if(e===t||e!=e)return()=>e;const o=typeof e;if(o!==typeof t||Array.isArray(e)!==Array.isArray(t))throw new Error("Cannot interpolate values of different type");if(Array.isArray(e)){const o=t.map(((t,o)=>Kl(e[o],t)));return e=>o.map((t=>t(e)))}if("object"===o){if(!e||!t)throw new Error("Object cannot be null");if(ql(e)&&ql(t)){e=e.getTime();const o=(t=t.getTime())-e;return t=>new Date(e+t*o)}const o=Object.keys(t),i={};return o.forEach((o=>{i[o]=Kl(e[o],t[o])})),e=>{const t={};return o.forEach((o=>{t[o]=i[o](e)})),t}}if("number"===o){const o=t-e;return t=>e+t*o}throw new Error(`Cannot interpolate ${o} values`)}function Jl(e,t={}){const o=Ba(e);let i,r=e;function n(n,a){if(null==e)return o.set(e=n),Promise.resolve();r=n;let s=i,l=!1,{delay:c=0,duration:d=400,easing:u=Zr,interpolate:h=Kl}=Xr(Xr({},t),a);if(0===d)return s&&(s.abort(),s=null),o.set(e=r),Promise.resolve();const p=mn()+c;let m;return i=yn((t=>{if(td?(o.set(e=n),!1):(o.set(e=m(u(i/d))),!0)})),i.promise}return{set:n,update:(t,o)=>n(t(r,e),o),subscribe:o.subscribe}}function Ql(e,t,o,i){if("number"==typeof o){const r=i-o,n=(o-t)/(e.dt||1/60),a=(n+(e.opts.stiffness*r-e.opts.damping*n)*e.inv_mass)*e.dt;return Math.abs(a)Ql(e,t[n],o[n],i[n])));if("object"==typeof o){const r={};for(const n in o)r[n]=Ql(e,t[n],o[n],i[n]);return r}throw new Error(`Cannot spring ${typeof o} values`)}function ec(e,t={}){const o=Ba(e),{stiffness:i=.15,damping:r=.8,precision:n=.01}=t;let a,s,l,c=e,d=e,u=1,h=0,p=!1;function m(t,i={}){d=t;const r=l={};if(null==e||i.hard||g.stiffness>=1&&g.damping>=1)return p=!0,a=null,c=t,o.set(e=d),Promise.resolve();if(i.soft){const e=!0===i.soft?.5:+i.soft;h=1/(60*e),u=0}if(!s){a=null,p=!1;const t={inv_mass:void 0,opts:g,settled:!0,dt:void 0};s=yn((i=>{if(null===a&&(a=i),p)return p=!1,s=null,!1;u=Math.min(u+h,1),t.inv_mass=u,t.opts=g,t.settled=!0,t.dt=60*(i-a)/1e3;const r=Ql(t,c,e,d);return a=i,c=e,o.set(e=r),t.settled&&(s=null),!t.settled}))}return new Promise((e=>{s.promise.then((()=>{r===l&&e()}))}))}const g={set:m,update:(t,o)=>m(t(d,e),o),subscribe:o.subscribe,stiffness:i,damping:r,precision:n};return g}var tc=Oa(!1,(e=>{const t=window.matchMedia("(prefers-reduced-motion:reduce)"),o=()=>e(t.matches);return o(),t.addListener(o),()=>t.removeListener(o)})),oc=()=>"ResizeObserver"in window;const ic=Je(),rc=(e,t,o,i,r)=>{e.rect||(e.rect=Je());const n=e.rect;mt(ic,t,o,i,r),ht(n,ic)||(gt(n,ic),e.dispatchEvent(new CustomEvent("measure",{detail:n})))},nc=Math.round,ac=e=>{const t=e.getBoundingClientRect();uc&&rc(e,nc(t.x),nc(t.y),nc(t.width),nc(t.height))},sc=e=>{uc&&rc(e,e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight)},lc=[];let cc,dc,uc=void 0;function hc(){lc.length?(lc.forEach((e=>e.measure(e))),uc=requestAnimationFrame(hc)):uc=void 0}let pc=new Map([]),mc=0,gc=0;var $c=(e,t={})=>{const{observePosition:o=!1,observeViewRect:i=!1,once:r=!1,disabled:n=!1,isMeasureRoot:a=!1}=t;if(oc()&&a&&(dc||(dc=new ResizeObserver((e=>{e.forEach((e=>{pc.set(e.target,e.contentRect)}));const t=Array.from(pc.values()).some((({width:e,height:t})=>e>0&&t>0));t?t&&!1===uc&&hc():(uc&&cancelAnimationFrame(uc),uc=!1)}))),dc.observe(e),mc++),!n)return!oc()||o||i?(e.measure=i?ac:sc,lc.push(e),void 0===uc&&(uc=requestAnimationFrame(hc)),e.measure(e),{destroy(){a&&dc&&(pc.delete(e),dc.unobserve(e),mc--,0===mc&&(dc.disconnect(),dc=void 0));const t=lc.indexOf(e);lc.splice(t,1),delete e.measure}}):(cc||(cc=new ResizeObserver((e=>{e.forEach((e=>{uc&&sc(e.target)}))}))),cc.observe(e),sc(e),r?cc.unobserve(e):gc++,{destroy(){a&&dc&&(pc.delete(e),dc.unobserve(e),mc--,0===mc&&(dc.disconnect(),dc=void 0)),r||(cc.unobserve(e),gc--,0===gc&&(cc.disconnect(),cc=void 0))}})},fc=e=>{let t=!1;const o={pointerdown:()=>{t=!1},keydown:()=>{t=!0},keyup:()=>{t=!1},focus:e=>{t&&(e.target.dataset.focusVisible="")},blur:e=>{delete e.target.dataset.focusVisible}};return Object.keys(o).forEach((t=>e.addEventListener(t,o[t],!0))),{destroy(){Object.keys(o).forEach((t=>e.removeEventListener(t,o[t],!0)))}}};const yc=async e=>new Promise((t=>{if("file"===e.kind)return t(e.getAsFile());e.getAsString(t)}));var bc=(e,t={})=>{const o=e=>{e.preventDefault()},i=async o=>{o.preventDefault(),o.stopPropagation();try{const i=await(e=>new Promise(((t,o)=>{const{items:i}=e.dataTransfer;if(!i)return t([]);Promise.all(Array.from(i).map(yc)).then((e=>{t(e.filter((e=>Vo(e)&&Kt(e)||/^http/.test(e))))})).catch(o)})))(o);e.dispatchEvent(new CustomEvent("dropfiles",{detail:{event:o,resources:i},...t}))}catch(e){}};return e.addEventListener("drop",i),e.addEventListener("dragover",o),{destroy(){e.removeEventListener("drop",i),e.removeEventListener("dragover",o)}}};let xc=null;var vc=()=>{if(null===xc)if(u()){const e=g("canvas");xc=!Tl(e,{failIfMajorPerformanceCaveat:!0}),f(e)}else xc=!1;return xc},wc=e=>e instanceof WebGLTexture,Sc=([e,t,o,i])=>[i.x,i.y,e.x,e.y,o.x,o.y,t.x,t.y];function kc(e){let t,o,i,r;return{c(){t=kn("div"),o=kn("canvas"),An(t,"class","PinturaCanvas")},m(n,a){wn(n,t,a),bn(t,o),e[36](o),i||(r=[Pn(o,"measure",e[37]),hn($c.call(null,o))],i=!0)},p:Gr,i:Gr,o:Gr,d(o){o&&Sn(t),e[36](null),i=!1,Kr(r)}}}function Cc(e,t,o){let i,r,n,s,l,c,d;const h=[0,0,0,0],p=de(),m=u()&&(e=>{const t=.5*e,o=g("canvas",{"data-retain":!0,width:e,height:e}),i=o.getContext("2d");return i.fillStyle="#f0f",i.fillRect(0,0,t,t),i.fillRect(t,t,t,t),o})(128),$=qn();let b,{isAnimated:x}=t,{isTransparent:v}=t,{maskRect:w}=t,{maskOpacity:S=1}=t,{maskFrameOpacity:k=.95}=t,{maskMarkupOpacity:C=1}=t,{clipAnnotationsToImage:T=!0}=t,{pixelRatio:M=1}=t,{textPixelRatio:P=M}=t,{backgroundColor:E}=t,{willRender:I=G}=t,{didRender:A=G}=t,{willRequest:L}=t,{loadImageData:z=G}=t,{enableGrid:F=!1}=t,{gridColors:D}=t,{gridSize:O}=t,{gridOpacity:B=0}=t,{images:W=[]}=t,{interfaceImages:_=[]}=t,{selectionColor:V}=t,N=null,H=null,j=null;const Z=(e,t)=>e.set(t,{hard:!x}),X={precision:1e-4*.01};let Y=0;const q=Jl(void 0,{duration:0});on(e,q,(e=>o(35,d=e)));const K=ec(1,X);on(e,K,(e=>o(34,l=e)));const J=ec(1,X);on(e,J,(e=>o(50,n=e)));const Q=Ba();on(e,Q,(e=>o(52,c=e)));const ee=Ba();on(e,ee,(e=>o(51,s=e)));const te={},oe=(e,t)=>{let o=te[e.id];const i=Math.min(1,2048/t.width);let r=o?o.element:g("canvas",{width:t.width*i,height:t.height*i,"data-retain":!0});if(!o||((e,t)=>{if(e.total!==t.length)return!0;const o=e.last,i=t[t.length-1];return o.drawMode!==i.drawMode||!(!Mi(o)||Mi(i)&&ht(o,i))||!(!Ri(o)||Ri(i)&&o.x===i.x&&o.y===i.y&&o.rx===i.rx&&o.ry===i.ry)||!(!Ei(o)||Ei(i)&&i.points.length===o.points.length)})(o,e.actions)){r=r.cloneNode(),((e,t,o)=>{const{selectionColor:i=[1,1,1],scalar:r=1}=o||{};let n=!1;for(const o of t){const t="subtract"===o.drawMode;if(t&&!n)continue;e.globalCompositeOperation=t?"destination-out":"source-over",e.save(),e.beginPath();const a=wr(o);vo(e,r,r),xo(e,o.rotation,a),Wr(e,o.flipX,o.flipY,a),o.width?Lr(e,{...o,backgroundColor:i}):o.points?Br(e,Object.assign({},o,o.pathClose?{backgroundColor:i,strokeColor:[0,0,0,0]}:{strokeColor:i,strokeJoin:"round",strokeCap:"round"})):o.rx&&zr(e,{...o,backgroundColor:i,strokeColor:[0,0,0,0],strokeJoin:"round",strokeCap:"round"}),e.restore(),n=!0}})(r.getContext("2d"),e.actions,{selectionColor:[1,0,1],scalar:i});const t=e.actions.length;te[e.id]={total:t,last:{...e.actions[t-1]},element:r}}return{x:0,y:0,...t,fillColor:e.color||[1,1,1],backgroundImage:r}};let ie;const re=()=>{cancelAnimationFrame(ie),ie=requestAnimationFrame((()=>{Ce=!0,ze=0,r()}))},ne=new Map([]),ae=new Map([]),se=(e,t)=>({filterParam:"pixelated"===e?N.textureFilterNearest:N.textureFilterLinear,wrapParam:"repeat"===t?N.textureRepeat:N.textureClamp}),le=(e,t,o)=>{if(!ne.has(e)){ne.set(e,e);const r=se(t,o);if(!R(i=e)&&(uo(i)||y(i)||Sr(i)||Qt(i))){const t=N.textureCreate();N.textureUpdate(t,e,r),ne.set(e,t)}else z(e).then((t=>{if(!N||!t)return;const o=N.textureCreate();N.textureUpdate(o,t,r),ne.set(e,o),re()})).catch((t=>{ne.set(e,t)}))}var i,r;if(Qt(e)&&((r=e).currentTime>0&&!r.paused&&!r.ended&&r.readyState>2||"true"===e.dataset.redraw)){const i=ne.get(e),r=se(t,o);return N.textureUpdate(i,e,r),e.dataset.redraw=!1,i}return ne.get(e)},ce=(e,t={})=>{const o=t.id||e.id;if(!e.text.length)return void ae.delete(o);let{text:i,textAlign:r,fontFamily:n,fontSize:a=16,fontWeight:s,fontVariant:l,fontStyle:c,letterSpacing:d,lineHeight:u=a,width:h,height:p}=e,{outline:m=0,blur:$=0,paddingTop:f=0,paddingRight:y=Ko,paddingBottom:b=0,paddingLeft:x=Ko}=t;h=Ao(h)?Math.floor(h):h,p=Ao(p)?Math.floor(p):p;const{textSize:v,signature:w}=((e="",t)=>{let{width:o=0,height:i="auto",fontSize:r,fontFamily:n,lineHeight:a,fontWeight:s,fontStyle:l,fontVariant:c,letterSpacing:d}=t;const u=jo({text:e,fontFamily:n,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:r,lineHeight:a,letterSpacing:d,width:o,height:i});let h=ei.get(u);if(h)return h;let p=1;r>1e3&&qo()&&(p=r/1e3,r=1e3,a*=p);const m=Gt(g("pre",{contenteditable:"true",spellcheck:"false",style:`${oi}${Jo({fontFamily:n,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:r,letterSpacing:d,lineHeight:a})};${Qo(e,t)}"`,innerHTML:e})),$=m.getBoundingClientRect();return h={signature:ti(m).flat().map((e=>e.text)).join("_;_"),textSize:Ue(Fe($),(e=>Math.ceil(e*p)))},ei.set(u,h),m.remove(),h})(i,{...e,width:h,height:p}),S=jo({text:i,textAlign:r,fontFamily:n,fontSize:a,fontWeight:s,fontVariant:l,fontStyle:c,lineHeight:u,letterSpacing:d,outline:m,blur:$,signature:w});if(!ne.has(S)){ne.set(S,i);const e=Math.ceil(v.width),t=Math.ceil(v.height/u)*u;if(0===e||0===t)return;const g=Fl(),w=Math.min(1,(g-(x+y)*P)/(e*P),(g-(f+b)*P)/(t*P));$i(i,{fontSize:a,fontFamily:n,fontWeight:s,fontVariant:l,fontStyle:c,letterSpacing:d,textAlign:r,lineHeight:u,width:h,height:p,imageWidth:e,imageHeight:t,paddingLeft:x,paddingTop:f,paddingRight:y,paddingBottom:b,pixelRatio:P*w,willRequest:L,outline:m,blur:$,color:[1,0,1]}).then((e=>{if(!N)return;const t=N.textureCreate();N.textureUpdate(t,e,{filterParam:N.textureFilterLinear,wrapParam:N.textureClamp,scalar:w}),ne.set(S,t),ae.set(o,t),re()})).catch(console.error)}const k=ne.get(S);return wc(k)?k:ae.get(o)},he=new Map,pe=(e,t)=>{let o;if(e.backgroundImage)o=le(e.backgroundImage,e.backgroundImageRendering,"repeat"===e.backgroundRepeat?"repeat":void 0);else if(R(e.text)){if(e.width&&e.width<1||e.height&&e.height<1)return;o=ce(e,t)}else e.bitmap&&e.points&&(o=(e=>{const{id:t,points:o,strokeWidth:i,strokeCap:r,strokeJoin:n,strokeColor:a}=e;let s=ne.get(t),l=he.get(t);const c=jo({points:o.map((e=>`${e.x},${e.y}`)).join(","),strokeWidth:i,strokeCap:r,strokeJoin:n,strokeColor:a});if(l){const{hash:e}=l;if(ne.has(t)){if(c===e)return ne.get(t)}else l=void 0}if(!l){const o=g("canvas",{width:1,height:1});l={canvas:o,hash:void 0},he.set(e.id,l),s=N.textureCreate(),N.textureUpdate(s,o,{filterParam:N.textureFilterLinear,wrapParam:N.textureClamp}),ne.set(t,s)}const{canvas:d}=l,u=Math.ceil(e.strokeWidth),h=ot(o),p=Math.floor(h.x)-.5*u,m=Math.floor(h.y)-.5*u,$=Math.ceil(h.width+u),f=Math.ceil(h.height+u);d.width=Math.max($,1),d.height=Math.max(f,1);const y=d.getContext("2d");return y.clearRect(0,0,d.width,d.height),$>=1&&f>=1&&(y.translate(-p,-m),Br(y,e),y.resetTransform()),N.textureUpdate(s,d,{filterParam:N.textureFilterLinear,wrapParam:N.textureClamp}),he.set(t,{canvas:d,hash:c}),ne.get(t)})(e));return o},me=({texture:e,size:t,origin:o,translation:i,rotation:r,scale:n,colorMatrix:a,opacity:s,convolutionMatrix:l,gamma:c,vignette:d,maskFeather:u,maskCornerRadius:h,overlayColor:p,enableOverlay:m,enableManipulation:g,enableAntialiasing:$})=>{let f=0,y=0;if(1===M){const e=Math.abs(1-n){const c={...t},d={width:r.width/P*o,height:r.height/P*o},u=ue(0,0),h={width:d.width,height:d.height};return c.x-=l*o,c.y-=n*o,e.width?(c.height=c.height?c.height+n*o/i:d.height,c.width+=(l+a)*o/i,"center"===e.textAlign?u.x=.5*(c.width-h.width/i):"right"===e.textAlign&&(u.x=c.width-h.width/i)):(c.width=d.width,c.height=d.height),{rect:c,backgroundPosition:u,backgroundSize:h}},fe=(e=[],t)=>{e.forEach((e=>{let o=pe(e);const i="loading"===e.status||e.backgroundImage&&o===e.backgroundImage;i&&re();const r="error"===e.status||e.backgroundImage&&o instanceof Error;let n=wc(o)?o:void 0;const a=e._scale||1,s=e._translate||p,l=e.strokeWidth&&e.strokeWidth*a,c=!!e.width,d=!c&&R(e.text)&&n,u=Fo(e.points),h=Ri(e);if(u){const i=e.points.map((e=>ue(e.x*a+s.x,e.y*a+s.y)));if(e.bitmap){o&&t.push(o);const r=ot(i),s=Math.ceil(e.strokeWidth*a);N.drawRect({x:Math.floor(r.x)-.5*s,y:Math.floor(r.y)-.5*s,width:Math.ceil(r.width+s),height:Math.ceil(r.height+s)},e.rotation,e.flipX,e.flipY,[0,0,0,0],void 0,n,void 0,void 0,void 0,void 0,void 0,void 0,e.opacity,void 0,void 0,!1,!1)}else N.drawPath(i,e.rotation,e.flipX,e.flipY,l,e.strokeColor,e.pathClose,e.backgroundColor,e.opacity)}else if(h){let c=e.x,d=e.y;c*=a,d*=a,c+=s.x,d+=s.y;const u=ue(c,d);N.drawEllipse(u,e.rx*a,e.ry*a,e.rotation,e.flipX,e.flipY,e.backgroundColor,n,void 0,void 0,e.backgroundCorners&&Sc(e.backgroundCorners),l,e.strokeColor,e.opacity,e.inverted),o&&t.push(o),(i||r)&&(e.backgroundColor||e.strokeColor&&e.strokeWidth||N.drawEllipse(u,e.rx*a,e.ry*a,e.rotation,e.flipX,e.flipY,r?[1,0,0,.25*e.opacity]:[0,0,0,.25*e.opacity]),r&&Se(u),i&&we(u))}else if(d||c){const c=n&&N.textureGetSize(n);let d,u,h,p=e.fillColor,m=e.backgroundColor,g=e.strokeColor,$=[e.cornerRadius,e.cornerRadius,e.cornerRadius,e.cornerRadius].map((e=>e*a));d=e.width?tt(e):{x:e.x,y:e.y,...c},a&&s&&(d.x*=a,d.y*=a,d.x+=s.x,d.y+=s.y,d.width*=a,d.height*=a),o&&t.push(o);const{backgroundRepeat:f="no-repeat"}=e;if(c)if(e.backgroundImage&&(e.backgroundSize||e.backgroundPosition||e.backgroundRepeat)){const t=U(c.width,c.height);if("repeat"===e.backgroundRepeat&&(u={...c},h={x:0,y:0}),"contain"===e.backgroundSize){const o=xt(d,t,d);u=De(o),h=e.backgroundPosition?e.backgroundPosition:ue(.5*(d.width-u.width),.5*(d.height-u.height))}else if("cover"===e.backgroundSize){const o=bt(d,t,d);u=De(o),e.backgroundPosition?h=e.backgroundPosition:(h=ue(o.x,o.y),h=ue(.5*(d.width-u.width),.5*(d.height-u.height)))}else e.backgroundSize?(u=e.backgroundSize,h=e.backgroundPosition||{x:0,y:0}):e.backgroundPosition&&(u={...c},h=e.backgroundPosition)}else if(e.text){const o={...d};if(e.backgroundColor||e.strokeColor){m=void 0,g=void 0;const t={width:c.width/P*a,height:c.height/P*a},o=(e.width||t.width-2*Ko)*a,i=(e.height||t.height)*a;N.drawRect({...d,width:o,height:i},e.rotation,e.flipX,e.flipY,$,e.backgroundColor,void 0,void 0,void 0,!1,void 0,l,e.strokeColor,e.opacity,void 0,void 0,void 0,e.inverted)}let i=1;e.fontSize>1e3&&qo()&&(i=e.fontSize/1e3),p=e.color||[0,0,0],e._prerender&&(p[3]=0);const r=$e(e,o,a,i,c,0,Ko,0,Ko);d=r.rect,h=r.backgroundPosition,u=r.backgroundSize;const{textShadowX:n,textShadowY:s,textShadowBlur:f}=e;if(n||s||f){const r=Math.ceil(.5*f),l=r,c=Math.max(Ko,r),u=r,h=Math.max(Ko,r),p=pe(e,{id:e.id+"shadow",blur:f,paddingTop:l,paddingRight:c,paddingBottom:u,paddingLeft:h});if(p&&!e._prerender){t.push(p);const r=N.textureGetSize(p),{rect:u,backgroundPosition:m,backgroundSize:g}=$e(e,o,a,i,r,l,c,0,h),$=at(d),f=at(u);f.x+=n,f.y+=s;const y=ge(f,e.rotation,$),b={x:y.x-.5*u.width,y:y.y-.5*u.height,width:u.width,height:u.height};e.height&&(b.height-=s),N.drawRect(b,e.rotation,e.flipX,e.flipY,[0,0,0,0],void 0,p,g,m,!1,void 0,void 0,void 0,e.opacity,void 0,0,e.textShadowColor)}}if(e.textOutlineWidth){const r=Math.ceil(.5*e.textOutlineWidth),n=r,s=Ko+r,l=r,c=Ko+r,d=pe(e,{id:e.id+"outline",outline:e.textOutlineWidth,paddingTop:n,paddingRight:s,paddingBottom:l,paddingLeft:c});if(d&&!e._prerender){const r=N.textureGetSize(d);t.push(d);const{rect:l,backgroundPosition:u,backgroundSize:h}=$e(e,o,a,i,r,n,s,0,c);N.drawRect(l,e.rotation,e.flipX,e.flipY,[0,0,0,0],void 0,d,h,u,!1,void 0,void 0,void 0,e.opacity,void 0,0,e.textOutlineColor)}}}if(N.drawRect(d,e.rotation,e.flipX,e.flipY,$,m,n,u,h,"repeat"===f,e.backgroundCorners&&Sc(e.backgroundCorners),l,g,e.opacity,void 0,e.feather,p,e.inverted),i||r){e.backgroundColor&&0!==e.backgroundColor[3]||e.strokeColor&&e.strokeWidth||N.drawRect(d,e.rotation,e.flipX,e.flipY,$,r?[1,.2549,.2118,.25*e.opacity]:[0,0,0,.25*e.opacity]);const t=at(d);r&&Se(t),i&&we(t)}}else o&&t.push(o)}))};let ye=0;const be=[{x:-5,y:-5},{x:5,y:5}],xe=[{x:5,y:-5},{x:-5,y:5}],ve=Lt({x:0,y:0},10,10,0,!1,!1,16);ve.length=9;const we=e=>{ye=Date.now()/50,N.drawEllipse(e,15,15,0,!1,!1,[0,0,0,.5]);const t=Ae(ve.map((t=>({x:t.x+e.x,y:t.y+e.y}))),ye,e.x,e.y);N.drawPath(t,0,!1,!1,2,[1,1,1])},Se=e=>{N.drawEllipse(e,13,13,0,!1,!1,[1,.2549,.2118,.75]);const t=be.map((t=>({x:t.x+e.x,y:t.y+e.y}))),o=xe.map((t=>({x:t.x+e.x,y:t.y+e.y})));N.drawPath(t,0,!1,!1,3,[1,1,1]),N.drawPath(o,0,!1,!1,3,[1,1,1])},ke=(e,t,o,i,r,n)=>N.drawRect(t,0,!1,!1,h,h,e,i,o,!0,void 0,0,void 0,n,void 0,void 0,r);let Ce=!1,Te=!0,Me=!1;const Re=[],Pe=[],Ee=[],Ie=()=>{Ee.length=0;const e=W[0],{manipulationShapes:t,manipulationShapesDirty:o,annotationShapes:i,annotationShapesDirty:r,interfaceShapes:a,decorationShapes:u,frameShapes:p,selectionShapes:g}=I({opacity:e.opacity,rotation:e.rotation,scale:e.scale,images:W,size:We(H,j),backgroundColor:[...d],selectionRect:c}),$=[...d],f=c,y=ns(l,0,1),b=s,x=Math.abs(e.rotation.x/Math.PI*2-1),S=Math.abs(e.rotation.y/Math.PI*2-1),k=x<.99||S<.99,M={...e.size},R=e.backgroundColor,E=e.backgroundImage,L=t.length>0,z=i.length>0,U=R[3]>0,G=!!T&&C>=1;if(y<1&&U){const e=$[0],t=$[1],o=$[2],i=1-y,r=R[0]*i,n=R[1]*i,a=R[2]*i,s=1-i;$[0]=r+e*s,$[1]=n+t*s,$[2]=a+o*s,$[3]=1}N.setCanvasColor(v?h:$);L&&(o||Ce)?(N.disableMask(),N.drawToImageBlendBuffer(M),Re.length=0,fe(t,Re)):L||(Re.length=0),Ee.push(...Re),Te&&(N.drawToImageOverlayBuffer(M,P),Te=!1);if(k?(z&&(r||Ce)||!Me?(N.disableMask(),N.drawToImageOverlayBuffer(M,P),Pe.length=0,fe(i,Pe)):z||(Pe.length=0),Me=!0):Me=!1,N.drawToCanvas(),N.enableMask(f,y),F&&O>=1&&2===D.length&&B&&((e,t,o,i,r)=>{const n=We(t,t),a=le(m,"pixelated","repeat"),s=ue(-e.x%t,-e.y%t),l=ue(s.x+.5*n.width,s.y);ke(a,e,s,n,o,r),ke(a,e,l,n,i,r)})(f,O,D[0],D[1],B),U&&N.drawRect(f,0,!1,!1,h,R),E){N.enableMask(f,1);const e=Math.max(w.width/E.width,w.height/E.height),t=E.width*e,o=E.height*e,i={x:w.x+.5*w.width-.5*t,y:w.y+.5*w.height-.5*o,width:t,height:o};N.drawRect(i,0,!1,!1,h,h,le(E,"linear")),N.enableMask(f,y)}if(G&&N.enablePreviewStencil(),Ee.push(...[...W].reverse().map((e=>me({...e,texture:le(e.data),enableOverlay:k&&z,enableManipulation:L,enableAntialiasing:!0,mask:f,maskOpacity:y,overlayColor:b})))),N.enableMask(f,C),k||(G&&N.applyPreviewStencil(),N.resetCanvasMatrix(),N.updateCanvasMatrix(M,e.origin,e.translation,e.scale,e.rotation),Pe.length=0,fe(i,Pe),G&&N.disablePreviewStencil()),Ee.push(...Pe),N.resetCanvasMatrix(),N.enableMask(f,C),fe(u,Ee),p.length){N.enableMask(f,1);const e=p.filter((e=>!e.expandsCanvas)),t=p.filter((e=>e.expandsCanvas));e.length&&fe(e,Ee),t.length&&(N.enableMask({x:f.x+.5,y:f.y+.5,width:f.width-1,height:f.height-1},n),fe(t,Ee))}if(V&&g.length&&!k){N.resetCanvasMatrix(),N.updateCanvasMatrix(M,e.origin,e.translation,e.scale,e.rotation);const t=[...V];t[3]=.5;const o=[{id:"selection",color:t,actions:[...g]}].map((e=>oe(e,M)));fe(o,Ee),N.resetCanvasMatrix()}N.disableMask(),fe(a,Ee),_.forEach((e=>{if(N.enableMask(e.mask,e.maskOpacity),e.backgroundColor){const t=E&&bt({...e.mask},E.width/E.height),o=E&&le(E,"linear");N.drawRect(e.mask,0,!1,!1,e.maskCornerRadius,e.backgroundColor,o,t,t,void 0,void 0,void 0,void 0,e.opacity,e.maskFeather),o&&Ee.push(o)}const t=me({...e,texture:le(e.data),enableAntialiasing:!1,translation:{x:e.translation.x+e.offset.x-.5*H,y:e.translation.y+e.offset.y-.5*j}});Ee.push(t)})),N.disableMask(),(e=>{ne.forEach(((t,o)=>{!e.find((e=>e===t))&&wc(t)&&(Array.from(ae.values()).includes(t)||(ne.delete(o),N.textureDelete(t)))}))})(Ee),A(),Ce=!1};let Le,ze=0;const Oe=()=>{clearTimeout(Le);const e=Date.now();e-ze<48?Le=setTimeout(Oe,48):(ze=e,Ie())};Xn((()=>r())),Zn((()=>o(30,N=Ul(b,{alpha:v})))),Yn((()=>{N&&(he.forEach((({canvas:e})=>f(e))),he.clear(),N.release(),o(30,N=void 0),o(0,b=void 0))}));return e.$$set=e=>{"isAnimated"in e&&o(9,x=e.isAnimated),"isTransparent"in e&&o(10,v=e.isTransparent),"maskRect"in e&&o(11,w=e.maskRect),"maskOpacity"in e&&o(12,S=e.maskOpacity),"maskFrameOpacity"in e&&o(13,k=e.maskFrameOpacity),"maskMarkupOpacity"in e&&o(14,C=e.maskMarkupOpacity),"clipAnnotationsToImage"in e&&o(15,T=e.clipAnnotationsToImage),"pixelRatio"in e&&o(16,M=e.pixelRatio),"textPixelRatio"in e&&o(17,P=e.textPixelRatio),"backgroundColor"in e&&o(18,E=e.backgroundColor),"willRender"in e&&o(19,I=e.willRender),"didRender"in e&&o(20,A=e.didRender),"willRequest"in e&&o(21,L=e.willRequest),"loadImageData"in e&&o(22,z=e.loadImageData),"enableGrid"in e&&o(23,F=e.enableGrid),"gridColors"in e&&o(24,D=e.gridColors),"gridSize"in e&&o(25,O=e.gridSize),"gridOpacity"in e&&o(26,B=e.gridOpacity),"images"in e&&o(27,W=e.images),"interfaceImages"in e&&o(28,_=e.interfaceImages),"selectionColor"in e&&o(29,V=e.selectionColor)},e.$$.update=()=>{if(1&e.$$.dirty[0]&&b){const e=getComputedStyle(b).getPropertyValue("--color-transition-duration");o(31,Y=(e=>{let t=parseFloat(e);return/^[0-9]+s$/.test(e)?1e3*t:t})(e))}262656&e.$$.dirty[0]|1&e.$$.dirty[1]&&E&&q.set(E,{duration:x?Y:0}),4096&e.$$.dirty[0]&&Z(K,Ao(S)?S:1),8192&e.$$.dirty[0]&&Z(J,Ao(k)?k:1),2048&e.$$.dirty[0]&&w&&Q.set(w),24&e.$$.dirty[1]&&d&&ee.set([d[0],d[1],d[2],ns(l,0,1)]),1207959558&e.$$.dirty[0]&&o(33,i=!!(N&&H&&j&&W.length)),1073807366&e.$$.dirty[0]&&H&&j&&N&&(ze=0,N.resize(H,j,M)),4&e.$$.dirty[1]&&o(32,r=i?vc()?Oe:Ie:a),6&e.$$.dirty[1]&&i&&r&&r()},[b,H,j,$,q,K,J,Q,ee,x,v,w,S,k,C,T,M,P,E,I,A,L,z,F,D,O,B,W,_,V,N,Y,r,i,l,d,function(e){ta[e?"unshift":"push"]((()=>{b=e,o(0,b)}))},e=>{o(1,H=e.detail.width),o(2,j=e.detail.height),$("measure",{width:H,height:j})}]}class Tc extends Fa{constructor(e){super(),za(this,e,Cc,kc,Qr,{isAnimated:9,isTransparent:10,maskRect:11,maskOpacity:12,maskFrameOpacity:13,maskMarkupOpacity:14,clipAnnotationsToImage:15,pixelRatio:16,textPixelRatio:17,backgroundColor:18,willRender:19,didRender:20,willRequest:21,loadImageData:22,enableGrid:23,gridColors:24,gridSize:25,gridOpacity:26,images:27,interfaceImages:28,selectionColor:29},null,[-1,-1,-1])}}var Mc=(e,t=Boolean,o=" ")=>e.filter(t).join(o);function Rc(e,t,o){const i=e.slice();return i[17]=t[o],i}const Pc=e=>({tab:4&e}),Ec=e=>({tab:e[17]});function Ic(e){let t,o,i,r=[],n=new Map,a=e[2];const s=e=>e[17].id;for(let t=0;t{i=null})),ba())},i(e){o||(xa(i),o=!0)},o(e){va(i),o=!1},d(e){i&&i.d(e),e&&Sn(t)}}}function zc(e,t,o){let i,r,n,{$$slots:a={},$$scope:s}=t,{class:l}=t,{name:c}=t,{selected:d}=t,{tabs:u=[]}=t,{layout:h}=t;const p=qn(),m=e=>{const t=n.querySelectorAll('[role="tab"] button')[e];t&&t.focus()},g=(e,t)=>{e.preventDefault(),e.stopPropagation(),p("select",t)},$=({key:e},t)=>{if(!/arrow/i.test(e))return;const o=u.findIndex((e=>e.id===t));return/right|down/i.test(e)?m(o0?o-1:u.length-1):void 0};return e.$$set=e=>{"class"in e&&o(0,l=e.class),"name"in e&&o(7,c=e.name),"selected"in e&&o(8,d=e.selected),"tabs"in e&&o(9,u=e.tabs),"layout"in e&&o(1,h=e.layout),"$$scope"in e&&o(10,s=e.$$scope)},e.$$.update=()=>{896&e.$$.dirty&&o(2,i=u.map((e=>{const t=e.id===d;return{...e,tabId:`tab-${c}-${e.id}`,href:`#panel-${c}-${e.id}`,selected:t}}))),4&e.$$.dirty&&o(4,r=i.length>1)},[l,h,i,n,r,g,$,c,d,u,s,a,(e,t)=>$(t,e.id),(e,t)=>g(t,e.id),function(e){ta[e?"unshift":"push"]((()=>{n=e,o(3,n)}))}]}class Fc extends Fa{constructor(e){super(),za(this,e,zc,Lc,Qr,{class:0,name:7,selected:8,tabs:9,layout:1})}}const Dc=e=>({panel:16&e}),Oc=e=>({panel:e[4][0].id,panelIsActive:!0});function Bc(e,t,o){const i=e.slice();return i[14]=t[o].id,i[15]=t[o].shouldDraw,i[16]=t[o].panelId,i[17]=t[o].tabindex,i[18]=t[o].labelledBy,i[19]=t[o].isActive,i[20]=t[o].hidden,i[3]=t[o].visible,i}const Wc=e=>({panel:16&e,panelIsActive:16&e}),_c=e=>({panel:e[14],panelIsActive:e[19]});function Vc(e){let t,o,i,r,n,a;const s=e[11].default,l=rn(s,e,e[10],Oc);return{c(){t=kn("div"),o=kn("div"),l&&l.c(),An(o,"class",i=Mc([e[1]])),An(t,"class",e[0]),An(t,"style",e[2])},m(i,s){wn(i,t,s),bn(t,o),l&&l.m(o,null),r=!0,n||(a=[Pn(t,"measure",e[13]),hn($c.call(null,t))],n=!0)},p(e,n){l&&l.p&&(!r||1040&n)&&sn(l,s,e,e[10],r?an(s,e[10],n,Dc):ln(e[10]),Oc),(!r||2&n&&i!==(i=Mc([e[1]])))&&An(o,"class",i),(!r||1&n)&&An(t,"class",e[0]),(!r||4&n)&&An(t,"style",e[2])},i(e){r||(xa(l,e),r=!0)},o(e){va(l,e),r=!1},d(e){e&&Sn(t),l&&l.d(e),n=!1,Kr(a)}}}function Nc(e){let t,o,i,r,n,a=[],s=new Map,l=e[4];const c=e=>e[14];for(let t=0;t{u=null})),ba()),(!d||2&h&&r!==(r=Mc(["PinturaTabPanel",t[1]])))&&An(o,"class",r),(!d||16&h&&n!==(n=t[20]))&&(o.hidden=n),(!d||16&h&&a!==(a=t[16]))&&An(o,"id",a),(!d||16&h&&s!==(s=t[17]))&&An(o,"tabindex",s),(!d||16&h&&l!==(l=t[18]))&&An(o,"aria-labelledby",l),(!d||16&h&&c!==(c=!t[3]))&&An(o,"data-inert",c)},i(e){d||(xa(u),d=!0)},o(e){va(u),d=!1},d(e){e&&Sn(o),u&&u.d()}}}function Uc(e){let t,o,i,r;const n=[Nc,Vc],a=[];function s(e,t){return e[5]?0:1}return t=s(e),o=a[t]=n[t](e),{c(){o.c(),i=Rn()},m(e,o){a[t].m(e,o),wn(e,i,o),r=!0},p(e,[r]){let l=t;t=s(e),t===l?a[t].p(e,r):(ya(),va(a[l],1,1,(()=>{a[l]=null})),ba(),o=a[t],o?o.p(e,r):(o=a[t]=n[t](e),o.c()),xa(o,1),o.m(i.parentNode,i))},i(e){r||(xa(o),r=!0)},o(e){va(o),r=!1},d(e){a[t].d(e),e&&Sn(i)}}}function Gc(e,t,o){let i,r,{$$slots:n={},$$scope:a}=t,{class:s}=t,{name:l}=t,{selected:c}=t,{panelClass:d}=t,{panels:u=[]}=t,{visible:h}=t,{style:p}=t;const m={};return e.$$set=e=>{"class"in e&&o(0,s=e.class),"name"in e&&o(6,l=e.name),"selected"in e&&o(7,c=e.selected),"panelClass"in e&&o(1,d=e.panelClass),"panels"in e&&o(8,u=e.panels),"visible"in e&&o(3,h=e.visible),"style"in e&&o(2,p=e.style),"$$scope"in e&&o(10,a=e.$$scope)},e.$$.update=()=>{968&e.$$.dirty&&o(4,i=u.map((e=>{const t=e===c;t&&o(9,m[e]=!0,m);const i=h?-1!==h.indexOf(e):t;return{id:e,panelId:`panel-${l}-${e}`,labelledBy:`tab-${l}-${e}`,isActive:t,hidden:!t,visible:i,tabindex:t?0:-1,shouldDraw:t||m[e]}}))),16&e.$$.dirty&&o(5,r=i.length>1)},[s,d,p,h,i,r,l,c,u,m,a,n,function(t){Qn.call(this,e,t)},function(t){Qn.call(this,e,t)}]}class Zc extends Fa{constructor(e){super(),za(this,e,Gc,Uc,Qr,{class:0,name:6,selected:7,panelClass:1,panels:8,visible:3,style:2})}}var Xc=e=>{const t=Object.getOwnPropertyDescriptors(e.prototype);return Object.keys(t).filter((e=>!!t[e].get))};function Yc(e){let t,o,i,r;const n=[e[4]];function a(t){e[22](t)}var s=e[10];function l(e){let t={};for(let e=0;eEa(t,"name",a))),e[23](t),t.$on("measure",e[11])),{c(){t&&Ia(t.$$.fragment),i=Rn()},m(e,o){t&&Aa(t,e,o),wn(e,i,o),r=!0},p(e,r){const c=16&r[0]?Ra(n,[Pa(e[4])]):{};if(!o&&4&r[0]&&(o=!0,c.name=e[2],ca((()=>o=!1))),s!==(s=e[10])){if(t){ya();const e=t;va(e.$$.fragment,1,0,(()=>{La(e,1)})),ba()}s?(t=Wn(s,l(e)),ta.push((()=>Ea(t,"name",a))),e[23](t),t.$on("measure",e[11]),Ia(t.$$.fragment),xa(t.$$.fragment,1),Aa(t,i.parentNode,i)):t=null}else s&&t.$set(c)},i(e){r||(t&&xa(t.$$.fragment,e),r=!0)},o(e){t&&va(t.$$.fragment,e),r=!1},d(o){e[23](null),o&&Sn(i),t&&La(t,o)}}}function qc(e){let t,o,i,r=e[5]&&Yc(e);return{c(){t=kn("div"),r&&r.c(),An(t,"data-util",e[2]),An(t,"class",o=Mc(["PinturaUtilPanel",e[1]])),An(t,"style",e[6])},m(o,n){wn(o,t,n),r&&r.m(t,null),e[24](t),i=!0},p(e,n){e[5]?r?(r.p(e,n),32&n[0]&&xa(r,1)):(r=Yc(e),r.c(),xa(r,1),r.m(t,null)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),(!i||4&n[0])&&An(t,"data-util",e[2]),(!i||2&n[0]&&o!==(o=Mc(["PinturaUtilPanel",e[1]])))&&An(t,"class",o),(!i||64&n[0])&&An(t,"style",e[6])},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(o){o&&Sn(t),r&&r.d(),e[24](null)}}}function Kc(e,t,o){let i,r,n,a,s,l;const c=qn();let{isActive:d=!0}=t,{stores:u}=t,{content:h}=t,{component:p}=t,{locale:m}=t,{class:g}=t;const $=Jn("isAnimated");let f;on(e,$,(e=>o(21,l=e)));const y=ec(0),b=Wa(y,(e=>ns(e,0,1)));on(e,b,(e=>o(20,s=e)));let x=!d;const v=Ba(d);on(e,v,(e=>o(25,a=e)));const w={isActive:Wa(v,(async(e,t)=>{if(!e)return t(e);await sa(),t(e)})),isActiveFraction:Wa(b,(e=>e)),isVisible:Wa(b,(e=>e>0))},S=h.view,k=Xc(S),C=Object.keys(h.props||{}).reduce(((e,t)=>k.includes(t)?(e[t]=h.props[t],e):e),{}),T=Object.keys(w).reduce(((e,t)=>k.includes(t)?(e[t]=w[t],e):e),{});let M,R;const P=e=>{o(17,f={...e.detail}),I&&d&&c("measure",{...f})};Kn("measurable",$c);const E=Gn().$$.context;let I=!1;return Zn((()=>{if(o(19,I=!0),n)return;o(0,p=new S({target:R,props:{...r},context:E})),o(2,M=p.name);const e=p.$on("measure",P);return()=>{e(),p.$destroy()}})),e.$$set=e=>{"isActive"in e&&o(12,d=e.isActive),"stores"in e&&o(13,u=e.stores),"content"in e&&o(14,h=e.content),"component"in e&&o(0,p=e.component),"locale"in e&&o(15,m=e.locale),"class"in e&&o(1,g=e.class)},e.$$.update=()=>{135169&e.$$.dirty[0]&&f&&d&&p&&c("measure",f),2101248&e.$$.dirty[0]&&y.set(d?1:0,{hard:!1===l}),1310720&e.$$.dirty[0]&&(s<=0&&!x?o(18,x=!0):s>0&&x&&o(18,x=!1)),786432&e.$$.dirty[0]&&I&&c(x?"hide":"show"),1048576&e.$$.dirty[0]&&c("fade",s),1048576&e.$$.dirty[0]&&o(6,i=s<1?"opacity: "+s:void 0),4096&e.$$.dirty[0]&&un(v,a=d,a),40960&e.$$.dirty[0]&&o(4,r={...C,...T,stores:u,locale:m})},o(5,n=!k.includes("external")),[p,g,M,R,r,n,i,$,b,v,S,P,d,u,h,m,y,f,x,I,s,l,function(e){M=e,o(2,M)},function(e){ta[e?"unshift":"push"]((()=>{p=e,o(0,p)}))},function(e){ta[e?"unshift":"push"]((()=>{R=e,o(3,R)}))}]}class Jc extends Fa{constructor(e){super(),za(this,e,Kc,qc,Qr,{isActive:12,stores:13,content:14,component:0,locale:15,class:1,opacity:16},null,[-1,-1])}get opacity(){return this.$$.ctx[16]}}function Qc(e){let t,o,i;const r=e[5].default,n=rn(r,e,e[4],null);return{c(){t=Cn("svg"),n&&n.c(),An(t,"class",e[3]),An(t,"style",e[2]),An(t,"width",e[0]),An(t,"height",e[1]),An(t,"viewBox",o="0 0 "+e[0]+"\n "+e[1]),An(t,"xmlns","http://www.w3.org/2000/svg"),An(t,"aria-hidden","true"),An(t,"focusable","false"),An(t,"stroke-linecap","round"),An(t,"stroke-linejoin","round")},m(e,o){wn(e,t,o),n&&n.m(t,null),i=!0},p(e,[a]){n&&n.p&&(!i||16&a)&&sn(n,r,e,e[4],i?an(r,e[4],a,null):ln(e[4]),null),(!i||8&a)&&An(t,"class",e[3]),(!i||4&a)&&An(t,"style",e[2]),(!i||1&a)&&An(t,"width",e[0]),(!i||2&a)&&An(t,"height",e[1]),(!i||3&a&&o!==(o="0 0 "+e[0]+"\n "+e[1]))&&An(t,"viewBox",o)},i(e){i||(xa(n,e),i=!0)},o(e){va(n,e),i=!1},d(e){e&&Sn(t),n&&n.d(e)}}}function ed(e,t,o){let{$$slots:i={},$$scope:r}=t,{width:n=24}=t,{height:a=24}=t,{style:s}=t,{class:l}=t;return e.$$set=e=>{"width"in e&&o(0,n=e.width),"height"in e&&o(1,a=e.height),"style"in e&&o(2,s=e.style),"class"in e&&o(3,l=e.class),"$$scope"in e&&o(4,r=e.$$scope)},[n,a,s,l,r,i]}class td extends Fa{constructor(e){super(),za(this,e,ed,Qc,Qr,{width:0,height:1,style:2,class:3})}}var od=(e,t)=>t===e.target||t.contains(e.target),id=(e,t,o)=>{return(R(t)?t:e)+(o?` (${i=o,i.map((e=>"CMD"===e?mo()?"⌘":"Ctrl":e)).join("+")})`:"");var i};function rd(e){let t,o;return t=new td({props:{class:"PinturaButtonIcon",$$slots:{default:[nd]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};536870920&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function nd(e){let t;return{c(){t=Cn("g")},m(o,i){wn(o,t,i),t.innerHTML=e[3]},p(e,o){8&o&&(t.innerHTML=e[3])},d(e){e&&Sn(t)}}}function ad(e){let t;return{c(){t=kn("span"),An(t,"class",e[11])},m(o,i){wn(o,t,i),t.innerHTML=e[0]},p(e,o){1&o&&(t.innerHTML=e[0]),2048&o&&An(t,"class",e[11])},d(e){e&&Sn(t)}}}function sd(e){let t,o,i,r,n;const a=e[27].default,s=rn(a,e,e[29],null),l=s||function(e){let t,o,i,r=e[3]&&rd(e),n=e[0]&&ad(e);return{c(){t=kn("span"),r&&r.c(),o=Mn(),n&&n.c(),An(t,"class",e[13])},m(e,a){wn(e,t,a),r&&r.m(t,null),bn(t,o),n&&n.m(t,null),i=!0},p(e,a){e[3]?r?(r.p(e,a),8&a&&xa(r,1)):(r=rd(e),r.c(),xa(r,1),r.m(t,o)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[0]?n?n.p(e,a):(n=ad(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null),(!i||8192&a)&&An(t,"class",e[13])},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){e&&Sn(t),r&&r.d(),n&&n.d()}}}(e);return{c(){t=kn("button"),l&&l.c(),An(t,"type",e[6]),An(t,"style",e[4]),t.disabled=e[5],An(t,"class",e[12]),An(t,"title",o=id(e[0],e[1],e[2]))},m(o,a){wn(o,t,a),l&&l.m(t,null),e[28](t),i=!0,r||(n=[Pn(t,"keydown",(function(){Jr(e[8])&&e[8].apply(this,arguments)})),Pn(t,"click",(function(){Jr(e[7])&&e[7].apply(this,arguments)})),Pn(t,"pointerdown",(function(){Jr(e[14])&&e[14].apply(this,arguments)})),hn(e[9].call(null,t))],r=!0)},p(r,[n]){e=r,s?s.p&&(!i||536870912&n)&&sn(s,a,e,e[29],i?an(a,e[29],n,null):ln(e[29]),null):l&&l.p&&(!i||10249&n)&&l.p(e,i?n:-1),(!i||64&n)&&An(t,"type",e[6]),(!i||16&n)&&An(t,"style",e[4]),(!i||32&n)&&(t.disabled=e[5]),(!i||4096&n)&&An(t,"class",e[12]),(!i||7&n&&o!==(o=id(e[0],e[1],e[2])))&&An(t,"title",o)},i(e){i||(xa(l,e),i=!0)},o(e){va(l,e),i=!1},d(o){o&&Sn(t),l&&l.d(o),e[28](null),r=!1,Kr(n)}}}function ld(e,t,o){let i,r,n,s,l,c,{$$slots:d={},$$scope:u}=t,{class:h}=t,{label:p}=t,{title:m}=t,{shortcut:g}=t,{labelClass:$}=t,{innerClass:f}=t,{hideLabel:y=!1}=t,{icon:b}=t,{style:x}=t,{disabled:v}=t,{type:w="button"}=t,{onclick:S}=t,{onkeydown:k}=t,{onhold:C}=t,{action:T=(()=>{})}=t,{holdThreshold:M=500}=t,{holdSpeedUpFactor:R=.5}=t,{holdSpeedMin:P=20}=t;const E=e=>{o(25,c=setTimeout((()=>{C(),E(Math.max(e*R,P))}),e))};let I;return e.$$set=e=>{"class"in e&&o(15,h=e.class),"label"in e&&o(0,p=e.label),"title"in e&&o(1,m=e.title),"shortcut"in e&&o(2,g=e.shortcut),"labelClass"in e&&o(16,$=e.labelClass),"innerClass"in e&&o(17,f=e.innerClass),"hideLabel"in e&&o(18,y=e.hideLabel),"icon"in e&&o(3,b=e.icon),"style"in e&&o(4,x=e.style),"disabled"in e&&o(5,v=e.disabled),"type"in e&&o(6,w=e.type),"onclick"in e&&o(7,S=e.onclick),"onkeydown"in e&&o(8,k=e.onkeydown),"onhold"in e&&o(19,C=e.onhold),"action"in e&&o(9,T=e.action),"holdThreshold"in e&&o(20,M=e.holdThreshold),"holdSpeedUpFactor"in e&&o(21,R=e.holdSpeedUpFactor),"holdSpeedMin"in e&&o(22,P=e.holdSpeedMin),"$$scope"in e&&o(29,u=e.$$scope)},e.$$.update=()=>{101187584&e.$$.dirty&&o(26,r=C?()=>{c&&(clearTimeout(c),o(25,c=void 0),document.documentElement.removeEventListener("pointerup",r))}:a),68681728&e.$$.dirty&&o(14,i=C?()=>{document.documentElement.addEventListener("pointerup",r),E(M)}:a),131072&e.$$.dirty&&o(13,n=Mc(["PinturaButtonInner",f])),294912&e.$$.dirty&&o(12,s=Mc(["PinturaButton",y&&"PinturaButtonIconOnly",h])),327680&e.$$.dirty&&o(11,l=Mc([y?"implicit":"PinturaButtonLabel",$]))},[p,m,g,b,x,v,w,S,k,T,I,l,s,n,i,h,$,f,y,C,M,R,P,e=>od(e,I),()=>I,c,r,d,function(e){ta[e?"unshift":"push"]((()=>{I=e,o(10,I)}))},u]}class cd extends Fa{constructor(e){super(),za(this,e,ld,sd,Qr,{class:15,label:0,title:1,shortcut:2,labelClass:16,innerClass:17,hideLabel:18,icon:3,style:4,disabled:5,type:6,onclick:7,onkeydown:8,onhold:19,action:9,holdThreshold:20,holdSpeedUpFactor:21,holdSpeedMin:22,isEventTarget:23,getElement:24})}get isEventTarget(){return this.$$.ctx[23]}get getElement(){return this.$$.ctx[24]}}var dd=(e,t)=>{const o=e.findIndex(t);if(o>=0)return e.splice(o,1)};const ud=80;var hd=(e,t={})=>{const{inertia:o=!1,inertiaDurationMultiplier:i=ud,shouldStartInteraction:r=(()=>!0),pinch:n=!1,multiTouch:a,getEventPosition:s=(e=>ue(e.clientX,e.clientY)),observeKeys:l=!1}=t;function c(t,o){e.dispatchEvent(new CustomEvent(t,{detail:o}))}function d(){w&&w(),w=void 0}const u=[],h=e=>0===e.timeStamp?Date.now():e.timeStamp,p=()=>{const e=pe(u[0].position);if(u[1]){const t=.5*(u[1].position.x-e.x),o=.5*(u[1].position.y-e.y);e.x+=t,e.y+=o}return e},m=e=>{e.origin.x=e.position.x,e.origin.y=e.position.y,e.translation.x=0,e.translation.y=0},g=e=>{const t=(e=>u.findIndex((t=>t.event.pointerId===e.pointerId)))(e);if(!(t<0))return u[t]},$=()=>1===u.length,f=()=>2===u.length,y=e=>{const t=Ee(e.map((e=>e.position)));return{center:t,distance:((e,t)=>e.reduce(((e,o)=>e+Re(t,o.position)),0)/e.length)(e,t),velocity:Ee(e.map((e=>e.velocity))),translation:Ee(e.map((e=>e.translation)))}};let b,x,v,w,S,k,C,T,M=0,R=void 0;e.addEventListener("pointerdown",L);const P=["Meta","Control","Alt","Shift"];function E(e){if(!P.includes(e.key))return;const{metaKey:t,ctrlKey:o,altKey:i,shiftKey:r}=e;A({metaKey:t,ctrlKey:o,altKey:i,shiftKey:r})}let I=Date.now();const A=e=>{const t=pe(u[0].translation);let o=C;if(n&&f()){o*=Re(u[0].position,u[1].position)/S,ve(t,u[1].translation)}ve(t,k);const i=Date.now();i-I<16||(I=i,c("interactionupdate",{position:p(),translation:t,scalar:n?o:void 0,isMultiTouching:f(),...e}))};function L(t){if(!f()&&!(e=>Ao(e.button)&&0!==e.button)(t)&&r(t,e))if(d(),(e=>{const t=h(e),o={timeStamp:t,timeStampInitial:t,position:s(e),origin:s(e),velocity:de(),velocityHistory:[],velocityAverage:de(),translation:de(),interactionState:void 0,event:e};u.push(o),o.interactionState=y(u)})(t),l&&(window.addEventListener("keydown",E),window.addEventListener("keyup",E)),$())document.documentElement.addEventListener("pointermove",z),document.documentElement.addEventListener("pointerup",F),document.documentElement.addEventListener("pointercancel",F),document.addEventListener("visibilitychange",O),T=!1,C=1,k=de(),S=void 0,c("interactionstart",{origin:pe(g(t).origin)});else if(n)T=!0,S=Re(u[0].position,u[1].position),k.x+=u[0].translation.x,k.y+=u[0].translation.y,m(u[0]);else if(!1===a)return u.length=0,W(),c("interactioncancel")}function z(e){e.preventDefault(),(e=>{const t=g(e);if(!t)return;const o=h(e),i=s(e),r=Math.max(1,o-t.timeStamp);t.velocity.x=(i.x-t.position.x)/r,t.velocity.y=(i.y-t.position.y)/r,t.velocityHistory.push(pe(t.velocity)),t.velocityHistory=t.velocityHistory.slice(-3),t.velocityAverage=t.velocityHistory.reduce(((e,t,o,i)=>(e.x+=t.x/i.length,e.y+=t.y/i.length,e)),de()),t.translation.x=i.x-t.origin.x,t.translation.y=i.y-t.origin.y,t.timeStamp=o,t.position.x=i.x,t.position.y=i.y,t.event=e})(e);const{metaKey:t=!1,ctrlKey:o=!1,altKey:i=!1,shiftKey:r=!1}=l?e:{};A({metaKey:t,ctrlKey:o,altKey:i,shiftKey:r})}function F(e){if(!g(e))return;const t=p(),r=(e=>{const t=dd(u,(t=>t.event.pointerId===e.pointerId));if(t)return t[0]})(e);if(n&&$()){const e=Re(u[0].position,r.position);C*=e/S,k.x+=u[0].translation.x+r.translation.x,k.y+=u[0].translation.y+r.translation.y,m(u[0])}let a=!1,s=!1;if(!T&&r){const e=performance.now(),t=e-r.timeStampInitial,o=Me(r.translation);a=o<64&&t<300,s=!!(R&&a&&e-M<700&&Me(R,r.position)<128),a&&(R=pe(r.position),M=e)}if(u.length>0)return;W();const l=pe(r.translation),d=pe(r.velocityAverage);let h=!1;c("interactionrelease",{isTap:a,isDoubleTap:s,position:t,translation:l,scalar:C,preventInertia:()=>h=!0});const f=Re(d);if(h||!o||f<.25)return B(l,{isTap:a,isDoubleTap:s});x=pe(t),v=pe(l),b=Jl(pe(l),{easing:Yl,duration:f*i}),b.set({x:l.x+50*d.x,y:l.y+50*d.y}).then((()=>{w&&B(tn(b),{isTap:a,isDoubleTap:s})})),w=b.subscribe(D)}function D(e){e&&c("interactionupdate",{position:ue(x.x+(e.x-v.x),x.y+(e.y-v.y)),translation:e,scalar:n?C:void 0})}function O(e){if("visible"===document.visibilityState||!u.length)return;const t=y(u);d(),c("interactionend",{...t}),u.length=0,W()}function B(e,t){d(),c("interactionend",{...t,translation:e,scalar:n?C:void 0})}function W(){l&&window.removeEventListener("keydown",E),l&&window.removeEventListener("keyup",E),document.documentElement.removeEventListener("pointermove",z),document.documentElement.removeEventListener("pointerup",F),document.documentElement.removeEventListener("pointercancel",F),document.addEventListener("visibilitychange",O)}return{destroy(){d(),e.removeEventListener("pointerdown",L)}}},pd=(e,t={})=>{const{direction:o,shiftMultiplier:i=10,bubbles:r=!1,preventDefault:n=!1,stopKeydownPropagation:a=!0}=t,s="horizontal"===o,l="vertical"===o,c=t=>{const{key:o}=t,c=t.shiftKey,d=/up|down/i.test(o),u=/left|right/i.test(o);if(!u&&!d)return;if(s&&d)return;if(l&&u)return;const h=c?i:1;a&&t.stopPropagation(),n&&t.preventDefault(),e.dispatchEvent(new CustomEvent("nudge",{bubbles:r,detail:ue((/left/i.test(o)?-1:/right/i.test(o)?1:0)*h,(/up/i.test(o)?-1:/down/i.test(o)?1:0)*h)}))};return e.addEventListener("keydown",c),{destroy(){e.removeEventListener("keydown",c)}}};function md(e,t){return t?t*Math.sign(e)*Math.log10(1+Math.abs(e)/t):e}const gd=(e,t,o)=>{if(!t||!o)return{...e};const i=e.x+md(t.x-e.x,o),r=e.x+e.width+md(t.x+t.width-(e.x+e.width),o),n=e.y+md(t.y-e.y,o);return{x:i,y:n,width:r-i,height:e.y+e.height+md(t.y+t.height-(e.y+e.height),o)-n}},$d=(e,t,o)=>t&&o?ue(e.x+md(t.x-e.x,o),e.y+md(t.y-e.y,o)):{...e};var fd=(e,t)=>{if(e)return/em/.test(e)?16*parseInt(e,10):/px/.test(e)?parseInt(e,10):void 0},yd=e=>{let t=e.detail||0;const{deltaX:o,deltaY:i,wheelDelta:r,wheelDeltaX:n,wheelDeltaY:a}=e;return Ao(n)&&Math.abs(n)>Math.abs(a)?t=n/-120:Ao(o)&&Math.abs(o)>Math.abs(i)?t=o/20:(r||a)&&(t=(r||a)/-120),t||(t=i/20),(qo()||Xt())&&(t*=2),t};function bd(e){let t,o,i,r,n,a,s;const l=e[36].default,c=rn(l,e,e[35],null);return{c(){t=kn("div"),o=kn("div"),c&&c.c(),An(o,"style",e[5]),An(t,"class",i=Mc(["PinturaScrollable",e[0]])),An(t,"style",e[4]),An(t,"data-direction",e[1]),An(t,"data-state",e[6])},m(i,l){wn(i,t,l),bn(t,o),c&&c.m(o,null),e[38](t),n=!0,a||(s=[Pn(o,"interactionstart",e[8]),Pn(o,"interactionupdate",e[10]),Pn(o,"interactionend",e[11]),Pn(o,"interactionrelease",e[9]),hn(hd.call(null,o,{inertia:!0})),Pn(o,"measure",e[37]),hn($c.call(null,o)),Pn(t,"wheel",e[13],{passive:!1}),Pn(t,"scroll",e[15]),Pn(t,"focusin",e[14]),Pn(t,"nudge",e[16]),Pn(t,"measure",e[12]),hn($c.call(null,t,{observePosition:!0})),hn(r=pd.call(null,t,{direction:"x"===e[1]?"horizontal":"vertical",stopKeydownPropagation:!1}))],a=!0)},p(e,a){c&&c.p&&(!n||16&a[1])&&sn(c,l,e,e[35],n?an(l,e[35],a,null):ln(e[35]),null),(!n||32&a[0])&&An(o,"style",e[5]),(!n||1&a[0]&&i!==(i=Mc(["PinturaScrollable",e[0]])))&&An(t,"class",i),(!n||16&a[0])&&An(t,"style",e[4]),(!n||2&a[0])&&An(t,"data-direction",e[1]),(!n||64&a[0])&&An(t,"data-state",e[6]),r&&Jr(r.update)&&2&a[0]&&r.update.call(null,{direction:"x"===e[1]?"horizontal":"vertical",stopKeydownPropagation:!1})},i(e){n||(xa(c,e),n=!0)},o(e){va(c,e),n=!1},d(o){o&&Sn(t),c&&c.d(o),e[38](null),a=!1,Kr(s)}}}function xd(e,t,o){let i,r,n,s,l,c,d,u,{$$slots:h={},$$scope:p}=t;const m=qn();let g,$,f,y,b="idle",x=ec(0);on(e,x,(e=>o(34,u=e)));let v,{class:w}=t,{scrollBlockInteractionDist:S=5}=t,{scrollStep:k=10}=t,{scrollFocusMargin:C=64}=t,{scrollDirection:T="x"}=t,{scrollAutoCancel:M=!1}=t,{elasticity:R=0}=t,{onscroll:P=a}=t,{maskFeatherSize:E}=t,{maskFeatherStartOpacity:I}=t,{maskFeatherEndOpacity:A}=t,{scroll:L}=t,z="",F=!0;const D=x.subscribe((e=>{const t=de();t[T]=e,P(t)})),O=e=>Math.max(Math.min(0,e),f[i]-$[i]);let B,W,_;const V=(e,t={})=>{const{elastic:i=!1,animate:r=!1,preventScrollState:n=!1}=t;Math.abs(e-g)>S&&"idle"===b&&!y&&!n&&o(27,b="scrolling");const a=O(e),s=i&&R&&!y?a+md(e-a,R):a;let l=!0;r?l=!1:F||(l=!y),F=!1,x.set(s,{hard:l}).then((e=>{y&&(F=!0)}))};Yn((()=>{D()}));return e.$$set=e=>{"class"in e&&o(0,w=e.class),"scrollBlockInteractionDist"in e&&o(20,S=e.scrollBlockInteractionDist),"scrollStep"in e&&o(21,k=e.scrollStep),"scrollFocusMargin"in e&&o(22,C=e.scrollFocusMargin),"scrollDirection"in e&&o(1,T=e.scrollDirection),"scrollAutoCancel"in e&&o(23,M=e.scrollAutoCancel),"elasticity"in e&&o(24,R=e.elasticity),"onscroll"in e&&o(25,P=e.onscroll),"maskFeatherSize"in e&&o(19,E=e.maskFeatherSize),"maskFeatherStartOpacity"in e&&o(17,I=e.maskFeatherStartOpacity),"maskFeatherEndOpacity"in e&&o(18,A=e.maskFeatherEndOpacity),"scroll"in e&&o(26,L=e.scroll),"$$scope"in e&&o(35,p=e.$$scope)},e.$$.update=()=>{if(2&e.$$.dirty[0]&&o(31,i="x"===T?"width":"height"),2&e.$$.dirty[0]&&o(29,r=T.toUpperCase()),8&e.$$.dirty[0]&&o(33,n=v&&getComputedStyle(v)),8&e.$$.dirty[0]|4&e.$$.dirty[1]&&o(32,s=n&&fd(n.getPropertyValue("--scrollable-feather-size"))),268828676&e.$$.dirty[0]|11&e.$$.dirty[1]&&null!=u&&f&&null!=s&&$){const e=-1*u/s,t=-(f[i]-$[i]-u)/s;o(17,I=ns(1-e,0,1)),o(18,A=ns(1-t,0,1)),o(19,E=s),o(4,z=`--scrollable-feather-start-opacity: ${I};--scrollable-feather-end-opacity: ${A}`)}67108872&e.$$.dirty[0]&&v&&void 0!==L&&(Ao(L)?V(L):V(L.scrollOffset,L)),268435460&e.$$.dirty[0]|1&e.$$.dirty[1]&&o(30,l=f&&$?$[i]>f[i]:void 0),1207959552&e.$$.dirty[0]&&o(6,c=Mc([b,l?"overflows":void 0])),1610612736&e.$$.dirty[0]|8&e.$$.dirty[1]&&o(5,d=l?`transform: translate${r}(${u}px)`:void 0)},[w,T,$,v,z,d,c,x,()=>{l&&(W=!1,B=!0,_=ue(0,0),y=!1,o(27,b="idle"),g=tn(x))},({detail:e})=>{l&&(y=!0,o(27,b="idle"))},({detail:e})=>{l&&(W||B&&(B=!1,Me(e.translation)<.1)||(!M||"x"!==T||(e=>{const t=xe(ue(e.x-_.x,e.y-_.y),Math.abs);_=pe(e);const o=Me(t),i=t.x-t.y;return!(o>1&&i<-.5)})(e.translation)?V(g+e.translation[T],{elastic:!0}):W=!0))},({detail:e})=>{if(!l)return;if(W)return;const t=g+e.translation[T],o=O(t);F=!1,x.set(o).then((e=>{y&&(F=!0)}))},({detail:e})=>{o(28,f=e),m("measure",{x:e.x,y:e.y,width:e.width,height:e.height})},e=>{if(!l)return;e.preventDefault(),e.stopPropagation();const t=e.shiftKey,o=yd(e)*(t?-1:1),i=tn(x);V(i+o*k,{animate:!0})},e=>{if(!l)return;if(!y)return;let t=e.target;e.target.classList.contains("implicit")&&(t=t.parentNode);const o=t["x"===T?"offsetLeft":"offsetTop"],r=o+t["x"===T?"offsetWidth":"offsetHeight"],n=tn(x),a=C+E;n+of[i]-a&&V(f[i]-r-a,{animate:!0})},()=>{o(3,v["x"===T?"scrollLeft":"scrollTop"]=0,v)},({detail:e})=>{if(v.querySelector("[data-focus-visible]"))return;const t=-2*e[T],o=tn(x);V(o+t*k,{animate:!0,preventScrollState:!0})},I,A,E,S,k,C,M,R,P,L,b,f,r,l,i,s,n,u,p,h,e=>o(2,$=e.detail),function(e){ta[e?"unshift":"push"]((()=>{v=e,o(3,v)}))}]}class vd extends Fa{constructor(e){super(),za(this,e,xd,bd,Qr,{class:0,scrollBlockInteractionDist:20,scrollStep:21,scrollFocusMargin:22,scrollDirection:1,scrollAutoCancel:23,elasticity:24,onscroll:25,maskFeatherSize:19,maskFeatherStartOpacity:17,maskFeatherEndOpacity:18,scroll:26},null,[-1,-1])}}function wd(e,{delay:t=0,duration:o=400,easing:i=Zr}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:o,easing:i,css:e=>"opacity: "+e*r}}function Sd(e){let t,o,i,r,n;return{c(){t=kn("span"),An(t,"class","PinturaStatusMessage")},m(o,a){wn(o,t,a),t.innerHTML=e[0],i=!0,r||(n=[Pn(t,"measure",(function(){Jr(e[1])&&e[1].apply(this,arguments)})),hn($c.call(null,t))],r=!0)},p(o,[r]){e=o,(!i||1&r)&&(t.innerHTML=e[0])},i(e){i||(la((()=>{o||(o=Sa(t,wd,{duration:500},!0)),o.run(1)})),i=!0)},o(e){o||(o=Sa(t,wd,{duration:500},!1)),o.run(0),i=!1},d(e){e&&Sn(t),e&&o&&o.end(),r=!1,Kr(n)}}}function kd(e,t,o){let{text:i}=t,{onmeasure:r=a}=t;return e.$$set=e=>{"text"in e&&o(0,i=e.text),"onmeasure"in e&&o(1,r=e.onmeasure)},[i,r]}class Cd extends Fa{constructor(e){super(),za(this,e,kd,Sd,Qr,{text:0,onmeasure:1})}}function Td(e){let t,o,i,r,n,a,s,l,c;return{c(){t=kn("span"),o=Cn("svg"),i=Cn("g"),r=Cn("circle"),n=Cn("circle"),a=Mn(),s=kn("span"),l=Tn(e[3]),An(r,"class","PinturaProgressIndicatorBar"),An(r,"r","8.5"),An(r,"cx","10"),An(r,"cy","10"),An(r,"stroke-linecap","round"),An(r,"opacity",".25"),An(n,"class","PinturaProgressIndicatorFill"),An(n,"r","8.5"),An(n,"stroke-dasharray",e[2]),An(n,"cx","10"),An(n,"cy","10"),An(n,"transform","rotate(-90) translate(-20)"),An(i,"fill","none"),An(i,"stroke","currentColor"),An(i,"stroke-width","2.5"),An(i,"stroke-linecap","round"),An(i,"opacity",e[1]),An(o,"width","20"),An(o,"height","20"),An(o,"viewBox","0 0 20 20"),An(o,"xmlns","http://www.w3.org/2000/svg"),An(o,"aria-hidden","true"),An(o,"focusable","false"),An(s,"class","implicit"),An(t,"class","PinturaProgressIndicator"),An(t,"data-status",e[0]),An(t,"style",c="opacity:"+e[4])},m(e,c){wn(e,t,c),bn(t,o),bn(o,i),bn(i,r),bn(i,n),bn(t,a),bn(t,s),bn(s,l)},p(e,[o]){4&o&&An(n,"stroke-dasharray",e[2]),2&o&&An(i,"opacity",e[1]),8&o&&Fn(l,e[3]),1&o&&An(t,"data-status",e[0]),16&o&&c!==(c="opacity:"+e[4])&&An(t,"style",c)},i:Gr,o:Gr,d(e){e&&Sn(t)}}}function Md(e,t,o){let i,r,n,a,s,l,c;const d=qn();let{progress:u}=t,{min:h=0}=t,{max:p=100}=t,{labelBusy:m="Busy"}=t,{opacity:g}=t;const $=ec(g,{precision:.01});on(e,$,(e=>o(4,c=e)));const f=ec(0,{precision:.01}),y=ec(0,{precision:.01});on(e,y,(e=>o(13,s=e)));const b=Wa([f],(e=>ns(e,h,p)));on(e,b,(e=>o(14,l=e)));const x=b.subscribe((e=>{1===u&&Math.round(e)>=100&&d("complete")}));return Zn((()=>{y.set(1)})),Yn((()=>{x()})),e.$$set=e=>{"progress"in e&&o(8,u=e.progress),"min"in e&&o(9,h=e.min),"max"in e&&o(10,p=e.max),"labelBusy"in e&&o(11,m=e.labelBusy),"opacity"in e&&o(12,g=e.opacity)},e.$$.update=()=>{4096&e.$$.dirty&&Ao(g)&&$.set(g),256&e.$$.dirty&&u&&u!==1/0&&f.set(100*u),18688&e.$$.dirty&&o(3,i=u===1/0?m:Math.round(l)+"%"),16640&e.$$.dirty&&o(2,r=u===1/0?"26.5 53":l/100*53+" 53"),8192&e.$$.dirty&&o(1,n=s),256&e.$$.dirty&&o(0,a=u===1/0?"busy":"loading")},[a,n,r,i,c,$,y,b,u,h,p,m,g,s,l]}class Rd extends Fa{constructor(e){super(),za(this,e,Md,Td,Qr,{progress:8,min:9,max:10,labelBusy:11,opacity:12})}}function Pd(e){let t,o,i;const r=e[5].default,n=rn(r,e,e[4],null);return{c(){t=kn("span"),n&&n.c(),An(t,"class",o="PinturaStatusAside "+e[0]),An(t,"style",e[1])},m(e,o){wn(e,t,o),n&&n.m(t,null),i=!0},p(e,[a]){n&&n.p&&(!i||16&a)&&sn(n,r,e,e[4],i?an(r,e[4],a,null):ln(e[4]),null),(!i||1&a&&o!==(o="PinturaStatusAside "+e[0]))&&An(t,"class",o),(!i||2&a)&&An(t,"style",e[1])},i(e){i||(xa(n,e),i=!0)},o(e){va(n,e),i=!1},d(e){e&&Sn(t),n&&n.d(e)}}}function Ed(e,t,o){let i,{$$slots:r={},$$scope:n}=t,{offset:a=0}=t,{opacity:s=0}=t,{class:l}=t;return e.$$set=e=>{"offset"in e&&o(2,a=e.offset),"opacity"in e&&o(3,s=e.opacity),"class"in e&&o(0,l=e.class),"$$scope"in e&&o(4,n=e.$$scope)},e.$$.update=()=>{12&e.$$.dirty&&o(1,i=`transform:translateX(${a}px);opacity:${s}`)},[l,i,a,s,n,r]}class Id extends Fa{constructor(e){super(),za(this,e,Ed,Pd,Qr,{offset:2,opacity:3,class:0})}}const{document:Ad}=ka;function Ld(e){let t,o,i,r;return{c(){t=Mn(),o=kn("button"),An(o,"class","PinturaImageButton"),An(o,"type","button"),An(o,"title",e[1]),o.disabled=e[2]},m(n,a){wn(n,t,a),wn(n,o,a),o.innerHTML=e[0],e[11](o),i||(r=[Pn(Ad.body,"load",e[5],!0),Pn(Ad.body,"error",e[6],!0),Pn(o,"pointerdown",e[4])],i=!0)},p(e,[t]){1&t&&(o.innerHTML=e[0]),2&t&&An(o,"title",e[1]),4&t&&(o.disabled=e[2])},i:Gr,o:Gr,d(n){n&&Sn(t),n&&Sn(o),e[11](null),i=!1,Kr(r)}}}function zd(e,t,o){let i,{html:r}=t,{title:n}=t,{onclick:s}=t,{disabled:l=!1}=t,{ongrab:c=a}=t,{ondrag:d=a}=t,{ondrop:u=a}=t;const h=e=>Me(p,ue(e.pageX,e.pageY))<256;let p;const m=e=>{document.documentElement.removeEventListener("pointermove",g),document.documentElement.removeEventListener("pointerup",m);const t=ue(e.pageX,e.pageY);if(Me(p,t)<32)return s(e);h(e)||u(e)},g=e=>{h(e)||d(e)},$=e=>i&&i.contains(e)&&"IMG"===e.nodeName;return e.$$set=e=>{"html"in e&&o(0,r=e.html),"title"in e&&o(1,n=e.title),"onclick"in e&&o(7,s=e.onclick),"disabled"in e&&o(2,l=e.disabled),"ongrab"in e&&o(8,c=e.ongrab),"ondrag"in e&&o(9,d=e.ondrag),"ondrop"in e&&o(10,u=e.ondrop)},e.$$.update=()=>{8&e.$$.dirty&&i&&i.querySelector("img")&&o(3,i.dataset.loader=!0,i)},[r,n,l,i,e=>{p=ue(e.pageX,e.pageY),c(e),document.documentElement.addEventListener("pointermove",g),document.documentElement.addEventListener("pointerup",m)},({target:e})=>{$(e)&&o(3,i.dataset.load=!0,i)},({target:e})=>{$(e)&&o(3,i.dataset.error=!0,i)},s,c,d,u,function(e){ta[e?"unshift":"push"]((()=>{i=e,o(3,i)}))}]}class Fd extends Fa{constructor(e){super(),za(this,e,zd,Ld,Qr,{html:0,title:1,onclick:7,disabled:2,ongrab:8,ondrag:9,ondrop:10})}}function Dd(e,t,o){const i=e.slice();return i[14]=t[o],i}function Od(e,t){let o,i,r,n,a,s,l;function c(){return t[10](t[14])}function d(...e){return t[11](t[14],...e)}function u(...e){return t[12](t[14],...e)}function h(...e){return t[13](t[14],...e)}return i=new Fd({props:{onclick:c,ongrab:d,ondrag:u,ondrop:h,disabled:t[1]||t[14].disabled,title:t[14].title,html:t[14].thumb}}),{key:e,first:null,c(){o=kn("li"),Ia(i.$$.fragment),r=Mn(),An(o,"style",t[6]),this.first=o},m(e,c){wn(e,o,c),Aa(i,o,null),bn(o,r),a=!0,s||(l=hn(n=t[8].call(null,o,t[14])),s=!0)},p(e,r){t=e;const s={};5&r&&(s.onclick=c),9&r&&(s.ongrab=d),17&r&&(s.ondrag=u),33&r&&(s.ondrop=h),3&r&&(s.disabled=t[1]||t[14].disabled),1&r&&(s.title=t[14].title),1&r&&(s.html=t[14].thumb),i.$set(s),(!a||64&r)&&An(o,"style",t[6]),n&&Jr(n.update)&&1&r&&n.update.call(null,t[14])},i(e){a||(xa(i.$$.fragment,e),a=!0)},o(e){va(i.$$.fragment,e),a=!1},d(e){e&&Sn(o),La(i),s=!1,l()}}}function Bd(e){let t,o,i=[],r=new Map,n=e[0];const a=e=>e[14].id;for(let t=0;to(9,r=e)));Zn((()=>u.set(1)));return e.$$set=e=>{"items"in e&&o(0,n=e.items),"disabled"in e&&o(1,a=e.disabled),"onclickitem"in e&&o(2,s=e.onclickitem),"ongrabitem"in e&&o(3,l=e.ongrabitem),"ondragitem"in e&&o(4,c=e.ondragitem),"ondropitem"in e&&o(5,d=e.ondropitem)},e.$$.update=()=>{512&e.$$.dirty&&o(6,i="opacity:"+r)},[n,a,s,l,c,d,i,u,(e,t)=>t.mount&&t.mount(e.firstChild,t),r,e=>s(e.id),(e,t)=>l&&l(e.id,t),(e,t)=>c&&c(e.id,t),(e,t)=>d&&d(e.id,t)]}class _d extends Fa{constructor(e){super(),za(this,e,Wd,Bd,Qr,{items:0,disabled:1,onclickitem:2,ongrabitem:3,ondragitem:4,ondropitem:5})}}var Vd=()=>u()&&window.devicePixelRatio||1;let Nd=null;var Hd=e=>(null===Nd&&(Nd=1===Vd()?Math.round:e=>e),Nd(e)),jd=(e,t={})=>{if(e){if(t.preventScroll&&Xt()){const t=document.body.scrollTop;return e.focus(),void(document.body.scrollTop=t)}e.focus(t)}},Ud=e=>/date|email|number|search|text|url/.test(e.type),Gd=e=>(e=>/textarea/i.test(e.nodeName))(e)||Ud(e)||e.isContentEditable;const Zd=e=>({}),Xd=e=>({}),Yd=e=>({}),qd=e=>({});function Kd(e){let t,o;const i=[e[7]];let r={$$slots:{default:[Qd]},$$scope:{ctx:e}};for(let e=0;e{u[s]=null})),ba(),i=u[o],i?i.p(e,a):(i=u[o]=d[o](e),i.c()),xa(i,1),i.m(r.parentNode,r)),e[6]?p?(p.p(e,a),64&a[0]&&xa(p,1)):(p=eu(e),p.c(),xa(p,1),p.m(n.parentNode,n)):p&&(ya(),va(p,1,1,(()=>{p=null})),ba())},i(e){s||(xa(i),xa(p),xa(false),s=!0)},o(e){va(i),va(p),va(false),s=!1},d(e){e&&Sn(t),u[o].d(e),e&&Sn(r),p&&p.d(e),e&&Sn(n),e&&Sn(a),l=!1,Kr(c)}}}let ou=12;function iu(e,t,o){let i,r,n,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,{$$slots:w={},$$scope:S}=t,{buttonClass:k}=t,{buttonLabel:C}=t,{buttonLabelClass:T}=t,{buttonHideLabel:M}=t,{buttonIcon:R}=t,{buttonTitle:P}=t,{panelClass:E}=t,{isActive:I=!1}=t,{onshow:A=(({panel:e})=>jd(e,{preventScroll:!0}))}=t,{onhide:L=a}=t;const z=Jn("isAnimated");on(e,z,(e=>o(41,v=e)));const F=Jn("rootPortal");on(e,F,(e=>o(36,$=e)));const D=Jn("rootRect");let O,B,W;on(e,D,(e=>o(40,x=e)));const _=()=>o(26,W=i&&i.getBoundingClientRect());let V=de(),N=ec(0);on(e,N,(e=>o(38,y=e)));let H=de();const j=Ba({x:0,y:0});on(e,j,(e=>o(37,f=e)));const U=ec(-5,{stiffness:.1,damping:.35,precision:.001});on(e,U,(e=>o(39,b=e)));const G=e=>od(e,$)||B.isEventTarget(e);let Z,X,Y=!1;const q=e=>{Gd(e.target)||(I||_(),o(30,X=e),o(0,I=!I))},K=e=>{/down/i.test(e.key)&&(o(0,I=!0),o(30,X=e))};Yn((()=>{if(!$)return;if(!Z)return;const e=Z;sa().then((()=>{e.parentNode&&e.remove()}))}));return e.$$set=e=>{"buttonClass"in e&&o(19,k=e.buttonClass),"buttonLabel"in e&&o(1,C=e.buttonLabel),"buttonLabelClass"in e&&o(20,T=e.buttonLabelClass),"buttonHideLabel"in e&&o(21,M=e.buttonHideLabel),"buttonIcon"in e&&o(22,R=e.buttonIcon),"buttonTitle"in e&&o(23,P=e.buttonTitle),"panelClass"in e&&o(2,E=e.panelClass),"isActive"in e&&o(0,I=e.isActive),"onshow"in e&&o(24,A=e.onshow),"onhide"in e&&o(25,L=e.onhide),"$$scope"in e&&o(48,S=e.$$scope)},e.$$.update=()=>{if(16&e.$$.dirty[0]&&(i=B&&B.getElement()),536870913&e.$$.dirty[0]&&o(8,m=I?e=>{Y&&(o(29,Y=!1),G(e)||o(0,I=!1))}:void 0),1&e.$$.dirty[0]|1024&e.$$.dirty[1]&&N.set(I?1:0,{hard:!1===v}),1&e.$$.dirty[0]|1024&e.$$.dirty[1]&&U.set(I?0:-5,{hard:!1===v}),256&e.$$.dirty[1]&&o(33,r=1-b/-5),1&e.$$.dirty[0]|512&e.$$.dirty[1]&&x&&I&&_(),67108873&e.$$.dirty[0]|512&e.$$.dirty[1]&&x&&O&&W&&I){let e=W.x-x.x+.5*W.width-.5*O.width,t=W.y-x.y+W.height;const i=ou,r=ou,n=x.width-ou,a=x.height-ou,s=e,l=t,c=s+O.width,d=l+O.height;if(sn&&(o(28,H.x=c-n,H),e=n-O.width),d>a){o(27,V.y=-1,V);r0),128&e.$$.dirty[1]&&o(35,s=y<1),134217728&e.$$.dirty[0]|320&e.$$.dirty[1]&&o(34,l=`translateX(${Math.round(f.x)+V.x*ou}px) translateY(${Math.round(f.y)+V.y*ou+V.y*b}px)`),152&e.$$.dirty[1]&&o(11,c=s?`opacity: ${y}; pointer-events: ${y<1?"none":"all"}; transform: ${l};`:"transform: "+l),4&e.$$.dirty[1]&&o(31,d=.5+.5*r),4&e.$$.dirty[1]&&o(32,u=r),402653192&e.$$.dirty[0]|67&e.$$.dirty[1]&&o(10,h=f&&O&&`opacity:${u};transform:scaleX(${d})rotate(45deg);top:${V.y<0?H.y+O.height:0}px;left:${H.x+.5*O.width}px`),1&e.$$.dirty[0]&&o(9,p=I?e=>{G(e)||o(29,Y=!0)}:void 0),96&e.$$.dirty[0]|32&e.$$.dirty[1]&&n&&$&&Z&&Z.parentNode!==$&&$.append(Z),1&e.$$.dirty[0]&&(I||o(30,X=void 0)),1090519137&e.$$.dirty[0]&&I&&n&&Z&&A({e:X,panel:Z}),33554497&e.$$.dirty[0]&&n&&!I&&L(),16252930&e.$$.dirty[0]&&o(7,g={label:C,icon:R,class:Mc(["PinturaPanelButton",k]),onkeydown:K,onclick:q,hideLabel:M,labelClass:T,title:P})},[I,C,E,O,B,Z,n,g,m,p,h,c,z,F,D,N,j,U,e=>{/esc/i.test(e.key)&&(o(0,I=!1),i.focus())},k,T,M,R,P,A,L,W,V,H,Y,X,d,u,r,l,s,$,f,y,b,x,v,w,function(e){ta[e?"unshift":"push"]((()=>{B=e,o(4,B)}))},function(e){ta[e?"unshift":"push"]((()=>{B=e,o(4,B)}))},function(e){ta[e?"unshift":"push"]((()=>{Z=e,o(5,Z)}))},e=>{e.stopPropagation(),o(0,I=!1)},e=>o(3,O=Fe(e.detail)),S]}class ru extends Fa{constructor(e){super(),za(this,e,iu,tu,Qr,{buttonClass:19,buttonLabel:1,buttonLabelClass:20,buttonHideLabel:21,buttonIcon:22,buttonTitle:23,panelClass:2,isActive:0,onshow:24,onhide:25},null,[-1,-1])}}var nu={Up:38,Down:40,Left:37,Right:39};function au(e){let t,o,i,r,n,a,s,l;const c=e[15].default,d=rn(c,e,e[14],null);return{c(){t=kn("li"),o=kn("input"),i=Mn(),r=kn("label"),d&&d.c(),An(o,"type","radio"),An(o,"class","implicit"),An(o,"id",e[7]),An(o,"name",e[0]),o.value=e[3],o.disabled=e[6],o.hidden=e[5],o.checked=e[4],An(r,"for",e[7]),An(r,"title",e[2]),An(t,"class",n=Mc(["PinturaRadioGroupOption",e[1]])),An(t,"data-hidden",e[5]),An(t,"data-disabled",e[6]),An(t,"data-selected",e[4])},m(n,c){wn(n,t,c),bn(t,o),bn(t,i),bn(t,r),d&&d.m(r,null),a=!0,s||(l=[Pn(o,"change",In(e[16])),Pn(o,"keydown",e[9]),Pn(o,"click",e[10])],s=!0)},p(e,[i]){(!a||128&i)&&An(o,"id",e[7]),(!a||1&i)&&An(o,"name",e[0]),(!a||8&i)&&(o.value=e[3]),(!a||64&i)&&(o.disabled=e[6]),(!a||32&i)&&(o.hidden=e[5]),(!a||16&i)&&(o.checked=e[4]),d&&d.p&&(!a||16384&i)&&sn(d,c,e,e[14],a?an(c,e[14],i,null):ln(e[14]),null),(!a||128&i)&&An(r,"for",e[7]),(!a||4&i)&&An(r,"title",e[2]),(!a||2&i&&n!==(n=Mc(["PinturaRadioGroupOption",e[1]])))&&An(t,"class",n),(!a||32&i)&&An(t,"data-hidden",e[5]),(!a||64&i)&&An(t,"data-disabled",e[6]),(!a||16&i)&&An(t,"data-selected",e[4])},i(e){a||(xa(d,e),a=!0)},o(e){va(d,e),a=!1},d(e){e&&Sn(t),d&&d.d(e),s=!1,Kr(l)}}}function su(e,t,o){let i,r,{$$slots:n={},$$scope:a}=t,{name:s}=t,{class:l}=t,{label:c}=t,{id:d}=t,{value:u}=t,{checked:h}=t,{onkeydown:p}=t,{onclick:m}=t,{hidden:g=!1}=t,{disabled:$=!1}=t;const f=Object.values(nu),y=Jn("keysPressed");on(e,y,(e=>o(17,r=e)));return e.$$set=e=>{"name"in e&&o(0,s=e.name),"class"in e&&o(1,l=e.class),"label"in e&&o(2,c=e.label),"id"in e&&o(11,d=e.id),"value"in e&&o(3,u=e.value),"checked"in e&&o(4,h=e.checked),"onkeydown"in e&&o(12,p=e.onkeydown),"onclick"in e&&o(13,m=e.onclick),"hidden"in e&&o(5,g=e.hidden),"disabled"in e&&o(6,$=e.disabled),"$$scope"in e&&o(14,a=e.$$scope)},e.$$.update=()=>{2049&e.$$.dirty&&o(7,i=`${s}-${d}`)},[s,l,c,u,h,g,$,i,y,e=>{p(e)},e=>{r.some((e=>f.includes(e)))||m(e)},d,p,m,a,n,function(t){Qn.call(this,e,t)}]}class lu extends Fa{constructor(e){super(),za(this,e,su,au,Qr,{name:0,class:1,label:2,id:11,value:3,checked:4,onkeydown:12,onclick:13,hidden:5,disabled:6})}}var cu=(e=[])=>e.reduce(((e,t)=>(Fo(t)?Fo(t[1]):!!t.options)?e.concat(Fo(t)?t[1]:t.options):(e.push(t),e)),[]);const du=(e,t,o)=>{let i;return Fo(e)?i={id:t,value:e[0],label:e[1],...e[2]||{}}:(i=e,i.id=null!=i.id?i.id:t),o?o(i):i};var uu=(e,t,o)=>P(e)?e(t,o):e;const hu=(e,t)=>e.map((([e,o,i])=>{if(Fo(o))return[uu(e,t),hu(o,t)];{const r=[e,uu(o,t)];if(i){let e={...i};i.icon&&(e.icon=uu(i.icon,t)),r.push(e)}return r}}));var pu=(e,t)=>hu(e,t),mu=(e,t)=>Array.isArray(e)&&Array.isArray(t)?ds(e,t):e===t;function gu(e,t,o){const i=e.slice();return i[27]=t[o],i}const $u=e=>({option:1024&e[0]}),fu=e=>({option:e[27]});function yu(e,t,o){const i=e.slice();return i[27]=t[o],i}const bu=e=>({option:1024&e[0]}),xu=e=>({option:e[27]}),vu=e=>({option:1024&e[0]}),wu=e=>({option:e[27]});function Su(e){let t,o,i,r,n,a=[],s=new Map,l=e[1]&&ku(e),c=e[10];const d=e=>e[27].id;for(let t=0;te[27].id;for(let t=0;t{r=null})),ba()),e[27].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=Pu(e),n.c(),n.m(o.parentNode,o))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}(e);return{c(){r&&r.c()},m(e,o){r&&r.m(e,o),t=!0},p(e,n){i?i.p&&(!t||8389632&n[0])&&sn(i,o,e,e[23],t?an(o,e[23],n,$u):ln(e[23]),fu):r&&r.p&&(!t||1088&n[0])&&r.p(e,t?n:[-1,-1])},i(e){t||(xa(r,e),t=!0)},o(e){va(r,e),t=!1},d(e){r&&r.d(e)}}}function Iu(e){let t,o;return t=new td({props:{$$slots:{default:[Au]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8389632&o[0]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Au(e){let t,o=e[27].icon+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){1024&i[0]&&o!==(o=e[27].icon+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function Lu(e){let t,o,i=e[27].label+"";return{c(){t=kn("span"),o=Tn(i),An(t,"class",e[6])},m(e,i){wn(e,t,i),bn(t,o)},p(e,r){1024&r[0]&&i!==(i=e[27].label+"")&&Fn(o,i),64&r[0]&&An(t,"class",e[6])},d(e){e&&Sn(t)}}}function zu(e){let t;const o=e[22].option,i=rn(o,e,e[23],xu),r=i||function(e){let t,o,i,r=e[27].icon&&Iu(e),n=!e[27].hideLabel&&Lu(e);return{c(){r&&r.c(),t=Mn(),n&&n.c(),o=Mn()},m(e,a){r&&r.m(e,a),wn(e,t,a),n&&n.m(e,a),wn(e,o,a),i=!0},p(e,i){e[27].icon?r?(r.p(e,i),1024&i[0]&&xa(r,1)):(r=Iu(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[27].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=Lu(e),n.c(),n.m(o.parentNode,o))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}(e);return{c(){r&&r.c()},m(e,o){r&&r.m(e,o),t=!0},p(e,n){i?i.p&&(!t||8389632&n[0])&&sn(i,o,e,e[23],t?an(o,e[23],n,bu):ln(e[23]),xu):r&&r.p&&(!t||1088&n[0])&&r.p(e,t?n:[-1,-1])},i(e){t||(xa(r,e),t=!0)},o(e){va(r,e),t=!1},d(e){r&&r.d(e)}}}function Fu(e,t){let o,i,r;return i=new lu({props:{name:t[4],label:t[27].label,id:t[27].id,value:t[27].value,disabled:t[27].disabled,hidden:t[27].hidden,class:t[8],checked:t[12](t[27])===t[0],onkeydown:t[13](t[27]),onclick:t[14](t[27]),$$slots:{default:[zu]},$$scope:{ctx:t}}}),{key:e,first:null,c(){o=Rn(),Ia(i.$$.fragment),this.first=o},m(e,t){wn(e,o,t),Aa(i,e,t),r=!0},p(e,o){t=e;const r={};16&o[0]&&(r.name=t[4]),1024&o[0]&&(r.label=t[27].label),1024&o[0]&&(r.id=t[27].id),1024&o[0]&&(r.value=t[27].value),1024&o[0]&&(r.disabled=t[27].disabled),1024&o[0]&&(r.hidden=t[27].hidden),256&o[0]&&(r.class=t[8]),1025&o[0]&&(r.checked=t[12](t[27])===t[0]),1024&o[0]&&(r.onkeydown=t[13](t[27])),1024&o[0]&&(r.onclick=t[14](t[27])),8389696&o[0]&&(r.$$scope={dirty:o,ctx:t}),i.$set(r)},i(e){r||(xa(i.$$.fragment,e),r=!0)},o(e){va(i.$$.fragment,e),r=!1},d(e){e&&Sn(o),La(i,e)}}}function Du(e,t){let o,i,r,n,a;const s=[Tu,Cu],l=[];function c(e,t){return e[27].options?0:1}return i=c(t),r=l[i]=s[i](t),{key:e,first:null,c(){o=Rn(),r.c(),n=Rn(),this.first=o},m(e,t){wn(e,o,t),l[i].m(e,t),wn(e,n,t),a=!0},p(e,o){let a=i;i=c(t=e),i===a?l[i].p(t,o):(ya(),va(l[a],1,1,(()=>{l[a]=null})),ba(),r=l[i],r?r.p(t,o):(r=l[i]=s[i](t),r.c()),xa(r,1),r.m(n.parentNode,n))},i(e){a||(xa(r),a=!0)},o(e){va(r),a=!1},d(e){e&&Sn(o),l[i].d(e),e&&Sn(n)}}}function Ou(e){let t,o,i,r=e[11].length&&Su(e);return{c(){r&&r.c(),t=Mn(),o=Rn()},m(e,n){r&&r.m(e,n),wn(e,t,n),wn(e,o,n),i=!0},p(e,o){e[11].length?r?(r.p(e,o),2048&o[0]&&xa(r,1)):(r=Su(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba())},i(e){i||(xa(r),xa(false),i=!0)},o(e){va(r),va(false),i=!1},d(e){r&&r.d(e),e&&Sn(t),e&&Sn(o)}}}function Bu(e,t,o){let i,r,n,{$$slots:a={},$$scope:s}=t;const l=qn();let{label:c}=t,{hideLabel:d=!0}=t,{class:u}=t,{name:h="radio-group-"+L()}=t,{selectedIndex:p=-1}=t,{options:m=[]}=t,{onchange:g}=t,{layout:$}=t,{optionMapper:f}=t,{optionFilter:y}=t,{value:b}=t,{optionLabelClass:x}=t,{title:v}=t,{locale:w}=t,{optionClass:S}=t,{optionGroupClass:k}=t;const C=e=>n.findIndex((t=>t.id===e.id)),T=(e,t)=>{o(0,p=C(e));const i={index:p,...e};((e,...t)=>{e&&e(...t)})(g,i,t),l("change",i)};return e.$$set=e=>{"label"in e&&o(1,c=e.label),"hideLabel"in e&&o(2,d=e.hideLabel),"class"in e&&o(3,u=e.class),"name"in e&&o(4,h=e.name),"selectedIndex"in e&&o(0,p=e.selectedIndex),"options"in e&&o(15,m=e.options),"onchange"in e&&o(16,g=e.onchange),"layout"in e&&o(5,$=e.layout),"optionMapper"in e&&o(17,f=e.optionMapper),"optionFilter"in e&&o(18,y=e.optionFilter),"value"in e&&o(19,b=e.value),"optionLabelClass"in e&&o(6,x=e.optionLabelClass),"title"in e&&o(7,v=e.title),"locale"in e&&o(20,w=e.locale),"optionClass"in e&&o(8,S=e.optionClass),"optionGroupClass"in e&&o(9,k=e.optionGroupClass),"$$scope"in e&&o(23,s=e.$$scope)},e.$$.update=()=>{1343488&e.$$.dirty[0]&&o(11,i=pu(y?m.filter(y):m,w)),133120&e.$$.dirty[0]&&o(10,r=((e=[],t)=>{let o=0;return e.map((e=>(o++,Fo(e)?Fo(e[1])?{id:o,label:e[0],options:e[1].map((e=>du(e,++o,t)))}:du(e,o,t):e.options?{id:e.id||o,label:e.label,options:e.options.map((e=>du(e,++o,t)))}:du(e,o,t))))})(i,f)),1024&e.$$.dirty[0]&&o(21,n=cu(r)),2654209&e.$$.dirty[0]&&p<0&&(o(0,p=n.findIndex((e=>mu(e.value,b)))),p<0&&o(0,p=(e=>e.findIndex((e=>void 0===e[0])))(m)))},[p,c,d,u,h,$,x,v,S,k,r,i,C,e=>t=>{var o;(o=t.key,/enter| /i.test(o))&&T(e,t)},e=>t=>{T(e,t)},m,g,f,y,b,w,n,a,s]}class Wu extends Fa{constructor(e){super(),za(this,e,Bu,Ou,Qr,{label:1,hideLabel:2,class:3,name:4,selectedIndex:0,options:15,onchange:16,layout:5,optionMapper:17,optionFilter:18,value:19,optionLabelClass:6,title:7,locale:20,optionClass:8,optionGroupClass:9},null,[-1,-1])}}function _u(e){let t,o,i,r,n,a,s,l,c,d;return{c(){t=kn("div"),o=kn("button"),i=Tn("▲"),n=Mn(),a=kn("button"),s=Tn("▼"),An(o,"type","button"),An(o,"tabindex","-1"),An(o,"aria-label",r="increase "+e[7]),An(a,"type","button"),An(a,"tabindex","-1"),An(a,"aria-label",l="decrease "+e[7]),An(t,"class","PinturaInputSpinners")},m(r,l){wn(r,t,l),bn(t,o),bn(o,i),bn(t,n),bn(t,a),bn(a,s),c||(d=[Pn(o,"click",e[17]),Pn(a,"click",e[18])],c=!0)},p(e,t){128&t&&r!==(r="increase "+e[7])&&An(o,"aria-label",r),128&t&&l!==(l="decrease "+e[7])&&An(a,"aria-label",l)},d(e){e&&Sn(t),c=!1,Kr(d)}}}function Vu(e){let t,o,i,r,n,a,s="number"===e[1]&&e[9]&&_u(e);return{c(){t=kn("div"),o=kn("input"),r=Mn(),s&&s.c(),An(o,"class","PinturaInputField"),An(o,"title",e[7]),An(o,"type",e[1]),An(o,"min",e[4]),An(o,"max",e[5]),An(o,"step",e[6]),An(o,"inputmode",e[3]),o.value=i=e[14]?e[13]:e[0],An(o,"style",e[11]),An(o,"placeholder",e[8]),An(o,"maxlength",e[12]),o.disabled=e[2],An(o,"spellcheck","false"),An(o,"autocorrect","off"),An(o,"autocapitalize","off"),An(t,"class","PinturaInput")},m(i,l){wn(i,t,l),bn(t,o),e[26](o),bn(t,r),s&&s.m(t,null),n||(a=[Pn(o,"input",e[16]),Pn(o,"blur",(function(){Jr(e[14]&&e[15])&&(e[14]&&e[15]).apply(this,arguments)})),Pn(o,"keydown",e[19]),Pn(o,"keyup",e[20])],n=!0)},p(r,[n]){e=r,128&n&&An(o,"title",e[7]),2&n&&An(o,"type",e[1]),16&n&&An(o,"min",e[4]),32&n&&An(o,"max",e[5]),64&n&&An(o,"step",e[6]),8&n&&An(o,"inputmode",e[3]),24577&n&&i!==(i=e[14]?e[13]:e[0])&&o.value!==i&&(o.value=i),2048&n&&An(o,"style",e[11]),256&n&&An(o,"placeholder",e[8]),4096&n&&An(o,"maxlength",e[12]),4&n&&(o.disabled=e[2]),"number"===e[1]&&e[9]?s?s.p(e,n):(s=_u(e),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},i:Gr,o:Gr,d(o){o&&Sn(t),e[26](null),s&&s.d(),n=!1,Kr(a)}}}function Nu(e,t,o){let i,r,n,s,l,c,d,{value:u}=t,{type:h="text"}=t,{disabled:p=!1}=t,{inputmode:m}=t,{min:g}=t,{max:$}=t,{step:f}=t,{onchange:y=a}=t,{onkeydown:b=a}=t,{title:x}=t,{stepMultiplier:v=10}=t,{placeholder:w}=t,{enableSpinButtons:S=!0}=t;const k=()=>{let e=c.value;return"number"===h&&(e="numeric"===m?parseInt(e,10):parseFloat(e),!Ao(e)||Number.isNaN(e)?e=g||0:i&&(e=ns(e,g,$))),e};let C=u;const T=()=>{const e=ns(k()+(d?f*v:f),g,$);e!==u&&(o(24,C=e),o(0,u=e),y(u))},M=()=>{const e=ns(k()-(d?f*v:f),g,$);e!==u&&(o(24,C=e),o(0,u=e),y(u))};return e.$$set=e=>{"value"in e&&o(0,u=e.value),"type"in e&&o(1,h=e.type),"disabled"in e&&o(2,p=e.disabled),"inputmode"in e&&o(3,m=e.inputmode),"min"in e&&o(4,g=e.min),"max"in e&&o(5,$=e.max),"step"in e&&o(6,f=e.step),"onchange"in e&&o(21,y=e.onchange),"onkeydown"in e&&o(22,b=e.onkeydown),"title"in e&&o(7,x=e.title),"stepMultiplier"in e&&o(23,v=e.stepMultiplier),"placeholder"in e&&o(8,w=e.placeholder),"enableSpinButtons"in e&&o(9,S=e.enableSpinButtons)},e.$$.update=()=>{48&e.$$.dirty&&o(14,i=Ao(g)&&Ao($)),16778241&e.$$.dirty&&o(13,r=c===document.activeElement?C:u),32&e.$$.dirty&&o(25,n=$?($+"").length:void 0),33554440&e.$$.dirty&&o(12,s="numeric"===m&&n?n:void 0),33554432&e.$$.dirty&&o(11,l=n?`min-width:${n}em`:void 0)},[u,h,p,m,g,$,f,x,w,S,c,l,s,r,i,()=>{o(24,C=k()),y(u)},()=>{o(24,C=c.value),y(k())},T,M,e=>{d=e.shiftKey,b(e);const{key:t}=e;/up|down/i.test(t)&&(/up/i.test(t)&&T(),/down/i.test(t)&&M(),e.preventDefault(),e.stopPropagation())},e=>{const{key:t}=e;/up|down/i.test(t)&&(e.preventDefault(),e.stopPropagation())},y,b,v,C,n,function(e){ta[e?"unshift":"push"]((()=>{c=e,o(10,c)}))}]}class Hu extends Fa{constructor(e){super(),za(this,e,Nu,Vu,Qr,{value:0,type:1,disabled:2,inputmode:3,min:4,max:5,step:6,onchange:21,onkeydown:22,title:7,stepMultiplier:23,placeholder:8,enableSpinButtons:9})}}const ju=e=>({}),Uu=e=>({});function Gu(e){let t,o,i,r,n=(e[2]||e[21])+"",a=e[6]&&Xu(e);return{c(){a&&a.c(),t=Mn(),o=kn("span"),An(o,"class",i=Mc(["PinturaButtonLabel",e[3],e[5]&&"implicit"]))},m(e,i){a&&a.m(e,i),wn(e,t,i),wn(e,o,i),o.innerHTML=n,r=!0},p(e,s){e[6]?a?(a.p(e,s),64&s[0]&&xa(a,1)):(a=Xu(e),a.c(),xa(a,1),a.m(t.parentNode,t)):a&&(ya(),va(a,1,1,(()=>{a=null})),ba()),(!r||2097156&s[0])&&n!==(n=(e[2]||e[21])+"")&&(o.innerHTML=n),(!r||40&s[0]&&i!==(i=Mc(["PinturaButtonLabel",e[3],e[5]&&"implicit"])))&&An(o,"class",i)},i(e){r||(xa(a),r=!0)},o(e){va(a),r=!1},d(e){a&&a.d(e),e&&Sn(t),e&&Sn(o)}}}function Zu(e){let t,o;return t=new Hu({props:{value:e[10],onchange:e[17],type:"number",inputmode:"numeric",min:e[8].reduce(nh,1/0),max:e[8].reduce(ah,-1/0),enableSpinButtons:!1}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1024&o[0]&&(i.value=e[10]),131072&o[0]&&(i.onchange=e[17]),256&o[0]&&(i.min=e[8].reduce(nh,1/0)),256&o[0]&&(i.max=e[8].reduce(ah,-1/0)),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Xu(e){let t,o;return t=new td({props:{class:"PinturaButtonIcon",$$slots:{default:[Yu]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};536870976&o[0]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Yu(e){let t;return{c(){t=Cn("g")},m(o,i){wn(o,t,i),t.innerHTML=e[6]},p(e,o){64&o[0]&&(t.innerHTML=e[6])},d(e){e&&Sn(t)}}}function qu(e){let t,o,i,r,n,a;const s=[Zu,Gu],l=[];function c(e,t){return e[18]?0:1}return o=c(e),i=l[o]=s[o](e),{c(){t=kn("span"),i.c(),An(t,"slot","label"),An(t,"title",r=uu(e[1],e[16])),An(t,"class",n=Mc(["PinturaButtonInner",e[18]&&"PinturaComboBox",e[4]]))},m(e,i){wn(e,t,i),l[o].m(t,null),a=!0},p(e,d){let u=o;o=c(e),o===u?l[o].p(e,d):(ya(),va(l[u],1,1,(()=>{l[u]=null})),ba(),i=l[o],i?i.p(e,d):(i=l[o]=s[o](e),i.c()),xa(i,1),i.m(t,null)),(!a||65538&d[0]&&r!==(r=uu(e[1],e[16])))&&An(t,"title",r),(!a||262160&d[0]&&n!==(n=Mc(["PinturaButtonInner",e[18]&&"PinturaComboBox",e[4]])))&&An(t,"class",n)},i(e){a||(xa(i),a=!0)},o(e){va(i),a=!1},d(e){e&&Sn(t),l[o].d()}}}function Ku(e){let t,o,i=e[31].label+"";return{c(){t=kn("span"),o=Tn(i),An(t,"slot","group")},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){1&t[1]&&i!==(i=e[31].label+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Ju(e){let t,o;return t=new td({props:{style:P(e[14])?e[14](e[31].value):e[14],$$slots:{default:[Qu]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16384&o[0]|1&o[1]&&(i.style=P(e[14])?e[14](e[31].value):e[14]),536870912&o[0]|1&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Qu(e){let t,o=e[31].icon+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){1&i[1]&&o!==(o=e[31].icon+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function eh(e){let t,o,i,r,n,a=e[31].label+"",s=e[31].sublabel&&th(e);return{c(){t=kn("span"),o=new Bn(!1),i=Mn(),s&&s.c(),o.a=i,An(t,"style",r=P(e[15])?e[15](e[31].value):e[15]),An(t,"class",n=Mc(["PinturaDropdownOptionLabel",e[11]]))},m(e,r){wn(e,t,r),o.m(a,t),bn(t,i),s&&s.m(t,null)},p(e,i){1&i[1]&&a!==(a=e[31].label+"")&&o.p(a),e[31].sublabel?s?s.p(e,i):(s=th(e),s.c(),s.m(t,null)):s&&(s.d(1),s=null),32768&i[0]|1&i[1]&&r!==(r=P(e[15])?e[15](e[31].value):e[15])&&An(t,"style",r),2048&i[0]&&n!==(n=Mc(["PinturaDropdownOptionLabel",e[11]]))&&An(t,"class",n)},d(e){e&&Sn(t),s&&s.d()}}}function th(e){let t,o=e[31].sublabel+"";return{c(){t=kn("span"),An(t,"class","PinturaDropdownOptionSublabel")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){1&i[1]&&o!==(o=e[31].sublabel+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function oh(e){let t,o,i,r=e[31].icon&&Ju(e),n=!e[31].hideLabel&&eh(e);return{c(){t=kn("span"),r&&r.c(),o=Mn(),n&&n.c(),An(t,"slot","option")},m(e,a){wn(e,t,a),r&&r.m(t,null),bn(t,o),n&&n.m(t,null),i=!0},p(e,i){e[31].icon?r?(r.p(e,i),1&i[1]&&xa(r,1)):(r=Ju(e),r.c(),xa(r,1),r.m(t,o)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[31].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=eh(e),n.c(),n.m(t,null))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){e&&Sn(t),r&&r.d(),n&&n.d()}}}function ih(e){let t,o,i,r,n,a;const s=e[27].controls,l=rn(s,e,e[29],Uu);return i=new Wu({props:{class:"PinturaOptionsList PinturaScrollableContent",name:e[7],value:e[10],selectedIndex:e[9],optionFilter:e[12],optionMapper:e[13],optionLabelClass:Mc(["PinturaDropdownOptionLabel",e[11]]),optionGroupClass:"PinturaListOptionGroup",optionClass:"PinturaListOption",options:e[19],onchange:e[22],$$slots:{option:[oh,({option:e})=>({31:e}),({option:e})=>[0,e?1:0]],group:[Ku,({option:e})=>({31:e}),({option:e})=>[0,e?1:0]]},$$scope:{ctx:e}}}),{c(){t=kn("div"),l&&l.c(),o=Mn(),Ia(i.$$.fragment),An(t,"slot","details"),An(t,"class","PinturaOptionsListWrapper")},m(s,c){wn(s,t,c),l&&l.m(t,null),bn(t,o),Aa(i,t,null),r=!0,n||(a=Pn(t,"keydown",e[24]),n=!0)},p(e,t){l&&l.p&&(!r||536870912&t[0])&&sn(l,s,e,e[29],r?an(s,e[29],t,ju):ln(e[29]),Uu);const o={};128&t[0]&&(o.name=e[7]),1024&t[0]&&(o.value=e[10]),512&t[0]&&(o.selectedIndex=e[9]),4096&t[0]&&(o.optionFilter=e[12]),8192&t[0]&&(o.optionMapper=e[13]),2048&t[0]&&(o.optionLabelClass=Mc(["PinturaDropdownOptionLabel",e[11]])),524288&t[0]&&(o.options=e[19]),536922112&t[0]|1&t[1]&&(o.$$scope={dirty:t,ctx:e}),i.$set(o)},i(e){r||(xa(l,e),xa(i.$$.fragment,e),r=!0)},o(e){va(l,e),va(i.$$.fragment,e),r=!1},d(e){e&&Sn(t),l&&l.d(e),La(i),n=!1,a()}}}function rh(e){let t,o,i;function r(t){e[28](t)}let n={onshow:e[23],buttonClass:Mc(["PinturaDropdownButton",e[0],e[5]&&"PinturaDropdownIconOnly"]),$$slots:{details:[ih],label:[qu]},$$scope:{ctx:e}};return void 0!==e[20]&&(n.isActive=e[20]),t=new ru({props:n}),ta.push((()=>Ea(t,"isActive",r))),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};33&i[0]&&(r.buttonClass=Mc(["PinturaDropdownButton",e[0],e[5]&&"PinturaDropdownIconOnly"])),540016638&i[0]&&(r.$$scope={dirty:i,ctx:e}),!o&&1048576&i[0]&&(o=!0,r.isActive=e[20],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}const nh=(e,[t])=>tt>e?t:e;function sh(e,t,o){let i,r,{$$slots:n={},$$scope:s}=t,{class:l}=t,{title:c}=t,{label:d}=t,{labelClass:u}=t,{innerClass:h}=t,{hideLabel:p=!1}=t,{icon:m}=t,{name:g}=t,{options:$=[]}=t,{selectedIndex:f=-1}=t,{value:y}=t,{optionLabelClass:b}=t,{optionFilter:x}=t,{optionMapper:v}=t,{optionIconStyle:w}=t,{optionLabelStyle:S}=t,{locale:k}=t,{onchange:C=a}=t,{onload:T=a}=t,{ondestroy:M=a}=t,{enableInput:R=!1}=t;let P;return Zn((()=>T({options:$}))),Yn((()=>M({options:$}))),e.$$set=e=>{"class"in e&&o(0,l=e.class),"title"in e&&o(1,c=e.title),"label"in e&&o(2,d=e.label),"labelClass"in e&&o(3,u=e.labelClass),"innerClass"in e&&o(4,h=e.innerClass),"hideLabel"in e&&o(5,p=e.hideLabel),"icon"in e&&o(6,m=e.icon),"name"in e&&o(7,g=e.name),"options"in e&&o(8,$=e.options),"selectedIndex"in e&&o(9,f=e.selectedIndex),"value"in e&&o(10,y=e.value),"optionLabelClass"in e&&o(11,b=e.optionLabelClass),"optionFilter"in e&&o(12,x=e.optionFilter),"optionMapper"in e&&o(13,v=e.optionMapper),"optionIconStyle"in e&&o(14,w=e.optionIconStyle),"optionLabelStyle"in e&&o(15,S=e.optionLabelStyle),"locale"in e&&o(16,k=e.locale),"onchange"in e&&o(17,C=e.onchange),"onload"in e&&o(25,T=e.onload),"ondestroy"in e&&o(26,M=e.ondestroy),"enableInput"in e&&o(18,R=e.enableInput),"$$scope"in e&&o(29,s=e.$$scope)},e.$$.update=()=>{65792&e.$$.dirty[0]&&o(19,i=k?pu($,k):$),525312&e.$$.dirty[0]&&o(21,r=i.reduce(((e,t)=>{if(e)return e;const o=Array.isArray(t)?t:[t,t],[i,r]=o;return mu(i,y)?r:void 0}),void 0)||(e=>{const t=e.find((e=>void 0===e[0]));if(t)return t[1]})(i)||y)},[l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,R,i,P,r,e=>{o(21,r=e.value),C(e),o(20,P=!1)},({e:e,panel:t})=>{if(e&&e.key&&/up|down/i.test(e.key))return jd(t.querySelector("input:not([disabled])"));jd(t.querySelector("fieldset"))},e=>{/tab/i.test(e.key)&&e.preventDefault()},T,M,n,function(e){P=e,o(20,P)},s]}class lh extends Fa{constructor(e){super(),za(this,e,sh,rh,Qr,{class:0,title:1,label:2,labelClass:3,innerClass:4,hideLabel:5,icon:6,name:7,options:8,selectedIndex:9,value:10,optionLabelClass:11,optionFilter:12,optionMapper:13,optionIconStyle:14,optionLabelStyle:15,locale:16,onchange:17,onload:25,ondestroy:26,enableInput:18},null,[-1,-1])}}function ch(e){let t;return{c(){t=kn("div"),An(t,"slot","details")},m(o,i){wn(o,t,i),e[14](t)},p:Gr,d(o){o&&Sn(t),e[14](null)}}}function dh(e){let t,o,i;function r(t){e[15](t)}let n={buttonLabel:e[0],buttonClass:e[1],buttonIcon:e[2],buttonHideLabel:e[3],buttonTitle:e[4],buttonLabelClass:e[5],onshow:e[6],onhide:e[7],$$slots:{details:[ch]},$$scope:{ctx:e}};return void 0!==e[9]&&(n.isActive=e[9]),t=new ru({props:n}),ta.push((()=>Ea(t,"isActive",r))),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,[i]){const r={};1&i&&(r.buttonLabel=e[0]),2&i&&(r.buttonClass=e[1]),4&i&&(r.buttonIcon=e[2]),8&i&&(r.buttonHideLabel=e[3]),16&i&&(r.buttonTitle=e[4]),32&i&&(r.buttonLabelClass=e[5]),64&i&&(r.onshow=e[6]),128&i&&(r.onhide=e[7]),65792&i&&(r.$$scope={dirty:i,ctx:e}),!o&&512&i&&(o=!0,r.isActive=e[9],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function uh(e,t,o){let{buttonLabel:i}=t,{buttonClass:r}=t,{buttonIcon:n}=t,{buttonHideLabel:s}=t,{buttonTitle:l}=t,{buttonLabelClass:c}=t,{root:d}=t,{ondestroy:u=a}=t,{onshow:h=a}=t,{onhide:p=a}=t;let m,g=!1;return Yn(u),e.$$set=e=>{"buttonLabel"in e&&o(0,i=e.buttonLabel),"buttonClass"in e&&o(1,r=e.buttonClass),"buttonIcon"in e&&o(2,n=e.buttonIcon),"buttonHideLabel"in e&&o(3,s=e.buttonHideLabel),"buttonTitle"in e&&o(4,l=e.buttonTitle),"buttonLabelClass"in e&&o(5,c=e.buttonLabelClass),"root"in e&&o(10,d=e.root),"ondestroy"in e&&o(11,u=e.ondestroy),"onshow"in e&&o(6,h=e.onshow),"onhide"in e&&o(7,p=e.onhide)},e.$$.update=()=>{1280&e.$$.dirty&&m&&d&&m.firstChild!==d&&(m.hasChildNodes()?m.replaceChild(d,m.firstChild):m.append(d))},[i,r,n,s,l,c,h,p,m,g,d,u,()=>o(9,g=!1),()=>o(9,g=!0),function(e){ta[e?"unshift":"push"]((()=>{m=e,o(8,m)}))},function(e){g=e,o(9,g)}]}class hh extends Fa{constructor(e){super(),za(this,e,uh,dh,Qr,{buttonLabel:0,buttonClass:1,buttonIcon:2,buttonHideLabel:3,buttonTitle:4,buttonLabelClass:5,root:10,ondestroy:11,onshow:6,onhide:7,hide:12,show:13})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}}var ph=(e,t,o)=>(e-t)/(o-t);const mh=e=>({}),gh=e=>({});function $h(e){let t,o,i,r,n,a,s,l;return o=new td({props:{$$slots:{default:[fh]},$$scope:{ctx:e}}}),n=new td({props:{$$slots:{default:[yh]},$$scope:{ctx:e}}}),{c(){t=kn("button"),Ia(o.$$.fragment),i=Mn(),r=kn("button"),Ia(n.$$.fragment),An(t,"type","button"),An(t,"aria-label","Increase"),An(r,"type","button"),An(r,"aria-label","Decrease")},m(c,d){wn(c,t,d),Aa(o,t,null),wn(c,i,d),wn(c,r,d),Aa(n,r,null),a=!0,s||(l=[Pn(t,"pointerdown",e[20](1)),Pn(r,"pointerdown",e[20](-1))],s=!0)},p(e,t){const i={};128&t[1]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i);const r={};128&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){a||(xa(o.$$.fragment,e),xa(n.$$.fragment,e),a=!0)},o(e){va(o.$$.fragment,e),va(n.$$.fragment,e),a=!1},d(e){e&&Sn(t),La(o),e&&Sn(i),e&&Sn(r),La(n),s=!1,Kr(l)}}}function fh(e){let t;return{c(){t=Cn("path"),An(t,"d","M8 12 h8 M12 8 v8")},m(e,o){wn(e,t,o)},p:Gr,d(e){e&&Sn(t)}}}function yh(e){let t;return{c(){t=Cn("path"),An(t,"d","M9 12 h6")},m(e,o){wn(e,t,o)},p:Gr,d(e){e&&Sn(t)}}}function bh(e){let t,o,i,r,n,a,s,l,c,d,u,h,p,m,g,$,f;const y=e[36].default,b=rn(y,e,e[38],null),x=e[36].knob,v=rn(x,e,e[38],gh);let w=e[9]&&$h(e);return{c(){t=kn("div"),o=kn("div"),i=kn("input"),n=Mn(),a=kn("div"),b&&b.c(),l=Mn(),c=kn("div"),d=kn("div"),v&&v.c(),p=Mn(),w&&w.c(),An(i,"type","range"),An(i,"id",e[3]),An(i,"min",e[0]),An(i,"max",e[1]),An(i,"step",e[2]),i.value=e[14],An(i,"style",r=e[10]?"pointer-events:none":""),An(a,"class",s=Mc(["PinturaSliderTrack",e[5]])),An(a,"style",e[4]),An(d,"class",u=Mc(["PinturaSliderKnob",e[7]])),An(d,"style",e[6]),An(c,"class","PinturaSliderKnobController"),An(c,"style",e[17]),An(o,"class","PinturaSliderControl"),An(o,"style",h="--slider-position:"+Math.round(e[15])),An(t,"class",m=Mc(["PinturaSlider",e[12]])),An(t,"data-direction",e[8])},m(r,s){wn(r,t,s),bn(t,o),bn(o,i),e[37](i),bn(o,n),bn(o,a),b&&b.m(a,null),bn(o,l),bn(o,c),bn(c,d),v&&v.m(d,null),bn(t,p),w&&w.m(t,null),g=!0,$||(f=[Pn(i,"input",e[18]),Pn(i,"nudge",e[19]),hn(pd.call(null,i)),Pn(o,"pointerdown",(function(){Jr(e[11]&&e[13])&&(e[11]&&e[13]).apply(this,arguments)}))],$=!0)},p(n,l){e=n,(!g||8&l[0])&&An(i,"id",e[3]),(!g||1&l[0])&&An(i,"min",e[0]),(!g||2&l[0])&&An(i,"max",e[1]),(!g||4&l[0])&&An(i,"step",e[2]),(!g||16384&l[0])&&(i.value=e[14]),(!g||1024&l[0]&&r!==(r=e[10]?"pointer-events:none":""))&&An(i,"style",r),b&&b.p&&(!g||128&l[1])&&sn(b,y,e,e[38],g?an(y,e[38],l,null):ln(e[38]),null),(!g||32&l[0]&&s!==(s=Mc(["PinturaSliderTrack",e[5]])))&&An(a,"class",s),(!g||16&l[0])&&An(a,"style",e[4]),v&&v.p&&(!g||128&l[1])&&sn(v,x,e,e[38],g?an(x,e[38],l,mh):ln(e[38]),gh),(!g||128&l[0]&&u!==(u=Mc(["PinturaSliderKnob",e[7]])))&&An(d,"class",u),(!g||64&l[0])&&An(d,"style",e[6]),(!g||131072&l[0])&&An(c,"style",e[17]),(!g||32768&l[0]&&h!==(h="--slider-position:"+Math.round(e[15])))&&An(o,"style",h),e[9]?w?(w.p(e,l),512&l[0]&&xa(w,1)):(w=$h(e),w.c(),xa(w,1),w.m(t,null)):w&&(ya(),va(w,1,1,(()=>{w=null})),ba()),(!g||4096&l[0]&&m!==(m=Mc(["PinturaSlider",e[12]])))&&An(t,"class",m),(!g||256&l[0])&&An(t,"data-direction",e[8])},i(e){g||(xa(b,e),xa(v,e),xa(w),g=!0)},o(e){va(b,e),va(v,e),va(w),g=!1},d(o){o&&Sn(t),e[37](null),b&&b.d(o),v&&v.d(o),w&&w.d(),$=!1,Kr(f)}}}function xh(e,t,o){let i,r,n,s,l,c,d,u,h,p,m,g,$,f,y,{$$slots:b={},$$scope:x}=t,{min:v=0}=t,{max:w=100}=t,{step:S=1}=t,{id:k}=t,{value:C=0}=t,{valueMin:T}=t,{valueMax:M}=t,{trackStyle:P}=t,{trackClass:E}=t,{knobStyle:I}=t,{knobClass:A}=t,{ongrab:L=a}=t,{onchange:z=a}=t,{onrelease:F=a}=t,{onexceed:D=a}=t,{direction:O="x"}=t,{getValue:B=G}=t,{setValue:W=G}=t,{enableSpinButtons:_=!0}=t,{enableForceUseKnob:V=!1}=t,{enableStopPropagation:N=!0}=t,{enablePointerdownListener:H=!0}=t,{maxInteractionDistance:j=6}=t,{class:U}=t;const Z=e=>W(((e,t)=>(t=1/t,Math.round(e*t)/t))(ns(e,v,w),S),C),X=(e,t,i={})=>{const{grabbed:n=!1,released:a=!1}=i,s=Z(v+e/t*r),l=T||v,c=M||w;o(21,C=R(s)?s:ns(s,l,c)),y!==s&&(y=s,!R(s)&&(sc)&&D(C,s),C!==f&&(f=C,n&&L(C),z(C),a&&F(C)))};let Y;const q=e=>{const t=e[u]-$;X(g+t,m)},K=e=>{m=void 0,document.documentElement.removeEventListener("pointermove",q),document.documentElement.removeEventListener("pointerup",K),z(C),F(C)},J=()=>{o(21,C=Z(i+ee*S)),z(C)};let Q,ee=1,te=!1;const oe=e=>{clearTimeout(Q),te||J(),F(C),document.removeEventListener("pointerup",oe)};return e.$$set=e=>{"min"in e&&o(0,v=e.min),"max"in e&&o(1,w=e.max),"step"in e&&o(2,S=e.step),"id"in e&&o(3,k=e.id),"value"in e&&o(21,C=e.value),"valueMin"in e&&o(22,T=e.valueMin),"valueMax"in e&&o(23,M=e.valueMax),"trackStyle"in e&&o(4,P=e.trackStyle),"trackClass"in e&&o(5,E=e.trackClass),"knobStyle"in e&&o(6,I=e.knobStyle),"knobClass"in e&&o(7,A=e.knobClass),"ongrab"in e&&o(24,L=e.ongrab),"onchange"in e&&o(25,z=e.onchange),"onrelease"in e&&o(26,F=e.onrelease),"onexceed"in e&&o(27,D=e.onexceed),"direction"in e&&o(8,O=e.direction),"getValue"in e&&o(28,B=e.getValue),"setValue"in e&&o(29,W=e.setValue),"enableSpinButtons"in e&&o(9,_=e.enableSpinButtons),"enableForceUseKnob"in e&&o(10,V=e.enableForceUseKnob),"enableStopPropagation"in e&&o(30,N=e.enableStopPropagation),"enablePointerdownListener"in e&&o(11,H=e.enablePointerdownListener),"maxInteractionDistance"in e&&o(31,j=e.maxInteractionDistance),"class"in e&&o(12,U=e.class),"$$scope"in e&&o(38,x=e.$$scope)},e.$$.update=()=>{270532608&e.$$.dirty[0]&&o(14,i=void 0!==C?B(C):0),3&e.$$.dirty[0]&&(r=w-v),16387&e.$$.dirty[0]&&o(33,n=ph(i,v,w)),4&e.$$.dirty[1]&&o(15,s=100*n),256&e.$$.dirty[0]&&o(34,l=O.toUpperCase()),256&e.$$.dirty[0]&&o(35,c="x"===O?"Width":"Height"),16&e.$$.dirty[1]&&(d="offset"+c),e.$$.dirty[1],8&e.$$.dirty[1]&&(u="page"+l),32768&e.$$.dirty[0]|8&e.$$.dirty[1]&&o(17,h=`transform: translate${l}(${s}%)`)},[v,w,S,k,P,E,I,A,O,_,V,H,U,e=>{let t=!1;N&&e.stopPropagation(),clearTimeout(Y);const o=p.getBoundingClientRect();if(m=p[d],$=e[u],g=$-o[O],V){if(Math.abs(g-n*m)>j)return;t=!0,e.stopPropagation()}return document.activeElement!==p&&p.focus(),X(g,m,{grabbed:!0}),document.documentElement.addEventListener("pointermove",q),document.documentElement.addEventListener("pointerup",K),t},i,s,p,h,e=>{m||(o(21,C=W(parseFloat(e.target.value))),C!==f&&(f=C,z(C)))},e=>{const t=p[d];X(i/r*t+e.detail[O],t),clearTimeout(Y),Y=setTimeout((()=>{F(C)}),250)},e=>t=>{clearTimeout(Y),ee=e,te=!1,Q=setInterval((()=>{te=!0,J()}),100),document.addEventListener("pointercancel",oe),document.addEventListener("pointerup",oe)},C,T,M,L,z,F,D,B,W,N,j,e=>{const t=p.getBoundingClientRect(),o=e[u]-t[O],i=p[d];return Math.abs(o-n*i)},n,l,c,b,function(e){ta[e?"unshift":"push"]((()=>{p=e,o(16,p)}))},x]}class vh extends Fa{constructor(e){super(),za(this,e,xh,bh,Qr,{min:0,max:1,step:2,id:3,value:21,valueMin:22,valueMax:23,trackStyle:4,trackClass:5,knobStyle:6,knobClass:7,ongrab:24,onchange:25,onrelease:26,onexceed:27,direction:8,getValue:28,setValue:29,enableSpinButtons:9,enableForceUseKnob:10,enableStopPropagation:30,enablePointerdownListener:11,maxInteractionDistance:31,class:12,eventDistanceToKnob:32,handlePointerDown:13},null,[-1,-1])}get eventDistanceToKnob(){return this.$$.ctx[32]}get handlePointerDown(){return this.$$.ctx[13]}}function wh(e){let t,o;return t=new td({props:{class:"PinturaButtonIcon",$$slots:{default:[Sh]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1048580&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Sh(e){let t;return{c(){t=Cn("g")},m(o,i){wn(o,t,i),t.innerHTML=e[2]},p(e,o){4&o&&(t.innerHTML=e[2])},d(e){e&&Sn(t)}}}function kh(e){let t,o,i=uu(e[8],e[6])+"";return{c(){t=kn("span"),o=Tn(i),An(t,"class","PinturaButtonLabelPrefix")},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){320&t&&i!==(i=uu(e[8],e[6])+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Ch(e){let t,o,i,r,n,a,s,l,c,d=e[2]&&wh(e),u=e[8]&&kh(e);return{c(){t=kn("span"),d&&d.c(),o=Mn(),u&&u.c(),i=Mn(),r=kn("span"),n=Tn(e[9]),An(r,"class",a=Mc(["PinturaButtonLabel",e[3],e[5]&&"implicit"])),An(t,"slot","label"),An(t,"title",s=uu(e[1],e[6])),An(t,"class",l=Mc(["PinturaButtonInner",e[4]]))},m(e,a){wn(e,t,a),d&&d.m(t,null),bn(t,o),u&&u.m(t,null),bn(t,i),bn(t,r),bn(r,n),c=!0},p(e,h){e[2]?d?(d.p(e,h),4&h&&xa(d,1)):(d=wh(e),d.c(),xa(d,1),d.m(t,o)):d&&(ya(),va(d,1,1,(()=>{d=null})),ba()),e[8]?u?u.p(e,h):(u=kh(e),u.c(),u.m(t,i)):u&&(u.d(1),u=null),(!c||512&h)&&Fn(n,e[9]),(!c||40&h&&a!==(a=Mc(["PinturaButtonLabel",e[3],e[5]&&"implicit"])))&&An(r,"class",a),(!c||66&h&&s!==(s=uu(e[1],e[6])))&&An(t,"title",s),(!c||16&h&&l!==(l=Mc(["PinturaButtonInner",e[4]])))&&An(t,"class",l)},i(e){c||(xa(d),c=!0)},o(e){va(d),c=!1},d(e){e&&Sn(t),d&&d.d(),u&&u.d()}}}function Th(e){let t,o,i,r,n;const a=[e[12],{value:e[7]},{onchange:e[11]}];let s={};for(let e=0;eo(9,x=(e=>P(l)?l(b(e),f,y,e):l)(e));return e.$$set=e=>{t=Xr(Xr({},t),cn(e)),o(12,r=dn(t,i)),"class"in e&&o(0,n=e.class),"title"in e&&o(1,s=e.title),"label"in e&&o(13,l=e.label),"icon"in e&&o(2,c=e.icon),"labelClass"in e&&o(3,d=e.labelClass),"innerClass"in e&&o(4,u=e.innerClass),"hideLabel"in e&&o(5,h=e.hideLabel),"locale"in e&&o(6,p=e.locale),"value"in e&&o(7,m=e.value),"onchange"in e&&o(14,g=e.onchange),"labelPrefix"in e&&o(8,$=e.labelPrefix)},e.$$.update=()=>{8320&e.$$.dirty&&v(m)},[n,s,c,d,u,h,p,m,$,x,e=>{/tab/i.test(e.key)&&e.preventDefault()},e=>{v(e),g(e)},r,l,g]}class Ph extends Fa{constructor(e){super(),za(this,e,Rh,Mh,Qr,{class:0,title:1,label:13,icon:2,labelClass:3,innerClass:4,hideLabel:5,locale:6,value:7,onchange:14,labelPrefix:8})}}function Eh(e){let t,o,i=uu(e[0],e[1])+"";return{c(){t=kn("span"),o=Tn(i),An(t,"class",e[3])},m(e,i){wn(e,t,i),bn(t,o)},p(e,r){3&r&&i!==(i=uu(e[0],e[1])+"")&&Fn(o,i),8&r&&An(t,"class",e[3])},d(e){e&&Sn(t)}}}function Ih(e){let t,o,i,r,n=e[0]&&Eh(e);return i=new up({props:{items:e[2]}}),{c(){t=kn("li"),n&&n.c(),o=Mn(),Ia(i.$$.fragment),An(t,"class","PinturaShapeStyle")},m(e,a){wn(e,t,a),n&&n.m(t,null),bn(t,o),Aa(i,t,null),r=!0},p(e,[r]){e[0]?n?n.p(e,r):(n=Eh(e),n.c(),n.m(t,o)):n&&(n.d(1),n=null);const a={};4&r&&(a.items=e[2]),i.$set(a)},i(e){r||(xa(i.$$.fragment,e),r=!0)},o(e){va(i.$$.fragment,e),r=!1},d(e){e&&Sn(t),n&&n.d(),La(i)}}}function Ah(e,t,o){let i,{title:r}=t,{locale:n}=t,{items:a}=t,{hideTitle:s=!1}=t;return e.$$set=e=>{"title"in e&&o(0,r=e.title),"locale"in e&&o(1,n=e.locale),"items"in e&&o(2,a=e.items),"hideTitle"in e&&o(4,s=e.hideTitle)},e.$$.update=()=>{16&e.$$.dirty&&o(3,i="PinturaShapeStyleLabel"+(s?" implicit":""))},[r,n,a,i,s]}class Lh extends Fa{constructor(e){super(),za(this,e,Ah,Ih,Qr,{title:0,locale:1,items:2,hideTitle:4})}}var zh=(e,t,o)=>{let i,r,n;const a=Math.floor(6*e),s=6*e-a,l=o*(1-t),c=o*(1-s*t),d=o*(1-(1-s)*t);switch(a%6){case 0:i=o,r=d,n=l;break;case 1:i=c,r=o,n=l;break;case 2:i=l,r=o,n=d;break;case 3:i=l,r=c,n=o;break;case 4:i=d,r=l,n=o;break;case 5:i=o,r=l,n=c}return[i,r,n]};function Fh(e){let t,o,i;return{c(){t=kn("div"),o=kn("span"),An(t,"class","PinturaColorPreview"),An(t,"title",e[0]),An(t,"style",i="--color:"+e[1])},m(e,i){wn(e,t,i),bn(t,o)},p(e,[o]){1&o&&An(t,"title",e[0]),2&o&&i!==(i="--color:"+e[1])&&An(t,"style",i)},i:Gr,o:Gr,d(e){e&&Sn(t)}}}function Dh(e,t,o){let i,{color:r}=t,{title:n}=t;return e.$$set=e=>{"color"in e&&o(2,r=e.color),"title"in e&&o(0,n=e.title)},e.$$.update=()=>{4&e.$$.dirty&&o(1,i=r?Ho(r):"transparent")},[n,i,r]}class Oh extends Fa{constructor(e){super(),za(this,e,Dh,Fh,Qr,{color:2,title:0})}}var Bh=e=>(e=e.trim(),/^rgba/.test(e)?e.substr(5).split(",").map(parseFloat).map(((e,t)=>e/(3===t?1:255))):/^rgb/.test(e)?e.substr(4).split(",").map(parseFloat).map((e=>e/255)):/^#/.test(e)?(e=>{const[,t,o,i,r]=e.split("");e=e.length>=4&&e.length<=5?`#${t}${t}${o}${o}${i}${i}${r?`${r}${r}`:""}`:e;const[n,a,s,l,c]=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e)||[];if(n)return[a,s,l,c].filter((e=>void 0!==e)).map((e=>parseInt(e,16)/255))})(e):/[0-9]{1,3}\s?,\s?[0-9]{1,3}\s?,\s?[0-9]{1,3}/.test(e)?e.split(",").map((e=>parseInt(e,10))).map((e=>e/255)):void 0);function Wh(e){let t,o;return{c(){t=kn("span"),o=Tn(e[0])},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){1&t[0]&&Fn(o,e[0])},d(e){e&&Sn(t)}}}function _h(e){let t,o,i,r;o=new Oh({props:{color:e[4],title:uu(e[8],e[10])}});let n=!e[9]&&Wh(e);return{c(){t=kn("span"),Ia(o.$$.fragment),i=Mn(),n&&n.c(),An(t,"slot","label"),An(t,"class","PinturaButtonLabel")},m(e,a){wn(e,t,a),Aa(o,t,null),bn(t,i),n&&n.m(t,null),r=!0},p(e,i){const r={};16&i[0]&&(r.color=e[4]),1280&i[0]&&(r.title=uu(e[8],e[10])),o.$set(r),e[9]?n&&(n.d(1),n=null):n?n.p(e,i):(n=Wh(e),n.c(),n.m(t,null))},i(e){r||(xa(o.$$.fragment,e),r=!0)},o(e){va(o.$$.fragment,e),r=!1},d(e){e&&Sn(t),La(o),n&&n.d()}}}function Vh(e){let t,o,i,r,n,a,s,l,c,d,u,h,p,m;c=new vh({props:{class:"PinturaHuePicker",knobStyle:"background-color:"+e[20],onchange:e[26],value:e[15],min:0,max:1,step:.01}});let g=e[11]&&Nh(e),$=e[14]&&Hh(e);return{c(){t=kn("div"),o=kn("div"),i=kn("div"),r=kn("div"),l=Mn(),Ia(c.$$.fragment),d=Mn(),g&&g.c(),u=Mn(),$&&$.c(),An(r,"role","button"),An(r,"aria-label","Saturation slider"),An(r,"class","PinturaPickerKnob"),An(r,"tabindex","0"),An(r,"style",n=`background-color:${e[19]};`),An(i,"class","PinturaPickerKnobController"),An(i,"style",a=`transform:translate(${e[24]}%,${e[23]}%)`),An(o,"class","PinturaSaturationPicker"),An(o,"style",s="background-color: "+e[20]),An(t,"class","PinturaPicker")},m(n,a){wn(n,t,a),bn(t,o),bn(o,i),bn(i,r),e[37](o),bn(t,l),Aa(c,t,null),bn(t,d),g&&g.m(t,null),bn(t,u),$&&$.m(t,null),h=!0,p||(m=[Pn(r,"nudge",e[29]),hn(pd.call(null,r,{preventDefault:!0})),Pn(o,"pointerdown",e[28])],p=!0)},p(e,l){(!h||524288&l[0]&&n!==(n=`background-color:${e[19]};`))&&An(r,"style",n),(!h||25165824&l[0]&&a!==(a=`transform:translate(${e[24]}%,${e[23]}%)`))&&An(i,"style",a),(!h||1048576&l[0]&&s!==(s="background-color: "+e[20]))&&An(o,"style",s);const d={};1048576&l[0]&&(d.knobStyle="background-color:"+e[20]),32768&l[0]&&(d.value=e[15]),c.$set(d),e[11]?g?(g.p(e,l),2048&l[0]&&xa(g,1)):(g=Nh(e),g.c(),xa(g,1),g.m(t,u)):g&&(ya(),va(g,1,1,(()=>{g=null})),ba()),e[14]?$?$.p(e,l):($=Hh(e),$.c(),$.m(t,null)):$&&($.d(1),$=null)},i(e){h||(xa(c.$$.fragment,e),xa(g),h=!0)},o(e){va(c.$$.fragment,e),va(g),h=!1},d(o){o&&Sn(t),e[37](null),La(c),g&&g.d(),$&&$.d(),p=!1,Kr(m)}}}function Nh(e){let t,o;return t=new vh({props:{class:"PinturaOpacityPicker",knobStyle:"background-color:"+e[17],trackStyle:`background-image:linear-gradient(to right,${e[18]},${e[19]})`,onchange:e[27],value:e[16],min:0,max:1,step:.01}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};131072&o[0]&&(i.knobStyle="background-color:"+e[17]),786432&o[0]&&(i.trackStyle=`background-image:linear-gradient(to right,${e[18]},${e[19]})`),65536&o[0]&&(i.value=e[16]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Hh(e){let t,o,i;return{c(){t=kn("input"),An(t,"class","PinturaColorPickerInput"),An(t,"type","text"),t.value=e[22]},m(r,n){wn(r,t,n),o||(i=Pn(t,"input",e[30]),o=!0)},p(e,o){4194304&o[0]&&t.value!==e[22]&&(t.value=e[22])},d(e){e&&Sn(t),o=!1,i()}}}function jh(e){let t,o;return t=new Wu({props:{label:uu(e[10].labelColorPalette,e[10]),class:Mc(["PinturaColorPresets",e[9]?"PinturaColorPresetsGrid":"PinturaColorPresetsList"]),hideLabel:!1,name:e[1],value:e[4],optionGroupClass:"PinturaListOptionGroup",optionClass:"PinturaListOption",options:e[2].map(e[38]),selectedIndex:e[3],optionMapper:e[7],optionLabelClass:e[6],onchange:e[39],$$slots:{option:[Zh,({option:e})=>({51:e}),({option:e})=>[0,e?1048576:0]],group:[Uh,({option:e})=>({51:e}),({option:e})=>[0,e?1048576:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1024&o[0]&&(i.label=uu(e[10].labelColorPalette,e[10])),512&o[0]&&(i.class=Mc(["PinturaColorPresets",e[9]?"PinturaColorPresetsGrid":"PinturaColorPresetsList"])),2&o[0]&&(i.name=e[1]),16&o[0]&&(i.value=e[4]),1028&o[0]&&(i.options=e[2].map(e[38])),8&o[0]&&(i.selectedIndex=e[3]),128&o[0]&&(i.optionMapper=e[7]),64&o[0]&&(i.optionLabelClass=e[6]),512&o[0]|3145728&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Uh(e){let t,o,i=e[51].label+"";return{c(){t=kn("span"),o=Tn(i),An(t,"slot","group")},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){1048576&t[1]&&i!==(i=e[51].label+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Gh(e){let t,o,i=e[51].label+"";return{c(){t=kn("span"),o=Tn(i),An(t,"class","PinturaButtonLabel")},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){1048576&t[1]&&i!==(i=e[51].label+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Zh(e){let t,o,i,r;o=new Oh({props:{title:e[51].label,color:e[51].value}});let n=!e[9]&&Gh(e);return{c(){t=kn("span"),Ia(o.$$.fragment),i=Mn(),n&&n.c(),An(t,"slot","option")},m(e,a){wn(e,t,a),Aa(o,t,null),bn(t,i),n&&n.m(t,null),r=!0},p(e,i){const r={};1048576&i[1]&&(r.title=e[51].label),1048576&i[1]&&(r.color=e[51].value),o.$set(r),e[9]?n&&(n.d(1),n=null):n?n.p(e,i):(n=Gh(e),n.c(),n.m(t,null))},i(e){r||(xa(o.$$.fragment,e),r=!0)},o(e){va(o.$$.fragment,e),r=!1},d(e){e&&Sn(t),La(o),n&&n.d()}}}function Xh(e){let t,o,i,r=e[13]&&Vh(e),n=e[12]&&jh(e);return{c(){t=kn("div"),r&&r.c(),o=Mn(),n&&n.c(),An(t,"slot","details"),An(t,"class","PinturaColorPickerPanel")},m(e,a){wn(e,t,a),r&&r.m(t,null),bn(t,o),n&&n.m(t,null),i=!0},p(e,i){e[13]?r?(r.p(e,i),8192&i[0]&&xa(r,1)):(r=Vh(e),r.c(),xa(r,1),r.m(t,o)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[12]?n?(n.p(e,i),4096&i[0]&&xa(n,1)):(n=jh(e),n.c(),xa(n,1),n.m(t,null)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){e&&Sn(t),r&&r.d(),n&&n.d()}}}function Yh(e){let t,o;return t=new ru({props:{buttonClass:Mc(["PinturaColorPickerButton",e[5]]),$$slots:{details:[Xh],label:[_h]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};32&o[0]&&(i.buttonClass=Mc(["PinturaColorPickerButton",e[5]])),33554399&o[0]|2097152&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function qh(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,{label:f}=t,{name:y}=t,{options:b=[]}=t,{selectedIndex:x=-1}=t,{value:v}=t,{buttonClass:w}=t,{optionLabelClass:S}=t,{optionMapper:k}=t,{onchange:C}=t,{title:T}=t,{hidePresetLabel:M=!0}=t,{locale:R}=t,{enableOpacity:E=!0}=t,{enablePresets:I=!0}=t,{enablePicker:A=!0}=t,{enableInput:L=!1}=t;const z=(e,t)=>{if(u=[e[0],e[1],e[2]],t){let t=((e,t,o)=>{let i=Math.max(e,t,o),r=i-Math.min(e,t,o),n=r&&(i==e?(t-o)/r:i==t?2+(o-e)/r:4+(e-t)/r);return[60*(n<0?n+6:n)/360,i&&r/i,i]})(...u);o(15,s=t[0]),o(32,l=t[1]),o(33,c=t[2]),o(16,d=Ao(e[3])?e[3]:1)}o(17,h=Ho(e)),o(18,p=Ho([...u,0])),o(19,m=Ho([...u,1])),o(20,g=Ho(zh(s,1,1)))},F=()=>{const e=[...zh(s,l,c),d];z(e),C(e)},D=e=>{const t=3===e.length?[...e,1]:e;z(t,!0),C(t)},O=(e,t)=>{const i=ns(e.x/t.width,0,1),r=ns(e.y/t.height,0,1);var n;n=1-r,o(32,l=i),o(33,c=n),0===d&&o(16,d=1),F()};let B,W,_,V;const N=e=>{const t=we(he(e),V);O(ve(pe(_),t),W)},H=e=>{W=void 0,document.documentElement.removeEventListener("pointermove",N),document.documentElement.removeEventListener("pointerup",H)};let j;return e.$$set=e=>{"label"in e&&o(0,f=e.label),"name"in e&&o(1,y=e.name),"options"in e&&o(2,b=e.options),"selectedIndex"in e&&o(3,x=e.selectedIndex),"value"in e&&o(4,v=e.value),"buttonClass"in e&&o(5,w=e.buttonClass),"optionLabelClass"in e&&o(6,S=e.optionLabelClass),"optionMapper"in e&&o(7,k=e.optionMapper),"onchange"in e&&o(31,C=e.onchange),"title"in e&&o(8,T=e.title),"hidePresetLabel"in e&&o(9,M=e.hidePresetLabel),"locale"in e&&o(10,R=e.locale),"enableOpacity"in e&&o(11,E=e.enableOpacity),"enablePresets"in e&&o(12,I=e.enablePresets),"enablePicker"in e&&o(13,A=e.enablePicker),"enableInput"in e&&o(14,L=e.enableInput)},e.$$.update=()=>{16&e.$$.dirty[0]|8&e.$$.dirty[1]&&(!v||$&&ds(v,$)||(o(34,$=[...v]),z(v,!0))),2&e.$$.dirty[1]&&o(24,i=100*l),4&e.$$.dirty[1]&&o(23,r=100-100*c),16&e.$$.dirty[1]&&o(36,n=!!j&&(j.length>=4&&j.length<=5)),18448&e.$$.dirty[0]|32&e.$$.dirty[1]&&o(22,a=L&&v?((e,t,o)=>{let i=e.map((e=>Math.round(255*e).toString(16).toLowerCase().padStart(2,"0")));return(!t&&i.length>3||"ff"===i[3])&&i.pop(),o&&(i=i.map((e=>e.substring(0,1)))),"#"+i.join("")})(v,E,n):void 0)},[f,y,b,x,v,w,S,k,T,M,R,E,I,A,L,s,d,h,p,m,g,B,a,r,i,D,e=>{o(15,s=e),0===d&&o(16,d=1),F()},e=>{o(16,d=e),F()},e=>{e.stopPropagation(),W=We(B.offsetWidth,B.offsetHeight),_=(e=>ue(e.offsetX,e.offsetY))(e),V=he(e),O(_,W),document.documentElement.addEventListener("pointermove",N),document.documentElement.addEventListener("pointerup",H)},e=>{W=We(B.offsetWidth,B.offsetHeight);const t=i/100*W.width,o=r/100*W.height;O({x:t+e.detail.x,y:o+e.detail.y},W)},e=>{const{value:t}=e.target,i=t.length;if(!t.startsWith("#")||i<4||6===i||8===i||i>9)return;if(!E&&i>7)return;const r=Bh(t);r&&(o(35,j=t),z(r),C(r))},C,l,c,$,j,n,function(e){ta[e?"unshift":"push"]((()=>{B=e,o(21,B)}))},([e,t])=>[e,P(t)?t(R):t],e=>D(e.value)]}class Kh extends Fa{constructor(e){super(),za(this,e,qh,Yh,Qr,{label:0,name:1,options:2,selectedIndex:3,value:4,buttonClass:5,optionLabelClass:6,optionMapper:7,onchange:31,title:8,hidePresetLabel:9,locale:10,enableOpacity:11,enablePresets:12,enablePicker:13,enableInput:14},null,[-1,-1])}}function Jh(e){let t,o,i;return o=new up({props:{items:e[0]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaShorthandControl PinturaShapeStyle")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,[t]){const i={};1&t&&(i.items=e[0]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Qh(e,t,o){let i,r,{value:n}=t,{onchange:a}=t,{controls:s=[]}=t;return e.$$set=e=>{o(6,t=Xr(Xr({},t),cn(e))),"value"in e&&o(1,n=e.value),"onchange"in e&&o(2,a=e.onchange),"controls"in e&&o(3,s=e.controls)},e.$$.update=()=>{o(4,i=(e=>{const{controls:t,...o}=e;return o})(t)),30&e.$$.dirty&&o(0,r=s.map(((e,t)=>{const[o,r,s]=e;return[o,r,{...i,...s,value:n[t],onchange:e=>{const o=[...n];o[t]=e,a(o)}}]})))},t=cn(t),[r,n,a,s,i]}class ep extends Fa{constructor(e){super(),za(this,e,Qh,Jh,Qr,{value:1,onchange:2,controls:3})}}function tp(e,t,o){const i=e.slice();return i[9]=t[o][0],i[0]=t[o][1],i[10]=t[o][2],i[2]=t[o][3],i}function op(e){let t,o,i;const r=[e[10]];var n=e[3][e[9]]||e[9];function a(e){let t={};for(let e=0;e{La(e,1)})),ba()}n?(t=Wn(n,a()),Ia(t.$$.fragment),xa(t.$$.fragment,1),Aa(t,o.parentNode,o)):t=null}else n&&t.$set(s)},i(e){i||(t&&xa(t.$$.fragment,e),i=!0)},o(e){t&&va(t.$$.fragment,e),i=!1},d(e){e&&Sn(o),t&&La(t,e)}}}function ip(e){let t,o=e[9],i=e[9]&&sp(e);return{c(){i&&i.c(),t=Rn()},m(e,o){i&&i.m(e,o),wn(e,t,o)},p(e,r){e[9]?o?Qr(o,e[9])?(i.d(1),i=sp(e),i.c(),i.m(t.parentNode,t)):i.p(e,r):(i=sp(e),i.c(),i.m(t.parentNode,t)):o&&(i.d(1),i=null),o=e[9]},i:Gr,o(e){va(i)},d(e){e&&Sn(t),i&&i.d(e)}}}function rp(e){let t,o,i=e[10].innerHTML+"";return{c(){t=new Bn(!1),o=Rn(),t.a=o},m(e,r){t.m(i,e,r),wn(e,o,r)},p(e,o){4&o&&i!==(i=e[10].innerHTML+"")&&t.p(i)},i:Gr,o:Gr,d(e){e&&Sn(o),e&&t.d()}}}function np(e){let t,o=e[10].textContent+"";return{c(){t=Tn(o)},m(e,o){wn(e,t,o)},p(e,i){4&i&&o!==(o=e[10].textContent+"")&&Fn(t,o)},i:Gr,o:Gr,d(e){e&&Sn(t)}}}function ap(e){let t,o;return t=new up({props:{items:e[2],discardEmptyItems:!0}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};4&o&&(i.items=e[2]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function sp(e){let t,o,i,r,n;const a=[ap,np,rp],s=[];function l(e,t){return e[2]&&e[2].length?0:e[10].textContent?1:e[10].innerHTML?2:-1}~(o=l(e))&&(i=s[o]=a[o](e));let c=[e[4](e[10])],d={};for(let e=0;e{s[u]=null})),ba()),~o?(i=s[o],i?i.p(e,n):(i=s[o]=a[o](e),i.c()),xa(i,1),i.m(t,r)):i=null),d=Ra(c,[4&n&&e[4](e[10])]),/-/.test(e[9])?zn(t,d):Ln(t,d)},i(e){n||(xa(i),n=!0)},o(e){va(i),n=!1},d(e){e&&Sn(t),~o&&s[o].d()}}}function lp(e,t){let o,i,r,n,a,s;const l=[ip,op],c=[];function d(e,t){return 4&t&&(i=null),null==i&&(i=!e[5](e[9])),i?0:1}return r=d(t,-1),n=c[r]=l[r](t),{key:e,first:null,c(){o=Rn(),n.c(),a=Rn(),this.first=o},m(e,t){wn(e,o,t),c[r].m(e,t),wn(e,a,t),s=!0},p(e,o){let i=r;r=d(t=e,o),r===i?c[r].p(t,o):(ya(),va(c[i],1,1,(()=>{c[i]=null})),ba(),n=c[r],n?n.p(t,o):(n=c[r]=l[r](t),n.c()),xa(n,1),n.m(a.parentNode,a))},i(e){s||(xa(n),s=!0)},o(e){va(n),s=!1},d(e){e&&Sn(o),c[r].d(e),e&&Sn(a)}}}function cp(e){let t,o,i=[],r=new Map,n=e[2];const a=e=>e[0]+e[1];for(let t=0;t!R(e)||!!l[e],d=e=>{if(!e)return!1;const[t,,o,i=[]]=e;return!!c(t)||(i.some(d)||o.textContent||o.innerHTML)};return e.$$set=e=>{"items"in e&&o(6,n=e.items),"discardEmptyItems"in e&&o(7,a=e.discardEmptyItems),"key"in e&&o(0,s=e.key)},e.$$.update=()=>{1&e.$$.dirty&&o(1,i=s),192&e.$$.dirty&&o(2,r=(n&&a?n.filter(d):n)||[])},[s,i,r,l,(e={})=>{const{textContent:t,innerHTML:o,...i}=e;return i},c,n,a]}class up extends Fa{constructor(e){super(),za(this,e,dp,cp,Qr,{items:6,discardEmptyItems:7,key:0})}}let hp=null;var pp=e=>{if(null===hp&&(hp=u()&&"visualViewport"in window),!hp)return!1;const t=visualViewport.height,o=()=>{e(visualViewport.heightvisualViewport.removeEventListener("resize",o)};function mp(e){let t,o;const i=[{onclick:e[1]},e[3]];let r={};for(let e=0;e{c=null})),ba()),u&&u.p&&(!a||8388608&r[0])&&sn(u,d,e,e[23],a?an(d,e[23],r,null):ln(e[23]),null),e[2]?h?(h.p(e,r),4&r[0]&&xa(h,1)):(h=gp(e),h.c(),xa(h,1),h.m(o,null)):h&&(ya(),va(h,1,1,(()=>{h=null})),ba()),(!a||16&r[0])&&An(t,"data-layout",e[4]),(!a||64&r[0])&&An(t,"style",e[6])},i(e){a||(xa(c),xa(u,e),xa(h),a=!0)},o(e){va(c),va(u,e),va(h),a=!1},d(o){o&&Sn(t),c&&c.d(),u&&u.d(o),h&&h.d(),e[25](null),s=!1,Kr(l)}}}function fp(e,t,o){let i,r,n,a,s,{$$slots:l={},$$scope:c}=t,{onconfirm:d}=t,{oncancel:u}=t,{autoFocus:h=!0}=t,{autoPositionCursor:p=!0}=t,{buttonConfirm:m}=t,{buttonCancel:g}=t,{layout:$="stack"}=t,{parentRect:f}=t,{align:y}=t,{justify:b}=t,{parentMargin:x=16}=t,{panelOffset:w=de()}=t,S=!1,k=void 0,C=void 0,T="",M=0;const R=()=>{const e=s.querySelector("input, textarea");e.focus(),M>=1||e.select()},P=()=>{S=!0,I||!$o()&&!v()||o(19,T="top:1em;bottom:auto;"),$o()&&(e=>{let t;const o=e=>t=e.touches[0].screenY,i=e=>{const o=e.touches[0].screenY,i=e.target;/textarea/i.test(i.nodeName)?(o>t?0==i.scrollTop&&e.preventDefault():o{n?"hidden"!==e||S?(clearTimeout(C),C=void 0,o(19,T=`top:${visualViewport.height-k.height-w.y}px`),"visible"===e?(o(5,s.dataset.stick=!0,s),R(),P()):(S=!1,o(20,M=0))):R():o(19,T="top: 4.5em; bottom: auto")}));return Zn((()=>{h&&R()})),Yn((()=>{I&&I()})),e.$$set=e=>{"onconfirm"in e&&o(0,d=e.onconfirm),"oncancel"in e&&o(1,u=e.oncancel),"autoFocus"in e&&o(11,h=e.autoFocus),"autoPositionCursor"in e&&o(12,p=e.autoPositionCursor),"buttonConfirm"in e&&o(2,m=e.buttonConfirm),"buttonCancel"in e&&o(3,g=e.buttonCancel),"layout"in e&&o(4,$=e.layout),"parentRect"in e&&o(13,f=e.parentRect),"align"in e&&o(14,y=e.align),"justify"in e&&o(15,b=e.justify),"parentMargin"in e&&o(16,x=e.parentMargin),"panelOffset"in e&&o(17,w=e.panelOffset),"$$scope"in e&&o(23,c=e.$$scope)},e.$$.update=()=>{385024&e.$$.dirty[0]&&o(21,i=f&&k?((e,t,o,i,r)=>{let n,a;return n="center"===i?e.x+.5*e.width-.5*t.width:"right"===i?e.x+e.width-t.width-r:e.x+r,a="center"===o?e.y+.5*e.height-.5*t.height:"bottom"===o?e.y+e.height-t.height-r:e.y+r,`left:${n}px;top:${a}px;right:auto;bottom:auto;`})(f,k,y,b,x):void 0),32&e.$$.dirty[0]&&o(22,r=s&&getComputedStyle(s)),4194304&e.$$.dirty[0]&&(n=r&&"1"===r.getPropertyValue("--editor-modal")),3670016&e.$$.dirty[0]&&o(6,a=`opacity:${M};${i||T}`)},[d,u,m,g,$,s,a,e=>{var t;((e=>/textarea/i.test(e))(e.target)||Ud(e.target))&&(E=Date.now(),p&&((t=e.target).selectionStart=t.selectionEnd=t.value.length),clearTimeout(C),C=setTimeout(P,200))},e=>{Date.now()-E>50||(e.stopPropagation(),R())},({detail:e})=>{o(18,k={width:e.width,height:e.height})},e=>"Enter"===e.key?d():"Escape"===e.key?u():void 0,h,p,f,y,b,x,w,k,T,M,i,r,c,l,function(e){ta[e?"unshift":"push"]((()=>{s=e,o(5,s)}))}]}class yp extends Fa{constructor(e){super(),za(this,e,fp,$p,Qr,{onconfirm:0,oncancel:1,autoFocus:11,autoPositionCursor:12,buttonConfirm:2,buttonCancel:3,layout:4,parentRect:13,align:14,justify:15,parentMargin:16,panelOffset:17},null,[-1,-1])}}const bp=["aspectRatio","isRotatedSideways","flip","cropSize"],xp=gs.map((([e])=>e)).filter((e=>!bp.includes(e)));var vp=(e,t)=>new CustomEvent("ping",{detail:{type:e,data:t},cancelable:!0,bubbles:!0}),wp=(e,t)=>(t?dl(e,t):e).replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase(),Sp=(e,t=G)=>{const{subscribe:o,set:i}=Ba(void 0);return{subscribe:o,destroy:((e,t)=>{const o=matchMedia(e);return o.addListener(t),t(o),{get matches(){return o.matches},destroy:()=>o.removeListener(t)}})(e,(({matches:e})=>i(t(e)))).destroy}},kp=e=>/video/.test(e.type);var Cp=(e,t,o)=>new Promise(((i,r)=>{(async()=>{kp(e)&&i(await(e=>new Promise(((t,o)=>{const i=g("video");i.onseeked=()=>{const e=g("canvas");qt(i).then((({width:o,height:r})=>{e.width=o,e.height=r;const n=e.getContext("2d",{willReadFrequently:!0}),a=()=>{n.drawImage(i,0,0,e.width,e.height);const o=n.getImageData(0,0,e.width,e.height);f(e),URL.revokeObjectURL(i.src),t(o)};Xt()?setTimeout(a,16):a()}))},i.onloadeddata=()=>{i.currentTime=0},i.onerror=e=>{console.error(e),o(i.error)},i.src=URL.createObjectURL(e),i.load()})))(e));const n=await t.read(e),a=e=>D(e,o).then((e=>t.apply(e,n))).then(i).catch(r);if(A(e)||!I()||Xt()||$o())return a(e);let s;try{s=await F(((e,t)=>createImageBitmap(e).then((e=>t(null,e))).catch(t)),[e])}catch(e){}s&&s.width?await p()?Dl()&&n>1?i(await(async e=>m(await S(e)))(s)):i(s):i(t.apply(s,n)):a(e)})()})),Tp=(e,t)=>new Promise((async o=>{if(e.width{if(null===Mp){let e=g("canvas");Mp=!!Tl(e),f(e),e=void 0}return Mp};const Pp=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Ep={precision:1e-4},Ip={precision:.01*Ep.precision};var Ap=()=>{const e=[],t=[],o=[],i=()=>{t.forEach((e=>e(o)))},r=t=>{t.unsub=t.subscribe((r=>((t,r)=>{const n=e.indexOf(t);n<0||(o[n]=r,i())})(t,r))),i()};return{get length(){return e.length},clear:()=>{e.forEach((e=>e.unsub())),e.length=0,o.length=0},unshift:t=>{e.unshift(t),r(t)},get:t=>e[t],push:t=>{e.push(t),r(t)},remove:t=>{t.unsub();const i=e.indexOf(t);e.splice(i,1),o.splice(i,1)},forEach:t=>e.forEach(t),filter:t=>e.filter(t),subscribe:e=>(t.push(e),e(o),()=>{t.splice(t.indexOf(e),1)})}},Lp=e=>e[0]<.25&&e[1]<.25&&e[2]<.25,zp=(e={})=>new Promise((t=>{const{accept:o="image/*"}=e,i=g("input",{style:"position:absolute;visibility:hidden;width:0;height:0;",type:"file",accept:o}),r=()=>{const[e]=i.files;i.parentNode&&i.remove(),i.removeEventListener("change",r),t(e)};i.addEventListener("change",r),$o()&&document.body.append(i),i.click()})),Fp=e=>{try{return e()}catch(e){console.error(e)}},Dp=([e,t])=>e+.5*(t-e),Op=e=>Math.round(100*e),Bp=e=>ue(e.clientX,e.clientY),Wp=(e,t,o)=>{const i=Bp(e);return we(we(i,t),o)};function _p(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,{root:S}=t,{locale:k}=t,{stores:C}=t,{allowPan:T=!0}=t,{allowZoom:M=!0}=t,{enablePan:R=!0}=t,{enableZoom:P=!0}=t,{enableZoomControls:E=P}=t,{enableZoomInput:I=!0}=t,{enablePanInput:A=!0}=t,{enablePanLimit:L=!0}=t,{panLimitGutterScalar:z=0}=t,{zoomOptions:F=[.25,.5,1,1.25,1.5,2,3,4,6,8,16]}=t,{zoomAdjustStep:D=.25}=t,{zoomAdjustFactor:O=.1}=t,{zoomAdjustWheelFactor:B=1}=t,{elasticity:W=5}=t,{imageSelectionRectCentered:_}=t,{imageSelectionRectScalar:V}=t,{zoomLevel:N=null}=t,{zoomControls:H}=t,{zoomMultiTouching:j=!1}=t;const{isAnimated:U,isInteracting:G,rootRect:Z,stageRect:X,stageScalar:Y,imageSelectionPan:q,imageSelectionZoom:K,imageSelectionStageFitScalar:J,imageSelectionRect:Q,imageSelectionStoredState:ee,imagePreviewUpscale:te}=C;on(e,U,(e=>o(68,v=e))),on(e,G,(e=>o(67,b=e))),on(e,Z,(e=>o(65,f=e))),on(e,X,(e=>o(64,$=e))),on(e,Y,(e=>o(45,x=e))),on(e,q,(e=>o(63,p=e))),on(e,K,(e=>o(42,h=e))),on(e,J,(e=>o(43,m=e))),on(e,Q,(e=>o(66,y=e))),on(e,ee,(e=>o(69,w=e))),on(e,te,(e=>o(44,g=e)));let oe=!1,ie=void 0,re=void 0,ne=void 0,ae=void 0;const se=e=>{const t=S.querySelector(".PinturaMain > .PinturaUtilMain")||S.querySelector('div[tabindex="0"] .PinturaUtilMain');return!!t&&(!!t.contains(e.target)&&!Gd(e.target))},le=(e={})=>{const{pan:t=p,zoom:o=h}=e;un(ee,w={translation:t,zoom:o},w)},ce=()=>p&&0===p.x&&0===p.y,he=()=>{un(K,h=void 0,h),ce()||un(q,p=de(),p),ge.set(void 0,{hard:!0})},me=()=>{he(),le()},ge=ec(void 0,{precision:.01});ge.subscribe((e=>{if(void 0===e)return un(K,h=void 0,h),void(ce()||un(q,p=de(),p));const t=h;e<=1?ce()||un(q,p=de(),p):e<=t&&un(q,p=ke(p,.8),p),un(K,h=e,h)}));const fe=e=>{ge.update((t=>{const o=e(t||m);return le({zoom:o}),o}))},ye=e=>{e?ge.set(e,{hard:!1===v}):(e=void 0,ge.set(void 0,{hard:!0})),un(K,h=e,h),le({zoom:e})},be=(e,t)=>{const o=V*t,i={..._},r=1-ns(z,0,1);lt(i,oi.x&&(a.x=i.x),n.y>i.y&&(a.y=i.y),n.x+n.width{if(!ie)return;let i=e;const r=ue(ie.x+i.x,ie.y+i.y);if(!L)return r;const n=be(r,t);return o?$d(n,r,W):n};let ve,Ce;const Te=()=>{Ce=void 0,un(G,b=!0,b),o(33,oe=A),ve=!1,ne=!1,ie={...p},re=g?h||m:n?h||1:h||m},Me=e=>{const{scalar:t,translation:r,isMultiTouching:n}=e.detail;if(!ie||!n&&!A)return;n&&ke(r,.5),(A||n)&&(ve=!0),j||o(12,j=n);const a=i?ns(re*t,s,l):1,c=xe({translation:r,zoom:a,elastify:!0}),d=$e(c);ae=$e(p),ne=d{un(G,b=!1,b),o(33,oe=!1),o(12,j=!1),ne&&ae<50&&(ie=void 0,re=void 0,q.set(de()))},Pe=e=>{un(G,b=!1,b),o(33,oe=!1),o(12,j=!1),Promise.resolve().then((()=>{if(ve&&ie){const t=Ce||e.detail,o=i?ns(re*t.scalar,s,l):1,r=xe({elastify:!1,translation:t.translation,zoom:o});q.set(r)}ie=void 0,re=void 0,A&&e.detail.isDoubleTap&&me(),le()}))};let Ee,Ie=Date.now(),Ae=0,Le=!1,ze=!1;const Fe=e=>{if(!se(e))return;if(e.preventDefault(),e.stopPropagation(),ze)return;clearTimeout(Ee);const t=yd(e),o=Date.now(),i=o-Ie;Ie=o;const r=Math.abs(t/i)>.2;Ae=r?Ae+1:0;const n=1+-1*t*B/(r?50:100),a=Wp(e,f,$);De(a,n,{isZoomingFast:r})},De=(e,t,{isZoomingFast:o})=>{const i=g?h||m:n?h||1:h||m,r=i*t,a=de(),c=p,d=g?m:n?1:m,u=Math.abs(r-d),$=rd&&$||ii,b=Ae>=5;if(o||(Le=!1),Ae>0&&!Le&&(Le=f),b&&Le)return me(),ze=!0,void setTimeout((()=>{ze=!1}),100);if(b)return;!o&&f&&u<=.05&&(Ee=setTimeout((()=>{me()}),250)),un(K,h=ns(r,s,l),h);const x=Ke(y);lt(x,i),st(x,c);const v=at(x),w=Ke(x);lt(w,h-i+1,e);const S=at(w),k=Se(we(S,v),i);((e,t,o)=>{e.x=t,e.y=o})(a,c.x+k.x,c.y+k.y),un(q,p=$&&o?ke(pe(p),.85):be(a,i),p),le()},Oe=e=>(e?"add":"remove")+"EventListener";let Be,We,_e,Ve;const Ne=e=>{e.preventDefault(),We={...p},Ve=Ke(y),_e=Wp(e,f,$),Be=g?h||m:n?h||1:h||m},He=e=>{e.preventDefault(),un(K,h=ns(e.scale*Be,s,l),h);const t=Ke(Ve);lt(t,Be),st(t,We);const o=at(t),i=Ke(t);lt(i,h-Be+1,_e);const r=at(i),n=Se(we(r,o),Be),a={x:We.x+n.x,y:We.y+n.y};un(q,p=be(a,h),p)},je=e=>{e.preventDefault()},Ue=e=>{S[Oe(e)]("wheel",Fe),$o()||(S[Oe(e)]("gesturestart",Ne),S[Oe(e)]("gesturechange",He),S[Oe(e)]("gestureend",je))},Ge=e=>{const t=Oe(e);S[t]("interactionstart",Te),S[t]("interactionupdate",Me),S[t]("interactionrelease",Re),S[t]("interactionend",Pe)};let Ze;return Zn((()=>{Ze=hd(S,{drag:!0,pinch:!0,inertia:!0,inertiaDurationMultiplier:10,shouldStartInteraction:se})})),Yn((()=>{Ue(!1),Ge(!1),Ze.destroy(),Ze=void 0})),e.$$set=e=>{"root"in e&&o(13,S=e.root),"locale"in e&&o(14,k=e.locale),"stores"in e&&o(15,C=e.stores),"allowPan"in e&&o(16,T=e.allowPan),"allowZoom"in e&&o(17,M=e.allowZoom),"enablePan"in e&&o(18,R=e.enablePan),"enableZoom"in e&&o(19,P=e.enableZoom),"enableZoomControls"in e&&o(20,E=e.enableZoomControls),"enableZoomInput"in e&&o(21,I=e.enableZoomInput),"enablePanInput"in e&&o(22,A=e.enablePanInput),"enablePanLimit"in e&&o(23,L=e.enablePanLimit),"panLimitGutterScalar"in e&&o(24,z=e.panLimitGutterScalar),"zoomOptions"in e&&o(25,F=e.zoomOptions),"zoomAdjustStep"in e&&o(26,D=e.zoomAdjustStep),"zoomAdjustFactor"in e&&o(27,O=e.zoomAdjustFactor),"zoomAdjustWheelFactor"in e&&o(28,B=e.zoomAdjustWheelFactor),"elasticity"in e&&o(29,W=e.elasticity),"imageSelectionRectCentered"in e&&o(30,_=e.imageSelectionRectCentered),"imageSelectionRectScalar"in e&&o(31,V=e.imageSelectionRectScalar),"zoomLevel"in e&&o(32,N=e.zoomLevel),"zoomControls"in e&&o(11,H=e.zoomControls),"zoomMultiTouching"in e&&o(12,j=e.zoomMultiTouching)},e.$$.update=()=>{var t,$;2752512&e.$$.dirty[0]&&o(35,i=M&&P&&I),327680&e.$$.dirty[0]&&o(34,r=T&&R),196608&e.$$.dirty[0]&&(T||M?(un(K,h=P?w.zoom:void 0,h),un(q,p=R?pe(w.translation):ce()?p:de(),p),ge.set(h)):he()),16384&e.$$.dirty[1]&&(n=x>=1),33570816&e.$$.dirty[0]|28672&e.$$.dirty[1]&&o(39,a=[(g||x<1)&&[m,Op(m)+"%",{sublabel:k.labelZoomFit}],...F.map((e=>[e,Op(e)+"%"]))].filter(Boolean).map((e=>(1===e[0]&&(e[2]={sublabel:k.labelZoomActual}),e))).sort(((e,t)=>{const o=e[0]||m,i=t[0]||m;return ott>e?t:e),Number.MIN_SAFE_INTEGER)),2&e.$$.dirty[1]&&null!==N&&ye(N),30720&e.$$.dirty[1]&&o(41,d=h||(g||x<1?m:1)),1280&e.$$.dirty[1]&&o(38,(t=a.map((([e])=>e)),$=d,c=t.findIndex((e=>e===$)))),1024&e.$$.dirty[1]&&o(40,u=Op(d)+"%"),202522624&e.$$.dirty[0]|3040&e.$$.dirty[1]&&o(11,H=(M||M)&&E?[["Button","zoom-out",{hideLabel:!0,label:k.labelZoomOut,icon:k.iconZoomOut,disabled:h===s,onclick:()=>fe((e=>Math.max(s,e-D))),onhold:()=>fe((e=>Math.max(s,e*(1-O))))}],["Dropdown","zoom-level",{label:u,labelClass:"PinturaFixedWidthCharacters",options:a,selectedIndex:c,onchange:e=>ye(e.value)}],["Button","zoom-in",{hideLabel:!0,label:k.labelZoomIn,icon:k.iconZoomIn,disabled:h===l,onclick:()=>fe((e=>Math.min(l,e+D))),onhold:()=>fe((e=>Math.min(l,e*(1+O))))}]]:[]),8192&e.$$.dirty[0]|16&e.$$.dirty[1]&&S&&Ue(i),8192&e.$$.dirty[0]|8&e.$$.dirty[1]&&S&&Ge(r),4202496&e.$$.dirty[0]|12&e.$$.dirty[1]&&S&&S.style.setProperty("--cursor",r&&A?oe?"grabbing":"grab":"")},[U,G,Z,X,Y,q,K,J,Q,ee,te,H,j,S,k,C,T,M,R,P,E,I,A,L,z,F,D,O,B,W,_,V,N,oe,r,i,l,s,c,a,u,d,h,m,g,x]}class Vp extends Fa{constructor(e){super(),za(this,e,_p,null,Qr,{root:13,locale:14,stores:15,allowPan:16,allowZoom:17,enablePan:18,enableZoom:19,enableZoomControls:20,enableZoomInput:21,enablePanInput:22,enablePanLimit:23,panLimitGutterScalar:24,zoomOptions:25,zoomAdjustStep:26,zoomAdjustFactor:27,zoomAdjustWheelFactor:28,elasticity:29,imageSelectionRectCentered:30,imageSelectionRectScalar:31,zoomLevel:32,zoomControls:11,zoomMultiTouching:12},null,[-1,-1,-1,-1])}}const Np=e=>new Promise((t=>{const o=new FileReader;o.onload=()=>t(o.result),o.readAsArrayBuffer(e)})),Hp=1836476516,jp=(e,t=0,o=e.byteLength)=>{const i=[],r=t+o;for(;t{let o=0;o+=4;if(1718909296!==e.getUint32(o))return 0;o+=4;const i=e.getUint32(o);return 1836069938===i?((e,t,o)=>{let i=!1,r=-1;for(let n=t;n{const t=jp(e).find((e=>1836019574===e.type));if(!t)return 0;const o=jp(e,t.bodyOffset,t.bodySize);o.filter((e=>1953653099===e.type)).forEach((t=>{o.push(...jp(e,t.bodyOffset,t.bodySize))}));const i=[Hp,1953196132],r=o.filter((e=>i.includes(e.type)));for(const{type:t,bodyOffset:o}of r){const i=e.getUint8(o);let r=o+4;r+=t===Hp?32:36,r+=1===i?12:0;const n=e.getInt32(r),a=e.getInt32(r+4);if(0===n&&a>0)return 90;if(n<0&&0===a)return 180;if(0===n&&a<0)return 270}return 0})(e):0},{window:Gp}=ka;function Zp(e){let t,o,i,r=e[42]&&Xp(e),n=e[39]&&im(e);return{c(){r&&r.c(),t=Mn(),n&&n.c(),o=Rn()},m(e,a){r&&r.m(e,a),wn(e,t,a),n&&n.m(e,a),wn(e,o,a),i=!0},p(e,i){e[42]?r?(r.p(e,i),2048&i[1]&&xa(r,1)):(r=Xp(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[39]?n?(n.p(e,i),256&i[1]&&xa(n,1)):(n=im(e),n.c(),xa(n,1),n.m(o.parentNode,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function Xp(e){let t,o,i,r,n,a;const s=[qp,Yp],l=[];function c(e,t){return e[40]?0:e[35]?1:-1}return~(i=c(e))&&(r=l[i]=s[i](e)),{c(){t=kn("div"),o=kn("p"),r&&r.c(),An(o,"style",e[73]),An(t,"class","PinturaStatus"),An(t,"style",n="opacity: "+e[55])},m(e,r){wn(e,t,r),bn(t,o),~i&&l[i].m(o,null),a=!0},p(e,d){let u=i;i=c(e),i===u?~i&&l[i].p(e,d):(r&&(ya(),va(l[u],1,1,(()=>{l[u]=null})),ba()),~i?(r=l[i],r?r.p(e,d):(r=l[i]=s[i](e),r.c()),xa(r,1),r.m(o,null)):r=null),(!a||2048&d[2])&&An(o,"style",e[73]),(!a||16777216&d[1]&&n!==(n="opacity: "+e[55]))&&An(t,"style",n)},i(e){a||(xa(r),a=!0)},o(e){va(r),a=!1},d(e){e&&Sn(t),~i&&l[i].d()}}}function Yp(e){let t,o,i,r;t=new Cd({props:{text:e[35].text||"",onmeasure:e[214]}});let n=e[35].aside&&Kp(e);return{c(){Ia(t.$$.fragment),o=Mn(),n&&n.c(),i=Rn()},m(e,a){Aa(t,e,a),wn(e,o,a),n&&n.m(e,a),wn(e,i,a),r=!0},p(e,o){const r={};16&o[1]&&(r.text=e[35].text||""),t.$set(r),e[35].aside?n?(n.p(e,o),16&o[1]&&xa(n,1)):(n=Kp(e),n.c(),xa(n,1),n.m(i.parentNode,i)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){r||(xa(t.$$.fragment,e),xa(n),r=!0)},o(e){va(t.$$.fragment,e),va(n),r=!1},d(e){La(t,e),e&&Sn(o),n&&n.d(e),e&&Sn(i)}}}function qp(e){let t,o,i,r;return t=new Cd({props:{text:e[40],onmeasure:e[214]}}),i=new Id({props:{class:"PinturaStatusIcon",offset:e[83],opacity:e[84],$$slots:{default:[om]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment),o=Mn(),Ia(i.$$.fragment)},m(e,n){Aa(t,e,n),wn(e,o,n),Aa(i,e,n),r=!0},p(e,o){const r={};512&o[1]&&(r.text=e[40]),t.$set(r);const n={};2097152&o[2]&&(n.offset=e[83]),4194304&o[2]&&(n.opacity=e[84]),8&o[0]|536870912&o[18]&&(n.$$scope={dirty:o,ctx:e}),i.$set(n)},i(e){r||(xa(t.$$.fragment,e),xa(i.$$.fragment,e),r=!0)},o(e){va(t.$$.fragment,e),va(i.$$.fragment,e),r=!1},d(e){La(t,e),e&&Sn(o),La(i,e)}}}function Kp(e){let t,o;return t=new Id({props:{class:"PinturaStatusButton",offset:e[83],opacity:e[84],$$slots:{default:[em]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};2097152&o[2]&&(i.offset=e[83]),4194304&o[2]&&(i.opacity=e[84]),16&o[1]|536870912&o[18]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Jp(e){let t,o;return t=new Rd({props:{progress:e[35].progressIndicator.progress}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[1]&&(i.progress=e[35].progressIndicator.progress),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Qp(e){let t,o;const i=[e[35].closeButton,{hideLabel:!0}];let r={};for(let e=0;e{r=null})),ba()),e[35].closeButton&&e[35].text?n?(n.p(e,i),16&i[1]&&xa(n,1)):(n=Qp(e),n.c(),xa(n,1),n.m(o.parentNode,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function tm(e){let t,o=e[3].iconSupportError+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){8&i[0]&&o!==(o=e[3].iconSupportError+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function om(e){let t,o;return t=new td({props:{$$slots:{default:[tm]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8&o[0]|536870912&o[18]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function im(e){let t,o,i,r,n,a,s,l,c,d,u,h,p,m,g=e[10]&&rm(e),$=e[46]&&e[45]&&nm(e);const f=[dm,cm],y=[];function b(e,t){return e[46]?0:1}function x(t){e[427](t)}function v(t){e[428](t)}function w(t){e[429](t)}i=b(e),r=y[i]=f[i](e),a=new Tc({props:{isAnimated:e[54],isTransparent:e[20],pixelRatio:e[58],textPixelRatio:e[6],backgroundColor:e[57],maskRect:e[59],maskOpacity:e[74]?e[74].maskOpacity:1,maskMarkupOpacity:e[7],maskFrameOpacity:e[5],clipAnnotationsToImage:e[86],images:e[56],interfaceImages:e[87],loadImageData:e[28],enableGrid:e[11],gridSize:e[88],gridColors:[e[89],e[90]],gridOpacity:e[91],selectionColor:e[92],willRequest:e[82]||e[93],willRender:e[424],didRender:e[425]}});let S={root:e[2],locale:e[3],stores:e[200],allowPan:e[95],enablePan:e[17],enablePanLimit:e[21],panLimitGutterScalar:e[22],enablePanInput:e[96],allowZoom:e[97],enableZoom:e[18],enableZoomInput:void 0!==e[19]?e[19]:e[98],enableZoomControls:e[99],zoomOptions:e[13]||e[23],zoomAdjustStep:e[14]||e[24],zoomAdjustFactor:e[15]||e[25],zoomAdjustWheelFactor:e[16]||e[26],imageSelectionRectCentered:e[100],imageSelectionRectScalar:e[101],elasticity:$m*e[8]};return void 0!==e[0]&&(S.zoomLevel=e[0]),void 0!==e[33]&&(S.zoomControls=e[33]),void 0!==e[34]&&(S.zoomMultiTouching=e[34]),d=new Vp({props:S}),ta.push((()=>Ea(d,"zoomLevel",x))),ta.push((()=>Ea(d,"zoomControls",v))),ta.push((()=>Ea(d,"zoomMultiTouching",w))),{c(){g&&g.c(),t=Mn(),$&&$.c(),o=Mn(),r.c(),n=Mn(),Ia(a.$$.fragment),s=Mn(),l=kn("div"),c=Mn(),Ia(d.$$.fragment),An(l,"class","PinturaRootPortal")},m(r,u){g&&g.m(r,u),wn(r,t,u),$&&$.m(r,u),wn(r,o,u),y[i].m(r,u),wn(r,n,u),Aa(a,r,u),wn(r,s,u),wn(r,l,u),e[426](l),wn(r,c,u),Aa(d,r,u),m=!0},p(e,s){e[10]?g?(g.p(e,s),1024&s[0]&&xa(g,1)):(g=rm(e),g.c(),xa(g,1),g.m(t.parentNode,t)):g&&(ya(),va(g,1,1,(()=>{g=null})),ba()),e[46]&&e[45]?$?($.p(e,s),49152&s[1]&&xa($,1)):($=nm(e),$.c(),xa($,1),$.m(o.parentNode,o)):$&&(ya(),va($,1,1,(()=>{$=null})),ba());let l=i;i=b(e),i===l?y[i].p(e,s):(ya(),va(y[l],1,1,(()=>{y[l]=null})),ba(),r=y[i],r?r.p(e,s):(r=y[i]=f[i](e),r.c()),xa(r,1),r.m(n.parentNode,n));const c={};8388608&s[1]&&(c.isAnimated=e[54]),1048576&s[0]&&(c.isTransparent=e[20]),134217728&s[1]&&(c.pixelRatio=e[58]),64&s[0]&&(c.textPixelRatio=e[6]),67108864&s[1]&&(c.backgroundColor=e[57]),268435456&s[1]&&(c.maskRect=e[59]),4096&s[2]&&(c.maskOpacity=e[74]?e[74].maskOpacity:1),128&s[0]&&(c.maskMarkupOpacity=e[7]),32&s[0]&&(c.maskFrameOpacity=e[5]),16777216&s[2]&&(c.clipAnnotationsToImage=e[86]),33554432&s[1]&&(c.images=e[56]),33554432&s[2]&&(c.interfaceImages=e[87]),268435456&s[0]&&(c.loadImageData=e[28]),2048&s[0]&&(c.enableGrid=e[11]),67108864&s[2]&&(c.gridSize=e[88]),402653184&s[2]&&(c.gridColors=[e[89],e[90]]),536870912&s[2]&&(c.gridOpacity=e[91]),1073741824&s[2]&&(c.selectionColor=e[92]),1048576&s[2]|1&s[3]&&(c.willRequest=e[82]||e[93]),512&s[0]|541982784&s[1]|2&s[3]&&(c.willRender=e[424]),124&s[2]&&(c.didRender=e[425]),a.$set(c);const m={};4&s[0]&&(m.root=e[2]),8&s[0]&&(m.locale=e[3]),4&s[3]&&(m.allowPan=e[95]),131072&s[0]&&(m.enablePan=e[17]),2097152&s[0]&&(m.enablePanLimit=e[21]),4194304&s[0]&&(m.panLimitGutterScalar=e[22]),8&s[3]&&(m.enablePanInput=e[96]),16&s[3]&&(m.allowZoom=e[97]),262144&s[0]&&(m.enableZoom=e[18]),524288&s[0]|32&s[3]&&(m.enableZoomInput=void 0!==e[19]?e[19]:e[98]),64&s[3]&&(m.enableZoomControls=e[99]),8396800&s[0]&&(m.zoomOptions=e[13]||e[23]),16793600&s[0]&&(m.zoomAdjustStep=e[14]||e[24]),33587200&s[0]&&(m.zoomAdjustFactor=e[15]||e[25]),67174400&s[0]&&(m.zoomAdjustWheelFactor=e[16]||e[26]),128&s[3]&&(m.imageSelectionRectCentered=e[100]),256&s[3]&&(m.imageSelectionRectScalar=e[101]),256&s[0]&&(m.elasticity=$m*e[8]),!u&&1&s[0]&&(u=!0,m.zoomLevel=e[0],ca((()=>u=!1))),!h&&4&s[1]&&(h=!0,m.zoomControls=e[33],ca((()=>h=!1))),!p&&8&s[1]&&(p=!0,m.zoomMultiTouching=e[34],ca((()=>p=!1))),d.$set(m)},i(e){m||(xa(g),xa($),xa(r),xa(a.$$.fragment,e),xa(d.$$.fragment,e),m=!0)},o(e){va(g),va($),va(r),va(a.$$.fragment,e),va(d.$$.fragment,e),m=!1},d(r){g&&g.d(r),r&&Sn(t),$&&$.d(r),r&&Sn(o),y[i].d(r),r&&Sn(n),La(a,r),r&&Sn(s),r&&Sn(l),e[426](null),r&&Sn(c),La(d,r)}}}function rm(e){let t,o,i,r,n;return o=new up({props:{items:e[70]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaNav PinturaNavTools")},m(a,s){wn(a,t,s),Aa(o,t,null),i=!0,r||(n=[Pn(t,"measure",e[411]),hn($c.call(null,t))],r=!0)},p(e,t){const i={};256&t[2]&&(i.items=e[70]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o),r=!1,Kr(n)}}}function nm(e){let t,o,i;return o=new vd({props:{elasticity:e[8]*ym,scrollDirection:e[76]?"y":"x",$$slots:{default:[lm]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaNav PinturaNavMain")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};256&t[0]&&(i.elasticity=e[8]*ym),16384&t[2]&&(i.scrollDirection=e[76]?"y":"x"),8192&t[1]|393216&t[2]|536870912&t[18]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function am(e){let t,o=e[586].icon+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){268435456&i[18]&&o!==(o=e[586].icon+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function sm(e){let t,o,i,r,n,a=e[586].label+"";return t=new td({props:{$$slots:{default:[am]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment),o=Mn(),i=kn("span"),r=Tn(a)},m(e,a){Aa(t,e,a),wn(e,o,a),wn(e,i,a),bn(i,r),n=!0},p(e,o){const i={};805306368&o[18]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i),(!n||268435456&o[18])&&a!==(a=e[586].label+"")&&Fn(r,a)},i(e){n||(xa(t.$$.fragment,e),n=!0)},o(e){va(t.$$.fragment,e),n=!1},d(e){La(t,e),e&&Sn(o),e&&Sn(i)}}}function lm(e){let t,o;const i=[e[80],{tabs:e[79]}];let r={$$slots:{default:[sm,({tab:e})=>({586:e}),({tab:e})=>[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e?268435456:0]]},$$scope:{ctx:e}};for(let e=0;eEa(t,"component",r))),t.$on("measure",e[226]),t.$on("show",e[421]),t.$on("hide",e[422]),t.$on("fade",e[423]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};134217728&i[0]|73728&i[1]&&(r.content={...e[47].find(e[419]),props:e[27][e[44]]}),8&i[0]&&(r.locale=e[3]),!o&&2&i[0]|8192&i[1]&&(o=!0,r.component=e[1][e[44]],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function dm(e){let t,o;const i=[{class:"PinturaMain"},{visible:e[63]},e[80],{panels:e[78]}];let r={$$slots:{default:[um,({panel:e,panelIsActive:t})=>({584:e,585:t}),({panel:e,panelIsActive:t})=>[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(e?67108864:0)|(t?134217728:0)]]},$$scope:{ctx:e}};for(let e=0;eEa(t,"component",n))),t.$on("measure",e[226]),t.$on("show",(function(){return e[415](e[584])})),t.$on("hide",(function(){return e[416](e[584])})),t.$on("fade",(function(...t){return e[417](e[584],...t)})),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(i,n){e=i;const a={};134217728&n[0]|65536&n[1]|67108864&n[18]&&(a.content={...e[47].find(r),props:e[27][e[584]]}),8&n[0]&&(a.locale=e[3]),134217728&n[18]&&(a.isActive=e[585]),!o&&2&n[0]|67108864&n[18]&&(o=!0,a.component=e[1][e[584]],ca((()=>o=!1))),t.$set(a)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function hm(e){let t,o;return{c(){t=kn("span"),An(t,"class","PinturaEditorOverlay"),An(t,"style",o="opacity:"+e[102])},m(e,o){wn(e,t,o)},p(e,i){512&i[3]&&o!==(o="opacity:"+e[102])&&An(t,"style",o)},d(e){e&&Sn(t)}}}function pm(e){let t,o;const i=[{layout:"row"},{parentRect:e[51]},e[61]];let r={$$slots:{default:[mm]},$$scope:{ctx:e}};for(let e=0;e0&&hm(e),d=e[61]&&pm(e);return{c(){t=kn("div"),l&&l.c(),o=Mn(),c&&c.c(),i=Mn(),d&&d.c(),An(t,"id",e[4]),An(t,"class",e[77]),An(t,"data-env",e[75]),An(t,"dir",e[12])},m(u,h){wn(u,t,h),l&&l.m(t,null),bn(t,o),c&&c.m(t,null),bn(t,i),d&&d.m(t,null),e[431](t),r=!0,n||(s=[Pn(Gp,"keydown",e[217]),Pn(Gp,"keyup",e[218]),Pn(Gp,"blur",e[219]),Pn(Gp,"paste",e[223]),Pn(Gp,"resize",e[410]),Pn(t,"ping",(function(){Jr(e[69])&&e[69].apply(this,arguments)})),Pn(t,"contextmenu",e[220]),Pn(t,"touchstart",e[215],{passive:!1}),Pn(t,"touchmove",(function(){Jr(e[72])&&e[72].apply(this,arguments)})),Pn(t,"pointermove",(function(){Jr(e[71])&&e[71].apply(this,arguments)})),Pn(t,"transitionend",e[205]),Pn(t,"dropfiles",e[221]),Pn(t,"measure",e[432]),Pn(t,"click",(function(){Jr(e[43]?e[222]:a)&&(e[43]?e[222]:a).apply(this,arguments)})),hn($c.call(null,t,{observeViewRect:!0,isMeasureRoot:!0})),hn(fc.call(null,t)),hn(bc.call(null,t))],n=!0)},p(n,a){(e=n)[41]?l?(l.p(e,a),1024&a[1]&&xa(l,1)):(l=Zp(e),l.c(),xa(l,1),l.m(t,o)):l&&(ya(),va(l,1,1,(()=>{l=null})),ba()),e[102]>0?c?c.p(e,a):(c=hm(e),c.c(),c.m(t,i)):c&&(c.d(1),c=null),e[61]?d?(d.p(e,a),1073741824&a[1]&&xa(d,1)):(d=pm(e),d.c(),xa(d,1),d.m(t,null)):d&&(ya(),va(d,1,1,(()=>{d=null})),ba()),(!r||16&a[0])&&An(t,"id",e[4]),(!r||32768&a[2])&&An(t,"class",e[77]),(!r||8192&a[2])&&An(t,"data-env",e[75]),(!r||4096&a[0])&&An(t,"dir",e[12])},i(e){r||(xa(l),xa(d),r=!0)},o(e){va(l),va(d),r=!1},d(o){o&&Sn(t),l&&l.d(),c&&c.d(),d&&d.d(),e[431](null),n=!1,Kr(s)}}}const $m=1,fm="stage-overlay",ym=10;function bm(e,t,o){let i,r,n,s,l,c,d,u,h,p,g,$,y,b,x,S,k,C,T,M,P,E,I,A,z,F,D,O,B,W,_,V,N,H,j,U,Z,X,Y,q,K,J,Q,ee,te,oe,ie,re,ne,ae,le,ce,he,pe,me,ge,$e,fe,ye,be,ve,we,Se,ke,Ce,Te,Me,Re,Pe,Ee,Ie,Ae,Le,ze,Fe,De,Oe,Be,_e,Ve,Ne,He,je,Ue,Ge,Ze,Xe,Ye,qe,et,tt,it,rt,at,ct,dt,mt,gt,yt,bt,wt,kt,Tt,Mt,Rt,Pt,Et,It,At,Lt,zt,Ft,Dt,Ot,Bt,Vt,Nt,Ht,jt,Ut,Gt,Zt,Yt,qt,Kt,Jt,Qt,eo,to,oo,io,ro,no,ao,so,lo,uo,ho,po,mo,go,fo,yo,bo,xo,vo,wo,So,ko,Co,To,Mo,Ro,Po,Eo,Io,Lo,zo,Fo,Do,Oo,Bo,Wo,_o,No,Ho,jo,Uo,Go,Zo,Yo,Ko,Jo,Qo,ei,ti,oi,ii,ri,ni,ai,si,li,ci,di,ui,hi,pi,mi,gi,$i,yi,bi,xi,vi,wi,Si,Ti,Mi,Ri,Ei,Ii,Li,zi,Fi,Di,Oi,Bi,Wi=Gr,_i=Gr;on(e,tc,(e=>o(398,Yo=e))),e.$$.on_destroy.push((()=>Wi())),e.$$.on_destroy.push((()=>_i()));const Vi=Xo(),Ni=qn();let Hi,ji,{class:Ui}=t,{layout:Gi}=t,{stores:Zi}=t,{locale:Xi}=t,{id:Yi}=t,{util:qi}=t,{utils:Ki}=t,{animations:Ji="auto"}=t,{disabled:Qi=!1}=t,{status:er}=t,{previewUpscale:tr=!1}=t,{previewPad:or=!1}=t,{previewMaskOpacity:ir=.95}=t,{previewImageDataMaxSize:rr}=t,{previewImageTextPixelRatio:nr}=t,{markupMaskOpacity:ar=1}=t,{zoomMaskOpacity:sr=.85}=t,{elasticityMultiplier:lr=10}=t,{willRevert:cr=(()=>Promise.resolve(!0))}=t,{willProcessImage:dr=(()=>Promise.resolve(!0))}=t,{willRenderCanvas:ur=G}=t,{willRenderToolbar:hr=G}=t,{willSetHistoryInitialState:mr=G}=t,{enableButtonExport:gr=!0}=t,{enableButtonRevert:$r=!0}=t,{enableNavigateHistory:fr=!0}=t,{enableToolbar:xr=!0}=t,{enableUtils:vr=!0}=t,{enableButtonClose:wr=!1}=t,{enableDropImage:kr=!1}=t,{enablePasteImage:Cr=!1}=t,{enableBrowseImage:Tr=!1}=t,{enableTransparencyGrid:Mr=!1}=t,{layoutDirectionPreference:Rr="auto"}=t,{layoutHorizontalUtilsPreference:Pr="left"}=t,{layoutVerticalUtilsPreference:Er="bottom"}=t,{layoutVerticalToolbarPreference:Ir="top"}=t,{layoutVerticalControlGroupsPreference:Ar="bottom"}=t,{layoutVerticalControlTabsPreference:Lr="bottom"}=t,{textDirection:zr}=t,{markupEditorZoomLevel:Fr=null}=t,{markupEditorZoomLevels:Dr}=t,{markupEditorZoomAdjustStep:Or}=t,{markupEditorZoomAdjustFactor:Br}=t,{markupEditorZoomAdjustWheelFactor:Wr}=t,{markupEditorInteractionMode:_r=!1}=t,{muteAudio:Vr=!0}=t,{willSetMediaInitialTimeOffset:Nr=((e,t)=>e*Dp(t[0]))}=t,{enablePan:Hr=!0}=t,{enableZoom:Zr=!0}=t,{enableZoomControls:Xr=!0}=t,{enableZoomInput:Yr}=t,{enablePanInput:qr}=t,{enableCanvasAlpha:Kr=!1}=t,{enablePanLimit:Jr}=t,{panLimitGutterScalar:Qr}=t,{zoomPresetOptions:rn=[.25,.5,1,1.25,1.5,2,3,4,6,8,16]}=t,{zoomAdjustStep:nn=.25}=t,{zoomAdjustFactor:an=.1}=t,{zoomAdjustWheelFactor:sn=1}=t,{zoomLevel:ln=null}=t;let{imagePreviewSrc:cn}=t,{imageOrienter:dn={read:()=>1,apply:e=>e}}=t,{pluginComponents:hn}=t,{pluginOptions:pn={}}=t;const mn=Vi.sub,gn={};let{root:$n}=t;const fn=()=>{mt.setAttribute("data-redraw","true"),_n.set({})},yn=Ba(!0);on(e,yn,(e=>o(464,Nt=e)));const bn=Ba(void 0);on(e,bn,(e=>o(406,di=e)));const xn=Ba(0);on(e,xn,(e=>o(407,ui=e)));const vn=Ba(0),wn=Ba(!1),Sn=e=>{wn.set("play"===e.type),Vi.pub(e.type)};let kn,Cn;let Tn,Mn,Rn=!1;const Pn=()=>{if(!r||!In())return;Mn=u,un(bn,di=void 0,di);const e=mt;Rn=!1;const t=1/24,o=On();(Math.abs(c*o-ui*o)<=t||o-o*ui<=t)&&un(xn,ui=l,ui),Wn(On()*ui),e.play().catch((()=>{}));const i=()=>{In()||(Tn=requestAnimationFrame(i),un(xn,ui=Bn()/On(),ui),Mn>=0&&ui>=c&&(un(xn,ui=c,ui),En()),u>-1&&(Rn=!0),Rn&&-1===u&&h>0&&(un(xn,ui=s[h][0],ui),Wn(ui*On())),fn())};i()},En=()=>{r&&!In()&&(un(bn,di=void 0,di),Mn=void 0,mt.pause(),cancelAnimationFrame(Tn),fn())},In=()=>mt&&mt.paused,An=()=>{if(r)return In()?Pn():En()},Ln=()=>{if(!r)return;mt.muted=!0},zn=()=>{if(!r)return;mt.muted=!1},Fn=()=>{r&&un(Dn,ci=!ci,ci)},Dn=Ba(Vr);on(e,Dn,(e=>o(405,ci=e)));const On=()=>{if(r)return mt.duration},Bn=()=>{if(!r)return;return mt.currentTime},Wn=e=>{if(!r)return;mt.currentTime=e,vn.set(e)};Kn("previewcontrols",{play:Pn,pause:En,togglePlayPause:An,mute:Ln,unmute:zn,toggleMute:Fn,setCurrentTime:Wn,getCurrentTime:Bn,getDuration:On,currentTime:vn,frameOffset:xn,framePeekOffset:bn,isPlaying:wn,isMuted:Dn});const _n=Ba({});on(e,_n,(e=>o(53,Ut=e))),Kn("redrawTrigger",_n);const Vn=Ba(lr);on(e,Vn,(e=>o(480,si=e))),Kn("elasticityMultiplier",Vn);let Nn=[];const Hn=ec();on(e,Hn,(e=>o(102,Bi=e)));const jn=Fl()||1024,Un=We(jn,jn),Gn=Cs(),Zn=e=>Promise.resolve(ai&&ai(e,{resourceType:"image"})).then((t=>{if(!1===t)return;const{headers:o,credentials:i}=t||{};return fetch(e,{headers:o,credentials:i}).then((e=>{if(200!==e.status)throw`${e.status} (${e.statusText})`;return e.blob()})).then((e=>Cp(e,dn,Gn))).then((e=>Tp(e,$)))}));let{imageSourceToImageData:Xn=(e=>R(e)?Zn(e):Wt(e)?new Promise((t=>t(m(e)))):co(e)||_t(e)?Cp(e,dn,Gn).then((e=>Tp(e,$))):void 0)}=t;const Jn=(()=>{let e,t;const o=xp.reduce(((e,o)=>(e[o]=function(e,t,o){let i=[];return{set:t,update:o,publish:e=>{i.forEach((t=>t(e)))},subscribe:t=>(i.push(t),e(t),()=>{i=i.filter((e=>e!==t))})}}((e=>{if(!t)return e();t.stores[o].subscribe(e)()}),(e=>{t&&t.stores[o].set(e)}),(e=>{t&&t.stores[o].update(e)})),e)),{});return{update:i=>{if(t=i,e&&(e.forEach((e=>e())),e=void 0),!i)return o.file.publish(void 0),void o.loadState.publish(void 0);e=xp.map((e=>i.stores[e].subscribe((t=>{o[e].publish(t)}))))},stores:o,destroy:()=>{e&&e.forEach((e=>e()))}}})(),{file:Qn,size:ea,duration:oa,trim:ia,volume:ra,minDuration:na,maxDuration:aa,loadState:sa,processState:la,cropAspectRatio:ca,cropLimitToImage:da,crop:ua,cropMinSize:ha,cropMaxSize:pa,cropRange:ma,cropOrigin:ga,cropRectAspectRatio:$a,rotation:fa,rotationRange:ya,targetSize:ba,flipX:xa,flipY:va,backgroundColor:wa,backgroundImage:Sa,colorMatrix:ka,convolutionMatrix:Ca,gamma:Ta,vignette:Ma,noise:Ra,decoration:Pa,annotation:Ea,manipulation:Ia,redaction:Aa,frame:La,selection:za,state:Fa}=Jn.stores;on(e,Qn,(e=>o(382,mo=e))),on(e,ea,(e=>o(355,bt=e))),on(e,oa,(e=>o(408,hi=e))),on(e,ia,(e=>o(403,ni=e))),on(e,ra,(e=>o(404,li=e))),on(e,aa,(e=>o(409,pi=e))),on(e,sa,(e=>o(374,oo=e))),on(e,la,(e=>o(373,to=e))),on(e,ca,(e=>o(477,Jo=e))),on(e,da,(e=>o(86,yi=e))),on(e,ua,(e=>o(393,zo=e))),on(e,fa,(e=>o(358,Tt=e))),on(e,xa,(e=>o(357,kt=e))),on(e,va,(e=>o(356,wt=e))),on(e,wa,(e=>o(364,Ot=e))),on(e,Pa,(e=>o(49,yt=e))),on(e,Ea,(e=>o(50,Mt=e))),on(e,Ia,(e=>o(361,zt=e))),on(e,Aa,(e=>o(362,Ft=e))),on(e,La,(e=>o(48,gt=e))),on(e,za,(e=>o(60,oi=e))),on(e,Fa,(e=>o(466,yo=e)));const Da=(e,t,o=0)=>new Promise(((i,r)=>{if(kp(e)){return void(qo()?(async e=>{const t=await Np(e),o=new DataView(t);return Up(o)})(e):Promise.resolve()).then((t=>{const o=document.createElement("video");o.onerror=()=>console.error(o.error),o.playsInline=!0,o.preload="auto",o.onloadeddata=()=>{o.onloadeddata=void 0,o.dataset.rotation=t||"0",Ms(o).then((()=>{const e=Nr(o.duration,ni||[[0,1]]);e>0?(o.onseeked=()=>{o.onseeked=void 0,i(o)},o.currentTime=e):(o.currentTime=e,i(o))}))},o.src=URL.createObjectURL(e),o.load()}))}let n,a=!1;t.cancel=()=>a=!0;const s=Date.now();Xn(e).then((e=>{const t=Date.now()-s;clearTimeout(n),n=setTimeout((()=>{a||i(e)}),Math.max(0,o-t))})).catch(r)})),{images:_a,shapePreprocessor:Va,imageScrambler:Na,imageRedactionRendering:Ha,willRequest:ja,willRequestResource:Ua}=Zi;let Ga;on(e,_a,(e=>o(402,ri=e))),on(e,Va,(e=>o(401,ii=e))),on(e,Na,(e=>o(365,Bt=e))),on(e,Ha,(e=>o(363,Dt=e))),on(e,ja,(e=>o(82,ai=e))),on(e,Ua,(e=>o(93,Mi=e)));const Za=Wa(Sa,((e,t)=>{if(!e)return t(void 0);Ga&&(Ga.cancel(),Ga=void 0),Ga={cancel:a},Da(e,Ga).then(t).catch((e=>{}))})),Xa=Fa.subscribe((e=>Vi.pub("update",e))),Ya=Ba();Kn("ui",Ba({})),Kn("selection",za);const qa=Ba(!0);on(e,qa,(e=>o(95,Ei=e)));const Ka=Ba(!0);on(e,Ka,(e=>o(97,Li=e)));const Ja=Ba(!0);on(e,Ja,(e=>o(400,ti=e)));const Qa=Ba(!0);on(e,Qa,(e=>o(478,Qo=e)));const es=Ba(!0);on(e,es,(e=>o(98,zi=e)));const ts=Ba();on(e,ts,(e=>o(99,Fi=e)));const os=Ba();on(e,os,(e=>o(479,ei=e)));const is=Wa([os,Qa],(()=>void 0!==ei?ei:Qo));on(e,is,(e=>o(96,Ii=e)));const rs=Ba([0,0,0]);on(e,rs,(e=>o(57,So=e)));const as=Ba([1,1,1]);on(e,as,(e=>o(462,Lt=e)));const ss=ec([1,1,1]);on(e,ss,(e=>o(461,At=e)));const ls=Ba();on(e,ls,(e=>o(92,Ti=e)));const cs=Ba(),us=Ba();on(e,us,(e=>o(52,Ht=e)));const hs=Ba();on(e,hs,(e=>o(359,Pt=e)));const ps=Ba(Je());on(e,ps,(e=>o(81,bo=e)));const ms=Ba(0);on(e,ms,(e=>o(399,Ko=e)));const gs=Ba(Je());on(e,gs,(e=>o(85,$i=e)));const $s=Ba();on(e,$s,(e=>o(459,dt=e)));const fs=Sp("(pointer: fine)",(e=>e?"pointer-fine":"pointer-coarse"));on(e,fs,(e=>o(380,ho=e)));const ys=Sp("(hover: hover)",(e=>e?"pointer-hover":"pointer-no-hover"));on(e,ys,(e=>o(379,uo=e)));const bs=Ba(!1),xs=Ba(!1);on(e,xs,(e=>o(360,It=e)));const vs=Oa(void 0,(e=>{const t=ec(0),o=[xs.subscribe((e=>{t.set(e?1:0)})),t.subscribe(e)];return()=>o.forEach((e=>e()))}));on(e,vs,(e=>o(460,Et=e)));const ws=Ba();on(e,ws,(e=>o(465,ao=e)));const Ss=Ba();let ks;on(e,Ss,(e=>o(54,Zt=e))),Kn("isAnimated",Ss);const Ts=Ba(tr);on(e,Ts,(e=>o(383,go=e)));const Rs=Ba(!1);on(e,Rs,(e=>o(471,Bo=e))),Kn("imageIsStatic",Rs);const Ps=Ba();on(e,Ps,(e=>o(472,Wo=e)));const Es=Ba();on(e,Es,(e=>o(469,Do=e)));const Is=Oa(void 0,(e=>{const t=Ba(void 0),o=[ua.subscribe((()=>{if(!zo)return;if(Bo)return t.set(Ke(zo));const e=gd(zo,Do,5*lr);t.set(e)})),t.subscribe(e)];return()=>o.forEach((e=>e()))})),As=Ba();on(e,As,(e=>o(468,Lo=e)));const Ls=Ba();on(e,Ls,(e=>o(470,Oo=e)));const zs=Ba(void 0);on(e,zs,(e=>o(475,Uo=e)));const Fs=Ba(de());on(e,Fs,(e=>o(476,Go=e)));const Ds=(e,t)=>{if(!t||!e)return{top:0,right:0,bottom:0,left:0};const o=br(t,e,y),i=yr(o,e);return{top:Math.abs(i.top),right:Math.abs(i.right),bottom:Math.abs(i.bottom),left:Math.abs(i.left)}},Os=Ba({}),Bs=Wa([$s,ps,gs,Os],(([e,t,o,i],r)=>{if(!e)return r(void 0);let n=0;1!==O.length||p||"bottom"===Ir||(n=o.y+o.height),r(nt(e.x+t.x,e.y+t.y+n,e.width,e.height))}));let Ws={left:0,right:0,top:0,bottom:0};const _s=Ba(!1),Vs=Wa([_s,La,Bs,xs],(([e,t,o,i],r)=>{if(!o)return r({left:0,right:0,top:0,bottom:0});if(!e)return;const n=Math.min(o.width,o.height),a=Ds({width:n,height:n},t);se(Ws.top,4)===se(a.top,4)&&se(Ws.bottom,4)===se(a.bottom,4)&&se(Ws.right,4)===se(a.right,4)&&se(Ws.left,4)===se(a.left,4)||(Ws=a,r(a))}));on(e,Vs,(e=>o(391,Po=e)));const Ns=Wa([_s,Vs],(([e,t],o)=>{if(!e)return o(!1);o(Object.values(t).some((e=>e>0)))}));on(e,Ns,(e=>o(392,Eo=e)));const Hs=Wa([_s,$s,Ns,Vs],(([e,t,o,i],r)=>{if(t)return e&&o?void r(nt(t.x+i.left,t.y+i.top,t.width-i.left-i.right,t.height-i.top-i.bottom)):r({...t})})),js=Wa([Bs,Ns,Vs],(([e,t,o],i)=>e?t?void i(nt(e.x+o.left,e.y+o.top,e.width-o.left-o.right,e.height-o.top-o.bottom)):i(e):i(void 0)));on(e,js,(e=>o(51,Rt=e)));const Us=Wa([Rs,ea,fa],(([e,t,o],i)=>{if(!e||!t)return i(void 0);const r=Qe(t);i($t(r,o))})),Gs=Wa([Us],(([e],t)=>{if(!e)return t(void 0);const o=ot(e);t(Ct(o))}));on(e,Gs,(e=>o(394,Fo=e)));const Zs=Wa([js,ua,Gs,Ts],(([e,t,o,i],r)=>{if(!e||!t||!(!Wo&&!Do))return;const{width:n,height:a}=o||t,s=Math.min(e.width/n,e.height/a);r(i?s:Math.min(1,s))}));on(e,Zs,(e=>o(395,No=e)));Kn("imageStaticVisualCorners",Wa([Rs,ea,fa,js,$s,Zs],(([e,t,o,i,r,n],a)=>{if(!(e&&i&&r&&t))return a(void 0);const s=Qe(t),l=Ct(lt(s,n)),c=ft(i,l);l.x=c.x,l.y=c.y;a($t(l,o))})));const Xs=Ba(void 0);on(e,Xs,(e=>o(397,Zo=e)));const Ys=Wa([ua,js],(([e,t])=>{if(t&&e)return Math.min(t.width/e.width,t.height/e.height)})),qs=Wa([ua,As],(([e,t])=>e&&t?Math.min(e.width/t.width,e.height/t.height):1));on(e,qs,(e=>o(101,Oi=e)));const Ks=Wa([Xs,qs],(([e,t])=>e&&t?t*e:1));on(e,Ks,(e=>o(474,Ho=e)));const Js=Ba(de());on(e,Js,(e=>o(396,jo=e)));const Qs=Ba({scalar:Ho,translation:jo}),el=()=>{Qs.set({scalar:void 0,translation:de()})},tl=Oa(void 0,(e=>{const t=ec(void 0,{precision:1e-4}),o=1===Vd()?e=>St(e,Math.round):G,i=()=>{if(!Lo)return;const e=It||!ao;if(Bo){const o=Ke(Lo);return st(o,Go),st(o,Rt),t.set(o,{hard:e})}const i=gd(Lo,Uo,$m*lr);i.width<0&&(i.width=0,i.x=Lo.x),i.height<0&&(i.height=0,i.y=Lo.y),st(i,Rt),st(i,jo),lt(i,Ho),!e&&o(i),t.set(i,{hard:e})},r=[js.subscribe(i),As.subscribe(i),Ks.subscribe(i),Js.subscribe(i),La.subscribe(i),t.subscribe(e)];return()=>r.forEach((e=>e()))}));on(e,tl,(e=>o(59,Ro=e)));const ol=Ba(1);on(e,ol,(e=>o(467,Io=e)));const il=()=>{if(!zo||!Rt)return;let e=ut(Ke(zo),No||1);const t=ft(Rt,ut(Ke(Fo),No));st(e,t);const o=dt.width/e.width,i=dt.height/e.height,r=Math.min(1,o,i);ol.set(r),lt(e,r),((e,t)=>{const[o,i,r,n]=vt(e);ot.width&&(e.x=t.width-e.width),r>t.height&&(e.y=t.height-e.height),n{e&&(o||i)&&r(nl(e,t||1,o||i))}));on(e,rl,(e=>o(100,Di=e)));const nl=(e,t,o)=>o.width<=e.width&&o.height<=e.height?ft(e,ut(Ke(o),t)):xt(e,pt(o));let sl,ll;const cl=e=>{if(p&&sl&&ht(sl,e)&&ll===No)return;if(Bo)return il();sl=e,ll=No;const t=nl(e,No,zo||bt);As.set(t)};let ul=!1;const hl=Zs.subscribe((e=>{!ul&&void 0!==e&&zo&&(cl(Rt),ul=!0)})),pl=js.subscribe((e=>{e&&void 0!==No&&zo&&cl(e)})),ml=Rs.subscribe((e=>{!e&&Rt&&cl(Rt)}));let gl;const $l=Ls.subscribe((e=>{if(!e)return gl=void 0,void un(Ps,Wo=void 0,Wo);gl=_o;const t=Ke(zo);Ps.set(t)})),fl=As.subscribe((e=>{if(!e||!Oo)return;const t=(o=Ke(e),i=Oo,o.x-=i.x,o.y-=i.y,o.width-=i.width,o.height-=i.height,o);var o,i;((e,t)=>{e.x/=t,e.y/=t,e.width/=t,e.height/=t})(t,gl);const r=((e,t)=>(e.x+=t.x,e.y+=t.y,e.width+=t.width,e.height+=t.height,e))(Ke(Wo),t);ua.set(r)})),yl=ua.subscribe((e=>{if(!e||!Lo)return;if(Bo)return void(Oo||il());if(It||Oo||Do)return;const t=pt(Lo),o=pt(e);if(se(t,6)===se(o,6))return;const{width:i,height:r}=Fo||zo,n=Math.min(Rt.width/i,Rt.height/r),a=We(e.width*n,e.height*n),s=.5*(Lo.width-a.width),l=.5*(Lo.height-a.height),c=nt(Lo.x+s,Lo.y+l,a.width,a.height);As.set(c)})),bl=Wa([Zs,ua,As,Rs],(([e,t,o,i],r)=>{if(!e||!t||!o)return;if(i)return r(Io);const n=o.width/t.width,a=o.height/t.height;r(Math.max(n,a)/e)})),xl=Wa([Zs,bl],(([e,t],o)=>{if(!t)return;o(e*t)}));on(e,xl,(e=>o(473,_o=e)));let vl={left:0,right:0,top:0,bottom:0};const wl=Wa([La,As],(([e,t],o)=>{if(!t)return o(vl);const i=Ds(t,e);se(vl.top,4)===se(i.top,4)&&se(vl.bottom,4)===se(i.bottom,4)&&se(vl.right,4)===se(i.right,4)&&se(vl.left,4)===se(i.left,4)||(vl=i,o(i))})),Sl=Wa([wl],(([e],t)=>{t(Object.values(e).some((e=>e>0)))})),kl=ec(.075,{stiffness:.03,damping:.4,precision:.001}),Cl=Wa([ss,rs,kl,tl,Ks,La,Sl,wl,Ns],(([e,t,o,i,r,n,a,s,l],c)=>{if(!i||p)return c([]);let{x:d,y:u,width:h,height:m}=i;d+=.5,u+=.5,h-=.5,m-=.5;const g=[];if(n){if(a){let{left:e,right:o,top:i,bottom:n}=s;e*=r,o*=r,i*=r,n*=r;const a=Lp(t)?[1,1,1,.125]:[0,0,0,.075];g.push({x:d-e-.5,y:u-i-.5,width:h+e+o+1,height:m+i+n+1,strokeWidth:1,strokeColor:a,opacity:l?1:.5})}const i=Lp(e);n&&n.frameColor&&Lp(n.frameColor)||i||(g.push({x:d-1,y:u-1,width:h+2,height:m+2,strokeWidth:2,strokeColor:[0,0,0,.1],opacity:o}),g.push({x:d+1,y:u+1,width:h-2,height:m-2,strokeWidth:2,strokeColor:[0,0,0,.1],opacity:o}))}c([...g,{x:d,y:u,width:h,height:m,strokeWidth:1,strokeColor:e,opacity:o}])})),Tl=Ba([]);on(e,Tl,(e=>o(385,xo=e)));const Ml=Wa([Cl,Tl],(([e,t],o)=>{o([...e,...t])}));on(e,Ml,(e=>o(94,Ri=e)));const Rl=ec(0,{precision:.001});on(e,Rl,(e=>o(387,wo=e)));const Pl=ec();on(e,Pl,(e=>o(390,To=e)));const El=ec();on(e,El,(e=>o(389,Co=e)));const Il=ec();on(e,Il,(e=>o(388,ko=e)));const Al=ec();on(e,Al,(e=>o(386,vo=e)));const Ll=Ba(!1);on(e,Ll,(e=>o(372,eo=e)));const zl=Ba();let Ol;on(e,zl,(e=>o(375,io=e)));const Bl=Wa([Ll,zl],(([e,t],i)=>{if(!e||!t)return void i(void 0);if(Ol&&(Ol.cancel(),o(282,Ol=void 0)),Sr(t))return i(w(t));const r=ac.length?0:Zt?250:0;o(282,Ol={cancel:a}),Da(t,Ol,r).then(i).catch((e=>{un(sa,oo.error=e,oo)})).finally((()=>{o(282,Ol=void 0)}))}));Wi(),Wi=en(Bl,(e=>o(354,mt=e)));let{imagePreviewCurrent:Wl}=t;const _l=Ba({});on(e,_l,(e=>o(377,so=e)));const Vl=Ba([]);on(e,Vl,(e=>o(87,bi=e)));const Nl=Wa([js,hs,ea,Is,As,xl,fa,xa,va,Ks,Js,bs],(([e,t,o,i,r,n,a,s,l,c,d,u],h)=>{if(!e||!r)return;const p=al(e,t,o,i,r,c,d,n,a,s,l);!u&&z(p),h(p)}));on(e,Nl,(e=>o(378,lo=e)));const Hl=Wa([ka,Ca,Ta,Ma,Ra],(([e,t,o,i,r],n)=>{const a=e&&Object.keys(e).map((t=>e[t])).filter(Boolean);n({gamma:o||void 0,vignette:i||void 0,noise:r||void 0,convolutionMatrix:t||void 0,colorMatrix:a&&a.length&&jr(a)})}));let jl,Ul;const Gl=(()=>{if(!$o())return!1;const e=navigator.userAgent.match(/OS (\d+)_(\d+)_?(\d+)?/i)||[],[,t,o]=e.map((e=>parseInt(e,10)||0));return t>13||13===t&&o>=4})(),Zl=Ba({});on(e,Zl,(e=>o(366,jt=e))),Kn("env",Zl);const Xl=Vd(),Yl=Oa(Xl,(e=>{const t=()=>e(Vd()),o=matchMedia(`(resolution: ${Xl}dppx)`);return o.addListener(t),()=>o.removeListener(t)}));on(e,Yl,(e=>o(58,Mo=e)));const ql=((e,t)=>{const{sub:o,pub:i}=Xo(),r=[],n=Ba(0),a=[],s=()=>a.forEach((e=>e({index:tn(n),length:r.length}))),l={get index(){return tn(n)},set index(e){e=Number.isInteger(e)?e:0,e=ns(e,0,r.length-1),n.set(e),t(r[l.index]),s()},get state(){return r[r.length-1]},length:()=>r.length,undo(){const e=l.index--;return i("undo",e),e},redo(){const e=l.index++;return i("redo",l.index),e},revert(){r.length=1,l.index=0,i("revert")},write(o){o&&t({...e(),...o});const a=e(),c=r[r.length-1];JSON.stringify(a)!==JSON.stringify(c)&&(r.length=l.index+1,r.push(a),n.set(r.length-1),s(),i("writehistory"))},set(e={}){r.length=0,l.index=0;const t=Array.isArray(e)?e:[e];r.push(...t),l.index=r.length-1},get:()=>[...r],subscribe:e=>(a.push(e),e({index:l.index,length:r.length}),()=>a.splice(a.indexOf(e),1)),on:o};return l})((()=>yo),(e=>{un(Fa,yo=e,yo),ps.set(bo)}));_i(),_i=en(ql,(e=>o(384,fo=e)));const Kl=()=>{const e={x:0,y:0,...bt},t=St(xt(e,yo.cropAspectRatio),Math.round),o=mr({...yo,rotation:0,crop:t},yo),i=[o];JSON.stringify(o)!==JSON.stringify(yo)&&i.push({...yo}),ql.set(i)},Ql=sa.subscribe((e=>{e&&e.complete&&Kl()})),oc=()=>cr().then((e=>e&&ql.revert())),ic=Ba(!1);on(e,ic,(e=>o(367,Gt=e)));const rc=()=>{un(ic,Gt=!0,Gt),dr().then((e=>{if(!e)return void un(ic,Gt=!1,Gt);let t;t=Lc.subscribe((e=>{1===e&&(t&&t(),Ni("processImage"))}))}))},nc=la.subscribe((e=>{if(!e)return void un(ic,Gt=!1,Gt);un(ic,Gt=!0,Gt);const{complete:t,abort:o}=e;(t||o)&&un(ic,Gt=!1,Gt)})),ac=Ap();on(e,ac,(e=>o(56,ro=e)));const sc=Wa([ac],(([e],t)=>{if(!e.length)return t();const{origin:o,translation:i,rotation:r,scale:n}=e[0];t({origin:o,translation:i,rotation:r,scale:n})})),lc=Ba();on(e,lc,(e=>o(381,po=e)));let cc,dc=[];const uc=Ba(),hc=Ba(),pc=Wa([Xs,hc,Zs,Ys],(([e,t,o,i])=>e||(t||o<1?i:1))),mc={...Zi,imageFile:Qn,imageSize:ea,mediaDuration:oa,mediaMinDuration:na,mediaMaxDuration:aa,mediaTrim:ia,imageBackgroundColor:wa,imageBackgroundImage:Sa,imageCropAspectRatio:ca,imageCropMinSize:ha,imageCropMaxSize:pa,imageCropLimitToImage:da,imageCropRect:ua,imageCropRectOrigin:ga,imageCropRectSnapshot:Ps,imageCropRectAspectRatio:$a,imageCropRange:ma,imageRotation:fa,imageRotationRange:ya,imageFlipX:xa,imageFlipY:va,imageOutputSize:ba,imageColorMatrix:ka,imageConvolutionMatrix:Ca,imageGamma:Ta,imageVignette:Ma,imageNoise:Ra,imageManipulation:Ia,imageDecoration:Pa,imageAnnotation:Ea,imageRedaction:Aa,imageFrame:La,imagePreview:Bl,imagePreviewSource:zl,imageTransforms:Nl,imagePreviewModifiers:_l,history:ql,animation:ws,pixelRatio:Yl,elasticityMultiplier:lr,scrollElasticity:ym,rangeInputElasticity:5,redrawTrigger:_n,pointerAccuracy:fs,pointerHoverable:ys,env:Zl,rootRect:hs,stageRect:js,stageRectBase:Bs,stageRecenter:Os,stageScalar:Zs,stagePadding:Vs,stagePadded:Ns,presentationScalar:xl,imagePreviewUpscale:hc,utilRect:$s,utilRectPadded:Hs,allowPlayPause:yn,allowPan:qa,allowZoom:Ka,allowZoomControls:Ja,enableZoomInput:es,enablePanInput:Qa,enablePanInputStatus:is,imageSelectionMultiTouching:uc,rootBackgroundColor:rs,rootForegroundColor:as,rootLineColor:ss,rootColorSecondary:cs,imageOutlineOpacity:kl,utilTools:lc,imageSelectionPan:Js,imageSelectionZoom:Xs,imageSelectionZoomCurrent:pc,imageSelectionStageFitScalar:Ys,imageSelectionStoredState:Qs,imageOverlayMarkup:Tl,interfaceImages:Vl,isInteracting:xs,isTransformingImage:bs,isInteractingFraction:vs,imageCropRectIntent:Es,imageCropRectPresentation:Is,imageSelectionRect:As,imageSelectionRectIntent:zs,imageSelectionRectPresentation:tl,imageSelectionRectSnapshot:Ls,imageScalar:bl,imageTransformsInterpolated:sc,imageEffects:Hl};delete mc.image;const gc="util-"+L();let $c=[];const fc=e=>B.find((([t])=>e===t));let yc=[],bc=$o();const xc=(e,t,o)=>{let i=ye.getPropertyValue(e);i=o?o(i):/^[0-9]+$/.test(i)?parseFloat(i):void 0,t.set(i,{hard:!Zt})},wc=(e,t,o=!1)=>{const i=(e=>{const t=ye.getPropertyValue(e);return Bh(t)})(e);i&&0!==i[3]&&(o||(i.length=3),t.set(i,{hard:!Zt}))},Sc=Ba();on(e,Sc,(e=>o(88,xi=e)));const kc=Ba();on(e,kc,(e=>o(89,vi=e)));const Cc=Ba();on(e,Cc,(e=>o(90,wi=e)));const Tc=ec(0,{damping:.9});on(e,Tc,(e=>o(91,Si=e)));const Rc=()=>{wc("color",as),wc(Kr?"--color-background":"background-color",rs),wc("outline-color",ss),wc("--color-primary",ls),wc("--color-secondary",cs),wc("--grid-color-even",kc,!0),wc("--grid-color-odd",Cc,!0),xc("--grid-size",Sc),xc("--editor-inset-top",ms,(e=>parseInt(e,10)))},Pc=Wa([Nl,Hl,wa,Za],(([e,t,o,i])=>e&&{...e,...t,backgroundColor:o,backgroundImage:i}));on(e,Pc,(e=>o(376,no=e)));const Ec=()=>{const e=ac.length?void 0:{resize:1.05},t=((e,t,o={})=>{const{resize:i=1,opacity:r=0}=o,n={opacity:[ec(r,{...Ep,stiffness:.1}),G],resize:[ec(i,{...Ep,stiffness:.1}),G],translation:[ec(void 0,Ep),G],rotation:[ec(void 0,Ip),G],origin:[ec(void 0,Ep),G],scale:[ec(void 0,Ip),G],gamma:[ec(void 0,Ip),e=>e||1],vignette:[ec(void 0,Ip),e=>e||0],colorMatrix:[ec([...Pp],Ep),e=>e||[...Pp]],convolutionMatrix:[Ba(void 0),e=>e&&e.clarity||void 0],backgroundColor:[ec(void 0,Ep),(e,t,o)=>{if(Array.isArray(e)){if(Array.isArray(t)){const i=[...e];0===t[3]?(i[3]=0,o(i)):0===i[3]&&((e=[...t])[3]=0)}return e}}],backgroundImage:[Ba(void 0),G]},a=Object.entries(n).map((([e,t])=>[e,t[0]])),s=a.map((([,e])=>e)),l=Object.entries(n).reduce(((e,[t,o])=>{const[i,r]=o;return e[t]=(e,o)=>i.set(r(e,c[t],(e=>{i.set(e,{hard:!0})})),o),e}),{});let c;const d=Wa(s,(o=>(c=o.reduce(((e,t,o)=>(e[a[o][0]]=t,e)),{}),c.data=e,c.size=t,c.scale*=o[1],c)));return d.get=()=>c,d.set=(e,t)=>{const o={hard:!t};Object.entries(e).forEach((([e,t])=>{l[e]&&l[e](t,o)}))},d})(mt,bt,e);ac.unshift(t),Ic(no)},Ic=e=>{ac.forEach(((t,o)=>{const i=0===o?1:0;t.set({...e,opacity:i,resize:1},ao)}))};let Ac;const Lc=Jl(void 0,{duration:500});let zc;on(e,Lc,(e=>o(55,Jt=e)));const Fc=Ba(!1);let Dc;on(e,Fc,(e=>o(371,Qt=e)));const Oc=ec(void 0,{stiffness:.1,damping:.7,precision:.25});on(e,Oc,(e=>o(83,mi=e)));const Bc=ec(0,{stiffness:.1,precision:.05});on(e,Bc,(e=>o(84,gi=e)));const Wc=ec(0,{stiffness:.02,damping:.5,precision:.25});on(e,Wc,(e=>o(369,qt=e)));const _c=ec(void 0,{stiffness:.02,damping:.5,precision:.25});on(e,_c,(e=>o(370,Kt=e)));const Vc=ec(void 0,{stiffness:.02,damping:.5,precision:.25});let Nc;on(e,Vc,(e=>o(368,Yt=e)));const Hc=()=>{Ni("abortLoadImage")},jc=()=>{Ni("abortProcessImage"),un(ic,Gt=!1,Gt)},Uc=e=>{e.target&&"true"===e.target.dataset.touchScroll||e.preventDefault()},Gc=Gl?e=>{const t=e.touches?e.touches[0]:e;t.pageX>20&&t.pageXo(463,Vt=e))),Kn("keysPressed",Zc);const Xc=e=>{!e||Vo(e)&&!(e=>/^image/.test(e.type)&&!/svg/.test(e.type))(e)||!Vo(e)&&!/^http/.test(e)||Ni("loadImage",e)},Yc=e=>{e&&Xc(e)};let qc=void 0;let Kc,Jc=[];const Qc=Ba();Kn("rootPortal",Qc),Kn("rootRect",hs);const ed=()=>({foregroundColor:[...Lt],lineColor:[...At],utilVisibility:{...N},isInteracting:It,isInteractingFraction:Et,rootRect:Ke(Pt),stageRect:Ke(Rt),manipulationShapesDirty:yd,annotationShapesDirty:pd,decorationShapesDirty:$d,frameShapesDirty:fd}),td=(e,t,o)=>pr(e,We(t.width/o,t.height/o)),od=(e,t,o)=>{var i;return e._translate=ue((i=t).x,i.y),e._scale=o,e},id=e=>{const t=[];return e.forEach((e=>t.push(rd(e)))),t.filter(Boolean)},rd=e=>Pi(e)?(e.points=[ue(e.x1,e.y1),ue(e.x2,e.y2)],e):(!(e=>ki(e)&&!e.text.length)(e)||e.backgroundColor&&0!==e.backgroundColor[3]||(Ci(e)&&(e.width=5,e.height=e.lineHeight),e.strokeWidth=1,e.strokeColor=[1,1,1,.5],e.backgroundColor=[0,0,0,.1]),e);let nd,ad=[],sd=[],ld=[],cd=[],dd=[],ud={};const hd=(e,t,o,i,r,n,a)=>{const{manipulationShapesDirty:s,annotationShapesDirty:l,decorationShapesDirty:c,frameShapesDirty:d,selectionRect:u,scale:h}=e,p=nd!==h,m=p||!ht(ud,u);m&&(nd=h,ud=u),s&&(ld=t.filter(Ai).map(fi).map((e=>pr(e,bt)))),(l||o!==Mt)&&(ad=o.filter(Ai).map(fi).sort(((e,t)=>e.alwaysOnTop?1:t.alwaysOnTop?-1:0)).map((e=>pr(e,bt)))),(p||md||l||o!==Mt)&&(sd=id(ad.map((e=>y(e,{flipX:kt,flipY:wt,rotation:Tt,scale:h,context:Qe(bt)}))).flat())),(c||i!==yt||m)&&(cd=id(i.filter(Ai).map(fi).sort(((e,t)=>e.alwaysOnTop?1:t.alwaysOnTop?-1:0)).map((e=>td(e,u,h))).map((e=>y(e,{context:u}))).flat().map((e=>od(e,u,h))))),(d||n!==gt||m)&&(dd=n?id([n].map(fi).map((e=>td(e,u,h))).map(y).flat().map((e=>od(e,u,h)))):[]);let g=id(r.filter(Ai));return"undefined"!=typeof window&&(e=>{if(e&&e._clpdx4s)return;const[t]=[[85,110,108,105,99,101,110,115,101,100,32,80,105,110,116,117,114,97,32,105,110,115,116,97,110,99,101]].map((e=>e.map((e=>String.fromCharCode(e))).join("")));g=[...g,{x:u.x+.5*u.width-82,y:u.y+u.height-16-12,width:164,height:16,text:t,fontWeight:900,fontSize:12,color:[1,1,1,.25]}]})(window),{manipulationShapesDirty:s,manipulationShapes:ld,annotationShapesDirty:l,annotationShapes:sd,decorationShapesDirty:c,decorationShapes:cd,frameShapesDirty:d,frameShapes:dd,interfaceShapes:g,selectionShapes:a.map(fi).map((e=>pr(e,bt)))}};let pd=!0;let md=!0;let $d=!0;let fd=!0;let yd=!0;Yn((()=>{En(),mt&&R(mt.src)&&/^blob:/.test(mt.src)&&URL.revokeObjectURL(mt.src),Xa(),pl(),hl(),ml(),$l(),fl(),yl(),Ql(),nc(),fs.destroy(),ys.destroy(),Jn.destroy(),ac.clear(),ad.length=0,sd.length=0,ld.length=0,cd.length=0,dd.length=0;try{o(228,Wl=void 0),o(283,Ac=void 0)}catch(e){}}));return e.$$set=e=>{"class"in e&&o(229,Ui=e.class),"layout"in e&&o(230,Gi=e.layout),"stores"in e&&o(231,Zi=e.stores),"locale"in e&&o(3,Xi=e.locale),"id"in e&&o(4,Yi=e.id),"util"in e&&o(232,qi=e.util),"utils"in e&&o(233,Ki=e.utils),"animations"in e&&o(234,Ji=e.animations),"disabled"in e&&o(235,Qi=e.disabled),"status"in e&&o(227,er=e.status),"previewUpscale"in e&&o(236,tr=e.previewUpscale),"previewPad"in e&&o(237,or=e.previewPad),"previewMaskOpacity"in e&&o(5,ir=e.previewMaskOpacity),"previewImageDataMaxSize"in e&&o(238,rr=e.previewImageDataMaxSize),"previewImageTextPixelRatio"in e&&o(6,nr=e.previewImageTextPixelRatio),"markupMaskOpacity"in e&&o(7,ar=e.markupMaskOpacity),"zoomMaskOpacity"in e&&o(239,sr=e.zoomMaskOpacity),"elasticityMultiplier"in e&&o(8,lr=e.elasticityMultiplier),"willRevert"in e&&o(240,cr=e.willRevert),"willProcessImage"in e&&o(241,dr=e.willProcessImage),"willRenderCanvas"in e&&o(9,ur=e.willRenderCanvas),"willRenderToolbar"in e&&o(242,hr=e.willRenderToolbar),"willSetHistoryInitialState"in e&&o(243,mr=e.willSetHistoryInitialState),"enableButtonExport"in e&&o(244,gr=e.enableButtonExport),"enableButtonRevert"in e&&o(245,$r=e.enableButtonRevert),"enableNavigateHistory"in e&&o(246,fr=e.enableNavigateHistory),"enableToolbar"in e&&o(10,xr=e.enableToolbar),"enableUtils"in e&&o(247,vr=e.enableUtils),"enableButtonClose"in e&&o(248,wr=e.enableButtonClose),"enableDropImage"in e&&o(249,kr=e.enableDropImage),"enablePasteImage"in e&&o(250,Cr=e.enablePasteImage),"enableBrowseImage"in e&&o(251,Tr=e.enableBrowseImage),"enableTransparencyGrid"in e&&o(11,Mr=e.enableTransparencyGrid),"layoutDirectionPreference"in e&&o(252,Rr=e.layoutDirectionPreference),"layoutHorizontalUtilsPreference"in e&&o(253,Pr=e.layoutHorizontalUtilsPreference),"layoutVerticalUtilsPreference"in e&&o(254,Er=e.layoutVerticalUtilsPreference),"layoutVerticalToolbarPreference"in e&&o(255,Ir=e.layoutVerticalToolbarPreference),"layoutVerticalControlGroupsPreference"in e&&o(256,Ar=e.layoutVerticalControlGroupsPreference),"layoutVerticalControlTabsPreference"in e&&o(257,Lr=e.layoutVerticalControlTabsPreference),"textDirection"in e&&o(12,zr=e.textDirection),"markupEditorZoomLevel"in e&&o(258,Fr=e.markupEditorZoomLevel),"markupEditorZoomLevels"in e&&o(13,Dr=e.markupEditorZoomLevels),"markupEditorZoomAdjustStep"in e&&o(14,Or=e.markupEditorZoomAdjustStep),"markupEditorZoomAdjustFactor"in e&&o(15,Br=e.markupEditorZoomAdjustFactor),"markupEditorZoomAdjustWheelFactor"in e&&o(16,Wr=e.markupEditorZoomAdjustWheelFactor),"markupEditorInteractionMode"in e&&o(259,_r=e.markupEditorInteractionMode),"muteAudio"in e&&o(260,Vr=e.muteAudio),"willSetMediaInitialTimeOffset"in e&&o(261,Nr=e.willSetMediaInitialTimeOffset),"enablePan"in e&&o(17,Hr=e.enablePan),"enableZoom"in e&&o(18,Zr=e.enableZoom),"enableZoomControls"in e&&o(262,Xr=e.enableZoomControls),"enableZoomInput"in e&&o(19,Yr=e.enableZoomInput),"enablePanInput"in e&&o(263,qr=e.enablePanInput),"enableCanvasAlpha"in e&&o(20,Kr=e.enableCanvasAlpha),"enablePanLimit"in e&&o(21,Jr=e.enablePanLimit),"panLimitGutterScalar"in e&&o(22,Qr=e.panLimitGutterScalar),"zoomPresetOptions"in e&&o(23,rn=e.zoomPresetOptions),"zoomAdjustStep"in e&&o(24,nn=e.zoomAdjustStep),"zoomAdjustFactor"in e&&o(25,an=e.zoomAdjustFactor),"zoomAdjustWheelFactor"in e&&o(26,sn=e.zoomAdjustWheelFactor),"zoomLevel"in e&&o(0,ln=e.zoomLevel),"imagePreviewSrc"in e&&o(266,cn=e.imagePreviewSrc),"imageOrienter"in e&&o(267,dn=e.imageOrienter),"pluginComponents"in e&&o(268,hn=e.pluginComponents),"pluginOptions"in e&&o(27,pn=e.pluginOptions),"root"in e&&o(2,$n=e.root),"imageSourceToImageData"in e&&o(28,Xn=e.imageSourceToImageData),"imagePreviewCurrent"in e&&o(228,Wl=e.imagePreviewCurrent)},e.$$.update=()=>{if(1&e.$$.dirty[0]|1024&e.$$.dirty[8]&&o(0,ln=null===ln?Fr:ln),2&e.$$.dirty[0]|1048576&e.$$.dirty[8]){let e=!1;hn.forEach((([t])=>{gn[t]||(o(1,gn[t]={},gn),e=!0)})),e&&o(280,Nn=[...hn])}var t,m,v,w;if(8&e.$$.dirty[0]|65536&e.$$.dirty[7]|2&e.$$.dirty[9]&&o(335,O=Xi&&Nn.length?Ki||Nn.map((([e])=>e)):[]),134217728&e.$$.dirty[0]|2&e.$$.dirty[9]|33554432&e.$$.dirty[10]|1024&e.$$.dirty[12]&&o(336,B=((e,t,o,i)=>{const r=t.filter((([t])=>e.includes(t))).filter((([e,{isSupported:t}])=>t({...i,...o[e]}))).map((([e,t])=>[e,t.Component]));return ds(r,$c,((e,t)=>e[0]===t[0]&&e[1]===t[1]))?$c:($c=r,r)})(O,Nn,pn,{src:mo})),67108864&e.$$.dirty[10]&&o(291,W=B.length),8&e.$$.dirty[0]|4096&e.$$.dirty[9]|33554432&e.$$.dirty[10]&&o(47,_=W&&O.map((e=>{const t=fc(e);if(t)return{id:e,view:t[1],tabIcon:Xi[e+"Icon"],tabLabel:Xi[e+"Label"]}})).filter(Boolean)||[]),65536&e.$$.dirty[1]&&o(353,i=!!_.find((e=>"trim"===e.id))),12288&e.$$.dirty[11]|32&e.$$.dirty[13]&&o(290,r=!!(hi&&mt&&i)),32768&e.$$.dirty[7]|4096&e.$$.dirty[9]&&o(44,V=W&&qi&&"string"==typeof qi&&fc(qi)?qi:W>0?B[0][0]:void 0),8192&e.$$.dirty[1]|2048&e.$$.dirty[9]&&r&&V&&En(),2048&e.$$.dirty[9]|8192&e.$$.dirty[11]&&(r?(mt.addEventListener("play",Sn),mt.addEventListener("pause",Sn)):mt&&"video"===mt.nodeName&&(mt.removeEventListener("play",Sn),mt.removeEventListener("pause",Sn))),2048&e.$$.dirty[9]&&r&&xn.set(Bn()/On()),24&e.$$.dirty[13]&&(e=>{if(!In())return;const t=Date.now();if(Cn&&t-Cn<16)return;Cn=t;const o=hi*e;if(o.toFixed(1)===kn)return;kn=o.toFixed(1);const i=mt,r=()=>{i.removeEventListener("seeked",r),fn()};i.addEventListener("seeked",r),((e,t)=>{e.fastSeek&&e.fastSeek(t),e.currentTime=t})(i,o)})(di||ui),16&e.$$.dirty[13]&&o(351,n=ui&&se(ui,6)),97&e.$$.dirty[13]&&o(349,s=ni||[[0,Math.min(hi,pi)/hi]]),256&e.$$.dirty[11]&&(l=s[0][0]),256&e.$$.dirty[11]&&(c=s[s.length-1][1]),256&e.$$.dirty[11]&&o(352,d=s.map((([e,t])=>[se(e,6),se(t,6)]))),3072&e.$$.dirty[11]&&o(350,u=d.findIndex((([e,t])=>n>=e&&n<=t))),3584&e.$$.dirty[11]&&(h=-1===u&&d.findIndex(((e,t,o)=>{const i=o[t-1];return i?n<=e[0]&&n>=i[1]:n<=e[0]}))),4096&e.$$.dirty[8]&&Dn.set(Vr),8192&e.$$.dirty[11]|4&e.$$.dirty[13]&&(mt&&ci?Ln():zn()),8192&e.$$.dirty[11]|2&e.$$.dirty[13]&&mt&&(e=>{if(!r)return;mt.volume=Math.min(1,e)})(li),256&e.$$.dirty[0]&&un(Vn,si=lr,si),8192&e.$$.dirty[7]&&o(345,p="overlay"===Gi),1073741824&e.$$.dirty[7]|16&e.$$.dirty[11]&&o(45,g=vr&&!p),134217730&e.$$.dirty[0]&&pn&&Object.entries(pn).forEach((([e,t])=>{Object.entries(t).forEach((([t,i])=>{gn[e]&&o(1,gn[e][t]=i,gn)}))})),262144&e.$$.dirty[7]&&Hn.set(Qi?1:0),2097152&e.$$.dirty[7]&&($=rr?(t=rr,m=Un,We(Math.min(t.width,m.width),Math.min(t.height,m.height))):Un),1073741824&e.$$.dirty[12]&&Jn.update(ri[0]),536870912&e.$$.dirty[12]&&(y=ii?(e,t)=>ii(e,{flipX:void 0,flipY:void 0,rotation:void 0,...t,isPreview:!0}):G),536870912&e.$$.dirty[1]&&Array.isArray(oi)&&Ni("selectionchange",[...oi]),16384&e.$$.dirty[8]|268435456&e.$$.dirty[12]&&ts.set(ti&&Xr),34816&e.$$.dirty[8]&&os.set("pan"===_r||qr),2097152&e.$$.dirty[1]&&Ht&&hs.set(nt(Ht.x,Ht.y,Ht.width,Ht.height)),262160&e.$$.dirty[11]|4&e.$$.dirty[12]&&Pt&&p&&oo&&oo.complete&&(()=>{const e=Jo,t=pt(Pt);e&&e===t||(ca.set(pt(Pt)),Kl())})(),33554432&e.$$.dirty[10]&&o(46,Z=O.length>1),32768&e.$$.dirty[1]&&(Z||ps.set(Je())),1024&e.$$.dirty[0]|134217728&e.$$.dirty[12]&&(xr||gs.set(nt(0,Ko,0,0))),524352&e.$$.dirty[11]&&o(348,x=!It&&b),67108864&e.$$.dirty[12]&&o(346,S=!Yo),2097152&e.$$.dirty[1]&&o(292,qe=Ht&&Ht.width>0&&Ht.height>0),8&e.$$.dirty[0]|12288&e.$$.dirty[9]&&o(41,et=qe&&Xi&&!!W),1024&e.$$.dirty[1]&&setTimeout((()=>o(281,ks=et)),1),131072&e.$$.dirty[7]|4&e.$$.dirty[9]|160&e.$$.dirty[11]&&un(ws,ao="always"===Ji?x:"never"!==Ji&&(x&&ks&&S),ao),131072&e.$$.dirty[7]|96&e.$$.dirty[11]&&un(Ss,Zt="always"===Ji?b:"never"!==Ji&&(b&&S),Zt),524288&e.$$.dirty[7]|16&e.$$.dirty[11]&&Ts.set(tr||p),1048576&e.$$.dirty[7]&&_s.set(or),4&e.$$.dirty[0]|41943040&e.$$.dirty[12]&&$n&&($n.dispatchEvent(vp("markupzoom",Zo)),$n.dispatchEvent(vp("zoom",Ao(Zo)?Zo:No))),4&e.$$.dirty[0]|16777216&e.$$.dirty[12]&&$n&&($n.dispatchEvent(vp("markuppan",jo)),$n.dispatchEvent(vp("pan",jo))),2097152&e.$$.dirty[12]&&zo&&el(),4194304&e.$$.dirty[12]&&Fo&&il(),8396800&e.$$.dirty[1]&&V&&kl.set(.075,{hard:!Zt}),4194304&e.$$.dirty[7]&&o(343,k=sr),1572864&e.$$.dirty[12]&&o(344,C=Eo?-Math.max(...Object.values(Po)):0),277872640&e.$$.dirty[1]|12&e.$$.dirty[11]&&Ro){let e=Ro.x-Rt.x,t=Rt.x+Rt.width-(Ro.x+Ro.width),o=Ro.y-Rt.y,i=Rt.y+Rt.height-(Ro.y+Ro.height),r=Math.min(e,o,t,i);Rl.set(r>C?0:Math.min(k,Math.abs(r/64)),{hard:!Zt})}if(134217728&e.$$.dirty[1]&&o(342,T=.55/Mo),9437184&e.$$.dirty[1]|2&e.$$.dirty[11]&&Rt&&Pl.set({x:0,y:Rt.y,width:Rt.x<64?0:Rt.x,height:Rt.height+T},{hard:!Zt}),9437184&e.$$.dirty[1]|262146&e.$$.dirty[11]&&Rt&&El.set({x:0,y:0,width:Pt.width,height:Rt.y+T},{hard:!Zt}),9437184&e.$$.dirty[1]|262146&e.$$.dirty[11]&&Rt){let e=Rt.x+Rt.width,t=Pt.width-(Rt.x+Rt.width);t<64&&(e+=t,t=0),Il.set({x:e,y:Rt.y,width:t,height:Rt.height+T},{hard:!Zt})}if(9437184&e.$$.dirty[1]|262144&e.$$.dirty[11]&&Rt&&Al.set({x:0,y:Rt.y+Rt.height,width:Pt.width,height:Pt.height-(Rt.y+Rt.height)},{hard:!Zt}),67108864&e.$$.dirty[1]|294912&e.$$.dirty[12]&&o(338,M=To&&{id:fm,backgroundColor:So,opacity:wo,...To}),67108864&e.$$.dirty[1]|163840&e.$$.dirty[12]&&o(341,P=Co&&{id:fm,backgroundColor:So,opacity:wo,...Co}),67108864&e.$$.dirty[1]|98304&e.$$.dirty[12]&&o(340,E=ko&&{id:fm,backgroundColor:So,opacity:wo,...ko}),67108864&e.$$.dirty[1]|49152&e.$$.dirty[12]&&o(339,I=vo&&{id:fm,backgroundColor:So,opacity:wo,...vo}),1879048192&e.$$.dirty[10]|1&e.$$.dirty[11]&&o(337,A=[P,E,I,M].filter(Boolean)),134217728&e.$$.dirty[10]|8192&e.$$.dirty[12]&&A&&xo&&Tl.update((e=>[...e.filter((e=>e.id!==fm)),...A])),262144&e.$$.dirty[8]|1024&e.$$.dirty[12]&&zl.set(cn||(mo||void 0)),4&e.$$.dirty[0]|2048&e.$$.dirty[7]|8192&e.$$.dirty[11]&&(o(228,Wl=mt),mt&&$n.dispatchEvent(vp("loadpreview",Wl))),8&e.$$.dirty[12]&&io&&(Js.set(de()),Xs.set(void 0),el(),Vl.set([])),4096&e.$$.dirty[12]&&o(296,F=fo.index>0),4096&e.$$.dirty[12]&&o(295,D=fo.index(e[t.id]=N&&N[t.id]||0,e)),{})),8192&e.$$.dirty[1]&&o(80,H={name:gc,selected:V}),65536&e.$$.dirty[1]&&o(79,j=_.map((e=>({id:e.id,icon:e.tabIcon,label:e.tabLabel})))),65536&e.$$.dirty[1]&&o(78,U=_.map((e=>e.id))),4096&e.$$.dirty[7]&&o(77,X=Mc(["PinturaRoot","PinturaRootComponent",Ui])),262144&e.$$.dirty[11]&&o(331,Y=Pt&&(Pt.width>1e3?"wide":Pt.width<600?"narrow":void 0)),262144&e.$$.dirty[11]&&o(318,q=Pt&&(Pt.width<=320||Pt.height<=460)),262144&e.$$.dirty[11]&&o(330,K=Pt&&(Pt.height>1e3?"tall":Pt.height<600?"short":void 0)),4&e.$$.dirty[0]&&o(298,J=$n&&$n.parentNode&&$n.parentNode.classList.contains("PinturaModal")),1&e.$$.dirty[1]|524288&e.$$.dirty[9]|262144&e.$$.dirty[11]&&o(323,Q=J&&Pt&&jl>Pt.width),2&e.$$.dirty[1]|524288&e.$$.dirty[9]|262144&e.$$.dirty[11]&&o(322,ee=J&&Pt&&Ul>Pt.height),12288&e.$$.dirty[10]&&o(324,te=Q&&ee),1048576&e.$$.dirty[0]&&o(321,oe=Kr),2097152&e.$$.dirty[10]&&o(293,ie="narrow"===Y),16&e.$$.dirty[8]|262144&e.$$.dirty[11]&&o(332,(v=Pt,w=Rr,re=Pt?"auto"===w?v.width>v.height?"landscape":"portrait":"horizontal"===w?v.width<500?"portrait":"landscape":"vertical"===w?v.height<400?"landscape":"portrait":void 0:"landscape")),4194304&e.$$.dirty[10]&&o(76,ne="landscape"===re),16384&e.$$.dirty[9]|1048576&e.$$.dirty[10]&&o(320,ae=ie||"short"===K),1&e.$$.dirty[1]|262144&e.$$.dirty[11]&&o(319,le=bc&&Pt&&jl===Pt.width&&!Gl),4&e.$$.dirty[1]|512&e.$$.dirty[12]&&o(294,ce=[...po||[],...dc].filter(Boolean)),32&e.$$.dirty[8]&&o(329,he="has-navigation-preference-"+Pr),64&e.$$.dirty[8]&&o(328,pe="has-navigation-preference-"+Er),128&e.$$.dirty[8]&&o(325,me="has-toolbar-preference-"+Ir),256&e.$$.dirty[8]&&o(327,ge="has-controlgroups-preference-"+Ar),512&e.$$.dirty[8]&&o(326,$e="has-controltabs-preference-"+Lr),262144&e.$$.dirty[11]&&o(334,fe=void 0!==Pt&&Pt.width>0&&Pt.height>0),4&e.$$.dirty[0]|16777216&e.$$.dirty[10]&&o(333,ye=fe&&$n&&getComputedStyle($n)),8388608&e.$$.dirty[10]&&ye&&Rc(),1024&e.$$.dirty[0]|8437760&e.$$.dirty[1]|270336&e.$$.dirty[7]|524288&e.$$.dirty[9]|8388352&e.$$.dirty[10]|33554432&e.$$.dirty[11]|384&e.$$.dirty[12]&&Zl.set({...jt,layoutMode:Gi,orientation:re,horizontalSpace:Y,verticalSpace:K,navigationHorizontalPreference:he,navigationVerticalPreference:pe,controlGroupsVerticalPreference:ge,controlTabsVerticalpreference:$e,toolbarVerticalPreference:me,isModal:J,isDisabled:Qi,isCentered:te,isCenteredHorizontally:Q,isCenteredVertically:ee,isAnimated:Zt,isTransparent:oe,pointerAccuracy:ho,pointerHoverable:uo,isCompact:ae,hasSwipeNavigation:le,hasLimitedSpace:q,hasToolbar:xr,hasNavigation:Z&&g,isIOS:bc,browserVersion:Dl()?"chrome-"+(navigator.userAgent.match(/Chrome\/([0-9]+)/)||[])[1]:void 0}),33554432&e.$$.dirty[11]&&o(75,be=Object.entries(jt).map((([e,t])=>/^is|has/.test(e)?t?wp(e):void 0:t)).filter(Boolean).join(" ")),8192&e.$$.dirty[1]&&V&&lc.set([]),96&e.$$.dirty[12]&&o(74,ve=lo&&Object.entries(so).filter((([,e])=>null!=e)).reduce(((e,[,t])=>e={...e,...t}),{})),4&e.$$.dirty[12]&&o(315,Ce=oo&&"any-to-file"===oo.task),32&e.$$.dirty[10]&&Ce&&ac&&ac.clear(),16&e.$$.dirty[12]&&o(317,we=!!no&&!!no.translation),16&e.$$.dirty[9]|128&e.$$.dirty[10]|8192&e.$$.dirty[11]&&we&&mt&&mt!==Ac&&(o(283,Ac=mt),Ec()),128&e.$$.dirty[10]|16&e.$$.dirty[12]&&we&&Ic(no),33554432&e.$$.dirty[1]&&ro&&ro.length>1){let e=[];ac.forEach(((t,o)=>{0!==o&&t.get().opacity<=0&&e.push(t)})),e.forEach((e=>ac.remove(e)))}if(8&e.$$.dirty[0]|64&e.$$.dirty[10]&&o(40,ke=Xi&&Se.length&&Xi.labelSupportError(Se)),4&e.$$.dirty[12]&&o(307,Te=oo&&!!oo.error),4&e.$$.dirty[12]&&o(43,Me=!oo||!oo.complete&&void 0===oo.task),4&e.$$.dirty[12]&&o(308,Re=oo&&(oo.taskLengthComputable?oo.taskProgress:1/0)),32&e.$$.dirty[10]&&Ce&&un(Ll,eo=!1,eo),8388608&e.$$.dirty[1]|32&e.$$.dirty[9]|4&e.$$.dirty[12]&&oo&&oo.complete){const e=Zt?250:0;clearTimeout(zc),o(284,zc=setTimeout((()=>{un(Ll,eo=!0,eo)}),e))}if(4096&e.$$.dirty[1]|268435456&e.$$.dirty[9]|5&e.$$.dirty[12]&&o(312,Pe=oo&&!Te&&!Me&&!eo),8&e.$$.dirty[9]|8192&e.$$.dirty[11]|8&e.$$.dirty[12]&&o(311,Ee=!(!io||mt&&!Ol)),8388608&e.$$.dirty[1]|1&e.$$.dirty[12])if(eo){setTimeout((()=>Tc.set(1)),Zt?500:0)}else Tc.set(0);if(67108864&e.$$.dirty[11]|2&e.$$.dirty[12]&&o(306,Ie=!!(Gt||to&&void 0!==to.progress&&!to.complete)),134217728&e.$$.dirty[9]&&Ie&&En(),4096&e.$$.dirty[1]|4&e.$$.dirty[12]&&o(309,Ae=oo&&!(oo.error||Me)),8&e.$$.dirty[0]|4&e.$$.dirty[12]&&o(310,Le=Xi&&(oo?!oo.complete||oo.error?dl(Xi.statusLabelLoadImage(oo),oo.error&&oo.error.metadata,"{","}"):Xi.statusLabelLoadImage({progress:1/0,task:"blob-to-bitmap"}):Xi.statusLabelLoadImage(oo))),8&e.$$.dirty[0]|2&e.$$.dirty[12]&&o(305,ze=to&&Xi&&Xi.statusLabelProcessImage(to)),2&e.$$.dirty[12]&&o(303,Fe=to&&(to.taskLengthComputable?to.taskProgress:1/0)),2&e.$$.dirty[12]&&o(304,De=to&&!to.error),2&e.$$.dirty[12]&&o(302,Oe=!(!to||!to.error)),8&e.$$.dirty[0]|4096&e.$$.dirty[1]|1024&e.$$.dirty[7]|2139095040&e.$$.dirty[9]|7&e.$$.dirty[10])if(er){let e,t,i,r,n;R(er)&&(e=er),Ao(er)?t=er:Array.isArray(er)&&([e,t,n]=er,!1===t&&(r=!0),Ao(t)&&(i=!0)),o(35,Dc=(e||t)&&{text:e,aside:r||i,progressIndicator:{visible:i,progress:t},closeButton:r&&{label:Xi.statusLabelButtonClose,icon:Xi.statusIconButtonClose,onclick:n||(()=>o(227,er=void 0))}})}else o(35,Dc=Xi&&Me||Te||Pe||Ee?{text:Le,aside:Te||Ae,progressIndicator:{visible:Ae,progress:Re},closeButton:Te&&{label:Xi.statusLabelButtonClose,icon:Xi.statusIconButtonClose,onclick:Hc}}:Xi&&Ie&&ze?{text:ze,aside:Oe||De,progressIndicator:{visible:De,progress:Fe},closeButton:Oe&&{label:Xi.statusLabelButtonClose,icon:Xi.statusIconButtonClose,onclick:jc}}:void 0);if(1024&e.$$.dirty[7]&&o(314,Be=void 0!==er),8388608&e.$$.dirty[1]|524288&e.$$.dirty[9]|2&e.$$.dirty[12]&&J&&to&&to.complete&&(Fc.set(!0),setTimeout((()=>Fc.set(!1)),Zt?100:0)),4&e.$$.dirty[0]|8192&e.$$.dirty[1]|1&e.$$.dirty[12]&&eo&&$n&&$n.dispatchEvent(vp("selectutil",V)),4608&e.$$.dirty[1]|402653184&e.$$.dirty[9]|22&e.$$.dirty[10]|1073741824&e.$$.dirty[11]&&o(313,_e=Qt||ke||Me||Te||Pe||Ee||Ie||Be),8&e.$$.dirty[10]&&un(Lc,Jt=_e?1:0,Jt),8388608&e.$$.dirty[1]|8&e.$$.dirty[10]&&Lc.set(_e?1:0,{duration:Zt?500:1}),16777216&e.$$.dirty[1]&&o(42,Ve=Jt>0),16&e.$$.dirty[1]&&o(301,Ne=!(!Dc||!Dc.aside)),8390672&e.$$.dirty[1]|4194368&e.$$.dirty[9]|536870912&e.$$.dirty[11]&&Ve&&Dc){clearTimeout(Nc);const e={hard:!1===Zt};if(Ne){const t=!!Dc.error||!Zt;Bc.set(1,e),Oc.set(Kt,{hard:t}),o(285,Nc=setTimeout((()=>{Wc.set(16,e)}),1))}else Bc.set(0,e),o(285,Nc=setTimeout((()=>{Wc.set(0,e)}),1))}if(2048&e.$$.dirty[1]&&(Ve||(Vc.set(void 0,{hard:!0}),Oc.set(void 0,{hard:!0}),Wc.set(0,{hard:!0}))),268435456&e.$$.dirty[11]&&o(300,He=.5*qt),2097152&e.$$.dirty[9]|134217728&e.$$.dirty[11]&&o(73,je=`transform: translateX(${Yt-He}px)`),512&e.$$.dirty[1]|8192&e.$$.dirty[11]&&o(39,ct=mt&&!ke),256&e.$$.dirty[1]|1572864&e.$$.dirty[9]&&o(297,Ge=Ue&&(ct||J)?Uc:a),262144&e.$$.dirty[9]&&o(72,Ze=Ge),262144&e.$$.dirty[9]&&o(71,Xe=Ge),8&e.$$.dirty[0]|4194304&e.$$.dirty[1]|973078528&e.$$.dirty[7]|1&e.$$.dirty[8]|245760&e.$$.dirty[9]|33554432&e.$$.dirty[11]&&o(70,Ye=Xi&&Ut&&Fp((()=>hr([["div","alpha",{class:"PinturaNavGroup"},[["div","alpha-set",{class:"PinturaNavSet"},[wr&&["Button","close",{label:Xi.labelClose,icon:Xi.iconButtonClose,onclick:()=>Ni("close"),hideLabel:!0}],$r&&["Button","revert",{label:Xi.labelButtonRevert,icon:Xi.iconButtonRevert,disabled:!F,onclick:oc,hideLabel:!0}]]]]],["div","beta",{class:"PinturaNavGroup PinturaNavGroupFloat"},[fr&&["div","history",{class:"PinturaNavSet"},[["Button","undo",{label:Xi.labelButtonUndo,icon:Xi.iconButtonUndo,disabled:!F,onclick:ql.undo,hideLabel:!0}],["Button","redo",{label:Xi.labelButtonRedo,icon:Xi.iconButtonRedo,disabled:!D,onclick:ql.redo,hideLabel:!0}]]],ce.length&&["div","plugin-tools",{class:"PinturaNavSet"},ce.filter(Boolean).map((([e,t,o])=>[e,t,{...o}]))]]],["div","gamma",{class:"PinturaNavGroup"},[gr&&["Button","export",{label:Xi.labelButtonExport,icon:ie&&Xi.iconButtonExport,class:"PinturaButtonExport",onclick:rc,hideLabel:ie}]]]],{...jt},(()=>_n.set({})))))),2097152&e.$$.dirty[11]&&o(289,tt=Ft&&!!Ft.length),1024&e.$$.dirty[9]|2113536&e.$$.dirty[11]&&o(288,it=tt&&Ur(bt,Ft)),1536&e.$$.dirty[9]|25174016&e.$$.dirty[11]&&tt&&((e,t,i,r)=>{if(!t)return;const n={dataSizeScalar:i};r&&r[3]>0&&(n.backgroundColor=[...r]),t(e,n).then((e=>{qc&&f(qc),o(286,qc=e)}))})(mt,Bt,it,Ot),128&e.$$.dirty[9]|6307840&e.$$.dirty[11]&&Ft&&qc&&bt){const{width:e,height:t}=bt,i=Xt()?"pixelated":"auto"===Dt?"auto":"pixelated";o(287,Jc=Ft.map((o=>{const r=nt(o.x,o.y,o.width,o.height),n=$t(Ke(r),o.rotation).map((o=>ue(o.x/e,o.y/t)));return{...o,id:"redaction",flipX:!1,flipY:!1,cornerRadius:0,strokeWidth:0,strokeColor:void 0,backgroundColor:[0,0,0,0],backgroundImage:qc,backgroundImageRendering:i,backgroundCorners:n}})))}256&e.$$.dirty[9]|1048576&e.$$.dirty[11]&&o(37,rt=[...Jc,...zt||[]]),32&e.$$.dirty[1]&&Kc&&Qc.set(Kc),4&e.$$.dirty[0]|256&e.$$.dirty[1]&&ct&&$n.dispatchEvent(vp("ready")),524288&e.$$.dirty[1]&&o(64,pd=!0),245760&e.$$.dirty[11]&&o(65,md=!0),262144&e.$$.dirty[1]&&o(66,$d=!0),131072&e.$$.dirty[1]&&o(67,fd=!0),64&e.$$.dirty[1]&&o(68,yd=!0)},o(347,b=!vc()),z=1===Vd()?e=>{e&&(xe(e.origin,Math.round),xe(e.translation,Math.round))}:G,o(316,Se=[!Rp()&&"WebGL"].filter(Boolean)),o(299,Ue=$o()||v()&&qo()),o(69,at=((e,t=!0)=>o=>{"ping"===o.type&&(t&&o.stopPropagation(),e(o.detail.type,o.detail.data))})(Vi.pub)),[ln,gn,$n,Xi,Yi,ir,nr,ar,lr,ur,xr,Mr,zr,Dr,Or,Br,Wr,Hr,Zr,Yr,Kr,Jr,Qr,rn,nn,an,sn,pn,Xn,Bl,ql,jl,Ul,dc,cc,Dc,Kc,rt,N,ct,ke,et,Ve,Me,V,g,Z,_,gt,yt,Mt,Rt,Ht,Ut,Zt,Jt,ro,So,Mo,Ro,oi,Hi,ji,yc,pd,md,$d,fd,yd,at,Ye,Xe,Ze,je,ve,be,ne,X,U,j,H,bo,ai,mi,gi,$i,yi,bi,xi,vi,wi,Si,Ti,Mi,Ri,Ei,Ii,Li,zi,Fi,Di,Oi,Bi,yn,bn,xn,Dn,_n,Vn,Hn,Qn,ea,oa,ia,ra,aa,sa,la,ca,da,ua,fa,xa,va,wa,Pa,Ea,Ia,Aa,La,za,Fa,_a,Va,Na,Ha,ja,Ua,qa,Ka,Ja,Qa,es,ts,os,is,rs,as,ss,ls,us,hs,ps,ms,gs,$s,fs,ys,xs,vs,ws,Ss,Ts,Rs,Ps,Es,As,Ls,zs,Fs,Vs,Ns,js,Gs,Zs,Xs,qs,Ks,Js,tl,ol,rl,xl,Tl,Ml,Rl,Pl,El,Il,Al,Ll,zl,_l,Vl,Nl,Zl,Yl,ic,ac,lc,mc,Sc,kc,Cc,Tc,({target:e,propertyName:t})=>{e===$n&&/background|outline/.test(t)&&ye&&Rc()},Pc,Lc,Fc,Oc,Bc,Wc,_c,Vc,e=>{const t=!(!Dc||!Dc.closeButton)||!Zt;_c.set(e.detail.width,{hard:t}),Vc.set(Math.round(.5*-e.detail.width),{hard:t})},Gc,Zc,e=>{const{keyCode:t,metaKey:o,ctrlKey:i,shiftKey:n}=e;if(9===t&&Qi)return void e.preventDefault();if(e.target&&32===t&&$n.contains(e.target)&&!Gd(e.target)&&(Nt&&r&&An(),e.preventDefault()),90===t&&(o||i))return void(n&&o?ql.redo():ql.undo());if(89===t&&i)return void ql.redo();if(229===t)return;const a=new Set([...Vt,t]);Zc.set(Array.from(a))},({key:e,keyCode:t})=>{if("Meta"===e)return Zc.set([]);Zc.set(Vt.filter((e=>e!==t)))},()=>{Zc.set([])},e=>{Gd(e.target)||e.preventDefault()},e=>{kr&&Xc(e.detail.resources[0])},()=>{Tr&&zp().then(Yc)},e=>{if(!Cr)return;const t=ns((window.innerWidth-Math.abs(Pt.x))/Pt.width,0,1),o=ns((window.innerHeight-Math.abs(Pt.y))/Pt.height,0,1);t<.75&&o<.75||Xc((e.clipboardData||window.clipboardData).files[0])},ed,hd,e=>{dt&&ht(e.detail,dt)||un($s,dt=e.detail,dt)},er,Wl,Ui,Gi,Zi,qi,Ki,Ji,Qi,tr,or,rr,sr,cr,dr,hr,mr,gr,$r,fr,vr,wr,kr,Cr,Tr,Rr,Pr,Er,Ir,Ar,Lr,Fr,_r,Vr,Nr,Xr,qr,()=>o(61,Hi=void 0),(e,t,i)=>{const{text:r="",placeholder:n="",autoClose:a=!0,align:s="top",justify:l="center",buttonConfirm:c,buttonCancel:d}=i;o(61,Hi={align:s,justify:l,text:r,placeholder:n,buttonConfirm:c,buttonCancel:d,onconfirm:()=>{e(ji.value),a&&o(61,Hi=void 0)},oncancel:()=>{t(void 0),o(61,Hi=void 0)}})},cn,dn,hn,mn,Pn,En,In,An,Ln,zn,Fn,On,Bn,Wn,Nn,ks,Ol,Ac,zc,Nc,qc,Jc,it,tt,r,W,qe,ie,ce,D,F,Ge,J,Ue,He,Ne,Oe,Fe,De,ze,Ie,Te,Re,Ae,Le,Ee,Pe,_e,Be,Ce,Se,we,q,le,ae,oe,ee,Q,te,me,$e,ge,pe,he,K,Y,re,ye,fe,O,B,A,M,I,E,P,T,k,C,p,S,b,x,s,u,n,d,i,mt,bt,wt,kt,Tt,Pt,It,zt,Ft,Dt,Ot,Bt,jt,Gt,Yt,qt,Kt,Qt,eo,to,oo,io,no,so,lo,uo,ho,po,mo,go,fo,xo,vo,wo,ko,Co,To,Po,Eo,zo,Fo,No,jo,Zo,Yo,Ko,ti,ii,ri,ni,li,ci,di,ui,hi,pi,function(){o(31,jl=Gp.innerWidth),o(32,Ul=Gp.innerHeight)},e=>un(gs,$i=e.detail,$i),({detail:e})=>o(44,V=e),(e,t)=>t.id===e,function(t,i){e.$$.not_equal(gn[i],t)&&(gn[i]=t,o(1,gn),o(268,hn),o(27,pn))},e=>o(63,yc=yc.concat(e)),e=>o(63,yc=yc.filter((t=>t!==e))),(e,{detail:t})=>o(38,N[e]=t,N),e=>un(ps,bo=e.detail,bo),e=>e.id===V,function(t){e.$$.not_equal(gn[V],t)&&(gn[V]=t,o(1,gn),o(268,hn),o(27,pn))},()=>o(63,yc=yc.concat(V)),()=>o(63,yc=yc.filter((e=>e!==V))),({detail:e})=>o(38,N[V]=e,N),e=>{const t={...e,...ed()},{annotationShapes:o,decorationShapes:i,interfaceShapes:r,frameShapes:n,selectionShapes:a}=ur({annotationShapes:Mt,decorationShapes:yt,interfaceShapes:Ri,frameShapes:gt,selectionShapes:oi},t);return hd(t,rt,o,i,r,n,a)},()=>{o(64,pd=!1),o(65,md=!1),o(66,$d=!1),o(67,fd=!1),o(68,yd=!1)},function(e){ta[e?"unshift":"push"]((()=>{Kc=e,o(36,Kc)}))},function(e){ln=e,o(0,ln),o(258,Fr)},function(e){dc=e,o(33,dc)},function(e){cc=e,o(34,cc)},function(e){ta[e?"unshift":"push"]((()=>{ji=e,o(62,ji)}))},function(e){ta[e?"unshift":"push"]((()=>{$n=e,o(2,$n)}))},e=>un(us,Ht=e.detail,Ht)]}class xm extends Fa{constructor(e){super(),za(this,e,bm,gm,Qr,{class:229,layout:230,stores:231,locale:3,id:4,util:232,utils:233,animations:234,disabled:235,status:227,previewUpscale:236,previewPad:237,previewMaskOpacity:5,previewImageDataMaxSize:238,previewImageTextPixelRatio:6,markupMaskOpacity:7,zoomMaskOpacity:239,elasticityMultiplier:8,willRevert:240,willProcessImage:241,willRenderCanvas:9,willRenderToolbar:242,willSetHistoryInitialState:243,enableButtonExport:244,enableButtonRevert:245,enableNavigateHistory:246,enableToolbar:10,enableUtils:247,enableButtonClose:248,enableDropImage:249,enablePasteImage:250,enableBrowseImage:251,enableTransparencyGrid:11,layoutDirectionPreference:252,layoutHorizontalUtilsPreference:253,layoutVerticalUtilsPreference:254,layoutVerticalToolbarPreference:255,layoutVerticalControlGroupsPreference:256,layoutVerticalControlTabsPreference:257,textDirection:12,markupEditorZoomLevel:258,markupEditorZoomLevels:13,markupEditorZoomAdjustStep:14,markupEditorZoomAdjustFactor:15,markupEditorZoomAdjustWheelFactor:16,markupEditorInteractionMode:259,muteAudio:260,willSetMediaInitialTimeOffset:261,enablePan:17,enableZoom:18,enableZoomControls:262,enableZoomInput:19,enablePanInput:263,enableCanvasAlpha:20,enablePanLimit:21,panLimitGutterScalar:22,zoomPresetOptions:23,zoomAdjustStep:24,zoomAdjustFactor:25,zoomAdjustWheelFactor:26,zoomLevel:0,hideTextInput:264,showTextInput:265,imagePreviewSrc:266,imageOrienter:267,pluginComponents:268,pluginOptions:27,sub:269,pluginInterface:1,root:2,play:270,pause:271,isPaused:272,togglePlayPause:273,mute:274,unmute:275,toggleMute:276,getDuration:277,getCurrentTime:278,setCurrentTime:279,imageSourceToImageData:28,imagePreview:29,imagePreviewCurrent:228,history:30},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}get class(){return this.$$.ctx[229]}set class(e){this.$$set({class:e}),pa()}get layout(){return this.$$.ctx[230]}set layout(e){this.$$set({layout:e}),pa()}get stores(){return this.$$.ctx[231]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[3]}set locale(e){this.$$set({locale:e}),pa()}get id(){return this.$$.ctx[4]}set id(e){this.$$set({id:e}),pa()}get util(){return this.$$.ctx[232]}set util(e){this.$$set({util:e}),pa()}get utils(){return this.$$.ctx[233]}set utils(e){this.$$set({utils:e}),pa()}get animations(){return this.$$.ctx[234]}set animations(e){this.$$set({animations:e}),pa()}get disabled(){return this.$$.ctx[235]}set disabled(e){this.$$set({disabled:e}),pa()}get status(){return this.$$.ctx[227]}set status(e){this.$$set({status:e}),pa()}get previewUpscale(){return this.$$.ctx[236]}set previewUpscale(e){this.$$set({previewUpscale:e}),pa()}get previewPad(){return this.$$.ctx[237]}set previewPad(e){this.$$set({previewPad:e}),pa()}get previewMaskOpacity(){return this.$$.ctx[5]}set previewMaskOpacity(e){this.$$set({previewMaskOpacity:e}),pa()}get previewImageDataMaxSize(){return this.$$.ctx[238]}set previewImageDataMaxSize(e){this.$$set({previewImageDataMaxSize:e}),pa()}get previewImageTextPixelRatio(){return this.$$.ctx[6]}set previewImageTextPixelRatio(e){this.$$set({previewImageTextPixelRatio:e}),pa()}get markupMaskOpacity(){return this.$$.ctx[7]}set markupMaskOpacity(e){this.$$set({markupMaskOpacity:e}),pa()}get zoomMaskOpacity(){return this.$$.ctx[239]}set zoomMaskOpacity(e){this.$$set({zoomMaskOpacity:e}),pa()}get elasticityMultiplier(){return this.$$.ctx[8]}set elasticityMultiplier(e){this.$$set({elasticityMultiplier:e}),pa()}get willRevert(){return this.$$.ctx[240]}set willRevert(e){this.$$set({willRevert:e}),pa()}get willProcessImage(){return this.$$.ctx[241]}set willProcessImage(e){this.$$set({willProcessImage:e}),pa()}get willRenderCanvas(){return this.$$.ctx[9]}set willRenderCanvas(e){this.$$set({willRenderCanvas:e}),pa()}get willRenderToolbar(){return this.$$.ctx[242]}set willRenderToolbar(e){this.$$set({willRenderToolbar:e}),pa()}get willSetHistoryInitialState(){return this.$$.ctx[243]}set willSetHistoryInitialState(e){this.$$set({willSetHistoryInitialState:e}),pa()}get enableButtonExport(){return this.$$.ctx[244]}set enableButtonExport(e){this.$$set({enableButtonExport:e}),pa()}get enableButtonRevert(){return this.$$.ctx[245]}set enableButtonRevert(e){this.$$set({enableButtonRevert:e}),pa()}get enableNavigateHistory(){return this.$$.ctx[246]}set enableNavigateHistory(e){this.$$set({enableNavigateHistory:e}),pa()}get enableToolbar(){return this.$$.ctx[10]}set enableToolbar(e){this.$$set({enableToolbar:e}),pa()}get enableUtils(){return this.$$.ctx[247]}set enableUtils(e){this.$$set({enableUtils:e}),pa()}get enableButtonClose(){return this.$$.ctx[248]}set enableButtonClose(e){this.$$set({enableButtonClose:e}),pa()}get enableDropImage(){return this.$$.ctx[249]}set enableDropImage(e){this.$$set({enableDropImage:e}),pa()}get enablePasteImage(){return this.$$.ctx[250]}set enablePasteImage(e){this.$$set({enablePasteImage:e}),pa()}get enableBrowseImage(){return this.$$.ctx[251]}set enableBrowseImage(e){this.$$set({enableBrowseImage:e}),pa()}get enableTransparencyGrid(){return this.$$.ctx[11]}set enableTransparencyGrid(e){this.$$set({enableTransparencyGrid:e}),pa()}get layoutDirectionPreference(){return this.$$.ctx[252]}set layoutDirectionPreference(e){this.$$set({layoutDirectionPreference:e}),pa()}get layoutHorizontalUtilsPreference(){return this.$$.ctx[253]}set layoutHorizontalUtilsPreference(e){this.$$set({layoutHorizontalUtilsPreference:e}),pa()}get layoutVerticalUtilsPreference(){return this.$$.ctx[254]}set layoutVerticalUtilsPreference(e){this.$$set({layoutVerticalUtilsPreference:e}),pa()}get layoutVerticalToolbarPreference(){return this.$$.ctx[255]}set layoutVerticalToolbarPreference(e){this.$$set({layoutVerticalToolbarPreference:e}),pa()}get layoutVerticalControlGroupsPreference(){return this.$$.ctx[256]}set layoutVerticalControlGroupsPreference(e){this.$$set({layoutVerticalControlGroupsPreference:e}),pa()}get layoutVerticalControlTabsPreference(){return this.$$.ctx[257]}set layoutVerticalControlTabsPreference(e){this.$$set({layoutVerticalControlTabsPreference:e}),pa()}get textDirection(){return this.$$.ctx[12]}set textDirection(e){this.$$set({textDirection:e}),pa()}get markupEditorZoomLevel(){return this.$$.ctx[258]}set markupEditorZoomLevel(e){this.$$set({markupEditorZoomLevel:e}),pa()}get markupEditorZoomLevels(){return this.$$.ctx[13]}set markupEditorZoomLevels(e){this.$$set({markupEditorZoomLevels:e}),pa()}get markupEditorZoomAdjustStep(){return this.$$.ctx[14]}set markupEditorZoomAdjustStep(e){this.$$set({markupEditorZoomAdjustStep:e}),pa()}get markupEditorZoomAdjustFactor(){return this.$$.ctx[15]}set markupEditorZoomAdjustFactor(e){this.$$set({markupEditorZoomAdjustFactor:e}),pa()}get markupEditorZoomAdjustWheelFactor(){return this.$$.ctx[16]}set markupEditorZoomAdjustWheelFactor(e){this.$$set({markupEditorZoomAdjustWheelFactor:e}),pa()}get markupEditorInteractionMode(){return this.$$.ctx[259]}set markupEditorInteractionMode(e){this.$$set({markupEditorInteractionMode:e}),pa()}get muteAudio(){return this.$$.ctx[260]}set muteAudio(e){this.$$set({muteAudio:e}),pa()}get willSetMediaInitialTimeOffset(){return this.$$.ctx[261]}set willSetMediaInitialTimeOffset(e){this.$$set({willSetMediaInitialTimeOffset:e}),pa()}get enablePan(){return this.$$.ctx[17]}set enablePan(e){this.$$set({enablePan:e}),pa()}get enableZoom(){return this.$$.ctx[18]}set enableZoom(e){this.$$set({enableZoom:e}),pa()}get enableZoomControls(){return this.$$.ctx[262]}set enableZoomControls(e){this.$$set({enableZoomControls:e}),pa()}get enableZoomInput(){return this.$$.ctx[19]}set enableZoomInput(e){this.$$set({enableZoomInput:e}),pa()}get enablePanInput(){return this.$$.ctx[263]}set enablePanInput(e){this.$$set({enablePanInput:e}),pa()}get enableCanvasAlpha(){return this.$$.ctx[20]}set enableCanvasAlpha(e){this.$$set({enableCanvasAlpha:e}),pa()}get enablePanLimit(){return this.$$.ctx[21]}set enablePanLimit(e){this.$$set({enablePanLimit:e}),pa()}get panLimitGutterScalar(){return this.$$.ctx[22]}set panLimitGutterScalar(e){this.$$set({panLimitGutterScalar:e}),pa()}get zoomPresetOptions(){return this.$$.ctx[23]}set zoomPresetOptions(e){this.$$set({zoomPresetOptions:e}),pa()}get zoomAdjustStep(){return this.$$.ctx[24]}set zoomAdjustStep(e){this.$$set({zoomAdjustStep:e}),pa()}get zoomAdjustFactor(){return this.$$.ctx[25]}set zoomAdjustFactor(e){this.$$set({zoomAdjustFactor:e}),pa()}get zoomAdjustWheelFactor(){return this.$$.ctx[26]}set zoomAdjustWheelFactor(e){this.$$set({zoomAdjustWheelFactor:e}),pa()}get zoomLevel(){return this.$$.ctx[0]}set zoomLevel(e){this.$$set({zoomLevel:e}),pa()}get hideTextInput(){return this.$$.ctx[264]}get showTextInput(){return this.$$.ctx[265]}get imagePreviewSrc(){return this.$$.ctx[266]}set imagePreviewSrc(e){this.$$set({imagePreviewSrc:e}),pa()}get imageOrienter(){return this.$$.ctx[267]}set imageOrienter(e){this.$$set({imageOrienter:e}),pa()}get pluginComponents(){return this.$$.ctx[268]}set pluginComponents(e){this.$$set({pluginComponents:e}),pa()}get pluginOptions(){return this.$$.ctx[27]}set pluginOptions(e){this.$$set({pluginOptions:e}),pa()}get sub(){return this.$$.ctx[269]}get pluginInterface(){return this.$$.ctx[1]}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),pa()}get play(){return this.$$.ctx[270]}get pause(){return this.$$.ctx[271]}get isPaused(){return this.$$.ctx[272]}get togglePlayPause(){return this.$$.ctx[273]}get mute(){return this.$$.ctx[274]}get unmute(){return this.$$.ctx[275]}get toggleMute(){return this.$$.ctx[276]}get getDuration(){return this.$$.ctx[277]}get getCurrentTime(){return this.$$.ctx[278]}get setCurrentTime(){return this.$$.ctx[279]}get imageSourceToImageData(){return this.$$.ctx[28]}set imageSourceToImageData(e){this.$$set({imageSourceToImageData:e}),pa()}get imagePreview(){return this.$$.ctx[29]}get imagePreviewCurrent(){return this.$$.ctx[228]}set imagePreviewCurrent(e){this.$$set({imagePreviewCurrent:e}),pa()}get history(){return this.$$.ctx[30]}}"undefined"!=typeof window&&(e=>{if(e&&e._clpdx4s)return;const[t,o,i]=[[99,111,110,115,111,108,101],[108,111,103],[84,104,105,115,32,118,101,114,115,105,111,110,32,111,102,32,80,105,110,116,117,114,97,32,105,115,32,102,111,114,32,116,101,115,116,105,110,103,32,112,117,114,112,111,115,101,115,32,111,110,108,121,46,32,86,105,115,105,116,32,104,116,116,112,115,58,47,47,112,113,105,110,97,46,110,108,47,112,105,110,116,117,114,97,47,32,116,111,32,112,117,114,99,104,97,115,101,32,97,32,118,97,108,105,100,32,108,105,99,101,110,115,101,46]].map((e=>e.map((e=>String.fromCharCode(e))).join("")));e&&e[t]&&e[t][o](i)})(window);const vm=["klass","stores","isVisible","isActive","isActiveFraction","locale"],wm=["history","klass","stores","navButtons","pluginComponents","pluginInterface","pluginOptions","sub","imagePreviewSrc","imagePreview","imagePreviewCurrent"],Sm=["locale"];let km;const Cm=new Set([]),Tm={},Mm=new Map,Rm=(...e)=>{e.filter((e=>!!e.util)).forEach((e=>{const[t,o,i=(()=>!0)]=e.util;Mm.has(t)||(Mm.set(t,{Component:o,isSupported:i}),Xc(o).filter((e=>!vm.includes(e))).forEach((e=>{Cm.add(e),Tm[e]?Tm[e].push(t):Tm[e]=[t]})))}))};var Pm=[...fs,"init","update","undo","redo","revert","writehistory","destroy","show","hide","close","ready","zoom","pan","loadpreview","selectshape","blurshape","updateshape","addshape","removeshape","selectstyle","markuptap","markupzoom","markuppan","selectutil","selectcontrol","selectiondown","selectionup","selectionchange"];var Em=(e,t,o={})=>{const{prefix:i="pintura:"}=o;return Pm.map((o=>e.on(o,(e=>Wt(t)?((e,t,o)=>e.dispatchEvent(new CustomEvent(t,{detail:o,bubbles:!0,cancelable:!0})))(t,`${i}${o}`,e):t(o,e)))))};const Im=e=>R(e[0]),Am=e=>!Im(e),Lm=e=>e[1],zm=e=>e[3]||[];const Fm=(e,t,o,i=(e=>e))=>{const r=Bm(t,o),n=r.findIndex((e=>Lm(e)===t));var a,s,l;a=r,s=i(n),l=e,a.splice(s,0,l)},Dm=(e,t)=>{const o=Bm(e,t);return dd(o,(t=>Lm(t)===e)),o},Om=(e,t)=>{if(t&&t.length){if(Im(t)){if(Lm(t)===e)return t;const o=Om(e,zm(t));if(o)return o}if(Am(t))for(const o of t){const t=Om(e,o);if(t)return t}}},Bm=(e,t)=>{if(Am(t)){if(t.find((t=>Lm(t)===e)))return t;const o=t.find((t=>Bm(e,zm(t))));return o&&o[3]}return Bm(e,zm(t))},Wm=()=>[.75,.25,.25,0,0,.25,.75,.25,0,0,.25,.25,.75,0,0,0,0,0,1,0],_m=()=>[1.398,-.316,.065,-.273,.201,-.051,1.278,-.08,-.273,.201,-.051,.119,1.151,-.29,.215,0,0,0,1,0],Vm=()=>[1.073,-.015,.092,-.115,-.017,.107,.859,.184,-.115,-.017,.015,.077,1.104,-.115,-.017,0,0,0,1,0],Nm=()=>[1.06,0,0,0,0,0,1.01,0,0,0,0,0,.93,0,0,0,0,0,1,0],Hm=()=>[1.1,0,0,0,-.1,0,1.1,0,0,-.1,0,0,1.2,0,-.1,0,0,0,1,0],jm=()=>[.212,.715,.114,0,0,.212,.715,.114,0,0,.212,.715,.114,0,0,0,0,0,1,0],Um=()=>[.15,1.3,-.25,.1,-.2,.15,1.3,-.25,.1,-.2,.15,1.3,-.25,.1,-.2,0,0,0,1,0],Gm=()=>[.163,.518,.084,-.01,.208,.163,.529,.082,-.02,.21,.171,.529,.084,0,.214,0,0,0,1,0],Zm=()=>[.338,.991,.117,.093,-.196,.302,1.049,.096,.078,-.196,.286,1.016,.146,.101,-.196,0,0,0,1,0],Xm=()=>[.393,.768,.188,0,0,.349,.685,.167,0,0,.272,.533,.13,0,0,0,0,0,1,0],Ym=()=>[.289,.62,.185,0,.077,.257,.566,.163,0,.115,.2,.43,.128,0,.188,0,0,0,1,0],qm=()=>[.269,.764,.172,.05,.1,.239,.527,.152,0,.176,.186,.4,.119,0,.159,0,0,0,1,0],Km=()=>[.547,.764,.134,0,-.147,.281,.925,.12,0,-.135,.225,.558,.33,0,-.113,0,0,0,1,0],Jm={chrome:_m,fade:Vm,pastel:Wm,cold:Hm,warm:Nm,monoDefault:jm,monoWash:Gm,monoNoir:Um,monoStark:Zm,sepiaDefault:Xm,sepiaRust:qm,sepiaBlues:Ym,sepiaColor:Km};var Qm={filterFunctions:Jm,filterOptions:[["Default",[[void 0,e=>e.labelDefault]]],["Classic",[["chrome",e=>e.filterLabelChrome],["fade",e=>e.filterLabelFade],["cold",e=>e.filterLabelCold],["warm",e=>e.filterLabelWarm],["pastel",e=>e.filterLabelPastel]]],["Monochrome",[["monoDefault",e=>e.filterLabelMonoDefault],["monoNoir",e=>e.filterLabelMonoNoir],["monoStark",e=>e.filterLabelMonoStark],["monoWash",e=>e.filterLabelMonoWash]]],["Sepia",[["sepiaDefault",e=>e.filterLabelSepiaDefault],["sepiaRust",e=>e.filterLabelSepiaRust],["sepiaBlues",e=>e.filterLabelSepiaBlues],["sepiaColor",e=>e.filterLabelSepiaColor]]]]};const eg={borderColor:"strokeColor",borderWidth:"strokeWidth",lineWidth:"strokeWidth",fontColor:"color",lineColor:"strokeColor",src:"backgroundImage",fit:"backgroundSize"},tg=e=>0===e||"0%"===e||"0px"===e?0:/px$/.test(e)?parseInt(e,10):/\%$/.test(e)?e:e<=1?100*e+"%":void 0,og=(e,t)=>{let o,i;return/%$/.test(e)?(o=parseFloat(e),i=parseFloat(t),o+i+"%"):/px$/.test(e)?(o=parseInt(e,10),i=parseInt(t,10),o+i+"px"):void 0},ig=(e,t)=>{const o=e,i=t,r=1.5707963267948966-t,n=Math.sin(1.5707963267948966),a=Math.sin(i),s=Math.sin(r),l=Math.cos(r),c=o/n;return ue(l*(c*a),l*(c*s))},rg=(e,{flip:t,aspectRatio:o,rotation:i,center:r,zoom:n,scaleToFit:a})=>{const s={flipX:!1,flipY:!1},l=!r||r&&.5===r.x&&.5===r.y;t&&t.horizontal&&(s.flipX=t.horizontal),t&&t.vertical&&(s.flipY=t.vertical);const c=((e,t)=>null!=t?1/t:e.width/e.height)(e,o),d=!(!1===a),u=((e,t,o=1)=>{const i=e.height/e.width,r=t;let n=1,a=i;a>r&&(a=r,n=a/i);const s=Math.max(1/n,r/a),l=e.width/(o*s*n);return{width:l,height:l*t}})(e,o,n),h=l?e:((e,t)=>{const o=t.x>.5?1-t.x:t.x,i=t.y>.5?1-t.y:t.y;return We(2*o*e.width,2*i*e.height)})(e,d?r:{x:.5,y:.5}),p=((e,t)=>{let o=e.width,i=o*t;i>e.height&&(i=e.height,o=i/t);const r=.5*(e.width-o),n=.5*(e.height-i);return nt(r,n,o,i)})(e,o);if((o||!l||n)&&(s.crop=xt(Qe(h),c)),"number"==typeof i&&null!==i&&0!==i){null!=i&&(s.rotation=i);const t=((e,t)=>{const o=e.width,i=e.height,r=ig(o,t),n=ig(i,t),a=ue(e.x+Math.abs(r.x),e.y-Math.abs(r.y)),s=ue(e.x+e.width+Math.abs(n.y),e.y+Math.abs(n.x)),l=ue(e.x-Math.abs(n.y),e.y+e.height-Math.abs(n.x));return{width:Re(a,s),height:Re(a,l)}})(p,i),o=Math.max(t.width/h.width,t.height/h.height),n=ue(r.x*e.width,r.y*e.height),a=Bt(e,i),l=Ne(a),c=ue(.5*(a.width-e.width),.5*(a.height-e.height)),d=$t({x:c.x+n.x-u.width/o*.5,y:c.y+n.y-u.height/o*.5,width:u.width/o,height:u.height/o},i),m=Ae(d.map(pe),i,l.x,l.y),g=at(ot(m)),$=Ae(m.map(pe),-2*i,g.x,g.y);s.crop=ot($)}else null!=n&<(s.crop,1/n);return d||(s.cropLimitToImage=!1),s};let ng=null;const ag={base:0,min:-.25,max:.25,getLabel:e=>Op(e/.25),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.brightness)return e.brightness[4]},setValue:(e,t)=>e.update((e=>({...e,brightness:[1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0]})))},sg={base:1,min:.5,max:1.5,getLabel:e=>Op(2*(e-.5)-1),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.contrast)return e.contrast[0]},setValue:(e,t)=>e.update((e=>({...e,contrast:[t,0,0,0,.5*(1-t),0,t,0,0,.5*(1-t),0,0,t,0,.5*(1-t),0,0,0,1,0]})))},lg={base:1,min:0,max:2,getLabel:e=>Op(e-1),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.saturation)return(e.saturation[0]-.213)/.787},setValue:(e,t)=>e.update((e=>({...e,saturation:[.213+.787*t,.715-.715*t,.072-.072*t,0,0,.213-.213*t,.715+.285*t,.072-.072*t,0,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,0,1,0]})))},cg={base:1,min:.5,max:1.5,getLabel:e=>Op(2*(e-.5)-1),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.exposure)return e.exposure[0]},setValue:(e,t)=>e.update((e=>({...e,exposure:[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0]})))},dg={base:1,min:.15,max:4,getLabel:e=>Op(e<1?(e-.15)/.85-1:(e-1)/3),getStore:({imageGamma:e})=>e},ug={base:0,min:-1,max:1,getStore:({imageVignette:e})=>e},hg={base:0,min:-1,max:1,getStore:({imageConvolutionMatrix:e})=>e,getValue:e=>{if(e.clarity)return 0===e.clarity[0]?e.clarity[1]/-1:e.clarity[1]/-2},setValue:(e,t)=>{e.update((e=>({...e,clarity:t>=0?[0,-1*t,0,-1*t,1+4*t,-1*t,0,-1*t,0]:[-1*t,-2*t,-1*t,-2*t,1+-3*t,-2*t,-1*t,-2*t,-1*t]})))}},pg={base:0,min:-1,max:1,getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(!e.temperature)return;const t=e.temperature[0];return t>=1?(t-1)/.1:(1-t)/-.15},setValue:(e,t)=>e.update((e=>({...e,temperature:t>0?[1+.1*t,0,0,0,0,0,1,0,0,0,0,0,1+.1*-t,0,0,0,0,0,1,0]:[1+.15*t,0,0,0,0,0,1+.05*t,0,0,0,0,0,1+.15*-t,0,0,0,0,0,1,0]})))};var mg={finetuneControlConfiguration:{gamma:dg,brightness:ag,contrast:sg,saturation:lg,exposure:cg,temperature:pg,clarity:hg,vignette:ug},finetuneOptions:[["brightness",e=>e.finetuneLabelBrightness],["contrast",e=>e.finetuneLabelContrast],["saturation",e=>e.finetuneLabelSaturation],["exposure",e=>e.finetuneLabelExposure],["temperature",e=>e.finetuneLabelTemperature],["gamma",e=>e.finetuneLabelGamma],!vc()&&["clarity",e=>e.finetuneLabelClarity],["vignette",e=>e.finetuneLabelVignette]].filter(Boolean)};const gg={shape:{frameColor:[1,1,1],frameStyle:"solid",frameSize:"2.5%"},thumb:''},$g={shape:{frameColor:[1,1,1],frameStyle:"solid",frameSize:"2.5%",frameRound:!0},thumb:''},fg={shape:{frameColor:[1,1,1],frameStyle:"line",frameInset:"2.5%",frameSize:".3125%",frameRadius:0},thumb:'
'},yg={shape:{frameColor:[1,1,1],frameStyle:"line",frameAmount:2,frameInset:"2.5%",frameSize:".3125%",frameOffset:"1.25%",frameRadius:0},thumb:'
'},bg={shape:{frameColor:[1,1,1],frameStyle:"edge",frameInset:"2.5%",frameOffset:"5%",frameSize:".3125%"},thumb:'
'},xg={shape:{frameColor:[1,1,1],frameStyle:"edge",frameInset:"2.5%",frameSize:".3125%"},thumb:'
'},vg={shape:{frameColor:[1,1,1],frameStyle:"edge",frameOffset:"1.5%",frameSize:".3125%"},thumb:'
'},wg={shape:{frameColor:[1,1,1],frameStyle:"hook",frameInset:"2.5%",frameSize:".3125%",frameLength:"5%"},thumb:'
'},Sg={shape:{frameColor:[1,1,1],frameStyle:"polaroid"},thumb:''};var kg={frameStyles:{solidSharp:gg,solidRound:$g,lineSingle:fg,lineMultiple:yg,edgeSeparate:bg,edgeCross:xg,edgeOverlap:vg,hook:wg,polaroid:Sg},frameOptions:[[void 0,e=>e.labelNone],["solidSharp",e=>e.frameLabelMatSharp],["solidRound",e=>e.frameLabelMatRound],["lineSingle",e=>e.frameLabelLineSingle],["lineMultiple",e=>e.frameLabelLineMultiple],["edgeCross",e=>e.frameLabelEdgeCross],["edgeSeparate",e=>e.frameLabelEdgeSeparate],["edgeOverlap",e=>e.frameLabelEdgeOverlap],["hook",e=>e.frameLabelCornerHooks],["polaroid",e=>e.frameLabelPolaroid]]},Cg=e=>e.charAt(0).toUpperCase()+e.slice(1);let Tg=null;var Mg=()=>{if(null===Tg)if(u())try{Tg=!1===document.fonts.check("16px TestNonExistingFont")}catch(e){Tg=!1}else Tg=!1;return Tg};const Rg=(e,t)=>o=>o[t?`${t}${Cg(e)}`:e],Pg=e=>[e,""+e],Eg=(e,t)=>o=>[e[o],Rg(o,t)],Ig=e=>Array.isArray(e)&&e.every(Ao)?e.map(Pg):e,Ag=[1,.2549,.2118],Lg="0.5%",zg=[1,1,1,0],Fg={brush:["path",{bitmap:!0,drawMode:"add",strokeWidth:"5%",cursorStyle:"ellipse",cursorSize:"strokeWidth",disableStyle:["strokeColor"],settings:{strokeWidth:{control:"brushSize"}}}],lassoo:["path",{drawMode:"add",disableStyle:["strokeWidth","strokeColor"],pathClose:!0}],rectangle:["rectangle",{disableStyle:["backgroundColor","strokeWidth","strokeColor","cornerRadius"],drawMode:"add"}],ellipse:["ellipse",{disableStyle:["backgroundColor","strokeWidth","strokeColor"],drawMode:"add"}]},Dg=["brush","lassoo","rectangle","ellipse"],Og=e=>{const{hideLabel:t=!0}=e||{};return f$(["new","add","subtract"].map((e=>[e,Rg(e,"shapeLabelSelectionMode"),{icon:Rg(e,"shapeIconSelectionMode"),hideLabel:t}])),{title:e=>e.shapeTitleSelectionMode,layout:"radio"})},Bg=e=>$$(e,{title:e=>e.shapeTitleBrushSize,layout:"radio",optionHideLabel:!0,optionIcon:(e,t)=>``}),Wg={eraser:()=>({eraseRadius:8,cursorStyle:"ellipse",cursorSize:"eraseRadius"}),path:()=>({points:[]}),line:()=>({x1:0,y1:0,x2:0,y2:0,disableErase:!1}),rectangle:()=>({x:0,y:0,width:0,height:0}),ellipse:()=>({x:0,y:0,rx:0,ry:0}),text:()=>({x:0,y:0,text:"Text"})},_g=(e,t={},o)=>{if(!Wg[e])return;const{position:i="relative",inputMode:r="drag",isSelection:n=!1}=o||{};return[{...Wg[e](),...t},{position:i,inputMode:r,isSelection:n}]},Vg=e=>({sharpie:_g("path",{bitmap:!0,strokeJoin:"round",strokeCap:"round",strokeWidth:Lg,strokeColor:[...Ag],cursorStyle:"ellipse",cursorSize:"strokeWidth",disableErase:!1,disableResize:!0,disableMove:!0}),eraser:_g("eraser"),path:_g("path",{pathClose:void 0,strokeWidth:Lg,strokeColor:[...Ag],backgroundColor:[0,0,0,0]},{inputMode:"step"}),line:_g("line",{strokeColor:[...Ag],strokeWidth:Lg}),arrow:_g("line",{lineStart:"none",lineEnd:"arrow-solid",strokeColor:[...Ag],strokeWidth:Lg}),rectangle:_g("rectangle",{strokeColor:[...zg],backgroundColor:[...Ag]}),ellipse:_g("ellipse",{strokeColor:[...zg],backgroundColor:[...Ag]}),text:_g("text",{color:[...Ag],fontSize:"2%"}),...e}),Ng=(e,t,o)=>[e,t||Rg(e,"shapeLabelTool"),{icon:Rg(e,"shapeIconTool"),...o}],Hg=(e=["move","view","sharpie","eraser","path","line","arrow","rectangle","ellipse","text","preset"])=>e.map((e=>R(e)?Ng(e):Array.isArray(e)?C(e[1])?Ng(e[0],void 0,e[1]):Ng(e[0],e[1],e[2]):void 0)).filter(Boolean),jg=()=>({transparent:[1,1,1,0],white:[1,1,1],silver:[.8667,.8667,.8667],gray:[.6667,.6667,.6667],black:[0,0,0],navy:[0,.1216,.2471],blue:[0,.4549,.851],aqua:[.498,.8588,1],teal:[.2235,.8,.8],olive:[.2392,.6,.4392],green:[.1804,.8,.251],yellow:[1,.8627,0],orange:[1,.5216,.1059],red:[1,.2549,.2118],maroon:[.5216,.0784,.2941],fuchsia:[.9412,.0706,.7451],purple:[.6941,.051,.7882]}),Ug=()=>[16,18,20,24,30,36,48,64,72,96,128,144],Gg=Ug,Zg=()=>({extraSmall:"2%",small:"4%",mediumSmall:"8%",medium:"10%",mediumLarge:"15%",large:"20%",extraLarge:"25%"}),Xg=()=>({extraSmall:"40%",small:"60%",mediumSmall:"100%",medium:"120%",mediumLarge:"140%",large:"180%",extraLarge:"220%"}),Yg=()=>({extraSmall:"0.25%",small:"0.5%",mediumSmall:"1%",medium:"1.75%",mediumLarge:"2.5%",large:"3.5%",extraLarge:"5%"}),qg=()=>["bar","arrow","arrowSolid","circle","circleSolid","square","squareSolid"],Kg=()=>[["Helvetica, Arial, Verdana, 'Droid Sans', sans-serif","Sans Serif"],["'Arial Black', 'Avenir-Black', 'Arial Bold'","Black"],["'Arial Narrow', 'Futura-CondensedMedium'","Narrow"],["'Trebuchet MS'","Humanist"],["Georgia, 'Avenir-Black', 'Times New Roman', 'Droid Serif', serif","Serif"],["Palatino","Old-Style"],["'Times New Roman', 'TimesNewRomanPSMT'","Transitional"],["Menlo, Monaco, 'Lucida Console', monospace","Monospaced"],["'Courier New', monospace","Slab Serif"]],Jg=()=>["left","center","right"],Qg=()=>[["normal","bold"],["italic","normal"],["italic","bold"]],e$=e=>Object.keys(e).map(Eg(e,"shapeTitleColor")),t$=e=>Object.keys(e).map(Eg(e,"labelSize")),o$=e=>Object.keys(e).map(Eg(e,"labelSize")),i$=e=>Object.keys(e).map(Eg(e,"labelSize")),r$=e=>[...e],n$=e=>e.map((e=>[e,t=>t["shapeLabelFontStyle"+e.filter((e=>"normal"!==e)).map(Cg).join("")]])),a$=e=>e.map((e=>[wp(e),t=>t["shapeTitleLineDecoration"+Cg(e)],{icon:t=>t["shapeIconLineDecoration"+Cg(e)]}])),s$=(e,t)=>{const{defaultKey:o,defaultValue:i,defaultOptions:r}=t||{},n=[];return o&&(n[0]=[i,e=>e[o],{...r}]),[...n,...e]},l$=e=>e.split(",").map((e=>e.trim())).some((e=>document.fonts.check("16px "+e))),c$=(e={})=>["ToggleSlider",{...e}],d$="PinturaFontTest",u$=(e,t={defaultKey:"labelDefault"})=>["Dropdown",{title:e=>e.shapeTitleFontFamily,onload:({options:e=[]})=>{Mg()&&e.map((([e])=>e)).filter(Boolean).filter((e=>!l$(e))).forEach((e=>{const t="PinturaFontTest-"+e.replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();document.getElementById(t)||document.body.append(g("span",{textContent:" ",id:t,class:d$,style:`font-family:${e};font-size:0;color:transparent;`}))}))},ondestroy:()=>{if(!Mg())return;document.querySelectorAll(".PinturaFontTest").forEach((e=>e.remove()))},optionLabelStyle:e=>"font-family: "+e,options:s$(e,t),optionFilter:e=>{if(!Mg())return!0;const[t]=e;if(!t)return!0;return l$(t)}}],h$=(e,t={})=>["ColorPicker",{options:s$(e),...t}],p$=(e,t={})=>h$(e,{title:e=>e.labelColor,...t}),m$=(e,t={})=>h$(e,{title:e=>e.shapeTitleBackgroundColor,...t}),g$=(e,t={})=>h$(e,{title:e=>e.shapeTitleStrokeColor,options:s$(e),buttonClass:"PinturaColorPickerButtonStroke",onchange:(e,o)=>{const i=o.strokeWidth;(Ao(i)||R(i)?parseFloat(i):0)>0||(o.strokeWidth=t&&t.defaultStrokeWidth||"0.5%")},...t}),$$=(e,t)=>{const{title:o,optionHideLabel:i=!1,layout:r,optionIcon:n=!1}=t||{},a=Ig(e),s=e.map((([e])=>R(e)?parseFloat(e):e)),l=Math.max(...s),c=Math.min(...s),d=l-c;return["radio"===r?"RadioGroup":"Dropdown",{title:!1===o?void 0:o||(e=>e.shapeTitleStrokeWidth),options:e=>{const o=t?a.map((e=>{const[t,o,r={}]=e,a=R(t)?parseFloat(t):t,s=(a-c)/d;let l=void 0;return"line"===n?l=``:"dot"===n?l=``:R(n)?l=n:P(n)&&(l=n(a,s)),[t,o,{icon:l,hideLabel:i,...r}]})):a;return zo(e,"backgroundColor")?s$(o,{defaultKey:"shapeLabelStrokeNone"}):s$(o)},onchange:(e,t)=>{if(!e)return;const o=t.strokeColor||[];if(o[3])return;const i=[...o];i[3]=1,t.strokeColor=i}}]},f$=(e,t)=>{const{title:o,layout:i}=t||{};return["radio"===i?"RadioGroup":"Dropdown",{title:o,options:s$(e)}]},y$=(e,t,o)=>["Dropdown",{title:e=>e[t],options:s$(e,{defaultKey:"labelNone",defaultOptions:{icon:''}}),optionIconStyle:o}],b$=e=>y$(e,"shapeTitleLineStart","transform: scaleX(-1)"),x$=e=>y$(e,"shapeTitleLineEnd"),v$=e=>h$(e,{title:e=>e.shapeTitleTextColor,options:s$(e)}),w$=e=>["Dropdown",{title:e=>e.shapeTitleFontStyle,optionLabelStyle:e=>e&&`font-style:${e[0]};font-weight:${e[1]}`,options:s$(e,{defaultKey:"shapeLabelFontStyleNormal"})}],S$=e=>["ShorthandControl",e],k$=(e,t,o,i)=>{i||e.find((([e])=>e===o))||(i={defaultKey:"labelAuto",defaultValue:o});const r=Ig(e);return["Dropdown",{title:t,options:s$(r,i),...i}]},C$=(e,t)=>k$(e,(e=>e.shapeTitleFontSize),"4%",t),T$=(e,t)=>k$(e,(e=>e.shapeTitleLineHeight),"120%",t),M$=e=>["RadioGroup",{title:e=>e.shapeTitleTextAlign,options:s$(e)}],R$={colorOptions:()=>e$({transparent:[1,1,1,0],white:[1,1,1],silver:[.8667,.8667,.8667],gray:[.6667,.6667,.6667],black:[0,0,0],navy:[0,.1216,.2471],blue:[0,.4549,.851],aqua:[.498,.8588,1],teal:[.2235,.8,.8],olive:[.2392,.6,.4392],green:[.1804,.8,.251],yellow:[1,.8627,0],orange:[1,.5216,.1059],red:[1,.2549,.2118],maroon:[.5216,.0784,.2941],fuchsia:[.9412,.0706,.7451],purple:[.6941,.051,.7882]}),lineEndStyleOptions:()=>a$(["bar","arrow","arrowSolid","circle","circleSolid","square","squareSolid"]),fontFamilyOptions:()=>r$([["Helvetica, Arial, Verdana, 'Droid Sans', sans-serif","Sans Serif"],["'Arial Black', 'Avenir-Black', 'Arial Bold'","Black"],["'Arial Narrow', 'Futura-CondensedMedium'","Narrow"],["'Trebuchet MS'","Humanist"],["Georgia, 'Avenir-Black', 'Times New Roman', 'Droid Serif', serif","Serif"],["Palatino","Old-Style"],["'Times New Roman', 'TimesNewRomanPSMT'","Transitional"],["Menlo, Monaco, 'Lucida Console', monospace","Monospaced"],["'Courier New', monospace","Slab Serif"]]),fontStyleOptions:()=>n$([["normal","bold"],["italic","normal"],["italic","bold"]]),textAlignOptions:()=>["left","center","right"].map((e=>[e,t=>t["shapeTitleTextAlign"+Cg(e)],{hideLabel:!0,icon:t=>t["shapeIconTextAlign"+Cg(e)]}])),strokeWidthOptions:()=>i$({extraSmall:"0.25%",small:"0.5%",mediumSmall:"1%",medium:"1.75%",mediumLarge:"2.5%",large:"3.5%",extraLarge:"5%"}),brushSizeOptions:()=>i$(Object.entries({extraSmall:"0.25%",small:"0.5%",mediumSmall:"1%",medium:"1.75%",mediumLarge:"2.5%",large:"3.5%",extraLarge:"5%"}).reduce(((e,[t,o])=>(e[t]=2*parseFloat(o)+"%",e)),{})),fontSizeOptions:()=>t$({extraSmall:"2%",small:"4%",mediumSmall:"8%",medium:"10%",mediumLarge:"15%",large:"20%",extraLarge:"25%"}),lineHeightOptions:()=>o$({extraSmall:"40%",small:"60%",mediumSmall:"100%",medium:"120%",mediumLarge:"140%",large:"180%",extraLarge:"220%"})},P$=new Intl.NumberFormat("default",{minimumFractionDigits:1,maximumFractionDigits:1}),E$=(e,t)=>R(t)?e+"%":e,I$=(e,t,o,i)=>R(i)?Math.round(e/o*100)+"%":""+P$.format(e),A$={getValue:e=>parseFloat(e),setValue:E$,label:I$,step:.05,labelClass:"PinturaPercentageLabel"},L$={factory:S$,options:{title:"Text shadow",controls:[["ToggleSlider","x",{...A$,min:-100,max:100,labelPrefix:"X"}],["ToggleSlider","y",{...A$,min:-100,max:100,labelPrefix:"Y"}],["ToggleSlider","blur",{...A$,min:0,max:25,labelPrefix:e=>e.shapeTitleTextShadowBlur}],["ColorPicker","color",{enablePresets:!1}]]}},z$={defaultColor:{factory:p$,items:"colorOptions"},defaultNumber:{factory:c$},defaultPercentage:{factory:c$,options:{getValue:e=>parseFloat(e),setValue:e=>e+"%",step:.05,label:(e,t,o)=>Math.round(e/o*100)+"%",labelClass:"PinturaPercentageLabel"}},backgroundColor:{items:"colorOptions",factory:m$},strokeColor:{items:"colorOptions",factory:g$},strokeWidth:{items:"strokeWidthOptions",factory:$$},brushSize:{items:"brushSizeOptions",factory:Bg},drawMode:{factory:Og},lineStart:{items:"lineEndStyleOptions",factory:b$},lineEnd:{items:"lineEndStyleOptions",factory:x$},color:{items:"colorOptions",factory:v$},fontFamily:{items:"fontFamilyOptions",factory:u$},fontStyle_fontWeight:{items:"fontStyleOptions",factory:w$},fontSize:{items:"fontSizeOptions",factory:C$},lineHeight:{items:"lineHeightOptions",factory:T$},textAlign:{items:"textAlignOptions",factory:M$},textShadowX_textShadowY_textShadowBlur_textShadowColor:L$,textOutlineWidth_textOutlineColor:{factory:S$,options:{title:"Text outline",controls:[["ToggleSlider","width",{getValue:e=>parseFloat(e),setValue:E$,label:I$,min:0,max:15,step:.05,labelClass:"PinturaPercentageLabel",labelPrefix:e=>e.shapeTitleTextOutlineWidth}],["ColorPicker","color",{enablePresets:!1}]]}},cornerRadius:{factory:"defaultPercentage",options:{min:0,max:50,title:e=>e.shapeTitleCornerRadius}},frameColor:{factory:"defaultColor"},frameSize:{factory:"defaultPercentage",options:{min:.2,max:10,title:e=>e.labelSize}},frameInset:{factory:"defaultPercentage",options:{min:.5,max:10,title:e=>e.labelOffset}},frameOffset:{factory:"defaultPercentage",options:{min:.5,max:10,title:e=>e.labelOffset}},frameRadius:{factory:"defaultPercentage",options:{min:.5,max:10,title:e=>e.labelRadius}},frameAmount:{factory:"defaultNumber",options:{min:1,max:5,step:1,title:e=>e.labelAmount}}},F$=(e={})=>{const t={...z$,...e},o={};return Object.entries(t).forEach((([e,i])=>{if(!/Options$/.test(e))if(z$[e]&&C(i)&&!Fo(i)){const{component:i,factory:r,items:n,options:a={}}=t[e];if(R(r))o[e]=[r,a];else{const s=z$[e].items;let l=R(s)?t[s]||R$[s]():void 0;R(n)&&R$[n]?l=t[n]?t[n].every((e=>!Array.isArray(e)))?t[n].map((e=>[e,e])):t[n]:R$[n]():(n||a.items)&&(l=n||a.items);let c=r||z$[e].factory;P(c)?o[e]=l?c(l,a):c(a):i&&(o[e]=[i,{...a,items:n}])}}else o[e]=i})),o};function D$(e){let t,o,i,r,n;const a=e[7].default,s=rn(a,e,e[6],null);return{c(){t=kn("div"),o=kn("div"),s&&s.c(),An(o,"class","PinturaToolbarInner"),An(t,"class","PinturaToolbar"),An(t,"data-layout",e[1]),An(t,"data-overflow",e[0])},m(a,l){wn(a,t,l),bn(t,o),s&&s.m(o,null),i=!0,r||(n=[Pn(o,"measure",e[3]),hn($c.call(null,o)),Pn(t,"measure",e[2]),hn($c.call(null,t))],r=!0)},p(e,[o]){s&&s.p&&(!i||64&o)&&sn(s,a,e,e[6],i?an(a,e[6],o,null):ln(e[6]),null),(!i||2&o)&&An(t,"data-layout",e[1]),(!i||1&o)&&An(t,"data-overflow",e[0])},i(e){i||(xa(s,e),i=!0)},o(e){va(s,e),i=!1},d(e){e&&Sn(t),s&&s.d(e),r=!1,Kr(n)}}}function O$(e,t,o){let i,r,{$$slots:n={},$$scope:a}=t,s=0,l=0,c=0;const d=()=>{o(0,r="compact"===i&&s>c?"overflow":void 0)};return e.$$set=e=>{"$$scope"in e&&o(6,a=e.$$scope)},e.$$.update=()=>{48&e.$$.dirty&&o(1,i=l>c?"compact":"default")},[r,i,({detail:e})=>{const{width:t}=e;o(5,c=t),d()},({detail:e})=>{const{width:t}=e;t>l&&o(4,l=t),s=t,r||d()},l,c,a,n]}class B$ extends Fa{constructor(e){super(),za(this,e,O$,D$,Qr,{})}}function W$(e){let t,o,i,r;const n=e[5].default,a=rn(n,e,e[4],null);return{c(){t=kn("div"),a&&a.c(),An(t,"class",e[0])},m(n,s){wn(n,t,s),a&&a.m(t,null),o=!0,i||(r=[Pn(t,"measure",(function(){Jr(e[1]&&e[3])&&(e[1]&&e[3]).apply(this,arguments)})),hn(e[2].call(null,t))],i=!0)},p(i,[r]){e=i,a&&a.p&&(!o||16&r)&&sn(a,n,e,e[4],o?an(n,e[4],r,null):ln(e[4]),null),(!o||1&r)&&An(t,"class",e[0])},i(e){o||(xa(a,e),o=!0)},o(e){va(a,e),o=!1},d(e){e&&Sn(t),a&&a.d(e),i=!1,Kr(r)}}}function _$(e,t,o){let{$$slots:i={},$$scope:r}=t;const n=qn();let{class:a=null}=t;const s=Jn("measurable");let l=!1;return Zn((()=>o(1,l=!0))),e.$$set=e=>{"class"in e&&o(0,a=e.class),"$$scope"in e&&o(4,r=e.$$scope)},[a,l,s,({detail:e})=>n("measure",e),r,i]}class V$ extends Fa{constructor(e){super(),za(this,e,_$,W$,Qr,{class:0})}}const N$=e=>({}),H$=e=>({}),j$=e=>({}),U$=e=>({}),G$=e=>({}),Z$=e=>({});function X$(e){let t,o;const i=e[4].header,r=rn(i,e,e[3],Z$);return{c(){t=kn("div"),r&&r.c(),An(t,"class","PinturaUtilHeader")},m(e,i){wn(e,t,i),r&&r.m(t,null),o=!0},p(e,t){r&&r.p&&(!o||8&t)&&sn(r,i,e,e[3],o?an(i,e[3],t,G$):ln(e[3]),Z$)},i(e){o||(xa(r,e),o=!0)},o(e){va(r,e),o=!1},d(e){e&&Sn(t),r&&r.d(e)}}}function Y$(e){let t,o;const i=e[4].footer,r=rn(i,e,e[3],H$);return{c(){t=kn("div"),r&&r.c(),An(t,"class","PinturaUtilFooter")},m(e,i){wn(e,t,i),r&&r.m(t,null),o=!0},p(e,t){r&&r.p&&(!o||8&t)&&sn(r,i,e,e[3],o?an(i,e[3],t,N$):ln(e[3]),H$)},i(e){o||(xa(r,e),o=!0)},o(e){va(r,e),o=!1},d(e){e&&Sn(t),r&&r.d(e)}}}function q$(e){let t,o,i,r,n,a,s=e[1]&&X$(e);const l=e[4].main,c=rn(l,e,e[3],U$),d=c||function(e){let t,o;return t=new V$({props:{class:"PinturaStage"}}),t.$on("measure",e[5]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p:Gr,i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}(e);let u=e[2]&&Y$(e);return{c(){s&&s.c(),t=Mn(),o=kn("div"),d&&d.c(),i=Mn(),u&&u.c(),r=Mn(),n=Rn(),An(o,"class","PinturaUtilMain")},m(l,c){s&&s.m(l,c),wn(l,t,c),wn(l,o,c),d&&d.m(o,null),e[6](o),wn(l,i,c),u&&u.m(l,c),wn(l,r,c),wn(l,n,c),a=!0},p(e,[o]){e[1]?s?(s.p(e,o),2&o&&xa(s,1)):(s=X$(e),s.c(),xa(s,1),s.m(t.parentNode,t)):s&&(ya(),va(s,1,1,(()=>{s=null})),ba()),c&&c.p&&(!a||8&o)&&sn(c,l,e,e[3],a?an(l,e[3],o,j$):ln(e[3]),U$),e[2]?u?(u.p(e,o),4&o&&xa(u,1)):(u=Y$(e),u.c(),xa(u,1),u.m(r.parentNode,r)):u&&(ya(),va(u,1,1,(()=>{u=null})),ba())},i(e){a||(xa(s),xa(d,e),xa(u),xa(false),a=!0)},o(e){va(s),va(d,e),va(u),va(false),a=!1},d(a){s&&s.d(a),a&&Sn(t),a&&Sn(o),d&&d.d(a),e[6](null),a&&Sn(i),u&&u.d(a),a&&Sn(r),a&&Sn(n)}}}function K$(e,t,o){let{$$slots:i={},$$scope:r}=t,{hasHeader:n=!!t.$$slots.header}=t,{hasFooter:a=!!t.$$slots.footer}=t,{root:s}=t;return e.$$set=e=>{o(7,t=Xr(Xr({},t),cn(e))),"hasHeader"in e&&o(1,n=e.hasHeader),"hasFooter"in e&&o(2,a=e.hasFooter),"root"in e&&o(0,s=e.root),"$$scope"in e&&o(3,r=e.$$scope)},t=cn(t),[s,n,a,r,i,function(t){Qn.call(this,e,t)},function(e){ta[e?"unshift":"push"]((()=>{s=e,o(0,s)}))}]}class J$ extends Fa{constructor(e){super(),za(this,e,K$,q$,Qr,{hasHeader:1,hasFooter:2,root:0})}}function Q$(e){let t,o;return{c(){t=kn("div"),An(t,"class","PinturaRangeInputMeter"),An(t,"style",o=`transform: translateX(${e[9].x-e[11].x}px) translateY(${e[9].y-e[11].y}px)`)},m(o,i){wn(o,t,i),t.innerHTML=e[7]},p(e,i){128&i[0]&&(t.innerHTML=e[7]),512&i[0]&&o!==(o=`transform: translateX(${e[9].x-e[11].x}px) translateY(${e[9].y-e[11].y}px)`)&&An(t,"style",o)},d(e){e&&Sn(t)}}}function ef(e){let t,o,i,r,n,a,s,l,c,d,u,h=e[9]&&Q$(e);return{c(){t=kn("div"),o=kn("span"),i=Mn(),r=kn("button"),n=Tn(e[1]),s=Mn(),l=kn("div"),h&&h.c(),An(o,"class","PinturaRangeInputValue"),An(r,"class","PinturaRangeInputReset"),An(r,"type","button"),r.disabled=a=e[0]===e[2],An(l,"class","PinturaRangeInputInner"),An(l,"style",e[8]),An(l,"data-value-limited",e[5]),An(t,"class","PinturaRangeInput"),An(t,"tabindex","0")},m(a,p){wn(a,t,p),bn(t,o),o.innerHTML=e[3],bn(t,i),bn(t,r),bn(r,n),bn(t,s),bn(t,l),h&&h.m(l,null),d||(u=[Pn(r,"click",e[16]),Pn(l,"interactionstart",e[12]),Pn(l,"interactionupdate",e[14]),Pn(l,"interactionend",e[15]),Pn(l,"interactionrelease",e[13]),hn(c=hd.call(null,l,{inertia:e[6]})),Pn(l,"measure",e[36]),hn($c.call(null,l)),Pn(t,"wheel",e[18],{passive:!1}),Pn(t,"nudge",e[19]),hn(pd.call(null,t,{direction:"horizontal",preventDefault:!0}))],d=!0)},p(e,t){8&t[0]&&(o.innerHTML=e[3]),2&t[0]&&Fn(n,e[1]),5&t[0]&&a!==(a=e[0]===e[2])&&(r.disabled=a),e[9]?h?h.p(e,t):(h=Q$(e),h.c(),h.m(l,null)):h&&(h.d(1),h=null),256&t[0]&&An(l,"style",e[8]),32&t[0]&&An(l,"data-value-limited",e[5]),c&&Jr(c.update)&&64&t[0]&&c.update.call(null,{inertia:e[6]})},i:Gr,o:Gr,d(e){e&&Sn(t),h&&h.d(),d=!1,Kr(u)}}}function tf(e,t,o){let i,r,n,s,l,c,d,u,h,{labelReset:p="Reset"}=t,{direction:m="x"}=t,{min:g=0}=t,{max:$=1}=t,{base:f=g}=t,{value:y=0}=t,{valueLabel:b=0}=t,{valueMin:x}=t,{valueMax:v}=t,{oninputstart:w=a}=t,{oninputmove:S=a}=t,{oninputend:k=a}=t,{elasticity:C=0}=t,{nudgeMultiplier:T}=t,{step:M=8}=t;const R=Jn("isAnimated");on(e,R,(e=>o(6,u=e)));const P=(e,t,o)=>Math.ceil((e-o)/t)*t+o;let E,I,A;const L={x:2,y:0},z=(e,t,o)=>`M ${e-o} ${t} a ${o} ${o} 0 1 0 0 -1`;let F,D=void 0,O=!1,B={snap:!1,elastic:!1};const W=(e,t,o)=>{const i=e[m]+t[m],r=ns(i,F[1][m],F[0][m]),n=C?r+md(i-r,C):r,a=o.elastic?n:r,s=ue(0,0);return s[m]=a,_.set(s,{hard:o.snap}),ns(N(s,m),g,$)},_=ec();on(e,_,(e=>o(9,h=e)));const V=(e,t)=>{const o=.5*(E[t]-s[t])-(ph(e,g,$)*s[t]-.5*s[t]);return{x:"x"===t?o:0,y:"y"===t?o:0}},N=(e,t)=>{const o=-(e[t]-.5*E[t])/s[t];return g+o*i},H=_.subscribe((e=>{e&&D&&S(ns(N(e,m),g,$))})),j=e=>{const t=[V(null!=x?x:g,m),V(null!=v?v:$,m)],o={x:"x"===m?h.x+e:0,y:"y"===m?h.y+e:0},i=ns(o[m],t[1][m],t[0][m]),r={...h,[m]:i};un(_,h=r,h);const n=ns(N(r,m),g,$);w(),S(n),k(n)};Yn((()=>{H()}));return e.$$set=e=>{"labelReset"in e&&o(1,p=e.labelReset),"direction"in e&&o(20,m=e.direction),"min"in e&&o(21,g=e.min),"max"in e&&o(22,$=e.max),"base"in e&&o(2,f=e.base),"value"in e&&o(0,y=e.value),"valueLabel"in e&&o(3,b=e.valueLabel),"valueMin"in e&&o(23,x=e.valueMin),"valueMax"in e&&o(24,v=e.valueMax),"oninputstart"in e&&o(25,w=e.oninputstart),"oninputmove"in e&&o(26,S=e.oninputmove),"oninputend"in e&&o(27,k=e.oninputend),"elasticity"in e&&o(28,C=e.elasticity),"nudgeMultiplier"in e&&o(29,T=e.nudgeMultiplier),"step"in e&&o(30,M=e.step)},e.$$.update=()=>{if(6291456&e.$$.dirty[0]&&o(32,i=$-g),10485760&e.$$.dirty[0]&&o(34,r=null!=x?Math.max(x,g):g),20971520&e.$$.dirty[0]&&o(33,n=null!=v?Math.min(v,$):$),6291460&e.$$.dirty[0]&&o(35,l=ph(f,g,$)),16&e.$$.dirty[0]|16&e.$$.dirty[1]&&E){const e=.5*E.y;let t,i=40*l,r="",n=E.y,a="";for(let o=0;o<=40;o++){const n=L.x+10*o,s=e;r+=z(n,s,o%5==0?2:.75)+" ",t=n+L.x,o===i&&(a=``)}o(7,I=``),o(31,A={x:t-2*L.x,y:n})}16&e.$$.dirty[0]|1&e.$$.dirty[1]&&(s=E&&A),6291456&e.$$.dirty[0]|12&e.$$.dirty[1]&&o(5,c=r!==g||n!==$),32&e.$$.dirty[0]|12&e.$$.dirty[1]&&o(8,d=c?function(e,t){const o=1/40,i=ph(e,g,$),r=ph(t,g,$);return`--range-mask-from:${100*se(P(i,o,0)-.0125)}%;--range-mask-to:${100*se(P(r,o,0)-.0125)}%`}(r,n):""),1048657&e.$$.dirty[0]|2&e.$$.dirty[1]&&i&&E&&E.x&&E.y&&_.set(V(y,m),{hard:!1===u})},[y,p,f,b,E,c,u,I,d,h,R,L,()=>{O=!1,D=tn(_),F=[V(null!=x?x:g,m),V(null!=v?v:$,m)],w()},()=>{O=!0},({detail:e})=>{B.snap=!O,B.elastic=!O,W(D,e.translation,B)},({detail:e})=>{B.snap=!1,B.elastic=!1;const t=W(D,e.translation,B);if(D=void 0,F=void 0,Math.abs(t-f)<.01)return k(f);k(t)},()=>{o(0,y=ns(f,r,n)),w(),k(y)},_,e=>{e.preventDefault(),e.stopPropagation();const t=yd(e)*M;j(t)},({detail:e})=>{j(e[m]*Math.abs(T||8))},m,g,$,x,v,w,S,k,C,T,M,A,i,n,r,l,e=>o(4,E=(e=>ue(e.width,e.height))(e.detail))]}class of extends Fa{constructor(e){super(),za(this,e,tf,ef,Qr,{labelReset:1,direction:20,min:21,max:22,base:2,value:0,valueLabel:3,valueMin:23,valueMax:24,oninputstart:25,oninputmove:26,oninputend:27,elasticity:28,nudgeMultiplier:29,step:30},null,[-1,-1])}}var rf={[J]:e=>({x:e.x,y:e.y}),[ie]:e=>({x:e.x+e.width,y:e.y}),[Q]:e=>({x:e.x+e.width,y:e.y}),[re]:e=>({x:e.x+e.width,y:e.y+e.height}),[ee]:e=>({x:e.x,y:e.y+e.height}),[ne]:e=>({x:e.x,y:e.y+e.height}),[te]:e=>({x:e.x,y:e.y}),[oe]:e=>({x:e.x,y:e.y})};function nf(e,t,o){const i=e.slice();return i[14]=t[o].key,i[15]=t[o].translate,i[16]=t[o].scale,i[17]=t[o].type,i[18]=t[o].opacity,i}function af(e,t){let o,i,r,n,a,s,l,c;return{key:e,first:null,c(){o=kn("div"),An(o,"role","button"),An(o,"aria-label",i=`Drag ${t[17]} ${t[14]}`),An(o,"tabindex",r="edge"===t[17]?-1:0),An(o,"class","PinturaRectManipulator"),An(o,"data-direction",n=t[14]),An(o,"data-shape",a=""+("edge"===t[17]?"edge":""+t[0])),An(o,"style",s=`--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`),this.first=o},m(e,i){wn(e,o,i),l||(c=[Pn(o,"nudge",(function(){Jr(t[6](t[14]))&&t[6](t[14]).apply(this,arguments)})),hn(pd.call(null,o,{preventDefault:!0})),Pn(o,"interactionstart",(function(){Jr(t[5]("resizestart",t[14]))&&t[5]("resizestart",t[14]).apply(this,arguments)})),Pn(o,"interactionupdate",(function(){Jr(t[5]("resizemove",t[14]))&&t[5]("resizemove",t[14]).apply(this,arguments)})),Pn(o,"interactionend",(function(){Jr(t[5]("resizeend",t[14]))&&t[5]("resizeend",t[14]).apply(this,arguments)})),hn(hd.call(null,o))],l=!0)},p(e,l){t=e,2&l&&i!==(i=`Drag ${t[17]} ${t[14]}`)&&An(o,"aria-label",i),2&l&&r!==(r="edge"===t[17]?-1:0)&&An(o,"tabindex",r),2&l&&n!==(n=t[14])&&An(o,"data-direction",n),3&l&&a!==(a=""+("edge"===t[17]?"edge":""+t[0]))&&An(o,"data-shape",a),2&l&&s!==(s=`--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`)&&An(o,"style",s)},d(e){e&&Sn(o),l=!1,Kr(c)}}}function sf(e){let t,o=[],i=new Map,r=e[1];const n=e=>e[14];for(let t=0;to(11,a=e)));const u=ec(void 0,{precision:1e-4,stiffness:.2,damping:.4});on(e,u,(e=>o(10,n=e)));const h=ec(0,{precision:.001});let p;on(e,h,(e=>o(9,r=e)));const m=qn();return e.$$set=e=>{"rect"in e&&o(7,s=e.rect),"visible"in e&&o(8,l=e.visible),"style"in e&&o(0,c=e.style)},e.$$.update=()=>{2304&e.$$.dirty&&u.set(l?1:.5,{hard:!1===a}),2304&e.$$.dirty&&h.set(l?1:0,{hard:!1===a}),1664&e.$$.dirty&&o(1,i=Object.keys(K).map(((e,t)=>{const o=K[e],i=rf[o](s),a=1===o.length?"edge":"corner",l="corner"===a;return{key:o,type:a,scale:{x:/^(t|b)$/.test(o)?s.width:l?ns(n,.5,1.25):1,y:/^(r|l)$/.test(o)?s.height:l?ns(n,.5,1.25):1},translate:{x:i.x,y:i.y},opacity:r}})))},[c,i,d,u,h,(e,t)=>({detail:o})=>{p&&t!==p||"resizestart"!==e&&void 0===p||("resizestart"===e&&(p=t),"resizeend"===e&&(p=void 0),m(e,{direction:t,translation:o&&o.translation}))},e=>({detail:t})=>{m("resizestart",{direction:e,translation:{x:0,y:0}}),m("resizemove",{direction:e,translation:t}),m("resizeend",{direction:e,translation:{x:0,y:0}})},s,l,r,n,a]}class cf extends Fa{constructor(e){super(),za(this,e,lf,sf,Qr,{rect:7,visible:8,style:0})}}var df=e=>{function t(t,o){e.dispatchEvent(new CustomEvent(t,{detail:o}))}const o=o=>{o.preventDefault(),e.addEventListener("gesturechange",i),e.addEventListener("gestureend",r),t("gesturedown")},i=e=>{e.preventDefault(),t("gestureupdate",e.scale)},r=e=>{t("gestureup",e.scale),e.preventDefault(),n()},n=()=>{e.removeEventListener("gesturechange",i),e.removeEventListener("gestureend",r)};return e.addEventListener("gesturestart",o),{destroy:()=>{n(),e.removeEventListener("gesturestart",o)}}},uf={[J]:ee,[Q]:te,[ee]:J,[te]:Q,[oe]:re,[ie]:ne,[re]:oe,[ne]:ie},hf=e=>{const t=e===te||e===Q,o=e===J||e===ee;return[e===Q||e===ie||e===re,e===te||e===ne||e===oe,e===J||e===ie||e===oe,e===ee||e===re||e===ne,t,o,t||o]},pf=(e,t,o,i={})=>{const{target:r,translate:n}=t,{aspectRatio:a,minSize:s,maxSize:l}=i,c=ae[uf[r]],d=ve(ue(e.x,e.y),ue(c[0]*e.width,c[1]*e.height)),u=ae[r],h=ve(Ke(e),ue(u[0]*e.width,u[1]*e.height)),[p,m,g,$,f,y,b]=hf(r);let x=n.x,v=n.y;f?v=0:y&&(x=0);const{inner:w,outer:S}=mf(d,r,o,{aspectRatio:a,minSize:s,maxSize:l});let[k,C,T,M]=vt(e);if(p?M=d.x:m&&(C=d.x),$?k=d.y:g&&(T=d.y),p){const e=w.x+w.width,t=S.x+S.width;C=ns(h.x+x,e,t)}else if(m){const e=S.x,t=w.x;M=ns(h.x+x,e,t)}if($){const e=w.y+w.height,t=S.y+S.height;T=ns(h.y+v,e,t)}else if(g){const e=S.y,t=w.y;k=ns(h.y+v,e,t)}if(M>w.x&&(M=w.x),Cw.y&&(k=w.y),TS.x+S.width){const e=C-(S.x+S.width);C=S.x+S.width,M-=e}if(kS.y+S.height){const e=T-(S.y+S.height);T=S.y+S.height,k-=e}if(a)if(b){let e=C-M,t=T-k;f?(t=e/a,k=d.y-.5*t,T=d.y+.5*t):y&&(e=t*a,M=d.x-.5*e,C=d.x+.5*e)}else{const e=ue(h.x+x-d.x,h.y+v-d.y);r===ie?(e.x=Math.max(0,e.x),e.y=Math.min(0,e.y)):r===re?(e.x=Math.max(0,e.x),e.y=Math.max(0,e.y)):r===ne?(e.x=Math.min(0,e.x),e.y=Math.max(0,e.y)):r===oe&&(e.x=Math.min(0,e.x),e.y=Math.min(0,e.y));const t=$e(e),o=$e(ue(w.width,w.height)),i=$e(ue(S.width,S.height)),n=ns(t,o,i),s=ue(a,1),l=ke(fe(s),n);r===ie?(C=d.x+l.x,k=d.y-l.y):r===re?(C=d.x+l.x,T=d.y+l.y):r===ne?(M=d.x-l.x,T=d.y+l.y):r===oe&&(M=d.x-l.x,k=d.y-l.y)}return nt(M,k,C-M,T-k)};const mf=(e,t,o,i)=>{const{aspectRatio:r,minSize:n,maxSize:a}=i,s=t===Q||t===ie||t===re,l=t===te||t===ne||t===oe,c=t===J||t===ie||t===oe,d=t===ee||t===re||t===ne,u=t===te||t===Q,h=t===J||t===ee,p=Ke(o);s?(p.x=e.x,p.width-=e.x):l&&(p.width=e.x),d?(p.y=e.y,p.height-=e.y):c&&(p.height=e.y);const m=((e,t)=>qe(0,0,e,t))(Math.min(p.width,a.width),Math.min(p.height,a.height));if(r)if(u){const t=Math.min(e.y,o.height-e.y);m.height=Math.min(2*t,m.height)}else if(h){const t=Math.min(e.x,o.width-e.x);m.width=Math.min(2*t,m.width)}const g=r?De(bt(Qe(n),r)):n,$=r?De(xt(m,r)):m;let f,y,b,x;s?f=e.x:l&&(y=e.x),d?b=e.y:c&&(x=e.y),s?y=f+g.width:l&&(f=y-g.width),d?x=b+g.height:c&&(b=x-g.height),u?(b=e.y-.5*g.height,x=e.y+.5*g.height):h&&(f=e.x-.5*g.width,y=e.x+.5*g.width);const v=ot([ue(f,b),ue(y,x)]);s?y=f+$.width:l&&(f=y-$.width),d?x=b+$.height:c&&(b=x-$.height),u?(b=e.y-.5*$.height,x=e.y+.5*$.height):h&&(f=e.x-.5*$.width,y=e.x+.5*$.width),f=Math.max(o.x,f),y=Math.min(o.x+o.width,y),b=Math.max(o.y,b),x=Math.min(o.y+o.height,x);return{inner:v,outer:ot([ue(f,b),ue(y,x)])}};var gf=e=>180*e/Math.PI;function $f(e){let t,o,i;return o=new of({props:{elasticity:e[5],min:e[9],max:e[10],value:e[11],valueMin:Math.max(e[9],e[0]),valueMax:Math.min(e[10],e[1]),labelReset:e[6],base:e[12],valueLabel:Math.round(gf(e[11]))+"°",oninputstart:e[2],oninputmove:e[17],oninputend:e[18]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaImageRotator")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,[t]){const i={};32&t&&(i.elasticity=e[5]),512&t&&(i.min=e[9]),1024&t&&(i.max=e[10]),2048&t&&(i.value=e[11]),513&t&&(i.valueMin=Math.max(e[9],e[0])),1026&t&&(i.valueMax=Math.min(e[10],e[1])),64&t&&(i.labelReset=e[6]),4096&t&&(i.base=e[12]),2048&t&&(i.valueLabel=Math.round(gf(e[11]))+"°"),4&t&&(i.oninputstart=e[2]),392&t&&(i.oninputmove=e[17]),400&t&&(i.oninputend=e[18]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function ff(e,t,o){let i,r,n,s,l,c,d,{rotation:u}=t,{valueMin:h}=t,{valueMax:p}=t,{oninputstart:m=a}=t,{oninputmove:g=a}=t,{oninputend:$=a}=t,{elasticity:f=0}=t,{labelReset:y}=t,{rotationMin:b}=t,{rotationMax:x}=t;return e.$$set=e=>{"rotation"in e&&o(13,u=e.rotation),"valueMin"in e&&o(0,h=e.valueMin),"valueMax"in e&&o(1,p=e.valueMax),"oninputstart"in e&&o(2,m=e.oninputstart),"oninputmove"in e&&o(3,g=e.oninputmove),"oninputend"in e&&o(4,$=e.oninputend),"elasticity"in e&&o(5,f=e.elasticity),"labelReset"in e&&o(6,y=e.labelReset),"rotationMin"in e&&o(14,b=e.rotationMin),"rotationMax"in e&&o(15,x=e.rotationMax)},e.$$.update=()=>{16384&e.$$.dirty&&o(9,i=b+1e-9),32768&e.$$.dirty&&o(10,r=x-1e-9),1536&e.$$.dirty&&o(12,n=i+.5*(r-i)),32768&e.$$.dirty&&o(16,s=2*x),8192&e.$$.dirty&&o(8,l=Math.sign(u)),73728&e.$$.dirty&&o(7,c=Math.round(Math.abs(u)/s)*s),8576&e.$$.dirty&&o(11,d=u-l*c)},[h,p,m,g,$,f,y,c,l,i,r,d,n,u,b,x,s,e=>g(l*c+e),e=>$(l*c+e)]}class yf extends Fa{constructor(e){super(),za(this,e,ff,$f,Qr,{rotation:13,valueMin:0,valueMax:1,oninputstart:2,oninputmove:3,oninputend:4,elasticity:5,labelReset:6,rotationMin:14,rotationMax:15})}}function bf(e){let t,o,i,r,n;return{c(){t=kn("div"),o=kn("p"),i=Tn(e[0]),r=Tn(" × "),n=Tn(e[1]),An(t,"class","PinturaImageInfo")},m(e,a){wn(e,t,a),bn(t,o),bn(o,i),bn(o,r),bn(o,n)},p(e,[t]){1&t&&Fn(i,e[0]),2&t&&Fn(n,e[1])},i:Gr,o:Gr,d(e){e&&Sn(t)}}}function xf(e,t,o){let{width:i}=t,{height:r}=t;return e.$$set=e=>{"width"in e&&o(0,i=e.width),"height"in e&&o(1,r=e.height)},[i,r]}class vf extends Fa{constructor(e){super(),za(this,e,xf,bf,Qr,{width:0,height:1})}}function wf(e){let t,o;return t=new Wu({props:{class:"PinturaPresetListFilter",layout:"row",options:e[8],selectedIndex:e[7],onchange:e[10]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};256&o&&(i.options=e[8]),128&o&&(i.selectedIndex=e[7]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Sf(e){let t,o;return t=new lh({props:{icon:e[0],label:e[1],labelClass:e[2],hideLabel:e[3],options:e[9],selectedIndex:e[4],onchange:e[5],optionMapper:e[6],$$slots:{controls:[wf]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,[o]){const i={};1&o&&(i.icon=e[0]),2&o&&(i.label=e[1]),4&o&&(i.labelClass=e[2]),8&o&&(i.hideLabel=e[3]),512&o&&(i.options=e[9]),16&o&&(i.selectedIndex=e[4]),32&o&&(i.onchange=e[5]),64&o&&(i.optionMapper=e[6]),262528&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}const kf='fill="none" stroke="currentColor"';function Cf(e,t,o){let i,r,n,{icon:s}=t,{label:l}=t,{labelClass:c}=t,{hideLabel:d}=t,{options:u}=t,{selectedIndex:h}=t,{onchange:p}=t,{optionMapper:m}=t,{filter:g="landscape"}=t,{onfilterchange:$=a}=t;const f=(e,t,o,i,r)=>`\n `,y=(e,t)=>``;return e.$$set=e=>{"icon"in e&&o(0,s=e.icon),"label"in e&&o(1,l=e.label),"labelClass"in e&&o(2,c=e.labelClass),"hideLabel"in e&&o(3,d=e.hideLabel),"options"in e&&o(12,u=e.options),"selectedIndex"in e&&o(4,h=e.selectedIndex),"onchange"in e&&o(5,p=e.onchange),"optionMapper"in e&&o(6,m=e.optionMapper),"filter"in e&&o(11,g=e.filter),"onfilterchange"in e&&o(13,$=e.onfilterchange)},e.$$.update=()=>{6144&e.$$.dirty&&o(9,i=((e,t)=>(e||[]).map((e=>R(e[0])?(e[1]=e[1].map(t),e):t(e))))(u,(e=>t=>{const[o,i,r={}]=t;return Ao(o)&&(r.hidden="landscape"===e?o<1:o>1),[o,i,r]})(g))),2048&e.$$.dirty&&o(7,r="landscape"===g?0:1),128&e.$$.dirty&&o(8,n=[["landscape","Landscape",{hideLabel:!0,icon:f(2,6,19,12,2)+(0===r?y(9,12):"")}],["portrait","Portrait",{hideLabel:!0,icon:f(5,3,13,18,2)+(1===r?y(9,12):"")}]])},[s,l,c,d,h,p,m,r,n,i,e=>{o(11,g=e.value),$(e.value)},g,u,$]}class Tf extends Fa{constructor(e){super(),za(this,e,Cf,Sf,Qr,{icon:0,label:1,labelClass:2,hideLabel:3,options:12,selectedIndex:4,onchange:5,optionMapper:6,filter:11,onfilterchange:13})}}const Mf=e=>xe(e,(e=>se(e,6))),Rf=e=>St(e,(e=>se(e,6))),Pf=(e,t,o=1e-4)=>Math.abs(e-t){const{aspectRatio:n}=r;e=Rf(e),i=i.map(Mf);const a=dt(e,uf[o.target]),s=xe(a,(e=>se(e,6))),l=n?bt(r.minSize,n):r.minSize,c=n?xt(r.maxSize,n):r.maxSize,d=dt(t,o.target);if(Re(d,a)<1){t=Ke(e);const o=Math.min(l.width/e.width,l.height/e.height);lt(t,o,a)}t=ct(Ke(t),l,c,a);let u=Ke(t);t=Rf(t);const h=At(i,1),p=wt(e),m=wt(t),g=p.findIndex((e=>be(xe(e,(e=>se(e,6))),s))),$=e=>h.map((t=>Mt(t,e))).filter(Boolean).pop();if(n){const t=m.map(((e,t)=>{if(t===g)return;const o=ue(a.x-e.x,a.y-e.y);fe(o),ke(o,.5);const i=ue(a.x-o.x,a.y-o.y),r=Ge(i,Mf(e)),n=$(r);if(!n)return;const s=p[t];return{intersection:n,cornerDist:Re(a,s),intersectionDist:Re(a,n)}})).filter(Boolean);if(t.length){const o=t.reduce(((e,t)=>{const o=t.intersectionDist/t.cornerDist;return o{if(o===g)return;const i=m[o],n=!Pf(i.x,s.x)&&!Pf(i.y,s.y);if(!e&&!r&&n)return;if(e&&(Pf(i.x,s.x)||Pf(i.y,s.y)))return;const l=pe(e?t:a),c=we(pe(l),i);fe(c),ke(c,.5),e?ve(l,c):we(l,c);const d=Ge(l,i),u=$(d);return u||void 0})).filter(Boolean);if(n.length){const[e,i,r,l]=hf(o.target);let[c,d,h,p]=vt(t);n.forEach((({x:t,y:o})=>{const n=se(t,6),a=se(o,6);r&&!Pf(a,s.y)&&(c=Math.max(c,o)),e&&!Pf(n,s.x)&&(d=Math.min(d,t)),l&&!Pf(a,s.y)&&(h=Math.min(h,o)),i&&!Pf(n,s.x)&&(p=Math.max(p,t))})),u=et([c,d,h,p]),lt(u,.9999,a)}}return ct(u,l,c,a),u};function If(e){let t,o;return t=new up({props:{items:e[11]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};2048&o[0]&&(i.items=e[11]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Af(e){let t,o,i;return o=new B$({props:{$$slots:{default:[If]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"slot","header")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};2048&t[0]|1&t[7]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Lf(e){let t,o;return t=new cd({props:{onclick:e[87],label:e[4].cropLabelButtonRecenter,icon:e[4].cropIconButtonRecenter,class:"PinturaButtonCenter",disabled:!e[9],hideLabel:!0,style:`opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)`}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.label=e[4].cropLabelButtonRecenter),16&o[0]&&(i.icon=e[4].cropIconButtonRecenter),512&o[0]&&(i.disabled=!e[9]),1610612736&o[0]&&(i.style=`opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)`),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function zf(e){let t,o;return t=new cf({props:{rect:e[8],visible:e[12],style:e[1]}}),t.$on("resizestart",e[67]),t.$on("resizemove",e[68]),t.$on("resizeend",e[69]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};256&o[0]&&(i.rect=e[8]),4096&o[0]&&(i.visible=e[12]),2&o[0]&&(i.style=e[1]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Ff(e){let t,o;return t=new vf({props:{width:Math.round(e[13].width),height:Math.round(e[13].height)}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8192&o[0]&&(i.width=Math.round(e[13].width)),8192&o[0]&&(i.height=Math.round(e[13].height)),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Df(e){let t,o,i,r,n,a,s,l,c=e[21]&&e[10]&&Lf(e),d=e[21]&&zf(e),u=e[22]&&Ff(e);return{c(){t=kn("div"),o=kn("div"),c&&c.c(),i=Mn(),d&&d.c(),n=Mn(),u&&u.c(),An(o,"class","PinturaStage"),An(t,"slot","main")},m(h,p){wn(h,t,p),bn(t,o),c&&c.m(o,null),bn(o,i),d&&d.m(o,null),e[161](o),bn(t,n),u&&u.m(t,null),a=!0,s||(l=[hn($c.call(null,o)),Pn(o,"measure",e[159]),Pn(o,"wheel",(function(){Jr(e[2]&&e[86])&&(e[2]&&e[86]).apply(this,arguments)}),{passive:!1}),Pn(o,"interactionstart",e[73]),Pn(o,"interactionupdate",e[74]),Pn(o,"interactionrelease",e[76]),Pn(o,"interactionend",e[75]),hn(r=hd.call(null,o,{drag:!0,inertia:!0,pinch:e[2],shouldStartInteraction:Gf,getEventPosition:e[162]})),Pn(o,"gesturedown",e[83]),Pn(o,"gestureupdate",e[84]),Pn(o,"gestureup",e[85]),hn(df.call(null,o))],s=!0)},p(n,a){(e=n)[21]&&e[10]?c?(c.p(e,a),2098176&a[0]&&xa(c,1)):(c=Lf(e),c.c(),xa(c,1),c.m(o,i)):c&&(ya(),va(c,1,1,(()=>{c=null})),ba()),e[21]?d?(d.p(e,a),2097152&a[0]&&xa(d,1)):(d=zf(e),d.c(),xa(d,1),d.m(o,null)):d&&(ya(),va(d,1,1,(()=>{d=null})),ba()),r&&Jr(r.update)&&16777220&a[0]&&r.update.call(null,{drag:!0,inertia:!0,pinch:e[2],shouldStartInteraction:Gf,getEventPosition:e[162]}),e[22]?u?(u.p(e,a),4194304&a[0]&&xa(u,1)):(u=Ff(e),u.c(),xa(u,1),u.m(t,null)):u&&(ya(),va(u,1,1,(()=>{u=null})),ba())},i(e){a||(xa(c),xa(d),xa(u),a=!0)},o(e){va(c),va(d),va(u),a=!1},d(o){o&&Sn(t),c&&c.d(),d&&d.d(),e[161](null),u&&u.d(),s=!1,Kr(l)}}}function Of(e){let t,o,i,r;const n=[{class:"PinturaControlList"},{tabs:e[7]},e[18]];let a={$$slots:{default:[Bf,({tab:e})=>({216:e}),({tab:e})=>[0,0,0,0,0,0,e?1073741824:0]]},$$scope:{ctx:e}};for(let e=0;e({215:e}),({panel:e})=>[0,0,0,0,0,0,e?536870912:0]]},$$scope:{ctx:e}};for(let e=0;e{a[l]=null})),ba()),~t?(o=a[t],o?o.p(e,r):(o=a[t]=n[t](e),o.c()),xa(o,1),o.m(i.parentNode,i)):o=null)},i(e){r||(xa(o),r=!0)},o(e){va(o),r=!1},d(e){~t&&a[t].d(e),e&&Sn(i)}}}function Nf(e){let t,o,i=e[19]&&Of(e);return{c(){t=kn("div"),i&&i.c(),An(t,"slot","footer"),An(t,"style",e[16])},m(e,r){wn(e,t,r),i&&i.m(t,null),o=!0},p(e,r){e[19]?i?(i.p(e,r),524288&r[0]&&xa(i,1)):(i=Of(e),i.c(),xa(i,1),i.m(t,null)):i&&(ya(),va(i,1,1,(()=>{i=null})),ba()),(!o||65536&r[0])&&An(t,"style",e[16])},i(e){o||(xa(i),o=!0)},o(e){va(i),o=!1},d(e){e&&Sn(t),i&&i.d()}}}function Hf(e){let t,o,i;function r(t){e[163](t)}let n={hasHeader:e[20],$$slots:{footer:[Nf],main:[Df],header:[Af]},$$scope:{ctx:e}};return void 0!==e[15]&&(n.root=e[15]),t=new J$({props:n}),ta.push((()=>Ea(t,"root",r))),t.$on("measure",e[164]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};1048576&i[0]&&(r.hasHeader=e[20]),2146402302&i[0]|1&i[7]&&(r.$$scope={dirty:i,ctx:e}),!o&&32768&i[0]&&(o=!0,r.root=e[15],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}const jf=1,Uf=0,Gf=(e,t)=>e.target===t;function Zf(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,R,P,E,I,A,z,F,D,O,B,W,_,V,N,H,j,Z,X,K,J,Q,ee,te,le,ce,de,he,ge,ye,xe,Se,Ce,Te,Me,Re,Pe,Ee,Ie,Ae,Le,Fe,Be,_e,Ge,Ze,Xe,Ye=Gr,qe=()=>(Ye(),Ye=en(Je,(e=>o(12,I=e))),Je);e.$$.on_destroy.push((()=>Ye()));let{isActive:Je}=t;qe();let{stores:et}=t,{cropImageSelectionCornerStyle:tt="circle"}=t,{cropWillRenderImageSelectionGuides:ot=((e,t)=>{const o="rotate"==e;return{rows:o?5:3,cols:o?5:3,opacity:.25*t}})}=t,{cropAutoCenterImageSelectionTimeout:it}=t,{cropEnableZoomMatchImageAspectRatio:ct=!0}=t,{cropEnableRotateMatchImageAspectRatio:dt="never"}=t,{cropEnableRotationInput:mt=!0}=t,{cropEnableZoom:gt=!0}=t,{cropEnableZoomInput:$t=!0}=t,{cropEnableZoomAutoHide:wt=!0}=t,{cropEnableImageSelection:kt=!0}=t,{cropEnableInfoIndicator:Ct=!1}=t,{cropEnableZoomTowardsWheelPosition:Tt=!0}=t,{cropEnableLimitWheelInputToCropSelection:Mt=!0}=t,{cropEnableCenterImageSelection:Rt=!0}=t,{cropEnableButtonRotateLeft:Pt=!0}=t,{cropEnableButtonRotateRight:Et=!1}=t,{cropEnableButtonFlipHorizontal:It=!0}=t,{cropEnableButtonFlipVertical:At=!1}=t,{cropSelectPresetOptions:Lt}=t,{cropEnableSelectPreset:zt=!0}=t,{cropEnableFilterMatchAspectRatio:Ft=!0}=t,{cropSelectPresetFilter:Dt=!1}=t,{cropEnableButtonToggleCropLimit:Ot=!1}=t,{cropWillRenderTools:Bt=G}=t,{cropActiveTransformTool:Wt="rotation"}=t,{cropMinimizeToolbar:_t="auto"}=t,{cropInteractionFocus:Vt="image"}=t,{cropRotationRange:Nt=Y}=t,{cropMaskOpacity:Ht=.85}=t,{locale:jt={}}=t;const Ut=Jn("isAnimated");on(e,Ut,(e=>o(138,A=e)));const Gt=Jn("elasticityMultiplier");on(e,Gt,(e=>o(25,Fe=e)));const Zt=Jn("redrawTrigger");on(e,Zt,(e=>o(158,Le=e)));const Xt=Jn("imageIsStatic");on(e,Xt,(e=>o(144,_=e)));const Yt=Jn("imageStaticVisualCorners");on(e,Yt,(e=>o(179,Ce=e)));let qt="idle";const Kt=Ba();on(e,Kt,(e=>o(155,Ee=e)));const Jt=()=>void 0===xe,Qt=e=>1/e,eo=e=>{Ft&&Dt!==e&&(o(94,Dt=e),xe&&1!==xe&&to()&&un(_o,xe=Qt(xe),xe))},to=()=>{if(1===xe||!i)return!1;const e=Qt(xe);return!!cu(Ee).find((([t])=>t===e))},oo=(e,t,o)=>q(o)?t.width===Math.round(e.height)||t.height===Math.round(e.width):t.width===Math.round(e.width)||t.height===Math.round(e.height),io=()=>(Jt()||"always"===dt&&to())&&((e,t,o)=>{const i=Ue(He(ze(t),o),(e=>Math.abs(Math.round(e)))),r=Ne(i),n=at(e);return be(r,n)})(V,ee,te)&&oo(V,ee,te),ro=e=>{if("never"!==dt&&io()){un(To,te+=e,te);const t=q(te),o=t?ee.height:ee.width,i=t?ee.width:ee.height;un(Do,V=nt(0,0,o,i),V),Jt()||un(_o,xe=U(o,i),xe)}else un(To,te+=e,te)},{history:no,env:ao,isInteracting:so,isInteractingFraction:lo,isTransformingImage:co,rootRect:uo,stageRect:ho,utilRect:po,utilRectPadded:mo,rootLineColor:go,allowPan:$o,allowZoom:fo,allowPlayPause:yo,rangeInputElasticity:bo,presentationScalar:xo,utilTools:vo,imagePreviewModifiers:wo,imageOutlineOpacity:So,imageFlipX:ko,imageFlipY:Co,imageRotation:To,imageRotationRange:Mo,imageOutputSize:Ro,imageSelectionRect:Po,imageSelectionRectSnapshot:Eo,imageSelectionRectIntent:Io,imageSelectionRectPresentation:Ao,imageCropRectIntent:Lo,imageCropRectOrigin:zo,imageCropRect:Do,imageCropMinSize:Oo,imageCropMaxSize:Bo,imageCropRange:Wo,imageCropAspectRatio:_o,imageCropLimitToImage:Vo,imageSize:No,imageScalar:Ho,imageOverlayMarkup:jo,stagePadded:Uo,stageRecenter:Go}=et;let Zo;on(e,ao,(e=>o(139,z=e))),on(e,so,(e=>o(143,W=e))),on(e,co,(e=>o(172,J=e))),on(e,uo,(e=>o(24,de=e))),on(e,ho,(e=>o(150,K=e))),on(e,mo,(e=>o(147,j=e))),on(e,xo,(e=>o(146,H=e))),on(e,vo,(e=>o(181,Me=e))),on(e,wo,(e=>o(171,O=e))),on(e,ko,(e=>o(157,Ae=e))),on(e,Co,(e=>o(156,Ie=e))),on(e,To,(e=>o(14,te=e))),on(e,Mo,(e=>o(26,Be=e))),on(e,Ro,(e=>o(182,Re=e))),on(e,Po,(e=>o(149,X=e))),on(e,Eo,(e=>o(148,Z=e))),on(e,Io,(e=>o(180,Te=e))),on(e,Ao,(e=>o(142,B=e))),on(e,Lo,(e=>o(174,he=e))),on(e,zo,(e=>o(176,ye=e))),on(e,Do,(e=>o(13,V=e))),on(e,Oo,(e=>o(153,ce=e))),on(e,Bo,(e=>o(178,Se=e))),on(e,Wo,(e=>o(175,ge=e))),on(e,_o,(e=>o(177,xe=e))),on(e,Vo,(e=>o(152,le=e))),on(e,No,(e=>o(151,ee=e))),on(e,Ho,(e=>o(145,N=e))),on(e,Uo,(e=>o(141,D=e)));const Xo=(e,t)=>{const o={target:e,translate:t},i=Ve(ze(ce),H),r=Ve(ze(Se),H);let n=pf(Z,o,{...j,x:0,y:0},{aspectRatio:xe,minSize:i,maxSize:r});if(n=((e,t,o)=>{const[i,r,n,a]=vt(e),s={...e};if(it.x+t.width&&(e.width=t.x+t.width-e.x),n>t.y+t.height&&(e.height=t.y+t.height-e.y),a{const o={target:e,translate:t},i=Ve(ze(ce),H),r=Ve(ze(Se),H),n=((e,t,o={})=>{const{target:i,translate:r}=t,{aspectRatio:n,minSize:a}=o,s=ae[uf[i]],l=ve(Ke(e),ue(s[0]*e.width,s[1]*e.height)),c=ae[i],d=ve(Ke(e),ue(c[0]*e.width,c[1]*e.height)),[u,h,p,m,g,$,f]=hf(i);let y=r.x,b=r.y;g?b=0:$&&(y=0);let[x,v,w,S]=vt(e);if(u?S=l.x:h&&(v=l.x),m?x=l.y:p&&(w=l.y),u?v=d.x+y:h&&(S=d.x+y),m?w=d.y+b:p&&(x=d.y+b),a&&g&&w-x{_&&(t=1,e=me(pe(e)));const o=Math.min(X.width/V.width,X.height/V.height),i=ke(pe(e),1/o);let r;if(Ko){const t=we(pe(Ko),e);Ko=e,r=st(Ke(V),t)}else r=st(Ke(qo),me(pe(i))),void 0!==t&<(r,1/t);un(Lo,he=r,he),un(Do,V=r,V)},Qo=Wa([Wo,Do],(([e,t],o)=>{if(!t)return;const[i,r]=e,n=pt(t);o([De(St(bt(i,n),se)),De(St(xt(r,n),se))])}));on(e,Qo,(e=>o(173,Q=e)));const ei=Wa([No,Vo,Oo,Bo,Wo,To],(([e,t,o,i,r,n],a)=>{if(!e)return;const s=r[0],l=r[1];let c,d;t?(c=((e,t,o)=>q(o)?1-1/Math.min(e.height/t.width,e.width/t.height):1-1/Math.min(e.width/t.width,e.height/t.height))(e,l,n),d=Math.min(s.width/o.width,s.height/o.height)):(c=-1,d=1);a([c,d].map((e=>se(e))))}));on(e,ei,(e=>o(27,_e=e)));const ti=Wa([No,Do,Wo,To],(([e,t,o,i],r)=>{if(!e||!t)return r(0);let n;const a=o[0],s=o[1],l=t.width,c=t.height,d=pt(t),u=q(i)?We(e.height,e.width):e,h=xt(u,d);if(l<=h.width||c<=h.height){const e=h.width-a.width,t=h.height-a.height;n=0===e||0===t?1:1-Math.min((l-a.width)/e,(c-a.height)/t)}else{const e=s.width-h.width,t=s.height-h.height,o=xt({width:e,height:t},d);n=-Math.min((l-h.width)/o.width,(c-h.height)/o.height)}r(n)}));on(e,ti,(e=>o(28,Ge=e)));const oi=e=>{const t=pt(qo);let o,i,r;const n=q(te)?We(ee.height,ee.width):ee,a=xt(n,t);if(e>=0){const n=a.width-ge[0].width,s=a.height-ge[0].height;o=a.width-n*e,i=a.height-s*e,r=bt({width:o,height:i},t)}else{const n=ge[1].width-a.width,s=ge[1].height-a.height;o=a.width+n*-e,i=a.height+s*-e,r=xt({width:o,height:i},t)}o=r.width,i=r.height;const s=qo.x+.5*qo.width-.5*o,l=qo.y+.5*qo.height-.5*i;un(Do,V={x:s,y:l,width:o,height:i},V)};let ii;const ri=e=>{const t=lt(Ke(ii),1/e);un(Lo,he=t,he),un(Do,V=t,V)};let ni;const ai=()=>{Go.set({})};let si;const li=ec(0,{precision:1e-4});on(e,li,(e=>o(29,Ze=e)));const ci=ec();on(e,ci,(e=>o(30,Xe=e)));const di=Wa([_o,Ro,Kt],(([e,t,o],r)=>{if(!i)return;const n=cu(o),a=[...n].map((e=>e[0])).sort(((e,t)=>Fo(e[0])&&!Fo(t[0])?1:-1)).find((o=>{if(Fo(o)&&t){const[i,r]=o,n=t.width===i&&t.height===r,a=e===U(i,r);return n&&a}return o===e}));if(!a)return r(void 0);r(n.map((e=>e[0])).findIndex((e=>Fo(e)?ds(e,a):e===a)))}));on(e,di,(e=>o(154,Pe=e)));const ui=(e,t)=>{if(!i||-1===e||void 0===e)return;const o=cu(t)[e][0];return o?Fo(o)?U(o[0],o[1]):o:void 0},hi=Wa([go,Ao,lo],(([e,t,o],i)=>{const{rows:r,cols:n,opacity:a}=ot(qt,o);if(!t||a<=0)return i([]);const{x:s,y:l,width:c,height:d}=t,u=c/n,h=d/r,p=[];for(let t=1;t<=r-1;t++){const o=l+h*t;p.push({id:"image-selection-guide-row-"+t,points:[ue(s,o),ue(s+c,o)],opacity:a,strokeWidth:1,strokeColor:e})}for(let t=1;t<=n-1;t++){const o=s+u*t;p.push({id:"image-selection-guide-col-"+t,points:[ue(o,l),ue(o,l+d)],opacity:a,strokeWidth:1,strokeColor:e})}i(p)}));on(e,hi,(e=>o(140,F=e)));const pi="crop-"+L();let mi,gi=pi+"-"+(mt?Wt:"zoom"),$i=gi,fi=void 0;const yi=ec(A?20:0);on(e,yi,(e=>o(137,E=e)));return e.$$set=e=>{"isActive"in e&&qe(o(0,Je=e.isActive)),"stores"in e&&o(96,et=e.stores),"cropImageSelectionCornerStyle"in e&&o(1,tt=e.cropImageSelectionCornerStyle),"cropWillRenderImageSelectionGuides"in e&&o(97,ot=e.cropWillRenderImageSelectionGuides),"cropAutoCenterImageSelectionTimeout"in e&&o(98,it=e.cropAutoCenterImageSelectionTimeout),"cropEnableZoomMatchImageAspectRatio"in e&&o(99,ct=e.cropEnableZoomMatchImageAspectRatio),"cropEnableRotateMatchImageAspectRatio"in e&&o(100,dt=e.cropEnableRotateMatchImageAspectRatio),"cropEnableRotationInput"in e&&o(101,mt=e.cropEnableRotationInput),"cropEnableZoom"in e&&o(2,gt=e.cropEnableZoom),"cropEnableZoomInput"in e&&o(102,$t=e.cropEnableZoomInput),"cropEnableZoomAutoHide"in e&&o(103,wt=e.cropEnableZoomAutoHide),"cropEnableImageSelection"in e&&o(104,kt=e.cropEnableImageSelection),"cropEnableInfoIndicator"in e&&o(105,Ct=e.cropEnableInfoIndicator),"cropEnableZoomTowardsWheelPosition"in e&&o(106,Tt=e.cropEnableZoomTowardsWheelPosition),"cropEnableLimitWheelInputToCropSelection"in e&&o(107,Mt=e.cropEnableLimitWheelInputToCropSelection),"cropEnableCenterImageSelection"in e&&o(108,Rt=e.cropEnableCenterImageSelection),"cropEnableButtonRotateLeft"in e&&o(109,Pt=e.cropEnableButtonRotateLeft),"cropEnableButtonRotateRight"in e&&o(110,Et=e.cropEnableButtonRotateRight),"cropEnableButtonFlipHorizontal"in e&&o(111,It=e.cropEnableButtonFlipHorizontal),"cropEnableButtonFlipVertical"in e&&o(112,At=e.cropEnableButtonFlipVertical),"cropSelectPresetOptions"in e&&o(113,Lt=e.cropSelectPresetOptions),"cropEnableSelectPreset"in e&&o(114,zt=e.cropEnableSelectPreset),"cropEnableFilterMatchAspectRatio"in e&&o(115,Ft=e.cropEnableFilterMatchAspectRatio),"cropSelectPresetFilter"in e&&o(94,Dt=e.cropSelectPresetFilter),"cropEnableButtonToggleCropLimit"in e&&o(116,Ot=e.cropEnableButtonToggleCropLimit),"cropWillRenderTools"in e&&o(117,Bt=e.cropWillRenderTools),"cropActiveTransformTool"in e&&o(118,Wt=e.cropActiveTransformTool),"cropMinimizeToolbar"in e&&o(119,_t=e.cropMinimizeToolbar),"cropInteractionFocus"in e&&o(120,Vt=e.cropInteractionFocus),"cropRotationRange"in e&&o(3,Nt=e.cropRotationRange),"cropMaskOpacity"in e&&o(121,Ht=e.cropMaskOpacity),"locale"in e&&o(4,jt=e.locale)},e.$$.update=()=>{4096&e.$$.dirty[0]|134217728&e.$$.dirty[3]&&Xt.set("selection"===Vt&&I),1048576&e.$$.dirty[3]&&o(128,i=Lt&&Array.isArray(Lt)&&Lt.length),1048576&e.$$.dirty[3]|16&e.$$.dirty[4]&&Kt.set(i?Lt:[]),4096&e.$$.dirty[0]&&I&&So.set(1),4096&e.$$.dirty[0]&&$o.set(!I),4096&e.$$.dirty[0]&&fo.set(!I),4096&e.$$.dirty[0]&&I&&yo.set(!0),32768&e.$$.dirty[4]&&o(123,p="overlay"===z.layoutMode),1075838976&e.$$.dirty[3]&&o(127,v=zt&&!p),41943040&e.$$.dirty[4]&&o(136,l=j&&X&&ft(j,X)),33558528&e.$$.dirty[4]&&o(134,c=!(!X||!l)),33559552&e.$$.dirty[4]&&o(132,d=c&&ht(X,l,(e=>se(e,5)))),16400&e.$$.dirty[0]|26148866&e.$$.dirty[3]|2013298968&e.$$.dirty[4]|15&e.$$.dirty[5]&&o(11,r=Le&&Bt([Pt&&["Button","rotate-left",{label:jt.cropLabelButtonRotateLeft,labelClass:"PinturaToolbarContentWide",icon:jt.cropIconButtonRotateLeft,onclick:()=>{ro(-Math.PI/2),no.write()}}],Et&&["Button","rotate-right",{label:jt.cropLabelButtonRotateRight,labelClass:"PinturaToolbarContentWide",icon:jt.cropIconButtonRotateRight,onclick:()=>{ro(Math.PI/2),no.write()}}],It&&["Button","flip-horizontal",{label:jt.cropLabelButtonFlipHorizontal,labelClass:"PinturaToolbarContentWide",icon:jt.cropIconButtonFlipHorizontal,onclick:()=>{q(te)?un(Co,Ie=!Ie,Ie):un(ko,Ae=!Ae,Ae),no.write()}}],At&&["Button","flip-vertical",{label:jt.cropLabelButtonFlipVertical,labelClass:"PinturaToolbarContentWide",icon:jt.cropIconButtonFlipVertical,onclick:()=>{q(te)?un(ko,Ae=!Ae,Ae):un(Co,Ie=!Ie,Ie),no.write()}}],v&&i&&[!1===Dt?"Dropdown":Tf,"select-preset",{icon:uu(jt.cropIconSelectPreset,jt,ui(Pe,Ee)),label:uu(jt.cropLabelSelectPreset,jt,ui(Pe,Ee)),labelClass:"PinturaToolbarContentWide",options:Ee,filter:Dt,onfilterchange:eo,selectedIndex:Pe,onchange:({value:e})=>{Fo(e)?(un(_o,xe=U(e[0],e[1]),xe),un(Ro,Re=Oe(e),Re)):un(_o,xe=e,xe),d&&ai(),no.write()},optionMapper:e=>{let t=!1;const o=Fo(e.value)?e.value[0]/e.value[1]:e.value;if(o){const e=os(ee,te,o);t=e.width{const{width:o=24,height:i=24,bounds:r=16,radius:n=3}=t;let a,s,l,c,d=Fo(e)?U(e[0],e[1]):e,u=!!d;return d=u?d:1,l=d>1?r:d*r,c=l/d,a=Math.round(.5*(o-l)),s=Math.round(.5*(i-c)),``})(e.value,{bounds:14}),{...e,disabled:t}}}],Ot&&["Dropdown","select-crop-limit",{icon:uu(jt.cropIconCropBoundary,jt,le),label:jt.cropLabelCropBoundary,labelClass:"PinturaToolbarContentWide",onchange:({value:e})=>{un(Vo,le=e,le),no.write()},options:[[!0,jt.cropLabelCropBoundaryEdge,{icon:uu(jt.cropIconCropBoundary,jt,!0)}],[!1,jt.cropLabelCropBoundaryNone,{icon:uu(jt.cropIconCropBoundary,jt,!1)}]]}]].filter(Boolean),z,(()=>Zt.set({}))).filter(Boolean)),6144&e.$$.dirty[0]|1140850688&e.$$.dirty[3]|32768&e.$$.dirty[4]&&un(vo,Me=I&&"never"!==_t&&("always"===_t||"short"===z.verticalSpace||p)?r.map((([e,t,o])=>Array.isArray(o)?[e,t,o]:[e,t,{...o,hideLabel:!0}])):[],Me),268435456&e.$$.dirty[4]&&o(23,n=le?0:-1),75497472&e.$$.dirty[4]&&o(129,a=j&&ue(-(K.x-j.x),-(K.y-j.y))),262176&e.$$.dirty[4]&&o(130,s=B&&ue(Hd(B.x+.5*B.width+a.x),Hd(B.y+.5*B.height+a.y))),16777216&e.$$.dirty[4]&&o(133,u=null!=Z),8392704&e.$$.dirty[4]&&o(135,h=j&&l&&(l.height===j.height||l.width===j.width)),6293504&e.$$.dirty[4]&&o(131,m=!h&&H<1&&N<1),1920&e.$$.dirty[4]&&o(9,g=c&&!u&&(!d||m)),8192&e.$$.dirty[0]|1073745920&e.$$.dirty[3]&&o(22,$=Ct&&!!V&&!p),262176&e.$$.dirty[4]&&o(8,b=B&&a&&{x:B.x+a.x,y:B.y+a.y,width:B.width,height:B.height}),256&e.$$.dirty[0]|1073743872&e.$$.dirty[3]&&o(21,f=kt&&!!b&&!p),32800&e.$$.dirty[3]|1048640&e.$$.dirty[4]&&o(10,y=Rt&&!!s&&!it&&!_),512&e.$$.dirty[0]|536870944&e.$$.dirty[3]|524288&e.$$.dirty[4]&&g&&it&&!W&&(clearTimeout(si),o(122,si=setTimeout(ai,it))),536870912&e.$$.dirty[3]|524288&e.$$.dirty[4]&&W&&clearTimeout(si),1536&e.$$.dirty[0]|16384&e.$$.dirty[4]&&li.set(y&&g?1:0,{hard:!1===A}),16448&e.$$.dirty[4]&&ci.set(s,{hard:!1===A}),4096&e.$$.dirty[0]|131072&e.$$.dirty[4]&&(I&&!D?(un(wo,O.crop={maskOpacity:Ht,maskMarkupOpacity:Ht},O),wo.set(O)):(delete O.crop,wo.set(O))),65536&e.$$.dirty[4]&&F&&jo.update((e=>{const t=e.filter((e=>!/^image\-selection\-guide/.test(e.id)));return I?[...t,...F]:t})),32768&e.$$.dirty[4]&&o(126,x="short"!==z.verticalSpace),1140850688&e.$$.dirty[3]|4&e.$$.dirty[4]&&o(20,w="never"===_t&&!p||x&&"always"!==_t),4&e.$$.dirty[0]|512&e.$$.dirty[3]&&o(125,S=gt&&$t),1024&e.$$.dirty[3]|6&e.$$.dirty[4]&&o(124,k=wt?x&&S:S),256&e.$$.dirty[3]|1&e.$$.dirty[4]&&o(19,C=mt||k),1&e.$$.dirty[4]&&(k||o(5,$i=gi)),32&e.$$.dirty[0]&&o(18,T={name:pi,selected:$i}),16&e.$$.dirty[0]|256&e.$$.dirty[3]|1&e.$$.dirty[4]&&o(7,M=[mt&&{id:pi+"-rotation",label:jt.cropLabelTabRotation},k&&{id:pi+"-zoom",label:jt.cropLabelTabZoom}].filter(Boolean)),128&e.$$.dirty[0]&&o(17,R=M.map((e=>e.id))),64&e.$$.dirty[0]|1073741824&e.$$.dirty[3]&&mi&&!mi.children.length&&p&&mi.dispatchEvent(new CustomEvent("measure",{detail:mi.rect})),4096&e.$$.dirty[0]|16384&e.$$.dirty[4]&&A&&yi.set(I?0:20),8192&e.$$.dirty[4]&&o(16,P=E?`transform: translateY(${E}px)`:void 0)},[Je,tt,gt,Nt,jt,$i,mi,M,b,g,y,r,I,V,te,fi,P,R,T,C,w,f,$,n,de,Fe,Be,_e,Ge,Ze,Xe,Ut,Gt,Zt,Xt,Yt,Kt,ao,so,co,uo,ho,mo,bo,xo,vo,wo,ko,Co,To,Mo,Ro,Po,Eo,Io,Ao,Lo,zo,Do,Oo,Bo,Wo,_o,Vo,No,Ho,Uo,()=>{qt="select",un(so,W=!0,W),un(Eo,Z=Ke(X),Z),Zo=_?Xo:Yo},({detail:e})=>{const{boundsLimited:t,boundsIntent:o}=Zo(e.direction,e.translation);un(co,J=!0,J),un(Io,Te=o,Te),un(Po,X=t,X)},({detail:e})=>{const{boundsLimited:t}=Zo(e.direction,e.translation);un(co,J=!1,J),un(so,W=!1,W),un(Io,Te=void 0,Te),$e(e.translation)&&(un(Po,X=t,X),no.write()),un(Eo,Z=void 0,Z),qt=void 0},()=>{qt="rotate",un(so,W=!0,W),un(zo,ye=Ke(V),ye)},e=>{un(co,J=!0,J),un(To,te=e,te)},e=>{un(co,J=!1,J),un(so,W=!1,W),un(To,te=e,te),no.write(),un(zo,ye=void 0,ye)},()=>{qt="pan",Ko=void 0,un(so,W=!0,W),qo=Ke(V)},({detail:e})=>{un(co,J=!0,J),Jo(e)},({detail:e})=>{un(co,J=!1,J),un(so,W=!1,W),($e(e.translation)>0||0!==e.scalar)&&(Jo(e),no.write()),un(Lo,he=void 0,he),qo=void 0},({detail:{translation:e}})=>{_&&(e=me(pe(e))),Ko=e,un(so,W=!1,W)},Qo,ei,ti,()=>{qt="zoom",un(so,W=!0,W),qo=Ke(V)},e=>{un(co,J=!1,J),oi(e)},e=>{oi(e),no.write(),un(co,J=!1,J),un(so,W=!1,W),qo=void 0},()=>{qt="zoom",qo||(ii=Ke(V),un(so,W=!0,W))},({detail:e})=>{ii&&(un(co,J=!0,J),ri(e))},({detail:e})=>{ii&&(un(co,J=!1,J),un(so,W=!1,W),ri(e),un(Lo,he=void 0,he),ii=void 0,no.write())},e=>{const t=Wp(e,de,K);if(Mt&&!yt(X,t))return;qt="zoom",un(so,W=!0,W),un(co,J=!0,J),e.preventDefault(),e.stopPropagation();const o=yd(e),i=1+o/100,r=Ke(V),n=1===Math.min(V.width/ce.width,V.height/ce.height);if(ct&&le){const e=oo(V,ee,te);if(Jt()&&e&&o>0&&d){un(so,W=!1,W),un(co,J=!1,J);const e=q(te)?Qe({height:ee.width,width:ee.height}):Qe(ee);if(ht(r,e))return;if(clearTimeout(ni),ht(no.state.crop,e))return;return un(Do,V=e,V),void no.write()}}let a=at(V);if(Tt&&"selection"!==Vt&&o<0&&!n){const e=we(pe(t),X),o=Math.min(X.width/V.width,X.height/V.height),i=lt(Ke(X),1.1);a=yt(i,t)?ve(Ke(V),ke(e,1/o)):a}let s=lt(Ke(V),i,a);if(je(Q[1],s)||(s=rt(at(s),Q[1])),je(s,Q[0])||(s=rt(at(s),Q[0])),ht(r,s,se))return un(so,W=!1,W),void un(co,J=!1,J);un(Do,V=St(s,(e=>se(e,5))),V),un(so,W=!1,W),un(co,J=!1,J),clearTimeout(ni),ni=setTimeout((()=>{no.write()}),500)},ai,li,ci,di,hi,pi,yi,Dt,"crop",et,ot,it,ct,dt,mt,$t,wt,kt,Ct,Tt,Mt,Rt,Pt,Et,It,At,Lt,zt,Ft,Ot,Bt,Wt,_t,Vt,Ht,si,p,k,S,x,v,i,a,s,m,d,u,c,h,l,E,A,z,F,D,B,W,_,N,H,j,Z,X,K,ee,le,ce,Pe,Ee,Ie,Ae,Le,function(t){Qn.call(this,e,t)},({detail:e})=>o(5,$i=e),function(e){ta[e?"unshift":"push"]((()=>{mi=e,o(6,mi)}))},e=>Bp(e),function(e){fi=e,o(15,fi)},function(t){Qn.call(this,e,t)}]}var Xf={util:["crop",class extends Fa{constructor(e){super(),za(this,e,Zf,Hf,Qr,{name:95,isActive:0,stores:96,cropImageSelectionCornerStyle:1,cropWillRenderImageSelectionGuides:97,cropAutoCenterImageSelectionTimeout:98,cropEnableZoomMatchImageAspectRatio:99,cropEnableRotateMatchImageAspectRatio:100,cropEnableRotationInput:101,cropEnableZoom:2,cropEnableZoomInput:102,cropEnableZoomAutoHide:103,cropEnableImageSelection:104,cropEnableInfoIndicator:105,cropEnableZoomTowardsWheelPosition:106,cropEnableLimitWheelInputToCropSelection:107,cropEnableCenterImageSelection:108,cropEnableButtonRotateLeft:109,cropEnableButtonRotateRight:110,cropEnableButtonFlipHorizontal:111,cropEnableButtonFlipVertical:112,cropSelectPresetOptions:113,cropEnableSelectPreset:114,cropEnableFilterMatchAspectRatio:115,cropSelectPresetFilter:94,cropEnableButtonToggleCropLimit:116,cropWillRenderTools:117,cropActiveTransformTool:118,cropMinimizeToolbar:119,cropInteractionFocus:120,cropRotationRange:3,cropMaskOpacity:121,locale:4},null,[-1,-1,-1,-1,-1,-1,-1,-1])}get name(){return this.$$.ctx[95]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get stores(){return this.$$.ctx[96]}set stores(e){this.$$set({stores:e}),pa()}get cropImageSelectionCornerStyle(){return this.$$.ctx[1]}set cropImageSelectionCornerStyle(e){this.$$set({cropImageSelectionCornerStyle:e}),pa()}get cropWillRenderImageSelectionGuides(){return this.$$.ctx[97]}set cropWillRenderImageSelectionGuides(e){this.$$set({cropWillRenderImageSelectionGuides:e}),pa()}get cropAutoCenterImageSelectionTimeout(){return this.$$.ctx[98]}set cropAutoCenterImageSelectionTimeout(e){this.$$set({cropAutoCenterImageSelectionTimeout:e}),pa()}get cropEnableZoomMatchImageAspectRatio(){return this.$$.ctx[99]}set cropEnableZoomMatchImageAspectRatio(e){this.$$set({cropEnableZoomMatchImageAspectRatio:e}),pa()}get cropEnableRotateMatchImageAspectRatio(){return this.$$.ctx[100]}set cropEnableRotateMatchImageAspectRatio(e){this.$$set({cropEnableRotateMatchImageAspectRatio:e}),pa()}get cropEnableRotationInput(){return this.$$.ctx[101]}set cropEnableRotationInput(e){this.$$set({cropEnableRotationInput:e}),pa()}get cropEnableZoom(){return this.$$.ctx[2]}set cropEnableZoom(e){this.$$set({cropEnableZoom:e}),pa()}get cropEnableZoomInput(){return this.$$.ctx[102]}set cropEnableZoomInput(e){this.$$set({cropEnableZoomInput:e}),pa()}get cropEnableZoomAutoHide(){return this.$$.ctx[103]}set cropEnableZoomAutoHide(e){this.$$set({cropEnableZoomAutoHide:e}),pa()}get cropEnableImageSelection(){return this.$$.ctx[104]}set cropEnableImageSelection(e){this.$$set({cropEnableImageSelection:e}),pa()}get cropEnableInfoIndicator(){return this.$$.ctx[105]}set cropEnableInfoIndicator(e){this.$$set({cropEnableInfoIndicator:e}),pa()}get cropEnableZoomTowardsWheelPosition(){return this.$$.ctx[106]}set cropEnableZoomTowardsWheelPosition(e){this.$$set({cropEnableZoomTowardsWheelPosition:e}),pa()}get cropEnableLimitWheelInputToCropSelection(){return this.$$.ctx[107]}set cropEnableLimitWheelInputToCropSelection(e){this.$$set({cropEnableLimitWheelInputToCropSelection:e}),pa()}get cropEnableCenterImageSelection(){return this.$$.ctx[108]}set cropEnableCenterImageSelection(e){this.$$set({cropEnableCenterImageSelection:e}),pa()}get cropEnableButtonRotateLeft(){return this.$$.ctx[109]}set cropEnableButtonRotateLeft(e){this.$$set({cropEnableButtonRotateLeft:e}),pa()}get cropEnableButtonRotateRight(){return this.$$.ctx[110]}set cropEnableButtonRotateRight(e){this.$$set({cropEnableButtonRotateRight:e}),pa()}get cropEnableButtonFlipHorizontal(){return this.$$.ctx[111]}set cropEnableButtonFlipHorizontal(e){this.$$set({cropEnableButtonFlipHorizontal:e}),pa()}get cropEnableButtonFlipVertical(){return this.$$.ctx[112]}set cropEnableButtonFlipVertical(e){this.$$set({cropEnableButtonFlipVertical:e}),pa()}get cropSelectPresetOptions(){return this.$$.ctx[113]}set cropSelectPresetOptions(e){this.$$set({cropSelectPresetOptions:e}),pa()}get cropEnableSelectPreset(){return this.$$.ctx[114]}set cropEnableSelectPreset(e){this.$$set({cropEnableSelectPreset:e}),pa()}get cropEnableFilterMatchAspectRatio(){return this.$$.ctx[115]}set cropEnableFilterMatchAspectRatio(e){this.$$set({cropEnableFilterMatchAspectRatio:e}),pa()}get cropSelectPresetFilter(){return this.$$.ctx[94]}set cropSelectPresetFilter(e){this.$$set({cropSelectPresetFilter:e}),pa()}get cropEnableButtonToggleCropLimit(){return this.$$.ctx[116]}set cropEnableButtonToggleCropLimit(e){this.$$set({cropEnableButtonToggleCropLimit:e}),pa()}get cropWillRenderTools(){return this.$$.ctx[117]}set cropWillRenderTools(e){this.$$set({cropWillRenderTools:e}),pa()}get cropActiveTransformTool(){return this.$$.ctx[118]}set cropActiveTransformTool(e){this.$$set({cropActiveTransformTool:e}),pa()}get cropMinimizeToolbar(){return this.$$.ctx[119]}set cropMinimizeToolbar(e){this.$$set({cropMinimizeToolbar:e}),pa()}get cropInteractionFocus(){return this.$$.ctx[120]}set cropInteractionFocus(e){this.$$set({cropInteractionFocus:e}),pa()}get cropRotationRange(){return this.$$.ctx[3]}set cropRotationRange(e){this.$$set({cropRotationRange:e}),pa()}get cropMaskOpacity(){return this.$$.ctx[121]}set cropMaskOpacity(e){this.$$set({cropMaskOpacity:e}),pa()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),pa()}}]};function Yf(e){let t,o,i,r,n,a,s,l=e[77],c=(P(e[77].label)?e[77].label(e[2]):e[77].label)+"";function d(...t){return e[51](e[77],...t)}const u=()=>e[52](o,l),h=()=>e[52](null,l);return{c(){t=kn("div"),o=kn("div"),i=Mn(),r=kn("span"),n=Tn(c),An(o,"class",Qf),An(t,"slot","option"),An(t,"class","PinturaFilterOption")},m(e,l){wn(e,t,l),bn(t,o),u(),bn(t,i),bn(t,r),bn(r,n),a||(s=[Pn(o,"measure",d),hn($c.call(null,o))],a=!0)},p(t,o){l!==(e=t)[77]&&(h(),l=e[77],u()),4&o[0]|32768&o[2]&&c!==(c=(P(e[77].label)?e[77].label(e[2]):e[77].label)+"")&&Fn(n,c)},d(e){e&&Sn(t),h(),a=!1,Kr(s)}}}function qf(e){let t,o;return t=new Wu({props:{locale:e[2],layout:"row",options:e[3],selectedIndex:e[12],onchange:e[32],$$slots:{option:[Yf,({option:e})=>({77:e}),({option:e})=>[0,0,e?32768:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};4&o[0]&&(i.locale=e[2]),8&o[0]&&(i.options=e[3]),4096&o[0]&&(i.selectedIndex=e[12]),1028&o[0]|98304&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Kf(e){let t,o,i,r,n,a,s,l;function c(t){e[54](t)}function d(t){e[55](t)}function u(t){e[56](t)}let h={elasticity:e[13]*e[19],onscroll:e[53],$$slots:{default:[qf]},$$scope:{ctx:e}};return void 0!==e[4]&&(h.maskFeatherStartOpacity=e[4]),void 0!==e[5]&&(h.maskFeatherEndOpacity=e[5]),void 0!==e[6]&&(h.maskFeatherSize=e[6]),o=new vd({props:h}),ta.push((()=>Ea(o,"maskFeatherStartOpacity",c))),ta.push((()=>Ea(o,"maskFeatherEndOpacity",d))),ta.push((()=>Ea(o,"maskFeatherSize",u))),o.$on("measure",e[57]),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"slot","footer"),An(t,"style",e[11])},m(i,r){wn(i,t,r),Aa(o,t,null),a=!0,s||(l=[Pn(t,"transitionend",e[30]),Pn(t,"measure",e[58]),hn($c.call(null,t,{observePosition:!0}))],s=!0)},p(e,s){const l={};8192&s[0]&&(l.elasticity=e[13]*e[19]),128&s[0]&&(l.onscroll=e[53]),5132&s[0]|65536&s[2]&&(l.$$scope={dirty:s,ctx:e}),!i&&16&s[0]&&(i=!0,l.maskFeatherStartOpacity=e[4],ca((()=>i=!1))),!r&&32&s[0]&&(r=!0,l.maskFeatherEndOpacity=e[5],ca((()=>r=!1))),!n&&64&s[0]&&(n=!0,l.maskFeatherSize=e[6],ca((()=>n=!1))),o.$set(l),(!a||2048&s[0])&&An(t,"style",e[11])},i(e){a||(xa(o.$$.fragment,e),a=!0)},o(e){va(o.$$.fragment,e),a=!1},d(e){e&&Sn(t),La(o),s=!1,Kr(l)}}}function Jf(e){let t,o;return t=new J$({props:{$$slots:{footer:[Kf]},$$scope:{ctx:e}}}),t.$on("measure",e[59]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16380&o[0]|65536&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}let Qf="PinturaFilterPreview";function ey(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S=Gr,k=()=>(S(),S=en(R,(e=>o(43,d=e))),R),C=Gr,T=()=>(C(),C=en(M,(e=>o(49,b=e))),M);e.$$.on_destroy.push((()=>S())),e.$$.on_destroy.push((()=>C()));let{isActive:M}=t;T();let{isActiveFraction:R}=t;k();let{stores:E}=t,{locale:I}=t,{filterFunctions:A}=t,{filterOptions:L}=t;const z=Jn("elasticityMultiplier");on(e,z,(e=>o(13,w=e)));const{history:F,interfaceImages:D,stageRectBase:O,utilRect:B,animation:W,scrollElasticity:_,imageSize:V,imagePreview:N,imageCropRect:H,imageRotation:j,imageFlipX:U,imageFlipY:G,imageBackgroundColor:Z,imageGamma:X,imageColorMatrix:Y,allowPan:q,allowZoom:K,allowZoomControls:J,allowPlayPause:Q}=E;on(e,D,(e=>o(60,u=e))),on(e,O,(e=>o(48,y=e))),on(e,B,(e=>o(47,f=e))),on(e,W,(e=>o(50,x=e))),on(e,V,(e=>o(62,p=e))),on(e,N,(e=>o(42,c=e))),on(e,Z,(e=>o(61,h=e))),on(e,X,(e=>o(44,m=e))),on(e,Y,(e=>o(40,s=e)));const ee=Ba({});on(e,ee,(e=>o(46,$=e)));const te=(e,t)=>un(ee,$[e.value]=t,$),oe=Wa(ee,(e=>{if(!e[void 0])return;const t=e[void 0];return v&&_e(v,t)?v:ze(t)}));on(e,oe,(e=>o(63,v=e)));const ie=Wa([M,oe,H,V,j,U,G],(([e,t,o,i,r,n,a],s)=>{if(!e||!t||!i)return g;const l=Qe(i),c=at(l),d=rs(i,o,r),u=at(d),h=we(pe(c),u),p=me(pe(h)),m=Math.max(t.width/o.width,t.height/o.height);s({origin:p,translation:h,rotation:{x:a?Math.PI:0,y:n?Math.PI:0,z:r},scale:m})}));on(e,ie,(e=>o(45,g=e)));const re=ec(x?20:0);let ne;on(e,re,(e=>o(39,a=e)));const ae={};let se,le,ce,de,he,ge,$e={x:0,y:0};const fe=Ba([]);on(e,fe,(e=>o(41,l=e)));const ye=e=>{const t={...e,data:c,size:p,offset:{...e.offset},mask:{...e.mask},backgroundColor:h};return t.opacity=d,t.offset.y+=a,t.mask.y+=a,t.id="filter",t},be=()=>u.filter((e=>"filter"!==e.id));Yn((()=>{D.set([])}));return e.$$set=e=>{"isActive"in e&&T(o(0,M=e.isActive)),"isActiveFraction"in e&&k(o(1,R=e.isActiveFraction)),"stores"in e&&o(34,E=e.stores),"locale"in e&&o(2,I=e.locale),"filterFunctions"in e&&o(35,A=e.filterFunctions),"filterOptions"in e&&o(3,L=e.filterOptions)},e.$$.update=()=>{if(262144&e.$$.dirty[1]&&q.set(b),262144&e.$$.dirty[1]&&K.set(b),262144&e.$$.dirty[1]&&J.set(b),262144&e.$$.dirty[1]&&b&&Q.set(!1),8&e.$$.dirty[0]&&o(38,i=cu(L)),640&e.$$.dirty[1]&&o(12,r=((e,t)=>{if(!e||!e.filter||!t)return 0;const o=e.filter;return t.findIndex((([e])=>{if(!A[e])return!1;const t=A[e]();return ds(t,o)}))})(s,i)),786432&e.$$.dirty[1]&&x&&re.set(b?0:20),512&e.$$.dirty[0]|458752&e.$$.dirty[1]&&b&&f&&y&&ge&&o(37,he={x:y.x-f.x,y:y.y-f.y+ge.y}),496&e.$$.dirty[0]|58096&e.$$.dirty[1]&&g&&he&&$e&&de&&ne){const e=he.x+de.x+$e.x,t=he.y,o=de.x+he.x,r=o+de.width;fe.set(i.map((([i],n)=>{const a=$[i],l=$e.x+a.x,c=l+a.width;if(c<0||l>de.width)return!1;const d=e+a.x,u=t+a.y,h=(e=>({origin:pe(e.origin),translation:pe(e.translation),rotation:{...e.rotation},scale:e.scale}))(g);h.offset=ue(.5*a.width+d,.5*a.height+u);h.maskOpacity=1,h.mask=nt(d+0,u,a.width+0,a.height),h.maskFeather=[1,0,1,0,1,r,1,r],lde.width-ce&&le<1&&(h.maskFeather[4]=le,h.maskFeather[5]=r-ce,h.maskFeather[6]=1,h.maskFeather[7]=r),h.maskCornerRadius=ne[i];let p=s&&Object.keys(s).filter((e=>"filter"!=e)).map((e=>s[e]))||[];return P(A[i])&&p.push(A[i]()),h.colorMatrix=p.length?jr(p):void 0,h.gamma=m,h})).filter(Boolean))}if(7424&e.$$.dirty[1])if(d>0&&l){const e=[...be(),...l.map(ye)];D.set(e)}else D.set(be());256&e.$$.dirty[1]&&o(11,n=a?`transform: translateY(${a}px)`:void 0)},[M,R,I,L,se,le,ce,$e,de,ge,ae,n,r,w,z,D,O,B,W,_,V,N,Z,X,Y,ee,te,oe,ie,re,e=>{e.target.className===Qf&&o(36,ne=Object.keys(ae).reduce(((e,t)=>{const o=ae[t],i=getComputedStyle(o),r=["top-left","top-right","bottom-left","bottom-right"].map((e=>i.getPropertyValue(`border-${e}-radius`))).map(fd).map((e=>1.25*e));return e[t]=r,e}),{}))},fe,({value:e})=>{un(Y,s={...s,filter:P(A[e])?A[e]():void 0},s),F.write()},"filter",E,A,ne,he,i,a,s,l,c,d,m,g,$,f,y,b,x,(e,t)=>te(e,t.detail),function(e,t){ta[e?"unshift":"push"]((()=>{ae[t.value]=e,o(10,ae)}))},e=>o(7,$e=e),function(e){se=e,o(4,se)},function(e){le=e,o(5,le)},function(e){ce=e,o(6,ce)},e=>o(8,de=e.detail),e=>o(9,ge=e.detail),function(t){Qn.call(this,e,t)}]}var ty={util:["filter",class extends Fa{constructor(e){super(),za(this,e,ey,Jf,Qr,{name:33,isActive:0,isActiveFraction:1,stores:34,locale:2,filterFunctions:35,filterOptions:3},null,[-1,-1,-1])}get name(){return this.$$.ctx[33]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[1]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get stores(){return this.$$.ctx[34]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[2]}set locale(e){this.$$set({locale:e}),pa()}get filterFunctions(){return this.$$.ctx[35]}set filterFunctions(e){this.$$set({filterFunctions:e}),pa()}get filterOptions(){return this.$$.ctx[3]}set filterOptions(e){this.$$set({filterOptions:e}),pa()}}]};function oy(e){let t,o,i=e[43].label+"";return{c(){t=kn("span"),o=Tn(i)},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){4096&t[1]&&i!==(i=e[43].label+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function iy(e){let t,o;const i=[{class:"PinturaControlList"},{tabs:e[1]},e[5]];let r={$$slots:{default:[oy,({tab:e})=>({43:e}),({tab:e})=>[0,e?4096:0]]},$$scope:{ctx:e}};for(let e=0;e({42:e}),({panel:e})=>[0,e?2048:0]]},$$scope:{ctx:e}};for(let e=0;e(m(),m=en(f,(e=>o(21,c=e))),f);e.$$.on_destroy.push((()=>m()));let{stores:$}=t,{isActive:f}=t;g();let{locale:y={}}=t,{finetuneControlConfiguration:b}=t,{finetuneOptions:x}=t,{finetuneNudgePrecision:v}=t;const{history:w,animation:S,scrollElasticity:k,rangeInputElasticity:C,imageColorMatrix:T,imageConvolutionMatrix:M,imageGamma:R,imageVignette:E,imageNoise:I,allowPan:A,allowZoom:z,allowZoomControls:F,allowPlayPause:D}=$;on(e,S,(e=>o(22,d=e)));const O={imageColorMatrix:T,imageConvolutionMatrix:M,imageGamma:R,imageVignette:E,imageNoise:I},B=Jn("elasticityMultiplier");on(e,B,(e=>o(6,h=e)));const W="finetune-"+L(),_=Ba({});on(e,_,(e=>o(23,u=e)));const V=Ba({});on(e,V,(e=>o(7,p=e)));let N=[];const H=ec(d?20:0);on(e,H,(e=>o(20,l=e)));return e.$$set=e=>{"stores"in e&&o(15,$=e.stores),"isActive"in e&&g(o(0,f=e.isActive)),"locale"in e&&o(16,y=e.locale),"finetuneControlConfiguration"in e&&o(17,b=e.finetuneControlConfiguration),"finetuneOptions"in e&&o(18,x=e.finetuneOptions),"finetuneNudgePrecision"in e&&o(19,v=e.finetuneNudgePrecision)},e.$$.update=()=>{var t;2097152&e.$$.dirty[0]&&A.set(c),2097152&e.$$.dirty[0]&&z.set(c),2097152&e.$$.dirty[0]&&F.set(c),2097152&e.$$.dirty[0]&&c&&D.set(!0),327680&e.$$.dirty[0]&&o(1,i=x?x.map((([e,t])=>({id:e,label:P(t)?t(y):t}))):[]),2&e.$$.dirty[0]&&o(2,r=i.length&&i[0].id),4&e.$$.dirty[0]&&o(5,n={name:W,selected:r}),2&e.$$.dirty[0]&&o(4,a=i.map((e=>e.id))),131072&e.$$.dirty[0]&&b&&(t=b,N&&N.forEach((e=>e())),N=a.map((e=>{const{getStore:o,getValue:i=G}=t[e];return o(O).subscribe((t=>{const o=null!=t?i(t):t;un(_,u={...u,[e]:o},u)}))}))),8519680&e.$$.dirty[0]&&b&&u&&un(V,p=Object.keys(u).reduce(((e,t)=>{const{base:o,min:i,max:r,getLabel:n,getStore:a,setValue:s=((e,t)=>e.set(t))}=b[t],l=a(O),c=null!=u[t]?u[t]:o;return e[t]={base:o,min:i,max:r,value:c,valueLabel:n?n(c,i,r,r-i):Math.round(100*c),oninputmove:e=>{s(l,e)},oninputend:e=>{s(l,e),w.write()},elasticity:h*C,labelReset:y.labelReset,nudgeMultiplier:v},e}),{}),p),6291456&e.$$.dirty[0]&&d&&H.set(c?0:20),1048576&e.$$.dirty[0]&&o(3,s=l?`transform: translateY(${l}px)`:void 0)},[f,i,r,s,a,n,h,p,S,k,B,_,V,H,"finetune",$,y,b,x,v,l,c,d,u,({detail:e})=>o(2,r=e),function(t){Qn.call(this,e,t)}]}var ly={util:["finetune",class extends Fa{constructor(e){super(),za(this,e,sy,ay,Qr,{name:14,stores:15,isActive:0,locale:16,finetuneControlConfiguration:17,finetuneOptions:18,finetuneNudgePrecision:19},null,[-1,-1])}get name(){return this.$$.ctx[14]}get stores(){return this.$$.ctx[15]}set stores(e){this.$$set({stores:e}),pa()}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get locale(){return this.$$.ctx[16]}set locale(e){this.$$set({locale:e}),pa()}get finetuneControlConfiguration(){return this.$$.ctx[17]}set finetuneControlConfiguration(e){this.$$set({finetuneControlConfiguration:e}),pa()}get finetuneOptions(){return this.$$.ctx[18]}set finetuneOptions(e){this.$$set({finetuneOptions:e}),pa()}get finetuneNudgePrecision(){return this.$$.ctx[19]}set finetuneNudgePrecision(e){this.$$set({finetuneNudgePrecision:e}),pa()}}]},cy=(e,t)=>{const o=t.length;return e<0?e%o+o:e>=o?e%o:e};function dy(e,t,o){const i=e.slice();return i[45]=t[o].key,i[46]=t[o].index,i[47]=t[o].translate,i[48]=t[o].scale,i[12]=t[o].rotate,i[49]=t[o].dir,i[50]=t[o].center,i[51]=t[o].type,i[2]=t[o].visible,i}function uy(e){let t,o;return{c(){t=kn("div"),An(t,"class","PinturaShapeManipulator"),An(t,"data-control","point"),An(t,"style",o=`pointer-events:none;transform: translate3d(${e[50].x}px, ${e[50].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)},m(e,o){wn(e,t,o)},p(e,i){56&i[0]&&o!==(o=`pointer-events:none;transform: translate3d(${e[50].x}px, ${e[50].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)&&An(t,"style",o)},d(e){e&&Sn(t)}}}function hy(e,t){let o,i,r,n,a,s,l,c,d;function u(...e){return t[17](t[46],...e)}let h="edge"===t[51]&&t[2]&&uy(t);return{key:e,first:null,c(){o=kn("div"),s=Mn(),h&&h.c(),l=Rn(),An(o,"role","button"),An(o,"aria-label",i=`Drag ${t[51]} ${t[45]}`),An(o,"tabindex",r="edge"===t[51]?-1:0),An(o,"class","PinturaShapeManipulator"),An(o,"data-control",n=t[51]),An(o,"style",a=`cursor:${t[49]?t[49]+"-resize":"move"};opacity:${t[4]};--tx:${t[47].x};--ty:${t[47].y};--r:${"edge"===t[51]?t[12]:0}rad;--sx:${"point"===t[51]?t[5]:t[48].x};--sy:${"point"===t[51]?t[5]:t[48].y};`),this.first=o},m(e,i){wn(e,o,i),wn(e,s,i),h&&h.m(e,i),wn(e,l,i),c||(d=[Pn(o,"nudge",u),hn(pd.call(null,o,{preventDefault:!0})),Pn(o,"interactionstart",(function(){Jr(t[9]("start",t[46]))&&t[9]("start",t[46]).apply(this,arguments)})),Pn(o,"interactionupdate",(function(){Jr(t[9]("move",t[46]))&&t[9]("move",t[46]).apply(this,arguments)})),Pn(o,"interactionend",(function(){Jr(t[9]("end",t[46]))&&t[9]("end",t[46]).apply(this,arguments)})),hn(hd.call(null,o,{observeKeys:!0}))],c=!0)},p(e,s){t=e,8&s[0]&&i!==(i=`Drag ${t[51]} ${t[45]}`)&&An(o,"aria-label",i),8&s[0]&&r!==(r="edge"===t[51]?-1:0)&&An(o,"tabindex",r),8&s[0]&&n!==(n=t[51])&&An(o,"data-control",n),56&s[0]&&a!==(a=`cursor:${t[49]?t[49]+"-resize":"move"};opacity:${t[4]};--tx:${t[47].x};--ty:${t[47].y};--r:${"edge"===t[51]?t[12]:0}rad;--sx:${"point"===t[51]?t[5]:t[48].x};--sy:${"point"===t[51]?t[5]:t[48].y};`)&&An(o,"style",a),"edge"===t[51]&&t[2]?h?h.p(t,s):(h=uy(t),h.c(),h.m(l.parentNode,l)):h&&(h.d(1),h=null)},d(e){e&&Sn(o),e&&Sn(s),h&&h.d(e),e&&Sn(l),c=!1,Kr(d)}}}function py(e){let t,o,i,r;return{c(){t=kn("div"),An(t,"role","button"),An(t,"aria-label","Drag rotator"),An(t,"tabindex","0"),An(t,"class","PinturaShapeManipulator"),An(t,"data-control","rotate"),An(t,"style",o=`transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)},m(o,n){wn(o,t,n),i||(r=[Pn(t,"nudge",e[11]),hn(pd.call(null,t,{preventDefault:!0})),Pn(t,"interactionstart",e[12]("start")),Pn(t,"interactionupdate",e[12]("move")),Pn(t,"interactionend",e[12]("end")),hn(hd.call(null,t,{observeKeys:!0}))],i=!0)},p(e,i){49&i[0]&&o!==(o=`transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)&&An(t,"style",o)},d(e){e&&Sn(t),i=!1,Kr(r)}}}function my(e){let t,o,i=[],r=new Map,n=e[3];const a=e=>e[45];for(let t=0;to(16,r=e)));const O=ec(.5,{precision:1e-4,stiffness:.3,damping:.7});on(e,O,(e=>o(5,a=e)));const B=ec(0,{precision:.001,stiffness:.3,damping:.7});on(e,B,(e=>o(4,n=e)));const W=e=>{let t="";return(e<=d&&e>=c||e>=h&&e<=p)&&(t="ns"),(e<=g||e>=m||e>=f&&e<=$)&&(t="ew"),(e>=w&&e<=S||e<=R&&e>=P)&&(t="nesw"),(e>=b&&e<=x||e<=C&&e>=T)&&(t="nwse"),t},_=(e,t)=>{s("resizestart",{indexes:e,translation:de()}),s("resizemove",{indexes:e,translation:t}),s("resizeend",{indexes:e,translation:de()})};return e.$$set=e=>{"visible"in e&&o(2,E=e.visible),"points"in e&&o(13,I=e.points),"rotatorPoint"in e&&o(0,A=e.rotatorPoint),"enableDragEdges"in e&&o(14,L=e.enableDragEdges),"enableDragPoints"in e&&o(15,z=e.enableDragPoints),"enableRotatePoints"in e&&o(1,F=e.enableRotatePoints)},e.$$.update=()=>{65540&e.$$.dirty[0]&&O.set(E?1:.5,{hard:!1===r}),65540&e.$$.dirty[0]&&B.set(E?1:0,{hard:!1===r}),8192&e.$$.dirty[0]&&o(3,i=((e,t)=>{let o=0;const i=Ee(e),r=[],n=e.length;for(;oo===e&&n===t)))continue;const d=ue(s.x+.5*(l.x-s.x),s.y+.5*(l.y-s.y));r.push({index:[o,n],key:"edge-"+o,type:"edge",scale:{x:Re(s,l),y:1},translate:{x:s.x,y:s.y},angle:c,rotate:c,center:d,visible:Array.isArray(L),dir:W(Math.atan2(i.y-d.y,i.x-d.x))})}return r})(I))},[A,F,E,i,n,a,D,O,B,(e,t)=>({detail:o})=>{const i=o&&o.translation?o.translation:ue(0,0);s("resize"+e,{...o,indexes:t,translation:i})},_,({detail:e})=>{s("rotatestart",{translation:de()}),s("rotatemove",{translation:e}),s("rotateend",{translation:de()})},e=>({detail:t})=>{const o=t&&t.translation?t.translation:ue(0,0);s("rotate"+e,{...t,translation:o})},I,L,z,r,(e,{detail:t})=>_(e,t)]}class $y extends Fa{constructor(e){super(),za(this,e,gy,my,Qr,{visible:2,points:13,rotatorPoint:0,enableDragEdges:14,enableDragPoints:15,enableRotatePoints:1},null,[-1,-1])}}var fy=(e,t)=>{const o=Bp(e);return we(o,t)},yy=e=>document.createTextNode(e),by=e=>(Xt()&&e.endsWith("

")?e.replace(/

<\/div>$/,"

"):e).replace(/

<\/div>/g,"
").replace(/<\/div>/g,"").replace(/
/g,"
");function xy(e){let t,o;return{c(){t=kn("pre"),An(t,"class","PinturaContentEditable"),An(t,"style",o=e[7]+";position:absolute;z-index:-1;pointer-events:none;")},m(o,i){wn(o,t,i),t.innerHTML=e[0]},p(e,i){1&i[0]&&(t.innerHTML=e[0]),128&i[0]&&o!==(o=e[7]+";position:absolute;z-index:-1;pointer-events:none;")&&An(t,"style",o)},d(e){e&&Sn(t)}}}function vy(e){let t,o,i,r,n,a,s=e[8]&&xy(e);return{c(){s&&s.c(),t=Mn(),o=kn("pre"),An(o,"class","PinturaContentEditable"),An(o,"data-wrap-content",i=e[4]||e[5]?"wrap":"nowrap"),An(o,"contenteditable",""),An(o,"spellcheck",e[1]),An(o,"autocorrect",e[2]),An(o,"autocapitalize",e[3]),An(o,"style",r=e[8]?e[15](e[7]):e[7])},m(i,r){s&&s.m(i,r),wn(i,t,r),wn(i,o,r),e[26](o),n||(a=[Pn(o,"input",e[13]),Pn(o,"compositionend",e[12]),Pn(o,"paste",e[14]),Pn(o,"keydown",e[10]),Pn(o,"keyup",e[11]),Pn(o,"blur",e[9])],n=!0)},p(e,n){e[8]?s?s.p(e,n):(s=xy(e),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null),48&n[0]&&i!==(i=e[4]||e[5]?"wrap":"nowrap")&&An(o,"data-wrap-content",i),2&n[0]&&An(o,"spellcheck",e[1]),4&n[0]&&An(o,"autocorrect",e[2]),8&n[0]&&An(o,"autocapitalize",e[3]),384&n[0]&&r!==(r=e[8]?e[15](e[7]):e[7])&&An(o,"style",r)},i:Gr,o:Gr,d(i){s&&s.d(i),i&&Sn(t),i&&Sn(o),e[26](null),n=!1,Kr(a)}}}function wy(e,t,o){let i,r,{spellcheck:n="false"}=t,{autocorrect:s="off"}=t,{autocapitalize:l="off"}=t,{wrapLines:c=!0}=t,{allowNewline:d=!0}=t,{textFormat:u="text"}=t,{formatInput:h=G}=t,{formatPaste:p=G}=t,{style:m}=t,{innerHTML:$}=t,{oninput:f=a}=t,{enableTextStyleShortcuts:y=!1}=t;const b=()=>{if(!v)return;const e=document.createRange();e.selectNodeContents(v);const t=R();t.removeAllRanges(),t.addRange(e)},x=qn();let v;document.execCommand("defaultParagraphSeparator",!1,"br");const w=e=>e.replace(/<\/?(?:i|b|em|u|s|strike|strong|font)>/,"").replace(/style=".*?"/g,"").replace(/\n/gim,"
"),S=()=>{o(0,$=v.innerHTML);const e=by($);x("input",e),f(e),requestAnimationFrame((()=>v&&v.scrollTo(0,0)))},k=()=>{P(v);const e="html"===u?v.innerHTML:w(v.innerHTML);o(6,v.innerHTML=h(e),v),E(v),S()},C={b:"bold",i:"italic",u:"underline",s:"strikethrough"},T=e=>{const t=g("span");return t.dataset.bookmark=e,t},M=(e,t,o)=>{const i=T(o);if(e.nodeType===Node.TEXT_NODE){const r=e.textContent;if("start"===o){const o=yy(r.substr(0,t)),n=yy(r.substr(t));e.replaceWith(o,i,n)}else{const o=yy(r.substr(0,t)),n=yy(r.substr(t));e.replaceWith(o,i,n)}}else e.nodeType===Node.ELEMENT_NODE&&e.insertBefore(i,e.childNodes[t])},R=()=>{const e=v.getRootNode();return"getSelection"in e?e.getSelection():document.getSelection()},P=e=>{const t=R();if(!t.getRangeAt||!t.rangeCount)return;const o=t.getRangeAt(0),{startOffset:i,endOffset:r,startContainer:n,endContainer:a}=o;if(e.contains(o.startContainer)&&e.contains(o.endContainer))if(n.nodeType===Node.TEXT_NODE&&n===a){const e=n.textContent,t=e.substr(0,i),o=T("start"),a=r-i>0?e.substr(i,r):"",s=T("end"),l=e.substr(r);n.replaceWith(t,o,a,s,l)}else M(n,i,"start"),M(a,r+(n===a?1:0),"end")},E=e=>{const t=I(e,"start"),o=I(e,"end");if(!t||!o)return;const i=document.createRange();i.setStart(t,0),i.setEnd(o,0);const r=R();r.removeAllRanges(),r.addRange(i),t.remove(),o.remove()},I=(e,t)=>{const o=e.children;for(let e=0;e{"spellcheck"in e&&o(1,n=e.spellcheck),"autocorrect"in e&&o(2,s=e.autocorrect),"autocapitalize"in e&&o(3,l=e.autocapitalize),"wrapLines"in e&&o(4,c=e.wrapLines),"allowNewline"in e&&o(5,d=e.allowNewline),"textFormat"in e&&o(16,u=e.textFormat),"formatInput"in e&&o(17,h=e.formatInput),"formatPaste"in e&&o(18,p=e.formatPaste),"style"in e&&o(19,m=e.style),"innerHTML"in e&&o(0,$=e.innerHTML),"oninput"in e&&o(20,f=e.oninput),"enableTextStyleShortcuts"in e&&o(21,y=e.enableTextStyleShortcuts)},e.$$.update=()=>{var t;if(64&e.$$.dirty[0]&&o(25,i=!!v),33554433&e.$$.dirty[0]&&i&&$&&(t=$)!==v.innerHTML&&(o(6,v.innerHTML=t,v),v===document.activeElement&&b()),524336&e.$$.dirty[0])if(!c&&d){const e=m.includes(":right")?"text-indent:-100px!important":m.includes(":center")?"":"min-width:calc(100% + 100px)!important";o(7,A=m+";overflow:visible;"+e)}else o(7,A=m);524288&e.$$.dirty[0]&&o(8,r=m.includes("text-stroke"))},[$,n,s,l,c,d,v,A,r,()=>{x("blur")},e=>{if(/escape/i.test(e.code))return e.stopPropagation(),void x("cancel");const t=e.ctrlKey||e.metaKey;if("html"===u&&t&&/b|i|u|s/.test(e.key))return y&&(e=>{const t=C[e];t&&document.execCommand(t)})(e.key),void e.preventDefault();/enter/i.test(e.code)&&(e.stopPropagation(),e.isComposing||(t?x("confirm"):(d||e.preventDefault(),document.execCommand("insertLineBreak"),e.preventDefault())))},()=>{},e=>{""!==e.data&&k()},e=>{const{inputType:t}=e;"insertCompositionText"!==t&&"deleteCompositionText"!==t&&k()},e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain"),o="html"===u?t:w(t),i=p(o);if(!i.length)return;const r=R().getRangeAt(0);r.deleteContents(),r.insertNode(document.createTextNode(i)),S()},e=>e.replace("-webkit-text-stroke","--text-stroke").replace("text-shadow","--text-shadow"),u,h,p,m,f,y,()=>k(),()=>v&&v.focus(),b,i,function(e){ta[e?"unshift":"push"]((()=>{v=e,o(6,v)}))}]}class Sy extends Fa{constructor(e){super(),za(this,e,wy,vy,Qr,{spellcheck:1,autocorrect:2,autocapitalize:3,wrapLines:4,allowNewline:5,textFormat:16,formatInput:17,formatPaste:18,style:19,innerHTML:0,oninput:20,enableTextStyleShortcuts:21,confirm:22,focus:23,select:24},null,[-1,-1])}get spellcheck(){return this.$$.ctx[1]}set spellcheck(e){this.$$set({spellcheck:e}),pa()}get autocorrect(){return this.$$.ctx[2]}set autocorrect(e){this.$$set({autocorrect:e}),pa()}get autocapitalize(){return this.$$.ctx[3]}set autocapitalize(e){this.$$set({autocapitalize:e}),pa()}get wrapLines(){return this.$$.ctx[4]}set wrapLines(e){this.$$set({wrapLines:e}),pa()}get allowNewline(){return this.$$.ctx[5]}set allowNewline(e){this.$$set({allowNewline:e}),pa()}get textFormat(){return this.$$.ctx[16]}set textFormat(e){this.$$set({textFormat:e}),pa()}get formatInput(){return this.$$.ctx[17]}set formatInput(e){this.$$set({formatInput:e}),pa()}get formatPaste(){return this.$$.ctx[18]}set formatPaste(e){this.$$set({formatPaste:e}),pa()}get style(){return this.$$.ctx[19]}set style(e){this.$$set({style:e}),pa()}get innerHTML(){return this.$$.ctx[0]}set innerHTML(e){this.$$set({innerHTML:e}),pa()}get oninput(){return this.$$.ctx[20]}set oninput(e){this.$$set({oninput:e}),pa()}get enableTextStyleShortcuts(){return this.$$.ctx[21]}set enableTextStyleShortcuts(e){this.$$set({enableTextStyleShortcuts:e}),pa()}get confirm(){return this.$$.ctx[22]}get focus(){return this.$$.ctx[23]}get select(){return this.$$.ctx[24]}}const ky=["i","b","u","strike"].map((e=>({tag:e,tagOpen:new RegExp(`<${e}>`,"g"),tagClose:new RegExp(``,"g"),placeholderOpen:new RegExp(`___${e}O___`,"g"),placeholderClose:new RegExp(`___${e}C___`,"g")})));var Cy=e=>e=((e,t=ky)=>(t.forEach((({tag:t,placeholderOpen:o,placeholderClose:i})=>{e=e.replace(o,`<${t}>`).replace(i,``)})),e))(e=(e=((e,t=ky)=>(t.forEach((({tag:t,tagOpen:o,tagClose:i})=>{e=e.replace(o,`___${t}O___`).replace(i,`___${t}C___`)})),e))(e)).replace(/ {2,}/g," ").replace(/\u00a0/g," ").split("\n").join("
")),Ty=(e,t)=>R(e)?parseFloat(e)/100*t:e,My=(e,t)=>({x:No(e.x,t.width),y:No(e.y,t.height)});function Ry(e,t,o){const i=e.slice();return i[276]=t[o],i[278]=o,i}function Py(e,t){let o,i,r,n,a,s,l,c,d,u,h,p=t[276].name+"";function m(){return t[180](t[278])}return r=new Oh({props:{color:t[276].color}}),{key:e,first:null,c(){o=kn("li"),i=kn("button"),Ia(r.$$.fragment),n=Mn(),a=kn("span"),s=Tn(p),c=Mn(),An(i,"class","PinturaShapeListItem"),An(i,"type","button"),An(i,"aria-label",l="Select shape "+t[276].name),this.first=o},m(e,t){wn(e,o,t),bn(o,i),Aa(r,i,null),bn(i,n),bn(i,a),bn(a,s),bn(o,c),d=!0,u||(h=Pn(i,"click",m),u=!0)},p(e,o){t=e;const n={};1048576&o[0]&&(n.color=t[276].color),r.$set(n),(!d||1048576&o[0])&&p!==(p=t[276].name+"")&&Fn(s,p),(!d||1048576&o[0]&&l!==(l="Select shape "+t[276].name))&&An(i,"aria-label",l)},i(e){d||(xa(r.$$.fragment,e),d=!0)},o(e){va(r.$$.fragment,e),d=!1},d(e){e&&Sn(o),La(r),u=!1,h()}}}function Ey(e){let t,o;return t=new $y({props:{visible:!0,points:e[12],rotatorPoint:e[26],enableDragEdges:e[16],enableDragPoints:e[28],enableRotatePoints:e[14]}}),t.$on("resizestart",e[37]),t.$on("resizemove",e[38]),t.$on("resizeend",e[39]),t.$on("rotatestart",e[40]),t.$on("rotatemove",e[41]),t.$on("rotateend",e[42]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};4096&o[0]&&(i.points=e[12]),67108864&o[0]&&(i.rotatorPoint=e[26]),65536&o[0]&&(i.enableDragEdges=e[16]),268435456&o[0]&&(i.enableDragPoints=e[28]),16384&o[0]&&(i.enableRotatePoints=e[14]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Iy(e){let t,o,i,r;const n=[Ly,Ay],a=[];function s(e,t){return"modal"===e[4]?0:"inline"===e[4]?1:-1}return~(t=s(e))&&(o=a[t]=n[t](e)),{c(){o&&o.c(),i=Rn()},m(e,o){~t&&a[t].m(e,o),wn(e,i,o),r=!0},p(e,r){let l=t;t=s(e),t===l?~t&&a[t].p(e,r):(o&&(ya(),va(a[l],1,1,(()=>{a[l]=null})),ba()),~t?(o=a[t],o?o.p(e,r):(o=a[t]=n[t](e),o.c()),xa(o,1),o.m(i.parentNode,i)):o=null)},i(e){r||(xa(o),r=!0)},o(e){va(o),r=!1},d(e){~t&&a[t].d(e),e&&Sn(i)}}}function Ay(e){let t,o,i,r,n,a={formatInput:e[44],wrapLines:!!e[13].width,textFormat:e[13].format,enableTextStyleShortcuts:e[5],allowNewline:e[27],style:e[25]};return o=new Sy({props:a}),e[183](o),o.$on("input",e[45]),o.$on("keyup",e[48]),o.$on("cancel",e[50]),o.$on("confirm",e[49]),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaInlineInput"),An(t,"style",e[24])},m(a,s){wn(a,t,s),Aa(o,t,null),i=!0,r||(n=Pn(t,"focusout",e[184]),r=!0)},p(e,r){const n={};8192&r[0]&&(n.wrapLines=!!e[13].width),8192&r[0]&&(n.textFormat=e[13].format),32&r[0]&&(n.enableTextStyleShortcuts=e[5]),134217728&r[0]&&(n.allowNewline=e[27]),33554432&r[0]&&(n.style=e[25]),o.$set(n),(!i||16777216&r[0])&&An(t,"style",e[24])},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(i){i&&Sn(t),e[183](null),La(o),r=!1,n()}}}function Ly(e){let t,o;return t=new yp({props:{panelOffset:e[2],onconfirm:e[49],oncancel:e[50],buttonCancel:{icon:e[6].shapeIconInputCancel,label:e[6].shapeLabelInputCancel},buttonConfirm:{icon:e[6].shapeLabelInputConfirm,label:e[6].shapeIconInputConfirm,hideLabel:!0},$$slots:{default:[zy]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};4&o[0]&&(i.panelOffset=e[2]),64&o[0]&&(i.buttonCancel={icon:e[6].shapeIconInputCancel,label:e[6].shapeLabelInputCancel}),64&o[0]&&(i.buttonConfirm={icon:e[6].shapeLabelInputConfirm,label:e[6].shapeIconInputConfirm,hideLabel:!0}),41943296&o[0]|1&o[9]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function zy(e){let t,o,i;return{c(){t=kn("textarea"),An(t,"spellcheck","false"),An(t,"autocorrect","off"),An(t,"autocapitalize","off"),An(t,"style",e[25])},m(r,n){wn(r,t,n),e[181](t),Dn(t,e[23]),o||(i=[Pn(t,"keydown",e[47]),Pn(t,"keypress",e[46]),Pn(t,"keyup",e[48]),Pn(t,"input",e[45]),Pn(t,"input",e[182])],o=!0)},p(e,o){33554432&o[0]&&An(t,"style",e[25]),8388608&o[0]&&Dn(t,e[23])},d(r){r&&Sn(t),e[181](null),o=!1,Kr(i)}}}function Fy(e){let t,o,i,r,n;return o=new up({props:{items:e[21],key:e[10]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaShapeControls"),An(t,"style",e[22])},m(a,s){wn(a,t,s),Aa(o,t,null),i=!0,r||(n=[Pn(t,"measure",e[185]),hn($c.call(null,t))],r=!0)},p(e,r){const n={};2097152&r[0]&&(n.items=e[21]),1024&r[0]&&(n.key=e[10]),o.$set(n),(!i||4194304&r[0])&&An(t,"style",e[22])},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o),r=!1,Kr(n)}}}function Dy(e){let t,o,i,r,n,s,l,c,d,u,h=[],p=new Map,m=e[20];const g=e=>e[276].id;for(let t=0;t0&&Fy(e);return{c(){t=kn("div"),o=kn("nav"),i=kn("ul");for(let e=0;e{$=null})),ba()),e[11]?f?(f.p(e,a),2048&a[0]&&xa(f,1)):(f=Iy(e),f.c(),xa(f,1),f.m(t,s)):f&&(ya(),va(f,1,1,(()=>{f=null})),ba()),e[17]>0?y?(y.p(e,a),131072&a[0]&&xa(y,1)):(y=Fy(e),y.c(),xa(y,1),y.m(t,null)):y&&(ya(),va(y,1,1,(()=>{y=null})),ba()),l&&Jr(l.update)&&8&a[0]&&l.update.call(null,{drag:!0,inertia:!0,multiTouch:!1,observeKeys:!0,shouldStartInteraction:Wy,getEventPosition:e[187]})},i(e){if(!c){for(let e=0;ee.target===t;function _y(e,t,o){let i,r,n,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,P,E,I,A,z,F,D,O,B,W,_,V,N,H,j,U,Z,X,Y,q,K,J,Q,ee,te,oe,ie,re,ne,ae,le=Gr,he=()=>(le(),le=en(Ce,(e=>o(175,oe=e))),Ce);e.$$.on_destroy.push((()=>le()));let{uid:me=L()}=t,{ui:$e}=t,{disabled:Se=!1}=t,{shapes:Ce}=t;he();let{selection:Te}=t,{offset:Pe}=t,{contextRotation:Le=0}=t,{contextFlipX:ze=!1}=t,{contextFlipY:De=!1}=t,{contextZoom:Oe=1}=t,{active:Be=!1}=t,{opacity:_e=1}=t,{parentRect:Ve}=t,{rootRect:Ne}=t,{utilRect:He}=t,{hoverColor:je}=t,{caretColor:Ze}=t,{gridColor:Ye}=t,{snapColor:qe}=t,{textInputMode:Ke="inline"}=t,{oninteractionstart:Je=a}=t,{oninteractionupdate:Qe=a}=t,{oninteractionrelease:et=a}=t,{oninteractionend:rt=a}=t,{oninteractioncancel:st=a}=t,{onaddshape:lt=a}=t,{onupdateshape:ct=a}=t,{onselectshape:dt=a}=t,{onblurshape:ut=a}=t,{onremoveshape:ht=a}=t,{ontapshape:pt=a}=t,{onhovershape:mt=a}=t,{onhovercanvas:gt=a}=t,{ontapcanvas:ft=a}=t,{onleavecanvas:yt=a}=t,{beforeSelectShape:bt=(()=>!0)}=t,{beforeDeselectShape:St=(()=>!0)}=t,{beforeRemoveShape:kt=(()=>!0)}=t,{beforeUpdateShape:Ct=((e,t)=>t)}=t,{willRenderShapeControls:Tt=G}=t,{willRenderShapeTextControls:Mt=G}=t,{willStartInteraction:Rt=((e,t)=>!0)}=t,{mapEditorPointToImagePoint:It}=t,{mapImagePointToEditorPoint:At}=t,{eraseRadius:Bt}=t,{selectRadius:Wt}=t,{enableButtonFlipVertical:_t=!1}=t,{enableTapToAddText:Vt=!0}=t,{enableTextStyleControls:Nt=!0}=t,{locale:Ht}=t,{snapThreshold:jt=0}=t,{snapPointer:Ut=!0}=t,{enableSnapToContext:Gt=!0}=t,{gridSize:Zt=0}=t;const Xt=e=>{if(0===jt)return[];let t;return Gt&&(t={...Ve,x:0,y:0}),[...oe.filter((t=>t!==e)).filter((e=>!Fi(e))).map((e=>pr({...e},Ve))),t].filter(Boolean)},Yt=(e,t,o,i)=>0===e?{snapTargets:[]}:{snapThreshold:e,gridSize:t,gridRect:o,snapTargets:Xt(i)},qt=Jn("isAnimated");on(e,qt,(e=>o(176,re=e)));const Kt=e=>e.set(tn(e)),Jt=e=>tn(e).find(Fi),Qt=(e,t)=>{if(!Jt(t))return _i(e),io(e,t)},eo=e=>{Jt(e)&&e.update((e=>e.filter((e=>!Fi(e)))))},to=e=>{const t=Jt(e);if(t)return Vi(t),Kt(e),t},oo=(e,t,o=((e,t)=>({...e,...t})))=>{Jt(t)&&t.update((t=>t.map((t=>Fi(t)?o(t,e):t))))},io=(e,t=Ce)=>(t.update((t=>[...t,e])),e),ro=(e,t,o)=>{const i=Ct({...e},t,{...o});return fr(e,i,o),e},no=(e,t)=>{const o=Re(e,t),i=ye(e,t),r=Math.PI/8,n=r*Math.round(i/r)-Le%r;t.x=e.x+o*Math.cos(n),t.y=e.y+o*Math.sin(n)},ao=Jn("keysPressed");on(e,ao,(e=>o(177,ne=e)));const so=(e,t,o)=>0===e||t&&o?e:t||o?-e:e,lo=e=>{if(null===e.x&&null===e.y)return co();e.x&&o(138,uo=It({x:e.x,y:0}).x),e.y&&o(139,ho=It({x:0,y:e.y}).y)},co=()=>{o(138,uo=null),o(139,ho=null)};let uo=null,ho=null;const po=(e,t)=>{const o=At(e);return It(ve(o,t))},mo=(e,t,o)=>{const i=(o-t)/e+1;return Array.from({length:i},((o,i)=>t+i*e))},go=e=>{let t=[],o=[],i=e.points;if(void 0!==e.x1&&(i=[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2}]),i){const e=i.map(At),r=ot(e),n=e[0],a=e[e.length-1];t=[r.x,r.x+.5*r.width,r.x+r.width,n.x,a.x],o=[r.y,r.y+.5*r.height,r.y+r.height,n.y,a.y]}else if(e.text||void 0!==e.width||void 0!==e.rx){let i;if(e.text&&void 0===e.height){const t=ni(e.text,e);i=nt(e.x,e.y,t.width,t.height)}else i=void 0!==e.width?tt(e):tt({x:e.x-e.rx,y:e.y-e.ry,width:2*e.rx,height:2*e.ry});const r=wt(i).map(At),n=Math.abs(e.rotation)>0?$t(i,e.rotation).map(At):r,a=ot(n),s=at(a),l=.5*a.width,c=.5*a.height;t=[s.x-l,s.x,s.x+l],o=[s.y-c,s.y,s.y+c]}else if(void 0!==e.x){const i=At(e);t=[i.x],o=[i.y]}return{x:t,y:o}},$o=(e,t,o)=>{let i,r,n,a=Number.Infinity,s=null,l=null;for(let c=0;c{const n={x:null,y:null},a={x:null,y:null},s=t.map(go);if(i>0){const e=At({x:0,y:0}),t=At({x:i,y:i}),o=At({x:r.width,y:r.height}),n=t.x-e.x,a=mo(n,e.x,o.x),l=mo(n,e.y,o.y);s.push({x:a,y:l})}return s.forEach((t=>{const{snapTranslation:i,snapLine:r}=((e,t,o)=>{const i={x:null,y:null},r={x:null,y:null},n=$o(e.x,t.x,o);null!==n.target&&(i.x=n.target,r.x=n.target-n.origin);const a=$o(e.y,t.y,o);return null!==a.target&&(i.y=a.target,r.y=a.target-a.origin),{snapTranslation:r,snapLine:i}})(e,t,o);null!==i.x&&(null===a.x||Math.abs(i.x)(null!==t.x&&(e.x+=t.x),null!==t.y&&(e.y+=t.y),e),bo=(e,t,o,i)=>{const{snapThreshold:r=0,gridSize:n=0,gridRect:a,snapTargets:s=[]}=i||{};let l=null;if(Pi(e)){if(r){const i=pr({...e},Ve),l=po(wi(t),o),c=po(Si(t),o),d=go({...i,x1:l.x,y1:l.y,x2:c.x,y2:c.y}),{snapTranslation:u,snapLines:h}=fo(d,s,r,n,a);yo(o,u),lo(h)}const i=po(wi(t),o),c=po(Si(t),o);l={x1:i.x,y1:i.y,x2:c.x,y2:c.y}}else if(e.points){if(r){const i=pr({...e},Ve),l=go({...i,points:t.points.map((e=>po(e,o)))}),{snapTranslation:c,snapLines:d}=fo(l,s,r,n,a);yo(o,c),lo(d)}l={points:t.points.map((e=>po(e,o)))}}else if(Mi(e)||ki(e)||Ri(e)){if(r){const i=pr({...e},Ve),l=po(t,o),c=go({...i,...l}),{snapTranslation:d,snapLines:u}=fo(c,s,r,n,a);yo(o,d),lo(u)}l=po(t,o)}l&&(ro(e,l,Ve),Mo())},xo={0:1,1:0,2:3,3:2},vo={0:3,1:2,2:1,3:0};let wo;const So=()=>{if(oe.length)return oe.find(Fi)},ko=()=>{if(oe.length)return oe.findIndex(Fi)},Co=()=>{const e=So();if(e)return Vi(e),Mo(),e},To=()=>{if(!So())return;const e=[...oe];e.splice(ko(),1),Ce.set(e)},Mo=()=>{Ce.set(oe)},Ro=(e,t=[],o=!0)=>{t.filter(Boolean).forEach((t=>delete e[t])),o&&Mo()},Po=(e,t,o=!0)=>{e=Object.assign(e,t),o&&Mo()},Eo=(e,t,o,i=!0)=>{e[t]=o,i&&Mo()},Io=(e,t=!0)=>{oe.forEach((t=>Po(t,e,!1))),t&&Mo()},Lo=()=>[...oe].reverse().find(Li),Fo=()=>!!Lo(),Do=e=>{if(!kt(e))return!1;Ce.set(oe.filter((t=>t!==e))),ht(e)},Oo=()=>{const e=Lo();if(!e)return;const t=oe.filter((e=>ji(e)&&Hi(e))),o=t.findIndex((t=>t===e));if(!1===Do(e))return;if(Bo=e,t.length-1<=0)return Wo();const i=o-1<0?t.length-1:o-1;Vo(t[i])};let Bo=void 0;const Wo=(e={})=>{const{storePrevious:t=!0}=e;Object.keys(ur).forEach((e=>ur[e]={}));const o=_o();t&&(Bo=o),Io({isSelected:!1,isEditing:!1,_prerender:!1}),o&&ut(o)},_o=()=>oe.find(Li),Vo=(e,t=!0)=>{if(Fi(e))return;const o=_o()||Bo,i=Li(e);Bo=void 0,bt(o,e)&&(Wo(),(e=>{e.isSelected=!0})(e),!i&&dt(e),t&&Mo())},jo=e=>{or&&or.confirm&&e.isEditing&&or.confirm(),Po(e,{isSelected:!1,isEditing:!1,_prerender:!1}),ut(e)},Uo=e=>{Po(e,{isSelected:!0,isEditing:!0,_prerender:"inline"===Ke})},Go=e=>{Po(e,{isSelected:!0,isEditing:!1,_prerender:!1})},Zo=e=>{if(!e.length)return[];const t=e.filter(kt);return Ce.set(oe.filter((e=>!t.includes(e)))),t},Xo=e=>{const t=ni(e.text,e);return nt(e.x,e.y,e.width?Math.min(e.width,t.width):t.width,e.height?Math.min(e.height,t.height):t.height)},Yo=e=>{if(Di(e))return tt(e);if(Ri(e))return it(e);const t=Xo(e);return t.width=Math.max(10,e.width||t.width),t},Ko=(e,t,o=0,i=(()=>!0))=>[...e].reverse().filter(i).map((e=>({shape:e,priority:1}))).filter((e=>{const{shape:i}=e,r=pr(fi(i),Ve),n=o+.5*(r.strokeWidth||0);if(Mi(r))return Ot(t,n,r,i.rotation);if(ki(r)){const o=Yo(r),a=Ot(t,n,o,i.rotation);let s=!1;if(a&&!Li(i)){const a=Xo(r);"right"!==i.textAlign||i.flipX||(a.x=o.x+o.width-a.width),"center"===i.textAlign&&(a.x=o.x+.5*o.width-.5*a.width),s=Ot(t,n,a,i.rotation,at(o)),s||(e.priority=-1)}return a}return Ri(r)?((e,t,o,i,r,n)=>{const a=Lt(ue(o.x,o.y),o.rx,o.ry,i,r,n,12);return Dt(e,t,a)})(t,n,r,i.rotation,i.flipX,i.flipY):Pi(r)?zt(t,Math.max(16,n),wi(r),Si(r)):Ei(r)&&r.pathClose?Dt(t,n,r.points):!!Ei(r)&&(1===r.points.length?Me(t,r.points[0])e.priorityt.priority?-1:0)).map((e=>e.shape)),Jo=(e,t,o,i=0)=>{const r=Math.abs(i),n=Ge(t,o),a=Xe(n,r),s=(({start:e,end:t},o)=>{if(0===o)return[ue(e.x,e.y),ue(e.x,e.y),ue(t.x,t.y),ue(t.x,t.y)];const i=Math.atan2(t.y-e.y,t.x-e.x),r=Math.sin(i)*o,n=Math.cos(i)*o;return[ue(r+e.x,-n+e.y),ue(-r+e.x,n+e.y),ue(-r+t.x,n+t.y),ue(r+t.x,-n+t.y)]})(a,r);return e.filter((e=>{const t=pr(fi(e),Ve);if(Pi(t)||Ei(t)){const e=t.points?[...t.points]:[wi(t),Si(t)];return!!Pt(a,e)}return((e,t)=>!!e.find((e=>Et(e,t)))||!!t.find((t=>Et(t,e))))(s,((e,t=12)=>{if(Mi(e))return $t(e,e.rotation,at(e));if(ki(e)){const t=Yo(e);return $t(t,e.rotation,at(t))}return Ri(e)?Lt(ue(e.x,e.y),e.rx,e.ry,e.rotation,e.flipX,e.flipY,t):[]})(t))}))};let Qo=void 0,ei=void 0,ti=void 0,oi=void 0,ii=void 0,ri=void 0,ai=!1,si=!1,li=!1;const ci=()=>{clearTimeout(ei),ei=void 0,o(141,li=!1),co()};let di=null;const ui=e=>{const t=Ao(e.rotation)&&0!==e.rotation;if(Mi(e)){if(e.width<1&&e.height<1)return;const o=at(e),i=wt(e);return(e.flipX||e.flipY)&&Ie(i,e.flipX,e.flipY,o.x,o.y),t?Ae(i,e.rotation,o.x,o.y):i}if(Ri(e)){if(e.rx<1&&e.ry<1)return;const o=e,i=wt(it(e));return(e.flipX||e.flipY)&&Ie(i,e.flipX,e.flipY,o.x,o.y),t?Ae(i,e.rotation,o.x,o.y):i}if(Pi(e))return[wi(e),Si(e)];if(Ei(e)){if(e.bitmap&&!e.pathClose){const t=ot(e.points);t.x-=.5*e.strokeWidth,t.y-=.5*e.strokeWidth,t.width+=e.strokeWidth,t.height+=e.strokeWidth;return ui({...e,...t})}return[...e.points]}if(ki(e)){if(e.width<5&&e.height<5)return;const o=Yo(e);o.width=Math.max(10,o.width);const i=at(o),r=wt(o);return(e.flipX||e.flipY)&&Ie(r,e.flipX,e.flipY,i.x,i.y),t?Ae(r,e.rotation,i.x,i.y):r}return[]},hi=e=>{const t=ui(e);let o,i;return e.flipY?(o=Ee([t[0],t[1]]),i=fe(ue(t[1].x-t[2].x,t[1].y-t[2].y))):(o=Ee([t[2],t[3]]),i=fe(ue(t[2].x-t[1].x,t[2].y-t[1].y))),ke(i,20/Oe),{origin:o,dir:i}},pi=e=>t=>t.id===e,mi=e=>{const t=pi(e);return e=>e.filter((e=>t=>!e(t))(t))},gi=e=>{const t=pi(e),o=mi(e);return()=>$e.update((e=>e.some(t)?o(e):e))},$i=e=>{const t=mi(e);return(...e)=>{$e.update((o=>[...t(o),...e.filter(Boolean)]))}},yi=gi(By),bi=$i(By);let xi;const vi="markup-manipulator-segment-"+me,Ai=(e,t)=>{const o=e[t],i=t-1<0?e[e.length-1]:e[t-1],r=t+1{if(jt<=0)return e;if(t)return co(),e;const o=It(e),r=Xt(),{snapTranslation:n,snapLines:a}=fo(go(o),r,jt,Zt,i);return lo(a),yo(e,n),e},Wi=ec(0);on(e,Wi,(e=>o(178,ae=e)));const qi="markup-grid-line-"+me,Ki=gi(qi),Ji=$i(qi),Qi="markup-snap-line",er=gi(Qi),tr=$i(Qi);let or;const ir=e=>{o(8,or.innerHTML=Cy(e),or)},rr=e=>{const t=void 0===e.value?e.innerHTML:e.value,o="text"===r.format?by(t).split(/
|/g).join("\n").replace(/ /g,String.fromCharCode(160)).replace(/&/g,"&"):t;return Ci(r)&&!1!==r.disableNewline?(e=>{const t=e.split(/[\n\r]/g);return t.length>1?t.map((e=>e.trim())).filter((e=>e.length)).join(" "):t[0]})(o):o},ar=()=>{const e=rr(or),t=Gi(r,e),o=!0===t?e:t;let i=E.x,n=E.y;if(!r.height){const e=$t({...A},r.rotation),t=ni(o,c),a=$t({x:i,y:n,...t},r.rotation),[s,,l]=e,[d,,u]=a;let h=s,p=d;r.flipX&&(h=l,p=u);const m=we(pe(h),p);i+=m.x,n+=m.y}Po(r,{x:R(P.x)?No(i,Ve.width):i,y:R(P.y)?No(n,Ve.height):n,text:o})},sr=()=>{let e=s;s&&Co(),or&&or.confirm&&or.confirm(),ar(),Go(r),e?lt(r):ct(r)},lr=()=>{s?To():(Po(r,{text:P.text,x:P.x,y:P.y}),Go(r))},cr=(e,t,{flipX:o,flipY:i,rotation:r},n="top left")=>{let a,s;const[l,c,d,u]=$t(e,r),[h,p,m,g]=$t(t,r);if("top center"===n){a=Ee(i?[u,d]:[l,c]),s=Ee(i?[g,m]:[h,p])}else"top right"===n&&!o||"top left"===n&&o?(a=i?d:c,s=i?m:p):(a=i?u:l,s=i?g:h);return we(pe(a),s)},dr=(e,t,o)=>ue(R(e.x)?No(t.x+o.x,Ve.width):t.x+o.x,R(e.y)?No(t.y+o.y,Ve.height):t.y+o.y),ur={},hr=()=>Uo(r),mr=()=>{const e=Ue(ni(r.text,c),(e=>Math.ceil(e))),t=zo(r,"height"),o=!t&&zo(r,"width"),i=r.id;let n=ur[i];n||(ur[i]={},n=ur[i]);const a=e=>{const{width:t,...o}=c,i=ni(r.text,o),n=cr(nt(c.x,c.y,e.width,e.height),nt(c.x,c.y,i.width,i.height),c,"top "+r.textAlign),a=!1!==c.disableNewline;Ro(r,["width","height",a&&"textAlign"]),Po(r,{...dr(r,c,n)})},s=t=>{const o=We(n.width||c.width||e.width,e.height),i=n.textAlign||"left",a=cr(nt(c.x,c.y,t.width,t.height),nt(c.x,c.y,o.width,o.height),c,"top "+i);Ro(r,["height"]),Po(r,{...dr(r,c,a),width:R(r.width)?No(o.width,Ve.width):o.width,textAlign:i})},l=t=>{const o=We(n.width||e.width,n.height||e.height),i=n.textAlign||"left",a=cr(nt(c.x,c.y,t.width,t.height),nt(c.x,c.y,o.width,o.height),c,"top "+i);Po(r,{...dr(r,c,a),width:R(r.width)?No(o.width,Ve.width):o.width,height:R(r.width)?No(o.height,Ve.height):o.height,textAlign:i})};if(t){n.textAlign=r.textAlign,n.width=c.width,n.height=c.height;const e=We(c.width,c.height);Zi(r,"auto-height")?s(e):Zi(r,"auto-width")&&a(e)}else if(o){n.textAlign=r.textAlign,n.width=c.width;const t=We(c.width,e.height);Zi(r,"auto-width")?a(t):Zi(r,"fixed-size")&&l(t)}else{n.textAlign=r.textAlign;const t=We(Math.ceil(e.width),Math.ceil(e.height));Zi(r,"fixed-size")?l(t):Zi(r,"auto-height")&&s(t)}},gr=e=>{e.stopPropagation();const t=r.flipX||!1;Eo(r,"flipX",!t),ct(r)},yr=e=>{e.stopPropagation();const t=r.flipY||!1;Eo(r,"flipY",!t),ct(r)},br=e=>{Eo(r,"opacity",e)},xr=e=>{br(e),ct(r)},vr=e=>{e.stopPropagation(),e.target.blur(),Oo()},wr=e=>{e.stopPropagation();oe.findIndex((e=>e===r))!==oe.length-1&&(Ce.set(oe.filter((e=>e!==r)).concat([r])),ct(r))},Sr=e=>{e.stopPropagation(),kr()},kr=()=>{const e=fi(r);e.id=L();const t=ue(50,-50);if(zo(e,"points")){const o=$r(e,["points"],Ve);o.points.forEach((e=>{e.x+=t.x,e.y+=t.y})),fr(e,o,Ve)}else if(Pi(e)){const o=$r(e,["x1","y1","x2","y2"],Ve);o.x1+=t.x,o.y1+=t.y,o.x2+=t.x,o.y2+=t.y,fr(e,o,Ve)}else{const t=$r(e,["x","y"],Ve);t.x+=50,t.y-=50,fr(e,t,Ve)}Ce.set([...oe,e]),lt(e),Vo(e)},Cr=ec(0,{stiffness:.2,damping:.7});let Tr;on(e,Cr,(e=>o(17,ie=e)));const Mr=(e,t)=>{const{disableTextLayout:o=[]}=t;return"height"in t?o.includes("auto-height")?e.shapeIconButtonTextLayoutAutoWidth:e.shapeIconButtonTextLayoutAutoHeight:"width"in t?o.includes("auto-width")?e.shapeIconButtonTextLayoutFixedSize:e.shapeIconButtonTextLayoutAutoWidth:o.includes("fixed-size")?e.shapeIconButtonTextLayoutAutoHeight:e.shapeIconButtonTextLayoutFixedSize},Rr=(e,t)=>{const{disableTextLayout:o=[]}=t;return"height"in t?o.includes("auto-height")?e.shapeTitleButtonTextLayoutAutoWidth:e.shapeTitleButtonTextLayoutAutoHeight:"width"in t?o.includes("auto-width")?e.shapeTitleButtonTextLayoutFixedSize:e.shapeTitleButtonTextLayoutAutoWidth:o.includes("fixed-size")?e.shapeTitleButtonTextLayoutAutoHeight:e.shapeTitleButtonTextLayoutFixedSize};let Pr=!1;let Er=de(),Ir=void 0;const Ar=e=>{mt(e),o(142,xi=e)};let Lr;Yn((()=>{er(),Ki(),zi(),yi()}));return e.$$set=e=>{"uid"in e&&o(57,me=e.uid),"ui"in e&&o(58,$e=e.ui),"disabled"in e&&o(0,Se=e.disabled),"shapes"in e&&he(o(1,Ce=e.shapes)),"selection"in e&&o(59,Te=e.selection),"offset"in e&&o(2,Pe=e.offset),"contextRotation"in e&&o(60,Le=e.contextRotation),"contextFlipX"in e&&o(61,ze=e.contextFlipX),"contextFlipY"in e&&o(62,De=e.contextFlipY),"contextZoom"in e&&o(63,Oe=e.contextZoom),"active"in e&&o(64,Be=e.active),"opacity"in e&&o(65,_e=e.opacity),"parentRect"in e&&o(66,Ve=e.parentRect),"rootRect"in e&&o(3,Ne=e.rootRect),"utilRect"in e&&o(67,He=e.utilRect),"hoverColor"in e&&o(68,je=e.hoverColor),"caretColor"in e&&o(69,Ze=e.caretColor),"gridColor"in e&&o(70,Ye=e.gridColor),"snapColor"in e&&o(71,qe=e.snapColor),"textInputMode"in e&&o(4,Ke=e.textInputMode),"oninteractionstart"in e&&o(72,Je=e.oninteractionstart),"oninteractionupdate"in e&&o(73,Qe=e.oninteractionupdate),"oninteractionrelease"in e&&o(74,et=e.oninteractionrelease),"oninteractionend"in e&&o(75,rt=e.oninteractionend),"oninteractioncancel"in e&&o(76,st=e.oninteractioncancel),"onaddshape"in e&&o(77,lt=e.onaddshape),"onupdateshape"in e&&o(78,ct=e.onupdateshape),"onselectshape"in e&&o(79,dt=e.onselectshape),"onblurshape"in e&&o(80,ut=e.onblurshape),"onremoveshape"in e&&o(81,ht=e.onremoveshape),"ontapshape"in e&&o(82,pt=e.ontapshape),"onhovershape"in e&&o(83,mt=e.onhovershape),"onhovercanvas"in e&&o(84,gt=e.onhovercanvas),"ontapcanvas"in e&&o(85,ft=e.ontapcanvas),"onleavecanvas"in e&&o(86,yt=e.onleavecanvas),"beforeSelectShape"in e&&o(87,bt=e.beforeSelectShape),"beforeDeselectShape"in e&&o(88,St=e.beforeDeselectShape),"beforeRemoveShape"in e&&o(89,kt=e.beforeRemoveShape),"beforeUpdateShape"in e&&o(90,Ct=e.beforeUpdateShape),"willRenderShapeControls"in e&&o(91,Tt=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(92,Mt=e.willRenderShapeTextControls),"willStartInteraction"in e&&o(93,Rt=e.willStartInteraction),"mapEditorPointToImagePoint"in e&&o(94,It=e.mapEditorPointToImagePoint),"mapImagePointToEditorPoint"in e&&o(95,At=e.mapImagePointToEditorPoint),"eraseRadius"in e&&o(96,Bt=e.eraseRadius),"selectRadius"in e&&o(97,Wt=e.selectRadius),"enableButtonFlipVertical"in e&&o(98,_t=e.enableButtonFlipVertical),"enableTapToAddText"in e&&o(99,Vt=e.enableTapToAddText),"enableTextStyleControls"in e&&o(5,Nt=e.enableTextStyleControls),"locale"in e&&o(6,Ht=e.locale),"snapThreshold"in e&&o(100,jt=e.snapThreshold),"snapPointer"in e&&o(101,Ut=e.snapPointer),"enableSnapToContext"in e&&o(102,Gt=e.enableSnapToContext),"gridSize"in e&&o(103,Zt=e.gridSize)},e.$$.update=()=>{var t,a;16&e.$$.dirty[2]|1024&e.$$.dirty[3]&&o(166,i=Zt>0?{x:0,y:0,...Ve}:void 0),1&e.$$.dirty[0]|1048576&e.$$.dirty[5]&&o(146,r=!Se&&oe&&(So()||Lo())),4194304&e.$$.dirty[4]&&o(173,n=!!r),4194304&e.$$.dirty[4]&&o(160,s=r&&Fi(r)),4194304&e.$$.dirty[4]|32&e.$$.dirty[5]&&o(10,l=r&&!s?r.id:void 0),8&e.$$.dirty[0]|16&e.$$.dirty[2]|4194304&e.$$.dirty[4]&&o(13,c=Ne&&r&&pr(fi(r),Ve)),4194304&e.$$.dirty[4]|32&e.$$.dirty[5]&&o(144,d=!(!r||!s)),8192&e.$$.dirty[0]|8&e.$$.dirty[2]|4194304&e.$$.dirty[4]&&o(172,u=r&&_e&&ui(c)||[]),4194304&e.$$.dirty[4]&&o(174,h=r&&(Xi(t=r)&&Yi(t)&&!0!==t.disableResize&&(Di(t)||Ti(t)||Ri(t)||Pi(t)||Ei(t)&&zo(t,"pathClose")))&&!Ii(r)),4194304&e.$$.dirty[4]&&o(14,p=r&&(e=>Xi(e)&&!0!==e.disableRotate&&(Di(e)||zo(e,"text")||Ri(e)))(r)&&!Ii(r)),4194304&e.$$.dirty[4]|524288&e.$$.dirty[5]&&o(16,m=h&&zo(r,"text")&&!r.height?[[1,2],[3,0]]:(!r||!Pi(r)&&!Ei(r))&&h),65536&e.$$.dirty[0]|4194304&e.$$.dirty[4]|524288&e.$$.dirty[5]&&o(28,g=!!r&&(!Array.isArray(m)&&h)),4194304&e.$$.dirty[4]|131072&e.$$.dirty[5]&&o(15,$=r&&u.length>1),4&e.$$.dirty[3]|131072&e.$$.dirty[5]&&o(170,f=u.map(At)),4&e.$$.dirty[0]|32768&e.$$.dirty[5]&&o(12,y=f.map((e=>ue(e.x-Pe.x,e.y-Pe.y)))),4194304&e.$$.dirty[4]|262144&e.$$.dirty[5]&&o(27,b=n&&(Ti(r)?!zo(r,"disableNewline")||!r.disableNewline:!1===r.disableNewline)),4&e.$$.dirty[3]|262144&e.$$.dirty[4]&&(xi&&At&&!Li(xi)&&Hi(xi)?(e=>{const t=ui(pr(fi(e),Ve));if(!t)return;const o=t.map(At),i=!!e.pathClose||!(!e.bitmap&&(Ei(e)||Pi(e))),r="hook"===e.selectionStyle,n=r?o.map(((e,t,o)=>({id:By,points:Ai(o,t),strokeColor:[0,0,0,.1],strokeWidth:2}))):[{id:By,points:o.map((e=>ue(e.x+1,e.y+1))),strokeColor:[0,0,0,.1],strokeWidth:2,pathClose:i}],a=r?o.map(((e,t,o)=>({id:By,points:Ai(o,t),strokeColor:je,strokeWidth:2}))):[{id:By,points:o,strokeColor:je,strokeWidth:2,pathClose:i}];bi(...n,...a)})(xi):yi()),61440&e.$$.dirty[0]|8&e.$$.dirty[2]&&o(171,x=$&&p&&_e&&y&&(e=>{const t=hi(e),o=At({x:t.origin.x+t.dir.x,y:t.origin.y+t.dir.y});return{origin:At(t.origin),position:o}})(c)),4&e.$$.dirty[0]|65536&e.$$.dirty[5]&&o(26,v=x&&ue(x.position.x-Pe.x,x.position.y-Pe.y)),4194304&e.$$.dirty[5]&&o(165,C=!!(ne||[]).find((e=>[91,93,17].includes(e)))),256&e.$$.dirty[3]|1024&e.$$.dirty[5]&&o(167,w=!(C||!Ut)),8&e.$$.dirty[2]|4718592&e.$$.dirty[4]|36896&e.$$.dirty[5]&&r&&f&&_e>0&&((e,t,o)=>{if(!Hi(t))return;const i=Ei(t),r=i&&zo(t,"pathClose"),n=r&&(e=>e.strokeWidth&&((e,t)=>{const o=e.strokeColor;return!!o&&(3===o.length||o[3]>0)})(e))(t),a=Fi(t),s=Ii(t),l="hook"===t.selectionStyle,{selectionOpacity:c=1}=t;if(a&&i&&!r)return;const d=[],h=[...f],p=h[h.length-1],m=h[0],g=(s?.05:.1)*e*c,$=g>0,y=(s?.5:1)*e*c,b=y>0,v=[0,0,0],w=[1,1,1],S=s?1:1.5;ne.includes(16)&&p&&o&&no(p,o);const k=h.length&&r&&a&&o?Me(m,o):1/0,C=h.length&&r&&a&&o?Me(p,o):1/0,T=k<=Oy,M=C<=Oy;!T&&o&&h.push(o);const R=h.length>1,P=!!t.pathClose||!(!t.bitmap&&(Ei(t)||Pi(t)))||h.length>2&&T;R&&$&&(l?d.push(...h.map(((e,t,o)=>({id:vi,points:Ai(o,t),strokeColor:v,strokeWidth:2,opacity:g})))):d.push({id:vi,points:h.map((e=>ue(e.x+1,e.y+1))),pathClose:P,strokeColor:v,strokeWidth:2,opacity:g})),r&&$&&d.push(...h.map((e=>({id:vi,...e,rx:2*S,ry:2*S,backgroundColor:v,opacity:g})))),x&&$&&d.push({id:vi,points:[ue(x.origin.x+1,x.origin.y+1),ue(x.position.x+1,x.position.y+1)],strokeColor:v,strokeWidth:2,opacity:g}),R&&b&&(l?d.push(...h.map(((e,t,o)=>({id:vi,points:Ai(o,t),strokeColor:w,strokeWidth:S,opacity:y})))):d.push({id:vi,points:h,pathClose:P,strokeColor:w,strokeWidth:S,backgroundColor:a&&r&&t.backgroundColor&&t.backgroundColor[3]>0?t.backgroundColor:[0,0,0,0],opacity:y})),r&&d.push(...h.map((e=>({id:vi,...e,rx:3*S,ry:3*S,backgroundColor:[.5,.5,.5],strokeWidth:S,strokeColor:w})))),r&&a&&f.length>=3&&d.push({...m,id:vi,rx:S*(T?5:4),ry:S*(T?5:4),backgroundColor:T?je:[.5,.5,.5],strokeWidth:S,strokeColor:w}),r&&a&&n&&!T&&u.length>=2&&d.push({...p,id:vi,rx:S*(M?5:4),ry:S*(M?5:4),backgroundColor:M?je:[.5,.5,.5],strokeWidth:S,strokeColor:w}),x&&b&&!l&&d.push({id:vi,points:[{x:x.origin.x,y:x.origin.y},{x:x.position.x,y:x.position.y}],strokeColor:w,strokeWidth:S,opacity:y}),Oi(...d)})(_e,r,s&&Ei(r)?Bi({...Ir},!w):void 0),4194304&e.$$.dirty[4]&&(r||zi()),262144&e.$$.dirty[4]&&o(168,S=!!xi),65536&e.$$.dirty[4]&&o(169,k=!!oi),524288&e.$$.dirty[4]|28672&e.$$.dirty[5]&&(!Ir||k||S||Bi({...Ir},!w)),256&e.$$.dirty[2]|1028&e.$$.dirty[3]|8390656&e.$$.dirty[5]&&Zt>0&&i&&At&&((e,t,o,i)=>{const r=At({x:0,y:0}),n=At({x:e,y:e}),a=At({x:t.width,y:t.height}),s=n.x-r.x;if(Wi.set(s>6?1:0),i<=0)return Ki();const l=mo(s,r.x,a.x).map((e=>({id:qi,opacity:i,points:[{x:e,y:r.y},{x:e,y:a.y}],strokeWidth:1,strokeColor:o}))),c=mo(s,r.y,a.y).map((e=>({id:qi,opacity:i,points:[{x:r.x,y:e},{x:a.x,y:e}],strokeWidth:1,strokeColor:o})));Ji(...c,...l)})(Zt,i,Ye,ae),512&e.$$.dirty[2]|4&e.$$.dirty[3]|49152&e.$$.dirty[4]|1024&e.$$.dirty[5]&&At&&(C?er():((e,t,o)=>{if(null===e&&null===t)return er();let i,r;null!==e&&(i={id:Qi,strokeColor:o,strokeWidth:1.5,points:[At({x:e,y:0}),At({x:e,y:Ve.height})]}),null!==t&&(r={id:Qi,strokeColor:o,strokeWidth:1.5,points:[At({x:0,y:t}),At({x:Ve.width,y:t})]}),tr(i,r)})(uo,ho,qe)),4&e.$$.dirty[2]&&(e=>{if(!e)return Io({_prerender:!1});const t=oe.find((e=>e.isEditing));t&&Po(t,{_prerender:"inline"===Ke})})(Be),4194304&e.$$.dirty[5]&&ne&&ne.length&&(()=>{const[e]=ne;8!==e&&46!==e||Fo()&&(r.isEditing||setTimeout((()=>Oo()),0))})(),272&e.$$.dirty[0]&&or&&"inline"===Ke&&or.focus(),4194304&e.$$.dirty[4]&&o(164,T=r&&ki(r)),4194304&e.$$.dirty[4]|512&e.$$.dirty[5]&&o(11,M=T&&!1!==Gi(r)&&Ii(r)),2048&e.$$.dirty[0]&&o(159,P=M?{...r}:void 0),16&e.$$.dirty[2]|16&e.$$.dirty[5]&&o(161,E=P&&pr({...P},Ve)),64&e.$$.dirty[5]&&o(163,I=E&&ni(E.text,E)),320&e.$$.dirty[5]&&(A=E&&nt(E.x,E.y,I.width,I.height)),2048&e.$$.dirty[0]|4194304&e.$$.dirty[4]&&o(23,z=M?r.text:""),2056&e.$$.dirty[0]|16&e.$$.dirty[2]|4194304&e.$$.dirty[4]&&o(162,F=Ne&&r&&M&&pr({...fi(r),width:Ao(r.width)?Math.floor(r.width):void 0,height:Ao(r.height)?Math.floor(r.height):void 0},Ve)),2064&e.$$.dirty[0]|128&e.$$.dirty[5]&&o(25,D=M&&((e,t)=>{const{textAlign:o="left",fontFamily:i="sans-serif",fontWeight:r="normal",fontStyle:n="normal",letterSpacing:a="normal",textShadowX:s=0,textShadowY:l=0,textShadowBlur:c=0,textShadowColor:d,textOutlineWidth:u=0,textOutlineColor:h}=e,p="!important",m=`caret-color:${B};text-align:${o}${p};font-family:${i}${p};font-weight:${r}${p};font-style:${n}${p};letter-spacing:${Ao(a)?a+"px":"normal"}${p}`;if("modal"===t)return m;const g=u?`;-webkit-text-stroke:${2*u}px ${Ho(h)} ${p}`:"",$=c||s||l?`;text-shadow:${s}px ${l}px ${c}px ${Ho(d)} ${p}`:"";let f=e.fontSize,y=1,b="";f>1e3&&qo()&&(y=f/1e3,b=`transform-origin:0 0;transform:scale(${y})`,f=1e3);let x=e.lineHeight/y;const v=Ho(e.color),w=.5*Math.max(0,f-x);return`--font-scalar:${y};--bottom-inset:${w}px;padding:${w}px 0 0${p};color:${v}${p};font-size:${f}px${p};line-height:${x}px${p};${m};${b}${g}${$}`})(F,Ke)),2052&e.$$.dirty[0]|536870912&e.$$.dirty[1]|2&e.$$.dirty[2]|128&e.$$.dirty[5]&&o(24,O=M&&((e,t,o,i)=>{let n,a;e.width&&e.height?(n=at(e),a=Fe(e)):(a=ni(r.text,c),a.width=c.width||a.width,n=ue(e.x+.5*a.width,e.y+.5*a.height));const s=Math.max(0,e.fontSize-e.lineHeight)+e.lineHeight,l=At(n);let d=l.x-t.x-.5*a.width,u=l.y-t.y-.5*a.height,h=e.flipX,p=e.flipY,m=e.rotation;ze&&De?(h=!h,p=!p):ze?(h=!h,m=-m):De&&(p=!p,m=-m),m+=i;const g=o*(h?-1:1),$=o*(p?-1:1);return`--line-height:${s}px;width:${a.width}px;height:${a.height}px;transform:translate(${d}px,${u}px) rotate(${m}rad) scale(${g}, ${$})`})(F,Pe,Oe,Le)),128&e.$$.dirty[2]&&(B=Ho(Ze)),2320&e.$$.dirty[0]&&M&&or&&"inline"===Ke&&ir(z),72351744&e.$$.dirty[4]&&o(150,W=r&&!d?r:W),67108864&e.$$.dirty[4]&&o(152,_=W&&Ui(W)),67108864&e.$$.dirty[4]&&o(147,V=W&&Zi(W)),67108864&e.$$.dirty[4]&&o(149,N=W&&(e=>!0!==e.disableDuplicate&&Yi(e))(W)),67108864&e.$$.dirty[4]&&o(148,H=W&&ji(W)),67108864&e.$$.dirty[4]&&o(151,j=W&&(e=>!0!==e.disableReorder)(W)),67108864&e.$$.dirty[4]&&o(145,U=W&&!1!==Gi(W)),67108864&e.$$.dirty[4]&&o(153,Z=W&&zo(W,"backgroundImage")&&Ni(W,"opacity")),4194304&e.$$.dirty[4]&&o(155,X=r&&"html"===r.format),5242880&e.$$.dirty[4]|1&e.$$.dirty[5]&&o(158,Y=r&&(!d||X)),131072&e.$$.dirty[4]|2097160&e.$$.dirty[5]&&Cr.set(Y&&!li?1:0,{hard:!1===re}),4096&e.$$.dirty[0]|12&e.$$.dirty[5]&&o(157,q=Y&&y.length?(a=ot(y),xe(ue(a.x+.5*a.width,a.y),Hd)):q),512&e.$$.dirty[0]|32&e.$$.dirty[2]|4&e.$$.dirty[5]&&o(156,K=q&&Tr&&He&&(e=>{const t=He.x,o=He.y,i=t+He.width;let r=Math.max(e.x-.5*Tr.width,t),n=Math.max(e.y-Tr.height-16,o);return r+Tr.width>i&&(r=i-Tr.width),ue(r,n)})(q)),131072&e.$$.dirty[0]|2&e.$$.dirty[5]&&o(22,J=K&&`transform: translate(${K.x}px, ${K.y}px);opacity:${ie}`),2048&e.$$.dirty[0]&&o(154,Q=M?"text":"shape"),1088&e.$$.dirty[0]|1610612736&e.$$.dirty[2]|32&e.$$.dirty[3]|2145386496&e.$$.dirty[4]|1048577&e.$$.dirty[5]&&o(21,ee="text"===Q&&Mt&&X?Fp((()=>Mt([["div","text-styles",{class:"PinturaShapeControlsGroup"},[...[["bold",{label:"B",style:"font-weight:900;",title:"Bold",shortcut:["CMD","B"]}],["italic",{label:"I",style:"font-family:Times New Roman;font-style:italic;",title:"Italic",shortcut:["CMD","I"]}],["underline",{label:"U",style:"text-decoration:underline;",title:"Underline",shortcut:["CMD","U"]}],["strikeThrough",{label:"S",style:"text-decoration:line-through;",title:"Strikethrough",shortcut:["CMD","S"]}]].map((([e,t])=>["Button","style-"+e,{onclick:()=>document.execCommand(e),...t,style:"font-size:1.25em;text-underline-offset:1px;text-decoration-thickness:1.5px;font-weight:400;"+t.style}]))]],["div","text-reset",{class:"PinturaShapeControlsGroup"},[["Button","style-reset",{onclick:()=>document.execCommand("removeFormat"),style:"font-weight:400;",label:'T×',title:"Remove styles"}]]]],l))):"shape"===Q&&Tt&&l?Fp((()=>Tt([Z&&["div","alpha",{class:"PinturaShapeControlsGroup"},[["ToggleSlider","adjust-opacity",{onrelease:xr,onchange:br,step:.01,value:zo(r,"opacity")?r.opacity:1,label:(e,t,o)=>Math.round(e/o*100)+"%",min:0,max:1,direction:"x"}]]],["div","beta",{class:"PinturaShapeControlsGroup"},[_&&["Button","flip-horizontal",{onclick:gr,label:Ht.shapeTitleButtonFlipHorizontal,icon:Ht.shapeIconButtonFlipHorizontal,hideLabel:!0}],_&&_t&&["Button","flip-vertical",{onclick:yr,label:Ht.shapeTitleButtonFlipVertical,icon:Ht.shapeIconButtonFlipVertical,hideLabel:!0}],j&&["Button","to-front",{onclick:wr,label:Ht.shapeTitleButtonMoveToFront,icon:Ht.shapeIconButtonMoveToFront,hideLabel:!0,disabled:oe[oe.length-1]===W}],N&&["Button","duplicate",{onclick:Sr,label:Ht.shapeTitleButtonDuplicate,icon:Ht.shapeIconButtonDuplicate,shortcut:["CMD","D"],hideLabel:!0}],H&&["Button","remove",{onclick:vr,label:Ht.shapeTitleButtonRemove,icon:Ht.shapeIconButtonRemove,shortcut:["Backspace"],hideLabel:!0}]].filter(Boolean)],U&&V&&["div","gamma",{class:"PinturaShapeControlsGroup"},[["Button","text-layout",{onclick:mr,label:uu(Rr,Ht,r),icon:uu(Mr,Ht,r),hideLabel:!0}]]],U&&["div","delta",{class:"PinturaShapeControlsGroup"},[["Button","edit-text",{label:Ht.shapeLabelInputText,onclick:hr}]]]].filter(Boolean),l))):[]),64&e.$$.dirty[0]|1048576&e.$$.dirty[5]&&o(20,te=oe.filter(Hi).filter((e=>e.id)).filter((e=>!Fi(e))).map((e=>({id:e.id,color:ki(e)?e.color:Pi(e)?e.strokeColor:e.backgroundColor,name:e.name||Ht["shapeLabelTool"+Ya(nr(e))]}))))},[Se,Ce,Pe,Ne,Ke,Nt,Ht,Vo,or,Tr,l,M,y,c,p,$,m,ie,Pr,Lr,te,ee,J,z,O,D,v,b,g,qt,ao,e=>{const{origin:t}=e.detail;o(140,oi=void 0),ii=void 0,ri=void 0,ai=!1,ti=void 0,si=!1,co(),clearTimeout(ei),ei=setTimeout((()=>o(141,li=!0)),250);const i=So();if(!i||Ei(i)&&zo(i,"pathClose")||Co(),Qo=It(pe(t)),i&&Ei(i)&&zo(i,"pathClose"))return Je(e);const n=Ko(oe,Qo,Wt,(e=>Hi(e))),a=n.length&&n.shift();if(r&&Ii(r)&&(sr(),Vt&&(si=!0)),!a&&r&&Ii(r)&&jo(r),!Rt(t))return;if(a&&Li(a))return ai=!0,o(140,oi=a),ii=fi(oi),void(ri=pr(fi(oi),Ve));ti=a||void 0;!Je(e)&&a&&(Vo(a),o(140,oi=a),ii=fi(oi),ri=pr(fi(oi),Ve))},e=>{ci(),st(e)},e=>{const{translation:t,ctrlKey:o,metaKey:r,shiftKey:n,position:a}=e.detail;if(oi){if(!Yi(oi))return;if(Ii(oi))return;if(n){let e=Math.abs(t.x),o=Math.abs(t.y);"x"===di&&(o-=64),"y"===di&&(e-=64),e>o?(t.y=0,di="x"):o>e&&(t.x=0,di="y")}else di=null;return bo(oi,ri,t,{...Yt(o||r?0:jt,Zt,i,oi)})}Qe(e)},e=>{ci(),oi?Ii(oi)?lr():e.detail.isTap&&ai&&ki(oi)&&!1!==Gi(oi)&&Uo(oi):et(e)},e=>{const t=ti&&e.detail.isTap;if(e.detail.isTap&&setTimeout((()=>{ft({target:oi||ti,position:Qo},0)})),oi)return pt(oi),i=oi,r=ii,JSON.stringify(i)!==JSON.stringify(r)&&ct(oi),void o(140,oi=void 0);var i,r;const n=_o(),a=!n||St(n,ti||void 0);a&&Wo({storePrevious:!1}),rt(e),a&&t&&Vo(ti)},Wi,e=>{o(141,li=!0),o(140,oi=r),ri=c},e=>{if(!oi)return void o(141,li=!1);const{translation:t,indexes:r,shiftKey:n,ctrlKey:s,metaKey:l}=e.detail;((e,t,o,i,r)=>{const{snapThreshold:n=0,gridSize:s=0,gridRect:l,snapTargets:c=[]}=r||{},d=n?(e,t,o)=>{const{snapTranslation:i,snapLines:r}=fo(go(e),c,n,s,l);yo(t,i),lo(r);const a=po(o(),t);e.x=a.x,e.y=a.y}:a;if(Pi(e)||Ei(e)&&zo(e,"pathClose")){const[r]=o,n=ne.includes(16)?no:(e,t)=>t;let a,s,l;if(Pi(e))0===r?(a=()=>wi(t),s=e=>n(Si(t),e),l=(e,t)=>{e.x1=t.x,e.y1=t.y}):1===r&&(a=()=>Si(t),s=e=>n(wi(t),e),l=(e,t)=>{e.x2=t.x,e.y2=t.y});else{const e=t.points;a=()=>({...e[r]}),s=t=>{const o=e[cy(r-1,e)],i=e[cy(r+1,e)];n(o,t),n(i,t)},l=(e,t)=>e.points[r]=t}const c=po(a(),i);d(c,i,a),s(c),l(e,c)}else if(Di(e)||Ri(e)||Ti(e)){let n,a,s=!1;if(Ri(e))n=it(t);else if(Di(e))n=tt(t);else{s=!0,n=tt(t);const e=ni(t.text,t);n.height=e.height}e.aspectRatio?a=e.aspectRatio:r.shiftKey&&!s&&(a=n.width/n.height);const l=tt(n),c=at(l),u=e.rotation,h=wt(l),p=$t(l,u);if(1===o.length){let t=o[0];e.flipX&&(t=xo[t]),e.flipY&&(t=vo[t]);const[r,n,s,l]=h,m=At(p[t]),g=ve({...m},i),$=It(g);d($,i,(()=>It(m)));const f=ue($.x-p[t].x,$.y-p[t].y),y=ge(pe(f),-u),b=ue(h[t].x+y.x,h[t].y+y.y);let x;0===t&&(x=s),1===t&&(x=l),2===t&&(x=r),3===t&&(x=n);const v=ot([x,b]);if(a){const{width:e,height:t}=xt(v,a),[o,i,r,n]=vt(v);v.width=e,v.height=t,b.y(e.flipX&&(t=xo[t]),e.flipY&&(t=vo[t]),t)));const[t,r]=o.map((e=>p[e])),n={x:t.x+.5*(r.x-t.x),y:t.y+.5*(r.y-t.y)},[l,m]=o.map((e=>h[e])),[g,$]=o.map((e=>{const t=e+2;return t<4?h[t]:h[t-4]})),f={x:g.x+.5*($.x-g.x),y:g.y+.5*($.y-g.y)},y=At(n),b=ve({...y},i),x=It(b);d(x,i,(()=>It(y)));const v=ue(x.x-n.x,x.y-n.y),w=ge(pe(v),-u),S=we(pe(l),m),k=xe(S,(e=>1-Math.abs(Math.sign(e)))),C=ue(w.x*k.x,w.y*k.y);ve(l,C),ve(m,C);const T=ot(h);if(a){let e=T.width,t=T.height;0===k.y?t=e/a:e=t*a,T.width=e,T.height=t,0===k.y?T.y=f.y-.5*t:T.x=f.x-.5*e}const M=$t(T,u,c),R=Ee(M),P=ge(M[0],-u,R),E=ge(M[2],-u,R),I=ot([P,E]);let A;Ri(e)?A=ce(I):Di(e)?A=I:s&&(A={x:I.x,y:I.y,width:I.width}),ro(e,A,Ve)}}Mo()})(oi,ri,r,t,{shiftKey:n,...Yt(s||l?0:jt,Zt,i,oi)})},e=>{if(!oi)return void o(141,li=!1);Vo(oi);const{isTap:t}=e.detail;t&&pt(oi),o(140,oi=void 0),o(141,li=!1),ct(r)},e=>{wo=hi(c).origin,o(141,li=!0),o(140,oi=r),ri=c},e=>{if(!oi)return void o(141,li=!1);const{translation:t,shiftKey:i}=e.detail;((e,t,o,i)=>{const r=Yo(pr(fi(e),Ve)),n=at(r),a=po(wo,o);let s=ye(a,n)+Math.PI/2;if(i.shiftKey){const e=Math.PI/16;s=e*Math.round(s/e)-Le%e}ro(e,{rotation:s},Ve),Mo()})(oi,0,t,{shiftKey:i})},()=>{oi?(Vo(oi),o(140,oi=void 0),o(141,li=!1),ct(r)):o(141,li=!1)},e=>{const{key:t}=e,o=/escape/i.test(t);if(Fo())return o?(e.preventDefault(),e.stopPropagation(),jo(r)):void(N&&"d"===t&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.stopPropagation(),kr()))},e=>{const t=Gi(r,e);return!0===t?e:t},ar,e=>{const{target:t,key:o}=e,i=t.value||t.innerText,n=t.selectionStart||0,a=t.selectionEnd||i.length,s=i.substring(0,n)+o+i.substring(a);if(Gi(r,s)!==s)return e.preventDefault()},e=>Ci(r)&&/enter/i.test(e.code)&&!1!==r.disableNewline?e.preventDefault():/arrow/i.test(e.code)?e.stopPropagation():/escape/i.test(e.key)?lr():void 0,e=>{const{key:t,ctrlKey:o,altKey:i}=e;if(/enter/i.test(t)&&(o||i))return sr()},sr,lr,Cr,e=>{const t=Lo();t&&(Ii(t)||Yi(t)&&(o(140,oi=t),ri=pr(fi(oi),Ve),bo(oi,ri,e.detail)))},e=>{o(18,Pr=!0)},({relatedTarget:e})=>{e&&e.classList.contains("shape-selector__button")||o(18,Pr=!1)},e=>{if("touch"===e.pointerType||"PinturaShapeEditor"!==e.target.className)return void yt();(li||ei)&&Ar(void 0);const t=fy(e,Ne);o(143,Ir=pe(t));const i=xe(It(t),(e=>Math.round(e)));if(be(i,Er))return;if(Er=pe(i),gt(li,t,i),li||ei)return;if(d)return;const[r]=Ko(oe,i,0,Hi);r&&Fi(r)||Ar(r)},e=>{"touch"!==e.pointerType&&yt()},me,$e,Te,Le,ze,De,Oe,Be,_e,Ve,He,je,Ze,Ye,qe,Je,Qe,et,rt,st,lt,ct,dt,ut,ht,pt,mt,gt,ft,yt,bt,St,kt,Ct,Tt,Mt,Rt,It,At,Bt,Wt,_t,Vt,jt,Ut,Gt,Zt,Kt,Jt,Qt,eo,to,oo,io,(e,t={})=>{let o,r,n,a=Ri(e),s=ki(e),l="relative"===t.position;const c=Xt(),d=e=>{if(!jt)return e;const t=It(e),{snapTranslation:o,snapLines:r}=fo(go(t),c,jt,Zt,i);return yo(e,o),lo(r),e},u=!!_o(),h=t.isSelection?Te:Ce,p="step"===t.inputMode;if(Ei(e)){if(p){let t=!1;const i=(e,o)=>{const i=Jt(h),r=e&&ue(Ty(e.x,Ve.width),Ty(e.y,Ve.height)),n=r&&At(r);ne.includes(16)&&n&&no(n,o);const a=It(o),s=i.points.length?i.points[0]:a,c=ue(Ty(s.x,Ve.width),Ty(s.y,Ve.height)),d=At(c),u=Me(d,o);if(!t&&1===i.points.length&&u<36)return eo(h);if(i.points.length>2&&u<=Oy){i.pathClose=!0,Hi(i)&&Vo(i);const e=to(h);return void lt(e)}const p=i.strokeWidth&&i.strokeColor&&(void 0===i.strokeColor[3]||i.strokeColor[3]>0),m=Me(n,o);if(p&&i.points.length>1&&m0&&m<100))return l?My(a,Ve):a};return{start:e=>{const a=Jt(h),{origin:s}=e.detail;if(r=4,o=d(pe(s)),n=pe(o),a){const e=a.points[a.points.length-1],t=i(e,o);return t&&(a.points=[...a.points,t]),void oo({points:a.points},h)}t=!0},update:e=>{if(!t)return;const r=Jt(h);if(!r)return;const n=r.points[0],a=i(n,ue(o.x+e.detail.translation.x,o.y+e.detail.translation.y));a&&(r.points[1]=a,oo({points:r.points},h))},release:e=>e.detail.preventInertia(),end:i=>{if(!t)return;const r=It(o),n=l?My(r,Ve):r,{isTap:a}=i.detail;if(a){if(Ko(oe,r,0,Hi).length)return eo(h)}Qt({...e,points:[n]},h)}}}return{start:t=>{const{origin:i}=t.detail;r=4,o=pe(i),n=pe(o);const a=It(o),s=l?My(a,Ve):a;Qt({...e,points:[s]},h)},update:e=>{const t=Jt(h),{translation:i}=e.detail,a=ue(o.x+i.x,o.y+i.y),s=Re(n,a);if(se(s,5)<=r)return;const c=ye(a,n),d=r-s;n.x+=d*Math.cos(c),n.y+=d*Math.sin(c);const u=It(n),p=l?My(u,Ve):u;oo({points:t.points.concat(p)},h)},release:e=>e.detail.preventInertia(),cancel:()=>{eo(h)},end:e=>{const t=Jt(h);if(e.detail.isTap){let e=!1;if(t.bitmap?(ti&&(e=!0),u&&(e=!0)):e=!0,e)return eo(h)}const o=to(h);lt(o)}}}return a||s||Mi(e)?{start:t=>{const{origin:i}=t.detail;o=d(pe(i));const r=It(o),n=l?My(r,Ve):r,s=-1*so(Le,ze,De),c={...e,rotation:s,...n};c.flipX=ze,c.flipY=De,delete c.position,c.opacity=0;(a?["rx","ry"]:["width","height"]).forEach((e=>{c[e]=l?"0%":0})),Qt(c,h)},update:e=>{const t=Jt(h);t.opacity=1;let{aspectRatio:i}=t,{translation:r,shiftKey:n,ctrlKey:s}=e.detail;!i&&n&&(i=1);const l=d(ue(o.x+r.x,o.y+r.y)),c=It(o),u=It(l);if(i){const e=ot([c,u]),t=xt(e,i);u.x=c.x+t.width,u.y=c.y+t.height}const p={x:c.x+.5*(u.x-c.x),y:c.y+.5*(u.y-c.y)},m=so(Le,ze,De);ge(c,m,p),ge(u,m,p);const g=Math.min(c.x,u.x),$=Math.min(c.y,u.y);let f=Math.max(c.x,u.x)-g,y=Math.max(c.y,u.y)-$,b={};a?(s?(b.x=c.x,b.y=c.y):(b.x=g+.5*f,b.y=$+.5*y),b.rx=.5*f,b.ry=.5*y):(s?(b.x=c.x-.5*f,b.y=c.y-.5*y):(b.x=g,b.y=$),b.width=f,b.height=y),oo(b,h,((e,t)=>ro(e,t,Ve)))},release:e=>{e.detail.preventInertia()},cancel:e=>{eo(h)},end:e=>{const t=Jt(h);if(e.detail.isTap){if(ki(t)&&Vt&&si)return eo(h);if(!ki(t)||!Vt||ti)return eo(h);delete t.width,delete t.height,!1!==t.disableNewline&&delete t.textAlign;const e=pr({...t},Ve),i=ni(t.text,e),r=It({x:o.x,y:o.y-.5*i.height}),n=It({x:o.x+i.width,y:o.y+.5*i.height}),a={x:r.x+.5*(n.x-r.x),y:r.y+.5*(n.y-r.y)},s=so(Le,ze,De);ge(r,s,a),ge(n,s,a);let l=Math.min(r.x,n.x),c=Math.min(r.y,n.y);l<0&&(l=0),c<0&&(c=0),l+i.width>Ve.width&&(l=Ve.width-i.width),c+i.height>Ve.height&&(c=Ve.height-i.height),t.x=R(t.x)?No(l,Ve.width):l,t.y=R(t.y)?No(c,Ve.height):c}if(t.opacity=1,!ki(t)){const e=to(h);lt(e)}Hi(t)&&Vo(t),ki(t)&&Uo(t)}}:Pi(e)?{start:t=>{const{origin:i}=t.detail,r=It(d(i)),n=xe(r,Hd);o=pe(i),Qt({...e,x1:l?No(n.x,Ve.width):n.x,y1:l?No(n.y,Ve.height):n.y,x2:l?No(n.x,Ve.width):n.x,y2:l?No(n.y,Ve.height):n.y,opacity:0},h)},update:e=>{const{translation:t}=e.detail,i=d(ve(pe(o),t));if(ne.includes(16)){const e=Re(o,i),t=ye(o,i),r=Math.PI/4,n=r*Math.round(t/r);i.x=o.x+e*Math.cos(n),i.y=o.y+e*Math.sin(n)}const r=It(i);oo({x2:l?No(r.x,Ve.width):r.x,y2:l?No(r.y,Ve.height):r.y,opacity:1},h)},release:e=>e.detail.preventInertia(),cancel:e=>{eo(h)},end:e=>{const t=Jt(h);if(e.detail.isTap)return eo(h);t.opacity=1;const o=to(h);lt(o),Hi(t)&&Vo(o)}}:void 0},()=>{let e,t;const o=Bt*Bt,i=(e,t,i=!1)=>{const r=Me(e,t);if(!i&&r<2)return!1;const n=oe.filter((e=>!e.disableErase));let a;a=r{e=ue(Math.round(o.detail.origin.x),Math.round(o.detail.origin.y)),i(e,e,!0),t=e},update:o=>{const{translation:r}=o.detail,n=ue(Math.round(e.x+r.x),Math.round(e.y+r.y));i(t,n)&&(t=pe(n))},release:e=>e.detail.preventInertia(),end:()=>{}}},So,ko,e=>{if(!So())return _i(e),io(e)},Co,To,(e={})=>({id:L(),...e}),Mo,Ro,Po,Eo,(e,t,o=!0)=>{oe.forEach((o=>Eo(o,e,t,!1))),o&&Mo()},Io,Lo,Fo,Do,Oo,Wo,jo,Uo,Go,Zo,Xo,Yo,Ko,Jo,uo,ho,oi,li,xi,Ir,d,U,r,V,H,N,W,j,_,Z,Q,X,K,q,Y,P,s,E,F,I,T,C,i,w,S,k,f,x,u,n,h,oe,re,ne,ae,function(t){Qn.call(this,e,t)},e=>Vo(Ce[e]),function(e){ta[e?"unshift":"push"]((()=>{or=e,o(8,or)}))},function(){z=this.value,o(23,z),o(11,M),o(146,r),o(164,T),o(0,Se),o(175,oe)},function(e){ta[e?"unshift":"push"]((()=>{or=e,o(8,or)}))},()=>{Lr&&Lr.focus()},e=>o(9,Tr=e.detail),function(e){ta[e?"unshift":"push"]((()=>{Lr=e,o(19,Lr)}))},e=>fy(e,Ne)]}class Vy extends Fa{constructor(e){super(),za(this,e,_y,Dy,Qr,{uid:57,ui:58,disabled:0,shapes:1,selection:59,offset:2,contextRotation:60,contextFlipX:61,contextFlipY:62,contextZoom:63,active:64,opacity:65,parentRect:66,rootRect:3,utilRect:67,hoverColor:68,caretColor:69,gridColor:70,snapColor:71,textInputMode:4,oninteractionstart:72,oninteractionupdate:73,oninteractionrelease:74,oninteractionend:75,oninteractioncancel:76,onaddshape:77,onupdateshape:78,onselectshape:79,onblurshape:80,onremoveshape:81,ontapshape:82,onhovershape:83,onhovercanvas:84,ontapcanvas:85,onleavecanvas:86,beforeSelectShape:87,beforeDeselectShape:88,beforeRemoveShape:89,beforeUpdateShape:90,willRenderShapeControls:91,willRenderShapeTextControls:92,willStartInteraction:93,mapEditorPointToImagePoint:94,mapImagePointToEditorPoint:95,eraseRadius:96,selectRadius:97,enableButtonFlipVertical:98,enableTapToAddText:99,enableTextStyleControls:5,locale:6,snapThreshold:100,snapPointer:101,enableSnapToContext:102,gridSize:103,syncShapeCollection:104,getShapeDraft:105,addShapeDraft:106,discardShapeDraft:107,confirmShapeDraft:108,updateShapeDraft:109,addShape:110,createShape:111,eraseShape:112,getMarkupItemDraft:113,getMarkupItemDraftIndex:114,addMarkupItemDraft:115,confirmMarkupItemDraft:116,discardMarkupItemDraft:117,createMarkupItem:118,syncShapes:119,removeMarkupShapeProps:120,updateMarkupShape:121,updateMarkupShapeProperty:122,updateMarkupItemsShapeProperty:123,updateMarkupShapeItems:124,getActiveMarkupItem:125,hasActiveMarkupItem:126,removeShape:127,removeActiveMarkupItem:128,blurShapes:129,selectShape:7,deselectMarkupItem:130,editMarkupItem:131,finishEditMarkupItem:132,removeMarkupItems:133,getTextShapeRect:134,getMarkupShapeRect:135,getShapesNearPosition:136,getShapesBetweenPoints:137},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}get syncShapeCollection(){return this.$$.ctx[104]}get getShapeDraft(){return this.$$.ctx[105]}get addShapeDraft(){return this.$$.ctx[106]}get discardShapeDraft(){return this.$$.ctx[107]}get confirmShapeDraft(){return this.$$.ctx[108]}get updateShapeDraft(){return this.$$.ctx[109]}get addShape(){return this.$$.ctx[110]}get createShape(){return this.$$.ctx[111]}get eraseShape(){return this.$$.ctx[112]}get getMarkupItemDraft(){return this.$$.ctx[113]}get getMarkupItemDraftIndex(){return this.$$.ctx[114]}get addMarkupItemDraft(){return this.$$.ctx[115]}get confirmMarkupItemDraft(){return this.$$.ctx[116]}get discardMarkupItemDraft(){return this.$$.ctx[117]}get createMarkupItem(){return this.$$.ctx[118]}get syncShapes(){return this.$$.ctx[119]}get removeMarkupShapeProps(){return this.$$.ctx[120]}get updateMarkupShape(){return this.$$.ctx[121]}get updateMarkupShapeProperty(){return this.$$.ctx[122]}get updateMarkupItemsShapeProperty(){return this.$$.ctx[123]}get updateMarkupShapeItems(){return this.$$.ctx[124]}get getActiveMarkupItem(){return this.$$.ctx[125]}get hasActiveMarkupItem(){return this.$$.ctx[126]}get removeShape(){return this.$$.ctx[127]}get removeActiveMarkupItem(){return this.$$.ctx[128]}get blurShapes(){return this.$$.ctx[129]}get selectShape(){return this.$$.ctx[7]}get deselectMarkupItem(){return this.$$.ctx[130]}get editMarkupItem(){return this.$$.ctx[131]}get finishEditMarkupItem(){return this.$$.ctx[132]}get removeMarkupItems(){return this.$$.ctx[133]}get getTextShapeRect(){return this.$$.ctx[134]}get getMarkupShapeRect(){return this.$$.ctx[135]}get getShapesNearPosition(){return this.$$.ctx[136]}get getShapesBetweenPoints(){return this.$$.ctx[137]}}function Ny(e){let t,o,i;return o=new up({props:{items:e[2]}}),{c(){t=kn("ul"),Ia(o.$$.fragment),An(t,"class","PinturaShapeStyleList")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};4&t&&(i.items=e[2]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Hy(e){let t,o;return t=new vd({props:{class:"PinturaShapeStyles",elasticity:e[0],$$slots:{default:[jy]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1&o&&(i.elasticity=e[0]),131076&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function jy(e){let t,o,i;return o=new up({props:{items:e[2]}}),{c(){t=kn("ul"),Ia(o.$$.fragment),An(t,"class","PinturaShapeStyleList")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};4&t&&(i.items=e[2]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Uy(e){let t,o,i,r;const n=[Hy,Ny],a=[];function s(e,t){return e[1]?0:1}return o=s(e),i=a[o]=n[o](e),{c(){t=kn("div"),i.c(),An(t,"style",e[3])},m(e,i){wn(e,t,i),a[o].m(t,null),r=!0},p(e,[l]){let c=o;o=s(e),o===c?a[o].p(e,l):(ya(),va(a[c],1,1,(()=>{a[c]=null})),ba(),i=a[o],i?i.p(e,l):(i=a[o]=n[o](e),i.c()),xa(i,1),i.m(t,null)),(!r||8&l)&&An(t,"style",e[3])},i(e){r||(xa(i),r=!0)},o(e){va(i),r=!1},d(e){e&&Sn(t),a[o].d()}}}function Gy(e,t,o){let i,r,n,a,s,l,{isActive:c=!1}=t,{controls:d=[]}=t,{locale:u}=t,{scrollElasticity:h}=t,{scrollEnable:p=!0}=t,{hideTitles:m=!1}=t,{willRenderControls:g=G}=t;const $=Jn("redrawTrigger");on(e,$,(e=>o(14,a=e)));const f=Jn("env");on(e,f,(e=>o(13,n=e)));const y=Jn("isAnimated");on(e,y,(e=>o(16,l=e)));const b=ec(0,{stiffness:.25,damping:.9});return on(e,b,(e=>o(15,s=e))),e.$$set=e=>{"isActive"in e&&o(8,c=e.isActive),"controls"in e&&o(9,d=e.controls),"locale"in e&&o(10,u=e.locale),"scrollElasticity"in e&&o(0,h=e.scrollElasticity),"scrollEnable"in e&&o(1,p=e.scrollEnable),"hideTitles"in e&&o(11,m=e.hideTitles),"willRenderControls"in e&&o(12,g=e.willRenderControls)},e.$$.update=()=>{65792&e.$$.dirty&&b.set(c?1:0,{hard:!1===l}),33024&e.$$.dirty&&o(3,i=`opacity:${s};${c?"":"pointer-events:none;"}${s<=0?"visibility:hidden":""}`),32256&e.$$.dirty&&o(2,r=a&&g(d.map((e=>["ShapeStyle",e.id,{title:e.componentProps.title,locale:u,hideTitle:m,items:[[e.component,e.id,e.componentProps]]}])),n,(()=>$.set({}))))},[h,p,r,i,$,f,y,b,c,d,u,m,g,n,a,s,l]}class Zy extends Fa{constructor(e){super(),za(this,e,Gy,Uy,Qr,{isActive:8,controls:9,locale:10,scrollElasticity:0,scrollEnable:1,hideTitles:11,willRenderControls:12})}}function Xy(e,t,o){const i=e.slice();return i[15]=t[o].key,i[6]=t[o].controls,i[16]=t[o].isActive,i}function Yy(e,t){let o,i,r;return i=new Zy({props:{isActive:t[16],controls:t[6],locale:t[1],scrollElasticity:t[2],scrollEnable:t[3],hideTitles:t[4],willRenderControls:t[5]}}),{key:e,first:null,c(){o=Rn(),Ia(i.$$.fragment),this.first=o},m(e,t){wn(e,o,t),Aa(i,e,t),r=!0},p(e,o){t=e;const r={};128&o&&(r.isActive=t[16]),128&o&&(r.controls=t[6]),2&o&&(r.locale=t[1]),4&o&&(r.scrollElasticity=t[2]),8&o&&(r.scrollEnable=t[3]),16&o&&(r.hideTitles=t[4]),32&o&&(r.willRenderControls=t[5]),i.$set(r)},i(e){r||(xa(i.$$.fragment,e),r=!0)},o(e){va(i.$$.fragment,e),r=!1},d(e){e&&Sn(o),La(i,e)}}}function qy(e){let t,o,i,r=[],n=new Map,a=e[7];const s=e=>e[15];for(let t=0;t{"class"in e&&o(0,a=e.class),"controls"in e&&o(6,s=e.controls),"shape"in e&&o(8,l=e.shape),"onchange"in e&&o(9,c=e.onchange),"locale"in e&&o(1,d=e.locale),"scrollElasticity"in e&&o(2,u=e.scrollElasticity),"scrollEnable"in e&&o(3,h=e.scrollEnable),"hideTitles"in e&&o(4,p=e.hideTitles),"willRenderControls"in e&&o(5,m=e.willRenderControls)},e.$$.update=()=>{64&e.$$.dirty&&o(11,i=Object.keys(s).filter((e=>s[e]))),2304&e.$$.dirty&&o(10,r=l&&Object.keys(l).length&&i&&Ni(l)?(e=>i.filter((t=>t.split("_").every((t=>zo(e,t)&&Ni(e,t))))).map((t=>{const o=(e.settings&&e.settings[t]||{}).control||t,i=t.split("_"),r=i.length>1?i.map((t=>e[t])):e[t];if(P(s[o])){const{title:i,component:n}=s[o](r,(e=>{c({[t]:e})}),{selectedShapeId:e.id});return{id:o,component:up,componentProps:{title:i,items:n}}}let[n,a]=s[o];if(R(n)&&s[n]){const e={...a};[n,a]=s[n],a={...a,...e}}const l=P(a.options)?a.options(e):a.options;return{id:o,component:n,componentProps:{...a,options:l,locale:d,value:r,optionLabelClass:"PinturaButtonLabel",onchange:o=>{const r=C(o)&&!Fo(o)?o.value:o;a.onchange&&a.onchange(r,e);const n=i.length>1?i.reduce(((e,t,o)=>({...e,[t]:Array.isArray(r)?r[o]:r})),{}):{[t]:r};c(n)}}}})).filter(Boolean))(l):[]),1280&e.$$.dirty&&o(7,n=((e,t)=>{let o=g.find((t=>t.key===e));return o||(o={key:e,controls:t},g.push(o)),g.forEach((e=>e.isActive=!1)),o.controls=t,o.isActive=!0,g})(l&&Object.keys(l).length?Object.keys(l).join("_"):"none",r||[]))},[a,d,u,h,p,m,s,n,l,c,r,i]}class Jy extends Fa{constructor(e){super(),za(this,e,Ky,qy,Qr,{class:0,controls:6,shape:8,onchange:9,locale:1,scrollElasticity:2,scrollEnable:3,hideTitles:4,willRenderControls:5})}}var Qy=e=>/{a[l]=null})),ba(),o=a[t],o?o.p(e,r):(o=a[t]=n[t](e),o.c()),xa(o,1),o.m(i.parentNode,i))},i(e){r||(xa(o),r=!0)},o(e){va(o),r=!1},d(e){a[t].d(e),e&&Sn(i)}}}function ob(e){let t,o,i,r,n=e[10]&&rb(e);return i=new vd({props:{scrollAutoCancel:e[9],elasticity:e[0],$$slots:{default:[nb]},$$scope:{ctx:e}}}),{c(){t=kn("div"),n&&n.c(),o=Mn(),Ia(i.$$.fragment),An(t,"class","PinturaShapePresetsFlat")},m(e,a){wn(e,t,a),n&&n.m(t,null),bn(t,o),Aa(i,t,null),r=!0},p(e,r){e[10]?n?(n.p(e,r),1024&r&&xa(n,1)):(n=rb(e),n.c(),xa(n,1),n.m(t,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba());const a={};512&r&&(a.scrollAutoCancel=e[9]),1&r&&(a.elasticity=e[0]),536871070&r&&(a.$$scope={dirty:r,ctx:e}),i.$set(a)},i(e){r||(xa(n),xa(i.$$.fragment,e),r=!0)},o(e){va(n),va(i.$$.fragment,e),r=!1},d(e){e&&Sn(t),n&&n.d(),La(i)}}}function ib(e){let t,o,i,r,n;o=new vd({props:{elasticity:e[0],class:"PinturaShapePresetsGroups",$$slots:{default:[ub]},$$scope:{ctx:e}}});const a=[{class:"PinturaControlPanels"},{panelClass:"PinturaControlPanel"},{panels:e[11]},e[12]];let s={$$slots:{default:[pb,({panel:e,panelIsActive:t})=>({26:e,27:t}),({panel:e,panelIsActive:t})=>(e?67108864:0)|(t?134217728:0)]},$$scope:{ctx:e}};for(let e=0;e{r=null})),ba()),e[28].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=cb(e),n.c(),n.m(o.parentNode,o))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function ub(e){let t,o,i,r=e[10]&&ab(e);const n=[{class:"PinturaControlList"},{tabs:e[5]},e[12],{layout:"compact"}];let a={$$slots:{default:[db,({tab:e})=>({28:e}),({tab:e})=>e?268435456:0]},$$scope:{ctx:e}};for(let e=0;e{r=null})),ba());const a=4128&i?Ra(n,[n[0],32&i&&{tabs:e[5]},4096&i&&Pa(e[12]),n[3]]):{};805306368&i&&(a.$$scope={dirty:i,ctx:e}),o.$set(a)},i(e){i||(xa(r),xa(o.$$.fragment,e),i=!0)},o(e){va(r),va(o.$$.fragment,e),i=!1},d(e){r&&r.d(e),e&&Sn(t),La(o,e)}}}function hb(e){let t,o;return t=new _d({props:{items:e[13][e[26]].items,disabled:e[13][e[26]].disabled,onclickitem:e[1],ongrabitem:e[2],ondragitem:e[3],ondropitem:e[4]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};67117056&o&&(i.items=e[13][e[26]].items),67117056&o&&(i.disabled=e[13][e[26]].disabled),2&o&&(i.onclickitem=e[1]),4&o&&(i.ongrabitem=e[2]),8&o&&(i.ondragitem=e[3]),16&o&&(i.ondropitem=e[4]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function pb(e){let t,o;return t=new vd({props:{scroll:e[27]?{scrollOffset:0,animate:!1}:void 0,scrollAutoCancel:e[9],elasticity:e[0],$$slots:{default:[hb]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};134217728&o&&(i.scroll=e[27]?{scrollOffset:0,animate:!1}:void 0),512&o&&(i.scrollAutoCancel=e[9]),1&o&&(i.elasticity=e[0]),603987998&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function mb(e){let t,o,i,r;const n=[tb,eb],a=[];function s(e,t){return e[9]?0:e[10]?1:-1}return~(o=s(e))&&(i=a[o]=n[o](e)),{c(){t=kn("div"),i&&i.c(),An(t,"class","PinturaShapePresetsPalette")},m(e,i){wn(e,t,i),~o&&a[o].m(t,null),r=!0},p(e,[r]){let l=o;o=s(e),o===l?~o&&a[o].p(e,r):(i&&(ya(),va(a[l],1,1,(()=>{a[l]=null})),ba()),~o?(i=a[o],i?i.p(e,r):(i=a[o]=n[o](e),i.c()),xa(i,1),i.m(t,null)):i=null)},i(e){r||(xa(i),r=!0)},o(e){va(i),r=!1},d(e){e&&Sn(t),~o&&a[o].d()}}}function gb(e,t,o){let i,r,n,s,l,c,d,u,h,{locale:p}=t,{presets:m}=t,{scrollElasticity:g}=t,{enableSelectImage:$=!0}=t,{willRenderPresetToolbar:f=G}=t,{onaddpreset:y=a}=t,{ongrabpreset:b}=t,{ondragpreset:x}=t,{ondroppreset:v}=t;const w="presets-"+L(),S=(e,t="")=>Qy(e)?e:Lo(e)?_o(e,t):`${t}`,k=e=>V(Nt(e)),C=["src","alt","thumb","shape","id","mount","disabled"],T=e=>e.map((e=>(e=>Fo(e)&&R(e[0])&&Fo(e[1]))(e)?{...e[2],id:`${w}-${e[0].toLowerCase()}`,label:e[0],items:T(e[1])}:(e=>{let t,o,i,r,n,a,s,l=e;return R(e)?Lo(e)?(t=e,n=e,r=S(t,n)):(t=e,n=k(t),r=S(t,n)):(t=e.src,n=e.alt||(R(t)?k(t):R(e.thumb)?k(e.thumb):void 0),r=S(e.thumb||t,n),o=e.shape,a=e.mount,s=e.disabled,i=Object.keys(e).reduce(((t,o)=>(C.includes(o)||(t[o]=e[o]),t)),{})),{id:l,src:t,thumb:r,shape:o,shapeProps:i,alt:n,title:n,mount:a,disabled:s}})(e)));return e.$$set=e=>{"locale"in e&&o(14,p=e.locale),"presets"in e&&o(15,m=e.presets),"scrollElasticity"in e&&o(0,g=e.scrollElasticity),"enableSelectImage"in e&&o(16,$=e.enableSelectImage),"willRenderPresetToolbar"in e&&o(17,f=e.willRenderPresetToolbar),"onaddpreset"in e&&o(1,y=e.onaddpreset),"ongrabpreset"in e&&o(2,b=e.ongrabpreset),"ondragpreset"in e&&o(3,x=e.ondragpreset),"ondroppreset"in e&&o(4,v=e.ondroppreset)},e.$$.update=()=>{32768&e.$$.dirty&&o(7,i=T(m)),128&e.$$.dirty&&o(9,r=i.length),640&e.$$.dirty&&o(8,n=r&&i.some((e=>!!e.items))),384&e.$$.dirty&&o(5,s=n&&i),384&e.$$.dirty&&o(13,l=n&&i.reduce(((e,t)=>(e[t.id]=t,e)),{})),96&e.$$.dirty&&o(6,c=c||s&&(s.find((e=>!e.disabled))||{}).id),64&e.$$.dirty&&o(12,d={name:w,selected:c}),32&e.$$.dirty&&o(11,u=s&&s.map((e=>e.id))),212994&e.$$.dirty&&o(10,h=p&&f([$&&["Button","browse",{label:p.shapeLabelButtonSelectSticker,icon:p.shapeIconButtonSelectSticker,onclick:()=>{zp().then((e=>{e&&y(e)}))}}]]))},[g,y,b,x,v,s,c,i,n,r,h,u,d,l,p,m,$,f,({detail:e})=>o(6,c=e)]}class $b extends Fa{constructor(e){super(),za(this,e,gb,mb,Qr,{locale:14,presets:15,scrollElasticity:0,enableSelectImage:16,willRenderPresetToolbar:17,onaddpreset:1,ongrabpreset:2,ondragpreset:3,ondroppreset:4})}}function fb(e){let t,o,i,r;return t=new up({props:{items:e[29]}}),i=new Jy({props:{locale:e[4],shape:e[31]||e[49],onchange:e[86],controls:e[9],scrollEnable:!1,hideTitles:!0,willRenderControls:e[163]}}),{c(){Ia(t.$$.fragment),o=Mn(),Ia(i.$$.fragment)},m(e,n){Aa(t,e,n),wn(e,o,n),Aa(i,e,n),r=!0},p(e,o){const r={};536870912&o[0]&&(r.items=e[29]),t.$set(r);const n={};16&o[0]&&(n.locale=e[4]),262145&o[1]&&(n.shape=e[31]||e[49]),512&o[0]&&(n.controls=e[9]),i.$set(n)},i(e){r||(xa(t.$$.fragment,e),xa(i.$$.fragment,e),r=!0)},o(e){va(t.$$.fragment,e),va(i.$$.fragment,e),r=!1},d(e){La(t,e),e&&Sn(o),La(i,e)}}}function yb(e){let t,o,i;return o=new B$({props:{$$slots:{default:[fb]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"slot","header")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};536871440&t[0]|262145&t[1]|262144&t[6]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function bb(e){let t,o;const i=[{locale:e[4]},{ui:e[69]},{shapes:e[5]},{selection:e[58]},{uid:e[19]},{parentRect:e[37]},{rootRect:e[55]},{utilRect:e[39]},{offset:e[50]},{disabled:e[38]},{contextRotation:e[22]},{contextFlipX:e[23]},{contextFlipY:e[24]},{contextZoom:e[36].scale},{active:e[35]},{opacity:e[56]},{hoverColor:e[57]},{caretColor:e[57]},{gridColor:[1,1,1,.125]},{snapColor:e[57]},{eraseRadius:e[47]},{selectRadius:e[6]},{enableButtonFlipVertical:e[10]},{mapEditorPointToImagePoint:e[20]},{mapImagePointToEditorPoint:e[21]},{enableTapToAddText:e[13]},{textInputMode:e[8]},{snapThreshold:e[15]},{snapPointer:!e[48]},{enableSnapToContext:e[16]},{gridSize:e[14]},{willStartInteraction:e[96]},{oninteractionstart:e[80]},{oninteractionupdate:e[81]},{oninteractionrelease:e[82]},{oninteractionend:e[84]},{oninteractioncancel:e[83]},{onleavecanvas:e[88]},{onhovercanvas:e[87]},{onhovershape:e[90]},{ontapcanvas:e[89]},{onaddshape:e[155]},{onselectshape:e[156]},{onblurshape:e[157]},{ontapshape:e[158]},{onupdateshape:e[159]},{onremoveshape:e[160]},e[42]];let r={};for(let e=0;e{s=null})),ba()),(!i||32768&n[1]&&o!==(o="cursor:"+e[46]))&&An(t,"style",o)},i(e){i||(xa(s),i=!0)},o(e){va(s),i=!1},d(o){o&&Sn(t),s&&s.d(),e[162](null),r=!1,Kr(n)}}}function vb(e){let t,o;return t=new $b({props:{locale:e[4],presets:e[18],enableSelectImage:e[11],willRenderPresetToolbar:e[43],onaddpreset:e[94],ongrabpreset:e[91],ondragpreset:e[92],ondroppreset:e[93],scrollElasticity:e[44]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),262144&o[0]&&(i.presets=e[18]),2048&o[0]&&(i.enableSelectImage=e[11]),4096&o[1]&&(i.willRenderPresetToolbar=e[43]),8192&o[1]&&(i.scrollElasticity=e[44]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function wb(e){let t,o,i,r="stack"===e[7]&&Sb(e),n=(e[53]&&e[34]||"row"===e[7])&&Tb(e);return{c(){r&&r.c(),t=Mn(),n&&n.c(),o=Rn()},m(e,a){r&&r.m(e,a),wn(e,t,a),n&&n.m(e,a),wn(e,o,a),i=!0},p(e,i){"stack"===e[7]?r?(r.p(e,i),128&i[0]&&xa(r,1)):(r=Sb(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[53]&&e[34]||"row"===e[7]?n?(n.p(e,i),128&i[0]|4194312&i[1]&&xa(n,1)):(n=Tb(e),n.c(),xa(n,1),n.m(o.parentNode,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function Sb(e){let t,o,i,r;const n=[Cb,kb],a=[];function s(e,t){return e[45]?0:1}return o=s(e),i=a[o]=n[o](e),{c(){t=kn("div"),i.c(),An(t,"class","PinturaControlPanels")},m(e,i){wn(e,t,i),a[o].m(t,null),r=!0},p(e,r){let l=o;o=s(e),o===l?a[o].p(e,r):(ya(),va(a[l],1,1,(()=>{a[l]=null})),ba(),i=a[o],i?i.p(e,r):(i=a[o]=n[o](e),i.c()),xa(i,1),i.m(t,null))},i(e){r||(xa(i),r=!0)},o(e){va(i),r=!1},d(e){e&&Sn(t),a[o].d()}}}function kb(e){let t,o,i;return o=new Jy({props:{locale:e[4],shape:e[31]||e[49],onchange:e[86],controls:e[9],scrollElasticity:e[44],willRenderControls:e[17]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaControlPanel")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};16&t[0]&&(i.locale=e[4]),262145&t[1]&&(i.shape=e[31]||e[49]),512&t[0]&&(i.controls=e[9]),8192&t[1]&&(i.scrollElasticity=e[44]),131072&t[0]&&(i.willRenderControls=e[17]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Cb(e){let t,o,i;return o=new $b({props:{locale:e[4],presets:e[18],enableSelectImage:e[11],willRenderPresetToolbar:e[43],onaddpreset:e[94],ongrabpreset:e[91],ondragpreset:e[92],ondroppreset:e[93],scrollElasticity:e[44]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaControlPanel")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};16&t[0]&&(i.locale=e[4]),262144&t[0]&&(i.presets=e[18]),2048&t[0]&&(i.enableSelectImage=e[11]),4096&t[1]&&(i.willRenderPresetToolbar=e[43]),8192&t[1]&&(i.scrollElasticity=e[44]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Tb(e){let t,o;return t=new vd({props:{class:"PinturaControlListScroller",elasticity:e[44],$$slots:{default:[Lb]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8192&o[1]&&(i.elasticity=e[44]),131729&o[0]|262155&o[1]|262144&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Mb(e){let t,o;return t=new Wu({props:{locale:e[4],class:"PinturaControlList",optionClass:"PinturaControlListOption",layout:"row",options:e[32],selectedIndex:e[32].findIndex(e[152]),onchange:e[79],$$slots:{option:[Ib,({option:e})=>({203:e}),({option:e})=>[0,0,0,0,0,0,e?131072:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),2&o[1]&&(i.options=e[32]),1&o[0]|2&o[1]&&(i.selectedIndex=e[32].findIndex(e[152])),16&o[0]|393216&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Rb(e){let t,o;return t=new td({props:{$$slots:{default:[Pb]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]|393216&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Pb(e){let t,o=(P(e[203].icon)?e[203].icon(e[4]):e[203].icon)+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){16&i[0]|131072&i[6]&&o!==(o=(P(e[203].icon)?e[203].icon(e[4]):e[203].icon)+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function Eb(e){let t,o,i=(P(e[203].label)?e[203].label(e[4]):e[203].label)+"";return{c(){t=kn("span"),o=Tn(i)},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){16&t[0]|131072&t[6]&&i!==(i=(P(e[203].label)?e[203].label(e[4]):e[203].label)+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Ib(e){let t,o,i,r=e[203].icon&&Rb(e),n=!e[203].hideLabel&&Eb(e);return{c(){t=kn("div"),r&&r.c(),o=Mn(),n&&n.c(),An(t,"slot","option")},m(e,a){wn(e,t,a),r&&r.m(t,null),bn(t,o),n&&n.m(t,null),i=!0},p(e,i){e[203].icon?r?(r.p(e,i),131072&i[6]&&xa(r,1)):(r=Rb(e),r.c(),xa(r,1),r.m(t,o)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[203].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=Eb(e),n.c(),n.m(t,null))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){e&&Sn(t),r&&r.d(),n&&n.d()}}}function Ab(e){let t,o;return t=new Jy({props:{locale:e[4],shape:e[31]||e[49],onchange:e[86],controls:e[9],scrollEnable:!1,hideTitles:!0,willRenderControls:e[153]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),262145&o[1]&&(i.shape=e[31]||e[49]),512&o[0]&&(i.controls=e[9]),131072&o[0]&&(i.willRenderControls=e[153]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Lb(e){let t,o,i,r=e[34]&&Mb(e),n="row"===e[7]&&Ab(e);return{c(){r&&r.c(),t=Mn(),n&&n.c(),o=Rn()},m(e,a){r&&r.m(e,a),wn(e,t,a),n&&n.m(e,a),wn(e,o,a),i=!0},p(e,i){e[34]?r?(r.p(e,i),8&i[1]&&xa(r,1)):(r=Mb(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),"row"===e[7]?n?(n.p(e,i),128&i[0]&&xa(n,1)):(n=Ab(e),n.c(),xa(n,1),n.m(o.parentNode,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function zb(e){let t,o;return t=new vd({props:{class:"PinturaControlListScroller",elasticity:e[44],$$slots:{default:[Bb]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8192&o[1]&&(i.elasticity=e[44]),67108880&o[0]|8388608&o[1]|262144&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Fb(e){let t,o;return t=new td({props:{$$slots:{default:[Db]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]|393216&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Db(e){let t,o=(P(e[203].icon)?e[203].icon(e[4]):e[203].icon)+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){16&i[0]|131072&i[6]&&o!==(o=(P(e[203].icon)?e[203].icon(e[4]):e[203].icon)+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function Ob(e){let t,o,i,r,n,a=(P(e[203].label)?e[203].label(e[4]):e[203].label)+"",s=e[203].icon&&Fb(e);return{c(){t=kn("div"),s&&s.c(),o=Mn(),i=kn("span"),r=Tn(a),An(t,"slot","option")},m(e,a){wn(e,t,a),s&&s.m(t,null),bn(t,o),bn(t,i),bn(i,r),n=!0},p(e,i){e[203].icon?s?(s.p(e,i),131072&i[6]&&xa(s,1)):(s=Fb(e),s.c(),xa(s,1),s.m(t,o)):s&&(ya(),va(s,1,1,(()=>{s=null})),ba()),(!n||16&i[0]|131072&i[6])&&a!==(a=(P(e[203].label)?e[203].label(e[4]):e[203].label)+"")&&Fn(r,a)},i(e){n||(xa(s),n=!0)},o(e){va(s),n=!1},d(e){e&&Sn(t),s&&s.d()}}}function Bb(e){let t,o;return t=new Wu({props:{locale:e[4],class:"PinturaControlList",optionClass:"PinturaControlListOption",layout:"row",options:e[54],selectedIndex:e[54].findIndex(e[154]),onchange:e[78],$$slots:{option:[Ob,({option:e})=>({203:e}),({option:e})=>[0,0,0,0,0,0,e?131072:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),8388608&o[1]&&(i.options=e[54]),67108864&o[0]|8388608&o[1]&&(i.selectedIndex=e[54].findIndex(e[154])),16&o[0]|393216&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Wb(e){let t,o,i,r,n;const a=[wb,vb],s=[];function l(e,t){return e[52]?0:e[45]?1:-1}~(o=l(e))&&(i=s[o]=a[o](e));let c=e[33]&&zb(e);return{c(){t=kn("div"),i&&i.c(),r=Mn(),c&&c.c(),An(t,"slot","footer"),An(t,"style",e[40])},m(e,i){wn(e,t,i),~o&&s[o].m(t,null),bn(t,r),c&&c.m(t,null),n=!0},p(e,d){let u=o;o=l(e),o===u?~o&&s[o].p(e,d):(i&&(ya(),va(s[u],1,1,(()=>{s[u]=null})),ba()),~o?(i=s[o],i?i.p(e,d):(i=s[o]=a[o](e),i.c()),xa(i,1),i.m(t,r)):i=null),e[33]?c?(c.p(e,d),4&d[1]&&xa(c,1)):(c=zb(e),c.c(),xa(c,1),c.m(t,null)):c&&(ya(),va(c,1,1,(()=>{c=null})),ba()),(!n||512&d[1])&&An(t,"style",e[40])},i(e){n||(xa(i),xa(c),n=!0)},o(e){va(i),va(c),n=!1},d(e){e&&Sn(t),~o&&s[o].d(),c&&c.d()}}}function _b(e){let t,o;return t=new J$({props:{hasHeader:e[41],$$slots:{footer:[Wb],main:[xb],header:[yb]},$$scope:{ctx:e}}}),t.$on("measure",e[164]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1024&o[1]&&(i.hasHeader=e[41]),2113929201&o[0]|134216703&o[1]|262144&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Vb(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,P,E,I,A,L,z,F,D,O,B,W,_,V,N,H,j,U,Z,X,Y,q,K,J,Q,ee,te,oe,ie,re,ne,ae,se,le,ce,de,he,pe,me,ge,$e,fe,ye=Gr,be=()=>(ye(),ye=en(Pe,(e=>o(35,U=e))),Pe),xe=Gr,ve=()=>(xe(),xe=en(Fe,(e=>o(142,q=e))),Fe),we=Gr,Se=()=>(we(),we=en(mt,(e=>o(37,ie=e))),mt),ke=Gr,Ce=()=>(ke(),ke=en(Ae,(e=>o(149,pe=e))),Ae),Te=Gr,Me=()=>(Te(),Te=en(Ie,(e=>o(56,$e=e))),Ie);e.$$.on_destroy.push((()=>ye())),e.$$.on_destroy.push((()=>xe())),e.$$.on_destroy.push((()=>we())),e.$$.on_destroy.push((()=>ke())),e.$$.on_destroy.push((()=>Te()));let{isActive:Pe}=t;be();let{isActiveFraction:Ie}=t;Me();let{isVisible:Ae}=t;Ce();let{stores:Le}=t,{locale:ze={}}=t,{shapes:Fe}=t;ve();let{toolbar:De=[]}=t,{toolShapes:Oe={}}=t,{toolActive:Be}=t,{toolSelectRadius:We}=t,{toolRetainStyles:_e=!1}=t,{toolbarLayout:Ve="stack"}=t,{textInputMode:Ne}=t,{shapeControls:He={}}=t,{enableButtonFlipVertical:je=!1}=t,{enablePresetSelectImage:Ue=!0}=t,{enablePresetDropImage:Ge=!0}=t,{enableSelectToolToAddShape:Ze=!1}=t,{enableAutoSelectMoveTool:Xe=["line","arrow","path","rectangle","ellipse","text"]}=t,{enableTapToAddText:Ye=!1}=t,{enableMoveTool:qe=!1}=t,{enableViewTool:Ke=!1}=t,{enableToolShareStyles:Je=!0}=t,{gridSize:Qe=0}=t,{snapThreshold:et=0}=t,{enableSnapToContext:tt=!0}=t,{willRenderHeaderTools:ot=G}=t,{willRenderPresetToolbar:it}=t,{willRenderShapeStyleControls:rt}=t,{willStartInteraction:nt}=t,{shapePresets:st=[]}=t,{utilKey:lt}=t,{mapScreenPointToImagePoint:ct}=t,{mapImagePointToScreenPoint:dt}=t,{imageRotation:ut=0}=t,{imageFlipX:ht=!1}=t,{imageFlipY:pt=!1}=t,{parentRect:mt}=t;Se();let{hooks:gt={}}=t;const $t=Jn("selection");on(e,$t,(e=>o(148,ce=e)));const ft=Jn("isAnimated");on(e,ft,(e=>o(139,Z=e)));const bt=Jn("elasticityMultiplier");on(e,bt,(e=>o(143,K=e)));const xt=Jn("ui");on(e,xt,(e=>o(174,de=e)));const vt=Jn("keysPressed");let wt;on(e,vt,(e=>o(146,se=e)));const{env:St,history:kt,rootRect:Ct,rootColorSecondary:Tt,enablePanInput:Mt,enablePanInputStatus:Rt,enableZoomInput:Pt,stageRect:Et,utilRectPadded:It,scrollElasticity:At,imageOverlayMarkup:Lt,imagePreviewModifiers:zt,imageCropRect:Ft,shapePreprocessor:Dt,stageScalar:Ot,imageSelectionRect:Bt,imageTransformsInterpolated:Wt,imageSelectionPan:_t,imageSize:Vt,allowPan:Nt,allowZoom:Ht,allowZoomControls:jt,allowPlayPause:Ut}=Le;on(e,St,(e=>o(140,X=e))),on(e,Ct,(e=>o(55,ge=e))),on(e,Tt,(e=>o(57,fe=e))),on(e,Rt,(e=>o(38,ne=e))),on(e,Et,(e=>o(144,J=e))),on(e,It,(e=>o(39,he=e))),on(e,zt,(e=>o(150,me=e))),on(e,Ft,(e=>o(173,re=e))),on(e,Dt,(e=>o(147,le=e))),on(e,Ot,(e=>o(171,te=e))),on(e,Bt,(e=>o(172,oe=e))),on(e,Wt,(e=>o(36,Q=e))),on(e,_t,(e=>o(170,ee=e))),on(e,Vt,(e=>o(145,ae=e)));let Gt=0,Zt={};const Xt=e=>{const[t,o]=wt[e];let i,r,n="relative"===o.position;const a=n?"0%":0,s=n?"0%":0;Mi(t)||ki(t)?(r=n?"20%":.2*ie.width,i=fi(t),i.x=a,i.y=s,fr(i,{width:r,height:r},ie)):Ri(t)?(r=n?"10%":.1*ie.width,i=fi(t),i.x=a,i.y=s,fr(i,{rx:r,ry:r},ie)):Pi(t)&&(r=n?"10%":.1*ie.width,i=fi(t),i.x1=a,i.y1=s,i.x2=a,i.y2=s),i&&Promise.resolve().then((()=>{lo(ao(i,void 0,r))}))},Yt=e=>ct(fy(e,ge));let qt,Kt,Jt={};let Qt;const eo=e=>{if(!(Ei(e)&&zo(e,"pathClose")))return;const t=[...e.strokeColor];t[3]=1,qt.updateMarkupShape(e,{pathClose:!1,strokeColor:t},!1),qt.removeMarkupShapeProps(e,["backgroundColor"],!1),qt.confirmMarkupItemDraft(),qt.selectShape(e)};let to;const oo=(e,t)=>{if(Ao(e))return e;if(e.endsWith("%")){return parseFloat(e)/100*t.width}};let io=void 0,ro=void 0,no=void 0;const ao=(e,t,o)=>{let i=!1;t||(i=!0,t=D?ct(at(J)):at(re)),t.x-=ie.x||0,t.y-=ie.y||0,(ht||pt)&&(e.flipX=ht,e.flipY=pt);const r=qt.getShapesNearPosition(q,t);if(i&&r.length){const e=.1*Math.min(re.width,re.height);t.x+=Math.round(-e+Math.random()*e*2),t.y+=Math.round(-e+Math.random()*e*2)}if(0!==ut&&(e.rotation=ht&&pt?-ut:ht||pt?ut:-ut),zo(e,"width")&&zo(e,"height")){const{width:o,height:i}=$r(e,["width","height"],ie);fr(e,{x:t.x-.5*o,y:t.y-.5*i},ie)}else if(Ri(e))fr(e,{x:t.x,y:t.y},ie);else if(Pi(e)){const{x1:i,y1:r,x2:n,y2:a}=$r(e,["x1","y1","x2","y2"],ie),s=Re(ue(i,r),ue(n,a)),l=R(o)?ar(o,ie.width):s;fr(e,{x1:t.x-l,y1:t.y+l,x2:t.x+l,y2:t.y-l},ie)}else if(Ei(e)){const{points:o}=$r(e,["points"],ie),i=Ee(o);fr(e,{points:o.map((e=>({x:e.x+t.x-i.x,y:e.y+t.y-i.y})))},ie)}return e},so=(e,t)=>{const o=ao(vi(e,re),t);return e.shape&&(zo(e.shape,"x")&&(o.x=e.shape.x),zo(e.shape,"y")&&(o.y=e.shape.y)),lo(o)},lo=e=>{const{beforeAddShape:t=(()=>!0)}=gt;if(t(e))return qt.addShape(e),qt.selectShape(e),O("addshape",e),kt.write(),e};let co=!1;const uo=()=>{kt.write()};let ho;const po=Jn("redrawTrigger");on(e,po,(e=>o(141,Y=e)));const mo=[],go=ec(Z?20:0);on(e,go,(e=>o(138,j=e)));return e.$$set=e=>{"isActive"in e&&be(o(1,Pe=e.isActive)),"isActiveFraction"in e&&Me(o(2,Ie=e.isActiveFraction)),"isVisible"in e&&Ce(o(3,Ae=e.isVisible)),"stores"in e&&o(101,Le=e.stores),"locale"in e&&o(4,ze=e.locale),"shapes"in e&&ve(o(5,Fe=e.shapes)),"toolbar"in e&&o(102,De=e.toolbar),"toolShapes"in e&&o(103,Oe=e.toolShapes),"toolActive"in e&&o(0,Be=e.toolActive),"toolSelectRadius"in e&&o(6,We=e.toolSelectRadius),"toolRetainStyles"in e&&o(104,_e=e.toolRetainStyles),"toolbarLayout"in e&&o(7,Ve=e.toolbarLayout),"textInputMode"in e&&o(8,Ne=e.textInputMode),"shapeControls"in e&&o(9,He=e.shapeControls),"enableButtonFlipVertical"in e&&o(10,je=e.enableButtonFlipVertical),"enablePresetSelectImage"in e&&o(11,Ue=e.enablePresetSelectImage),"enablePresetDropImage"in e&&o(12,Ge=e.enablePresetDropImage),"enableSelectToolToAddShape"in e&&o(105,Ze=e.enableSelectToolToAddShape),"enableAutoSelectMoveTool"in e&&o(106,Xe=e.enableAutoSelectMoveTool),"enableTapToAddText"in e&&o(13,Ye=e.enableTapToAddText),"enableMoveTool"in e&&o(107,qe=e.enableMoveTool),"enableViewTool"in e&&o(108,Ke=e.enableViewTool),"enableToolShareStyles"in e&&o(109,Je=e.enableToolShareStyles),"gridSize"in e&&o(14,Qe=e.gridSize),"snapThreshold"in e&&o(15,et=e.snapThreshold),"enableSnapToContext"in e&&o(16,tt=e.enableSnapToContext),"willRenderHeaderTools"in e&&o(110,ot=e.willRenderHeaderTools),"willRenderPresetToolbar"in e&&o(111,it=e.willRenderPresetToolbar),"willRenderShapeStyleControls"in e&&o(17,rt=e.willRenderShapeStyleControls),"willStartInteraction"in e&&o(112,nt=e.willStartInteraction),"shapePresets"in e&&o(18,st=e.shapePresets),"utilKey"in e&&o(19,lt=e.utilKey),"mapScreenPointToImagePoint"in e&&o(20,ct=e.mapScreenPointToImagePoint),"mapImagePointToScreenPoint"in e&&o(21,dt=e.mapImagePointToScreenPoint),"imageRotation"in e&&o(22,ut=e.imageRotation),"imageFlipX"in e&&o(23,ht=e.imageFlipX),"imageFlipY"in e&&o(24,pt=e.imageFlipY),"parentRect"in e&&Se(o(25,mt=e.parentRect)),"hooks"in e&&o(113,gt=e.hooks)},e.$$.update=()=>{var t,ee,te,oe;if(4194304&e.$$.dirty[4]&&o(123,i=se.includes(18)),2098176&e.$$.dirty[3]&&(wt&&Oe===wt||o(114,wt=Oe)),16&e.$$.dirty[1]&&Nt.set(U),16&e.$$.dirty[1]&&Ht.set(U),16&e.$$.dirty[1]&&jt.set(U),512&e.$$.dirty[3]&&o(33,r=Array.isArray(De)&&De.length>1&&Array.isArray(De[0][1])),4&e.$$.dirty[1]|512&e.$$.dirty[3]&&o(54,n=r?De.map(((e,t)=>[t,e[0]])):[]),67108864&e.$$.dirty[0]|4&e.$$.dirty[1]|512&e.$$.dirty[3]&&o(137,a=r?De[Gt][1]:De),262144&e.$$.dirty[0]|311296&e.$$.dirty[3]|8192&e.$$.dirty[4]&&o(32,s=((e,{willRenderPresetToolbar:t,shapePresets:o,enableViewTool:i,enableMoveTool:n})=>{let a=0!==o.length||t?e:e.filter((e=>"preset"!==e[0]));return r&&(a=[["move",e=>e.shapeLabelToolMove,{icon:e=>e.shapeIconToolMove}],["view",e=>e.shapeLabelToolView,{icon:e=>e.shapeIconToolView}],...a]),a=n?a:a.filter((e=>"move"!==e[0])),i?a:a.filter((e=>"view"!==e[0]))})(a,{willRenderPresetToolbar:it,shapePresets:st,enableMoveTool:qe,enableViewTool:Ke})),2&e.$$.dirty[1]&&o(135,d=!!s.length),1&e.$$.dirty[0]|2&e.$$.dirty[1]|2048&e.$$.dirty[4]&&d&&void 0===Be&&o(0,Be=s[0][0]),67108865&e.$$.dirty[0]|4&e.$$.dirty[1]|4194304&e.$$.dirty[3]|8192&e.$$.dirty[4]&&r&&o(115,Zt={...Zt,[Gt]:a.map((([e])=>e)).includes(Be)?Be:Zt[Gt]||a[0][0]}),512&e.$$.dirty[0]&&o(134,l=!!Object.keys(He).length),2&e.$$.dirty[1]&&o(34,c=s.length>1),12&e.$$.dirty[1]&&o(53,u=c||r),1&e.$$.dirty[0]&&o(136,h=void 0!==Be),7168&e.$$.dirty[4]&&o(52,p=(!h||d)&&l),268435456&e.$$.dirty[0]&&o(30,O=ho&&(t=ho,(e,o)=>{t.dispatchEvent(vp(e,o))})),1073741825&e.$$.dirty[0]|16&e.$$.dirty[1]&&U&&O&&O("selectcontrol",Be),524288&e.$$.dirty[0]|16&e.$$.dirty[1]|67108864&e.$$.dirty[4]&&(U?un(zt,me[lt]={maskMarkupOpacity:.85},me):delete me[lt]),1&e.$$.dirty[0]|2097152&e.$$.dirty[3]&&o(133,m=Be&&wt[Be]?wt[Be][1]:void 0),512&e.$$.dirty[4]&&o(124,g=m&&m.isSelection?"selection":"shapes"),1073741824&e.$$.dirty[3]|1&e.$$.dirty[4]&&(e=>{if(!qt)return;const t=qt.getShapeDraft($t);t&&(e&&(Kt=t.drawMode),qt.updateShapeDraft({drawMode:e?"subtract":Kt},$t))})("selection"===g&&i),134217729&e.$$.dirty[0]&&Be&&qt){const e=qt.getMarkupItemDraft();e&&eo(e)}if(1&e.$$.dirty[0]&&Be&&qt&&"move"!==Be&&qt.blurShapes(),16&e.$$.dirty[1]|33554432&e.$$.dirty[4]&&o(51,$=pe&&U),256&e.$$.dirty[1]|1048576&e.$$.dirty[4]&&o(50,f=he&&ue(J.x-he.x,J.y-he.y)),512&e.$$.dirty[0]&&o(132,y=Object.keys(He)),16&e.$$.dirty[1]|262144&e.$$.dirty[4]&&o(120,b=U&&q.filter(Li)[0]),16&e.$$.dirty[1]|262144&e.$$.dirty[4]&&o(129,x=U&&q.find((e=>zi(e)))),16&e.$$.dirty[1]|262144&e.$$.dirty[4]&&o(49,v=U&&q.find((e=>Fi(e)))),1&e.$$.dirty[0]|16&e.$$.dirty[1]|2097152&e.$$.dirty[3]&&o(126,w=U&&wt[Be]?rr(fi({...wt[Be][0],...de[lt]?de[lt][Be]:{}})):{}),2097152&e.$$.dirty[3]&&wt&&o(116,Jt={}),1&e.$$.dirty[0]|8454144&e.$$.dirty[3]|260&e.$$.dirty[4]&&o(125,S=w&&Object.keys(w).reduce(((e,t)=>{const o="disableStyle"===t,i="settings"===t,r=!!y.find((e=>e.split("_").includes(t)));if(!o&&!i&&!r)return e;if(void 0===w[t])return e;if(!0===w.disableStyle)return e;if(w.disableStyle&&w.disableStyle.includes(t))return e;if("strokeWidth"===t&&void 0===Jt[t]&&zo(w,"points"))return e[t]=w[t],e;const{share:n=!0}=w.settings&&w.settings[t]||{},a=Je&&n?Jt:Jt[Be]||{};return e[t]=zo(a,t)?a[t]:w[t],e}),{})),e.$$.dirty[4],524289&e.$$.dirty[0]|2048&e.$$.dirty[3]|2&e.$$.dirty[4]&&(_e?((e,t,o)=>{const i=de[e],r=i?i[t]:{};xt.set({...de,[e]:{...i,[t]:{...r,...o}}})})(lt,Be,S):(ee=lt,xt.set({[ee]:{}}))),16&e.$$.dirty[1]|134217728&e.$$.dirty[3]|16777218&e.$$.dirty[4]&&o(31,k=ce&&U?b||S:void 0),1&e.$$.dirty[1]|8388608&e.$$.dirty[4]&&k&&k.lineEnd&&!le&&console.warn("Set shapePreprocessor property to draw lineStart and lineEnd styles.\nhttps://pqina.nl/pintura/docs/v8/api/exports/#createshapepreprocessor"),1&e.$$.dirty[0]|4&e.$$.dirty[4]&&o(48,C=zo(w,"eraseRadius")||zo(w,"points")&&!zo(w,"pathClose")||"move"===Be||"view"===Be),64&e.$$.dirty[1]|4&e.$$.dirty[4]&&o(47,T=w&&void 0!==w.eraseRadius?oo(w.eraseRadius,ie):void 0),16&e.$$.dirty[1]|4194304&e.$$.dirty[4]&&o(130,M=U&&se.includes(32)),1&e.$$.dirty[0]|16&e.$$.dirty[1]&&o(131,P=U&&"view"===Be),192&e.$$.dirty[4]&&o(128,E=P||M),48&e.$$.dirty[4]&&o(127,I=!!E&&(!!x||Gd(document.activeElement))),16&e.$$.dirty[1]|24&e.$$.dirty[4]&&Mt.set(!U||E&&!I),16&e.$$.dirty[1]|8&e.$$.dirty[4]&&Pt.set(!U||!I),64&e.$$.dirty[1]|6&e.$$.dirty[4]&&o(121,A=w.cursorStyle?(({cursorStyle:e,cursorSize:t},o,i)=>{let r;const n=o[t];if(void 0===n?r=oo(t,i):Ao(n)?r=n:R(n)&&(r=dr(t,o[t],i),"strokeWidth"===t&&(r*=.5)),!(r<=0||void 0===r))return{size:r,style:e}})(w,{...w,...S},ie):void 0),67108864&e.$$.dirty[3]|2097152&e.$$.dirty[4]&&o(122,L=no&&(oe=ae,(te=no).x>=0&&te.y>=0&&te.x<=oe.width&&te.y<=oe.height)),524288&e.$$.dirty[0]|160&e.$$.dirty[1]|1929379840&e.$$.dirty[3]|1&e.$$.dirty[4])if(L&&!io&&A&&!ne){const e=A.size*Q.scale,t={id:"cursor-"+lt,x:ro.x,y:ro.y,strokeWidth:.5,strokeColor:[0,0,0]};"ellipse"===A.style&&(t.rx=e,t.ry=e);const o={strokeWidth:2.5,strokeColor:[1,1,1],opacity:.75},r=[{...t,...o},t];if("selection"===g&&i){const t=e,i=ro.x+t,n=ro.y+t+4,a={id:"cursor-"+lt,strokeWidth:.75,strokeColor:[0,0,0],points:[{x:i,y:n},{x:i+4,y:n}]};r.push({...a,...o,strokeWidth:2,points:[{x:i-.5,y:n},{x:i+4.5,y:n}]},a)}(e=>{Lt.update((t=>[...t.filter((e=>e.id!=="cursor-"+lt)),...e]))})(r)}else Lt.update((e=>e.filter((e=>e.id!=="cursor-"+lt))));1&e.$$.dirty[0]|128&e.$$.dirty[1]|956301312&e.$$.dirty[3]&&o(46,z=L?((e,t,o,i,r,n)=>{if(i)return r?"grabbing":"grab";if(e&&!t)return"none";if(!t)return"move"===n?"default":"crosshair";let a=t||o;return Li(a)?zi(a)?"modal"===Ne?"default":"text":Yi(a)?"move":"default":"default"})(A,io,b,ne,false,Be):"default"),264193&e.$$.dirty[0]|262144&e.$$.dirty[3]&&o(45,F="preset"===Be&&(st.length>0||Ue||it)),64&e.$$.dirty[1]&&(D=!zo(ie,"x")&&!zo(ie,"y")),524288&e.$$.dirty[4]&&o(44,B=K*At),262144&e.$$.dirty[3]|196608&e.$$.dirty[4]&&o(43,W=Y&&it?e=>Fp((()=>it(e,so,{...X},(()=>po.set({}))))):G),1048576&e.$$.dirty[3]&&o(42,_=Object.keys(gt).reduce(((e,t)=>("beforeAddShape"===t||void 0===gt[t]||(e[t]=gt[t]),e)),{})),16&e.$$.dirty[1]&&(e=>{q&&Fe.update((t=>t.map((t=>(t._prerender=!!e&&zi(t),t)))))})(U),131072&e.$$.dirty[3]|196608&e.$$.dirty[4]&&o(29,V=Y&&ot([],X,(()=>po.set({})))),536871424&e.$$.dirty[0]&&o(41,N=!!V.length||!!Object.keys(He).some((e=>mo.includes(e)))),16&e.$$.dirty[1]|32768&e.$$.dirty[4]&&Z&&go.set(U?0:20),16384&e.$$.dirty[4]&&o(40,H=j?`transform: translateY(${j}px)`:void 0)},Ut.set(!1),[Be,Pe,Ie,Ae,ze,Fe,We,Ve,Ne,He,je,Ue,Ge,Ye,Qe,et,tt,rt,st,lt,ct,dt,ut,ht,pt,mt,Gt,qt,ho,V,O,k,s,r,c,U,Q,ie,ne,he,H,N,_,W,B,F,z,T,C,v,f,$,p,u,n,ge,$e,fe,$t,ft,bt,xt,vt,St,Ct,Tt,Rt,Et,It,Lt,zt,Ft,Dt,Ot,Bt,Wt,_t,Vt,({index:e},t)=>{o(26,Gt=e),o(0,Be=Zt[e])},({value:e},t)=>{o(0,Be=e),(Ze||/enter/i.test(t.key))&&Xt(e)},e=>{if("eraser"===Be)Qt=qt.eraseShape();else if(Be&&wt[Be]){const[e,t={}]=wt[Be],{drawMode:o}=k;"selection"===g&&"new"===o&&$t.set([]);let r={};"selection"===g&&(O("selectiondown",[...ce]),i&&(Kt=e.drawMode,r.drawMode="subtract")),Qt=qt.createShape({...e,...S,...r},t)}else Qt=void 0;return!!Qt&&(Qt.start(e),!0)},e=>!!Qt&&(Qt.update(e),!0),e=>!!Qt&&(Qt.release(e),!0),e=>!!Qt&&(Qt.cancel(e),Qt=void 0,!0),e=>{if(!Qt)return!1;if(Qt.end(e),Qt=void 0,"selection"===g){if(e.detail.isTap){const[e]=wt[Be];e.bitmap||$t.set([])}O("selectionup",[...ce])}const t=qt.getMarkupItemDraft(),i=qe&&(!0===Xe||Array.isArray(Xe)&&Xe.includes(Be));return t&&!t.isEditing||!i||o(0,Be="move"),!0},e=>{const{key:t}=e,o=qt.getMarkupItemDraft();/escape/i.test(t)&&o&&(e.preventDefault(),e.stopPropagation(),qt.discardMarkupItemDraft(),Qt=void 0),/enter/i.test(t)&&o&&(e.preventDefault(),e.stopPropagation(),eo(o),Qt=void 0)},function(e){Object.keys(e).forEach((t=>{const{retain:i=!0,share:r=!0}=w.settings&&w.settings[t]||{};i&&(Je&&r?o(116,Jt[t]=e[t],Jt):(Jt[Be]||o(116,Jt[Be]={},Jt),o(116,Jt[Be][t]=e[t],Jt)))})),O("selectstyle",e),b&&(qt.updateMarkupShape(b,e),clearTimeout(to),to=setTimeout((()=>{uo()}),200))},(e,t,i)=>{o(118,ro=t),o(119,no=i)},()=>{o(119,no=void 0),o(118,ro=void 0)},e=>{O("markuptap",e)},e=>o(117,io=e),()=>{co=!1},(e,t)=>{if(co)return;const{beforeAddShape:o=(()=>!0)}=gt,i=Yt(t),r=qt.getMarkupItemDraft(),n=yt(re,{x:i.x+(ie.x||0),y:i.y+(ie.y||0)});if(r&&!n&&qt.discardMarkupItemDraft(),n){if(!r){const r=vi(e,re),n=ao(r,i);return o(n)?(_i(n),void qt.addShape(n)):(co=!0,void t.preventDefault())}Mi(r)&&(i.x-=.5*r.width,i.y-=.5*r.height),e.shape&&(zo(e.shape,"x")&&(i.x=e.shape.x),zo(e.shape,"y")&&(i.y=e.shape.y)),qt.updateMarkupShape(r,i)}},(e,t)=>{if(co)return;const o=Yt(t);if(!yt(re,{x:o.x+(ie.x||0),y:o.y+(ie.y||0)}))return void qt.discardMarkupItemDraft();const i=qt.confirmMarkupItemDraft();qt.selectShape(i),O("addshape",i),kt.write()},e=>so(e),e=>{return t=e.detail.resources,o=Yt(e.detail.event),t.forEach((e=>so(e,o)));var t,o},e=>{if(!nt)return!0;const t=rectClone(oe);return rectScale(t,1/te),rectTranslate(t,ee),rectScale(t,Q.scale),nt(e,{...t,x:t.x+J.x,y:t.y+J.y})},uo,po,mo,go,Le,De,Oe,_e,Ze,Xe,qe,Ke,Je,ot,it,nt,gt,wt,Zt,Jt,io,ro,no,b,A,L,i,g,S,w,I,E,x,M,P,y,m,l,d,h,a,j,Z,X,Y,q,K,J,ae,se,le,ce,pe,me,function(t){Qn.call(this,e,t)},e=>e[0]===Be,(e,t,o)=>{const i=e.filter((([,e])=>!mo.includes(e)));return rt?rt(i,t,o):i},e=>e[0]===Gt,e=>{Promise.resolve().then((()=>{O("addshape",e),uo()}))},e=>{O("selectshape",e)},e=>{Promise.resolve().then((()=>{O("blurshape",e)}))},e=>{O("tapshape",e)},e=>{O("updateshape",e),uo()},e=>{O("removeshape",e),uo()},function(e){ta[e?"unshift":"push"]((()=>{qt=e,o(27,qt)}))},function(e){ta[e?"unshift":"push"]((()=>{ho=e,o(28,ho)}))},e=>e.filter((([,e])=>mo.includes(e))),function(t){Qn.call(this,e,t)}]}class Nb extends Fa{constructor(e){super(),za(this,e,Vb,_b,Qr,{isActive:1,isActiveFraction:2,isVisible:3,stores:101,locale:4,shapes:5,toolbar:102,toolShapes:103,toolActive:0,toolSelectRadius:6,toolRetainStyles:104,toolbarLayout:7,textInputMode:8,shapeControls:9,enableButtonFlipVertical:10,enablePresetSelectImage:11,enablePresetDropImage:12,enableSelectToolToAddShape:105,enableAutoSelectMoveTool:106,enableTapToAddText:13,enableMoveTool:107,enableViewTool:108,enableToolShareStyles:109,gridSize:14,snapThreshold:15,enableSnapToContext:16,willRenderHeaderTools:110,willRenderPresetToolbar:111,willRenderShapeStyleControls:17,willStartInteraction:112,shapePresets:18,utilKey:19,mapScreenPointToImagePoint:20,mapImagePointToScreenPoint:21,imageRotation:22,imageFlipX:23,imageFlipY:24,parentRect:25,hooks:113},null,[-1,-1,-1,-1,-1,-1,-1])}get isActive(){return this.$$.ctx[1]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[2]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[101]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),pa()}get shapes(){return this.$$.ctx[5]}set shapes(e){this.$$set({shapes:e}),pa()}get toolbar(){return this.$$.ctx[102]}set toolbar(e){this.$$set({toolbar:e}),pa()}get toolShapes(){return this.$$.ctx[103]}set toolShapes(e){this.$$set({toolShapes:e}),pa()}get toolActive(){return this.$$.ctx[0]}set toolActive(e){this.$$set({toolActive:e}),pa()}get toolSelectRadius(){return this.$$.ctx[6]}set toolSelectRadius(e){this.$$set({toolSelectRadius:e}),pa()}get toolRetainStyles(){return this.$$.ctx[104]}set toolRetainStyles(e){this.$$set({toolRetainStyles:e}),pa()}get toolbarLayout(){return this.$$.ctx[7]}set toolbarLayout(e){this.$$set({toolbarLayout:e}),pa()}get textInputMode(){return this.$$.ctx[8]}set textInputMode(e){this.$$set({textInputMode:e}),pa()}get shapeControls(){return this.$$.ctx[9]}set shapeControls(e){this.$$set({shapeControls:e}),pa()}get enableButtonFlipVertical(){return this.$$.ctx[10]}set enableButtonFlipVertical(e){this.$$set({enableButtonFlipVertical:e}),pa()}get enablePresetSelectImage(){return this.$$.ctx[11]}set enablePresetSelectImage(e){this.$$set({enablePresetSelectImage:e}),pa()}get enablePresetDropImage(){return this.$$.ctx[12]}set enablePresetDropImage(e){this.$$set({enablePresetDropImage:e}),pa()}get enableSelectToolToAddShape(){return this.$$.ctx[105]}set enableSelectToolToAddShape(e){this.$$set({enableSelectToolToAddShape:e}),pa()}get enableAutoSelectMoveTool(){return this.$$.ctx[106]}set enableAutoSelectMoveTool(e){this.$$set({enableAutoSelectMoveTool:e}),pa()}get enableTapToAddText(){return this.$$.ctx[13]}set enableTapToAddText(e){this.$$set({enableTapToAddText:e}),pa()}get enableMoveTool(){return this.$$.ctx[107]}set enableMoveTool(e){this.$$set({enableMoveTool:e}),pa()}get enableViewTool(){return this.$$.ctx[108]}set enableViewTool(e){this.$$set({enableViewTool:e}),pa()}get enableToolShareStyles(){return this.$$.ctx[109]}set enableToolShareStyles(e){this.$$set({enableToolShareStyles:e}),pa()}get gridSize(){return this.$$.ctx[14]}set gridSize(e){this.$$set({gridSize:e}),pa()}get snapThreshold(){return this.$$.ctx[15]}set snapThreshold(e){this.$$set({snapThreshold:e}),pa()}get enableSnapToContext(){return this.$$.ctx[16]}set enableSnapToContext(e){this.$$set({enableSnapToContext:e}),pa()}get willRenderHeaderTools(){return this.$$.ctx[110]}set willRenderHeaderTools(e){this.$$set({willRenderHeaderTools:e}),pa()}get willRenderPresetToolbar(){return this.$$.ctx[111]}set willRenderPresetToolbar(e){this.$$set({willRenderPresetToolbar:e}),pa()}get willRenderShapeStyleControls(){return this.$$.ctx[17]}set willRenderShapeStyleControls(e){this.$$set({willRenderShapeStyleControls:e}),pa()}get willStartInteraction(){return this.$$.ctx[112]}set willStartInteraction(e){this.$$set({willStartInteraction:e}),pa()}get shapePresets(){return this.$$.ctx[18]}set shapePresets(e){this.$$set({shapePresets:e}),pa()}get utilKey(){return this.$$.ctx[19]}set utilKey(e){this.$$set({utilKey:e}),pa()}get mapScreenPointToImagePoint(){return this.$$.ctx[20]}set mapScreenPointToImagePoint(e){this.$$set({mapScreenPointToImagePoint:e}),pa()}get mapImagePointToScreenPoint(){return this.$$.ctx[21]}set mapImagePointToScreenPoint(e){this.$$set({mapImagePointToScreenPoint:e}),pa()}get imageRotation(){return this.$$.ctx[22]}set imageRotation(e){this.$$set({imageRotation:e}),pa()}get imageFlipX(){return this.$$.ctx[23]}set imageFlipX(e){this.$$set({imageFlipX:e}),pa()}get imageFlipY(){return this.$$.ctx[24]}set imageFlipY(e){this.$$set({imageFlipY:e}),pa()}get parentRect(){return this.$$.ctx[25]}set parentRect(e){this.$$set({parentRect:e}),pa()}get hooks(){return this.$$.ctx[113]}set hooks(e){this.$$set({hooks:e}),pa()}}var Hb=(e,t,o,i,r,n,a,s,l)=>{const c=pe(e),d=.5*o.width,u=.5*o.height,h=.5*t.width,p=.5*t.height,m=r.x+i.x,g=r.y+i.y;s&&(c.x=o.width-c.x),l&&(c.y=o.height-c.y);const $=Math.cos(n),f=Math.sin(n);c.x-=d,c.y-=u;const y=c.x*$-c.y*f,b=c.x*f+c.y*$;c.x=d+y,c.y=u+b,c.x*=a,c.y*=a,c.x+=h,c.y+=p,c.x+=m,c.y+=g,c.x-=d*a,c.y-=u*a;const x=(r.x-m)*a,v=(r.y-g)*a,w=x*$-v*f,S=x*f+v*$;return c.x+=w,c.y+=S,c},jb=(e,t,o,i,r,n,a,s,l)=>{const c=pe(e),d=Ne(o),u=Ne(t),h=ue(r.x+i.x,r.y+i.y),p=Math.cos(n),m=Math.sin(n);c.x-=u.x,c.y-=u.y;const g=(r.x-h.x)*a,$=(r.y-h.y)*a,f=g*p-$*m,y=g*m+$*p;c.x-=f,c.y-=y,c.x-=h.x,c.y-=h.y,c.x/=a,c.y/=a;const b=c.x*p+c.y*m,x=c.x*m-c.y*p;return c.x=b,c.y=-x,c.x+=d.x,c.y+=d.y,s&&(c.x=o.width-c.x),l&&(c.y=o.height-c.y),c},Ub=e=>"boolean"==typeof e;function Gb(e){let t,o,i;function r(t){e[58](t)}let n={utilKey:"annotate",stores:e[4],locale:e[5],isActive:e[1],isActiveFraction:e[2],isVisible:e[3],mapScreenPointToImagePoint:e[43],mapImagePointToScreenPoint:e[42],imageRotation:e[44],imageFlipX:e[41],imageFlipY:e[40],shapes:e[46],toolbar:e[20]||e[6],toolShapes:e[21]||e[7],toolRetainStyles:e[8],enableSelectToolToAddShape:e[29],enableTapToAddText:e[30],enableViewTool:e[28],enableMoveTool:e[32],enableAutoSelectMoveTool:e[31],snapThreshold:e[15],gridSize:Ao(e[17])?e[17]:e[14],enableSnapToContext:Ub(e[18])?e[18]:e[16],enableToolShareStyles:e[12],shapeControls:e[22]||e[9],shapePresets:e[26],enableButtonFlipVertical:e[23],parentRect:e[47],enablePresetDropImage:e[25],enablePresetSelectImage:e[24],toolSelectRadius:e[10],textInputMode:e[11],willStartInteraction:e[13],willRenderPresetToolbar:e[27]||e[19],hooks:{willRenderShapeControls:e[33],willRenderShapeTextControls:e[34],beforeAddShape:e[35],beforeRemoveShape:e[36],beforeDeselectShape:e[37],beforeSelectShape:e[38],beforeUpdateShape:e[39]}};return void 0!==e[0]&&(n.toolActive=e[0]),t=new Nb({props:n}),ta.push((()=>Ea(t,"toolActive",r))),t.$on("measure",e[59]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};16&i[0]&&(r.stores=e[4]),32&i[0]&&(r.locale=e[5]),2&i[0]&&(r.isActive=e[1]),4&i[0]&&(r.isActiveFraction=e[2]),8&i[0]&&(r.isVisible=e[3]),4096&i[1]&&(r.mapScreenPointToImagePoint=e[43]),2048&i[1]&&(r.mapImagePointToScreenPoint=e[42]),8192&i[1]&&(r.imageRotation=e[44]),1024&i[1]&&(r.imageFlipX=e[41]),512&i[1]&&(r.imageFlipY=e[40]),1048640&i[0]&&(r.toolbar=e[20]||e[6]),2097280&i[0]&&(r.toolShapes=e[21]||e[7]),256&i[0]&&(r.toolRetainStyles=e[8]),536870912&i[0]&&(r.enableSelectToolToAddShape=e[29]),1073741824&i[0]&&(r.enableTapToAddText=e[30]),268435456&i[0]&&(r.enableViewTool=e[28]),2&i[1]&&(r.enableMoveTool=e[32]),1&i[1]&&(r.enableAutoSelectMoveTool=e[31]),32768&i[0]&&(r.snapThreshold=e[15]),147456&i[0]&&(r.gridSize=Ao(e[17])?e[17]:e[14]),327680&i[0]&&(r.enableSnapToContext=Ub(e[18])?e[18]:e[16]),4096&i[0]&&(r.enableToolShareStyles=e[12]),4194816&i[0]&&(r.shapeControls=e[22]||e[9]),67108864&i[0]&&(r.shapePresets=e[26]),8388608&i[0]&&(r.enableButtonFlipVertical=e[23]),33554432&i[0]&&(r.enablePresetDropImage=e[25]),16777216&i[0]&&(r.enablePresetSelectImage=e[24]),1024&i[0]&&(r.toolSelectRadius=e[10]),2048&i[0]&&(r.textInputMode=e[11]),8192&i[0]&&(r.willStartInteraction=e[13]),134742016&i[0]&&(r.willRenderPresetToolbar=e[27]||e[19]),508&i[1]&&(r.hooks={willRenderShapeControls:e[33],willRenderShapeTextControls:e[34],beforeAddShape:e[35],beforeRemoveShape:e[36],beforeDeselectShape:e[37],beforeSelectShape:e[38],beforeUpdateShape:e[39]}),!o&&1&i[0]&&(o=!0,r.toolActive=e[0],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function Zb(e,t,o){let i,r,n,a,s,l,c,d,u;let{isActive:h}=t,{isActiveFraction:p}=t,{isVisible:m}=t,{stores:g}=t,{locale:$={}}=t,{markupEditorToolbar:f}=t,{markupEditorToolStyles:y}=t,{markupEditorToolRetainStyles:b}=t,{markupEditorShapeStyleControls:x}=t,{markupEditorToolSelectRadius:v}=t,{markupEditorTextInputMode:w}=t,{markupEditorToolShareStyles:S}=t,{markupEditorWillStartInteraction:k}=t,{markupEditorGridSize:C=0}=t,{markupEditorSnapThreshold:T=0}=t,{markupEditorSnapToContext:M=!1}=t,{annotateGridSize:R}=t,{annotateSnapToContext:P}=t,{willRenderShapePresetToolbar:E}=t,{annotateTools:I}=t,{annotateToolShapes:A}=t,{annotateShapeControls:L}=t,{annotateActiveTool:z}=t,{annotateEnableButtonFlipVertical:F=!1}=t,{annotateEnableSelectImagePreset:D=!1}=t,{annotateEnableDropImagePreset:O=!0}=t,{annotatePresets:B=[]}=t,{annotateWillRenderShapePresetToolbar:W}=t,{enableViewTool:_}=t,{enableSelectToolToAddShape:V}=t,{enableTapToAddText:N}=t,{enableAutoSelectMoveTool:H}=t,{enableMoveTool:j}=t,{willRenderShapeControls:U}=t,{willRenderShapeTextControls:G}=t,{beforeAddShape:Z}=t,{beforeRemoveShape:X}=t,{beforeDeselectShape:Y}=t,{beforeSelectShape:q}=t,{beforeUpdateShape:K}=t;const{rootRect:J,imageAnnotation:Q,imageSize:ee,imageRotation:te,imageFlipX:oe,imageFlipY:ie,imageTransforms:re,imageTransformsInterpolated:ne}=g;return on(e,J,(e=>o(57,d=e))),on(e,ee,(e=>o(56,c=e))),on(e,te,(e=>o(44,u=e))),on(e,oe,(e=>o(41,a=e))),on(e,ie,(e=>o(40,n=e))),on(e,re,(e=>o(55,l=e))),on(e,ne,(e=>o(54,s=e))),e.$$set=e=>{"isActive"in e&&o(1,h=e.isActive),"isActiveFraction"in e&&o(2,p=e.isActiveFraction),"isVisible"in e&&o(3,m=e.isVisible),"stores"in e&&o(4,g=e.stores),"locale"in e&&o(5,$=e.locale),"markupEditorToolbar"in e&&o(6,f=e.markupEditorToolbar),"markupEditorToolStyles"in e&&o(7,y=e.markupEditorToolStyles),"markupEditorToolRetainStyles"in e&&o(8,b=e.markupEditorToolRetainStyles),"markupEditorShapeStyleControls"in e&&o(9,x=e.markupEditorShapeStyleControls),"markupEditorToolSelectRadius"in e&&o(10,v=e.markupEditorToolSelectRadius),"markupEditorTextInputMode"in e&&o(11,w=e.markupEditorTextInputMode),"markupEditorToolShareStyles"in e&&o(12,S=e.markupEditorToolShareStyles),"markupEditorWillStartInteraction"in e&&o(13,k=e.markupEditorWillStartInteraction),"markupEditorGridSize"in e&&o(14,C=e.markupEditorGridSize),"markupEditorSnapThreshold"in e&&o(15,T=e.markupEditorSnapThreshold),"markupEditorSnapToContext"in e&&o(16,M=e.markupEditorSnapToContext),"annotateGridSize"in e&&o(17,R=e.annotateGridSize),"annotateSnapToContext"in e&&o(18,P=e.annotateSnapToContext),"willRenderShapePresetToolbar"in e&&o(19,E=e.willRenderShapePresetToolbar),"annotateTools"in e&&o(20,I=e.annotateTools),"annotateToolShapes"in e&&o(21,A=e.annotateToolShapes),"annotateShapeControls"in e&&o(22,L=e.annotateShapeControls),"annotateActiveTool"in e&&o(0,z=e.annotateActiveTool),"annotateEnableButtonFlipVertical"in e&&o(23,F=e.annotateEnableButtonFlipVertical),"annotateEnableSelectImagePreset"in e&&o(24,D=e.annotateEnableSelectImagePreset),"annotateEnableDropImagePreset"in e&&o(25,O=e.annotateEnableDropImagePreset),"annotatePresets"in e&&o(26,B=e.annotatePresets),"annotateWillRenderShapePresetToolbar"in e&&o(27,W=e.annotateWillRenderShapePresetToolbar),"enableViewTool"in e&&o(28,_=e.enableViewTool),"enableSelectToolToAddShape"in e&&o(29,V=e.enableSelectToolToAddShape),"enableTapToAddText"in e&&o(30,N=e.enableTapToAddText),"enableAutoSelectMoveTool"in e&&o(31,H=e.enableAutoSelectMoveTool),"enableMoveTool"in e&&o(32,j=e.enableMoveTool),"willRenderShapeControls"in e&&o(33,U=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(34,G=e.willRenderShapeTextControls),"beforeAddShape"in e&&o(35,Z=e.beforeAddShape),"beforeRemoveShape"in e&&o(36,X=e.beforeRemoveShape),"beforeDeselectShape"in e&&o(37,Y=e.beforeDeselectShape),"beforeSelectShape"in e&&o(38,q=e.beforeSelectShape),"beforeUpdateShape"in e&&o(39,K=e.beforeUpdateShape)},e.$$.update=()=>{125830656&e.$$.dirty[1]&&o(43,i=e=>jb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n)),125830656&e.$$.dirty[1]&&o(42,r=e=>Hb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n))},[z,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,R,P,E,I,A,L,F,D,O,B,W,_,V,N,H,j,U,G,Z,X,Y,q,K,n,a,r,i,u,J,Q,ee,te,oe,ie,re,ne,"annotate",s,l,c,d,function(e){z=e,o(0,z)},function(t){Qn.call(this,e,t)}]}var Xb={util:["annotate",class extends Fa{constructor(e){super(),za(this,e,Zb,Gb,Qr,{name:53,isActive:1,isActiveFraction:2,isVisible:3,stores:4,locale:5,markupEditorToolbar:6,markupEditorToolStyles:7,markupEditorToolRetainStyles:8,markupEditorShapeStyleControls:9,markupEditorToolSelectRadius:10,markupEditorTextInputMode:11,markupEditorToolShareStyles:12,markupEditorWillStartInteraction:13,markupEditorGridSize:14,markupEditorSnapThreshold:15,markupEditorSnapToContext:16,annotateGridSize:17,annotateSnapToContext:18,willRenderShapePresetToolbar:19,annotateTools:20,annotateToolShapes:21,annotateShapeControls:22,annotateActiveTool:0,annotateEnableButtonFlipVertical:23,annotateEnableSelectImagePreset:24,annotateEnableDropImagePreset:25,annotatePresets:26,annotateWillRenderShapePresetToolbar:27,enableViewTool:28,enableSelectToolToAddShape:29,enableTapToAddText:30,enableAutoSelectMoveTool:31,enableMoveTool:32,willRenderShapeControls:33,willRenderShapeTextControls:34,beforeAddShape:35,beforeRemoveShape:36,beforeDeselectShape:37,beforeSelectShape:38,beforeUpdateShape:39},null,[-1,-1])}get name(){return this.$$.ctx[53]}get isActive(){return this.$$.ctx[1]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[2]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[4]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[5]}set locale(e){this.$$set({locale:e}),pa()}get markupEditorToolbar(){return this.$$.ctx[6]}set markupEditorToolbar(e){this.$$set({markupEditorToolbar:e}),pa()}get markupEditorToolStyles(){return this.$$.ctx[7]}set markupEditorToolStyles(e){this.$$set({markupEditorToolStyles:e}),pa()}get markupEditorToolRetainStyles(){return this.$$.ctx[8]}set markupEditorToolRetainStyles(e){this.$$set({markupEditorToolRetainStyles:e}),pa()}get markupEditorShapeStyleControls(){return this.$$.ctx[9]}set markupEditorShapeStyleControls(e){this.$$set({markupEditorShapeStyleControls:e}),pa()}get markupEditorToolSelectRadius(){return this.$$.ctx[10]}set markupEditorToolSelectRadius(e){this.$$set({markupEditorToolSelectRadius:e}),pa()}get markupEditorTextInputMode(){return this.$$.ctx[11]}set markupEditorTextInputMode(e){this.$$set({markupEditorTextInputMode:e}),pa()}get markupEditorToolShareStyles(){return this.$$.ctx[12]}set markupEditorToolShareStyles(e){this.$$set({markupEditorToolShareStyles:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[13]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}get markupEditorGridSize(){return this.$$.ctx[14]}set markupEditorGridSize(e){this.$$set({markupEditorGridSize:e}),pa()}get markupEditorSnapThreshold(){return this.$$.ctx[15]}set markupEditorSnapThreshold(e){this.$$set({markupEditorSnapThreshold:e}),pa()}get markupEditorSnapToContext(){return this.$$.ctx[16]}set markupEditorSnapToContext(e){this.$$set({markupEditorSnapToContext:e}),pa()}get annotateGridSize(){return this.$$.ctx[17]}set annotateGridSize(e){this.$$set({annotateGridSize:e}),pa()}get annotateSnapToContext(){return this.$$.ctx[18]}set annotateSnapToContext(e){this.$$set({annotateSnapToContext:e}),pa()}get willRenderShapePresetToolbar(){return this.$$.ctx[19]}set willRenderShapePresetToolbar(e){this.$$set({willRenderShapePresetToolbar:e}),pa()}get annotateTools(){return this.$$.ctx[20]}set annotateTools(e){this.$$set({annotateTools:e}),pa()}get annotateToolShapes(){return this.$$.ctx[21]}set annotateToolShapes(e){this.$$set({annotateToolShapes:e}),pa()}get annotateShapeControls(){return this.$$.ctx[22]}set annotateShapeControls(e){this.$$set({annotateShapeControls:e}),pa()}get annotateActiveTool(){return this.$$.ctx[0]}set annotateActiveTool(e){this.$$set({annotateActiveTool:e}),pa()}get annotateEnableButtonFlipVertical(){return this.$$.ctx[23]}set annotateEnableButtonFlipVertical(e){this.$$set({annotateEnableButtonFlipVertical:e}),pa()}get annotateEnableSelectImagePreset(){return this.$$.ctx[24]}set annotateEnableSelectImagePreset(e){this.$$set({annotateEnableSelectImagePreset:e}),pa()}get annotateEnableDropImagePreset(){return this.$$.ctx[25]}set annotateEnableDropImagePreset(e){this.$$set({annotateEnableDropImagePreset:e}),pa()}get annotatePresets(){return this.$$.ctx[26]}set annotatePresets(e){this.$$set({annotatePresets:e}),pa()}get annotateWillRenderShapePresetToolbar(){return this.$$.ctx[27]}set annotateWillRenderShapePresetToolbar(e){this.$$set({annotateWillRenderShapePresetToolbar:e}),pa()}get enableViewTool(){return this.$$.ctx[28]}set enableViewTool(e){this.$$set({enableViewTool:e}),pa()}get enableSelectToolToAddShape(){return this.$$.ctx[29]}set enableSelectToolToAddShape(e){this.$$set({enableSelectToolToAddShape:e}),pa()}get enableTapToAddText(){return this.$$.ctx[30]}set enableTapToAddText(e){this.$$set({enableTapToAddText:e}),pa()}get enableAutoSelectMoveTool(){return this.$$.ctx[31]}set enableAutoSelectMoveTool(e){this.$$set({enableAutoSelectMoveTool:e}),pa()}get enableMoveTool(){return this.$$.ctx[32]}set enableMoveTool(e){this.$$set({enableMoveTool:e}),pa()}get willRenderShapeControls(){return this.$$.ctx[33]}set willRenderShapeControls(e){this.$$set({willRenderShapeControls:e}),pa()}get willRenderShapeTextControls(){return this.$$.ctx[34]}set willRenderShapeTextControls(e){this.$$set({willRenderShapeTextControls:e}),pa()}get beforeAddShape(){return this.$$.ctx[35]}set beforeAddShape(e){this.$$set({beforeAddShape:e}),pa()}get beforeRemoveShape(){return this.$$.ctx[36]}set beforeRemoveShape(e){this.$$set({beforeRemoveShape:e}),pa()}get beforeDeselectShape(){return this.$$.ctx[37]}set beforeDeselectShape(e){this.$$set({beforeDeselectShape:e}),pa()}get beforeSelectShape(){return this.$$.ctx[38]}set beforeSelectShape(e){this.$$set({beforeSelectShape:e}),pa()}get beforeUpdateShape(){return this.$$.ctx[39]}set beforeUpdateShape(e){this.$$set({beforeUpdateShape:e}),pa()}}]};function Yb(e){let t,o,i;function r(t){e[50](t)}let n={stores:e[4],locale:e[5],isActive:e[1],isActiveFraction:e[2],isVisible:e[3],mapScreenPointToImagePoint:e[41],mapImagePointToScreenPoint:e[40],utilKey:"decorate",shapes:e[43],toolbar:e[19]||e[6],toolShapes:e[20]||e[7],toolRetainStyles:e[8],shapeControls:e[21]||e[9],shapePresets:e[25],enableSelectToolToAddShape:e[27],enableTapToAddText:e[28],enableViewTool:e[29],enableMoveTool:e[30],enableAutoSelectMoveTool:e[31],snapThreshold:e[15],gridSize:Ao(e[17])?e[17]:e[14],enableSnapToContext:Ub(e[18])?e[18]:e[16],enableToolShareStyles:e[12],enablePresetSelectImage:e[23],enablePresetDropImage:e[24],enableButtonFlipVertical:e[22],parentRect:e[42],toolSelectRadius:e[10],textInputMode:e[11],willStartInteraction:e[39],willRenderPresetToolbar:e[26]||e[13],hooks:{willRenderShapeControls:e[32],willRenderShapeTextControls:e[33],beforeAddShape:e[34],beforeRemoveShape:e[35],beforeDeselectShape:e[36],beforeSelectShape:e[37],beforeUpdateShape:e[38]}};return void 0!==e[0]&&(n.toolActive=e[0]),t=new Nb({props:n}),ta.push((()=>Ea(t,"toolActive",r))),t.$on("measure",e[51]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};16&i[0]&&(r.stores=e[4]),32&i[0]&&(r.locale=e[5]),2&i[0]&&(r.isActive=e[1]),4&i[0]&&(r.isActiveFraction=e[2]),8&i[0]&&(r.isVisible=e[3]),1024&i[1]&&(r.mapScreenPointToImagePoint=e[41]),512&i[1]&&(r.mapImagePointToScreenPoint=e[40]),524352&i[0]&&(r.toolbar=e[19]||e[6]),1048704&i[0]&&(r.toolShapes=e[20]||e[7]),256&i[0]&&(r.toolRetainStyles=e[8]),2097664&i[0]&&(r.shapeControls=e[21]||e[9]),33554432&i[0]&&(r.shapePresets=e[25]),134217728&i[0]&&(r.enableSelectToolToAddShape=e[27]),268435456&i[0]&&(r.enableTapToAddText=e[28]),536870912&i[0]&&(r.enableViewTool=e[29]),1073741824&i[0]&&(r.enableMoveTool=e[30]),1&i[1]&&(r.enableAutoSelectMoveTool=e[31]),32768&i[0]&&(r.snapThreshold=e[15]),147456&i[0]&&(r.gridSize=Ao(e[17])?e[17]:e[14]),327680&i[0]&&(r.enableSnapToContext=Ub(e[18])?e[18]:e[16]),4096&i[0]&&(r.enableToolShareStyles=e[12]),8388608&i[0]&&(r.enablePresetSelectImage=e[23]),16777216&i[0]&&(r.enablePresetDropImage=e[24]),4194304&i[0]&&(r.enableButtonFlipVertical=e[22]),1024&i[0]&&(r.toolSelectRadius=e[10]),2048&i[0]&&(r.textInputMode=e[11]),256&i[1]&&(r.willStartInteraction=e[39]),67117056&i[0]&&(r.willRenderPresetToolbar=e[26]||e[13]),254&i[1]&&(r.hooks={willRenderShapeControls:e[32],willRenderShapeTextControls:e[33],beforeAddShape:e[34],beforeRemoveShape:e[35],beforeDeselectShape:e[36],beforeSelectShape:e[37],beforeUpdateShape:e[38]}),!o&&1&i[0]&&(o=!0,r.toolActive=e[0],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function qb(e,t,o){let i,r,n,a,s;let{isActive:l}=t,{isActiveFraction:c}=t,{isVisible:d}=t,{stores:u}=t,{locale:h={}}=t,{markupEditorToolbar:p}=t,{markupEditorToolStyles:m}=t,{markupEditorToolRetainStyles:g}=t,{markupEditorShapeStyleControls:$}=t,{markupEditorToolSelectRadius:f}=t,{markupEditorTextInputMode:y}=t,{markupEditorToolShareStyles:b}=t,{willRenderShapePresetToolbar:x}=t,{markupEditorGridSize:v}=t,{markupEditorSnapThreshold:w}=t,{markupEditorSnapToContext:S=!0}=t,{decorateGridSize:k}=t,{decorateSnapToContext:C}=t,{decorateTools:T}=t,{decorateToolShapes:M}=t,{decorateShapeControls:R}=t,{decorateActiveTool:P}=t,{decorateEnableButtonFlipVertical:E=!1}=t,{decorateEnableSelectImagePreset:I=!1}=t,{decorateEnableDropImagePreset:A=!0}=t,{decoratePresets:L=[]}=t,{decorateWillRenderShapePresetToolbar:z}=t,{enableSelectToolToAddShape:F}=t,{enableTapToAddText:D}=t,{enableViewTool:O}=t,{enableMoveTool:B}=t,{enableAutoSelectMoveTool:W}=t,{willRenderShapeControls:_}=t,{willRenderShapeTextControls:V}=t,{beforeAddShape:N}=t,{beforeRemoveShape:H}=t,{beforeDeselectShape:j}=t,{beforeSelectShape:U}=t,{beforeUpdateShape:G}=t,{markupEditorWillStartInteraction:Z}=t;const{imageCropRect:X,imageDecoration:Y,imageSelectionRectPresentation:q,imageTransformsInterpolated:K}=u;return on(e,q,(e=>o(48,a=e))),on(e,K,(e=>o(49,s=e))),e.$$set=e=>{"isActive"in e&&o(1,l=e.isActive),"isActiveFraction"in e&&o(2,c=e.isActiveFraction),"isVisible"in e&&o(3,d=e.isVisible),"stores"in e&&o(4,u=e.stores),"locale"in e&&o(5,h=e.locale),"markupEditorToolbar"in e&&o(6,p=e.markupEditorToolbar),"markupEditorToolStyles"in e&&o(7,m=e.markupEditorToolStyles),"markupEditorToolRetainStyles"in e&&o(8,g=e.markupEditorToolRetainStyles),"markupEditorShapeStyleControls"in e&&o(9,$=e.markupEditorShapeStyleControls),"markupEditorToolSelectRadius"in e&&o(10,f=e.markupEditorToolSelectRadius),"markupEditorTextInputMode"in e&&o(11,y=e.markupEditorTextInputMode),"markupEditorToolShareStyles"in e&&o(12,b=e.markupEditorToolShareStyles),"willRenderShapePresetToolbar"in e&&o(13,x=e.willRenderShapePresetToolbar),"markupEditorGridSize"in e&&o(14,v=e.markupEditorGridSize),"markupEditorSnapThreshold"in e&&o(15,w=e.markupEditorSnapThreshold),"markupEditorSnapToContext"in e&&o(16,S=e.markupEditorSnapToContext),"decorateGridSize"in e&&o(17,k=e.decorateGridSize),"decorateSnapToContext"in e&&o(18,C=e.decorateSnapToContext),"decorateTools"in e&&o(19,T=e.decorateTools),"decorateToolShapes"in e&&o(20,M=e.decorateToolShapes),"decorateShapeControls"in e&&o(21,R=e.decorateShapeControls),"decorateActiveTool"in e&&o(0,P=e.decorateActiveTool),"decorateEnableButtonFlipVertical"in e&&o(22,E=e.decorateEnableButtonFlipVertical),"decorateEnableSelectImagePreset"in e&&o(23,I=e.decorateEnableSelectImagePreset),"decorateEnableDropImagePreset"in e&&o(24,A=e.decorateEnableDropImagePreset),"decoratePresets"in e&&o(25,L=e.decoratePresets),"decorateWillRenderShapePresetToolbar"in e&&o(26,z=e.decorateWillRenderShapePresetToolbar),"enableSelectToolToAddShape"in e&&o(27,F=e.enableSelectToolToAddShape),"enableTapToAddText"in e&&o(28,D=e.enableTapToAddText),"enableViewTool"in e&&o(29,O=e.enableViewTool),"enableMoveTool"in e&&o(30,B=e.enableMoveTool),"enableAutoSelectMoveTool"in e&&o(31,W=e.enableAutoSelectMoveTool),"willRenderShapeControls"in e&&o(32,_=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(33,V=e.willRenderShapeTextControls),"beforeAddShape"in e&&o(34,N=e.beforeAddShape),"beforeRemoveShape"in e&&o(35,H=e.beforeRemoveShape),"beforeDeselectShape"in e&&o(36,j=e.beforeDeselectShape),"beforeSelectShape"in e&&o(37,U=e.beforeSelectShape),"beforeUpdateShape"in e&&o(38,G=e.beforeUpdateShape),"markupEditorWillStartInteraction"in e&&o(39,Z=e.markupEditorWillStartInteraction)},e.$$.update=()=>{262144&e.$$.dirty[1]&&o(47,i=s?s.scale:1),196608&e.$$.dirty[1]&&o(41,r=e=>{const t=pe(e);return t.x-=a.x,t.y-=a.y,t.x/=i,t.y/=i,t}),196608&e.$$.dirty[1]&&o(40,n=e=>{const t=pe(e);return t.x*=i,t.y*=i,t.x+=a.x,t.y+=a.y,t})},[P,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,R,E,I,A,L,z,F,D,O,B,W,_,V,N,H,j,U,G,Z,n,r,X,Y,q,K,"decorate",i,a,s,function(e){P=e,o(0,P)},function(t){Qn.call(this,e,t)}]}var Kb={util:["decorate",class extends Fa{constructor(e){super(),za(this,e,qb,Yb,Qr,{name:46,isActive:1,isActiveFraction:2,isVisible:3,stores:4,locale:5,markupEditorToolbar:6,markupEditorToolStyles:7,markupEditorToolRetainStyles:8,markupEditorShapeStyleControls:9,markupEditorToolSelectRadius:10,markupEditorTextInputMode:11,markupEditorToolShareStyles:12,willRenderShapePresetToolbar:13,markupEditorGridSize:14,markupEditorSnapThreshold:15,markupEditorSnapToContext:16,decorateGridSize:17,decorateSnapToContext:18,decorateTools:19,decorateToolShapes:20,decorateShapeControls:21,decorateActiveTool:0,decorateEnableButtonFlipVertical:22,decorateEnableSelectImagePreset:23,decorateEnableDropImagePreset:24,decoratePresets:25,decorateWillRenderShapePresetToolbar:26,enableSelectToolToAddShape:27,enableTapToAddText:28,enableViewTool:29,enableMoveTool:30,enableAutoSelectMoveTool:31,willRenderShapeControls:32,willRenderShapeTextControls:33,beforeAddShape:34,beforeRemoveShape:35,beforeDeselectShape:36,beforeSelectShape:37,beforeUpdateShape:38,markupEditorWillStartInteraction:39},null,[-1,-1])}get name(){return this.$$.ctx[46]}get isActive(){return this.$$.ctx[1]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[2]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[4]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[5]}set locale(e){this.$$set({locale:e}),pa()}get markupEditorToolbar(){return this.$$.ctx[6]}set markupEditorToolbar(e){this.$$set({markupEditorToolbar:e}),pa()}get markupEditorToolStyles(){return this.$$.ctx[7]}set markupEditorToolStyles(e){this.$$set({markupEditorToolStyles:e}),pa()}get markupEditorToolRetainStyles(){return this.$$.ctx[8]}set markupEditorToolRetainStyles(e){this.$$set({markupEditorToolRetainStyles:e}),pa()}get markupEditorShapeStyleControls(){return this.$$.ctx[9]}set markupEditorShapeStyleControls(e){this.$$set({markupEditorShapeStyleControls:e}),pa()}get markupEditorToolSelectRadius(){return this.$$.ctx[10]}set markupEditorToolSelectRadius(e){this.$$set({markupEditorToolSelectRadius:e}),pa()}get markupEditorTextInputMode(){return this.$$.ctx[11]}set markupEditorTextInputMode(e){this.$$set({markupEditorTextInputMode:e}),pa()}get markupEditorToolShareStyles(){return this.$$.ctx[12]}set markupEditorToolShareStyles(e){this.$$set({markupEditorToolShareStyles:e}),pa()}get willRenderShapePresetToolbar(){return this.$$.ctx[13]}set willRenderShapePresetToolbar(e){this.$$set({willRenderShapePresetToolbar:e}),pa()}get markupEditorGridSize(){return this.$$.ctx[14]}set markupEditorGridSize(e){this.$$set({markupEditorGridSize:e}),pa()}get markupEditorSnapThreshold(){return this.$$.ctx[15]}set markupEditorSnapThreshold(e){this.$$set({markupEditorSnapThreshold:e}),pa()}get markupEditorSnapToContext(){return this.$$.ctx[16]}set markupEditorSnapToContext(e){this.$$set({markupEditorSnapToContext:e}),pa()}get decorateGridSize(){return this.$$.ctx[17]}set decorateGridSize(e){this.$$set({decorateGridSize:e}),pa()}get decorateSnapToContext(){return this.$$.ctx[18]}set decorateSnapToContext(e){this.$$set({decorateSnapToContext:e}),pa()}get decorateTools(){return this.$$.ctx[19]}set decorateTools(e){this.$$set({decorateTools:e}),pa()}get decorateToolShapes(){return this.$$.ctx[20]}set decorateToolShapes(e){this.$$set({decorateToolShapes:e}),pa()}get decorateShapeControls(){return this.$$.ctx[21]}set decorateShapeControls(e){this.$$set({decorateShapeControls:e}),pa()}get decorateActiveTool(){return this.$$.ctx[0]}set decorateActiveTool(e){this.$$set({decorateActiveTool:e}),pa()}get decorateEnableButtonFlipVertical(){return this.$$.ctx[22]}set decorateEnableButtonFlipVertical(e){this.$$set({decorateEnableButtonFlipVertical:e}),pa()}get decorateEnableSelectImagePreset(){return this.$$.ctx[23]}set decorateEnableSelectImagePreset(e){this.$$set({decorateEnableSelectImagePreset:e}),pa()}get decorateEnableDropImagePreset(){return this.$$.ctx[24]}set decorateEnableDropImagePreset(e){this.$$set({decorateEnableDropImagePreset:e}),pa()}get decoratePresets(){return this.$$.ctx[25]}set decoratePresets(e){this.$$set({decoratePresets:e}),pa()}get decorateWillRenderShapePresetToolbar(){return this.$$.ctx[26]}set decorateWillRenderShapePresetToolbar(e){this.$$set({decorateWillRenderShapePresetToolbar:e}),pa()}get enableSelectToolToAddShape(){return this.$$.ctx[27]}set enableSelectToolToAddShape(e){this.$$set({enableSelectToolToAddShape:e}),pa()}get enableTapToAddText(){return this.$$.ctx[28]}set enableTapToAddText(e){this.$$set({enableTapToAddText:e}),pa()}get enableViewTool(){return this.$$.ctx[29]}set enableViewTool(e){this.$$set({enableViewTool:e}),pa()}get enableMoveTool(){return this.$$.ctx[30]}set enableMoveTool(e){this.$$set({enableMoveTool:e}),pa()}get enableAutoSelectMoveTool(){return this.$$.ctx[31]}set enableAutoSelectMoveTool(e){this.$$set({enableAutoSelectMoveTool:e}),pa()}get willRenderShapeControls(){return this.$$.ctx[32]}set willRenderShapeControls(e){this.$$set({willRenderShapeControls:e}),pa()}get willRenderShapeTextControls(){return this.$$.ctx[33]}set willRenderShapeTextControls(e){this.$$set({willRenderShapeTextControls:e}),pa()}get beforeAddShape(){return this.$$.ctx[34]}set beforeAddShape(e){this.$$set({beforeAddShape:e}),pa()}get beforeRemoveShape(){return this.$$.ctx[35]}set beforeRemoveShape(e){this.$$set({beforeRemoveShape:e}),pa()}get beforeDeselectShape(){return this.$$.ctx[36]}set beforeDeselectShape(e){this.$$set({beforeDeselectShape:e}),pa()}get beforeSelectShape(){return this.$$.ctx[37]}set beforeSelectShape(e){this.$$set({beforeSelectShape:e}),pa()}get beforeUpdateShape(){return this.$$.ctx[38]}set beforeUpdateShape(e){this.$$set({beforeUpdateShape:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[39]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}}]};function Jb(e){let t,o;return t=new Nb({props:{stores:e[3],locale:e[4],isActive:e[0],isActiveFraction:e[1],isVisible:e[2],mapScreenPointToImagePoint:e[25],mapImagePointToScreenPoint:e[24],utilKey:"sticker",shapePresets:e[5],shapes:e[6]?e[34]:e[35],toolActive:"preset",imageFlipX:!!e[6]&&e[23],imageFlipY:!!e[6]&&e[22],imageRotation:e[6]?e[30]:0,parentRect:e[6]?e[36]:e[32],snapThreshold:e[28],gridSize:e[27],enableSnapToContext:e[26],enablePresetDropImage:e[7],enablePresetSelectImage:e[29],enableButtonFlipVertical:e[10]||e[8],toolSelectRadius:e[14],willStartInteraction:e[21],willRenderPresetToolbar:e[11]||e[9]||e[15],hooks:{willRenderShapeControls:e[12],willRenderShapeTextControls:e[13],beforeAddShape:e[16],beforeRemoveShape:e[17],beforeDeselectShape:e[18],beforeSelectShape:e[19],beforeUpdateShape:e[20]}}}),t.$on("measure",e[59]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8&o[0]&&(i.stores=e[3]),16&o[0]&&(i.locale=e[4]),1&o[0]&&(i.isActive=e[0]),2&o[0]&&(i.isActiveFraction=e[1]),4&o[0]&&(i.isVisible=e[2]),33554432&o[0]&&(i.mapScreenPointToImagePoint=e[25]),16777216&o[0]&&(i.mapImagePointToScreenPoint=e[24]),32&o[0]&&(i.shapePresets=e[5]),64&o[0]&&(i.shapes=e[6]?e[34]:e[35]),8388672&o[0]&&(i.imageFlipX=!!e[6]&&e[23]),4194368&o[0]&&(i.imageFlipY=!!e[6]&&e[22]),1073741888&o[0]&&(i.imageRotation=e[6]?e[30]:0),64&o[0]&&(i.parentRect=e[6]?e[36]:e[32]),268435456&o[0]&&(i.snapThreshold=e[28]),134217728&o[0]&&(i.gridSize=e[27]),67108864&o[0]&&(i.enableSnapToContext=e[26]),128&o[0]&&(i.enablePresetDropImage=e[7]),536870912&o[0]&&(i.enablePresetSelectImage=e[29]),1280&o[0]&&(i.enableButtonFlipVertical=e[10]||e[8]),16384&o[0]&&(i.toolSelectRadius=e[14]),2097152&o[0]&&(i.willStartInteraction=e[21]),35328&o[0]&&(i.willRenderPresetToolbar=e[11]||e[9]||e[15]),2043904&o[0]&&(i.hooks={willRenderShapeControls:e[12],willRenderShapeTextControls:e[13],beforeAddShape:e[16],beforeRemoveShape:e[17],beforeDeselectShape:e[18],beforeSelectShape:e[19],beforeUpdateShape:e[20]}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Qb(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f;let{isActive:y}=t,{isActiveFraction:b}=t,{isVisible:x}=t,{stores:v}=t,{locale:w={}}=t,{stickers:S=[]}=t,{stickerForceEnable:k=!1}=t,{stickerStickToImage:C=!1}=t,{stickerEnableSelectImagePreset:T=!0}=t,{stickerEnableDropImagePreset:M=!0}=t,{stickerEnableButtonFlipVertical:R=!1}=t,{stickerWillRenderShapePresetToolbar:P}=t,{stickerEnableSelectImage:E=!0}=t,{stickersEnableButtonFlipVertical:I=!1}=t,{stickersWillRenderShapePresetToolbar:A}=t,{markupEditorGridSize:L=0}=t,{markupEditorSnapThreshold:z=0}=t,{markupEditorSnapToContext:F=!1}=t,{annotateGridSize:D}=t,{annotateSnapToContext:O}=t,{decorateGridSize:B}=t,{decorateSnapToContext:W}=t,{willRenderShapeControls:_}=t,{willRenderShapeTextControls:V}=t,{markupEditorToolSelectRadius:N}=t,{willRenderShapePresetToolbar:H}=t,{beforeAddShape:j}=t,{beforeRemoveShape:U}=t,{beforeDeselectShape:G}=t,{beforeSelectShape:Z}=t,{beforeUpdateShape:X}=t,{markupEditorWillStartInteraction:Y}=t;const{rootRect:q,imageCropRect:K,imageSelectionRectPresentation:J,imageAnnotation:Q,imageDecoration:ee,imageSize:te,imageTransforms:oe,imageTransformsInterpolated:ie,imageRotation:re,imageFlipX:ne,imageFlipY:ae}=v;return on(e,q,(e=>o(58,$=e))),on(e,J,(e=>o(54,d=e))),on(e,te,(e=>o(57,g=e))),on(e,oe,(e=>o(56,m=e))),on(e,ie,(e=>o(55,p=e))),on(e,re,(e=>o(30,f=e))),on(e,ne,(e=>o(23,h=e))),on(e,ae,(e=>o(22,u=e))),e.$$set=e=>{"isActive"in e&&o(0,y=e.isActive),"isActiveFraction"in e&&o(1,b=e.isActiveFraction),"isVisible"in e&&o(2,x=e.isVisible),"stores"in e&&o(3,v=e.stores),"locale"in e&&o(4,w=e.locale),"stickers"in e&&o(5,S=e.stickers),"stickerForceEnable"in e&&o(43,k=e.stickerForceEnable),"stickerStickToImage"in e&&o(6,C=e.stickerStickToImage),"stickerEnableSelectImagePreset"in e&&o(44,T=e.stickerEnableSelectImagePreset),"stickerEnableDropImagePreset"in e&&o(7,M=e.stickerEnableDropImagePreset),"stickerEnableButtonFlipVertical"in e&&o(8,R=e.stickerEnableButtonFlipVertical),"stickerWillRenderShapePresetToolbar"in e&&o(9,P=e.stickerWillRenderShapePresetToolbar),"stickerEnableSelectImage"in e&&o(45,E=e.stickerEnableSelectImage),"stickersEnableButtonFlipVertical"in e&&o(10,I=e.stickersEnableButtonFlipVertical),"stickersWillRenderShapePresetToolbar"in e&&o(11,A=e.stickersWillRenderShapePresetToolbar),"markupEditorGridSize"in e&&o(46,L=e.markupEditorGridSize),"markupEditorSnapThreshold"in e&&o(47,z=e.markupEditorSnapThreshold),"markupEditorSnapToContext"in e&&o(48,F=e.markupEditorSnapToContext),"annotateGridSize"in e&&o(49,D=e.annotateGridSize),"annotateSnapToContext"in e&&o(50,O=e.annotateSnapToContext),"decorateGridSize"in e&&o(51,B=e.decorateGridSize),"decorateSnapToContext"in e&&o(52,W=e.decorateSnapToContext),"willRenderShapeControls"in e&&o(12,_=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(13,V=e.willRenderShapeTextControls),"markupEditorToolSelectRadius"in e&&o(14,N=e.markupEditorToolSelectRadius),"willRenderShapePresetToolbar"in e&&o(15,H=e.willRenderShapePresetToolbar),"beforeAddShape"in e&&o(16,j=e.beforeAddShape),"beforeRemoveShape"in e&&o(17,U=e.beforeRemoveShape),"beforeDeselectShape"in e&&o(18,G=e.beforeDeselectShape),"beforeSelectShape"in e&&o(19,Z=e.beforeSelectShape),"beforeUpdateShape"in e&&o(20,X=e.beforeUpdateShape),"markupEditorWillStartInteraction"in e&&o(21,Y=e.markupEditorWillStartInteraction)},e.$$.update=()=>{16777216&e.$$.dirty[1]&&o(53,i=p?p.scale:1),24576&e.$$.dirty[1]&&o(29,r=!1!==T&&E),65536&e.$$.dirty[1]&&o(28,n=z),64&e.$$.dirty[0]|1343488&e.$$.dirty[1]&&o(27,a=C?Ao(D)?D:L:Ao(B)?B:L),64&e.$$.dirty[0]|2752512&e.$$.dirty[1]&&o(26,s=C?Ub(O)?O:F:Ub(W)?W:F),12582976&e.$$.dirty[0]|264241152&e.$$.dirty[1]&&o(25,l=C?e=>jb(e,$,g,p.origin,p.translation,m.rotation.z,p.scale,h,u):e=>{const t=pe(e);return t.x-=d.x,t.y-=d.y,t.x/=i,t.y/=i,t}),12582976&e.$$.dirty[0]|264241152&e.$$.dirty[1]&&o(24,c=C?e=>Hb(e,$,g,p.origin,p.translation,m.rotation.z,p.scale,h,u):e=>{const t=pe(e);return t.x*=i,t.y*=i,t.x+=d.x,t.y+=d.y,t})},[y,b,x,v,w,S,C,M,R,P,I,A,_,V,N,H,j,U,G,Z,X,Y,u,h,c,l,s,a,n,r,f,q,K,J,Q,ee,te,oe,ie,re,ne,ae,"sticker",k,T,E,L,z,F,D,O,B,W,i,d,p,m,g,$,function(t){Qn.call(this,e,t)}]}var ex={util:["sticker",class extends Fa{constructor(e){super(),za(this,e,Qb,Jb,Qr,{name:42,isActive:0,isActiveFraction:1,isVisible:2,stores:3,locale:4,stickers:5,stickerForceEnable:43,stickerStickToImage:6,stickerEnableSelectImagePreset:44,stickerEnableDropImagePreset:7,stickerEnableButtonFlipVertical:8,stickerWillRenderShapePresetToolbar:9,stickerEnableSelectImage:45,stickersEnableButtonFlipVertical:10,stickersWillRenderShapePresetToolbar:11,markupEditorGridSize:46,markupEditorSnapThreshold:47,markupEditorSnapToContext:48,annotateGridSize:49,annotateSnapToContext:50,decorateGridSize:51,decorateSnapToContext:52,willRenderShapeControls:12,willRenderShapeTextControls:13,markupEditorToolSelectRadius:14,willRenderShapePresetToolbar:15,beforeAddShape:16,beforeRemoveShape:17,beforeDeselectShape:18,beforeSelectShape:19,beforeUpdateShape:20,markupEditorWillStartInteraction:21},null,[-1,-1])}get name(){return this.$$.ctx[42]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[1]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[2]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[3]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),pa()}get stickers(){return this.$$.ctx[5]}set stickers(e){this.$$set({stickers:e}),pa()}get stickerForceEnable(){return this.$$.ctx[43]}set stickerForceEnable(e){this.$$set({stickerForceEnable:e}),pa()}get stickerStickToImage(){return this.$$.ctx[6]}set stickerStickToImage(e){this.$$set({stickerStickToImage:e}),pa()}get stickerEnableSelectImagePreset(){return this.$$.ctx[44]}set stickerEnableSelectImagePreset(e){this.$$set({stickerEnableSelectImagePreset:e}),pa()}get stickerEnableDropImagePreset(){return this.$$.ctx[7]}set stickerEnableDropImagePreset(e){this.$$set({stickerEnableDropImagePreset:e}),pa()}get stickerEnableButtonFlipVertical(){return this.$$.ctx[8]}set stickerEnableButtonFlipVertical(e){this.$$set({stickerEnableButtonFlipVertical:e}),pa()}get stickerWillRenderShapePresetToolbar(){return this.$$.ctx[9]}set stickerWillRenderShapePresetToolbar(e){this.$$set({stickerWillRenderShapePresetToolbar:e}),pa()}get stickerEnableSelectImage(){return this.$$.ctx[45]}set stickerEnableSelectImage(e){this.$$set({stickerEnableSelectImage:e}),pa()}get stickersEnableButtonFlipVertical(){return this.$$.ctx[10]}set stickersEnableButtonFlipVertical(e){this.$$set({stickersEnableButtonFlipVertical:e}),pa()}get stickersWillRenderShapePresetToolbar(){return this.$$.ctx[11]}set stickersWillRenderShapePresetToolbar(e){this.$$set({stickersWillRenderShapePresetToolbar:e}),pa()}get markupEditorGridSize(){return this.$$.ctx[46]}set markupEditorGridSize(e){this.$$set({markupEditorGridSize:e}),pa()}get markupEditorSnapThreshold(){return this.$$.ctx[47]}set markupEditorSnapThreshold(e){this.$$set({markupEditorSnapThreshold:e}),pa()}get markupEditorSnapToContext(){return this.$$.ctx[48]}set markupEditorSnapToContext(e){this.$$set({markupEditorSnapToContext:e}),pa()}get annotateGridSize(){return this.$$.ctx[49]}set annotateGridSize(e){this.$$set({annotateGridSize:e}),pa()}get annotateSnapToContext(){return this.$$.ctx[50]}set annotateSnapToContext(e){this.$$set({annotateSnapToContext:e}),pa()}get decorateGridSize(){return this.$$.ctx[51]}set decorateGridSize(e){this.$$set({decorateGridSize:e}),pa()}get decorateSnapToContext(){return this.$$.ctx[52]}set decorateSnapToContext(e){this.$$set({decorateSnapToContext:e}),pa()}get willRenderShapeControls(){return this.$$.ctx[12]}set willRenderShapeControls(e){this.$$set({willRenderShapeControls:e}),pa()}get willRenderShapeTextControls(){return this.$$.ctx[13]}set willRenderShapeTextControls(e){this.$$set({willRenderShapeTextControls:e}),pa()}get markupEditorToolSelectRadius(){return this.$$.ctx[14]}set markupEditorToolSelectRadius(e){this.$$set({markupEditorToolSelectRadius:e}),pa()}get willRenderShapePresetToolbar(){return this.$$.ctx[15]}set willRenderShapePresetToolbar(e){this.$$set({willRenderShapePresetToolbar:e}),pa()}get beforeAddShape(){return this.$$.ctx[16]}set beforeAddShape(e){this.$$set({beforeAddShape:e}),pa()}get beforeRemoveShape(){return this.$$.ctx[17]}set beforeRemoveShape(e){this.$$set({beforeRemoveShape:e}),pa()}get beforeDeselectShape(){return this.$$.ctx[18]}set beforeDeselectShape(e){this.$$set({beforeDeselectShape:e}),pa()}get beforeSelectShape(){return this.$$.ctx[19]}set beforeSelectShape(e){this.$$set({beforeSelectShape:e}),pa()}get beforeUpdateShape(){return this.$$.ctx[20]}set beforeUpdateShape(e){this.$$set({beforeUpdateShape:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[21]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}},({stickers:e,stickerEnableSelectImage:t,stickerEnableSelectImagePreset:o,stickerEnableDropImagePreset:i,stickerForceEnable:r})=>e&&e.length||t||o||i||r]};function tx(e){let t,o,i,r,n,a=(e[14](e[34].value)||"")+"",s=(P(e[34].label)?e[34].label(e[1]):e[34].label)+"";return{c(){t=kn("div"),o=new Bn(!1),i=Mn(),r=kn("span"),n=Tn(s),o.a=i,An(t,"slot","option")},m(e,s){wn(e,t,s),o.m(a,t),bn(t,i),bn(t,r),bn(r,n)},p(e,t){8&t[1]&&a!==(a=(e[14](e[34].value)||"")+"")&&o.p(a),2&t[0]|8&t[1]&&s!==(s=(P(e[34].label)?e[34].label(e[1]):e[34].label)+"")&&Fn(n,s)},d(e){e&&Sn(t)}}}function ox(e){let t,o;return t=new Wu({props:{locale:e[1],class:"PinturaControlList",layout:"row",options:e[2],selectedIndex:e[6],onchange:e[12],$$slots:{option:[tx,({option:e})=>({34:e}),({option:e})=>[0,e?8:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};2&o[0]&&(i.locale=e[1]),4&o[0]&&(i.options=e[2]),64&o[0]&&(i.selectedIndex=e[6]),2&o[0]|24&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function ix(e){let t,o,i,r,n;return o=new Jy({props:{locale:e[1],class:"PinturaControlPanels",shape:e[4],onchange:e[13],controls:e[3],scrollElasticity:e[7]}}),r=new vd({props:{elasticity:e[10],$$slots:{default:[ox]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),i=Mn(),Ia(r.$$.fragment),An(t,"slot","footer"),An(t,"style",e[5])},m(e,a){wn(e,t,a),Aa(o,t,null),bn(t,i),Aa(r,t,null),n=!0},p(e,i){const a={};2&i[0]&&(a.locale=e[1]),16&i[0]&&(a.shape=e[4]),8&i[0]&&(a.controls=e[3]),128&i[0]&&(a.scrollElasticity=e[7]),o.$set(a);const s={};70&i[0]|16&i[1]&&(s.$$scope={dirty:i,ctx:e}),r.$set(s),(!n||32&i[0])&&An(t,"style",e[5])},i(e){n||(xa(o.$$.fragment,e),xa(r.$$.fragment,e),n=!0)},o(e){va(o.$$.fragment,e),va(r.$$.fragment,e),n=!1},d(e){e&&Sn(t),La(o),La(r)}}}function rx(e){let t,o;return t=new J$({props:{$$slots:{footer:[ix]},$$scope:{ctx:e}}}),t.$on("measure",e[23]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};254&o[0]|16&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function nx(e,t,o){let i,r,n,a,s,l,c,d,u=Gr,h=()=>(u(),u=en(p,(e=>o(20,s=e))),p);e.$$.on_destroy.push((()=>u()));let{isActive:p}=t;h();let{stores:m}=t,{locale:g={}}=t,{frameStyles:$={}}=t,{frameOptions:f=[]}=t,{markupEditorShapeStyleControls:y}=t;const b=Jn("elasticityMultiplier");on(e,b,(e=>o(22,d=e)));const{history:x,animation:v,scrollElasticity:w,imageFrame:S,allowPan:k,allowZoom:C,allowZoomControls:T,allowPlayPause:M}=m;on(e,v,(e=>o(21,l=e))),on(e,S,(e=>o(4,c=e)));let R={};let P;const E=ec(l?20:0);return on(e,E,(e=>o(19,a=e))),e.$$set=e=>{"isActive"in e&&h(o(0,p=e.isActive)),"stores"in e&&o(17,m=e.stores),"locale"in e&&o(1,g=e.locale),"frameStyles"in e&&o(18,$=e.frameStyles),"frameOptions"in e&&o(2,f=e.frameOptions),"markupEditorShapeStyleControls"in e&&o(3,y=e.markupEditorShapeStyleControls)},e.$$.update=()=>{1048576&e.$$.dirty[0]&&k.set(s),1048576&e.$$.dirty[0]&&C.set(s),1048576&e.$$.dirty[0]&&T.set(s),1048576&e.$$.dirty[0]&&s&&M.set(!0),4194304&e.$$.dirty[0]&&o(7,i=d*w),20&e.$$.dirty[0]&&o(6,r=c?f.findIndex((([e])=>e===c.id)):0),3145728&e.$$.dirty[0]&&l&&E.set(s?0:20),524288&e.$$.dirty[0]&&o(5,n=a?`transform: translateY(${a}px)`:void 0)},[p,g,f,y,c,n,r,i,b,v,w,S,({value:e})=>{const t=$[e];if(!t||!t.shape)return S.set(void 0),void x.write();const{shape:o}=t,i={id:e,...fi(o),...Object.keys(R).reduce(((e,t)=>o[t]?(e[t]=R[t],e):e),{})};S.set(i),x.write()},function(e){zo(e,"frameColor")&&(R.frameColor=e.frameColor),c&&(fr(c,e),S.set(c),clearTimeout(P),P=setTimeout((()=>{x.write()}),200))},e=>{const t=$[e];var o;if(t&&t.thumb)return o=t.thumb,/div/i.test(o)||Qy(o)?o:/rect|path|circle|line|/i.test(o)?``:``},E,"frame",m,$,a,s,l,d,function(t){Qn.call(this,e,t)}]}var ax={util:["frame",class extends Fa{constructor(e){super(),za(this,e,nx,rx,Qr,{name:16,isActive:0,stores:17,locale:1,frameStyles:18,frameOptions:2,markupEditorShapeStyleControls:3},null,[-1,-1])}get name(){return this.$$.ctx[16]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get stores(){return this.$$.ctx[17]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[1]}set locale(e){this.$$set({locale:e}),pa()}get frameStyles(){return this.$$.ctx[18]}set frameStyles(e){this.$$set({frameStyles:e}),pa()}get frameOptions(){return this.$$.ctx[2]}set frameOptions(e){this.$$set({frameOptions:e}),pa()}get markupEditorShapeStyleControls(){return this.$$.ctx[3]}set markupEditorShapeStyleControls(e){this.$$set({markupEditorShapeStyleControls:e}),pa()}},({src:e})=>e&&!kp(e)]};function sx(e){let t,o,i,r,n,a,s,l;return{c(){t=kn("div"),o=kn("input"),r=Mn(),n=kn("label"),a=Tn(e[1]),An(o,"id",e[0]),An(o,"type","number"),An(o,"min","1"),An(o,"inputmode","numeric"),An(o,"pattern","[0-9]*"),An(o,"data-state",e[3]),An(o,"autocomplete","off"),An(o,"placeholder",e[4]),o.value=i=void 0===e[5]?"":e[7](e[5]+""),An(n,"for",e[0]),An(n,"title",e[2]),An(n,"aria-label",e[2]),An(t,"class","PinturaInputDimension")},m(i,c){wn(i,t,c),bn(t,o),bn(t,r),bn(t,n),bn(n,a),s||(l=Pn(o,"input",e[8]),s=!0)},p(e,[t]){1&t&&An(o,"id",e[0]),8&t&&An(o,"data-state",e[3]),16&t&&An(o,"placeholder",e[4]),160&t&&i!==(i=void 0===e[5]?"":e[7](e[5]+""))&&o.value!==i&&(o.value=i),2&t&&Fn(a,e[1]),1&t&&An(n,"for",e[0]),4&t&&An(n,"title",e[2]),4&t&&An(n,"aria-label",e[2])},i:Gr,o:Gr,d(e){e&&Sn(t),s=!1,l()}}}function lx(e,t,o){let{id:i}=t,{label:r}=t,{title:n}=t,{state:a}=t,{placeholder:s}=t,{value:l}=t,{onchange:c}=t,{format:d=(e=>e.replace(/\D/g,""))}=t;return e.$$set=e=>{"id"in e&&o(0,i=e.id),"label"in e&&o(1,r=e.label),"title"in e&&o(2,n=e.title),"state"in e&&o(3,a=e.state),"placeholder"in e&&o(4,s=e.placeholder),"value"in e&&o(5,l=e.value),"onchange"in e&&o(6,c=e.onchange),"format"in e&&o(7,d=e.format)},[i,r,n,a,s,l,c,d,e=>c(d(e.currentTarget.value))]}class cx extends Fa{constructor(e){super(),za(this,e,lx,sx,Qr,{id:0,label:1,title:2,state:3,placeholder:4,value:5,onchange:6,format:7})}}function dx(e){let t;return{c(){t=Cn("g")},m(o,i){wn(o,t,i),t.innerHTML=e[2]},p(e,o){4&o&&(t.innerHTML=e[2])},d(e){e&&Sn(t)}}}function ux(e){let t,o,i,r,n,a,s,l;return n=new td({props:{$$slots:{default:[dx]},$$scope:{ctx:e}}}),{c(){t=kn("div"),o=kn("input"),i=Mn(),r=kn("label"),Ia(n.$$.fragment),An(o,"id",e[0]),An(o,"class","implicit"),An(o,"type","checkbox"),o.checked=e[1],An(r,"for",e[0]),An(r,"title",e[3])},m(c,d){wn(c,t,d),bn(t,o),bn(t,i),bn(t,r),Aa(n,r,null),a=!0,s||(l=Pn(o,"change",e[5]),s=!0)},p(e,[t]){(!a||1&t)&&An(o,"id",e[0]),(!a||2&t)&&(o.checked=e[1]);const i={};68&t&&(i.$$scope={dirty:t,ctx:e}),n.$set(i),(!a||1&t)&&An(r,"for",e[0]),(!a||8&t)&&An(r,"title",e[3])},i(e){a||(xa(n.$$.fragment,e),a=!0)},o(e){va(n.$$.fragment,e),a=!1},d(e){e&&Sn(t),La(n),s=!1,l()}}}function hx(e,t,o){let{id:i}=t,{locked:r}=t,{icon:n}=t,{title:a}=t,{onchange:s}=t;return e.$$set=e=>{"id"in e&&o(0,i=e.id),"locked"in e&&o(1,r=e.locked),"icon"in e&&o(2,n=e.icon),"title"in e&&o(3,a=e.title),"onchange"in e&&o(4,s=e.onchange)},[i,r,n,a,s,e=>s(e.currentTarget.checked)]}class px extends Fa{constructor(e){super(),za(this,e,hx,ux,Qr,{id:0,locked:1,icon:2,title:3,onchange:4})}}function mx(e){let t;return{c(){t=Tn("Save")},m(e,o){wn(e,t,o)},d(e){e&&Sn(t)}}}function gx(e){let t,o,i,r,n,a,s,l,c,d,u,h,p,m=e[1].resizeLabelFormCaption+"";return l=new up({props:{items:e[4]}}),d=new cd({props:{type:"submit",class:"implicit",$$slots:{default:[mx]},$$scope:{ctx:e}}}),{c(){t=kn("form"),o=kn("div"),i=kn("fieldset"),r=kn("legend"),n=Tn(m),a=Mn(),s=kn("div"),Ia(l.$$.fragment),c=Mn(),Ia(d.$$.fragment),An(r,"class","implicit"),An(s,"class","PinturaFieldsetInner"),An(o,"class","PinturaFormInner"),An(t,"slot","footer"),An(t,"style",e[3])},m(m,g){wn(m,t,g),bn(t,o),bn(o,i),bn(i,r),bn(r,n),bn(i,a),bn(i,s),Aa(l,s,null),e[65](s),bn(o,c),Aa(d,o,null),u=!0,h||(p=[Pn(s,"focusin",e[15]),Pn(s,"focusout",e[16]),Pn(t,"submit",En(e[17]))],h=!0)},p(e,o){(!u||2&o[0])&&m!==(m=e[1].resizeLabelFormCaption+"")&&Fn(n,m);const i={};16&o[0]&&(i.items=e[4]),l.$set(i);const r={};16&o[3]&&(r.$$scope={dirty:o,ctx:e}),d.$set(r),(!u||8&o[0])&&An(t,"style",e[3])},i(e){u||(xa(l.$$.fragment,e),xa(d.$$.fragment,e),u=!0)},o(e){va(l.$$.fragment,e),va(d.$$.fragment,e),u=!1},d(o){o&&Sn(t),La(l),e[65](null),La(d),h=!1,Kr(p)}}}function $x(e){let t,o;return t=new J$({props:{$$slots:{footer:[gx]},$$scope:{ctx:e}}}),t.$on("measure",e[66]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};30&o[0]|16&o[3]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function fx(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,P,E,I,A,z,F=Gr,D=()=>(F(),F=en(B,(e=>o(49,p=e))),B);e.$$.on_destroy.push((()=>F()));const O=(e,t=0,o=9999)=>{if(R(e)&&!(e=e.replace(/\D/g,"")).length)return;const i=Math.round(e);return Number.isNaN(i)?void 0:ns(i,t,o)};let{isActive:B}=t;D();let{stores:W}=t,{locale:_={}}=t,{resizeMinSize:V=We(1,1)}=t,{resizeMaxSize:N=We(9999,9999)}=t,{resizeAspectRatioLocked:H=!1}=t,{resizeEnableButtonLockAspectRatio:j=!0}=t,{resizeSizePresetOptions:Z}=t,{resizeWidthPresetOptions:X}=t,{resizeHeightPresetOptions:Y}=t,{resizeWillRenderFooter:q=G}=t;const K=ec(0,{stiffness:.15,damping:.3});on(e,K,(e=>o(54,y=e)));const{animation:J,imageSize:Q,imageCropRect:ee,imageCropRectAspectRatio:te,imageCropAspectRatio:oe,imageOutputSize:ie,imageSelectionZoom:re,imageSelectionPan:ne,history:ae,env:se,allowPan:le,allowZoom:ce,allowZoomControls:ue,allowPlayPause:he}=W;on(e,J,(e=>o(50,m=e))),on(e,Q,(e=>o(73,I=e))),on(e,ee,(e=>o(52,$=e))),on(e,te,(e=>o(53,f=e))),on(e,oe,(e=>o(72,T=e))),on(e,ie,(e=>o(61,C=e))),on(e,re,(e=>o(74,A=e))),on(e,ne,(e=>o(75,z=e))),on(e,se,(e=>o(51,g=e)));const pe=L();let me,ge,$e,fe,ye,be,xe=de();const ve=(e,t,o,i,r)=>null!=e&&o!==t?e>=i[t]&&e<=r[t]?"valid":"invalid":"undetermined",we=(e,t,o)=>Math.round(null!=e?e/t:o.height),Se=()=>{H&&ge&&$e&&("width"===fe?o(39,$e=Math.round(ge/f)):"height"===fe?o(38,ge=Math.round($e*f)):("width"===ye?o(39,$e=Math.round(ge/f)):"height"===ye&&o(38,ge=Math.round($e*f)),ke()))},ke=e=>{let t=O(ge),i=O($e),r=t,n=i,a=r&&n,s=e||f;if(!r&&!n)return;r&&!n?n=Math.round(r/s):n&&!r&&(r=Math.round(n*s)),s=e||a?U(r,n):f;let l=We(r,n);je(N,l)||(l=xt(N,s)),je(l,V)||(l=bt(V,s)),o(38,ge=null!=t?Math.round(l.width):void 0),o(39,$e=null!=i?Math.round(l.height):void 0)},Ce=()=>{ke();const{width:e,height:t}=C||{};e===ge&&t===$e||(ge||$e?(ge&&$e&&un(oe,T=ge/$e,T),un(ie,C=We(ge,$e),C)):(un(oe,T=I.width/I.height,T),un(oe,T=void 0,T),un(ie,C=void 0,C)),ae.write())},Te=ie.subscribe((e=>{if(!e)return o(38,ge=void 0),void o(39,$e=void 0);o(38,ge=e.width),o(39,$e=e.height),ke()})),Me=oe.subscribe((e=>{(ge||$e)&&e&&(ge&&$e&&U(ge,$e)!==e?(o(39,$e=ge/e),ke(e)):ke())})),Re=e=>R(e[0])?(e[1]=e[1].map(Re),e):Ao(e)?[e,""+e]:e,Pe=e=>{if(R(e[0]))return e[1]=e[1].map(Pe),e;let[t,o]=e;if(Ao(t)&&Ao(o)){const[e,i]=[t,o];o=`${e} × ${i}`,t=[e,i]}return[t,o]},Ee=Ba();on(e,Ee,(e=>o(60,k=e)));const Ie=Ba();on(e,Ie,(e=>o(64,E=e)));const Ae=Ba();on(e,Ae,(e=>o(58,w=e)));const Le=Ba();on(e,Le,(e=>o(63,P=e)));const ze=Ba();on(e,ze,(e=>o(56,x=e)));const Fe=Ba();on(e,Fe,(e=>o(62,M=e)));const De=Wa([ie,Ie],(([e,t],o)=>{if(!t)return o(-1);const i=t.findIndex((([t])=>{if(!t&&!e)return!0;if(!t)return!1;const[o,i]=t;return e.width===o&&e.height===i}));o(i<0?0:i)}));on(e,De,(e=>o(59,S=e)));const Be=Wa([ie,Le],(([e,t],o)=>{if(!t)return o(-1);const i=t.findIndex((([t])=>!t&&!e||!!t&&e.width===t));o(i<0?0:i)}));on(e,Be,(e=>o(57,v=e)));const _e=Wa([ie,Fe],(([e,t],o)=>{if(!t)return o(-1);const i=t.findIndex((([t])=>!t&&!e||!!t&&e.height===t));o(i<0?0:i)}));on(e,_e,(e=>o(55,b=e)));let Ve=void 0,Ne=void 0;const He=Jn("redrawTrigger"),Ue=ec(m?20:0);return on(e,Ue,(e=>o(48,h=e))),Yn((()=>{Te(),Me()})),e.$$set=e=>{"isActive"in e&&D(o(0,B=e.isActive)),"stores"in e&&o(30,W=e.stores),"locale"in e&&o(1,_=e.locale),"resizeMinSize"in e&&o(31,V=e.resizeMinSize),"resizeMaxSize"in e&&o(32,N=e.resizeMaxSize),"resizeAspectRatioLocked"in e&&o(28,H=e.resizeAspectRatioLocked),"resizeEnableButtonLockAspectRatio"in e&&o(33,j=e.resizeEnableButtonLockAspectRatio),"resizeSizePresetOptions"in e&&o(34,Z=e.resizeSizePresetOptions),"resizeWidthPresetOptions"in e&&o(35,X=e.resizeWidthPresetOptions),"resizeHeightPresetOptions"in e&&o(36,Y=e.resizeHeightPresetOptions),"resizeWillRenderFooter"in e&&o(37,q=e.resizeWillRenderFooter)},e.$$.update=()=>{var t;262144&e.$$.dirty[1]&&le.set(!p),262144&e.$$.dirty[1]&&ce.set(!p),262144&e.$$.dirty[1]&&ue.set(!p),262144&e.$$.dirty[1]&&p&&he.set(!0),536870920&e.$$.dirty[1]&&Z&&(un(Ee,k=Z.map(Pe),k),un(Ie,E=cu(k),E)),536870912&e.$$.dirty[1]&&o(47,a=!!k),268435456&e.$$.dirty[1]|4&e.$$.dirty[2]&&o(46,i=S>-1&&E[S][1]),134217744&e.$$.dirty[1]&&X&&(un(Ae,w=X.map(Re),w),un(Le,P=cu(w),P)),134283264&e.$$.dirty[1]&&o(44,s=!a&&w),67108864&e.$$.dirty[1]|2&e.$$.dirty[2]&&o(45,r=v>-1&&P[v][1]),33554464&e.$$.dirty[1]&&Y&&(un(ze,x=Y.map(Re),x),un(Fe,M=cu(x),M)),33619968&e.$$.dirty[1]&&o(43,l=!a&&x),16777216&e.$$.dirty[1]|1&e.$$.dirty[2]&&o(42,n=b>-1&&M[b][1]),77824&e.$$.dirty[1]&&o(41,c=!a&&!s&&!l),268435458&e.$$.dirty[0]|1072824263&e.$$.dirty[1]&&o(4,d=He&&Fp((()=>{return q([a&&["Dropdown","size-presets",{label:i,options:k,onchange:e=>{return(t=e.value)&&!Ve&&(Ve={...$},Ne=T),t?(un(oe,T=U(t[0],t[1]),T),un(ie,C=Oe(t),C)):(un(ee,$=Ve,$),un(oe,T=Ne,T),un(ie,C=void 0,C),Ve=void 0,Ne=void 0),void ae.write();var t},selectedIndex:S}],s&&["Dropdown","width-presets",{label:r,options:w,onchange:e=>{o(38,ge=e.value),Ce()},selectedIndex:v}],s&&l&&["span","times",{class:"PinturaResizeLabel",innerHTML:"×"}],l&&["Dropdown","height-presets",{label:n,options:x,onchange:e=>{o(39,$e=e.value),Ce()},selectedIndex:b}],c&&[cx,"width-input",{id:"width-"+pe,title:_.resizeTitleInputWidth,label:_.resizeLabelInputWidth,placeholder:(e=O($e),t=f,d=$,Math.round(null!=e?e*t:d.width)),value:ge,state:ve(O(ge),"width",fe,V,N),onchange:e=>{o(38,ge=e),Se()}}],c&&j&&[px,"aspect-ratio-lock",{id:"aspect-ratio-lock-"+pe,title:_.resizeTitleButtonMaintainAspectRatio,icon:R(_.resizeIconButtonMaintainAspectRatio)?_.resizeIconButtonMaintainAspectRatio:_.resizeIconButtonMaintainAspectRatio(H,y),locked:H,onchange:e=>{o(28,H=e),Se()}}],c&&[cx,"height-input",{id:"height-"+pe,title:_.resizeTitleInputHeight,label:_.resizeLabelInputHeight,placeholder:we(O(ge),f,$),value:$e,state:ve(O($e),"height",fe,V,N),onchange:e=>{o(39,$e=e),Se()}}]].filter(Boolean),{...g},(()=>He.set({})));var e,t,d})).filter(Boolean)),268435456&e.$$.dirty[0]&&K.set(H?1:0),512&e.$$.dirty[1]&&fe&&(ye=fe),262144&e.$$.dirty[1]&&p&&(xe=z,be=A),1074003968&e.$$.dirty[1]&&(p?(t=C,un(ne,z=de(),z),un(re,A=t&&$?t.width/$.width||t.height/$.height:1,A)):(un(ne,z=xe,z),un(re,A=be,A))),786432&e.$$.dirty[1]&&m&&Ue.set(p?0:20),131072&e.$$.dirty[1]&&o(3,u=h?`transform: translateY(${h}px)`:void 0)},[B,_,me,u,d,K,J,Q,ee,te,oe,ie,re,ne,se,e=>{const t=e.target.id;/width/.test(t)?o(40,fe="width"):/height/.test(t)?o(40,fe="height"):/aspectRatio/i.test(t)?o(40,fe="lock"):o(40,fe=void 0)},e=>{me.contains(e.relatedTarget)||Ce(),o(40,fe=void 0)},Ce,Ee,Ie,Ae,Le,ze,Fe,De,Be,_e,Ue,H,"resize",W,V,N,j,Z,X,Y,q,ge,$e,fe,c,n,l,s,r,i,a,h,p,m,g,$,f,y,b,x,v,w,S,k,C,M,P,E,function(e){ta[e?"unshift":"push"]((()=>{me=e,o(2,me)}))},function(t){Qn.call(this,e,t)}]}var yx={util:["resize",class extends Fa{constructor(e){super(),za(this,e,fx,$x,Qr,{name:29,isActive:0,stores:30,locale:1,resizeMinSize:31,resizeMaxSize:32,resizeAspectRatioLocked:28,resizeEnableButtonLockAspectRatio:33,resizeSizePresetOptions:34,resizeWidthPresetOptions:35,resizeHeightPresetOptions:36,resizeWillRenderFooter:37},null,[-1,-1,-1,-1])}get name(){return this.$$.ctx[29]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get stores(){return this.$$.ctx[30]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[1]}set locale(e){this.$$set({locale:e}),pa()}get resizeMinSize(){return this.$$.ctx[31]}set resizeMinSize(e){this.$$set({resizeMinSize:e}),pa()}get resizeMaxSize(){return this.$$.ctx[32]}set resizeMaxSize(e){this.$$set({resizeMaxSize:e}),pa()}get resizeAspectRatioLocked(){return this.$$.ctx[28]}set resizeAspectRatioLocked(e){this.$$set({resizeAspectRatioLocked:e}),pa()}get resizeEnableButtonLockAspectRatio(){return this.$$.ctx[33]}set resizeEnableButtonLockAspectRatio(e){this.$$set({resizeEnableButtonLockAspectRatio:e}),pa()}get resizeSizePresetOptions(){return this.$$.ctx[34]}set resizeSizePresetOptions(e){this.$$set({resizeSizePresetOptions:e}),pa()}get resizeWidthPresetOptions(){return this.$$.ctx[35]}set resizeWidthPresetOptions(e){this.$$set({resizeWidthPresetOptions:e}),pa()}get resizeHeightPresetOptions(){return this.$$.ctx[36]}set resizeHeightPresetOptions(e){this.$$set({resizeHeightPresetOptions:e}),pa()}get resizeWillRenderFooter(){return this.$$.ctx[37]}set resizeWillRenderFooter(e){this.$$set({resizeWillRenderFooter:e}),pa()}},({src:e})=>e&&!kp(e)]};function bx(e){let t,o;return t=new Nb({props:{stores:e[3],locale:e[4],isActive:e[0],isActiveFraction:e[1],isVisible:e[2],mapScreenPointToImagePoint:e[9],mapImagePointToScreenPoint:e[8],utilKey:"redact",imageRotation:e[10],imageFlipX:e[7],imageFlipY:e[6],shapes:e[11],toolbar:["rect"],toolShapes:{rectangle:[{x:0,y:0,width:0,height:0}]},toolActive:"rectangle",parentRect:e[13],enablePresetDropImage:!1,enablePresetSelectImage:!1,willStartInteraction:e[5],hooks:{willRenderShapeControls:e[24]}}}),t.$on("measure",e[25]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,[o]){const i={};8&o&&(i.stores=e[3]),16&o&&(i.locale=e[4]),1&o&&(i.isActive=e[0]),2&o&&(i.isActiveFraction=e[1]),4&o&&(i.isVisible=e[2]),512&o&&(i.mapScreenPointToImagePoint=e[9]),256&o&&(i.mapImagePointToScreenPoint=e[8]),1024&o&&(i.imageRotation=e[10]),128&o&&(i.imageFlipX=e[7]),64&o&&(i.imageFlipY=e[6]),32&o&&(i.willStartInteraction=e[5]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function xx(e,t,o){let i,r,n,a,s,l,c,d,u;let{isActive:h}=t,{isActiveFraction:p}=t,{isVisible:m}=t,{stores:g}=t,{locale:$={}}=t,{markupEditorWillStartInteraction:f}=t;const{imageRedaction:y,rootRect:b,imageSize:x,imageRotation:v,imageFlipX:w,imageFlipY:S,imageTransforms:k,imageTransformsInterpolated:C}=g;on(e,b,(e=>o(23,d=e))),on(e,x,(e=>o(22,c=e))),on(e,v,(e=>o(10,u=e))),on(e,w,(e=>o(7,a=e))),on(e,S,(e=>o(6,n=e))),on(e,k,(e=>o(21,l=e))),on(e,C,(e=>o(20,s=e)));return e.$$set=e=>{"isActive"in e&&o(0,h=e.isActive),"isActiveFraction"in e&&o(1,p=e.isActiveFraction),"isVisible"in e&&o(2,m=e.isVisible),"stores"in e&&o(3,g=e.stores),"locale"in e&&o(4,$=e.locale),"markupEditorWillStartInteraction"in e&&o(5,f=e.markupEditorWillStartInteraction)},e.$$.update=()=>{15728832&e.$$.dirty&&o(9,i=e=>jb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n)),15728832&e.$$.dirty&&o(8,r=e=>Hb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n))},[h,p,m,g,$,f,n,a,r,i,u,y,b,x,v,w,S,k,C,"redact",s,l,c,d,e=>{const t=zm(e[0]);return Dm("to-front",t),e},function(t){Qn.call(this,e,t)}]}var vx={util:["redact",class extends Fa{constructor(e){super(),za(this,e,xx,bx,Qr,{name:19,isActive:0,isActiveFraction:1,isVisible:2,stores:3,locale:4,markupEditorWillStartInteraction:5})}get name(){return this.$$.ctx[19]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[1]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[2]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[3]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[5]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}},({src:e})=>e&&!kp(e)]};function wx(e){let t,o,i=(P(e[32].label)?e[32].label(e[1]):e[32].label)+"";return{c(){t=kn("span"),o=Tn(i)},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){2&t[0]|2&t[1]&&i!==(i=(P(e[32].label)?e[32].label(e[1]):e[32].label)+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Sx(e){let t,o,i,r=(e[11](e[32].value)||"")+"",n=e[32].label&&wx(e);return{c(){t=kn("div"),o=new Bn(!1),i=Mn(),n&&n.c(),o.a=i,An(t,"slot","option")},m(e,a){wn(e,t,a),o.m(r,t),bn(t,i),n&&n.m(t,null)},p(e,i){2&i[1]&&r!==(r=(e[11](e[32].value)||"")+"")&&o.p(r),e[32].label?n?n.p(e,i):(n=wx(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&Sn(t),n&&n.d()}}}function kx(e){let t,o;return t=new Wu({props:{locale:e[1],class:"PinturaControlList",layout:"row",options:e[2],selectedIndex:e[4],onchange:e[10],$$slots:{option:[Sx,({option:e})=>({32:e}),({option:e})=>[0,e?2:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};2&o[0]&&(i.locale=e[1]),4&o[0]&&(i.options=e[2]),16&o[0]&&(i.selectedIndex=e[4]),2&o[0]|6&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Cx(e){let t,o,i;return o=new vd({props:{elasticity:e[5],$$slots:{default:[kx]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"slot","footer"),An(t,"style",e[3])},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,r){const n={};32&r[0]&&(n.elasticity=e[5]),22&r[0]|4&r[1]&&(n.$$scope={dirty:r,ctx:e}),o.$set(n),(!i||8&r[0])&&An(t,"style",e[3])},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Tx(e){let t,o;return t=new J$({props:{$$slots:{footer:[Cx]},$$scope:{ctx:e}}}),t.$on("measure",e[22]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};62&o[0]|4&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Mx(e,t,o){let i,r,n,a,s,l,c,d,u,h,p=Gr,m=()=>(p(),p=en(g,(e=>o(17,l=e))),g);e.$$.on_destroy.push((()=>p()));let{isActive:g}=t;m();let{stores:$}=t,{locale:f={}}=t,{fillOptions:y=[]}=t;const b=e=>e.map((e=>(e=>Fo(e)&&R(e[0])&&Fo(e[1]))(e)?[e[0],b(e[1]),e[2]]:(e=>[Array.isArray(e)&&3===e.length?[...e,1]:e,void 0,{disabled:!1}])(e))),x=Jn("elasticityMultiplier");on(e,x,(e=>o(21,h=e)));const{history:v,animation:w,scrollElasticity:S,imageBackgroundColor:k,imageBackgroundImage:C,allowPan:T,allowZoom:M,allowZoomControls:P,allowPlayPause:E}=$;on(e,w,(e=>o(18,c=e))),on(e,k,(e=>o(20,u=e))),on(e,C,(e=>o(19,d=e)));const I=ec(c?20:0);return on(e,I,(e=>o(16,s=e))),e.$$set=e=>{"isActive"in e&&m(o(0,g=e.isActive)),"stores"in e&&o(14,$=e.stores),"locale"in e&&o(1,f=e.locale),"fillOptions"in e&&o(15,y=e.fillOptions)},e.$$.update=()=>{32768&e.$$.dirty[0]&&o(2,i=b(y)),131072&e.$$.dirty[0]&&T.set(l),131072&e.$$.dirty[0]&&M.set(l),131072&e.$$.dirty[0]&&P.set(l),131072&e.$$.dirty[0]&&l&&E.set(!0),2097152&e.$$.dirty[0]&&o(5,r=h*S),1572868&e.$$.dirty[0]&&o(4,n=i.findIndex((([e])=>d?e===d:Array.isArray(e)?ds(e,u):void 0))||0),393216&e.$$.dirty[0]&&c&&I.set(l?0:20),65536&e.$$.dirty[0]&&o(3,a=s?`transform: translateY(${s}px)`:void 0)},[g,f,i,a,n,r,x,w,k,C,({value:e})=>{R(e)&&(un(k,u=void 0,u),un(C,d=e,d)),Fo(e)&&(un(k,u=e,u),un(C,d=void 0,d)),v.write()},e=>{if(R(e))return`
`;if(Fo(e)){const[t,o,i,r]=e.map(((e,t)=>t<3?Math.round(255*e):e));return`
`}return"
"},I,"fill",$,y,s,l,c,d,u,h,function(t){Qn.call(this,e,t)}]}var Rx={util:["fill",class extends Fa{constructor(e){super(),za(this,e,Mx,Tx,Qr,{name:13,isActive:0,stores:14,locale:1,fillOptions:15},null,[-1,-1])}get name(){return this.$$.ctx[13]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get stores(){return this.$$.ctx[14]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[1]}set locale(e){this.$$set({locale:e}),pa()}get fillOptions(){return this.$$.ctx[15]}set fillOptions(e){this.$$set({fillOptions:e}),pa()}},({src:e,fillOptions:t})=>e&&!kp(e)&&t&&t.length]};function Px(e){let t,o,i;function r(t){e[41](t)}let n={utilKey:"retouch",stores:e[4],locale:e[5],isActive:e[1],isActiveFraction:e[2],isVisible:e[3],mapScreenPointToImagePoint:e[26],mapImagePointToScreenPoint:e[25],imageRotation:e[27],imageFlipX:e[24],imageFlipY:e[23],toolbar:e[6],toolbarLayout:"stack",shapes:e[29],toolShapes:e[7],enableViewTool:e[14],enableMoveTool:e[13],enableToolShareStyles:!1,shapeControls:e[8],enablePresetSelectImage:!1,enablePresetDropImage:!1,parentRect:e[30],willStartInteraction:e[12],willRenderHeaderTools:e[10]||e[17],willRenderShapeStyleControls:e[9],hooks:{willRenderShapeControls:e[11]||e[15],willRenderShapeTextControls:e[16],beforeAddShape:e[18],beforeRemoveShape:e[19],beforeDeselectShape:e[20],beforeSelectShape:e[21],beforeUpdateShape:e[22]}};return void 0!==e[0]&&(n.toolActive=e[0]),t=new Nb({props:n}),ta.push((()=>Ea(t,"toolActive",r))),t.$on("measure",e[42]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};16&i[0]&&(r.stores=e[4]),32&i[0]&&(r.locale=e[5]),2&i[0]&&(r.isActive=e[1]),4&i[0]&&(r.isActiveFraction=e[2]),8&i[0]&&(r.isVisible=e[3]),67108864&i[0]&&(r.mapScreenPointToImagePoint=e[26]),33554432&i[0]&&(r.mapImagePointToScreenPoint=e[25]),134217728&i[0]&&(r.imageRotation=e[27]),16777216&i[0]&&(r.imageFlipX=e[24]),8388608&i[0]&&(r.imageFlipY=e[23]),64&i[0]&&(r.toolbar=e[6]),128&i[0]&&(r.toolShapes=e[7]),16384&i[0]&&(r.enableViewTool=e[14]),8192&i[0]&&(r.enableMoveTool=e[13]),256&i[0]&&(r.shapeControls=e[8]),4096&i[0]&&(r.willStartInteraction=e[12]),132096&i[0]&&(r.willRenderHeaderTools=e[10]||e[17]),512&i[0]&&(r.willRenderShapeStyleControls=e[9]),8226816&i[0]&&(r.hooks={willRenderShapeControls:e[11]||e[15],willRenderShapeTextControls:e[16],beforeAddShape:e[18],beforeRemoveShape:e[19],beforeDeselectShape:e[20],beforeSelectShape:e[21],beforeUpdateShape:e[22]}),!o&&1&i[0]&&(o=!0,r.toolActive=e[0],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function Ex(e,t,o){let i,r,n,a,s,l,c,d,u;let{isActive:h}=t,{isActiveFraction:p}=t,{isVisible:m}=t,{stores:g}=t,{locale:$={}}=t,{retouchTools:f}=t,{retouchToolShapes:y}=t,{retouchShapeControls:b}=t,{retouchActiveTool:x}=t,{retouchWillRenderShapeStyleControls:v}=t,{retouchWillRenderHeaderTools:w}=t,{retouchWillRenderShapeControls:S}=t,{markupEditorWillStartInteraction:k}=t,{retouchEnableMoveTool:C}=t,{retouchEnableViewTool:T}=t,{willRenderShapeControls:M}=t,{willRenderShapeTextControls:R}=t,{willRenderHeaderTools:P}=t,{beforeAddShape:E}=t,{beforeRemoveShape:I}=t,{beforeDeselectShape:A}=t,{beforeSelectShape:L}=t,{beforeUpdateShape:z}=t;const{rootRect:F,imageManipulation:D,imageSize:O,imageRotation:B,imageFlipX:W,imageFlipY:_,imageTransforms:V,imageTransformsInterpolated:N}=g;return on(e,F,(e=>o(40,d=e))),on(e,O,(e=>o(39,c=e))),on(e,B,(e=>o(27,u=e))),on(e,W,(e=>o(24,a=e))),on(e,_,(e=>o(23,n=e))),on(e,V,(e=>o(38,l=e))),on(e,N,(e=>o(37,s=e))),e.$$set=e=>{"isActive"in e&&o(1,h=e.isActive),"isActiveFraction"in e&&o(2,p=e.isActiveFraction),"isVisible"in e&&o(3,m=e.isVisible),"stores"in e&&o(4,g=e.stores),"locale"in e&&o(5,$=e.locale),"retouchTools"in e&&o(6,f=e.retouchTools),"retouchToolShapes"in e&&o(7,y=e.retouchToolShapes),"retouchShapeControls"in e&&o(8,b=e.retouchShapeControls),"retouchActiveTool"in e&&o(0,x=e.retouchActiveTool),"retouchWillRenderShapeStyleControls"in e&&o(9,v=e.retouchWillRenderShapeStyleControls),"retouchWillRenderHeaderTools"in e&&o(10,w=e.retouchWillRenderHeaderTools),"retouchWillRenderShapeControls"in e&&o(11,S=e.retouchWillRenderShapeControls),"markupEditorWillStartInteraction"in e&&o(12,k=e.markupEditorWillStartInteraction),"retouchEnableMoveTool"in e&&o(13,C=e.retouchEnableMoveTool),"retouchEnableViewTool"in e&&o(14,T=e.retouchEnableViewTool),"willRenderShapeControls"in e&&o(15,M=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(16,R=e.willRenderShapeTextControls),"willRenderHeaderTools"in e&&o(17,P=e.willRenderHeaderTools),"beforeAddShape"in e&&o(18,E=e.beforeAddShape),"beforeRemoveShape"in e&&o(19,I=e.beforeRemoveShape),"beforeDeselectShape"in e&&o(20,A=e.beforeDeselectShape),"beforeSelectShape"in e&&o(21,L=e.beforeSelectShape),"beforeUpdateShape"in e&&o(22,z=e.beforeUpdateShape)},e.$$.update=()=>{25165824&e.$$.dirty[0]|960&e.$$.dirty[1]&&o(26,i=e=>jb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n)),25165824&e.$$.dirty[0]|960&e.$$.dirty[1]&&o(25,r=e=>Hb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n))},[x,h,p,m,g,$,f,y,b,v,w,S,k,C,T,M,R,P,E,I,A,L,z,n,a,r,i,u,F,D,O,B,W,_,V,N,"retouch",s,l,c,d,function(e){x=e,o(0,x)},function(t){Qn.call(this,e,t)}]}var Ix={util:["retouch",class extends Fa{constructor(e){super(),za(this,e,Ex,Px,Qr,{name:36,isActive:1,isActiveFraction:2,isVisible:3,stores:4,locale:5,retouchTools:6,retouchToolShapes:7,retouchShapeControls:8,retouchActiveTool:0,retouchWillRenderShapeStyleControls:9,retouchWillRenderHeaderTools:10,retouchWillRenderShapeControls:11,markupEditorWillStartInteraction:12,retouchEnableMoveTool:13,retouchEnableViewTool:14,willRenderShapeControls:15,willRenderShapeTextControls:16,willRenderHeaderTools:17,beforeAddShape:18,beforeRemoveShape:19,beforeDeselectShape:20,beforeSelectShape:21,beforeUpdateShape:22},null,[-1,-1])}get name(){return this.$$.ctx[36]}get isActive(){return this.$$.ctx[1]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[2]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[4]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[5]}set locale(e){this.$$set({locale:e}),pa()}get retouchTools(){return this.$$.ctx[6]}set retouchTools(e){this.$$set({retouchTools:e}),pa()}get retouchToolShapes(){return this.$$.ctx[7]}set retouchToolShapes(e){this.$$set({retouchToolShapes:e}),pa()}get retouchShapeControls(){return this.$$.ctx[8]}set retouchShapeControls(e){this.$$set({retouchShapeControls:e}),pa()}get retouchActiveTool(){return this.$$.ctx[0]}set retouchActiveTool(e){this.$$set({retouchActiveTool:e}),pa()}get retouchWillRenderShapeStyleControls(){return this.$$.ctx[9]}set retouchWillRenderShapeStyleControls(e){this.$$set({retouchWillRenderShapeStyleControls:e}),pa()}get retouchWillRenderHeaderTools(){return this.$$.ctx[10]}set retouchWillRenderHeaderTools(e){this.$$set({retouchWillRenderHeaderTools:e}),pa()}get retouchWillRenderShapeControls(){return this.$$.ctx[11]}set retouchWillRenderShapeControls(e){this.$$set({retouchWillRenderShapeControls:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[12]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}get retouchEnableMoveTool(){return this.$$.ctx[13]}set retouchEnableMoveTool(e){this.$$set({retouchEnableMoveTool:e}),pa()}get retouchEnableViewTool(){return this.$$.ctx[14]}set retouchEnableViewTool(e){this.$$set({retouchEnableViewTool:e}),pa()}get willRenderShapeControls(){return this.$$.ctx[15]}set willRenderShapeControls(e){this.$$set({willRenderShapeControls:e}),pa()}get willRenderShapeTextControls(){return this.$$.ctx[16]}set willRenderShapeTextControls(e){this.$$set({willRenderShapeTextControls:e}),pa()}get willRenderHeaderTools(){return this.$$.ctx[17]}set willRenderHeaderTools(e){this.$$set({willRenderHeaderTools:e}),pa()}get beforeAddShape(){return this.$$.ctx[18]}set beforeAddShape(e){this.$$set({beforeAddShape:e}),pa()}get beforeRemoveShape(){return this.$$.ctx[19]}set beforeRemoveShape(e){this.$$set({beforeRemoveShape:e}),pa()}get beforeDeselectShape(){return this.$$.ctx[20]}set beforeDeselectShape(e){this.$$set({beforeDeselectShape:e}),pa()}get beforeSelectShape(){return this.$$.ctx[21]}set beforeSelectShape(e){this.$$set({beforeSelectShape:e}),pa()}get beforeUpdateShape(){return this.$$.ctx[22]}set beforeUpdateShape(e){this.$$set({beforeUpdateShape:e}),pa()}},({src:e})=>e&&!kp(e)]};const Ax='',Lx='';var zx={labelReset:"Reset",labelDefault:"Default",labelAuto:"Auto",labelNone:"None",labelEdit:"Edit",labelClose:"Close",labelSupportError:e=>e.join(", ")+" not supported on this browser",labelColor:"Color",labelWidth:"Width",labelSize:"Size",labelOffset:"Offset",labelAmount:"Amount",labelInset:"Inset",labelRadius:"Radius",labelColorPalette:"Color palette",labelSizeExtraSmall:"Extra small",labelSizeSmall:"Small",labelSizeMediumSmall:"Medium small",labelSizeMedium:"Medium",labelSizeMediumLarge:"Medium large",labelSizeLarge:"Large",labelSizeExtraLarge:"Extra large",labelButtonCancel:"Cancel",labelButtonUndo:"Undo",labelButtonRedo:"Redo",labelButtonRevert:"Revert",labelButtonExport:"Done",labelZoomIn:"Zoom in",labelZoomOut:"Zoom out",labelZoomFit:"Fit to view",labelZoomActual:"Actual size",iconZoomIn:'',iconZoomOut:'',iconSupportError:'',iconButtonClose:Ax,iconButtonRevert:'',iconButtonUndo:'',iconButtonRedo:'',iconButtonExport:'',statusLabelButtonClose:"Close",statusIconButtonClose:Ax,statusLabelLoadImage:e=>e&&e.task?e.error?"IMAGE_TOO_SMALL"===e.error.code?"Minimum image size is {minWidth} × {minHeight}":"Error loading image":"blob-to-bitmap"===e.task?"Preparing image…":"Loading image…":"Waiting for image",statusLabelProcessImage:e=>{if(e&&e.task)return"store"===e.task?e.error?"Error uploading image":"Uploading image…":e.error?"Error processing image":"Processing image…"}};const Fx={shapeLabelButtonSelectSticker:"Select image",shapeIconButtonSelectSticker:'',shapeIconButtonFlipHorizontal:'',shapeIconButtonFlipVertical:'',shapeIconButtonRemove:'',shapeIconButtonDuplicate:'',shapeIconButtonMoveToFront:'',shapeIconButtonTextLayoutAutoWidth:""+Lx,shapeIconButtonTextLayoutAutoHeight:''+Lx,shapeIconButtonTextLayoutFixedSize:''+Lx,shapeTitleButtonTextLayoutAutoWidth:"Auto width",shapeTitleButtonTextLayoutAutoHeight:"Auto height",shapeTitleButtonTextLayoutFixedSize:"Fixed size",shapeTitleButtonFlipHorizontal:"Flip Horizontal",shapeTitleButtonFlipVertical:"Flip Vertical",shapeTitleButtonRemove:"Remove",shapeTitleButtonDuplicate:"Duplicate",shapeTitleButtonMoveToFront:"Move to front",shapeLabelInputText:"Edit text",shapeIconInputCancel:'',shapeIconInputConfirm:'',shapeLabelInputCancel:"Cancel",shapeLabelInputConfirm:"Confirm",shapeLabelStrokeNone:"No outline",shapeLabelFontStyleNormal:"Normal",shapeLabelFontStyleBold:"Bold",shapeLabelFontStyleItalic:"Italic",shapeLabelFontStyleItalicBold:"Bold Italic",shapeTitleBackgroundColor:"Fill color",shapeTitleCornerRadius:"Corner radius",shapeTitleFontFamily:"Font",shapeTitleFontSize:"Font size",shapeTitleFontStyle:"Font style",shapeTitleLineHeight:"Line height",shapeTitleLineStart:"Start",shapeTitleLineEnd:"End",shapeTitleStrokeWidth:"Line width",shapeTitleStrokeColor:"Line color",shapeTitleLineDecorationBar:"Bar",shapeTitleLineDecorationCircle:"Circle",shapeTitleLineDecorationSquare:"Square",shapeTitleLineDecorationArrow:"Arrow",shapeTitleLineDecorationCircleSolid:"Circle solid",shapeTitleLineDecorationSquareSolid:"Square solid",shapeTitleLineDecorationArrowSolid:"Arrow solid",shapeIconLineDecorationBar:'',shapeIconLineDecorationCircle:'',shapeIconLineDecorationSquare:'',shapeIconLineDecorationArrow:'',shapeIconLineDecorationCircleSolid:'',shapeIconLineDecorationSquareSolid:'',shapeIconLineDecorationArrowSolid:'',shapeTitleColorTransparent:"Transparent",shapeTitleColorWhite:"White",shapeTitleColorSilver:"Silver",shapeTitleColorGray:"Gray",shapeTitleColorBlack:"Black",shapeTitleColorNavy:"Navy",shapeTitleColorBlue:"Blue",shapeTitleColorAqua:"Aqua",shapeTitleColorTeal:"Teal",shapeTitleColorOlive:"Olive",shapeTitleColorGreen:"Green",shapeTitleColorYellow:"Yellow",shapeTitleColorOrange:"Orange",shapeTitleColorRed:"Red",shapeTitleColorMaroon:"Maroon",shapeTitleColorFuchsia:"Fuchsia",shapeTitleColorPurple:"Purple",shapeTitleTextOutline:"Text outline",shapeTitleTextOutlineWidth:"Width",shapeTitleTextShadow:"Text shadow",shapeTitleTextShadowBlur:"Blur",shapeTitleTextColor:"Font color",shapeTitleTextAlign:"Text align",shapeTitleTextAlignLeft:"Left align text",shapeTitleTextAlignCenter:"Center align text",shapeTitleTextAlignRight:"Right align text",shapeIconTextAlignLeft:'',shapeIconTextAlignCenter:'',shapeIconTextAlignRight:'',shapeLabelToolMove:"Move",shapeLabelToolView:"View",shapeLabelToolSharpie:"Sharpie",shapeLabelToolEraser:"Eraser",shapeLabelToolPath:"Path",shapeLabelToolRectangle:"Rectangle",shapeLabelToolEllipse:"Ellipse",shapeLabelToolArrow:"Arrow",shapeLabelToolLine:"Line",shapeLabelToolText:"Text",shapeLabelToolPreset:"Stickers",shapeIconToolView:'',shapeIconToolMove:'',shapeIconToolSharpie:'',shapeIconToolEraser:'',shapeIconToolPath:'',shapeIconToolRectangle:'',shapeIconToolEllipse:'',shapeIconToolArrow:'',shapeIconToolLine:'',shapeIconToolText:'',shapeIconToolPreset:'',shapeTitleSelectionMode:"Selection mode",shapeTitleBrushSize:"Brush size",shapeLabelSelectionModeNew:"New",shapeLabelSelectionModeAdd:"Add",shapeLabelSelectionModeSubtract:"Remove",shapeLabelToolSelectionBrush:"Brush",shapeLabelToolSelectionLassoo:"Lassoo",shapeLabelToolSelectionRectangle:"Rectangle marquee",shapeLabelToolSelectionEllipse:"Ellipse marquee",shapeIconSelectionModeNew:'',shapeIconSelectionModeAdd:'',shapeIconSelectionModeSubtract:'',shapeIconToolSelectionBrush:'',shapeIconToolSelectionLassoo:'',shapeIconToolSelectionRectangle:'',shapeIconToolSelectionEllipse:''};var Dx={cropLabel:"Crop",cropIcon:'',cropIconButtonRecenter:'',cropIconButtonRotateLeft:'',cropIconButtonRotateRight:'',cropIconButtonFlipVertical:'',cropIconButtonFlipHorizontal:'',cropIconSelectPreset:(e,t)=>{const[o,i,r]=t?[t<1?1:.3,1===t?.85:.5,t>1?1:.3]:[.2,.3,.4];return`\n \n \n \n `},cropIconCropBoundary:(e,t)=>{const[o,i,r,n]=t?[.3,1,0,0]:[0,0,.3,1];return`\n \n \n \n \n `},cropLabelButtonRecenter:"Recenter",cropLabelButtonRotateLeft:"Rotate left",cropLabelButtonRotateRight:"Rotate right",cropLabelButtonFlipHorizontal:"Flip horizontal",cropLabelButtonFlipVertical:"Flip vertical",cropLabelSelectPreset:"Crop shape",cropLabelCropBoundary:"Crop boundary",cropLabelCropBoundaryEdge:"Edge of image",cropLabelCropBoundaryNone:"None",cropLabelTabRotation:"Rotation",cropLabelTabZoom:"Scale"},Ox={fillLabel:"Fill",fillIcon:'\n \n \n \n \n \n \n \n '},Bx={frameLabel:"Frame",frameIcon:'\n \n \n ',frameLabelMatSharp:"Mat",frameLabelMatRound:"Bevel",frameLabelLineSingle:"Line",frameLabelLineMultiple:"Zebra",frameLabelEdgeSeparate:"Inset",frameLabelEdgeOverlap:"Plus",frameLabelEdgeCross:"Lumber",frameLabelCornerHooks:"Hook",frameLabelPolaroid:"Polaroid"},Wx={redactLabel:"Redact",redactIcon:''},_x={retouchLabel:"Retouch",retouchIcon:'\n \n '},Vx=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e);Object.keys(o).forEach((i=>{o[i].get?Object.defineProperty(t,i,{get:()=>e[i],set:t=>e[i]=t}):t[i]=e[i]}))},Nx=e=>{const t={},{sub:o,pub:i}=Xo();u()&&null!==document.doctype||console.warn("Browser is in quirks mode, add to page to fix render issues");const r=Ss();Vx(r,t);const n=((e,t)=>{const o={},i=new xm({target:e,props:{stores:t,pluginComponents:Array.from(Mm)}});let r=!1;const n=()=>{r||(u()&&window.removeEventListener("pagehide",n),i&&(r=!0,i.$destroy()))};km||(km=new Set(Xc(xm).filter((e=>!wm.includes(e))))),km.forEach((e=>{Object.defineProperty(o,e,{get:()=>i[e],set:Sm.includes(e)?t=>{i[e]={...i[e],...t}}:t=>i[e]=t})})),Object.defineProperty(o,"previewImageData",{get:()=>i.imagePreviewCurrent}),Cm.forEach((e=>{const t=Tm[e],r=t[0];Object.defineProperty(o,e,{get:()=>i.pluginInterface[r][e],set:o=>{const r=t.reduce(((t,r)=>(t[r]={...i.pluginOptions[r],[e]:o},t)),{});i.pluginOptions={...i.pluginOptions,...r}}})})),Object.defineProperty(o,"element",{get:()=>i.root,set:()=>{}});const a=i.history;return qa(o,{on:(e,t)=>{if(r)return()=>{};if(/undo|redo|revert|writehistory/.test(e))return a.on(e,t);const o=[i.sub(e,t),i.$on(e,(e=>t(e instanceof CustomEvent&&!e.detail?void 0:e)))].filter(Boolean);return()=>o.forEach((e=>e()))},updateImagePreview:e=>{i.imagePreviewSrc=e},close:()=>!r&&i.pub("close"),destroy:n}),Object.defineProperty(o,"history",{get:()=>({undo:()=>a.undo(),redo:()=>a.redo(),revert:()=>a.revert(),get:()=>a.get(),getCollapsed:()=>a.get().splice(0,a.index+1),set:e=>a.set(e),write:e=>a.write(e),get length(){return a.length()},get index(){return a.index},set index(e){a.index=e}})}),u()&&window.addEventListener("pagehide",n),o})(e,r.stores);Vx(n,t);const s=["loadImage","processImage","abortProcessImage","abortLoadImage"].map((e=>n.on(e,(t=>{const o=r[e](t&&t.detail);o instanceof Promise&&o.catch(a)})))),l=(e,t)=>{const i=o(e,t),a=r.on(e,t),s=n.on(e,t);return()=>{i(),a(),s()}};t.handleEvent=a;const c=Pm.map((e=>l(e,(o=>t.handleEvent(e,o)))));return qa(t,{on:l,updateImage:e=>new Promise(((o,i)=>{const n=t.history.get(),a=t.history.index,s=t.imageState;r.loadImage(e).then((e=>{t.history.set(n),t.history.index=a,t.imageState=s,o(e)})).catch(i)})),close:()=>{i("close")},destroy:()=>{[...s,...c].forEach((e=>e())),n.destroy(),r.destroy(),i("destroy")}}),setTimeout((()=>i("init",t)),0),t};const Hx="pintura-editor";var jx=()=>new Promise((e=>{if(!Ux)return e([]);var t;t=Hx,document.createElement(t).constructor===HTMLElement&&customElements.define(Hx,Ux),customElements.whenDefined(Hx).then((()=>e(document.querySelectorAll(Hx))))}));const Ux=u()&&class extends HTMLElement{constructor(){super(),this._editor=void 0,this._unsubs=void 0}static get observedAttributes(){return["src"]}attributeChangedCallback(e,t,o){this[e]=o}connectedCallback(){this._editor=Nx(this),Vx(this._editor,this),this._editor.src=this.getAttribute("src"),this._unsubs=Em(this._editor,this)}disconnectedCallback(){this._editor.destroy(),this._unsubs.forEach((e=>e()))}},Gx="pintura-editor";var Zx=(e,t={})=>{const o=R(e)?document.querySelector(e):e;if(!Wt(o))return;t.class=t.class?"pintura-editor "+t.class:Gx;const i=Nx(o);return Object.assign(i,t)};const{document:Xx,window:Yx}=ka;function qx(e){let t,o,i,r;return la(e[27]),{c(){t=Mn(),o=kn("div"),An(o,"class",e[4]),An(o,"style",e[5])},m(n,a){wn(n,t,a),wn(n,o,a),e[28](o),i||(r=[Pn(Yx,"keydown",e[10]),Pn(Yx,"orientationchange",e[11]),Pn(Yx,"resize",e[27]),Pn(Xx.body,"focusin",(function(){Jr(!e[1]&&e[7])&&(!e[1]&&e[7]).apply(this,arguments)})),Pn(Xx.body,"focusout",(function(){Jr(e[2]&&e[8])&&(e[2]&&e[8]).apply(this,arguments)})),Pn(o,"wheel",e[9],{passive:!1})],i=!0)},p(t,i){e=t,16&i[0]&&An(o,"class",e[4]),32&i[0]&&An(o,"style",e[5])},i:Gr,o:Gr,d(n){n&&Sn(t),n&&Sn(o),e[28](null),i=!1,Kr(r)}}}function Kx(e,t,o){let i,r,n,a,s,l,c,d;const h=qn();let{root:p}=t,{preventZoomViewport:m=!0}=t,{preventScrollBodyIfNeeded:$=!0}=t,{preventFooterOverlapIfNeeded:f=!0}=t,{class:y}=t,b=!0,x=!1,v=!1,w=u()&&document.documentElement,S=u()&&document.body,k=u()&&document.head;const C=ec(0,{precision:.001,damping:.5});on(e,C,(e=>o(26,d=e)));const T=C.subscribe((e=>{v&&e>=1?(o(19,v=!1),o(1,b=!1),h("show")):x&&e<=0&&(o(18,x=!1),o(1,b=!0),h("hide"))}));let M=!1,R=void 0,P=void 0,E=void 0;const I=()=>document.querySelector("meta[name=viewport]"),A=()=>Array.from(document.querySelectorAll("meta[name=theme-color]"));let L;const z=(e,t)=>{const o=()=>{e()?t():requestAnimationFrame(o)};requestAnimationFrame(o)};let F,D,O=0,B=void 0;const W=()=>{D||(D=g("div",{style:"position:fixed;height:100vh;top:0"}),S.append(D))};Zn((()=>{f&&$o()&&W()})),Xn((()=>{D&&(o(21,B=D.offsetHeight),D.remove(),D=void 0)}));let _=void 0;const V=()=>w.style.setProperty("--pintura-document-height",window.innerHeight+"px");return Yn((()=>{w.classList.remove("PinturaModalBodyLock"),T()})),e.$$set=e=>{"root"in e&&o(0,p=e.root),"preventZoomViewport"in e&&o(12,m=e.preventZoomViewport),"preventScrollBodyIfNeeded"in e&&o(13,$=e.preventScrollBodyIfNeeded),"preventFooterOverlapIfNeeded"in e&&o(14,f=e.preventFooterOverlapIfNeeded),"class"in e&&o(15,y=e.class)},e.$$.update=()=>{67895298&e.$$.dirty[0]&&o(25,i=v||x?d:b?0:1),4096&e.$$.dirty[0]&&(r="width=device-width,height=device-height,initial-scale=1"+(m?",maximum-scale=1,user-scalable=0":"")),786434&e.$$.dirty[0]&&o(22,n=!v&&!b&&!x),12&e.$$.dirty[0]&&(M||o(20,F=O)),2097160&e.$$.dirty[0]&&o(24,a=Ao(B)?"--viewport-pad-footer:"+(B>O?0:1):""),51380224&e.$$.dirty[0]&&o(5,s=`opacity:${i};height:${F}px;--editor-modal:1;${a}`),32768&e.$$.dirty[0]&&o(4,l=Mc(["pintura-editor","PinturaModal",y])),8192&e.$$.dirty[0]&&o(23,c=$&&$o()&&/15_/.test(navigator.userAgent)),12582912&e.$$.dirty[0]&&c&&(e=>{e?(_=window.scrollY,w.classList.add("PinturaDocumentLock"),V(),window.addEventListener("resize",V)):(window.removeEventListener("resize",V),w.classList.remove("PinturaDocumentLock"),Ao(_)&&window.scrollTo(0,_),_=void 0)})(n)},[p,b,M,O,l,s,C,e=>{Gd(e.target)&&(o(2,M=!0),L=O)},e=>{if(Gd(e.target))if(clearTimeout(undefined),L===O)o(2,M=!1);else{const e=O;z((()=>O!==e),(()=>o(2,M=!1)))}},e=>{e.target&&/PinturaStage/.test(e.target.className)&&e.preventDefault()},e=>{const{key:t}=e;if(!/escape/i.test(t))return;const o=e.target;if(o&&/input|textarea/i.test(o.nodeName))return;const i=document.querySelectorAll(".PinturaModal");i[i.length-1]===p&&h("close")},W,m,$,f,y,()=>{if(v||!b)return;o(19,v=!0);const e=I()||g("meta",{name:"viewport"});R=!R&&e.getAttribute("content"),e.setAttribute("content",r+(/cover/.test(R)?",viewport-fit=cover":"")),e.parentNode||k.append(e);const t=getComputedStyle(p).getPropertyValue("--color-background"),i=A();if(i.length)P=i.map((e=>e.getAttribute("content")));else{const e=g("meta",{name:"theme-color"});k.append(e),i.push(e)}i.forEach((e=>e.setAttribute("content",`rgb(${t})`))),clearTimeout(E),E=setTimeout((()=>C.set(1)),250)},()=>{if(x||b)return;clearTimeout(E),o(18,x=!0);const e=I();R?e.setAttribute("content",R):e.remove();const t=A();P?t.forEach(((e,t)=>{e.setAttribute("content",P[t])})):t.forEach((e=>e.remove())),C.set(0)},x,v,F,B,n,c,a,i,d,function(){o(3,O=Yx.innerHeight)},function(e){ta[e?"unshift":"push"]((()=>{p=e,o(0,p)}))}]}class Jx extends Fa{constructor(e){super(),za(this,e,Kx,qx,Qr,{root:0,preventZoomViewport:12,preventScrollBodyIfNeeded:13,preventFooterOverlapIfNeeded:14,class:15,show:16,hide:17},null,[-1,-1])}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),pa()}get preventZoomViewport(){return this.$$.ctx[12]}set preventZoomViewport(e){this.$$set({preventZoomViewport:e}),pa()}get preventScrollBodyIfNeeded(){return this.$$.ctx[13]}set preventScrollBodyIfNeeded(e){this.$$set({preventScrollBodyIfNeeded:e}),pa()}get preventFooterOverlapIfNeeded(){return this.$$.ctx[14]}set preventFooterOverlapIfNeeded(e){this.$$set({preventFooterOverlapIfNeeded:e}),pa()}get class(){return this.$$.ctx[15]}set class(e){this.$$set({class:e}),pa()}get show(){return this.$$.ctx[16]}get hide(){return this.$$.ctx[17]}}const Qx=(e,t,o,i)=>{const r=ue(t.x-e.x,t.y-e.y),n=fe(r),a=5*o;let s;s=i?.5*a:Math.ceil(.5*(a-1));const l=ke(pe(n),s);return{anchor:pe(e),offset:l,normal:n,solid:i,size:a,sizeHalf:s}},ev=({anchor:e,solid:t,normal:o,offset:i,size:r,sizeHalf:n,strokeWidth:a,strokeColor:s,strokeJoin:l,strokeCap:c,bitmap:d},u)=>{const h=e.x,p=e.y,m=ke(pe(o),r),g=ue(h+m.x,p+m.y);if(ke(m,.55),t){ve(u,i);const e=ke(pe(o),.5*n);return[{points:[ue(h-e.x,p-e.y),ue(g.x-m.y,g.y+m.x),ue(g.x+m.y,g.y-m.x)],pathClose:!0,backgroundColor:s}]}{const e=ke((e=>{const t=e.x;return e.x=-e.y,e.y=t,e})(pe(o)),.5),t=ue(h-e.x,p-e.y),i=ue(h+e.x,p+e.y);return[{points:[ue(g.x+m.y,g.y-m.x),t,ue(h,p),i,ue(g.x-m.y,g.y+m.x)],pathClose:!1,strokeWidth:a,strokeColor:s,strokeJoin:l,strokeCap:c,bitmap:d}]}},tv=({anchor:e,solid:t,offset:o,normal:i,sizeHalf:r,strokeWidth:n,strokeColor:a},s)=>(ve(s,o),t&&ve(s,me(pe(i))),[{x:e.x,y:e.y,rx:r,ry:r,backgroundColor:t?a:void 0,strokeWidth:t?void 0:n,strokeColor:t?void 0:a}]),ov=({anchor:e,offset:t,strokeWidth:o,strokeColor:i,strokeJoin:r,strokeCap:n,bitmap:a})=>[{points:[ue(e.x-t.y,e.y+t.x),ue(e.x+t.y,e.y-t.x)],strokeWidth:o,strokeColor:i,strokeJoin:r,strokeCap:n,bitmap:a}],iv=({anchor:e,solid:t,offset:o,normal:i,sizeHalf:r,strokeWidth:n,strokeColor:a},s)=>{return ve(s,o),[{x:e.x-r,y:e.y-r,width:2*r,height:2*r,rotation:(l=i,Math.atan2(l.y,l.x)),backgroundColor:t?a:void 0,strokeWidth:t?void 0:n,strokeColor:t?void 0:a}];var l},rv=(e={})=>t=>{if(!t.lineStart&&!t.lineEnd)return;const o=[],{lineStart:i,lineEnd:r,strokeWidth:n,strokeColor:a,strokeJoin:s,strokeCap:l,bitmap:c}=t,d=ue(t.x1,t.y1),u=ue(t.x2,t.y2),h=[d,u];if(i){const[t,r]=i.split("-"),h=e[t];if(h){const e=Qx(d,u,n,!!r);o.push(...h({...e,strokeColor:a,strokeWidth:n,strokeJoin:s,strokeCap:l,bitmap:c},d))}}if(r){const[t,i]=r.split("-"),h=e[t];if(h){const e=Qx(u,d,n,!!i);o.push(...h({...e,strokeColor:a,strokeWidth:n,strokeJoin:s,strokeCap:l,bitmap:c},u))}}return[{points:h,strokeWidth:n,strokeColor:a,strokeJoin:s,strokeCap:l,bitmap:c},...o]},nv=()=>({arrow:ev,circle:tv,square:iv,bar:ov}),av=(e,t)=>{const o=parseFloat(e)*t;return R(e)?o+"%":o},sv=(e,t)=>R(e)?ar(e,t):e,lv=e=>[{...e,frameStyle:"line",frameInset:0,frameOffset:0,frameSize:e.frameSize?av(e.frameSize,2):"2.5%",frameRadius:e.frameRound?av(e.frameSize,2):0}],cv=({width:e,height:t,frameImage:o,frameSize:i="15%",frameOutset:r=0,frameSlices:n={x1:.15,y1:.15,x2:.85,y2:.85}},{isPreview:a})=>{if(!o)return[];const s=Math.sqrt(e*t),l=sv(i,s),c=a?l:Math.round(l),d=c,u=sv(r,s),h=2*u,{x1:p,x2:m,y1:g,y2:$}=n,f={x0:0,y0:0,x1:c,y1:d,x2:e-c,y2:t-d,x3:e,y3:t,cw:c,ch:d,ew:e-c-c,eh:t-d-d},y=a?1:0,b=2*y,x=u>0,v={expandsCanvas:x,width:f.cw,height:f.ch,backgroundImage:o};return[{expandsCanvas:x,x:f.x1-y-u,y:f.y0-u,width:f.ew+b+h,height:f.ch,backgroundCorners:[{x:p,y:0},{x:m,y:0},{x:m,y:g},{x:p,y:g}],backgroundImage:o},{expandsCanvas:x,x:f.x1-y-u,y:f.y2+u,width:f.ew+b+h,height:f.ch,backgroundCorners:[{x:p,y:$},{x:m,y:$},{x:m,y:1},{x:p,y:1}],backgroundImage:o},{expandsCanvas:x,x:f.x0-u,y:f.y1-y-u,width:f.cw,height:f.eh+b+h,backgroundCorners:[{x:0,y:g},{x:p,y:g},{x:p,y:$},{x:0,y:$}],backgroundImage:o},{expandsCanvas:x,x:f.x2+u,y:f.y1-y-u,width:f.cw,height:f.eh+b+h,backgroundCorners:[{x:m,y:g},{x:1,y:g},{x:1,y:$},{x:m,y:$}],backgroundImage:o},{...v,x:f.x0-u,y:f.y0-u,backgroundCorners:[{x:0,y:0},{x:p,y:0},{x:p,y:g},{x:0,y:g}]},{...v,x:f.x2+u,y:f.y0-u,backgroundCorners:[{x:m,y:0},{x:1,y:0},{x:1,y:g},{x:m,y:g}]},{...v,x:f.x2+u,y:f.y2+u,backgroundCorners:[{x:m,y:$},{x:1,y:$},{x:1,y:1},{x:m,y:1}]},{...v,x:f.x0-u,y:f.y2+u,backgroundCorners:[{x:0,y:$},{x:p,y:$},{x:p,y:1},{x:0,y:1}]}]},dv=({x:e,y:t,width:o,height:i,frameInset:r="3.5%",frameSize:n=".25%",frameColor:a=[1,1,1],frameOffset:s="5%",frameAmount:l=1,frameRadius:c=0,expandsCanvas:d=!1},{isPreview:u})=>{const h=Math.sqrt(o*i);let p=sv(n,h);const m=sv(r,h),g=sv(s,h);let $=0;u||(p=Math.max(1,Math.round(p)),$=p%2==0?0:.5);const f=sv(av(c,l),h);return new Array(l).fill(void 0).map(((r,n)=>{const s=g*n;let l=e+m+s,c=t+m+s,h=e+o-m-s,y=t+i-m-s;u||(l=Math.round(l),c=Math.round(c),h=Math.round(h),y=Math.round(y));return{x:l+$,y:c+$,width:h-l,height:y-c,cornerRadius:f>0?f-s:0,strokeWidth:p,strokeColor:a,expandsCanvas:d}}))},uv=({x:e,y:t,width:o,height:i,frameSize:r=".25%",frameOffset:n=0,frameInset:a="2.5%",frameColor:s=[1,1,1]},{isPreview:l})=>{const c=Math.sqrt(o*i);let d=sv(r,c),u=sv(a,c),h=sv(n,c),p=0;l||(d=Math.max(1,Math.round(d)),u=Math.round(u),h=Math.round(h),p=d%2==0?0:.5);const m=h-u,g=e+u+p,$=t+u+p,f=e+o-u-p,y=t+i-u-p;return[{points:[ue(g+m,$),ue(f-m,$)]},{points:[ue(f,$+m),ue(f,y-m)]},{points:[ue(f-m,y),ue(g+m,y)]},{points:[ue(g,y-m),ue(g,$+m)]}].map((e=>(e.strokeWidth=d,e.strokeColor=s,e)))},hv=({x:e,y:t,width:o,height:i,frameSize:r=".25%",frameInset:n="2.5%",frameLength:a="2.5%",frameColor:s=[1,1,1]},{isPreview:l})=>{const c=Math.sqrt(o*i);let d=sv(r,c),u=sv(n,c),h=sv(a,c),p=0;l||(d=Math.max(1,Math.round(d)),u=Math.round(u),h=Math.round(h),p=d%2==0?0:.5);const m=e+u+p,g=t+u+p,$=e+o-u-p,f=t+i-u-p;return[{points:[ue(m,g+h),ue(m,g),ue(m+h,g)]},{points:[ue($-h,g),ue($,g),ue($,g+h)]},{points:[ue($,f-h),ue($,f),ue($-h,f)]},{points:[ue(m+h,f),ue(m,f),ue(m,f-h)]}].map((e=>(e.strokeWidth=d,e.strokeColor=s,e)))},pv=({x:e,y:t,width:o,height:i,frameColor:r=[1,1,1]},{isPreview:n})=>{const a=Math.sqrt(o*i),s=.1*a;let l=.2*a,c=0;const d=.5*s;return n?c=1:l=Math.ceil(l),r.length=3,[{id:"border",x:e-d+c,y:t-d+c,width:o+s-2*c,height:i+l-2*c,frameStyle:"line",frameInset:0,frameOffset:0,frameSize:s,frameColor:r,expandsCanvas:!0},{id:"chin",x:e-d,y:i-c,width:o+s,height:l,backgroundColor:r,expandsCanvas:!0}].filter(Boolean)},mv=(e={})=>(t,o)=>{if(!zo(t,"frameStyle"))return;const i=t.frameStyle,r=e[i];if(!r)return;const{frameStyle:n,...a}=t;return r(a,o)},gv=()=>({solid:lv,hook:hv,line:dv,edge:uv,polaroid:pv,nine:cv}),$v=e=>{const t=(o,i={isPreview:!0})=>{const r=e.map((e=>{const r=e(o,i);if(r)return r.map((e=>t(e,i)))})).filter(Boolean).flat();return r.length?r.flat().map(((e,t)=>(e.id=o.id+"_"+t,e))):o};return t};"undefined"!=typeof window&&(e=>{if(!e)return;const[t,o,i,r]=[[108,111,99,97,116,105,111,110],[82,101,103,69,120,112],[116,101,115,116],[112,113,105,110,97,92,46,110,108]].map((e=>e.map((e=>String.fromCharCode(e))).join("")));e._clpdx4s=new e[o](r)[i](e[t])})(window);const fv=il,yv=nl,bv=(e,...t)=>(o,i)=>{var r;r=e,(Array.isArray(r)||P(r))&&(t=[e,...t]);const n=C(e)?e:{};t=Array.isArray(t)?t.reduce(((e,t)=>[...e,...Array.isArray(t)?[...t]:[t]]),[]):t;for(let e=0;e({read:c,apply:k}),vv=(e={})=>{const{blurAmount:t,dataSizeScalar:o,scrambleAmount:i,backgroundColor:r}=e;return(e,n)=>(async(e,t={})=>{if(!e)return;const{width:o,height:i}=e,{dataSize:r=96,dataSizeScalar:n=1,scrambleAmount:a=4,blurAmount:s=6,outputFormat:l="canvas",backgroundColor:c=[0,0,0]}=t,d=Math.round(r*n),u=Math.min(d/o,d/i),h=Math.floor(o*u),p=Math.floor(i*u),m=g("canvas",{width:h,height:p}),$=m.getContext("2d",{willReadFrequently:!0});if(c.length=3,$.fillStyle=Ho(c),$.fillRect(0,0,h,p),y(e)){const t=g("canvas",{width:o,height:i});t.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),$.drawImage(t,0,0,h,p),f(t)}else $.drawImage(e,0,0,h,p);const b=$.getImageData(0,0,h,p),x=[];if(a>0&&x.push([Zl,{amount:a}]),s>0)for(let e=0;e`(err, imageData) => {\n(${t[o][0].toString()})(Object.assign({ imageData: imageData }, filterInstructions[${o}]), \n${t[o+1]?e(t,o+1):"done"})\n}`,t=`function (options, done) {\nconst filterInstructions = options.filterInstructions;\nconst imageData = options.imageData;\n(${e(x,0)})(null, imageData)\n}`,o=await F(t,[{imageData:b,filterInstructions:x.map((e=>e[1]))}],[b.data.buffer]);v=ko(o)}else v=b;return"canvas"===l?($.putImageData(v,0,0),m):v})(e,{blurAmount:t,scrambleAmount:i,backgroundColor:r,...n,dataSizeScalar:o||n.dataSizeScalar})},wv=Ss,Sv=Hg,kv=Vg,Cv=F$,Tv={markupEditorToolbar:Hg(),markupEditorToolStyles:Vg(),markupEditorShapeStyleControls:F$()},Mv=Rm,Rv=Xf,Pv=ty,Ev=ly,Iv=Xb,Av=Kb,Lv=ex,zv=ax,Fv=vx,Dv=yx,Ov=Rx,Bv=Ix,Wv=mg,_v=Qm,Vv=kg,Nv=zx,Hv=Fx,jv=Dx,Uv=Ox,Gv={filterLabel:"Filter",filterIcon:'',filterLabelChrome:"Chrome",filterLabelFade:"Fade",filterLabelCold:"Cold",filterLabelWarm:"Warm",filterLabelPastel:"Pastel",filterLabelMonoDefault:"Mono",filterLabelMonoNoir:"Noir",filterLabelMonoWash:"Wash",filterLabelMonoStark:"Stark",filterLabelSepiaDefault:"Sepia",filterLabelSepiaBlues:"Blues",filterLabelSepiaRust:"Rust",filterLabelSepiaColor:"Color"},Zv={finetuneLabel:"Finetune",finetuneIcon:'',finetuneLabelBrightness:"Brightness",finetuneLabelContrast:"Contrast",finetuneLabelSaturation:"Saturation",finetuneLabelExposure:"Exposure",finetuneLabelTemperature:"Temperature",finetuneLabelGamma:"Gamma",finetuneLabelClarity:"Clarity",finetuneLabelVignette:"Vignette"},Xv={resizeLabel:"Resize",resizeIcon:'',resizeLabelFormCaption:"Image output size",resizeLabelInputWidth:"w",resizeTitleInputWidth:"Width",resizeLabelInputHeight:"h",resizeTitleInputHeight:"Height",resizeTitleButtonMaintainAspectRatio:"Maintain aspectratio",resizeIconButtonMaintainAspectRatio:(e,t)=>``},Yv={decorateLabel:"Decorate",decorateIcon:''},qv={annotateLabel:"Annotate",annotateIcon:''},Kv={stickerLabel:"Sticker",stickerIcon:''},Jv=Bx,Qv=Wx,ew=_x,tw=(e,t,o={})=>(R(t)?Array.from(document.querySelectorAll(t)):t).filter(Boolean).map((t=>e(t,M(o)))),ow=Zx,iw=(e={},t)=>{const{sub:o,pub:i}=Xo(),r={},n=((e={},t)=>new Jx({target:t||document.body,props:{class:e.class,preventZoomViewport:e.preventZoomViewport,preventScrollBodyIfNeeded:e.preventScrollBodyIfNeeded,preventFooterOverlapIfNeeded:e.preventFooterOverlapIfNeeded}}))(e,t),s=()=>{n.hide&&n.hide()},l=()=>{n.show&&n.show()},c=Nx(n.root);Vx(c,r),r.handleEvent=a,c.handleEvent=(e,t)=>{if("init"===e)return r.handleEvent(e,r);r.handleEvent(e,t)},c.on("close",(async()=>{const{willClose:t}=e;if(!t)return s();await t()&&s()}));const d=(e,t)=>/show|hide/.test(e)?o(e,t):c.on(e,t),u=["show","hide"].map((e=>d(e,(t=>r.handleEvent(e,t))))),h=()=>{u.forEach((e=>e())),s(),n.$destroy(),c.destroy()};return qa(r,{on:d,destroy:h,hide:s,show:l}),Object.defineProperty(r,"modal",{get:()=>n.root,set:()=>{}}),n.$on("close",c.close),n.$on("show",(()=>i("show"))),n.$on("hide",(()=>{i("hide"),!1!==e.enableAutoDestroy&&h()})),!1!==e.enableAutoHide&&c.on("process",s),c.on("loadstart",l),!1!==e.enableButtonClose&&(e.enableButtonClose=!0),delete e.class,Object.assign(r,e),r},rw=(e,t)=>Zx(e,{...t,layout:"overlay"}),nw=$v,aw=(e=[])=>$v([mv(gv()),rv(nv()),...e]),sw=(e={})=>{let t,o=void 0;Array.isArray(e.imageReader)||(o=e.imageReader,delete e.imageReader),Array.isArray(e.imageWriter)?t=yv():(t=P(e.imageWriter)?e.imageWriter:yv(e.imageWriter),delete e.imageWriter);let i=void 0;return P(e.imageScrambler)||(i=e.imageScrambler,delete e.imageScrambler),{imageReader:fv(o),imageWriter:t,imageOrienter:xv(),imageScrambler:vv(i)}},lw=(e,t={})=>{const o=sw(t),i="function"==typeof t.shapePreprocessor?t.shapePreprocessor:aw(t.shapePreprocessor);return delete t.shapePreprocessor,t=_a([{...o,shapePreprocessor:i,stickerStickToImage:!0},t]),ks(e,t)},cw=(e={})=>{Rm(Rv,Pv,Ev,Iv,Av,Lv,zv,Fv,Dv,Ov);const t=sw(e),o={...Nv,...Hv,...jv,...Uv,...Gv,...Zv,...Jv,...Qv,...Xv,...Yv,...qv,...Kv,...e.locale};delete e.locale;const i="function"==typeof e.shapePreprocessor?e.shapePreprocessor:aw(e.shapePreprocessor);if(delete e.shapePreprocessor,e.markupEditorShapeStyleControls){Object.entries(e.markupEditorShapeStyleControls).every((([e,t])=>/Options$/.test(e)||!Array.isArray(t)))&&(e.markupEditorShapeStyleControls=Cv({...e.markupEditorShapeStyleControls}))}return _a([{...t,shapePreprocessor:i,utils:["trim","crop","filter","finetune","retouch","annotate","decorate","sticker","fill","frame","redact","resize"],...Wv,..._v,...Vv,...Tv,stickerStickToImage:!0,locale:o},e])},dw=async(e={})=>{const t=await jx();return t.forEach((t=>Object.assign(t,M(e)))),t},uw=(e,t)=>ow(e,cw(t)),hw=(e,t,o,i)=>new Promise((async(r,n)=>{const{format:a="canvas",backgroundColor:s=[0,0,0],foregroundColor:l=[1,1,1],scope:c="mask",padding:d=0,maxSize:u=t,targetSize:h,forceSquareCanvas:p=!1,precision:m=7}=i||{},{flipX:$,flipY:f,rotation:y}=o,b=Math.min(1,2048/t.width),x=Ve({...t},b),v=He({...t},y),w=He({...x},y),S={x:.5*(x.width-w.width),y:.5*(x.height-w.height),...w},k=void 0===l||0===l[3],C=k?[1,1,1]:l,T={imageAnnotation:e.map((e=>((e,t,o)=>{const i={...e};return vr(i,t),i.width||i.rx?i.backgroundColor=o:i.points&&!i.pathClose?(i.strokeJoin="round",i.strokeCap="round",i.strokeColor=o):i.points&&(i.backgroundColor=o,i.strokeColor=[0,0,0,0]),i})(e,b,C))),imageBackgroundColor:"image"===c?[0,0,0]:void 0,imageCropLimitToImage:!1,imageCrop:S,imageFlipX:$,imageFlipY:f,imageRotation:y,imageWriter:{format:"canvas"}},{dest:M}=await lw(g("canvas",x),{...T}),R=M.getContext("2d",{desynchronized:!0,willReadFrequently:!0});let P,E;{const e=Number.MAX_SAFE_INTEGER,{width:t,height:o}=M,i=R.getImageData(0,0,t,o).data;let r,n,a=Math.max(1,parseInt(m,10)),s=t-a,l=o-a,[c,d,h,p]=[e,-e,-e,e];for(r=0;r<=l;r+=a)for(n=0;n<=s;n+=a){i[4*(n+r*t)+3]<=32||(nd&&(d=n),rh&&(h=r))}const g=et([c-m,d+m,h+m,p-m]),$=at(g),f=Math.min(g.width,u.width),y=Math.min(g.height,u.height);P=nt($.x-.5*f,$.y-.5*y,f,y)}lt(P,1/b,de());let I=d,A=d;if("mask"===c){const e=De(P);if(e.width+=2*I,e.height+=2*A,p){const t=Math.max(e.width,e.height);I+=.5*(t-e.width),A+=.5*(t-e.height),e.width=t,e.height=t}let t=1;h&&(t=Math.min(h.width/e.width,h.height/e.height,1)),Ve(e,t);const o=g("canvas",e),i=o.getContext("2d");i.fillStyle=Ho(s),i.fillRect(0,0,o.width,o.height),k&&(i.globalCompositeOperation="destination-out"),i.scale(t,t),i.drawImage(M,-P.x+I,-P.y+A,v.width,v.height),E=o}else E=M;const L=Qe(t);L.x+=.5*(v.width-t.width),L.y+=.5*(v.height-t.height);const[z]=$t(L,y),F=at({...P}),D=ue(F.x-z.x,F.y-z.y);P.x=Math.cos(y)*D.x+Math.sin(y)*D.y-.5*P.width,P.y=Math.cos(y)*D.y-Math.sin(y)*D.x-.5*P.height;const O={...P};if(O.x=P.x,O.y=P.y,$&&f?(O.flipX=!0,O.flipY=!0,O.rotation=-y):$?(O.flipX=!0,O.rotation=y):f?(O.flipY=!0,O.rotation=y):O.rotation=-y,$||f){const e={x:O.x+.5*O.width,y:O.y+.5*O.height};$&&(e.x=Math.abs(t.width-e.x),O.x=e.x-.5*O.width),f&&(e.y=Math.abs(t.height-e.y),O.y=e.y-.5*O.height)}if(I||A){const e=I/(P.width+2*I),t=A/(P.height+2*A);O.backgroundCorners=[{x:e,y:t},{x:1-e,y:t},{x:1-e,y:1-t},{x:e,y:1-t}],P.x-=I,P.y-=A,P.width+=2*I,P.height+=2*A}const B={canvas:E,rect:P,shape:O};"blob"!==a?r({...B,blob:void 0}):E.toBlob((e=>r({...B,blob:e})))}));return e.appendDefaultEditor=uw,e.appendDefaultEditors=(e,t)=>tw(uw,e,t),e.appendEditor=ow,e.appendEditors=(e,t)=>tw(ow,e,t),e.appendNode=(e,t)=>{if(Am(t))return t.push(e);t[3]=[...zm(t),e]},e.blobToFile=j,e.canvasToBlob=O,e.colorStringToColorArray=Bh,e.createDefaultColorOptions=jg,e.createDefaultFontFamilyOptions=Kg,e.createDefaultFontScaleOptions=Zg,e.createDefaultFontSizeOptions=Ug,e.createDefaultFontStyleOptions=Qg,e.createDefaultFrameStyles=gv,e.createDefaultImageOrienter=xv,e.createDefaultImageReader=fv,e.createDefaultImageScrambler=vv,e.createDefaultImageWriter=yv,e.createDefaultLineEndStyleOptions=qg,e.createDefaultLineEndStyles=nv,e.createDefaultLineHeightOptions=Gg,e.createDefaultLineHeightScaleOptions=Xg,e.createDefaultMediaWriter=bv,e.createDefaultShapePreprocessor=aw,e.createDefaultStrokeScaleOptions=Yg,e.createDefaultStrokeWidthOptions=()=>[1,2,3,4,6,8,12,16,20,24,32,48,64],e.createDefaultTextAlignOptions=Jg,e.createEditor=wv,e.createFrameStyleProcessor=mv,e.createLineEndProcessor=rv,e.createMarkupEditorBackgroundColorControl=m$,e.createMarkupEditorBrushSizeControl=Bg,e.createMarkupEditorColorControl=p$,e.createMarkupEditorColorOptions=e$,e.createMarkupEditorFontColorControl=v$,e.createMarkupEditorFontFamilyControl=u$,e.createMarkupEditorFontFamilyOptions=r$,e.createMarkupEditorFontScaleOptions=t$,e.createMarkupEditorFontSizeControl=C$,e.createMarkupEditorFontSizeOptions=e=>e.map(Pg),e.createMarkupEditorFontStyleControl=w$,e.createMarkupEditorFontStyleOptions=n$,e.createMarkupEditorLineEndStyleControl=x$,e.createMarkupEditorLineEndStyleOptions=a$,e.createMarkupEditorLineHeightControl=T$,e.createMarkupEditorLineHeightOptions=e=>e.map(Pg),e.createMarkupEditorLineHeightScaleOptions=o$,e.createMarkupEditorLineStartStyleControl=b$,e.createMarkupEditorOptionControl=f$,e.createMarkupEditorOptionsControl=(e,t={})=>["Dropdown",{...t,options:e}],e.createMarkupEditorSelectionModeControl=Og,e.createMarkupEditorSelectionToolStyles=(e,t)=>{const{tools:o=Dg}=t||{};return o.reduce(((t,o)=>{const[i,r]=Fg[o],n=_g(i,{...r,action:e},{position:"absolute",isSelection:!0});return Object.assign(t,{[`selection-${o}-${e}`]:n})}),{})},e.createMarkupEditorSelectionTools=(e,t)=>{const{tools:o=Dg,hideLabel:i=!0}=t||{};return o.map((t=>[`selection-${t}-${e}`,Rg(t,"shapeLabelToolSelection"),{hideLabel:i,icon:Rg(t,"shapeIconToolSelection")}]))},e.createMarkupEditorShapeStyleControls=Cv,e.createMarkupEditorStrokeColorControl=g$,e.createMarkupEditorStrokeScaleOptions=i$,e.createMarkupEditorStrokeWidthControl=$$,e.createMarkupEditorStrokeWidthOptions=e=>e.map(Pg),e.createMarkupEditorTextAlignControl=M$,e.createMarkupEditorToolStyle=_g,e.createMarkupEditorToolStyles=kv,e.createMarkupEditorToolbar=Sv,e.createNode=function(e,t,o,i){return Array.isArray(o)&&(i=o,o={}),[e,t,o||{},i||[]]},e.createRetouchShape=async(e,t,o,i,r,n)=>{const{retouches:a=[],maxSize:s=t,targetSize:l,padding:c=0,mimeType:d,foregroundColor:u,maskFormat:h="blob",imageFormat:p="blob",forceSquareCanvas:m=!1,didCreateDraft:g=(()=>{})}=n||{},$=[...i],f=[...a],y=new AbortController,{blob:b,canvas:x,rect:v,shape:w}=await hw($,t,o,{scope:"mask",format:h,padding:c,maxSize:s,targetSize:l,forceSquareCanvas:m,foregroundColor:u}),S=((e,t={})=>({id:e,...t,selectionStyle:"hook",disableStyle:["backgroundColor","cornerRadius","opacity","strokeWidth","strokeColor"],disableFlip:!0,disableReorder:!0,disableMove:!0,disableRotate:!0,disableDuplicate:!0,disableSelect:!0}))(L(),{...w});var k;k=S,Object.assign(k,{status:"loading",cornerRadius:15,strokeWidth:1.5,strokeColor:[0,0,0,.25],backgroundColor:[0,0,0,.1],selectionOpacity:0}),g(S,{selection:$});let C={};(d||l||"canvas"===p)&&(C={imageWriter:{}},d&&(C.imageWriter.mimeType=d),l&&(C.imageWriter.targetSize=l),p&&(C.imageWriter.format=p));const{flipX:T,flipY:M,rotation:R}=o,{dest:P}=await lw(e,{imageFlipX:T,imageFlipY:M,imageRotation:R,imageCrop:v,imageManipulation:f,imageCropLimitToImage:!1,...C});let E;try{await r(P,b||x,{shape:S,controller:y}),E="ok"}catch{E="error"}return(e=>(Object.assign(e,{selectionOpacity:1,cornerRadius:0,strokeWidth:0,strokeColor:[0,0,0,0],backgroundColor:[0,0,0,0]}),"error"!==e.status&&delete e.status,e))({...S,status:E,disableSelect:!1})},e.createShapePreprocessor=nw,e.defineCustomElements=dw,e.defineDefaultCustomElements=e=>dw(cw(e)),e.degToRad=Cl,e.dispatchEditorEvents=Em,e.effectBrightness=ag,e.effectClarity=hg,e.effectContrast=sg,e.effectExposure=cg,e.effectGamma=dg,e.effectSaturation=lg,e.effectTemperature=pg,e.effectVignette=ug,e.filterChrome=_m,e.filterCold=Hm,e.filterFade=Vm,e.filterInvert=()=>[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],e.filterMonoDefault=jm,e.filterMonoNoir=Um,e.filterMonoStark=Zm,e.filterMonoWash=Gm,e.filterPastel=Wm,e.filterSepiaBlues=Ym,e.filterSepiaColor=Km,e.filterSepiaDefault=Xm,e.filterSepiaRust=qm,e.filterWarm=Nm,e.findNode=Om,e.frameEdgeCross=xg,e.frameEdgeOverlap=vg,e.frameEdgeSeparate=bg,e.frameHook=wg,e.frameLineMultiple=yg,e.frameLineSingle=fg,e.framePolaroid=Sg,e.frameSolidRound=$g,e.frameSolidSharp=gg,e.getEditorDefaults=cw,e.getEditorProps=()=>(()=>{const e=xs.map(vs),t=Xa.map((([e])=>e)).filter((e=>!bs.includes(e)));return e.concat(t)})().concat((km=new Set(Xc(xm).filter((e=>!wm.includes(e)))),[...km,...Cm])),e.getShapeById=(e,t)=>e.find((e=>e.id===t)),e.getUniqueId=L,e.imageStateToCanvas=(e,t,o)=>{const{targetCanvas:i,targetSize:r,disableDraw:n=!1,shapePreprocessor:a}=o||{},s=i||document.createElement("canvas"),{crop:l,colorMatrix:c,convolutionMatrix:d}=t,u=Qt(e),h={width:u?e.videoWidth:e.width,height:u?e.videoHeight:e.height},{upscale:p=!1,fit:m="contain",width:$,height:f}=r||{};let y=1;"contain"===m?y=Math.min(($||Number.MAX_SAFE_INTEGER)/l.width,(f||Number.MAX_SAFE_INTEGER)/l.height):"cover"===m&&(y=Math.max(($||l.width)/l.width,(f||l.height)/l.height)),p||(y=Math.min(y,1));const b=Math.floor(l.width*y),x=Math.floor(l.height*y),v=u?Gl(b):b,w=u?Gl(x):x,S=Ul(s,{alpha:!0});S.resize(v,w,1);const k=S.textureCreate();let C;S.setCanvasColor([0,0,0,0]),S.drawToCanvas(),S.disableMask(),S.disablePreviewStencil();{const e=Object.values(c||{}).filter(Boolean);e.length&&(C=jr(e))}const T={x:0,y:0,width:v,height:w},{origin:M,translation:R,rotation:P,scale:E}=al(T,T,h,l,{x:0,y:0,width:v,height:w},y,{x:0,y:0},1,t.rotation,t.flipX,t.flipY),I=[h,M.x,M.y,R.x,R.y,P.x,P.y,P.z,E,C,1,d&&d.clarity,Ao(t.gamma)?t.gamma:1,t.vignette||0,[1,0,1,0,1,w,1,v],void 0,void 0,void 0,void 0,!1];let A=!1;const L=t.decoration.length||t.annotation.length,z=L&&S.textureCreate(),F=()=>{S.textureUpdate(k,e,{filterParam:S.textureFilterLinear,wrapParam:S.textureClamp})},D=()=>{F(),S.drawImage(k,...I),L&&A&&S.drawRect(T,0,!1,!1,[0,0,0,0],void 0,z)};return F(),!n&&D(),{canvas:s,prepare:async()=>{if(!L)return;const{dest:e}=await ks(g("canvas",h),{shapePreprocessor:a,imageReader:[[async(e,t,o)=>{const{src:i}=e,r=parseInt(i.width,10),n=parseInt(i.height,10),a=await O(i);return{...e,dest:a,size:{width:r,height:n}}},"read-canvas"]],imageWriter:nl({format:"canvas"}),imageState:{...t,redaction:[],frame:void 0,gamma:void 0,convolutionMatrix:void 0,colorMatrix:void 0,backgroundColor:[0,0,0,0],backgroundImage:void 0,trim:void 0,vignette:void 0,volume:void 0}});S.textureUpdate(z,e,{filterParam:S.textureFilterLinear,wrapParam:S.textureClamp}),A=!0,!n&&D()},redraw:D,destroy:()=>{S.release()}}},e.insertNodeAfter=(e,t,o)=>Fm(e,t,o,(e=>e+1)),e.insertNodeBefore=(e,t,o)=>Fm(e,t,o),e.isSupported=()=>(null===ng&&(ng=u()&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"File"in window&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window),ng),e.legacyDataToImageState=(e,t,o={})=>{const i={};if(!((e={})=>{if("markup"in e||"color"in e||"filter"in e)return!0;const{crop:t}=e;return!(!t||!("flip"in t||"center"in t||"aspectRatio"in t||"rotation"in t))})(o))return o;if(o.crop&&Object.assign(i,rg(t,o.crop)),o.markup){const e=Array.isArray(o.markup)?o.markup:Object.values(o.markup);i.decoration=e.map((e=>((e,t,o)=>{const i=Object.keys(o).reduce(((t,i)=>{let r=o[i];return i=eg[i]||i,/px$/.test(r)?r=tg(r):/^(?:x|y|left|right|top|bottom|width|height|fontSize|borderWidth|strokeWidth)$/.test(i)&&"number"==typeof r&&("strokeWidth"!==i&&"borderWidth"!==i&&"fontSize"!==i||(r=Math.min(e.width,e.height)*r+"px"),r=tg(r)),/color/i.test(i)&&r&&(r=Bh(r)),null===r&&(r=void 0),t[i]=r,t}),{});if("line"===t&&(i.lineDecoration.length>=1&&(i.lineEnd="arrow"),2===i.lineDecoration.length&&(i.lineStart="arrow"),i.x1=i.x,i.y1=i.y,i.x2=og(i.x,i.width),i.y2=og(i.y,i.height),delete i.x,delete i.y,delete i.width,delete i.height,delete i.lineDecoration,delete i.lineStyle),"text"===t){if(!Ao(i.y)){const t=Math.min(e.width,e.height);i.y=t*(parseFloat(i.y)/100)}i.y=i.y-i.fontSize,delete i.width,delete i.height,delete i.borderStyle,i.lineHeight=i.lineHeight||"120%"}if("ellipse"===t){let t,o;if(/%$/.test(i.width)){t=parseFloat(i.width)/100,o=parseFloat(i.height)/100;const r=t*e.width,n=o*e.height;t=r/e.width*100,o=n/e.height*100}else t=i.width,o=i.height;i.rx=.5*t,i.ry=.5*o,/%$/.test(i.width)&&(i.rx+="%",i.ry+="%"),i.x=og(i.x,i.rx),i.y=og(i.y,i.ry),delete i.width,delete i.height,delete i.borderStyle}if("rect"===t&&delete i.borderStyle,"path"===t){let e,t=[];for(const o of i.points)e?Me(e,o)<1e-9||(t.push(o),e=o,e=o):(t.push(o),e=o);i.points=t.map((e=>({x:tg(e.x),y:tg(e.y)})))}return i})(i.crop||t,e[0],e[1])))}if(o.color||o.colors){const e=o.color||o.colors;Object.keys(e).filter((t=>e[t])).map((t=>[t,Array.isArray(e[t].matrix)?e[t].matrix:Object.values(e[t].matrix)])).forEach((([e,t])=>{i.colorMatrix||(i.colorMatrix={}),i.colorMatrix[e]=t}))}if(o.filter||o.filters){const t=o.filters||o.filter;i.colorMatrix||(i.colorMatrix={});const r=e?e.filterFunctions:Jm;i.colorMatrix.filter="string"==typeof t&&r[t]?r[t]():t.matrix}const r=o.size?o.size:!!o.resize&&o.resize.size;return r&&r.width&&r.height&&(i.targetSize={width:r.width,height:r.height}),i},e.locale_en_gb=Nv,e.markup_editor_defaults=Tv,e.markup_editor_locale_en_gb=Hv,e.naturalAspectRatioToNumber=e=>{if(void 0===e||Ao(e))return e;if(!R(e))return!1;const t=e;if(!t.length)return;const[o,i]=t.split(/\/|:/g).map((e=>parseFloat(e.replace(/,/,".")))).filter(Boolean);return!!o&&(i?Math.abs(o/i):o)},e.openDefaultEditor=(e,t)=>iw(cw(e),t),e.openEditor=iw,e.overlayDefaultEditor=(e,t)=>rw(e,cw(t)),e.overlayEditor=rw,e.plugin_annotate=Iv,e.plugin_annotate_locale_en_gb=qv,e.plugin_crop=Rv,e.plugin_crop_locale_en_gb=jv,e.plugin_decorate=Av,e.plugin_decorate_locale_en_gb=Yv,e.plugin_fill=Ov,e.plugin_fill_locale_en_gb=Uv,e.plugin_filter=Pv,e.plugin_filter_defaults=_v,e.plugin_filter_locale_en_gb=Gv,e.plugin_finetune=Ev,e.plugin_finetune_defaults=Wv,e.plugin_finetune_locale_en_gb=Zv,e.plugin_frame=zv,e.plugin_frame_defaults=Vv,e.plugin_frame_locale_en_gb=Jv,e.plugin_redact=Fv,e.plugin_redact_locale_en_gb=Qv,e.plugin_resize=Dv,e.plugin_resize_locale_en_gb=Xv,e.plugin_retouch=Bv,e.plugin_retouch_locale_en_gb=ew,e.plugin_sticker=Lv,e.plugin_sticker_locale_en_gb=Kv,e.processDefaultImage=lw,e.processImage=ks,e.removeNode=Dm,e.selectionToMask=hw,e.setPlugins=Mv,e.shapeGetCenter=wr,e.shapeGetLength=e=>{if(e.x1)return Re(ue(e.x1,e.y1),ue(e.x2,e.y2))},e.shapeGetLevel=(e,t)=>{let o=!1;t.flipX&&e.flipX?o=!0:!t.flipX&&e.flipX?o=!1:t.flipX&&!e.flipX&&(o=!0);let i=!1;t.flipY&&e.flipY?i=!0:!t.flipY&&e.flipY?i=!1:t.flipY&&!e.flipY&&(i=!0);let r=-t.rotation;return!o&&!i||o&&i||(r=-r),{flipX:o,flipY:i,rotation:r}},e.supportsWebGL=Rp,e.updateNode=(e,t)=>{const[,,o]=e;Object.assign(o,t)},e.updateShapeById=(e,t,o)=>e.map((e=>e.id!==t?e:o(e))),Object.defineProperty(e,"__esModule",{value:!0}),e}({}); diff --git a/src/components/@pqina/pintura/pintura-umd.js b/src/components/@pqina/pintura/pintura-umd.js new file mode 100644 index 0000000..b561db4 --- /dev/null +++ b/src/components/@pqina/pintura/pintura-umd.js @@ -0,0 +1,11 @@ +/*! + * Pintura v8.71.2 - Test version + * (c) 2018-2024 PQINA Inc. - All Rights Reserved + * License: https://pqina.nl/pintura/license/ + * + * This version of Pintura is for testing purposes only. + * Visit https://pqina.nl/pintura/ to obtain a commercial license. + */ +/* eslint-disable */ + +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).pintura={})}(this,(function(e){"use strict";const t=[{value:65504,name:"jfif"},{value:65498,name:"sos"},{value:65505,subvalue:17784,name:"exif"},{value:65505,subvalue:26740,name:"xmp"},{value:65506,subvalue:19792,name:"mpf"}];var o=e=>{if(65496!==e.getUint16(0))return;const o=e.byteLength;let i,r=2,n=void 0;for(;rt.value===i&&(!t.subvalue||t.subvalue===e.getUint16(r+2+2))));if(o){const{name:t}=o;n||(n={}),n[t]||(n[t]={offset:r,size:e.getUint16(r+2)})}if(65498===i)break;r+=2+e.getUint16(r+2)}return n};var i=(e,t,i)=>{if(!e)return;const r=new DataView(e),n=o(r);if(!n||!n.exif)return;const a=((e,t)=>{if(65505!==e.getUint16(t))return;const o=e.getUint16(t+2);if(t+=4,1165519206!==e.getUint32(t))return;t+=6;const i=e.getUint16(t);if(18761!==i&&19789!==i)return;const r=18761===i;if(t+=2,42!==e.getUint16(t,r))return;t+=e.getUint32(t+2,r);const n=i=>{const n=[];let a=t;const s=Math.min(e.byteLength,t+o-16);for(;a{const o=n(t);if(o.length)return e.getUint16(o[0]+8,r)},write:(t,o)=>{const i=n(t);return!!i.length&&(i.forEach((t=>e.setUint16(t+8,o,r))),!0)}}})(r,n.exif.offset);return a?void 0===i?a.read(t):a.write(t,i):void 0};const r="__pqina_webapi__";var n=e=>window[r]?window[r][e]:window[e],a=(...e)=>{};const s={ArrayBuffer:"readAsArrayBuffer"};var l=async(e,t=[0,e.size],o)=>await((e,t=a,o={})=>new Promise(((i,r)=>{const{dataFormat:a=s.ArrayBuffer}=o,l=new(n("FileReader"));l.onload=()=>i(l.result),l.onerror=()=>r(l.error),l.onprogress=t,l[a](e)})))(e.slice(...t),o),c=async(e,t)=>{const o=await l(e,[0,262144],t);return i(o,274)||1};let d=null;var u=()=>(null===d&&(d="undefined"!=typeof window&&void 0!==window.document),d);let h=null;var p=()=>new Promise((e=>{if(null===h){const t="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";let o=u()?new Image:{};return o.onload=()=>{h=1===o.naturalWidth,o=void 0,e(h)},void(o.src=t)}return e(h)})),m=e=>e.getContext("2d").getImageData(0,0,e.width,e.height),g=(e,t,o=[])=>{const i=document.createElement(e),r=Object.getOwnPropertyDescriptors(i.__proto__);for(const e in t)"style"===e?i.style.cssText=t[e]:r[e]&&r[e].set||/textContent|innerHTML/.test(e)||"function"==typeof t[e]?i[e]=t[e]:i.setAttribute(e,t[e]);return o.forEach((e=>i.appendChild(e))),i};const $={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]};var f=e=>{e.width=1,e.height=1;const t=e.getContext("2d");t&&t.clearRect(0,0,1,1)},y=e=>"data"in e,b=e=>u()?RegExp(e).test(window.navigator.userAgent):void 0;let x=null;var v=()=>(null===x&&(x=b(/Android/)),x),w=(e,t)=>{const o=g("canvas",{width:e.width,height:e.height});return o.getContext("2d",t).drawImage(e,0,0),o},S=async(e,t=1)=>{const o=await p(),[i,r]=o||t<5?[e.width,e.height]:[e.height,e.width],n=g("canvas",{width:i,height:r}),a=n.getContext("2d",{willReadFrequently:!0});if(y(e)&&!o&&t>1){const t=g("canvas",{width:e.width,height:e.height});t.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),e=t}if(!o&&t>1&&a.transform.apply(a,((e,t,o=-1)=>(-1===o&&(o=1),$[o](e,t)))(e.width,e.height,t)),y(e)){if(a.putImageData(e,0,0),v())return w(n)}else a.drawImage(e,0,0);return e instanceof HTMLCanvasElement&&f(e),n},k=async(e,t=1)=>1===t||await p()?e:m(await S(e,t)),C=e=>"object"==typeof e;const T=e=>e instanceof HTMLElement?e:C(e)?M(e):e,M=e=>{let t;return Array.isArray(e)?(t=[],e.forEach(((e,o)=>{t[o]=T(e)}))):(t={},Object.keys(e).forEach((o=>{const i=e[o];t[o]=T(i)}))),t};var R=e=>"string"==typeof e,P=e=>"function"==typeof e,E=(e,t)=>new Promise(((o,i)=>{const r=()=>o(((e,{width:t,height:o,canvasMemoryLimit:i,contextOptions:r})=>{let n=t||e.naturalWidth,a=o||e.naturalHeight;n||a||(n=300,a=150);const s=n*a;if(i&&s>i){const e=Math.sqrt(i)/Math.sqrt(s);n=Math.floor(n*e),a=Math.floor(a*e)}const l=g("canvas");return l.width=n,l.height=a,l.getContext("2d",r).drawImage(e,0,0,n,a),l})(e,t));e.complete&&e.width?r():(e.onload=r,e.onerror=()=>i(new Error("Failed to load image")))})),I=()=>"createImageBitmap"in window,A=e=>/svg/.test(e.type),L=()=>Math.random().toString(36).substring(2,9);const z=new Map;var F=(e,t,o)=>new Promise(((i,r)=>{const n=e.toString();let a=z.get(n);if(!a){const t=(e=>`function () {self.onmessage = function (message) {(${e.toString()}).apply(null, message.data.content.concat([function (err, response) {\n response = response || {};\n const transfer = 'data' in response ? [response.data.buffer] : 'width' in response ? [response] : [];\n return self.postMessage({ id: message.data.id, content: response, error: err }, transfer);\n}]))}}`)(e),o=URL.createObjectURL((e=>new Blob(["(","function"==typeof e?e.toString():e,")()"],{type:"application/javascript"}))(t)),i=new Map,r=new Worker(o);a={url:o,worker:r,messages:i,terminationTimeout:void 0,terminate:()=>{clearTimeout(a.terminationTimeout),a.worker.terminate(),URL.revokeObjectURL(o),z.delete(n)}},r.onmessage=function(e){const{id:t,content:o,error:r}=e.data;if(clearTimeout(a.terminationTimeout),a.terminationTimeout=setTimeout((()=>{i.size>0||a.terminate()}),500),!i.has(t))return;const n=i.get(t);i.delete(t),null!=r?n.reject(r):n.resolve(o)},z.set(n,a)}const s=L();a.messages.set(s,{resolve:i,reject:r}),a.worker.postMessage({id:s,content:t},o)})),D=async(e,t)=>{const o=async()=>{const o=await(async(e,t)=>{const o=g("img",{src:URL.createObjectURL(e)}),i=await E(o,t);return URL.revokeObjectURL(o.src),i})(e,{canvasMemoryLimit:t,contextOptions:{willReadFrequently:!0}}),i=m(o);return f(o),i};if(v())return await o();let i;if(I()&&!A(e)&&"OffscreenCanvas"in window)try{i=await F(((e,t,o)=>{createImageBitmap(e).then((e=>{let i=e.width,r=e.height;const n=i*r;if(t&&n>t){const e=Math.sqrt(t)/Math.sqrt(n);i=Math.floor(i*e),r=Math.floor(r*e)}const a=new OffscreenCanvas(i,r),s=a.getContext("2d",{willReadFrequently:!0});s.drawImage(e,0,0,i,r);const l=s.getImageData(0,0,a.width,a.height);o(null,l)})).catch((e=>{o(e)}))}),[e,t])}catch(e){}return i&&i.width?i:await o()},O=(e,t,o)=>new Promise(((i,r)=>{try{e.toBlob((e=>{if(!e)return r(new Error("Failed to create blob"));i(e)}),t,o)}catch(e){r(e)}})),B=async(e,t,o)=>{const i=await S(e),r=await O(i,t,o);return f(i),r};const W={matroska:"mkv"};var _=e=>{const t=(e.match(/\/([a-z0-9]+)/)||[])[1];if(/^x/.test(t)){const[,t=""]=e.split("/x-");return W[t]}return t},V=e=>e.substr(0,e.lastIndexOf("."))||e;const N=/avif|bmp|gif|jpg|jpeg|jpe|jif|jfif|png|svg|tiff|webp/;var H=e=>{return e&&(t=(o=e,o.split(".").pop()).toLowerCase(),N.test(t)?"image/"+(/jfif|jif|jpe|jpg/.test(t)?"jpeg":"svg"===t?"svg+xml":t):"");var t,o},j=(e,t,o)=>{const i=(new Date).getTime(),r=e.type.length&&!/null|text/.test(e.type),a=r?e.type:o,s=((e,t)=>{const o=H(e);if(o===t)return e;const i=_(t)||o;return`${V(e)}.${i}`})(t,a);try{return new(n("File"))([e],s,{lastModified:i,type:r?e.type:a})}catch(t){const o=r?e.slice():e.slice(0,e.size,a);return o.lastModified=i,o.name=s,o}},U=(e,t)=>e/t,G=e=>e;const Z=Math.PI,X=Math.PI/2,Y=X/2;var q=e=>{const t=Math.abs(e)%Math.PI;return t>Y&&tparseFloat(e.toFixed(t));const le=(e,t,o)=>o+(e-o)*t,ce=e=>({x:e.x+.5*e.width,y:e.y+.5*e.height,rx:.5*e.width,ry:.5*e.height}),de=()=>ue(0,0),ue=(e,t)=>({x:e,y:t}),he=e=>ue(e.pageX,e.pageY),pe=e=>ue(e.x,e.y),me=e=>(e.x=-e.x,e.y=-e.y,e),ge=(e,t,o=de())=>{const i=Math.cos(t),r=Math.sin(t),n=e.x-o.x,a=e.y-o.y;return e.x=o.x+i*n-r*a,e.y=o.y+r*n+i*a,e},$e=e=>Math.sqrt(e.x*e.x+e.y*e.y),fe=e=>{const t=Math.sqrt(e.x*e.x+e.y*e.y);return 0===t?de():(e.x/=t,e.y/=t,e)},ye=(e,t)=>Math.atan2(t.y-e.y,t.x-e.x),be=(e,t)=>e.x===t.x&&e.y===t.y,xe=(e,t)=>(e.x=t(e.x),e.y=t(e.y),e),ve=(e,t)=>(e.x+=t.x,e.y+=t.y,e),we=(e,t)=>(e.x-=t.x,e.y-=t.y,e),Se=(e,t)=>(e.x/=t,e.y/=t,e),ke=(e,t)=>(e.x*=t,e.y*=t,e),Ce=(e,t)=>e.x*t.x+e.y*t.y,Te=(e,t)=>e.x*t.y-e.y*t.x,Me=(e,t=de())=>{const o=e.x-t.x,i=e.y-t.y;return o*o+i*i},Re=(e,t=de())=>Math.sqrt(Me(e,t)),Pe=(e,t,o)=>(e.x=le(e.x,t,o.x),e.y=le(e.y,t,o.y),e),Ee=e=>{let t=0,o=0;return e.forEach((e=>{t+=e.x,o+=e.y})),ue(t/e.length,o/e.length)},Ie=(e,t,o,i,r)=>(e.forEach((e=>{e.x=t?i-(e.x-i):e.x,e.y=o?r-(e.y-r):e.y})),e),Ae=(e,t,o,i)=>{const r=Math.sin(t),n=Math.cos(t);return e.forEach((e=>{e.x-=o,e.y-=i;const t=e.x*n-e.y*r,a=e.x*r+e.y*n;e.x=o+t,e.y=i+a})),e},Le=(e,t)=>({width:e,height:t}),ze=e=>Le(e.width,e.height),Fe=e=>Le(e.width,e.height),De=e=>Le(e.width,e.height),Oe=e=>Le(e[0],e[1]),Be=e=>{return/img/i.test(e.nodeName)?Le((t=e).naturalWidth,t.naturalHeight):Fe(e);var t},We=(e,t)=>Le(e,t),_e=(e,t,o=G)=>o(e.width)===o(t.width)&&o(e.height)===o(t.height),Ve=(e,t)=>(e.width*=t,e.height*=t,e),Ne=e=>ue(.5*e.width,.5*e.height),He=(e,t)=>{const o=Math.abs(t),i=Math.abs(Math.cos(o)),r=Math.abs(Math.sin(o)),n=i*e.width+r*e.height,a=r*e.width+i*e.height;return e.width=n,e.height=a,e},je=(e,t)=>e.width>=t.width&&e.height>=t.height,Ue=(e,t)=>(e.width=t(e.width),e.height=t(e.height),e),Ge=(e,t)=>({start:e,end:t}),Ze=e=>Ge(pe(e.start),pe(e.end)),Xe=(e,t)=>{if(0===t)return e;const o=ue(e.start.x-e.end.x,e.start.y-e.end.y),i=fe(o),r=ke(i,t);return e.start.x+=r.x,e.start.y+=r.y,e.end.x-=r.x,e.end.y-=r.y,e},Ye=[ue(-1,-1),ue(-1,1),ue(1,1),ue(1,-1)],qe=(e,t,o,i)=>({x:e,y:t,width:o,height:i}),Ke=e=>qe(e.x,e.y,e.width,e.height),Je=()=>qe(0,0,0,0),Qe=e=>qe(0,0,e.width,e.height),et=e=>qe(e[3],e[0],e[1]-e[3],e[2]-e[0]),tt=e=>qe(e.x||0,e.y||0,e.width||0,e.height||0),ot=e=>{let t=e[0].x,o=e[0].x,i=e[0].y,r=e[0].y;return e.forEach((e=>{t=Math.min(t,e.x),o=Math.max(o,e.x),i=Math.min(i,e.y),r=Math.max(r,e.y)})),qe(t,i,o-t,r-i)},it=e=>nt(e.x-e.rx,e.y-e.ry,2*e.rx,2*e.ry),rt=(e,t)=>qe(e.x-.5*t.width,e.y-.5*t.height,t.width,t.height),nt=(e,t,o,i)=>qe(e,t,o,i),at=e=>ue(e.x+.5*e.width,e.y+.5*e.height),st=(e,t)=>(e.x+=t.x,e.y+=t.y,e),lt=(e,t,o)=>(o=o||at(e),e.x=t*(e.x-o.x)+o.x,e.y=t*(e.y-o.y)+o.y,e.width=t*e.width,e.height=t*e.height,e),ct=(e,t,o,i)=>{const r=(i.x-e.x)/e.width,n=(i.y-e.y)/e.height;let a=Math.max(t.width,e.width),s=Math.max(t.height,e.height);return a=Math.min(o.width,a),s=Math.min(o.height,s),e.x=i.x-r*a,e.y=i.y-n*s,e.width=a,e.height=s,e},dt=(e,t)=>{const[o,i]=ae[t],r=o*e.width,n=i*e.height;return ue(e.x+r,e.y+n)},ut=(e,t)=>(e.x*=t,e.y*=t,e.width*=t,e.height*=t,e),ht=(e,t,o=G)=>o(e.x)===o(t.x)&&o(e.y)===o(t.y)&&o(e.width)===o(t.width)&&o(e.height)===o(t.height),pt=e=>U(e.width,e.height),mt=(e,t,o,i,r)=>(e.x=t,e.y=o,e.width=i,e.height=r,e),gt=(e,t)=>(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e),$t=(e,t,o)=>(o||(o=at(e)),wt(e).map((e=>ge(e,t,o)))),ft=(e,t)=>qe(.5*e.width-.5*t.width,.5*e.height-.5*t.height,t.width,t.height),yt=(e,t)=>!(t.xe.x+e.width)&&!(t.y>e.y+e.height))),bt=(e,t,o=de())=>{if(0===e.width||0===e.height)return Je();const i=pt(e);t||(t=i);let r=e.width,n=e.height;return t>i?r=n*t:n=r/t,qe(o.x+.5*(e.width-r),o.y+.5*(e.height-n),r,n)},xt=(e,t=pt(e),o=de())=>{if(0===e.width||0===e.height)return Je();let i=e.width,r=i/t;return r>e.height&&(r=e.height,i=r*t),qe(o.x+.5*(e.width-i),o.y+.5*(e.height-r),i,r)},vt=e=>[Math.min(e.y,e.y+e.height),Math.max(e.x,e.x+e.width),Math.max(e.y,e.y+e.height),Math.min(e.x,e.x+e.width)],wt=e=>[ue(e.x,e.y),ue(e.x+e.width,e.y),ue(e.x+e.width,e.y+e.height),ue(e.x,e.y+e.height)],St=(e,t)=>{if(e)return e.x=t(e.x),e.y=t(e.y),e.width=t(e.width),e.height=t(e.height),e},kt=(e,t,o=at(e))=>wt(e).map(((e,i)=>{const r=Ye[i];return ue(le(e.x,1+r.x*t.x,o.x),le(e.y,1+r.y*t.y,o.y))})),Ct=e=>(e.x=0,e.y=0,e),Tt=e=>{const t=e[0],o=e[e.length-1];e=be(t,o)?e:[...e,t];const i=t.x,r=t.y;let n,a,s,l=0,c=0,d=0,u=0;const h=e.length;for(;ch-1?0:c+1],s=(n.y-r)*(a.x-i)-(a.y-r)*(n.x-i),l+=s,d+=(n.x+a.x-2*i)*s,u+=(n.y+a.y-2*r)*s;return s=3*l,ue(i+d/s,r+u/s)},Mt=(e,t)=>Rt(e.start,e.end,t.start,t.end),Rt=(e,t,o,i)=>{const r=(i.y-o.y)*(t.x-e.x)-(i.x-o.x)*(t.y-e.y);if(0===r)return;const n=((i.x-o.x)*(e.y-o.y)-(i.y-o.y)*(e.x-o.x))/r,a=((t.x-e.x)*(e.y-o.y)-(t.y-e.y)*(e.x-o.x))/r;return n<0||n>1||a<0||a>1?void 0:ue(e.x+n*(t.x-e.x),e.y+n*(t.y-e.y))},Pt=(e,t,{ignoreIdenticalLines:o=!1,breakOnIntersection:i=!1}={})=>{const r=t.length,n=[];for(let a=0;a{let o=0,i=0,r=!1;const n=t.length;for(o=0,i=n-1;oe.y!=t[i].y>e.y&&e.x<(t[i].x-t[o].x)*(e.y-t[o].y)/(t[i].y-t[o].y)+t[o].x&&(r=!r);return r},It=e=>{const t=[];for(let o=0;oIt(e).map((e=>Xe(e,t))),Lt=(e,t,o,i=0,r=!1,n=!1,a=12)=>{const s=[];for(let i=0;i{const r=ue(e.x-o.x,e.y-o.y),n=ue(i.x-o.x,i.y-o.y),a=Ce(n,n);let s=Ce(r,n)/a;s=s<0?0:s,s=s>1?1:s;const l=ue(n.x*s+o.x-e.x,n.y*s+o.y-e.y);return Ce(l,l)<=t*t},Ft=(e,t,o)=>{const i=o.length;for(let r=0;r!!Et(e,o)||(!!Ft(e,t,o)||zt(e,t,o[0],o[o.length-1])),Ot=(e,t,o,i,r)=>Dt(e,t,$t(o,i,r||at(o)));var Bt=(e,t)=>{const o=Qe(e),i=at(o),r=$t(o,t,i);return Ct(ot(r))},Wt=(e,t)=>e instanceof HTMLElement&&(!t||new RegExp(`^${t}$`,"i").test(e.nodeName)),_t=e=>e instanceof File,Vt=async(e,t,o)=>{const i=await O(e,t,o);return j(i,"canvas")},Nt=e=>e.split("/").pop().split(/\?|\#/).shift();const Ht=u()&&!!Node.prototype.replaceChildren?(e,t)=>e.replaceChildren(t):(e,t)=>{for(;e.lastChild;)e.removeChild(e.lastChild);void 0!==t&&e.append(t)},jt=u()&&g("div",{class:"PinturaMeasure",style:"position:absolute;left:0;top:0;width:99999px;height:0;pointer-events:none;contain:strict;margin:0;padding:0;"});let Ut;var Gt=e=>(Ht(jt,e),jt.parentNode||document.body.append(jt),clearTimeout(Ut),Ut=setTimeout((()=>{jt.remove()}),500),e);let Zt=null;var Xt=()=>(null===Zt&&(Zt=u()&&/^((?!chrome|android).)*(safari|iphone|ipad)/i.test(navigator.userAgent)),Zt),Yt=e=>new Promise(((t,o)=>{let i=!1;!e.parentNode&&Xt()&&(i=!0,e.style.cssText="position:absolute;visibility:hidden;pointer-events:none;left:0;top:0;width:0;height:0;",Gt(e));const r=()=>{const o=e.naturalWidth,r=e.naturalHeight;o&&r&&(i&&e.remove(),clearInterval(n),t({width:o,height:r}))};e.onerror=e=>{clearInterval(n),o(e)};const n=setInterval(r,1);r()})),qt=e=>new Promise(((t,o)=>{const i=()=>{t({width:e.videoWidth,height:e.videoHeight})};if(e.readyState>=1)return i();e.onloadedmetadata=i,e.onerror=()=>o(e.error)})),Kt=e=>/^image/.test(e.type),Jt=e=>new Promise((t=>{const o=R(e)?e:URL.createObjectURL(e),i=()=>{const e=new Image;e.src=o,t(e)};if(e instanceof Blob&&Kt(e))return i();const r=document.createElement("video");r.preload="metadata",r.onloadedmetadata=()=>t(r),r.onerror=i,r.src=o})),Qt=e=>"VIDEO"===e.nodeName,eo=async e=>{let t,o;t=e.src?e:await Jt(e);try{o=Qt(t)?await qt(t):await Yt(t)}finally{_t(e)&&URL.revokeObjectURL(t.src)}return o};var to=async e=>{const t=await eo(e),o=await(e=>new Promise(((t,o)=>{if(e.complete)return t(e);e.onload=()=>t(e),e.onerror=()=>o(new Error("Failed to load image"))})))(e),i=g("canvas",t);i.getContext("2d",{willReadFrequently:!0}).drawImage(o,0,0);const r=await O(i);return j(r,Nt(o.src))},oo=(e=0,t=!0)=>new(n("ProgressEvent"))("progress",{loaded:100*e,total:100,lengthComputable:t}),io=(e,t,o=(e=>e))=>e.getAllResponseHeaders().indexOf(t)>=0?o(e.getResponseHeader(t)):void 0,ro=e=>{if(!e)return null;const t=e.split(/filename=|filename\*=.+''/).splice(1).map((e=>e.trim().replace(/^["']|[;"']{0,2}$/g,""))).filter((e=>e.length));return t.length?decodeURI(t[t.length-1]):null};const no="URL_REQUEST";class ao extends Error{constructor(e,t,o){super(e),this.name="EditorError",this.code=t,this.metadata=o}}var so=(e,t)=>{const{headers:o={},credentials:i}=t||{};Object.entries(o).forEach((([t,o])=>e.setRequestHeader(t,o))),i&&(e.withCredentials="omit"!==i)},lo=(e,t,o)=>/^data:/.test(e)?(async(e,t="data-uri",o=a)=>{o(oo(0));const i=await fetch(e);o(oo(.33));const r=await i.blob();let n;Kt(r)||(n="image/"+(e.includes(",/9j/")?"jpeg":"png")),o(oo(.66));const s=j(r,t,n);return o(oo(1)),s})(e,void 0,t):((e,t,o)=>new Promise(((i,r)=>{const n=()=>r(new ao("Error fetching image",no,a)),a=new XMLHttpRequest;a.onprogress=t,a.onerror=n,a.onload=()=>{if(!a.response||a.status>=300||a.status<200)return n();const t=io(a,"Content-Type"),o=io(a,"Content-Disposition",ro)||Nt(e);i(j(a.response,o,t||H(o)))};const{willRequest:s}=o;Promise.resolve(s&&s(e,{resourceType:"image"})).then((t=>{if(!1===t)return r("Image load rejected");a.open("GET",e),so(a,t),a.responseType="blob",a.send()})).catch(console.error)})))(e,t,o),co=e=>e instanceof Blob&&!(e instanceof File),uo=e=>"close"in e,ho=async(e,t,o)=>{if(_t(e)||co(e))return e;if(R(e))return await lo(e,t,o);if(Wt(e,"canvas"))return await Vt(e);if(Wt(e,"img"))return await to(e);if(y(e)||uo(e))return await Vt(await S(e));throw new ao("Invalid image source","invalid-image-source")};let po=null;var mo=()=>(null===po&&(po=u()&&/^mac/i.test(navigator.platform)),po);let go=null;var $o=()=>(null===go&&(go=u()&&(b(/iPhone|iPad|iPod/)||mo()&&navigator.maxTouchPoints>=1)),go),fo=async(e,t=1)=>await p()||$o()||t<5?e:We(e.height,e.width),yo=e=>/jpeg/.test(e.type),bo=e=>{return"object"!=typeof(t=e)||t.constructor!=Object?e:JSON.stringify(e);var t},xo=(e,t=0,o)=>(0===t||(e.translate(o.x,o.y),e.rotate(t),e.translate(-o.x,-o.y)),e),vo=(e,t,o)=>(e.scale(t,o),e),wo=async(e,t={})=>{const{flipX:o,flipY:i,rotation:r,crop:n}=t,a=Fe(e),s=o||i,l=!!r,c=n&&(n.x||n.y||n.width||n.height),d=c&&ht(n,Qe(a)),u=c&&!d;if(!s&&!l&&!u)return e;let h,p=g("canvas",{width:e.width,height:e.height});if(p.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),s){const e=g("canvas",{width:p.width,height:p.height}).getContext("2d",{willReadFrequently:!0});vo(e,o?-1:1,i?-1:1),e.drawImage(p,o?-p.width:0,i?-p.height:0),e.restore(),f(p),p=e.canvas}if(l){const e=Ue(De(ot($t(tt(p),r))),Math.floor),t=g("canvas",{width:n.width,height:n.height}).getContext("2d",{willReadFrequently:!0});((e,t,o)=>{e.translate(t,o)})(t,-n.x,-n.y),xo(t,r,Ne(e)),t.drawImage(p,.5*(e.width-p.width),.5*(e.height-p.height)),t.restore(),f(p),p=t.canvas}else if(u){return h=p.getContext("2d",{willReadFrequently:!0}).getImageData(n.x,n.y,n.width,n.height),f(p),h}return h=p.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,p.width,p.height),f(p),h},So=(e,t)=>{const{imageData:o,width:i,height:r}=e,n=o.width,a=o.height,s=Math.round(i),l=Math.round(r),c=o.data,d=new Uint8ClampedArray(s*l*4),u=n/s,h=a/l,p=Math.ceil(.5*u),m=Math.ceil(.5*h);for(let e=0;e1)continue;if(i=2*u*u*u-3*u*u+1,i<=0)continue;t=4*(e+o*n);const h=c[t+3];f+=i*h,a+=i,h<255&&(i=i*h/250),l+=i*c[t],g+=i*c[t+1],$+=i*c[t+2],r+=i}}d[o]=l/r,d[o+1]=g/r,d[o+2]=$/r,d[o+3]=f/a}t(null,{data:d,width:s,height:l})},ko=e=>{if(e instanceof ImageData)return e;let t;try{t=new ImageData(e.width,e.height)}catch(o){t=g("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},Co=async(e,t={},o)=>{const{width:i,height:r,fit:n,upscale:a}=t;if(!i&&!r)return e;let s=i,l=r;if(i?r||(l=i):s=r,"force"!==n){const t=s/e.width,o=l/e.height;let i=1;if("cover"===n?i=Math.max(t,o):"contain"===n&&(i=Math.min(t,o)),i>1&&!1===a)return e;s=Math.round(e.width*i),l=Math.round(e.height*i)}return s=Math.max(s,1),l=Math.max(l,1),e.width===s&&e.height===l?e:o?o(e,s,l):(e=await F(So,[{imageData:e,width:s,height:l}],[e.data.buffer]),ko(e))},To=(e,t)=>{const{imageData:o,matrix:i}=e;if(!i)return t(null,o);const r=new Uint8ClampedArray(o.width*o.height*4),n=o.data,a=n.length,s=i[0],l=i[1],c=i[2],d=i[3],u=i[4],h=i[5],p=i[6],m=i[7],g=i[8],$=i[9],f=i[10],y=i[11],b=i[12],x=i[13],v=i[14],w=i[15],S=i[16],k=i[17],C=i[18],T=i[19];let M=0,R=0,P=0,E=0,I=0,A=0,L=0,z=0,F=0,D=0,O=0,B=0;for(;M{const{imageData:o,matrix:i}=e;if(!i)return t(null,o);let r=i.reduce(((e,t)=>e+t));r=r<=0?1:r;const n=o.width,a=o.height,s=o.data;let l=0,c=0,d=0;const u=Math.round(Math.sqrt(i.length)),h=Math.floor(u/2);let p=0,m=0,g=0,$=0,f=0,y=0,b=0,x=0,v=0,w=0;const S=new Uint8ClampedArray(n*a*4);for(d=0;d=a&&(b=0),x<0&&(x=n-1),x>=n&&(x=0),v=4*(b*n+x),w=i[y*u+f],p+=s[v]*w,m+=s[v+1]*w,g+=s[v+2]*w,$+=s[v+3]*w;S[l]=p/r,S[l+1]=m/r,S[l+2]=g/r,S[l+3]=$/r,l+=4}t(null,{data:S,width:n,height:a})},Ro=(e,t)=>{let{imageData:o,strength:i}=e;if(!i)return t(null,o);const r=new Uint8ClampedArray(o.width*o.height*4),n=o.width,a=o.height,s=o.data,l=(e,t)=>(c=e-w,d=t-S,Math.sqrt(c*c+d*d));let c,d,u,h,p,m,g,$,f,y,b,x=0,v=0,w=.5*n,S=.5*a,k=l(0,0);for(i>0?(u=0,h=0,p=0):(i=Math.abs(i),u=1,h=1,p=1),v=0;v{const{imageData:o,level:i,monochrome:r=!1}=e;if(!i)return t(null,o);const n=new Uint8ClampedArray(o.width*o.height*4),a=o.data,s=a.length;let l,c,d,u=0;const h=()=>255*(2*Math.random()-1)*i,p=r?()=>{const e=h();return[e,e,e]}:()=>[h(),h(),h()];for(;u{const{imageData:o,level:i}=e;if(!i)return t(null,o);const r=new Uint8ClampedArray(o.width*o.height*4),n=o.data,a=n.length;let s,l,c,d=0;for(;d{const{colorMatrix:o,convolutionMatrix:i,gamma:r,noise:n,vignette:a}=t,s=[];if(i&&s.push([Mo,{matrix:i.clarity}]),r>0&&s.push([Eo,{level:1/r}]),o&&!(e=>{const t=e.length;let o;const i=t>=20?6:t>=16?5:3;for(let r=0;r0||n<0)&&s.push([Po,{level:n}]),(a>0||a<0)&&s.push([Ro,{strength:a}]),!s.length)return e;const l=(e,t)=>`(err, imageData) => {\n (${e[t][0].toString()})(Object.assign({ imageData: imageData }, filterInstructions[${t}]), \n ${e[t+1]?l(e,t+1):"done"})\n }`,c=`function (options, done) {\n const filterInstructions = options.filterInstructions;\n const imageData = options.imageData;\n (${l(s,0)})(null, imageData)\n }`;return e=await F(c,[{imageData:e,filterInstructions:s.map((e=>e[1]))}],[e.data.buffer]),ko(e)},Ao=e=>"number"==typeof e,Lo=e=>R(e)&&null!==e.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g),zo=(e,t)=>e.hasOwnProperty(t),Fo=e=>Array.isArray(e);let Do=64,Oo=102,Bo=112,Wo=!1;var _o=(e,t)=>(!Wo&&u()&&(/^win/i.test(navigator.platform)&&(Oo=103),($o()||mo())&&(Do=63.5,Oo=110,Bo=123),Wo=!0),`${e}`),Vo=e=>e instanceof Blob,No=(e,t)=>e/t*100+"%",Ho=e=>`rgba(${Math.round(255*e[0])}, ${Math.round(255*e[1])}, ${Math.round(255*e[2])}, ${Ao(e[3])?e[3]:1})`,jo=e=>Object.values(e).join("_");const Uo=async(e,t=0)=>{const o=g("canvas",{width:80,height:80}).getContext("2d");return await((e=0)=>new Promise((t=>{setTimeout(t,e)})))(t),o.drawImage(e,0,0,80,80),!((e=>!new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data.buffer).some((e=>0!==e)))(o)&&t<=256)||await Uo(e,t+16)},Go=new Map;var Zo=e=>new Promise(((t,o)=>{const i=new FileReader;i.onerror=()=>o(i.error),i.onload=()=>t(i.result),i.readAsDataURL(e)})),Xo=()=>{let e=[];return{sub:(t,o)=>(e.push({event:t,callback:o}),()=>e=e.filter((e=>e.event!==t||e.callback!==o))),pub:(t,o)=>{e.filter((e=>e.event===t)).forEach((e=>e.callback(o)))}}};let Yo=null;var qo=()=>(null===Yo&&(Yo=b(/Firefox/)),Yo);const Ko=32,Jo=({color:e=[0,0,0],fontSize:t=16,fontFamily:o="sans-serif",fontVariant:i="normal",fontWeight:r="normal",fontStyle:n="normal",textAlign:a="left",letterSpacing:s="normal",lineHeight:l=20},c=1)=>`font-size:${t*c}px;font-style:${n};font-weight:${r};font-family:${o};font-variant:${i};line-height:${l*c}px;text-align:${a};letter-spacing:${Ao(s)?s+"px":"normal"};color:${Ho(e)};`,Qo=(e,t,o=1)=>{const{width:i,height:r,disableNewline:n}=t,a=!i,s=!1===n?((e="")=>e.split("\n").length)(e):void 0,l=a?"normal":"break-word",c=a&&!s?"nowrap":"pre-line";return`max-width:none;min-width:auto;width:${a?"auto":i*o+"px"};height:${r?r*o+"px":"auto"};margin-top:0;margin-bottom:0;padding-top:${(({fontSize:e=16,lineHeight:t=20}={})=>.5*Math.max(0,e-t))(t)*o}px;word-break:${l};word-wrap:normal;white-space:${c};`},ei=new Map,ti=e=>{const t=[];for(const o of Array.from(e.childNodes))o.nodeType===Node.TEXT_NODE?t.push(ii(o)):t.push(...ti(o));return t},oi="pointer-events:none;visibility:hidden;position:absolute;left:0;top:0;",ii=e=>{const t=e.nodeValue;if(!t)return[];const o=t.length,i=document.createRange();i.selectNodeContents(e);const r=[];for(let n=0;n({rect:n[t],text:e})))},ri=new Map,ni=(e="",t)=>{const{width:o=0,height:i=0}=t;if(o&&i)return We(o,i);let{fontSize:r=16,fontFamily:n,lineHeight:a=20,fontWeight:s,fontStyle:l,fontVariant:c,letterSpacing:d}=t;const u=jo({text:e,fontFamily:n,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:r,letterSpacing:d,lineHeight:a,width:o});let h=ri.get(u);if(h)return h;let p=1;r>1e3&&qo()&&(p=r/1e3,r=1e3,a/=p);const m=Gt(g("pre",{contenteditable:"true",spellcheck:"false",style:`${oi}${Jo({...t,fontSize:r,lineHeight:a})};${Qo(e,t)}"`,innerHTML:e})).getBoundingClientRect();return h=Fe(m),h.height+=Math.max(0,r-a),h=Ue(h,(e=>e*p)),o&&(h.width=o),ri.set(u,h),h},ai=new Map,si=(e,t)=>new Promise(((o,i)=>{let r=ai.get(e);void 0===r&&(r=((e,t)=>{const{sub:o,pub:i}=Xo();let r,n;return Promise.resolve(t&&t(e,{resourceType:"stylesheet"})).then((t=>{if(!1===t)return n="requestPrevented",i("error",n);const{headers:o,credentials:a}=t||{};fetch(e,{headers:o,credentials:a}).then((e=>e.text())).then((e=>{r=e,i("load",r)})).catch((e=>{n=e,i("error",n)}))})),{sub:(e,t)=>"load"===e&&r?t(r):"error"===e&&n?t(n):void o(e,t)}})(e,t),ai.set(e,r)),r.sub("load",o),r.sub("error",i)})),li=async(e,t)=>{let o;try{o=await si(e,t)}catch(e){return[]}const i=g("style",{innerHTML:o,id:L()});document.head.append(i);const r=Array.from(document.styleSheets).find((e=>e.ownerNode.id===i.id));return i.remove(),Array.from(r.cssRules)},ci=new Map,di=async(e,t)=>{if(ci.has(e.href))return ci.get(e.href);let o;try{o=Array.from(e.cssRules);for(const e of(e=>e.filter((e=>e instanceof CSSImportRule)))(o)){const i=e.href;if(ci.has(i)){const e=ci.get(i);o=[...o,...e];continue}const r=await li(i,t);ci.set(i,r),o=[...o,...r]}}catch(i){const r=e.href;o=await li(r,t),ci.set(r,o)}return(e=>e.filter((e=>e instanceof CSSFontFaceRule)))(o)},ui=(e,t)=>e.style.getPropertyValue(t),hi=(e,t)=>{if(!e.style)return!1;return ui(e,"font-family").replace(/^"|"$/g,"")==t},pi=async(e,t)=>{const o=((e,t)=>{const o=[];for(const i of e)hi(i,t)&&o.push(i);return o})(await(async e=>{const t=Array.from(document.styleSheets).map((t=>di(t,e))),o=await Promise.all(t),i=[];return o.forEach((e=>i.push(...e))),i})(t),e);return o.length?o.map((e=>{const t=e.parentStyleSheet.href&&new URL(e.parentStyleSheet.href),o=t?t.origin+(e=>e.pathname.split("/").slice(0,-1).join("/"))(t)+"/":"",i=e.style.getPropertyValue("src").match(/url\("?(.*?)"?\)/)[1],r=Array.from(e.style).filter((e=>"src"!=e)).reduce(((t,o)=>t+=o+":"+ui(e,o)+";"),"");return[/^http/.test(i)?i:o+i,r]})):[]},mi=new Map,gi=new Map;var $i=async(e="",t)=>{if(!e.length)return;let{color:o,imageWidth:i=300,imageHeight:r=150,paddingTop:n=0,paddingRight:a=Ko,paddingBottom:s=0,paddingLeft:l=Ko,fontFamily:c,fontSize:d,pixelRatio:u=1,willRequest:h,outline:p,blur:m}=t,g=1,$="";d>1e3&&qo()&&(g=d/1e3,$=`transform-origin:0 0;transform:scale(${g})`);const f=u/g,y=(i+l+a)*u,b=(r+s+n)*u,x=await(async(e,t)=>{if(mi.get(e))return;let o=gi.get(e);if(!o){const r=await pi(e,t);if(!r.length)return void mi.set(e,!0);const n=[];for(const[e,t]of r){const o=await fetch(e).then((e=>e.blob())),r=!(i=o.type)||/woff2/.test(i)?"woff2":/woff/.test(i)?"woff":/ttf|truetype/.test(i)?"truetype":/otf|opentype/.test(i)?"opentype":/svg/.test(i)?"svg":"woff2",a=await Zo(o);n.push(`@font-face { src:url(${a}) format('${r}');${t};font-display:block; }`)}o=n.join(""),gi.set(e,o)}var i;return o})(c,h);const v=e.replace(/%/g,"%25").replace(/#/g,"%23").replace(/ /g," ").replace(/&(?!#\d{4};|[a-z]+;)/gi,"&").replace(/
|\n/g,"
"),w=`top:${n*f}px;right:${a*f}px;bottom:${s*f}px;left:${l*f}px`;let S=o,k="",C="";if(p||m){const e=Ho(o);p&&(S=[0,0,0,0],k=`-webkit-text-stroke: ${2*p*f}px ${e}`),m&&(Xt()?C=`filter:blur(${m*f*.4}px)`:(S=[0,0,0,0],C=`text-shadow: 0 0 ${m*f}px ${e}`))}return((e,{safariCacheKey:t="*"}={})=>new Promise(((o,i)=>{const r=new Image;r.onerror=()=>i(new Error("Failed to load SVG")),r.onload=()=>{if(!Xt()||!e.includes("@font-face")||Go.has(t))return o(r);Uo(r).then((()=>{Go.set(t,!0),o(r)}))},r.src="data:image/svg+xml,"+e})))(`
${x?``:""}
${v}
`,{safariCacheKey:c})};const fi=e=>{const t={...e};return M(t)},yi=(e,t={})=>{const o=pt(e);let i,r;const n=t.width||t.rx,a=t.height||t.ry;if(n&&a)return ze(t);if(n||a){i=parseFloat(n||Number.MAX_SAFE_INTEGER),r=parseFloat(a||Number.MAX_SAFE_INTEGER);const e=Math.min(i,r);R(n)||R(a)?(i=e+"%",r=e*o+"%"):(i=e,r=e)}else{const e=10;i=e+"%",r=e*o+"%"}return{[(t.width?"width":t.rx?"rx":void 0)||"width"]:i,[(t.width?"height":t.rx?"ry":void 0)||"height"]:r}},bi=(e,t={})=>{return{width:void 0,height:void 0,...t,aspectRatio:1,backgroundImage:(o=_o(e),"data:image/svg+xml,"+o.replace("<","%3C").replace(">","%3E"))};var o},xi=(e,t={})=>({backgroundColor:[0,0,0,0],...Ri(t)?{}:{width:void 0,height:void 0,aspectRatio:void 0},...t,backgroundImage:R(e)?e:Vo(e)?URL.createObjectURL(e):e}),vi=(e,t)=>{let o;if(R(e)||Vo(e)){const i={...yi(t),backgroundSize:"contain"};o=Lo(e)?bi(e,i):xi(e,i)}else if(e.src){const i=yi(t,e.shape||e),r={...e.shape,...i};if(e.width&&e.height&&!zo(r,"aspectRatio")){const e=gr(i,"width",t),o=gr(i,"height",t);r.aspectRatio=U(e,o)}r.backgroundSize||e.shape||e.width&&e.height||(r.backgroundSize="contain"),o=Lo(e.src)?bi(e.src,r):xi(e.src,r)}else e.shape&&(o=fi(e.shape));return zo(o,"backgroundImage")&&(zo(o,"backgroundColor")||(o.backgroundColor=[0,0,0,0]),zo(o,"disableStyle")||(o.disableStyle=["cornerRadius","backgroundColor","strokeColor","strokeWidth"])),t?pr(o,t):o},wi=e=>ue(e.x1,e.y1),Si=e=>ue(e.x2,e.y2),ki=e=>zo(e,"text"),Ci=e=>ki(e)&&!(Bi(e)||zo(e,"width")),Ti=e=>ki(e)&&(Bi(e)||zo(e,"width")),Mi=e=>!ki(e)&&Wi(e),Ri=e=>zo(e,"rx"),Pi=e=>zo(e,"x1"),Ei=e=>zo(e,"points"),Ii=e=>ki(e)&&e.isEditing,Ai=e=>!zo(e,"opacity")||e.opacity>0,Li=e=>e.isSelected,zi=e=>e.isEditing,Fi=e=>e._isDraft,Di=e=>zo(e,"width")&&zo(e,"height"),Oi=e=>{const t=zo(e,"right"),o=zo(e,"bottom");return t||o},Bi=e=>(zo(e,"x")||zo(e,"left"))&&zo(e,"right")||(zo(e,"y")||zo(e,"top"))&&zo(e,"bottom"),Wi=e=>Di(e)||Bi(e),_i=e=>(e._isDraft=!0,e),Vi=e=>(e._isDraft=!1,e),Ni=(e,t)=>!0!==e.disableStyle&&(!Fo(e.disableStyle)||!t||!e.disableStyle.includes(t)),Hi=e=>!0!==e.disableSelect,ji=e=>!0!==e.disableRemove,Ui=e=>!e.disableFlip&&(!Fi(e)&&!Oi(e)&&(e=>zo(e,"backgroundImage")||zo(e,"text"))(e)),Gi=(e,t)=>!!ki(e)&&(!0!==e.disableInput&&(P(e.disableInput)?e.disableInput(null!=t?t:e.text):t||!0)),Zi=(e,t)=>!0!==e.disableTextLayout&&(!Fo(e.disableTextLayout)||!t||!e.disableTextLayout.includes(t)),Xi=e=>!0!==e.disableManipulate&&!Fi(e)&&!Oi(e),Yi=e=>Xi(e)&&!0!==e.disableMove,qi=e=>(delete e.left,delete e.right,delete e.top,delete e.bottom,e),Ki=e=>(delete e.rotation,e),Ji=e=>(e.strokeWidth=e.strokeWidth||1,e.strokeColor=e.strokeColor||[0,0,0],e),Qi=e=>(e.backgroundColor=e.backgroundColor?e.backgroundColor:e.strokeWidth||e.backgroundImage?void 0:[0,0,0],e),er=e=>{let t=e.text;t=t.replace(/&(#[0-9]+|[a-z]+);/gi,((e,t)=>`___${t}___`)),t=t.replace(/&/,"&"),e.text=t.replace(/___(#[0-9]+|[a-z]+)___/gi,((e,t)=>`&${t};`))},tr=e=>{if(e.fontSize=e.fontSize||"4%",e.fontFamily=e.fontFamily||"sans-serif",e.fontWeight=e.fontWeight||"normal",e.fontStyle=e.fontStyle||"normal",e.fontVariant=e.fontVariant||"normal",e.lineHeight=e.lineHeight||"120%",e.color=e.color||[0,0,0],e.format="html"===e.format?"html":"text",e.textShadow){const[t,o,i,r]=e.textShadow;e.textShadowX=t,e.textShadowY=o,e.textShadowBlur=i,e.textShadowColor=r,delete e.textShadow}if(e.textOutline){const[t,o]=e.textOutline;e.textOutlineWidth=t,e.textOutlineColor=o,delete e.textOutline}return"html"===e.format?er(e):(e=>{er(e);let t=e.text;t=t.replace(//g,"<"),e.text=t})(e),Ci(e)?or(e):ir(e)},or=e=>(!1!==e.disableNewline&&(delete e.textAlign,e.text=e.text.replace(/\n/g," ")),qi(e)),ir=e=>(e.textAlign=e.textAlign||"left",e),rr=e=>((e=>{R(e.id)||(e.id=L()),zo(e,"rotation")||(e.rotation=0),zo(e,"opacity")||(e.opacity=1),zo(e,"disableErase")||(e.disableErase=!0)})(e),ki(e)?tr(e):Mi(e)?(e=>{e.cornerRadius=e.cornerRadius||0,e.strokeWidth=e.strokeWidth||0,e.strokeColor=e.strokeColor||[0,0,0],Qi(e)})(e):Ei(e)?(e=>{Ji(e),Ki(e),zo(e,"pathClose")||(e.disableResize=!0,zo(e,"disableMove")||(e.disableMove=!0)),qi(e)})(e):Pi(e)?(e=>{Ji(e),e.lineStart=e.lineStart||void 0,e.lineEnd=e.lineEnd||void 0,Ki(e),qi(e)})(e):Ri(e)&&(e=>{e.strokeWidth=e.strokeWidth||0,e.strokeColor=e.strokeColor||[0,0,0],Qi(e)})(e),e),nr=e=>ki(e)?"text":Mi(e)?"rectangle":Ei(e)?"path":Pi(e)?"line":Ri(e)?"ellipse":void 0,ar=(e,t)=>parseFloat(e)/100*t,sr=new RegExp(/^x|left|right|^width|rx|fontSize|eraseRadius|feather|cornerRadius|strokeWidth|strokeDash/,"i"),lr=new RegExp(/^y|top|bottom|^height|ry/,"i"),cr=(e,t,{width:o,height:i})=>{if(Array.isArray(t))return t.map((t=>(C(t)&&hr(t,{width:o,height:i}),R(t)&&(t=cr(e,t,{width:o,height:i})),t)));if("string"!=typeof t)return t;if(!t.endsWith("%"))return t;const r=parseFloat(t)/100;return sr.test(e)?se(o*r,6):lr.test(e)?se(i*r,6):t},dr=cr,ur=["lineHeight","textOutlineWidth","textShadowX","textShadowY","textShadowBlur"],hr=(e,t)=>{Object.entries(e).map((([o,i])=>{e[o]=cr(o,i,t)})),e.text&&ur.filter((t=>R(e[t]))).forEach((t=>{var o,i;e[t]=(o=e[t],i=e.fontSize,Math.round(i*(parseFloat(o)/100)))}))},pr=(e,t)=>(hr(e,t),xr(e,t),e),mr=(e,t)=>{let o;return/^x|width|rx|fontSize|strokeWidth|cornerRadius/.test(e)?o=t.width:/^y|height|ry/.test(e)&&(o=t.height),o},gr=(e,t,o)=>Array.isArray(e[t])?e[t].map((e=>Object.entries(e).reduce(((e,[t,i])=>(e[t]=R(i)?ar(i,mr(t,o)):i,e)),{}))):R(e[t])?ar(e[t],mr(t,o)):e[t],$r=(e,t,o)=>t.reduce(((t,i)=>{const r=gr(e,i,o);return t[i]=r,t}),{}),fr=(e,t,o)=>(Object.keys(t).forEach((i=>((e,t,o,i)=>{if(!R(e[t]))return e[t]=o,e;const r=mr(t,i);return e[t]=void 0===r?o:No(o,r),e})(e,i,t[i],o))),e),yr=(e,t)=>{const o=e.filter((e=>e.x<0||e.y<0||e.x1<0||e.y1<0)).reduce(((e,t)=>{const[o,i,r,n]=(e=>{const t=Je(),o=e.strokeWidth||0;if(Mi(e))t.x=e.x-.5*o,t.y=e.y-.5*o,t.width=e.width+o,t.height=e.height+o;else if(Pi(e)){const{x1:i,y1:r,x2:n,y2:a}=e,s=Math.abs(Math.min(i,n)),l=Math.abs(Math.max(i,n)),c=Math.abs(Math.min(r,a)),d=Math.abs(Math.min(r,a));t.x=s+.5*o,t.y=l+.5*o,t.width=l-s+o,t.height=d-c+o}else Ri(e)&&(t.x=e.x-e.rx+.5*o,t.y=e.y-e.ry+.5*o,t.width=2*e.rx+o,t.height=2*e.ry+o);return t&&zo(e,"rotation")&&$t(t,e.rotation),vt(t)})(t);return e.top=Math.min(o,e.top),e.left=Math.min(n,e.left),e.bottom=Math.max(r,e.bottom),e.right=Math.max(i,e.right),e}),{top:0,right:0,bottom:0,left:0});return o.right>0&&(o.right-=t.width),o.bottom>0&&(o.bottom-=t.height),o},br=(e,t,o)=>{const i=fi(e);pr(i,t);const r=o(i);return Array.isArray(r)?r:[r]},xr=(e,t)=>{if(zo(e,"left")&&(e.x=e.left),zo(e,"right")&&!R(e.right)){const o=t.width-e.right;zo(e,"left")?(e.x=e.left,e.width=Math.max(0,o-e.left)):zo(e,"width")&&(e.x=o-e.width)}if(zo(e,"top")&&(e.y=e.top),zo(e,"bottom")&&!R(e.bottom)){const o=t.height-e.bottom;zo(e,"top")?(e.y=e.top,e.height=Math.max(0,o-e.top)):zo(e,"height")&&(e.y=o-e.height)}return e},vr=(e,t)=>(Ei(e)&&e.points.filter((e=>Ao(e.x))).forEach((e=>{e.x*=t,e.y*=t})),Pi(e)&&Ao(e.x1)&&(e.x1*=t,e.y1*=t,e.x2*=t,e.y2*=t),Ao(e.x)&&Ao(e.y)&&(e.x*=t,e.y*=t),Ao(e.width)&&Ao(e.height)&&(e.width*=t,e.height*=t),Ao(e.rx)&&Ao(e.ry)&&(e.rx*=t,e.ry*=t),(e=>Ao(e.strokeWidth)&&e.strokeWidth>0)(e)&&(e.strokeWidth*=t),ki(e)&&(e._scale=t,Ao(e.fontSize)&&(e.fontSize*=t),Ao(e.lineHeight)&&(e.lineHeight*=t),Ao(e.width)&&!Ao(e.height)&&(e.width*=t)),zo(e,"cornerRadius")&&Ao(e.cornerRadius)&&(e.cornerRadius*=t),e),wr=e=>{if(Mi(e))return ue(e.x+.5*e.width,e.y+.5*e.height);if(Ri(e))return ue(e.x,e.y);if(e.text){if(Ti(e)){const t=e.height||ni(e.text,e).height;return ue(e.x+.5*e.width,e.y+.5*t)}const t=ni(e.text,e);return ue(e.x+.5*t.width,e.y+.5*t.height)}return Ei(e)?Ee(e.points):Pi(e)?Ee([wi(e),Si(e)]):void 0};var Sr=e=>/canvas/i.test(e.nodeName),kr=(e,t)=>new Promise(((o,i)=>{let r=e,n=!1;const a=()=>{n||(n=!0,P(t)&&Promise.resolve().then((()=>t(We(r.naturalWidth,r.naturalHeight)))))};if(r.src||(r=new Image,R(e)&&new URL(e,location.href).origin!==location.origin&&(r.crossOrigin="anonymous"),r.src=R(e)?e:URL.createObjectURL(e)),r.complete)return a(),o(r);P(t)&&Yt(r).then(a).catch(i),r.onload=()=>{a(),o(r)},r.onerror=()=>i(new Error("Failed to load image"))}));const Cr=new Map([]),Tr=(e,t={})=>new Promise(((o,i)=>{const{onMetadata:r=a,onLoad:n=o,onError:s=i,onComplete:l=a}=t;let c=Cr.get(e);if(c||(c={loading:!1,complete:!1,error:!1,image:void 0,size:void 0,bus:Xo()},Cr.set(e,c)),c.bus.sub("meta",r),c.bus.sub("load",n),c.bus.sub("error",s),c.bus.sub("complete",l),Sr(e)){const t=e,o=t.cloneNode();c.complete=!0,c.image=o,c.size=Be(t)}if(c.complete)return c.bus.pub("meta",{size:c.size}),c.error?c.bus.pub("error",c.error):c.bus.pub("load",c.image),c.bus.pub("complete"),void(c.bus=Xo());c.loading||(c.loading=!0,kr(e,(e=>{c.size=e,c.bus.pub("meta",{size:e})})).then((e=>{c.image=e,c.bus.pub("load",e)})).catch((e=>{c.error=e,c.bus.pub("error",e)})).finally((()=>{c.complete=!0,c.loading=!1,c.bus.pub("complete"),c.bus=Xo()})))})),Mr=(e,t,o,i)=>e.drawImage(t,o.x,o.x,o.width,o.height,i.x,i.y,i.width,i.height);var Rr=async(e,t,o,i,r=Mr,n)=>{e.save(),e.clip(),await r(e,t,o,i,n),e.restore()};const Pr=(e,t,o,i,r)=>{const n=Ke(e);if(i){const e=St(ot(i),se);return e.x*=o.width,e.width*=o.width,e.y*=o.height,e.height*=o.height,{srcRect:e,destRect:n}}const a=nt(0,0,o.width,o.height);if("contain"===t){const t=xt(e,pt(a));n.width=t.width,n.height=t.height,r?(n.x+=r.x,n.y+=r.y):(n.x+=t.x,n.y+=t.y)}else if("cover"===t){const e=bt(n,a.width/a.height);n.width=e.width,n.height=e.height,r?(n.x+=r.x,n.y+=r.y):(n.x+=e.x,n.y+=e.y)}else t?(n.width=t.width,n.height=t.height,r&&(n.x+=r.x,n.y+=r.y)):r&&(n.width=o.width,n.height=o.height,n.x+=r.x,n.y+=r.y);return{srcRect:a,destRect:n}},Er=(e,t)=>(t.cornerRadius>0?((e,t,o,i,r,n)=>{i<2*n&&(n=i/2),r<2*n&&(n=r/2),e.beginPath(),e.moveTo(t+n,o),e.arcTo(t+i,o,t+i,o+r,n),e.arcTo(t+i,o+r,t,o+r,n),e.arcTo(t,o+r,t,o,n),e.arcTo(t,o,t+i,o,n),e.closePath()})(e,t.x,t.y,t.width,t.height,t.cornerRadius):e.rect(t.x,t.y,t.width,t.height),e),Ir=(e,t)=>(t.backgroundColor&&e.fill(),e),Ar=(e,t)=>(t.strokeWidth&&e.stroke(),e);var Lr=async(e,t,o={})=>{const{drawImage:i}=o;if(e.lineWidth=t.strokeWidth?t.strokeWidth:1,e.strokeStyle=t.strokeColor?Ho(t.strokeColor):"none",e.fillStyle=t.backgroundColor?Ho(t.backgroundColor):"none",e.globalAlpha=t.opacity,t.backgroundImage){let o;if(o=Sr(t.backgroundImage)?t.backgroundImage:await Tr(t.backgroundImage),Er(e,t),Ir(e,t),"repeat"===t.backgroundRepeat){const r=t.backgroundPosition||{x:0,y:0},{srcRect:n,destRect:a}=Pr(t,t.backgroundSize||Be(o),Be(o),t.backgroundCorners,{x:0,y:0}),s=document.createElement("canvas");s.width=a.width,s.height=a.height;const l=s.getContext("2d",{willReadFrequently:!1,desynchronized:!0});await i(l,o,n,{...a,x:0,y:0});const c=e.createPattern(s,"repeat");e.fillStyle=c,e.save(),e.beginPath(),e.rect(t.x+r.x,t.y+r.y,t.width-r.x,t.height-r.y),e.clip(),e.translate(a.x+r.x,a.y+r.y),e.fill(),f(s),e.restore()}else{const{srcRect:r,destRect:n}=Pr(t,t.backgroundSize,Be(o),t.backgroundCorners,t.backgroundPosition);await Rr(e,o,r,n,i,{feather:t.feather})}return e.beginPath(),Er(e,t),Ar(e,t),[]}return Er(e,t),Ir(e,t),Ar(e,t),[]},zr=async(e,t,o={})=>new Promise((async(i,r)=>{const{drawImage:n}=o;if(e.lineWidth=t.strokeWidth||1,e.strokeStyle=t.strokeColor?Ho(t.strokeColor):"none",e.fillStyle=t.backgroundColor?Ho(t.backgroundColor):"none",e.globalAlpha=t.opacity,e.ellipse(t.x,t.y,t.rx,t.ry,0,0,2*Math.PI),t.backgroundColor&&e.fill(),t.backgroundImage){let o;try{o=await Tr(t.backgroundImage)}catch(e){r(e)}const a=nt(t.x-t.rx,t.y-t.ry,2*t.rx,2*t.ry),{srcRect:s,destRect:l}=Pr(a,t.backgroundSize,Be(o),t.backgroundCorners,t.backgroundPosition);await Rr(e,o,s,l,n),t.strokeWidth&&e.stroke(),i([])}else t.strokeWidth&&e.stroke(),i([])})),Fr=async(e,t,o)=>{const i=t.width&&t.height?Fe(t):ni(t.text,t),r={x:t.x,y:t.y,width:i.width,height:i.height};if(Lr(e,{...t,...r,options:o}),!t.text.length)return[];const{textOutlineWidth:n=0,textShadowX:a=0,textShadowY:s=0,textShadowBlur:l=0,textShadowColor:c,outline:d,blur:u,...h}=t;return t.height&&(e.rect(r.x-n+Math.min(a,0),r.y-n+Math.min(s,0),r.width+n+n+Math.abs(a)+l,r.height+n+Math.abs(s)+l),e.save(),e.clip()),(a||s||l)&&(e.save(),e.translate(a,s),await Dr(e,r,t,{...o,paddingLeft:Ko+l,paddingRight:Ko+l,paddingTop:l,paddingBottom:l,shapeExtendedProps:{color:c,blur:l}}),e.restore()),n&&await Dr(e,r,t,{...o,paddingLeft:Ko+n,paddingRight:Ko+n,paddingTop:n,paddingBottom:n,shapeExtendedProps:{color:t.textOutlineColor,outline:n}}),t.height&&e.restore(),await Dr(e,r,h,{...o,paddingLeft:Ko,paddingRight:Ko,paddingTop:0,paddingBottom:0}),[]};const Dr=async(e,t,o,i)=>{const{willRequest:r,shapeExtendedProps:n,paddingLeft:a,paddingRight:s,paddingTop:l,paddingBottom:c}=i,d=await $i(o.text,{...o,...n,...t,paddingLeft:a,paddingRight:s,paddingTop:l,paddingBottom:c,imageWidth:t.width,imageHeight:t.height,willRequest:r});e.drawImage(d,o.x-a,o.y-l,d.width,d.height)};var Or=async(e,t)=>new Promise((async o=>{e.lineWidth=t.strokeWidth||1,e.strokeStyle=t.strokeColor?Ho(t.strokeColor):"none",e.globalAlpha=t.opacity;let i=wi(t),r=Si(t);e.moveTo(i.x,i.y),e.lineTo(r.x,r.y),t.strokeWidth&&e.stroke(),o([])})),Br=async(e,t)=>new Promise(((o,i)=>{if(t.bitmap&&1===t.points.length)return void zr(e,{x:t.points[0].x,y:t.points[0].y,rx:.5*t.strokeWidth,ry:.5*t.strokeWidth,backgroundColor:t.strokeColor}).then((()=>o([])));e.lineWidth=t.strokeWidth||1,e.strokeStyle=t.strokeColor?Ho(t.strokeColor):"none",e.fillStyle=t.backgroundColor?Ho(t.backgroundColor):"none",e.globalAlpha=t.opacity;const{points:r}=t;e.lineCap=t.strokeCap,e.lineJoin=t.strokeJoin,e.setLineDash(t.strokeDash||[]),t.pathClose&&e.beginPath(),e.moveTo(r[0].x,r[0].y);const n=r.length;for(let t=1;tt||o?(e.translate(i.x,i.y),e.scale(t?-1:1,o?-1:1),e.translate(-i.x,-i.y),e):e;const _r=async(e,t,o)=>{e.globalCompositeOperation="subtract"===t.drawMode?"destination-out":"source-over";const i=wr(t);let r;if(xo(e,t.rotation,i),Wr(e,t.flipX,t.flipY,i),Mi(t)?r=Lr:Ri(t)?r=zr:Pi(t)?r=Or:Ei(t)?r=Br:ki(t)&&(r=Fr),r){const i=await r(e,t,o);if(!i.length)return[];return[t,...await Vr(e,i,o)]}return[]};var Vr=async(e,t,o)=>{let i=[];for(const r of t)e.save(),e.beginPath(),i=[...i,...await _r(e,r,o)],e.restore();return i},Nr=async(e,t={})=>{const{shapes:o=[],contextBounds:i=e,transform:r=a,drawImage:n,willRequest:s,canvasMemoryLimit:l,computeShape:c=G,preprocessShape:d=G}=t;if(!o.length)return e;const u=g("canvas");u.width=i.width,u.height=i.height;const h=u.getContext("2d",{willReadFrequently:!0});h.putImageData(e,i.x||0,i.y||0);const p=o.map(fi).map(c).map(d).flat();r(h),await Vr(h,p,{drawImage:n,canvasMemoryLimit:l,willRequest:s});const m=h.getImageData(0,0,u.width,u.height);return f(u),m},Hr=async(e,t={})=>{const{backgroundColor:o,backgroundImage:i}=t,r=!(!o||o&&0===o[3]);if(!i&&!r)return e;const n=g("canvas");n.width=e.width,n.height=e.height;const a=n.getContext("2d",{willReadFrequently:!0});if(a.putImageData(e,0,0),a.globalCompositeOperation="destination-over",r&&(a.fillStyle=Ho(o),a.fillRect(0,0,n.width,n.height)),i){let t;t=Sr(i)?i:await Tr(i);const{srcRect:o,destRect:r}=Pr({x:0,y:0,width:e.width,height:e.height},"cover",{width:t.width,height:t.height});a.drawImage(t,o.x,o.y,o.width,o.height,r.x,r.y,r.width,r.height)}const s=a.getImageData(0,0,n.width,n.height);return f(n),s},jr=e=>e.length?e.reduce(((e,t)=>((e,t)=>{const o=new Array(20);return o[0]=e[0]*t[0]+e[1]*t[5]+e[2]*t[10]+e[3]*t[15],o[1]=e[0]*t[1]+e[1]*t[6]+e[2]*t[11]+e[3]*t[16],o[2]=e[0]*t[2]+e[1]*t[7]+e[2]*t[12]+e[3]*t[17],o[3]=e[0]*t[3]+e[1]*t[8]+e[2]*t[13]+e[3]*t[18],o[4]=e[0]*t[4]+e[1]*t[9]+e[2]*t[14]+e[3]*t[19]+e[4],o[5]=e[5]*t[0]+e[6]*t[5]+e[7]*t[10]+e[8]*t[15],o[6]=e[5]*t[1]+e[6]*t[6]+e[7]*t[11]+e[8]*t[16],o[7]=e[5]*t[2]+e[6]*t[7]+e[7]*t[12]+e[8]*t[17],o[8]=e[5]*t[3]+e[6]*t[8]+e[7]*t[13]+e[8]*t[18],o[9]=e[5]*t[4]+e[6]*t[9]+e[7]*t[14]+e[8]*t[19]+e[9],o[10]=e[10]*t[0]+e[11]*t[5]+e[12]*t[10]+e[13]*t[15],o[11]=e[10]*t[1]+e[11]*t[6]+e[12]*t[11]+e[13]*t[16],o[12]=e[10]*t[2]+e[11]*t[7]+e[12]*t[12]+e[13]*t[17],o[13]=e[10]*t[3]+e[11]*t[8]+e[12]*t[13]+e[13]*t[18],o[14]=e[10]*t[4]+e[11]*t[9]+e[12]*t[14]+e[13]*t[19]+e[14],o[15]=e[15]*t[0]+e[16]*t[5]+e[17]*t[10]+e[18]*t[15],o[16]=e[15]*t[1]+e[16]*t[6]+e[17]*t[11]+e[18]*t[16],o[17]=e[15]*t[2]+e[16]*t[7]+e[17]*t[12]+e[18]*t[17],o[18]=e[15]*t[3]+e[16]*t[8]+e[17]*t[13]+e[18]*t[18],o[19]=e[15]*t[4]+e[16]*t[9]+e[17]*t[14]+e[18]*t[19]+e[19],o})([...e],t)),e.shift()):[],Ur=(e,t)=>{const o=e.width*e.height,i=t.reduce(((e,t)=>(t.width>e.width&&t.height>e.height&&(e.width=t.width,e.height=t.height),e)),{width:0,height:0}),r=i.width*i.height;return((e,t=2)=>Math.round(e*t)/t)(Math.max(.5,.5+(1-r/o)/2),5)};function Gr(){}const Zr=e=>e;function Xr(e,t){for(const o in t)e[o]=t[o];return e}function Yr(e){return e()}function qr(){return Object.create(null)}function Kr(e){e.forEach(Yr)}function Jr(e){return"function"==typeof e}function Qr(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function en(e,...t){if(null==e)return Gr;const o=e.subscribe(...t);return o.unsubscribe?()=>o.unsubscribe():o}function tn(e){let t;return en(e,(e=>t=e))(),t}function on(e,t,o){e.$$.on_destroy.push(en(t,o))}function rn(e,t,o,i){if(e){const r=nn(e,t,o,i);return e[0](r)}}function nn(e,t,o,i){return e[1]&&i?Xr(o.ctx.slice(),e[1](i(t))):o.ctx}function an(e,t,o,i){if(e[2]&&i){const r=e[2](i(o));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],o=Math.max(t.dirty.length,r.length);for(let i=0;i32){const t=[],o=e.ctx.length/32;for(let e=0;ewindow.performance.now():()=>Date.now(),gn=pn?e=>requestAnimationFrame(e):Gr;const $n=new Set;function fn(e){$n.forEach((t=>{t.c(e)||($n.delete(t),t.f())})),0!==$n.size&&gn(fn)}function yn(e){let t;return 0===$n.size&&gn(fn),{promise:new Promise((o=>{$n.add(t={c:e,f:o})})),abort(){$n.delete(t)}}}function bn(e,t){e.appendChild(t)}function xn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function vn(e){const t=kn("style");return function(e,t){bn(e.head||e,t),t.sheet}(xn(e),t),t.sheet}function wn(e,t,o){e.insertBefore(t,o||null)}function Sn(e){e.parentNode.removeChild(e)}function kn(e){return document.createElement(e)}function Cn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Tn(e){return document.createTextNode(e)}function Mn(){return Tn(" ")}function Rn(){return Tn("")}function Pn(e,t,o,i){return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function En(e){return function(t){return t.preventDefault(),e.call(this,t)}}function In(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function An(e,t,o){null==o?e.removeAttribute(t):e.getAttribute(t)!==o&&e.setAttribute(t,o)}function Ln(e,t){const o=Object.getOwnPropertyDescriptors(e.__proto__);for(const i in t)null==t[i]?e.removeAttribute(i):"style"===i?e.style.cssText=t[i]:"__value"===i?e.value=e[i]=t[i]:o[i]&&o[i].set?e[i]=t[i]:An(e,i,t[i])}function zn(e,t){Object.keys(t).forEach((o=>{!function(e,t,o){t in e?e[t]="boolean"==typeof e[t]&&""===o||o:An(e,t,o)}(e,o,t[o])}))}function Fn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function Dn(e,t){e.value=null==t?"":t}function On(e,t,{bubbles:o=!1,cancelable:i=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(e,o,i,t),r}class Bn{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,o=null){this.e||(this.is_svg?this.e=Cn(t.nodeName):this.e=kn(t.nodeName),this.t=t,this.c(e)),this.i(o)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t>>0}(d)}_${s}`,h=xn(e),{stylesheet:p,rules:m}=_n.get(h)||function(e,t){const o={stylesheet:vn(t),rules:{}};return _n.set(e,o),o}(h,e);m[u]||(m[u]=!0,p.insertRule(`@keyframes ${u} ${d}`,p.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?g+", ":""}${u} ${i}ms linear ${r}ms 1 both`,Nn+=1,u}function jn(e,t){const o=(e.style.animation||"").split(", "),i=o.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),r=o.length-i.length;r&&(e.style.animation=i.join(", "),Nn-=r,Nn||gn((()=>{Nn||(_n.forEach((e=>{const{ownerNode:t}=e.stylesheet;t&&Sn(t)})),_n.clear())})))}function Un(e){Vn=e}function Gn(){if(!Vn)throw new Error("Function called outside component initialization");return Vn}function Zn(e){Gn().$$.on_mount.push(e)}function Xn(e){Gn().$$.after_update.push(e)}function Yn(e){Gn().$$.on_destroy.push(e)}function qn(){const e=Gn();return(t,o,{cancelable:i=!1}={})=>{const r=e.$$.callbacks[t];if(r){const n=On(t,o,{cancelable:i});return r.slice().forEach((t=>{t.call(e,n)})),!n.defaultPrevented}return!0}}function Kn(e,t){return Gn().$$.context.set(e,t),t}function Jn(e){return Gn().$$.context.get(e)}function Qn(e,t){const o=e.$$.callbacks[t.type];o&&o.slice().forEach((e=>e.call(this,t)))}const ea=[],ta=[],oa=[],ia=[],ra=Promise.resolve();let na=!1;function aa(){na||(na=!0,ra.then(pa))}function sa(){return aa(),ra}function la(e){oa.push(e)}function ca(e){ia.push(e)}const da=new Set;let ua,ha=0;function pa(){const e=Vn;do{for(;ha{$a.delete(e),i&&(o&&e.d(1),i())})),e.o(t)}else i&&i()}const wa={duration:0};function Sa(e,t,o,i){let r=t(e,o),n=i?0:1,a=null,s=null,l=null;function c(){l&&jn(e,l)}function d(e,t){const o=e.b-n;return t*=Math.abs(o),{a:n,b:e.b,d:o,duration:t,start:e.start,end:e.start+t,group:e.group}}function u(t){const{delay:o=0,duration:i=300,easing:u=Zr,tick:h=Gr,css:p}=r||wa,m={start:mn()+o,b:t};t||(m.group=fa,fa.r+=1),a||s?s=m:(p&&(c(),l=Hn(e,n,t,i,o,u,p)),t&&h(0,1),a=d(m,i),la((()=>ga(e,t,"start"))),yn((t=>{if(s&&t>s.start&&(a=d(s,i),s=null,ga(e,a.b,"start"),p&&(c(),l=Hn(e,n,a.b,a.duration,0,u,r.css))),a)if(t>=a.end)h(n=a.b,1-n),ga(e,a.b,"end"),s||(a.b?c():--a.group.r||Kr(a.group.c)),a=null;else if(t>=a.start){const e=t-a.start;n=a.a+a.d*u(e/a.duration),h(n,1-n)}return!(!a&&!s)})))}return{run(e){Jr(r)?(ua||(ua=Promise.resolve(),ua.then((()=>{ua=null}))),ua).then((()=>{r=r(),u(e)})):u(e)},end(){c(),a=s=null}}}const ka="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Ca(e,t){e.d(1),t.delete(e.key)}function Ta(e,t){va(e,1,1,(()=>{t.delete(e.key)}))}function Ma(e,t,o,i,r,n,a,s,l,c,d,u){let h=e.length,p=n.length,m=h;const g={};for(;m--;)g[e[m].key]=m;const $=[],f=new Map,y=new Map;for(m=p;m--;){const e=u(r,n,m),s=o(e);let l=a.get(s);l?i&&l.p(e,t):(l=c(s,e),l.c()),f.set(s,$[m]=l),s in g&&y.set(s,Math.abs(m-g[s]))}const b=new Set,x=new Set;function v(e){xa(e,1),e.m(s,d),a.set(e.key,e),d=e.first,p--}for(;h&&p;){const t=$[p-1],o=e[h-1],i=t.key,r=o.key;t===o?(d=t.first,h--,p--):f.has(r)?!a.has(i)||b.has(i)?v(t):x.has(r)?h--:y.get(i)>y.get(r)?(x.add(i),v(t)):(b.add(r),h--):(l(o,a),h--)}for(;h--;){const t=e[h];f.has(t.key)||l(t,a)}for(;p;)v($[p-1]);return $}function Ra(e,t){const o={},i={},r={$$scope:1};let n=e.length;for(;n--;){const a=e[n],s=t[n];if(s){for(const e in a)e in s||(i[e]=1);for(const e in s)r[e]||(o[e]=s[e],r[e]=1);e[n]=s}else for(const e in a)r[e]=1}for(const e in i)e in o||(o[e]=void 0);return o}function Pa(e){return"object"==typeof e&&null!==e?e:{}}function Ea(e,t,o){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=o,o(e.$$.ctx[i]))}function Ia(e){e&&e.c()}function Aa(e,t,o,i){const{fragment:r,after_update:n}=e.$$;r&&r.m(t,o),i||la((()=>{const t=e.$$.on_mount.map(Yr).filter(Jr);e.$$.on_destroy?e.$$.on_destroy.push(...t):Kr(t),e.$$.on_mount=[]})),n.forEach(la)}function La(e,t){const o=e.$$;null!==o.fragment&&(Kr(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function za(e,t,o,i,r,n,a,s=[-1]){const l=Vn;Un(e);const c=e.$$={fragment:null,ctx:[],props:n,update:Gr,not_equal:r,bound:qr(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:qr(),dirty:s,skip_bound:!1,root:t.target||l.$$.root};a&&a(c.root);let d=!1;if(c.ctx=o?o(e,t.props||{},((t,o,...i)=>{const n=i.length?i[0]:o;return c.ctx&&r(c.ctx[t],c.ctx[t]=n)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](n),d&&function(e,t){-1===e.$$.dirty[0]&&(ea.push(e),aa(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const e=o.indexOf(t);-1!==e&&o.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Da=[];function Oa(e,t){return{subscribe:Ba(e,t).subscribe}}function Ba(e,t=Gr){let o;const i=new Set;function r(t){if(Qr(e,t)&&(e=t,o)){const t=!Da.length;for(const t of i)t[1](),Da.push(t,e);if(t){for(let e=0;e{i.delete(s),0===i.size&&(o(),o=null)}}}}function Wa(e,t,o){const i=!Array.isArray(e),r=i?[e]:e,n=t.length<2;return Oa(o,(e=>{let o=!1;const a=[];let s=0,l=Gr;const c=()=>{if(s)return;l();const o=t(i?a[0]:a,e);n?e(o):l=Jr(o)?o:Gr},d=r.map(((e,t)=>en(e,(e=>{a[t]=e,s&=~(1<{s|=1<e.reduce(((e,t)=>Object.assign(e,t)),{});const Va=e=>({updateValue:e}),Na=e=>({defaultValue:e}),Ha=e=>({store:e}),ja=e=>({store:(t,o)=>Wa(...e(o))}),Ua=e=>({store:(t,o)=>{const[i,r,n=(()=>!1)]=e(o);let a,s=!0;return Wa(i,((e,t)=>{r(e,(e=>{!s&&n(a,e)||(a=e,s=!1,t(e))}))}))}}),Ga=e=>({store:(t,o)=>{const[i,r={},n]=e(o);let a=[];const s={},l=e=>i(e,s),c=e=>{(a.length||e.length)&&(a=e,d())},d=()=>{const e=a.map(l);n&&e.sort(n),a=[...e],h(e)};Object.entries(r).map((([e,t])=>t.subscribe((t=>{s[e]=t,t&&d()}))));const{subscribe:u,set:h}=Ba(t||[]);return{set:c,update:e=>c(e(a)),subscribe:u}}});var Za=e=>{const t={},o={};return e.forEach((([e,...i])=>{const r=_a(i),n=t[e]=((e,t,o)=>{const{store:i=(e=>Ba(e)),defaultValue:r=a,updateValue:n}=o,s=i(r(),t,e),{subscribe:l,update:c=a}=s;let d;const u=e=>{let t=!0;d&&d(),d=l((o=>{if(t)return t=!1;e(o),d(),d=void 0}))},h=n?n(e):G;return s.set=e=>c((t=>h(e,t,u))),s.defaultValue=r,s})(o,t,r),s={get:()=>tn(n),set:n.set};Object.defineProperty(o,e,s)})),{stores:t,accessors:o}};var Xa=[["src",Ha((()=>{let e;const{subscribe:t,set:o}=Ba(),i=t=>{e!==t&&(e=t,o(e))};return{set:i,subscribe:t,update:t=>i(t(e))}}))],["imageReader"],["imageWriter"],["imageScrambler"],["imageRedactionRendering",Na((()=>"pixelated"))],["images",Na((()=>[]))],["shapePreprocessor"],["willRequestResource"],["willRequest"]],Ya=e=>e.charAt(0).toUpperCase()+e.slice(1),qa=(e,t)=>{Object.keys(t).forEach((o=>{const i=P(t[o])?{value:t[o],writable:!1}:t[o];Object.defineProperty(e,o,i)}))};const Ka=(e,t)=>{let o,i,r,n,a,s,l,c,d,u;const h=t.length;for(o=0;oh-1?0:o+1],n=i.x-e.x,a=i.y-e.y,s=r.x-e.x,l=r.y-e.y,c=n-s,d=a-l,u=c*a-d*n,u<-1e-5)return!1;return!0},Ja=1e4;var Qa=(e,t)=>{const o=It(t),i=de();wt(e).forEach((e=>{ve(e,i),Ka(e,t)||o.forEach((t=>{const o=Math.atan2(t.start.y-t.end.y,t.start.x-t.end.x),r=Math.sin(Math.PI-o)*Ja,n=Math.cos(Math.PI-o)*Ja,a=ue(e.x+r,e.y+n),s=Xe(Ze(t),Ja),l=Mt(Ge(e,a),s);l&&ve(i,we(pe(l),e))}))}));const r=Ke(e);ve(r,i);return!!wt(r).every((e=>Ka(e,t)))&&(gt(e,r),!0)},es=(e,t)=>{const o=wt(e),i=At(t,5),r=at(e),n=[];o.forEach((e=>{const t=((e,t)=>{if(0===t)return e;const o=ue(e.start.x-e.end.x,e.start.y-e.end.y),i=fe(o),r=ke(i,t);return e.end.x+=r.x,e.end.y+=r.y,e})(Ge(pe(r),pe(e)),1e6);let o=!1;i.map(Ze).forEach((e=>{const i=Mt(t,e);i&&!o&&(n.push(i),o=!0)}))}));const a=Re(n[0],n[2]){const i=Qe(e),r=at(i),n=kt(i,o,r).map((e=>ge(e,t,r))),a=ot(n);return n.map((e=>we(e,a)))},os=(e,t=0,o=pt(e))=>{let i,r;if(0!==t){const n=Math.atan2(1,o),a=Math.sign(t)*t,s=a%Math.PI,l=a%X;let c;c=s>Y&&sY?a:X-l:l>Y?X-l:a;const d=Math.min(Math.abs(e.height/Math.sin(n+c)),Math.abs(e.width/Math.cos(n-c)));i=Math.cos(n)*d,r=i/o}else i=e.width,r=i/o,r>e.height&&(r=e.height,i=r*o);return We(i,r)},is=(e,t,o,i,r,n,a,s)=>{const l=ze(a),c=ze(s),d=se(Math.max(t.width/c.width,t.height/c.height)),u=se(Math.min(t.width/l.width,t.height/l.height)),h=Ke(t);if(u<1||d>1){const o=at(e),i=at(t),r=u<1?u:d,n=(i.x+o.x)/2,a=(i.y+o.y)/2,s=h.width/r,l=h.height/r;mt(h,n-.5*s,a-.5*l,s,l)}return n?(((e,t,o=0,i=de(),r)=>{if(Ao(o)&&0!==o||i.x||i.y){const r=pt(e),n=ts(t,o,i),a=os(t,o,r);if(!(e.widtha.width&&(e.width=a.width,e.x+=t),e.height>a.height&&(e.height=a.height,e.y+=o)}Qa(e,n),es(e,n)&&Qa(e,n)}else{const o=pt(e);e.width=Math.min(e.width,t.width),e.height=Math.min(e.height,t.height),e.x=Math.max(e.x,0),e.x+e.width>t.width&&(e.x-=e.x+e.width-t.width),e.y=Math.max(e.y,0),e.y+e.height>t.height&&(e.y-=e.y+e.height-t.height);const i=at(e),n=xt(e,o);n.width=Math.max(r.width,n.width),n.height=Math.max(r.height,n.height),n.x=i.x-.5*n.width,n.y=i.y-.5*n.height,gt(e,n)}})(h,o,i,r,l),{crop:h}):{crop:h}},rs=(e,t,o)=>{const i=Qe(e),r=at(i),n=$t(i,o,r),a=at(Ct(ot(n))),s=at(t),l=ge(s,-o,a),c=we(l,a),d=xe(ve(r,c),se);return nt(d.x-.5*t.width,d.y-.5*t.height,t.width,t.height)},ns=(e,t,o)=>Math.max(t,Math.min(e,o));const as=["cropLimitToImage","cropMinSize","cropMaxSize","cropAspectRatio","flipX","flipY","rotation","crop","colorMatrix","convolutionMatrix","gamma","vignette","manipulation","redaction","annotation","decoration","selection","frame","backgroundColor","backgroundImage","targetSize","metadata","trim","volume","minDuration","maxDuration"],ss=e=>Fo(e)?e.map(ss):co(e)||_t(e)?e:C(e)?{...e}:e,ls=e=>e.map((e=>Object.entries(e).reduce(((e,[t,o])=>(t.startsWith("_")||(e[t]=o),e)),{})));const cs=(e,t)=>e===t;var ds=(e,t,o=cs)=>{if(e.length!==t.length)return!1;for(let i=0;i{const i=xe(at(e),(e=>se(e,8))),r=Qe(t),n=at(r),a=$t(r,o,n),s=xe(Ne(ot(a)),(e=>se(e,8))),l=Math.abs(s.x-i.x),c=Math.abs(s.y-i.y);return l<1&&c<1},hs=(e,t,o,i,r)=>{if(!r)return[-1/0,1/0];const n=Math.max(o.width/i.width,o.height/i.height),a=We(i.width*n,i.height*n),s=(l=a,Math.sqrt(l.width*l.width+l.height*l.height));var l;if(s{const{context:o,props:i}=t;return e._isFormatted||((e=rr(e))._isFormatted=!0,Object.assign(e,i)),e._isDraft||!Bi(e)||e._context&&ht(o,e._context)||(xr(e,o),e._context={...o}),e},ms=(e,t)=>(e._isFormatted||(e.disableMove=!0,e.disableSelect=!0,e.disableResize=!0,e.disableRotate=!0),ps(e,t));var gs=[["file"],["size"],["loadState"],["processState"],["aspectRatio",ja((({size:e})=>[e,e=>e?pt(e):void 0]))],["perspectiveX",Na((()=>0))],["perspectiveY",Na((()=>0))],["perspective",ja((({perspectiveX:e,perspectiveY:t})=>[[e,t],([e,t])=>({x:e,y:t})]))],["rotation",Na((()=>0)),Va((e=>(t,o,i)=>{if(t===o)return t;const{loadState:r,size:n,rotationRange:a,cropMinSize:s,cropMaxSize:l,crop:c,perspective:d,cropLimitToImage:u,cropOrigin:h}=e;if(!c||!r||!r.beforeComplete)return t;const p=u&&((e,t,o)=>{const i=os(t,o,pt(e));return _e(Ue(i,Math.round),Ue(ze(e),Math.round))})(c,n,o),m=u&&us(c,n,o),g=((e,t,o,i,r,n,a,s,l,c)=>{const d=ze(l),u=ze(c);a&&(u.width=Math.min(c.width,r.width),u.height=Math.min(c.height,r.height));let h=!1;const p=(t,o)=>{const l=rs(r,i,t),c=Qe(r),m=at(c),g=kt(c,n,m),$=we(pe(m),Tt(g)),f=ge(at(l),o,m),y=we(pe(m),f);g.forEach((e=>ge(e,o,m)));const b=ot(g),x=Tt(g),v=ve(we(we(x,y),b),$),w=nt(v.x-.5*l.width,v.y-.5*l.height,l.width,l.height);if(s&<(w,s.width/w.width),a){const e=ts(r,o,n);es(w,e)}const S=se(Math.min(w.width/d.width,w.height/d.height),8),k=se(Math.max(w.width/u.width,w.height/u.height),8);return(S<1||k>1)&&se(Math.abs(o-t))===se(Math.PI/2)&&!h?(h=!0,p(e,e+Math.sign(o-t)*Math.PI)):{rotation:o,crop:St(w,(e=>se(e,8)))}},m=Math.sign(t)*Math.round(Math.abs(t)/X)*X,g=ns(t,m+o[0],m+o[1]);return p(e,g)})(o,t,a,c,n,d,u,h,s,l);if(p&&m){const e=os(n,t,pt(g.crop));g.crop.x+=.5*g.crop.width,g.crop.y+=.5*g.crop.height,g.crop.x-=.5*e.width,g.crop.y-=.5*e.height,g.crop.width=e.width,g.crop.height=e.height}return i((()=>{e.crop=St(g.crop,(e=>se(e,8)))})),g.rotation}))],["flipX",Na((()=>!1))],["flipY",Na((()=>!1))],["flip",ja((({flipX:e,flipY:t})=>[[e,t],([e,t])=>({x:e,y:t})]))],["isRotatedSideways",Ua((({rotation:e})=>[[e],([e],t)=>t(q(e)),(e,t)=>e!==t]))],["crop",Va((e=>(t,o=t)=>{const{loadState:i,size:r,cropMinSize:n,cropMaxSize:a,cropLimitToImage:s,cropAspectRatio:l,rotation:c,perspective:d}=e;if(!t&&!o||!i||!i.beforeComplete)return t;t||(t=Qe(os(r,c,l||pt(r))));const u=is(o,t,r,c,d,s,n,a),h=St(u.crop,(e=>se(e,8)));return ht(o,h)?o:h}))],["cropAspectRatio",Va((e=>(t,o)=>{const{loadState:i,crop:r,size:n,rotation:a,cropLimitToImage:s}=e,l=(e=>{if(e){if(/:/.test(e)){const[t,o]=e.split(":");return t/o}return parseFloat(e)}})(t);if(!l)return;if(!r||!i||!i.beforeComplete)return l;const c=o?Math.abs(t-o):1;if(us(r,n,a)&&s&&c>=.1){const o=((e,t)=>{const o=e.width,i=e.height;return q(t)&&(e.width=i,e.height=o),e})(ze(n),a);e.crop=St(xt(Qe(o),t),se)}else{const t={width:r.height*l,height:r.height},o=.5*(r.width-t.width),i=.5*(r.height-t.height);e.crop=St(nt(r.x+o,r.y+i,t.width,t.height),se)}return l}))],["cropOrigin"],["cropMinSize",Na((()=>({width:1,height:1})))],["cropMaxSize",Na((()=>({width:32768,height:32768})))],["cropLimitToImage",Na((()=>!0)),Va((e=>(t,o,i)=>{const{crop:r}=e;return r?(!o&&t&&i((()=>e.crop=Ke(e.crop))),t):t}))],["cropSize",Ua((({crop:e})=>[[e],([e],t)=>{e&&t(We(e.width,e.height))},(e,t)=>_e(e,t)]))],["cropRectAspectRatio",ja((({cropSize:e})=>[[e],([e],t)=>{e&&t(se(pt(e),5))}]))],["cropRange",Ua((({size:e,rotation:t,cropRectAspectRatio:o,cropMinSize:i,cropMaxSize:r,cropLimitToImage:n})=>[[e,t,o,i,r,n],([e,t,o,i,r,n],a)=>{if(!e)return;a(((e,t,o,i,r,n)=>{const a=ze(i),s=ze(r);return n?[a,Ue(os(e,t,o),Math.round)]:[a,s]})(e,t,o,i,r,n))},(e,t)=>ds(e,t)]))],["rotationRange",Ua((({size:e,isRotatedSideways:t,cropMinSize:o,cropSize:i,cropLimitToImage:r})=>[[e,t,o,i,r],([e,t,o,i,r],n)=>{if(!e||!i)return;n(hs(e,t,o,i,r))},(e,t)=>ds(e,t)]))],["backgroundColor",Va((()=>e=>((e=[0,0,0,0],t=1)=>4===e.length?e:[...e,t])(e)))],["backgroundImage"],["targetSize"],["colorMatrix"],["convolutionMatrix"],["gamma"],["noise"],["vignette"],["duration"],["minDuration",Na((()=>1/24))],["maxDuration",Na((()=>1/0))],["trim"],["volume",Na((()=>1))],["redaction",Ga((({size:e})=>[ps,{context:e}]))],["manipulation",Ga((({size:e})=>[ps,{context:e}]))],["annotation",Ga((({size:e})=>[ps,{context:e}]))],["decoration",Ga((({crop:e})=>[ps,{context:e}]))],["selection",Ga((({size:e})=>[ms,{context:e}]))],["frame",Va((()=>e=>{if(!e)return;const t={frameStyle:void 0,x:0,y:0,width:"100%",height:"100%",disableStyle:["backgroundColor","strokeColor","strokeWidth"]};return R(e)?t.frameStyle=e:Object.assign(t,e),t}))],["metadata"],["state",Ha(((e,t,o)=>{const i=as.map((e=>t[e]));let r=!1;const n=Ba({}),{subscribe:a}=Wa([...i,n],((e,t)=>{if(r)return;const o=as.reduce(((t,o,i)=>(t[o]=ss(e[i]),t)),{});o.crop&&St(o.crop,Math.round),o.manipulation=o.manipulation&&ls(o.manipulation),o.redaction=o.redaction&&ls(o.redaction),o.annotation=o.annotation&&ls(o.annotation),o.decoration=o.decoration&&ls(o.decoration),o.selection=o.selection&&ls(o.selection),t(o)})),s=e=>{e&&(r=!0,o.cropOrigin=void 0,as.filter((t=>zo(e,t))).forEach((t=>{const i=e[t];o[t]=null===i?void 0:ss(i)})),r=!1,n.set({}))};return{set:s,update:e=>s(e(null)),subscribe:a}}))]],$s=async(e,t,o={},i)=>{const{ontaskstart:r,ontaskprogress:n,ontaskend:s,token:l}=i;let c=!1;const d={cancel:a};l.cancel=()=>{c=!0,d.cancel()};for(const[i,a]of t.entries()){if(c)return;const[t,l]=a;r(i,l);try{e=await t(e,{...o,taskCancelToken:d},(e=>n(i,l,e)))}catch(e){throw c=!0,e}s(i,l)}return e};const fs=["loadstart","loadabort","loaderror","loadprogress","load","processstart","processabort","processerror","processprogress","process"],ys=["flip","cropOrigin","isRotatedSideways","perspective","perspectiveX","perspectiveY","cropRange"],bs=["images"],xs=gs.map((([e])=>e)).filter((e=>!ys.includes(e))),vs=e=>"image"+Ya(e),ws=e=>zo(e,"crop");var Ss=()=>{const{stores:e,accessors:t}=Za(Xa),{sub:o,pub:i}=Xo(),r=()=>t.images?t.images[0]:{};let n={};const s={};xs.forEach((e=>{Object.defineProperty(t,vs(e),{get:()=>{const t=r();if(t)return t.accessors[e]},set:t=>{n[vs(e)]=t,s[vs(e)]=t;const o=r();o&&(o.accessors[e]=t)}})}));const l=()=>t.images&&t.images[0],c=e.src.subscribe((e=>{if(!e)return t.images=[];t.imageReader&&(t.images.length&&(n={}),u(e))})),d=e.imageReader.subscribe((e=>{e&&(t.images.length||t.src&&u(t.src))})),u=e=>{Promise.resolve().then((()=>p(e,n))).catch((()=>{}))};let h;const p=(e,o={})=>new Promise(((r,c)=>{let d=l();const u=!(!1===o.cropLimitToImage||!1===o.imageCropLimitToImage||!1===s.imageCropLmitedToImage),p=o.cropMinSize||o.imageCropMinSize||s.imageCropMinSize,m=u?p:d&&d.accessors.cropMinSize,$=o.minDuration||o.imageMinDuration;d&&g(),d=(({minSize:e={width:1,height:1},minDuration:t=0}={})=>{const{stores:o,accessors:i}=Za(gs),{pub:r,sub:n}=Xo(),s=(e,t)=>{const o=()=>i[e]||{},n=t=>{i[e]={...o(),...t,timeStamp:Date.now()}},a=()=>o().error,s=e=>{a()||(n({error:e}),r(t+"error",{...o()}))};return{start(){r(t+"start")},onabort(){n({abort:!0}),r(t+"abort",{...o()})},ontaskstart(e,i){a()||(n({index:e,task:i,taskProgress:void 0,taskLengthComputable:void 0}),r(t+"taskstart",{...o()}))},ontaskprogress(e,i,s){a()||(n({index:e,task:i,taskProgress:s.loaded/s.total,taskLengthComputable:s.lengthComputable}),r(t+"taskprogress",{...o()}),r(t+"progress",{...o()}))},ontaskend(e,i){a()||(n({index:e,task:i}),r(t+"taskend",{...o()}))},ontaskerror(e){s(e)},error(e){s(e)},beforeComplete(e){a()||(n({beforeComplete:!0}),r("before"+t,e))},complete(e){a()||(n({complete:!0}),r(t,e))}}};return qa(i,{read:(o,{reader:r},n={})=>{if(!r)return;Object.assign(i,{file:void 0,size:void 0,loadState:void 0});let l={cancel:a},c=!1;const d=s("loadState","load"),u={token:l,...d},h={src:o,size:void 0,dest:void 0,duration:void 0};return Promise.resolve().then((async()=>{try{if(d.start(),c)return d.onabort();const o=await $s(h,r,n,u);if(c)return d.onabort();const{size:a,duration:s,dest:p}=o||{};if(!a||!a.width||!a.height)throw new ao("Image size missing","IMAGE_SIZE_MISSING",o);if(s>0&&s{c=!0,l&&l.cancel(),d.onabort()}},write:(e,t)=>{if(!i.loadState.complete)return;i.processState=void 0;const o=s("processState","process"),r={src:i.file,imageState:i.state,dest:void 0};if(P(e)&&(e=e(i.file,i.state)),!e)return o.start(),void o.complete(r);let n={cancel:a},l=!1;const c=t,d={token:n,...o};return Promise.resolve().then((async()=>{try{if(o.start(),l)return o.onabort();const t=await $s(r,e,c,d);if(l)return o.onabort();o.complete(t)}catch(e){o.error(e)}finally{n=void 0}})),()=>{l=!0,n&&n.cancel()}},on:n}),{accessors:i,stores:o}})({minSize:m,minDuration:$}),fs.map((e=>{return d.accessors.on(e,(t=e,e=>i(t,e)));var t}));const f=()=>{n={},y.forEach((e=>e()))},y=[];y.push(d.accessors.on("loaderror",(e=>{f(),c(e)}))),y.push(d.accessors.on("loadabort",(()=>{f(),c({name:"AbortError"})}))),y.push(d.accessors.on("load",(e=>{h=void 0,f(),r(e)}))),y.push(d.accessors.on("beforeload",(()=>((e,o)=>{if(ws(o))return void(t.imageState=o);if(!o.imageCrop){const t=e.accessors.size,i=o.imageRotation||0,r=He(ze(t),i),n=Qe(r);n.width=se(Math.abs(n.width),6),n.height=se(Math.abs(n.height),6);const a=o.imageCropAspectRatio||(o.imageCropLimitToImage?pt(t):pt(n));let s;o.imageCropLimitToImage?s=xt(n,a):(s=bt(n,a),s.x=(t.width-s.width)/2,s.y=(t.height-s.height)/2),o.imageCrop=s}if(e.accessors.duration&&!o.imageTrim&&o.imageMaxDuration){const{duration:t}=e.accessors;o.imageTrim=[[0,Math.min(o.imageMaxDuration/t,1)]]}const i=["imageCropLimitToImage","imageCrop","imageCropAspectRatio","imageRotation"];i.filter((e=>zo(o,e))).forEach((e=>{t[e]=o[e],delete o[e]}));const r=Object.keys(o).filter((e=>!i.includes(e))).reduce(((e,t)=>(e[t]=o[t],e)),{});Object.assign(t,r)})(d,o)))),t.images=[d],o.imageReader&&(t.imageReader=o.imageReader),o.imageWriter&&(t.imageWriter=o.imageWriter),h=d.accessors.read(e,{reader:t.imageReader},{willRequest:t.willRequest})}));let m;const g=()=>{const e=l();e&&(h&&h(),e.accessors.loadState=void 0,t.images=[])};return Object.defineProperty(t,"stores",{get:()=>e}),qa(t,{on:o,loadImage:p,abortLoadImage:()=>{h&&h(),t.images=[]},editImage:(e,o)=>new Promise(((i,r)=>{p(e,o).then((()=>{const{images:e}=t,o=e[0],n=()=>{a(),s()},a=o.accessors.on("processerror",(e=>{n(),r(e)})),s=o.accessors.on("process",(e=>{n(),i(e)}))})).catch(r)})),removeImage:g,processImage:(e,o)=>new Promise(((i,r)=>{try{const n=[],a=()=>{m=void 0,n.forEach((e=>e()))};(async()=>{if((e=>R(e)||Vo(e)||Wt(e))(e))try{await p(e,o)}catch(e){r(e)}else e&&(ws(e)?t.imageState=e:Object.assign(t,e));const s=l();if(!s)return r("no image");n.push(s.accessors.on("processerror",(e=>{a(),r(e)}))),n.push(s.accessors.on("processabort",(()=>{a(),r({name:"AbortError"})}))),n.push(s.accessors.on("process",(e=>{a(),i(e)}))),m=s.accessors.write(t.imageWriter,{redactionRenderStyle:t.imageRedactionRendering,shapePreprocessor:t.shapePreprocessor||G,imageScrambler:t.imageScrambler,willRequest:t.willRequest,willRequestResource:t.willRequestResource})})()}catch(e){r(e)}})),abortProcessImage:()=>{const e=l();e&&(m&&m(),e.accessors.processState=void 0)},destroy:()=>{c&&c(),d&&d()}}),t};const ks=(e,t)=>{const{processImage:o}=Ss();return o(e,t)};var Cs=()=>Xt()?$o()?/15_|16_/.test(navigator.userAgent)?14745600:16777216:/15_/.test(navigator.userAgent)?16777216:1/0:1/0,Ts=(e,t)=>Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,o)=>(t[o]=e[o],t)),{}),Ms=e=>new Promise((t=>{if(e.duration===1/0)return e.ontimeupdate=()=>{e.ontimeupdate=void 0,t(e)},void(e.currentTime=Number.MAX_SAFE_INTEGER);t(e)}));const Rs=({imageDataResizer:e,canvasMemoryLimit:t}={})=>async(o,i,r,n,a)=>{r.width=Math.max(r.width,1),r.height=Math.max(r.height,1),n.width=Math.max(n.width,1),n.height=Math.max(n.height,1);const{dest:s}=await ks(i,{imageReader:il(),imageWriter:nl({format:"canvas",targetSize:{...n,upscale:!0},imageDataResizer:e,canvasMemoryLimit:t}),imageCrop:r}),{feather:l=0}=a||{};if(l>0){const e=g("canvas");e.width=s.width,e.height=s.height;const t=e.getContext("2d",{willReadFrequently:!0}),o=1/l;let i=0;for(i=0;ie),o)=>async(i,r,n)=>{n(oo(0,!1));let a=!1;const s=await e(...t(i,r,(e=>{a=!0,n(e)})));return o&&o(i,s),a||n(oo(1,!1)),i},Es=({willRequest:e,srcProp:t="src",destProp:o="dest"}={})=>[Ps(ho,((o,i,r)=>[o[t],r,{...i,willRequest:e}]),((e,t)=>e[o]=t)),"any-to-file"],Is=({srcProp:e="dest",destProp:t="dest"}={})=>[Ps((async e=>{if(/octet-stream/.test(e.type)){console.warn(`Pintura: File has unknown mime type "${e.type}", make sure your server sets the correct Content-Type header.`);let t="image";const o=await Jt(e);/video/i.test(o.nodeName)&&(t="video");const i={type:t+"/unknown"};return _t(e)?new File([e],e.name,{...i,lastModified:e.lastModified}):new Blob([e],i)}return e}),(t=>[t[e]]),((e,o)=>e[t]=o)),"any-to-file"],As=({srcProp:e="src",destProp:t="size"}={})=>[Ps(eo,(t=>[t[e]]),((e,o)=>e[t]=o)),"read-image-size"],Ls=async e=>{const t=await Jt(e);if(Qt(t))return await(e=>new Promise(((t,o)=>{const i=()=>{Ms(e).then((()=>{t(e.duration)}))};if(e.readyState>=1)return i();e.onloadedmetadata=i,e.onerror=()=>o(e.error)})))(t)},zs=({srcProp:e="src",destProp:t="duration"}={})=>[Ps(Ls,(t=>[t[e]]),((e,o)=>e[t]=o)),"read-media-duration"],Fs=({srcSize:e="size",srcOrientation:t="orientation",destSize:o="size"}={})=>[Ps(fo,(o=>[o[e],o[t]]),((e,t)=>e[o]=t)),"image-size-match-orientation"],Ds=({srcProp:e="src",destProp:t="head"}={})=>[Ps(((e,t)=>yo(e)?l(e,t):void 0),(t=>[t[e],[0,262144],onprogress]),((e,o)=>e[t]=o)),"read-image-head"],Os=({srcProp:e="head",destProp:t="orientation"}={})=>[Ps(i,(t=>[t[e],274]),((e,o=1)=>e[t]=o)),"read-exif-orientation-tag"],Bs=({srcProp:e="head"}={})=>[Ps(i,(t=>[t[e],274,1])),"clear-exif-orientation-tag"],Ws=({srcImageSize:e="size",srcCanvasSize:t="imageData",srcImageState:o="imageState",destImageSize:i="size",destScalar:r="scalar"}={})=>[Ps(((e,t)=>[Math.min(t.width/e.width,t.height/e.height),Fe(t)]),(i=>[i[e],i[t],i[o]]),((e,[t,o])=>{e[r]=t,e[i]=o})),"calculate-canvas-scalar"],_s=({srcProp:e="src",destProp:t="imageData",canvasMemoryLimit:o}={})=>[Ps(D,(t=>[t[e],o]),((e,o)=>e[t]=o)),"blob-to-image-data"],Vs=({srcImageData:e="imageData",srcOrientation:t="orientation"}={})=>[Ps(k,(o=>[o[e],o[t]]),((e,t)=>e.imageData=t)),"image-data-match-orientation"],Ns=({srcImageData:e="imageData",srcImageState:t="imageState"}={})=>[Ps(Hr,(o=>[o[e],{backgroundColor:o[t].backgroundColor,backgroundImage:o[t].backgroundImage}]),((e,t)=>e.imageData=t)),"image-data-fill"],Hs=({srcImageData:e="imageData",srcImageState:t="imageState",destScalar:o="scalar"}={})=>[Ps(wo,(i=>{const r=i[o];let{crop:n}=i[t];return n&&1!==r&&(n=lt(Ke(n),r,de())),[i[e],{crop:n,rotation:i[t].rotation,flipX:i[t].flipX,flipY:i[t].flipY}]}),((e,t)=>e.imageData=t)),"image-data-crop"],js=({targetSize:e={width:void 0,height:void 0,fit:void 0,upscale:void 0},imageDataResizer:t,srcProp:o="imageData",srcImageState:i="imageState",destImageScaledSize:r="imageScaledSize"})=>[Ps(Co,(r=>{const n=Math.min(e.width||Number.MAX_SAFE_INTEGER,r[i].targetSize&&r[i].targetSize.width||Number.MAX_SAFE_INTEGER),a=Math.min(e.height||Number.MAX_SAFE_INTEGER,r[i].targetSize&&r[i].targetSize.height||Number.MAX_SAFE_INTEGER);return[r[o],{width:n,height:a,fit:e.fit||"contain",upscale:(s=r[i],!!(s.targetSize&&s.targetSize.width||s.targetSize&&s.targetSize.height)||(e.upscale||!1))},t];var s}),((e,t)=>{_e(e.imageData,t)||(e[r]=Fe(t)),e.imageData=t})),"image-data-resize"],Us=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData"}={})=>[Ps(Io,(o=>{const{colorMatrix:i}=o[t],r=i&&Object.keys(i).map((e=>i[e])).filter(Boolean);return[o[e],{colorMatrix:r&&jr(r),convolutionMatrix:o[t].convolutionMatrix,gamma:o[t].gamma,noise:o[t].noise,vignette:o[t].vignette}]}),((e,t)=>e[o]=t)),"image-data-filter"],Gs=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData",destScalar:i="scalar"}={})=>[Ps((async(e,t,o,i,r,n)=>{if(!t||!i.length)return e;let a;try{const r={dataSizeScalar:Ur(e,i)};o&&o[3]>0&&(r.backgroundColor=[...o]),a=await t(e,r)}catch(e){}const s=g("canvas");s.width=e.width,s.height=e.height;const l=s.getContext("2d",{willReadFrequently:!0});if(l.putImageData(e,0,0),"auto"===n){const t=Math.sqrt(e.width*e.height);l.filter=`blur(${Math.round(t/100)}px)`}const c=new Path2D;i.forEach((e=>{const t=nt(e.x,e.y,e.width,e.height);ut(t,r);const o=$t(Ke(t),e.rotation),i=new Path2D;o.forEach(((e,t)=>{if(0===t)return i.moveTo(e.x,e.y);i.lineTo(e.x,e.y)})),c.addPath(i)})),l.clip(c,"nonzero"),l.imageSmoothingEnabled=!1,l.drawImage(a,0,0,s.width,s.height),f(a);const d=l.getImageData(0,0,s.width,s.height);return f(s),d}),((o,{imageScrambler:r,redactionRenderStyle:n})=>[o[e],r,o[t].backgroundColor,o[t].redaction,o[i],n]),((e,t)=>e[o]=t)),"image-data-redact"],Zs=({srcImageData:e="imageData",srcSize:t="size",srcImageState:o="imageState",srcShapes:i="annotation",destImageData:r="imageData",destImageScaledSize:n="imageScaledSize",destScalar:a="scalar",imageDataResizer:s,canvasMemoryLimit:l}={})=>[Ps(Nr,((r,{shapePreprocessor:c,willRequestResource:d,willRequest:u})=>{const h=r[o][i];if(!h.length)return[r[e]];const p=r[a],{crop:m}=r[o],g=r[t];let $=p;const f=r[n];f&&($=Math.min(f.width/m.width,f.height/m.height));const y={width:g.width/p,height:g.height/p};return[r[e],{shapes:h,computeShape:e=>(e=pr(e,y),e=Ts(e,["left","right","top","bottom"]),e=vr(e,$)),transform:e=>{const i=r[t],{rotation:s=0,flipX:l,flipY:c,cropLimitToImage:d}=r[o],u=r[a],{crop:h=Qe(i)}=r[o],p=r[n],m=p?Math.min(p.width/h.width,p.height/h.height):1,g={width:i.width/u*m,height:i.height/u*m},$=Bt(g,s),f=$.width,y=$.height,b=.5*g.width-.5*f,x=.5*g.height-.5*y,v=Ne(g);e.translate(-b,-x),e.translate(-h.x*m,-h.y*m),e.translate(v.x,v.y),e.rotate(s),e.translate(-v.x,-v.y),e.scale(l?-1:1,c?-1:1),e.translate(l?-g.width:0,c?-g.height:0),d&&(e.rect(0,0,g.width,g.height),e.clip())},drawImage:Rs({imageDataResizer:s,canvasMemoryLimit:l}),preprocessShape:e=>c(e,{isPreview:!1,...r[o]}),canvasMemoryLimit:l,willRequest:u||d}]}),((e,t)=>e[r]=t)),"image-data-annotate"],Xs=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData",destImageScaledSize:i="imageScaledSize",imageDataResizer:r,canvasMemoryLimit:n,destScalar:a="scalar"}={})=>[Ps(Nr,((o,{shapePreprocessor:s,willRequestResource:l,willRequest:c})=>{let{decoration:d}=o[t];if("undefined"!=typeof window&&(e=>{if(e&&e._clpdx4s)return;const[i]=[[85,110,108,105,99,101,110,115,101,100,32,80,105,110,116,117,114,97,32,105,110,115,116,97,110,99,101,32]].map((e=>e.map((e=>String.fromCharCode(e))).join(""))),{width:r,height:n}=o[t].crop,a=n/15;d=[...d,{x:.5*-a,y:.5*-a,width:1.5*r,height:1.25*n,text:Array(50).fill(i).join(""),fontWeight:900,lineHeight:a,fontSize:a,color:[1,1,1,.05]}]})(window),!d.length)return[o[e]];let u=o[a];const{crop:h}=o[t],p=o[i];if(p){const e=Math.min(p.width/h.width,p.height/h.height);u=e}return[o[e],{shapes:d,drawImage:Rs({imageDataResizer:r,canvasMemoryLimit:n}),computeShape:e=>(e=pr(e,h),e=Ts(e,["left","right","top","bottom"]),e=vr(e,u)),preprocessShape:e=>s(e,{isPreview:!1,...o[t]}),canvasMemoryLimit:n,willRequest:c||l}]}),((e,t)=>e[o]=t)),"image-data-decorate"],Ys=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData",destImageScaledSize:i="imageScaledSize",imageDataResizer:r,canvasMemoryLimit:n,destScalar:a="scalar"}={})=>[Ps(Nr,((o,{shapePreprocessor:s,willRequestResource:l,willRequest:c})=>{const d=o[t].frame;if(!d)return[o[e]];const u=o[a];let{crop:h}=o[t];h&&1!==u&&(h=lt(Ke(h),u,de()));const p={...h},m=yr(br(d,p,s),p);p.x=Math.abs(m.left),p.y=Math.abs(m.top),p.width+=Math.abs(m.left)+Math.abs(m.right),p.height+=Math.abs(m.top)+Math.abs(m.bottom);const g=o[i],$=g?Math.min(g.width/h.width,g.height/h.height):1;return ut(p,$),p.x=Math.floor(p.x),p.y=Math.floor(p.y),p.width=Math.floor(p.width),p.height=Math.floor(p.height),[o[e],{shapes:[d],contextBounds:p,computeShape:t=>pr(t,o[e]),transform:e=>{e.translate(p.x,p.y)},drawImage:Rs({imageDataResizer:r,canvasMemoryLimit:n}),preprocessShape:e=>s(e,{isPreview:!1,...o[t]}),canvasMemoryLimit:n,willRequest:c||l}]}),((e,t)=>e[o]=t)),"image-data-frame"],qs=({mimeType:e,quality:t,srcImageData:o="imageData",srcFile:i="src",destBlob:r="blob"}={})=>[Ps(B,(r=>[r[o],e||H(r[i].name)||r[i].type,t]),((e,t)=>e[r]=t)),"image-data-to-blob"],Ks=({srcImageData:e="imageData",srcOrientation:t="orientation",destCanvas:o="dest"}={})=>[Ps(S,(o=>[o[e],o[t]]),((e,t)=>e[o]=t)),"image-data-to-canvas"],Js=async(e,t)=>{if(!yo(e)||!t)return e;const i=new DataView(t),r=o(i);if(!r||!r.exif)return e;const n=["exif","mpf","xmp"].reduce(((e,t)=>r[t]?Math.max(e,r[t].offset+r[t].size):e),0);return((e,t,o=[0,e.size])=>t?new Blob([t,e.slice(...o)],{type:e.type}):e)(e,t.slice(0,n+2),[20])},Qs=(e="blob",t="head",o="blob")=>[Ps(Js,(o=>[o[e],o[t]]),((e,t)=>e[o]=t)),"blob-write-image-head"],el=({renameFile:e,srcBlob:t="blob",srcFile:o="src",destFile:i="dest",defaultFilename:r}={})=>[Ps(j,(i=>[i[t],e?e(i[o]):i[o].name||`${r}.${_(i[t].type)}`]),((e,t)=>e[i]=t)),"blob-to-file"],tl=({url:e="./",dataset:t=(e=>[["dest",e.dest,e.dest.name],["imageState",e.imageState]]),destStore:o="store",credentials:i,headers:r={}})=>[Ps((async(t,o)=>await((e,t,o)=>new Promise(((i,r)=>{const{token:n={},beforeSend:s=a,onprogress:l=a}=o;n.cancel=()=>c.abort();const c=new XMLHttpRequest;c.upload.onprogress=l,c.onload=()=>c.status>=200&&c.status<300?i(c):r(c),c.onerror=()=>r(c),c.ontimeout=()=>r(c),c.open("POST",encodeURI(e)),s(c),c.send(t instanceof FormData?t:t.reduce(((e,t)=>(e.append(...t.map(bo)),e)),new FormData))})))(e,t,{onprogress:o,beforeSend:e=>so(e,{headers:r,credentials:i})})),((e,o,i)=>[t(e),i]),((e,t)=>e[o]=t)),"store"],ol=e=>[Ps((t=>e&&e.length?(Object.keys(t).forEach((o=>{e.includes(o)||delete t[o]})),t):t)),"prop-filter"],il=(e={})=>{const{orientImage:t=!0,outputProps:o=["src","dest","size","duration"],preprocessImageFile:i,request:r={}}=e;return[Es({willRequest:()=>r}),Is(),i&&[Ps(i,((e,t,o)=>[e.dest,t,o]),((e,t)=>e.dest=t)),"preprocess-image-file"],As({srcProp:"dest"}),zs({srcProp:"dest"}),t&&Ds({srcProp:"dest"}),t&&Os(),t&&Fs(),ol(o)].filter(Boolean)},rl=e=>e&&(R(e)?tl({url:e}):P(e)?[e,"store"]:tl(e)),nl=(e={})=>(t,o,i={})=>{if(!Kt(t))return;let{canvasMemoryLimit:r=Cs(),orientImage:n=!0,copyImageHead:a=!0,mimeType:s,quality:l,renameFile:c,targetSize:d,imageDataResizer:u,store:h,format:p="file",outputProps:m=["src","dest","imageState","store"],preprocessImageSource:g,preprocessImageState:$,postprocessImageData:f,postprocessImageBlob:y}={...e,...i};return"blob"===p&&(p="file"),[g&&[Ps(g,((e,t,o)=>[e.src,t,o,e.imageState]),((e,t)=>e.src=t)),"preprocess-image-source"],(n||a)&&Ds(),n&&Os(),As(),$&&[Ps($,((e,t,o,i)=>[e.imageState,t,o,{size:e.size,orientation:e.orientation}]),((e,t)=>e.imageState=t)),"preprocess-image-state"],_s({canvasMemoryLimit:r}),n&&Fs(),n&&Vs(),Ws(),Gs(),Hs(),js({imageDataResizer:u,targetSize:d}),Zs({imageDataResizer:u,canvasMemoryLimit:r,srcShapes:"manipulation"}),Us(),Ns(),Zs({imageDataResizer:u,canvasMemoryLimit:r,srcShapes:"annotation"}),Xs({imageDataResizer:u,canvasMemoryLimit:r}),Ys({imageDataResizer:u,canvasMemoryLimit:r}),f&&[Ps(f,((e,t,o)=>[e.imageData,t,o]),((e,t)=>e.imageData=t)),"postprocess-image-data"],"file"===p?qs({mimeType:s,quality:l}):"canvas"===p?Ks():[e=>(e.dest=e.imageData,e)],"file"===p&&n&&Bs(),"file"===p&&a&&Qs(),y&&[Ps(y,(({blob:e,imageData:t,src:o},i,r)=>[{blob:e,imageData:t,src:o},i,r]),((e,t)=>e.blob=t)),"postprocess-image-file"],"file"===p&&el({defaultFilename:"image",renameFile:c}),"file"===p?rl(h):P(h)&&[h,"store"],ol(m)].filter(Boolean)};var al=(e,t,o,i,r,n,a,s,l,c,d)=>{if(!(e&&t&&o&&i&&s))return;s*=n;const u=Ct(Ke(t)),h=at(u),p=at(e),m=Qe(o),g=at(m),$=rs(o,i,l),f=at($),y=we(pe(g),f),b=we(pe(p),h);y.x+=b.x,y.y+=b.y;const x=me(pe(y));x.x+=b.x,x.y+=b.y;const v=at(st(st(Ke(r),a),e)),w=we(v,p);return ve(y,w),{origin:x,translation:y,rotation:{x:d?Math.PI:0,y:c?Math.PI:0,z:l},scale:s}};let sl=null;var ll=()=>{if(null===sl)if("WebGL2RenderingContext"in window){let e;try{e=g("canvas"),sl=!!e.getContext("webgl2")}catch(e){sl=!1}e&&f(e),e=void 0}else sl=!1;return sl},cl=e=>0==(e&e-1),dl=(e,t={},o="",i="")=>Object.keys(t).filter((e=>!C(t[e]))).reduce(((e,r)=>e.replace(new RegExp(o+r+i),t[r])),e);const ul={head:"#version 300 es\n\nin vec4 aPosition;uniform mat4 uMatrix;",text:"\nin vec2 aTexCoord;out vec2 vTexCoord;",matrix:"\ngl_Position=uMatrix*vec4(aPosition.x,aPosition.y,0,1);"},hl={head:"#version 300 es\nprecision highp float;\n\nout vec4 fragColor;",mask:"\nuniform float uMaskFeather[8];uniform float uMaskBounds[4];uniform float uMaskOpacity;float mask(float x,float y,float bounds[4],float opacity){return 1.0-(1.0-(smoothstep(bounds[3],bounds[3]+1.0,x)*(1.0-smoothstep(bounds[1]-1.0,bounds[1],x))*(1.0-step(bounds[0],y))*step(bounds[2],y)))*(1.0-opacity);}",init:"\nfloat a=1.0;vec4 fillColor=uColor;vec4 textureColor=texture(uTexture,vTexCoord);textureColor*=(1.0-step(uRepeat.y,vTexCoord.y))*step(0.0,vTexCoord.y)*(1.0-step(uRepeat.x,vTexCoord.x))*step(0.0,vTexCoord.x);",colorize:"\nif(uTextureColor.a!=0.0&&textureColor.a>0.0){vec3 colorFlattened=textureColor.rgb/textureColor.a;if(colorFlattened.r>=.9999&&colorFlattened.g==0.0&&colorFlattened.b>=.9999){textureColor.rgb=uTextureColor.rgb*textureColor.a;}textureColor*=uTextureColor.a;}",maskapply:"\nfloat m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);",maskfeatherapply:"\nfloat leftFeatherOpacity=step(uMaskFeather[1],gl_FragCoord.x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],gl_FragCoord.x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],gl_FragCoord.x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],gl_FragCoord.x));a*=leftFeatherOpacity*rightFeatherOpacity;",rectaa:"\nvec2 scaledPoint=vec2(vRectCoord.x*uSize.x,vRectCoord.y*uSize.y);a*=smoothstep(0.0,uEdgeFeather,uSize.x-scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,uSize.y-scaledPoint.y);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.y);",cornerradius:"\nvec2 s=(uSize-2.0)*.5;vec2 r=(vRectCoord*uSize)-1.0;vec2 p=r-s;float cornerRadius=uCornerRadius[0];bool left=r.x{const i=e.createShader(o),r=((e,t,o)=>(t=dl(t,o===e.VERTEX_SHADER?ul:hl,"##").trim(),ll()?t:(t=(t=t.replace(/#version.+/gm,"").trim()).replace(/^\/\/\#/gm,"#"),o===e.VERTEX_SHADER&&(t=t.replace(/in /gm,"attribute ").replace(/out /g,"varying ")),o===e.FRAGMENT_SHADER&&(t=t.replace(/in /gm,"varying ").replace(/out.*?;/gm,"").replace(/texture\(/g,"texture2D(").replace(/fragColor/g,"gl_FragColor")),""+t)))(e,t,o);return e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)||console.error(e.getShaderInfoLog(i)),i},ml=(e,t,o,i,r)=>{const n=pl(e,t,e.VERTEX_SHADER),a=pl(e,o,e.FRAGMENT_SHADER),s=e.createProgram();e.attachShader(s,n),e.attachShader(s,a),e.linkProgram(s);const l={};return i.forEach((t=>{l[t]=e.getAttribLocation(s,t)})),r.forEach((t=>{l[t]=e.getUniformLocation(s,t)})),{program:s,locations:l,destroy(){e.detachShader(s,n),e.detachShader(s,a),e.deleteShader(n),e.deleteShader(a),e.deleteProgram(s)}}},gl=e=>"VIDEO"!==e.nodeName&&(!!ll()||cl(e.width)&&cl(e.height)),$l=(e,t,o,i)=>(e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),((e,t,o)=>{e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,gl(t)?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,o.filterParam),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,o.wrapParam),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,o.wrapParam),gl(t)&&e.generateMipmap(e.TEXTURE_2D)})(e,o,i),e.bindTexture(e.TEXTURE_2D,null),t),fl=(e,t=1)=>e?[e[0],e[1],e[2],Ao(e[3])?t*e[3]:t]:[0,0,0,0],yl=()=>{const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},bl=(e,t,o,i,r,n,a)=>{const s=1/(t-o),l=1/(i-r),c=1/(n-a);e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+o)*s,e[13]=(r+i)*l,e[14]=(a+n)*c,e[15]=1},xl=(e,t,o,i)=>{e[12]=e[0]*t+e[4]*o+e[8]*i+e[12],e[13]=e[1]*t+e[5]*o+e[9]*i+e[13],e[14]=e[2]*t+e[6]*o+e[10]*i+e[14],e[15]=e[3]*t+e[7]*o+e[11]*i+e[15]},vl=(e,t)=>{e[0]*=t,e[1]*=t,e[2]*=t,e[3]*=t,e[4]*=t,e[5]*=t,e[6]*=t,e[7]*=t,e[8]*=t,e[9]*=t,e[10]*=t,e[11]*=t},wl=(e,t)=>{const o=Math.sin(t),i=Math.cos(t),r=e[4],n=e[5],a=e[6],s=e[7],l=e[8],c=e[9],d=e[10],u=e[11];e[4]=r*i+l*o,e[5]=n*i+c*o,e[6]=a*i+d*o,e[7]=s*i+u*o,e[8]=l*i-r*o,e[9]=c*i-n*o,e[10]=d*i-a*o,e[11]=u*i-s*o},Sl=(e,t)=>{const o=Math.sin(t),i=Math.cos(t),r=e[0],n=e[1],a=e[2],s=e[3],l=e[8],c=e[9],d=e[10],u=e[11];e[0]=r*i-l*o,e[1]=n*i-c*o,e[2]=a*i-d*o,e[3]=s*i-u*o,e[8]=r*o+l*i,e[9]=n*o+c*i,e[10]=a*o+d*i,e[11]=s*o+u*i},kl=(e,t)=>{const o=Math.sin(t),i=Math.cos(t),r=e[0],n=e[1],a=e[2],s=e[3],l=e[4],c=e[5],d=e[6],u=e[7];e[0]=r*i+l*o,e[1]=n*i+c*o,e[2]=a*i+d*o,e[3]=s*i+u*o,e[4]=l*i-r*o,e[5]=c*i-n*o,e[6]=d*i-a*o,e[7]=u*i-s*o};var Cl=e=>e*Math.PI/180,Tl=(e,t)=>ll()?e.getContext("webgl2",t):e.getContext("webgl",t)||e.getContext("experimental-webgl",t);const Ml=(e,t)=>{const o=e.length;return t>=o?e[t%o]:t<0?e[t%o+o]:e[t]},Rl=(e,t,o,i)=>{const r=ue(o.x-t.x,o.y-t.y),n=ue(i.x-o.x,i.y-o.y),a=ue(t.x-i.x,t.y-i.y),s=ue(e.x-t.x,e.y-t.y),l=ue(e.x-o.x,e.y-o.y),c=ue(e.x-i.x,e.y-i.y),d=Te(r,s),u=Te(n,l),h=Te(a,c);return d<=0&&u<=0&&h<=0},Pl=e=>{if(e.length<3)return[];if((e=>{const t=e.length;for(let o=0;o{let t,o,i,r,n,a=0;const s=e.length;for(t=0;t3;){if($<=0)return[];for($--,r=0;r{const n=fe(ue(i.x-o.x,i.y-o.y)),a=fe(ue(r.x-i.x,r.y-i.y)),s=fe(ue(n.x+a.x,n.y+a.y)),l=ue(-s.y,s.x),c=ue(-n.y,n.x),d=Math.min(1/Ce(l,c),5);e[t]=i.x,e[t+1]=i.y,e[t+2]=l.x*d,e[t+3]=l.y*d,e[t+4]=-1,e[t+5]=i.x,e[t+6]=i.y,e[t+7]=l.x*d,e[t+8]=l.y*d,e[t+9]=1},Il=e=>{const t=new Float32Array(8);return t[0]=e[3].x,t[1]=e[3].y,t[2]=e[0].x,t[3]=e[0].y,t[4]=e[2].x,t[5]=e[2].y,t[6]=e[1].x,t[7]=e[1].y,t},Al=(e,t=0,o,i)=>{const r=wt(e),n=e.x+.5*e.width,a=e.y+.5*e.height;return(o||i)&&Ie(r,o,i,n,a),0!==t&&Ae(r,t,n,a),r},Ll=(e,t,o,i,r)=>{const n=Math.min(20,Math.max(4,Math.round(i/2)));let a=0,s=0,l=0,c=0,d=0;for(;d{if(null!==zl)return zl;let e=g("canvas");const t=Tl(e);return zl=t?t.getParameter(t.MAX_TEXTURE_SIZE):void 0,f(e),e=void 0,zl},Dl=()=>u()&&!!window.chrome;const Ol=new Float32Array([0,1,0,0,1,1,1,0]),Bl=new Float32Array([1,0,0,0,1,1,0,1]),Wl=u()&&qo(),_l=[0,0,0,0,1,0,0,0,0],Vl=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Nl=[0,0,0,0],Hl=[0,0,0,0],jl=(e,t,o,i,r)=>{if(!o||!i)return Ol;let n=i.x/o.width,a=i.y/o.height,s=e/o.width/r,l=t/o.height/r;s-=n,l-=a;return new Float32Array([-n,l,-n,-a,s,l,s,-a])};var Ul=(e,t={})=>{const{alpha:o=!1}=t,i={width:0,height:0},r={width:0,height:0},n=Fl()||1024;let a,s,l;const c=yl(),d=yl();let u,h,p,m,g,$,y,b,x,v=0,w=0,S=0,k=1;const C=new Map([]),T=()=>{P.stencilOp(P.KEEP,P.KEEP,P.KEEP),P.stencilFunc(P.ALWAYS,1,255),P.stencilMask(255)},M=Cl(30),R=Math.tan(M/2),P=Tl(e,{alpha:o,antialias:!1,premultipliedAlpha:!0,stencil:!0});if(!P)return;P.getExtension("OES_standard_derivatives"),P.disable(P.DEPTH_TEST),P.enable(P.STENCIL_TEST),P.enable(P.BLEND),P.blendFunc(P.ONE,P.ONE_MINUS_SRC_ALPHA),P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!(!o&&qo())),T();const E=P.createTexture();P.bindTexture(P.TEXTURE_2D,E),P.texImage2D(P.TEXTURE_2D,0,P.RGBA,1,1,0,P.RGBA,P.UNSIGNED_BYTE,new Uint8Array(Nl)),C.set(0,E);const I=P.createTexture();C.set(2,I);const A=P.createFramebuffer(),L=P.createTexture();C.set(1,L);const z=P.createFramebuffer(),F=ml(P,"\n##head\n##text\nvoid main(){vTexCoord=aTexCoord;gl_Position=uMatrix*aPosition;}","\n##head\nin vec2 vTexCoord;uniform sampler2D uTexture;uniform sampler2D uTextureOverlay;uniform sampler2D uTextureBlend;uniform vec2 uTextureSize;uniform float uOpacity;uniform int uAntialias;uniform vec4 uOverlayColor;uniform mat4 uColorMatrix;uniform vec4 uColorOffset;uniform float uClarityKernel[9];uniform float uClarityKernelWeight;uniform float uColorGamma;uniform float uColorVignette;uniform float uMaskClip;uniform float uMaskOpacity;uniform float uMaskBounds[4];uniform float uMaskCornerRadius[4];uniform float uMaskFeather[8];vec4 applyGamma(vec4 c,float g){c.r=pow(c.r,g);c.g=pow(c.g,g);c.b=pow(c.b,g);return c;}vec4 applyColorMatrix(vec4 c,mat4 m,vec4 o){return(c*m)+(o*c.a);}vec4 applyConvolutionMatrix(vec4 c,float k0,float k1,float k2,float k3,float k4,float k5,float k6,float k7,float k8,float w){vec2 pixel=vec2(1)/uTextureSize;vec4 colorSum=texture(uTexture,vTexCoord-pixel)*k0+texture(uTexture,vTexCoord+pixel*vec2(0.0,-1.0))*k1+texture(uTexture,vTexCoord+pixel*vec2(1.0,-1.0))*k2+texture(uTexture,vTexCoord+pixel*vec2(-1.0,0.0))*k3+texture(uTexture,vTexCoord)*k4+texture(uTexture,vTexCoord+pixel*vec2(1.0,0.0))*k5+texture(uTexture,vTexCoord+pixel*vec2(-1.0,1.0))*k6+texture(uTexture,vTexCoord+pixel*vec2(0.0,1.0))*k7+texture(uTexture,vTexCoord+pixel)*k8;vec4 color=vec4(clamp((colorSum/w),0.0,1.0).rgb,c.a);return color;}vec4 applyVignette(vec4 c,vec2 pos,vec2 center,float v){float d=distance(pos,center)/length(center);float f=1.0-(d*abs(v));if(v>0.0){c.rgb*=f;}else if(v<0.0){c.rgb+=(1.0-f)*(1.0-c.rgb);}return c;}vec4 blendPremultipliedAlpha(vec4 back,vec4 front){return front+(back*(1.0-front.a));}void main(){float x=gl_FragCoord.x;float y=gl_FragCoord.y;float a=1.0;float maskTop=uMaskBounds[0];float maskRight=uMaskBounds[1];float maskBottom=uMaskBounds[2];float maskLeft=uMaskBounds[3];float leftFeatherOpacity=step(uMaskFeather[1],x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],x));a*=leftFeatherOpacity*rightFeatherOpacity;float overlayColorAlpha=(smoothstep(maskLeft,maskLeft+1.0,x)*(1.0-smoothstep(maskRight-1.0,maskRight,x))*(1.0-step(maskTop,y))*step(maskBottom,y));if(uOverlayColor.a==0.0){a*=overlayColorAlpha;}vec2 offset=vec2(maskLeft,maskBottom);vec2 size=vec2(maskRight-maskLeft,maskTop-maskBottom)*.5;vec2 center=offset.xy+size.xy;int pixelX=int(step(center.x,x));int pixelY=int(step(y,center.y));float cornerRadius=0.0;if(pixelX==0&&pixelY==0)cornerRadius=uMaskCornerRadius[0];if(pixelX==1&&pixelY==0)cornerRadius=uMaskCornerRadius[1];if(pixelX==0&&pixelY==1)cornerRadius=uMaskCornerRadius[2];if(pixelX==1&&pixelY==1)cornerRadius=uMaskCornerRadius[3];float cornerOffset=sign(cornerRadius)*length(max(abs(gl_FragCoord.xy-size-offset)-size+cornerRadius,0.0))-cornerRadius;float cornerOpacity=1.0-smoothstep(0.0,1.0,cornerOffset);a*=cornerOpacity;if(uAntialias==1){vec2 scaledPoint=vec2(vTexCoord.x*uTextureSize.x,vTexCoord.y*uTextureSize.y);a*=smoothstep(0.0,1.0,uTextureSize.x-scaledPoint.x);a*=smoothstep(0.0,1.0,uTextureSize.y-scaledPoint.y);a*=smoothstep(0.0,1.0,scaledPoint.x);a*=smoothstep(0.0,1.0,scaledPoint.y);}vec4 color=texture(uTexture,vTexCoord);if(uClarityKernelWeight!=-1.0){color=applyConvolutionMatrix(color,uClarityKernel[0],uClarityKernel[1],uClarityKernel[2],uClarityKernel[3],uClarityKernel[4],uClarityKernel[5],uClarityKernel[6],uClarityKernel[7],uClarityKernel[8],uClarityKernelWeight);}color=blendPremultipliedAlpha(color,texture(uTextureBlend,vTexCoord));color=applyGamma(color,uColorGamma);color=applyColorMatrix(color,uColorMatrix,uColorOffset);color*=a;if(uColorVignette!=0.0){vec2 pos=gl_FragCoord.xy-offset;color=applyVignette(color,pos,center-offset,uColorVignette);}color=blendPremultipliedAlpha(color,texture(uTextureOverlay,vTexCoord));if(overlayColorAlpha<=0.0){color*=1.0-uOverlayColor.a;}color*=uOpacity;fragColor=color;}",["aPosition","aTexCoord"],["uMatrix","uTexture","uTextureBlend","uTextureOverlay","uTextureSize","uColorGamma","uColorVignette","uColorOffset","uColorMatrix","uClarityKernel","uClarityKernelWeight","uOpacity","uMaskOpacity","uMaskBounds","uMaskCornerRadius","uMaskFeather","uOverlayColor","uAntialias"]),D=P.createBuffer(),O=P.createBuffer();P.bindBuffer(P.ARRAY_BUFFER,O),P.bufferData(P.ARRAY_BUFFER,Ol,P.STATIC_DRAW);const B=P.createBuffer();P.bindBuffer(P.ARRAY_BUFFER,B),P.bufferData(P.ARRAY_BUFFER,Bl,P.STATIC_DRAW);const W=ml(P,"#version 300 es\n\nin vec4 aPosition;in vec2 aNormal;in float aMiter;out vec2 vNormal;out float vMiter;out float vWidth;uniform float uWidth;uniform float uSharpness;uniform mat4 uMatrix;void main(){vMiter=aMiter;vNormal=aNormal;vWidth=(uWidth*.5)+uSharpness;gl_Position=uMatrix*vec4(aPosition.x+(aNormal.x*vWidth*aMiter),aPosition.y+(aNormal.y*vWidth*aMiter),0,1);}","\n##head\n##mask\nin vec2 vNormal;in float vMiter;in float vWidth;uniform float uWidth;uniform vec4 uColor;uniform vec4 uCanvasColor;void main(){vec4 fillColor=uColor;float m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);if(m<=0.0)discard;fillColor.a*=clamp(smoothstep(vWidth-.5,vWidth-1.0,abs(vMiter)*vWidth),0.0,1.0);fillColor.rgb*=fillColor.a;fillColor.rgb*=m;fillColor.rgb+=(1.0-m)*(uCanvasColor.rgb*fillColor.a);fragColor=fillColor;}",["aPosition","aNormal","aMiter"],["uColor","uCanvasColor","uMatrix","uWidth","uSharpness","uMaskBounds","uMaskOpacity"]),_=P.createBuffer();Dl()&&(P.bindBuffer(P.ARRAY_BUFFER,_),P.bufferData(P.ARRAY_BUFFER,1,P.DYNAMIC_DRAW));const V=(e,t,o,i=!1)=>{const{program:r,locations:n}=W;P.useProgram(r),P.enableVertexAttribArray(n.aPosition),P.enableVertexAttribArray(n.aNormal),P.enableVertexAttribArray(n.aMiter);const a=((e,t)=>{let o,i,r,n=0;const a=e.length,s=new Float32Array(10*(t?a+1:a)),l=e[0],c=e[a-1];for(n=0;n{const a=Math.min(Math.min(4096,n)/o.width,Math.min(4096,n)/o.height,r),l=Math.floor(a*o.width),c=Math.floor(a*o.height);_e(o,Q[e])?P.bindFramebuffer(P.FRAMEBUFFER,t):(P.bindTexture(P.TEXTURE_2D,C.get(e)),P.texImage2D(P.TEXTURE_2D,0,P.RGBA,l,c,0,P.RGBA,P.UNSIGNED_BYTE,null),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.LINEAR),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),P.bindFramebuffer(P.FRAMEBUFFER,t),P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,C.get(e),0),Q[e]=o);const h=o.width*s,p=o.height*s;var m,g;bl(d,0,h,p,0,-1,1),xl(d,0,p,0),g=1,(m=d)[0]*=g,m[1]*=g,m[2]*=g,m[3]*=g,((e,t)=>{e[4]*=t,e[5]*=t,e[6]*=t,e[7]*=t})(d,-1),u=d,P.viewport(0,0,l,c),P.colorMask(!0,!0,!0,!0),P.clearColor(0,0,0,0),P.clear(P.COLOR_BUFFER_BIT),x=[1,0,1,0,1,Math.max(i.width,o.width),1,Math.max(i.width,o.width)]},te=(e,t)=>{const{forceRelease:o=!1}=t||{},{src:i}=J.get(e);i instanceof HTMLCanvasElement&&(o||i.dataset.retain||f(i)),J.delete(e),P.deleteTexture(e)},oe=e=>J.get(e).isRotatedVideo;return{drawPath:(e,t=0,o=!1,i=!1,r,n,a,l,c)=>{if(e.length<2)return;const d=e.map((e=>({x:e.x*s,y:e.y*s}))),h=r*s;if(h>0&&V(d,h,fl(n,c),a),d.length<3||!l||0===l[3]||!a)return;const p=Pl(d),m=new Float32Array(6*p.length);p.forEach((([e,t,o],i)=>{const r=6*i;m[r+0]=e.x,m[r+1]=e.y,m[r+2]=t.x,m[r+3]=t.y,m[r+4]=o.x,m[r+5]=o.y})),((e,t)=>{const{program:o,locations:i}=N;P.useProgram(o),P.enableVertexAttribArray(i.aPosition),P.uniform4fv(i.uColor,t),P.uniformMatrix4fv(i.uMatrix,!1,u),P.uniform1fv(i.uMaskBounds,y),P.uniform1f(i.uMaskOpacity,$),P.uniform4f(i.uCanvasColor,v,w,S,k),P.bindBuffer(P.ARRAY_BUFFER,H),P.bufferData(P.ARRAY_BUFFER,e,P.STATIC_DRAW),P.vertexAttribPointer(i.aPosition,2,P.FLOAT,!1,0,0),P.drawArrays(P.TRIANGLES,0,e.length/2),P.disableVertexAttribArray(i.aPosition)})(m,fl(l,c))},drawRect:(e,t=0,o=!1,i=!1,r,n,a,l,c,d=!1,h,p,m,g,f,b=1/s,C,T)=>{const M=ut(Ke(e),s),R=r.map((t=>((e,t)=>Math.floor(ns(e,0,Math.min(.5*(t.width-1),.5*(t.height-1)))))(t||0,e))).map((e=>e*s));if(n||a){const e=Ke(M);e.x-=.5,e.y-=.5,e.width+=1,e.height+=1;const r=Al(e,t,o,i),p=Il(r);let m;C&&(m=fl(C),0===m[3]&&(m[3]=.001));const I=l&&d?[e.width/l.width,e.height/l.height]:[1,1];((e,t,o,i,r,n=E,a,l=1,c=Nl,d=Ol,h=x,p=1,m)=>{const{program:g,locations:f}=j;P.useProgram(g),P.enableVertexAttribArray(f.aPosition),P.enableVertexAttribArray(f.aTexCoord),P.enableVertexAttribArray(f.aRectCoord),P.uniform4fv(f.uColor,r),P.uniform2fv(f.uSize,[t,o]),P.uniform2fv(f.uPosition,[e[2],e[3]]),P.uniform2fv(f.uRepeat,a),P.uniform1i(f.uInverted,m?1:0),P.uniform1fv(f.uCornerRadius,i),P.uniform4f(f.uCanvasColor,v,w,S,k),P.uniform1fv(f.uMaskFeather,h.map(((e,t)=>t%2==0?e:e*s))),P.uniform1fv(f.uMaskBounds,y),P.uniform1f(f.uMaskOpacity,$),P.uniform1f(f.uEdgeFeather,Math.max(0,p)),P.uniformMatrix4fv(f.uMatrix,!1,u),P.uniform1i(f.uTexture,4),P.uniform4fv(f.uTextureColor,c),P.uniform1f(f.uTextureOpacity,l),P.activeTexture(P.TEXTURE0+4),P.bindTexture(P.TEXTURE_2D,n),P.bindBuffer(P.ARRAY_BUFFER,Z),P.bufferData(P.ARRAY_BUFFER,d,P.STATIC_DRAW),P.vertexAttribPointer(f.aTexCoord,2,P.FLOAT,!1,0,0),P.bindBuffer(P.ARRAY_BUFFER,X),P.bufferData(P.ARRAY_BUFFER,Ol,P.STATIC_DRAW),P.vertexAttribPointer(f.aRectCoord,2,P.FLOAT,!1,0,0),P.bindBuffer(P.ARRAY_BUFFER,G),P.bufferData(P.ARRAY_BUFFER,e,P.STATIC_DRAW),P.vertexAttribPointer(f.aPosition,2,P.FLOAT,!1,0,0),P.drawArrays(P.TRIANGLE_STRIP,0,e.length/2),P.disableVertexAttribArray(f.aPosition),P.disableVertexAttribArray(f.aTexCoord),P.disableVertexAttribArray(f.aRectCoord)})(p,e.width,e.height,R,fl(n,g),a,I,g,m,h?new Float32Array(h):jl(e.width,e.height,l,c,s),f,b*s,T)}p&&(p=Math.min(p,M.width,M.height),V(((e,t,o,i,r,n,a,s)=>{const l=[];if(n.every((e=>0===e)))l.push(ue(e,t),ue(e+o,t),ue(e+o,t+i),ue(e,t+i));else{const[r,a,s,c]=n,d=e,u=e+o,h=t,p=t+i;l.push(ue(d+r,h)),Ll(l,u-a,h+a,a,-1),l.push(ue(u,h+a)),Ll(l,u-c,p-c,c,0),l.push(ue(u-c,p)),Ll(l,d+s,p-s,s,1),l.push(ue(d,p-s)),Ll(l,d+r,h+r,r,2)}return(a||s)&&Ie(l,a,s,e+.5*o,t+.5*i),r&&Ae(l,r,e+.5*o,t+.5*i),l})(M.x,M.y,M.width,M.height,t,R,o,i),p*s,fl(m,g),!0))},drawEllipse:(e,t,o,i,r,n,a,l,c,d,h,p,m,g,f)=>{const b=ut(nt(e.x-t,e.y-o,2*t,2*o),s);if(a||l){const e=Ke(b);e.x-=.5,e.y-=.5,e.width+=1,e.height+=1;const t=Al(e,i,r,n);((e,t,o,i,r=E,n=Ol,a=1,s=!1)=>{const{program:l,locations:c}=Y;P.useProgram(l),P.enableVertexAttribArray(c.aPosition),P.enableVertexAttribArray(c.aTexCoord),P.uniformMatrix4fv(c.uMatrix,!1,u),P.uniform2fv(c.uRadius,[.5*t,.5*o]),P.uniform1i(c.uInverted,s?1:0),P.uniform4fv(c.uColor,i),P.uniform4f(c.uCanvasColor,v,w,S,k),P.uniform2fv(c.uRepeat,[1,1]),P.uniform1fv(c.uMaskBounds,y),P.uniform1f(c.uMaskOpacity,$),P.uniform1i(c.uTexture,4),P.uniform1f(c.uTextureOpacity,a),P.activeTexture(P.TEXTURE0+4),P.bindTexture(P.TEXTURE_2D,r),P.bindBuffer(P.ARRAY_BUFFER,K),P.bufferData(P.ARRAY_BUFFER,n,P.STATIC_DRAW),P.vertexAttribPointer(c.aTexCoord,2,P.FLOAT,!1,0,0),P.bindBuffer(P.ARRAY_BUFFER,q),P.bufferData(P.ARRAY_BUFFER,e,P.STATIC_DRAW),P.vertexAttribPointer(c.aPosition,2,P.FLOAT,!1,0,0),P.drawArrays(P.TRIANGLE_STRIP,0,e.length/2),P.disableVertexAttribArray(c.aPosition),P.disableVertexAttribArray(c.aTexCoord)})(Il(t),e.width,e.height,fl(a,g),l,h?new Float32Array(h):jl(e.width,e.height,c,d,s),g,f)}p&&V(((e,t,o,i,r,n,a)=>{const s=.5*Math.abs(o),l=.5*Math.abs(i),c=Math.abs(o)+Math.abs(i),d=Math.max(20,Math.round(c/6));return Lt(ue(e+s,t+l),s,l,r,n,a,d)})(b.x,b.y,b.width,b.height,i,r,n),p*s,fl(m,g),!0)},drawImage:(e,t,o,r,n,l,c,d,u,h,p=Vl,m=1,g,f=1,x=0,v=b,w=Hl,S=Nl,k=!1,T=!1,E=!0)=>{const I=t.width*s,A=t.height*s,L=-.5*I,z=.5*A,W=.5*I,_=-.5*A,V=new Float32Array([L,_,0,L,z,0,W,_,0,W,z,0]);P.bindBuffer(P.ARRAY_BUFFER,D),P.bufferData(P.ARRAY_BUFFER,V,P.STATIC_DRAW);const N=t.height/2/R*(i.height/t.height)*-1;n*=s,l*=s,o*=s,r*=s;const{program:H,locations:j}=F,U=yl();((e,t,o,i,r)=>{const n=1/Math.tan(t/2),a=1/(i-r);e[0]=n/o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+i)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*i*a,e[15]=0})(U,M,a,1,2*-N),xl(U,n,-l,N),xl(U,o,-r,0),kl(U,-u),vl(U,h),xl(U,-o,r,0),Sl(U,d),wl(U,c),P.useProgram(H),P.enableVertexAttribArray(j.aPosition),P.enableVertexAttribArray(j.aTexCoord),P.uniform1i(j.uTexture,3),P.uniform2f(j.uTextureSize,t.width,t.height),P.activeTexture(P.TEXTURE0+3),P.bindTexture(P.TEXTURE_2D,e);const G=T?1:0,Z=C.get(G);P.uniform1i(j.uTextureBlend,G),P.activeTexture(P.TEXTURE0+G),P.bindTexture(P.TEXTURE_2D,Z);const X=k?2:0,Y=C.get(X);P.uniform1i(j.uTextureOverlay,X),P.activeTexture(P.TEXTURE0+X),P.bindTexture(P.TEXTURE_2D,Y),P.bindBuffer(P.ARRAY_BUFFER,D),P.vertexAttribPointer(j.aPosition,3,P.FLOAT,!1,0,0);const q=Wl&&oe(e);let K;P.bindBuffer(P.ARRAY_BUFFER,q?B:O),P.vertexAttribPointer(j.aTexCoord,2,P.FLOAT,!1,0,0),P.uniformMatrix4fv(j.uMatrix,!1,U),P.uniform4fv(j.uOverlayColor,S),!g||ds(g,_l)?(g=_l,K=-1):(K=g.reduce(((e,t)=>e+t),0),K=K<=0?1:K),P.uniform1fv(j.uClarityKernel,g),P.uniform1f(j.uClarityKernelWeight,K),P.uniform1f(j.uColorGamma,1/f),P.uniform1f(j.uColorVignette,x),P.uniform1i(j.uAntialias,E?1:0),P.uniform4f(j.uColorOffset,p[4],p[9],p[14],p[19]),P.uniformMatrix4fv(j.uColorMatrix,!1,[p[0],p[1],p[2],p[3],p[5],p[6],p[7],p[8],p[10],p[11],p[12],p[13],p[15],p[16],p[17],p[18]]),P.uniform1f(j.uOpacity,m),P.uniform1f(j.uMaskOpacity,$),P.uniform1fv(j.uMaskBounds,y),P.uniform1fv(j.uMaskCornerRadius,w.map((e=>e*s))),P.uniform1fv(j.uMaskFeather,v.map(((e,t)=>t%2==0?e:e*s))),P.drawArrays(P.TRIANGLE_STRIP,0,4),P.disableVertexAttribArray(j.aPosition),P.disableVertexAttribArray(j.aTexCoord)},textureFilterNearest:P.NEAREST,textureFilterLinear:P.LINEAR,textureClamp:P.CLAMP_TO_EDGE,textureRepeat:P.REPEAT,textureCreate:()=>P.createTexture(),textureUpdate:(e,t,o)=>(J.set(e,{src:t,options:o,isRotatedVideo:"VIDEO"===t.nodeName&&(t.dataset&&90==t.dataset.rotation||270==t.dataset.rotation)}),$l(P,e,t,o)),textureGetSize:e=>{const{src:t,options:o}=J.get(e),i=Fe(t);return o.scalar?Ue(i,(e=>e/o.scalar)):i},textureDelete:te,enablePreviewStencil:()=>{P.stencilOp(P.KEEP,P.KEEP,P.REPLACE),P.stencilFunc(P.ALWAYS,1,255),P.stencilMask(255)},applyPreviewStencil:()=>{P.stencilFunc(P.EQUAL,1,255),P.stencilMask(0)},disablePreviewStencil:T,setCanvasColor(e){v=e[0],w=e[1],S=e[2],k=o?e[3]:1,P.clear(P.COLOR_BUFFER_BIT)},resetCanvasMatrix:()=>{bl(c,0,i.width,i.height,0,-1,1)},updateCanvasMatrix(e,t,o,r,n){const a=e.width,l=e.height,d=i.width*(.5/s),u=i.height*(.5/s),h={x:d+(o.x+t.x),y:u+(o.y+t.y)},p={x:h.x-t.x,y:h.y-t.y},m=.5*a,g=.5*l;ge(p,n.z,h),Pe(p,r,h);xl(c,(p.x-m)*s,(p.y-g)*s,0),xl(c,m*s,g*s,0),kl(c,n.z);const $=n.x>Math.PI/2;wl(c,$?Math.PI:0);const f=n.y>Math.PI/2;Sl(c,f?Math.PI:0),vl(c,r),xl(c,-m*s,-g*s,0)},drawToCanvas(){P.bindFramebuffer(P.FRAMEBUFFER,null),u=c,P.viewport(0,0,P.drawingBufferWidth,P.drawingBufferHeight),P.colorMask(!0,!0,!0,!0),P.clearColor(v,w,S,k),P.clear(P.COLOR_BUFFER_BIT),x=[1,0,1,0,1,i.width,1,i.width]},drawToImageBlendBuffer(e,t){ee(1,z,e,t)},drawToImageOverlayBuffer(e,t){ee(2,A,e,t)},enableMask(e,t){const o=e.x*s,r=e.y*s,n=e.width*s,a=e.height*s;g=o,p=g+n,h=i.height-r,m=i.height-(r+a),$=1-t,y=[h,p,m,g]},disableMask(){g=0,p=i.width,h=i.height,m=0,$=1,y=[h,p,m,g]},resize:(t,o,n)=>{s=n,l=1===s?.75:1,r.width=t,r.height=o,i.width=t*s,i.height=o*s,a=U(i.width,i.height),e.width=i.width,e.height=i.height,bl(c,0,i.width,i.height,0,-1,1),b=[1,0,1,0,1,r.width,1,r.width]},release(){Array.from(J.keys()).forEach((e=>te(e,{forceRelease:!0}))),J.clear(),C.forEach((e=>{P.deleteTexture(e)})),C.clear(),F.destroy(),W.destroy(),N.destroy(),j.destroy(),Y.destroy(),e.width=1,e.height=1,e=void 0}}},Gl=e=>e%2==0?e:e+1;var Zl=(e,t)=>{const{imageData:o,amount:i=1}=e,r=Math.round(2*Math.max(1,i)),n=Math.round(.5*r),a=o.width,s=o.height,l=new Uint8ClampedArray(a*s*4),c=o.data;let d,u,h,p,m,g=0,$=0,f=0;const y=a*s*4-4;for(h=0;h.5&&(f=(-n+Math.round(Math.random()*r))*(4*a)),m=Math.min(Math.max(0,g+$+f),y),l[g]=c[m],l[g+1]=c[m+1],l[g+2]=c[m+2],l[g+3]=c[m+3],g+=4;t(null,{data:l,width:o.width,height:o.height})};const Xl=[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625];function Yl(e){return Math.sqrt(1- --e*e)}function ql(e){return"[object Date]"===Object.prototype.toString.call(e)}function Kl(e,t){if(e===t||e!=e)return()=>e;const o=typeof e;if(o!==typeof t||Array.isArray(e)!==Array.isArray(t))throw new Error("Cannot interpolate values of different type");if(Array.isArray(e)){const o=t.map(((t,o)=>Kl(e[o],t)));return e=>o.map((t=>t(e)))}if("object"===o){if(!e||!t)throw new Error("Object cannot be null");if(ql(e)&&ql(t)){e=e.getTime();const o=(t=t.getTime())-e;return t=>new Date(e+t*o)}const o=Object.keys(t),i={};return o.forEach((o=>{i[o]=Kl(e[o],t[o])})),e=>{const t={};return o.forEach((o=>{t[o]=i[o](e)})),t}}if("number"===o){const o=t-e;return t=>e+t*o}throw new Error(`Cannot interpolate ${o} values`)}function Jl(e,t={}){const o=Ba(e);let i,r=e;function n(n,a){if(null==e)return o.set(e=n),Promise.resolve();r=n;let s=i,l=!1,{delay:c=0,duration:d=400,easing:u=Zr,interpolate:h=Kl}=Xr(Xr({},t),a);if(0===d)return s&&(s.abort(),s=null),o.set(e=r),Promise.resolve();const p=mn()+c;let m;return i=yn((t=>{if(td?(o.set(e=n),!1):(o.set(e=m(u(i/d))),!0)})),i.promise}return{set:n,update:(t,o)=>n(t(r,e),o),subscribe:o.subscribe}}function Ql(e,t,o,i){if("number"==typeof o){const r=i-o,n=(o-t)/(e.dt||1/60),a=(n+(e.opts.stiffness*r-e.opts.damping*n)*e.inv_mass)*e.dt;return Math.abs(a)Ql(e,t[n],o[n],i[n])));if("object"==typeof o){const r={};for(const n in o)r[n]=Ql(e,t[n],o[n],i[n]);return r}throw new Error(`Cannot spring ${typeof o} values`)}function ec(e,t={}){const o=Ba(e),{stiffness:i=.15,damping:r=.8,precision:n=.01}=t;let a,s,l,c=e,d=e,u=1,h=0,p=!1;function m(t,i={}){d=t;const r=l={};if(null==e||i.hard||g.stiffness>=1&&g.damping>=1)return p=!0,a=null,c=t,o.set(e=d),Promise.resolve();if(i.soft){const e=!0===i.soft?.5:+i.soft;h=1/(60*e),u=0}if(!s){a=null,p=!1;const t={inv_mass:void 0,opts:g,settled:!0,dt:void 0};s=yn((i=>{if(null===a&&(a=i),p)return p=!1,s=null,!1;u=Math.min(u+h,1),t.inv_mass=u,t.opts=g,t.settled=!0,t.dt=60*(i-a)/1e3;const r=Ql(t,c,e,d);return a=i,c=e,o.set(e=r),t.settled&&(s=null),!t.settled}))}return new Promise((e=>{s.promise.then((()=>{r===l&&e()}))}))}const g={set:m,update:(t,o)=>m(t(d,e),o),subscribe:o.subscribe,stiffness:i,damping:r,precision:n};return g}var tc=Oa(!1,(e=>{const t=window.matchMedia("(prefers-reduced-motion:reduce)"),o=()=>e(t.matches);return o(),t.addListener(o),()=>t.removeListener(o)})),oc=()=>"ResizeObserver"in window;const ic=Je(),rc=(e,t,o,i,r)=>{e.rect||(e.rect=Je());const n=e.rect;mt(ic,t,o,i,r),ht(n,ic)||(gt(n,ic),e.dispatchEvent(new CustomEvent("measure",{detail:n})))},nc=Math.round,ac=e=>{const t=e.getBoundingClientRect();uc&&rc(e,nc(t.x),nc(t.y),nc(t.width),nc(t.height))},sc=e=>{uc&&rc(e,e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight)},lc=[];let cc,dc,uc=void 0;function hc(){lc.length?(lc.forEach((e=>e.measure(e))),uc=requestAnimationFrame(hc)):uc=void 0}let pc=new Map([]),mc=0,gc=0;var $c=(e,t={})=>{const{observePosition:o=!1,observeViewRect:i=!1,once:r=!1,disabled:n=!1,isMeasureRoot:a=!1}=t;if(oc()&&a&&(dc||(dc=new ResizeObserver((e=>{e.forEach((e=>{pc.set(e.target,e.contentRect)}));const t=Array.from(pc.values()).some((({width:e,height:t})=>e>0&&t>0));t?t&&!1===uc&&hc():(uc&&cancelAnimationFrame(uc),uc=!1)}))),dc.observe(e),mc++),!n)return!oc()||o||i?(e.measure=i?ac:sc,lc.push(e),void 0===uc&&(uc=requestAnimationFrame(hc)),e.measure(e),{destroy(){a&&dc&&(pc.delete(e),dc.unobserve(e),mc--,0===mc&&(dc.disconnect(),dc=void 0));const t=lc.indexOf(e);lc.splice(t,1),delete e.measure}}):(cc||(cc=new ResizeObserver((e=>{e.forEach((e=>{uc&&sc(e.target)}))}))),cc.observe(e),sc(e),r?cc.unobserve(e):gc++,{destroy(){a&&dc&&(pc.delete(e),dc.unobserve(e),mc--,0===mc&&(dc.disconnect(),dc=void 0)),r||(cc.unobserve(e),gc--,0===gc&&(cc.disconnect(),cc=void 0))}})},fc=e=>{let t=!1;const o={pointerdown:()=>{t=!1},keydown:()=>{t=!0},keyup:()=>{t=!1},focus:e=>{t&&(e.target.dataset.focusVisible="")},blur:e=>{delete e.target.dataset.focusVisible}};return Object.keys(o).forEach((t=>e.addEventListener(t,o[t],!0))),{destroy(){Object.keys(o).forEach((t=>e.removeEventListener(t,o[t],!0)))}}};const yc=async e=>new Promise((t=>{if("file"===e.kind)return t(e.getAsFile());e.getAsString(t)}));var bc=(e,t={})=>{const o=e=>{e.preventDefault()},i=async o=>{o.preventDefault(),o.stopPropagation();try{const i=await(e=>new Promise(((t,o)=>{const{items:i}=e.dataTransfer;if(!i)return t([]);Promise.all(Array.from(i).map(yc)).then((e=>{t(e.filter((e=>Vo(e)&&Kt(e)||/^http/.test(e))))})).catch(o)})))(o);e.dispatchEvent(new CustomEvent("dropfiles",{detail:{event:o,resources:i},...t}))}catch(e){}};return e.addEventListener("drop",i),e.addEventListener("dragover",o),{destroy(){e.removeEventListener("drop",i),e.removeEventListener("dragover",o)}}};let xc=null;var vc=()=>{if(null===xc)if(u()){const e=g("canvas");xc=!Tl(e,{failIfMajorPerformanceCaveat:!0}),f(e)}else xc=!1;return xc},wc=e=>e instanceof WebGLTexture,Sc=([e,t,o,i])=>[i.x,i.y,e.x,e.y,o.x,o.y,t.x,t.y];function kc(e){let t,o,i,r;return{c(){t=kn("div"),o=kn("canvas"),An(t,"class","PinturaCanvas")},m(n,a){wn(n,t,a),bn(t,o),e[36](o),i||(r=[Pn(o,"measure",e[37]),hn($c.call(null,o))],i=!0)},p:Gr,i:Gr,o:Gr,d(o){o&&Sn(t),e[36](null),i=!1,Kr(r)}}}function Cc(e,t,o){let i,r,n,s,l,c,d;const h=[0,0,0,0],p=de(),m=u()&&(e=>{const t=.5*e,o=g("canvas",{"data-retain":!0,width:e,height:e}),i=o.getContext("2d");return i.fillStyle="#f0f",i.fillRect(0,0,t,t),i.fillRect(t,t,t,t),o})(128),$=qn();let b,{isAnimated:x}=t,{isTransparent:v}=t,{maskRect:w}=t,{maskOpacity:S=1}=t,{maskFrameOpacity:k=.95}=t,{maskMarkupOpacity:C=1}=t,{clipAnnotationsToImage:T=!0}=t,{pixelRatio:M=1}=t,{textPixelRatio:P=M}=t,{backgroundColor:E}=t,{willRender:I=G}=t,{didRender:A=G}=t,{willRequest:L}=t,{loadImageData:z=G}=t,{enableGrid:F=!1}=t,{gridColors:D}=t,{gridSize:O}=t,{gridOpacity:B=0}=t,{images:W=[]}=t,{interfaceImages:_=[]}=t,{selectionColor:V}=t,N=null,H=null,j=null;const Z=(e,t)=>e.set(t,{hard:!x}),X={precision:1e-4*.01};let Y=0;const q=Jl(void 0,{duration:0});on(e,q,(e=>o(35,d=e)));const K=ec(1,X);on(e,K,(e=>o(34,l=e)));const J=ec(1,X);on(e,J,(e=>o(50,n=e)));const Q=Ba();on(e,Q,(e=>o(52,c=e)));const ee=Ba();on(e,ee,(e=>o(51,s=e)));const te={},oe=(e,t)=>{let o=te[e.id];const i=Math.min(1,2048/t.width);let r=o?o.element:g("canvas",{width:t.width*i,height:t.height*i,"data-retain":!0});if(!o||((e,t)=>{if(e.total!==t.length)return!0;const o=e.last,i=t[t.length-1];return o.drawMode!==i.drawMode||!(!Mi(o)||Mi(i)&&ht(o,i))||!(!Ri(o)||Ri(i)&&o.x===i.x&&o.y===i.y&&o.rx===i.rx&&o.ry===i.ry)||!(!Ei(o)||Ei(i)&&i.points.length===o.points.length)})(o,e.actions)){r=r.cloneNode(),((e,t,o)=>{const{selectionColor:i=[1,1,1],scalar:r=1}=o||{};let n=!1;for(const o of t){const t="subtract"===o.drawMode;if(t&&!n)continue;e.globalCompositeOperation=t?"destination-out":"source-over",e.save(),e.beginPath();const a=wr(o);vo(e,r,r),xo(e,o.rotation,a),Wr(e,o.flipX,o.flipY,a),o.width?Lr(e,{...o,backgroundColor:i}):o.points?Br(e,Object.assign({},o,o.pathClose?{backgroundColor:i,strokeColor:[0,0,0,0]}:{strokeColor:i,strokeJoin:"round",strokeCap:"round"})):o.rx&&zr(e,{...o,backgroundColor:i,strokeColor:[0,0,0,0],strokeJoin:"round",strokeCap:"round"}),e.restore(),n=!0}})(r.getContext("2d"),e.actions,{selectionColor:[1,0,1],scalar:i});const t=e.actions.length;te[e.id]={total:t,last:{...e.actions[t-1]},element:r}}return{x:0,y:0,...t,fillColor:e.color||[1,1,1],backgroundImage:r}};let ie;const re=()=>{cancelAnimationFrame(ie),ie=requestAnimationFrame((()=>{Ce=!0,ze=0,r()}))},ne=new Map([]),ae=new Map([]),se=(e,t)=>({filterParam:"pixelated"===e?N.textureFilterNearest:N.textureFilterLinear,wrapParam:"repeat"===t?N.textureRepeat:N.textureClamp}),le=(e,t,o)=>{if(!ne.has(e)){ne.set(e,e);const r=se(t,o);if(!R(i=e)&&(uo(i)||y(i)||Sr(i)||Qt(i))){const t=N.textureCreate();N.textureUpdate(t,e,r),ne.set(e,t)}else z(e).then((t=>{if(!N||!t)return;const o=N.textureCreate();N.textureUpdate(o,t,r),ne.set(e,o),re()})).catch((t=>{ne.set(e,t)}))}var i,r;if(Qt(e)&&((r=e).currentTime>0&&!r.paused&&!r.ended&&r.readyState>2||"true"===e.dataset.redraw)){const i=ne.get(e),r=se(t,o);return N.textureUpdate(i,e,r),e.dataset.redraw=!1,i}return ne.get(e)},ce=(e,t={})=>{const o=t.id||e.id;if(!e.text.length)return void ae.delete(o);let{text:i,textAlign:r,fontFamily:n,fontSize:a=16,fontWeight:s,fontVariant:l,fontStyle:c,letterSpacing:d,lineHeight:u=a,width:h,height:p}=e,{outline:m=0,blur:$=0,paddingTop:f=0,paddingRight:y=Ko,paddingBottom:b=0,paddingLeft:x=Ko}=t;h=Ao(h)?Math.floor(h):h,p=Ao(p)?Math.floor(p):p;const{textSize:v,signature:w}=((e="",t)=>{let{width:o=0,height:i="auto",fontSize:r,fontFamily:n,lineHeight:a,fontWeight:s,fontStyle:l,fontVariant:c,letterSpacing:d}=t;const u=jo({text:e,fontFamily:n,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:r,lineHeight:a,letterSpacing:d,width:o,height:i});let h=ei.get(u);if(h)return h;let p=1;r>1e3&&qo()&&(p=r/1e3,r=1e3,a*=p);const m=Gt(g("pre",{contenteditable:"true",spellcheck:"false",style:`${oi}${Jo({fontFamily:n,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:r,letterSpacing:d,lineHeight:a})};${Qo(e,t)}"`,innerHTML:e})),$=m.getBoundingClientRect();return h={signature:ti(m).flat().map((e=>e.text)).join("_;_"),textSize:Ue(Fe($),(e=>Math.ceil(e*p)))},ei.set(u,h),m.remove(),h})(i,{...e,width:h,height:p}),S=jo({text:i,textAlign:r,fontFamily:n,fontSize:a,fontWeight:s,fontVariant:l,fontStyle:c,lineHeight:u,letterSpacing:d,outline:m,blur:$,signature:w});if(!ne.has(S)){ne.set(S,i);const e=Math.ceil(v.width),t=Math.ceil(v.height/u)*u;if(0===e||0===t)return;const g=Fl(),w=Math.min(1,(g-(x+y)*P)/(e*P),(g-(f+b)*P)/(t*P));$i(i,{fontSize:a,fontFamily:n,fontWeight:s,fontVariant:l,fontStyle:c,letterSpacing:d,textAlign:r,lineHeight:u,width:h,height:p,imageWidth:e,imageHeight:t,paddingLeft:x,paddingTop:f,paddingRight:y,paddingBottom:b,pixelRatio:P*w,willRequest:L,outline:m,blur:$,color:[1,0,1]}).then((e=>{if(!N)return;const t=N.textureCreate();N.textureUpdate(t,e,{filterParam:N.textureFilterLinear,wrapParam:N.textureClamp,scalar:w}),ne.set(S,t),ae.set(o,t),re()})).catch(console.error)}const k=ne.get(S);return wc(k)?k:ae.get(o)},he=new Map,pe=(e,t)=>{let o;if(e.backgroundImage)o=le(e.backgroundImage,e.backgroundImageRendering,"repeat"===e.backgroundRepeat?"repeat":void 0);else if(R(e.text)){if(e.width&&e.width<1||e.height&&e.height<1)return;o=ce(e,t)}else e.bitmap&&e.points&&(o=(e=>{const{id:t,points:o,strokeWidth:i,strokeCap:r,strokeJoin:n,strokeColor:a}=e;let s=ne.get(t),l=he.get(t);const c=jo({points:o.map((e=>`${e.x},${e.y}`)).join(","),strokeWidth:i,strokeCap:r,strokeJoin:n,strokeColor:a});if(l){const{hash:e}=l;if(ne.has(t)){if(c===e)return ne.get(t)}else l=void 0}if(!l){const o=g("canvas",{width:1,height:1});l={canvas:o,hash:void 0},he.set(e.id,l),s=N.textureCreate(),N.textureUpdate(s,o,{filterParam:N.textureFilterLinear,wrapParam:N.textureClamp}),ne.set(t,s)}const{canvas:d}=l,u=Math.ceil(e.strokeWidth),h=ot(o),p=Math.floor(h.x)-.5*u,m=Math.floor(h.y)-.5*u,$=Math.ceil(h.width+u),f=Math.ceil(h.height+u);d.width=Math.max($,1),d.height=Math.max(f,1);const y=d.getContext("2d");return y.clearRect(0,0,d.width,d.height),$>=1&&f>=1&&(y.translate(-p,-m),Br(y,e),y.resetTransform()),N.textureUpdate(s,d,{filterParam:N.textureFilterLinear,wrapParam:N.textureClamp}),he.set(t,{canvas:d,hash:c}),ne.get(t)})(e));return o},me=({texture:e,size:t,origin:o,translation:i,rotation:r,scale:n,colorMatrix:a,opacity:s,convolutionMatrix:l,gamma:c,vignette:d,maskFeather:u,maskCornerRadius:h,overlayColor:p,enableOverlay:m,enableManipulation:g,enableAntialiasing:$})=>{let f=0,y=0;if(1===M){const e=Math.abs(1-n){const c={...t},d={width:r.width/P*o,height:r.height/P*o},u=ue(0,0),h={width:d.width,height:d.height};return c.x-=l*o,c.y-=n*o,e.width?(c.height=c.height?c.height+n*o/i:d.height,c.width+=(l+a)*o/i,"center"===e.textAlign?u.x=.5*(c.width-h.width/i):"right"===e.textAlign&&(u.x=c.width-h.width/i)):(c.width=d.width,c.height=d.height),{rect:c,backgroundPosition:u,backgroundSize:h}},fe=(e=[],t)=>{e.forEach((e=>{let o=pe(e);const i="loading"===e.status||e.backgroundImage&&o===e.backgroundImage;i&&re();const r="error"===e.status||e.backgroundImage&&o instanceof Error;let n=wc(o)?o:void 0;const a=e._scale||1,s=e._translate||p,l=e.strokeWidth&&e.strokeWidth*a,c=!!e.width,d=!c&&R(e.text)&&n,u=Fo(e.points),h=Ri(e);if(u){const i=e.points.map((e=>ue(e.x*a+s.x,e.y*a+s.y)));if(e.bitmap){o&&t.push(o);const r=ot(i),s=Math.ceil(e.strokeWidth*a);N.drawRect({x:Math.floor(r.x)-.5*s,y:Math.floor(r.y)-.5*s,width:Math.ceil(r.width+s),height:Math.ceil(r.height+s)},e.rotation,e.flipX,e.flipY,[0,0,0,0],void 0,n,void 0,void 0,void 0,void 0,void 0,void 0,e.opacity,void 0,void 0,!1,!1)}else N.drawPath(i,e.rotation,e.flipX,e.flipY,l,e.strokeColor,e.pathClose,e.backgroundColor,e.opacity)}else if(h){let c=e.x,d=e.y;c*=a,d*=a,c+=s.x,d+=s.y;const u=ue(c,d);N.drawEllipse(u,e.rx*a,e.ry*a,e.rotation,e.flipX,e.flipY,e.backgroundColor,n,void 0,void 0,e.backgroundCorners&&Sc(e.backgroundCorners),l,e.strokeColor,e.opacity,e.inverted),o&&t.push(o),(i||r)&&(e.backgroundColor||e.strokeColor&&e.strokeWidth||N.drawEllipse(u,e.rx*a,e.ry*a,e.rotation,e.flipX,e.flipY,r?[1,0,0,.25*e.opacity]:[0,0,0,.25*e.opacity]),r&&Se(u),i&&we(u))}else if(d||c){const c=n&&N.textureGetSize(n);let d,u,h,p=e.fillColor,m=e.backgroundColor,g=e.strokeColor,$=[e.cornerRadius,e.cornerRadius,e.cornerRadius,e.cornerRadius].map((e=>e*a));d=e.width?tt(e):{x:e.x,y:e.y,...c},a&&s&&(d.x*=a,d.y*=a,d.x+=s.x,d.y+=s.y,d.width*=a,d.height*=a),o&&t.push(o);const{backgroundRepeat:f="no-repeat"}=e;if(c)if(e.backgroundImage&&(e.backgroundSize||e.backgroundPosition||e.backgroundRepeat)){const t=U(c.width,c.height);if("repeat"===e.backgroundRepeat&&(u={...c},h={x:0,y:0}),"contain"===e.backgroundSize){const o=xt(d,t,d);u=De(o),h=e.backgroundPosition?e.backgroundPosition:ue(.5*(d.width-u.width),.5*(d.height-u.height))}else if("cover"===e.backgroundSize){const o=bt(d,t,d);u=De(o),e.backgroundPosition?h=e.backgroundPosition:(h=ue(o.x,o.y),h=ue(.5*(d.width-u.width),.5*(d.height-u.height)))}else e.backgroundSize?(u=e.backgroundSize,h=e.backgroundPosition||{x:0,y:0}):e.backgroundPosition&&(u={...c},h=e.backgroundPosition)}else if(e.text){const o={...d};if(e.backgroundColor||e.strokeColor){m=void 0,g=void 0;const t={width:c.width/P*a,height:c.height/P*a},o=(e.width||t.width-2*Ko)*a,i=(e.height||t.height)*a;N.drawRect({...d,width:o,height:i},e.rotation,e.flipX,e.flipY,$,e.backgroundColor,void 0,void 0,void 0,!1,void 0,l,e.strokeColor,e.opacity,void 0,void 0,void 0,e.inverted)}let i=1;e.fontSize>1e3&&qo()&&(i=e.fontSize/1e3),p=e.color||[0,0,0],e._prerender&&(p[3]=0);const r=$e(e,o,a,i,c,0,Ko,0,Ko);d=r.rect,h=r.backgroundPosition,u=r.backgroundSize;const{textShadowX:n,textShadowY:s,textShadowBlur:f}=e;if(n||s||f){const r=Math.ceil(.5*f),l=r,c=Math.max(Ko,r),u=r,h=Math.max(Ko,r),p=pe(e,{id:e.id+"shadow",blur:f,paddingTop:l,paddingRight:c,paddingBottom:u,paddingLeft:h});if(p&&!e._prerender){t.push(p);const r=N.textureGetSize(p),{rect:u,backgroundPosition:m,backgroundSize:g}=$e(e,o,a,i,r,l,c,0,h),$=at(d),f=at(u);f.x+=n,f.y+=s;const y=ge(f,e.rotation,$),b={x:y.x-.5*u.width,y:y.y-.5*u.height,width:u.width,height:u.height};e.height&&(b.height-=s),N.drawRect(b,e.rotation,e.flipX,e.flipY,[0,0,0,0],void 0,p,g,m,!1,void 0,void 0,void 0,e.opacity,void 0,0,e.textShadowColor)}}if(e.textOutlineWidth){const r=Math.ceil(.5*e.textOutlineWidth),n=r,s=Ko+r,l=r,c=Ko+r,d=pe(e,{id:e.id+"outline",outline:e.textOutlineWidth,paddingTop:n,paddingRight:s,paddingBottom:l,paddingLeft:c});if(d&&!e._prerender){const r=N.textureGetSize(d);t.push(d);const{rect:l,backgroundPosition:u,backgroundSize:h}=$e(e,o,a,i,r,n,s,0,c);N.drawRect(l,e.rotation,e.flipX,e.flipY,[0,0,0,0],void 0,d,h,u,!1,void 0,void 0,void 0,e.opacity,void 0,0,e.textOutlineColor)}}}if(N.drawRect(d,e.rotation,e.flipX,e.flipY,$,m,n,u,h,"repeat"===f,e.backgroundCorners&&Sc(e.backgroundCorners),l,g,e.opacity,void 0,e.feather,p,e.inverted),i||r){e.backgroundColor&&0!==e.backgroundColor[3]||e.strokeColor&&e.strokeWidth||N.drawRect(d,e.rotation,e.flipX,e.flipY,$,r?[1,.2549,.2118,.25*e.opacity]:[0,0,0,.25*e.opacity]);const t=at(d);r&&Se(t),i&&we(t)}}else o&&t.push(o)}))};let ye=0;const be=[{x:-5,y:-5},{x:5,y:5}],xe=[{x:5,y:-5},{x:-5,y:5}],ve=Lt({x:0,y:0},10,10,0,!1,!1,16);ve.length=9;const we=e=>{ye=Date.now()/50,N.drawEllipse(e,15,15,0,!1,!1,[0,0,0,.5]);const t=Ae(ve.map((t=>({x:t.x+e.x,y:t.y+e.y}))),ye,e.x,e.y);N.drawPath(t,0,!1,!1,2,[1,1,1])},Se=e=>{N.drawEllipse(e,13,13,0,!1,!1,[1,.2549,.2118,.75]);const t=be.map((t=>({x:t.x+e.x,y:t.y+e.y}))),o=xe.map((t=>({x:t.x+e.x,y:t.y+e.y})));N.drawPath(t,0,!1,!1,3,[1,1,1]),N.drawPath(o,0,!1,!1,3,[1,1,1])},ke=(e,t,o,i,r,n)=>N.drawRect(t,0,!1,!1,h,h,e,i,o,!0,void 0,0,void 0,n,void 0,void 0,r);let Ce=!1,Te=!0,Me=!1;const Re=[],Pe=[],Ee=[],Ie=()=>{Ee.length=0;const e=W[0],{manipulationShapes:t,manipulationShapesDirty:o,annotationShapes:i,annotationShapesDirty:r,interfaceShapes:a,decorationShapes:u,frameShapes:p,selectionShapes:g}=I({opacity:e.opacity,rotation:e.rotation,scale:e.scale,images:W,size:We(H,j),backgroundColor:[...d],selectionRect:c}),$=[...d],f=c,y=ns(l,0,1),b=s,x=Math.abs(e.rotation.x/Math.PI*2-1),S=Math.abs(e.rotation.y/Math.PI*2-1),k=x<.99||S<.99,M={...e.size},R=e.backgroundColor,E=e.backgroundImage,L=t.length>0,z=i.length>0,U=R[3]>0,G=!!T&&C>=1;if(y<1&&U){const e=$[0],t=$[1],o=$[2],i=1-y,r=R[0]*i,n=R[1]*i,a=R[2]*i,s=1-i;$[0]=r+e*s,$[1]=n+t*s,$[2]=a+o*s,$[3]=1}N.setCanvasColor(v?h:$);L&&(o||Ce)?(N.disableMask(),N.drawToImageBlendBuffer(M),Re.length=0,fe(t,Re)):L||(Re.length=0),Ee.push(...Re),Te&&(N.drawToImageOverlayBuffer(M,P),Te=!1);if(k?(z&&(r||Ce)||!Me?(N.disableMask(),N.drawToImageOverlayBuffer(M,P),Pe.length=0,fe(i,Pe)):z||(Pe.length=0),Me=!0):Me=!1,N.drawToCanvas(),N.enableMask(f,y),F&&O>=1&&2===D.length&&B&&((e,t,o,i,r)=>{const n=We(t,t),a=le(m,"pixelated","repeat"),s=ue(-e.x%t,-e.y%t),l=ue(s.x+.5*n.width,s.y);ke(a,e,s,n,o,r),ke(a,e,l,n,i,r)})(f,O,D[0],D[1],B),U&&N.drawRect(f,0,!1,!1,h,R),E){N.enableMask(f,1);const e=Math.max(w.width/E.width,w.height/E.height),t=E.width*e,o=E.height*e,i={x:w.x+.5*w.width-.5*t,y:w.y+.5*w.height-.5*o,width:t,height:o};N.drawRect(i,0,!1,!1,h,h,le(E,"linear")),N.enableMask(f,y)}if(G&&N.enablePreviewStencil(),Ee.push(...[...W].reverse().map((e=>me({...e,texture:le(e.data),enableOverlay:k&&z,enableManipulation:L,enableAntialiasing:!0,mask:f,maskOpacity:y,overlayColor:b})))),N.enableMask(f,C),k||(G&&N.applyPreviewStencil(),N.resetCanvasMatrix(),N.updateCanvasMatrix(M,e.origin,e.translation,e.scale,e.rotation),Pe.length=0,fe(i,Pe),G&&N.disablePreviewStencil()),Ee.push(...Pe),N.resetCanvasMatrix(),N.enableMask(f,C),fe(u,Ee),p.length){N.enableMask(f,1);const e=p.filter((e=>!e.expandsCanvas)),t=p.filter((e=>e.expandsCanvas));e.length&&fe(e,Ee),t.length&&(N.enableMask({x:f.x+.5,y:f.y+.5,width:f.width-1,height:f.height-1},n),fe(t,Ee))}if(V&&g.length&&!k){N.resetCanvasMatrix(),N.updateCanvasMatrix(M,e.origin,e.translation,e.scale,e.rotation);const t=[...V];t[3]=.5;const o=[{id:"selection",color:t,actions:[...g]}].map((e=>oe(e,M)));fe(o,Ee),N.resetCanvasMatrix()}N.disableMask(),fe(a,Ee),_.forEach((e=>{if(N.enableMask(e.mask,e.maskOpacity),e.backgroundColor){const t=E&&bt({...e.mask},E.width/E.height),o=E&&le(E,"linear");N.drawRect(e.mask,0,!1,!1,e.maskCornerRadius,e.backgroundColor,o,t,t,void 0,void 0,void 0,void 0,e.opacity,e.maskFeather),o&&Ee.push(o)}const t=me({...e,texture:le(e.data),enableAntialiasing:!1,translation:{x:e.translation.x+e.offset.x-.5*H,y:e.translation.y+e.offset.y-.5*j}});Ee.push(t)})),N.disableMask(),(e=>{ne.forEach(((t,o)=>{!e.find((e=>e===t))&&wc(t)&&(Array.from(ae.values()).includes(t)||(ne.delete(o),N.textureDelete(t)))}))})(Ee),A(),Ce=!1};let Le,ze=0;const Oe=()=>{clearTimeout(Le);const e=Date.now();e-ze<48?Le=setTimeout(Oe,48):(ze=e,Ie())};Xn((()=>r())),Zn((()=>o(30,N=Ul(b,{alpha:v})))),Yn((()=>{N&&(he.forEach((({canvas:e})=>f(e))),he.clear(),N.release(),o(30,N=void 0),o(0,b=void 0))}));return e.$$set=e=>{"isAnimated"in e&&o(9,x=e.isAnimated),"isTransparent"in e&&o(10,v=e.isTransparent),"maskRect"in e&&o(11,w=e.maskRect),"maskOpacity"in e&&o(12,S=e.maskOpacity),"maskFrameOpacity"in e&&o(13,k=e.maskFrameOpacity),"maskMarkupOpacity"in e&&o(14,C=e.maskMarkupOpacity),"clipAnnotationsToImage"in e&&o(15,T=e.clipAnnotationsToImage),"pixelRatio"in e&&o(16,M=e.pixelRatio),"textPixelRatio"in e&&o(17,P=e.textPixelRatio),"backgroundColor"in e&&o(18,E=e.backgroundColor),"willRender"in e&&o(19,I=e.willRender),"didRender"in e&&o(20,A=e.didRender),"willRequest"in e&&o(21,L=e.willRequest),"loadImageData"in e&&o(22,z=e.loadImageData),"enableGrid"in e&&o(23,F=e.enableGrid),"gridColors"in e&&o(24,D=e.gridColors),"gridSize"in e&&o(25,O=e.gridSize),"gridOpacity"in e&&o(26,B=e.gridOpacity),"images"in e&&o(27,W=e.images),"interfaceImages"in e&&o(28,_=e.interfaceImages),"selectionColor"in e&&o(29,V=e.selectionColor)},e.$$.update=()=>{if(1&e.$$.dirty[0]&&b){const e=getComputedStyle(b).getPropertyValue("--color-transition-duration");o(31,Y=(e=>{let t=parseFloat(e);return/^[0-9]+s$/.test(e)?1e3*t:t})(e))}262656&e.$$.dirty[0]|1&e.$$.dirty[1]&&E&&q.set(E,{duration:x?Y:0}),4096&e.$$.dirty[0]&&Z(K,Ao(S)?S:1),8192&e.$$.dirty[0]&&Z(J,Ao(k)?k:1),2048&e.$$.dirty[0]&&w&&Q.set(w),24&e.$$.dirty[1]&&d&&ee.set([d[0],d[1],d[2],ns(l,0,1)]),1207959558&e.$$.dirty[0]&&o(33,i=!!(N&&H&&j&&W.length)),1073807366&e.$$.dirty[0]&&H&&j&&N&&(ze=0,N.resize(H,j,M)),4&e.$$.dirty[1]&&o(32,r=i?vc()?Oe:Ie:a),6&e.$$.dirty[1]&&i&&r&&r()},[b,H,j,$,q,K,J,Q,ee,x,v,w,S,k,C,T,M,P,E,I,A,L,z,F,D,O,B,W,_,V,N,Y,r,i,l,d,function(e){ta[e?"unshift":"push"]((()=>{b=e,o(0,b)}))},e=>{o(1,H=e.detail.width),o(2,j=e.detail.height),$("measure",{width:H,height:j})}]}class Tc extends Fa{constructor(e){super(),za(this,e,Cc,kc,Qr,{isAnimated:9,isTransparent:10,maskRect:11,maskOpacity:12,maskFrameOpacity:13,maskMarkupOpacity:14,clipAnnotationsToImage:15,pixelRatio:16,textPixelRatio:17,backgroundColor:18,willRender:19,didRender:20,willRequest:21,loadImageData:22,enableGrid:23,gridColors:24,gridSize:25,gridOpacity:26,images:27,interfaceImages:28,selectionColor:29},null,[-1,-1,-1])}}var Mc=(e,t=Boolean,o=" ")=>e.filter(t).join(o);function Rc(e,t,o){const i=e.slice();return i[17]=t[o],i}const Pc=e=>({tab:4&e}),Ec=e=>({tab:e[17]});function Ic(e){let t,o,i,r=[],n=new Map,a=e[2];const s=e=>e[17].id;for(let t=0;t{i=null})),ba())},i(e){o||(xa(i),o=!0)},o(e){va(i),o=!1},d(e){i&&i.d(e),e&&Sn(t)}}}function zc(e,t,o){let i,r,n,{$$slots:a={},$$scope:s}=t,{class:l}=t,{name:c}=t,{selected:d}=t,{tabs:u=[]}=t,{layout:h}=t;const p=qn(),m=e=>{const t=n.querySelectorAll('[role="tab"] button')[e];t&&t.focus()},g=(e,t)=>{e.preventDefault(),e.stopPropagation(),p("select",t)},$=({key:e},t)=>{if(!/arrow/i.test(e))return;const o=u.findIndex((e=>e.id===t));return/right|down/i.test(e)?m(o0?o-1:u.length-1):void 0};return e.$$set=e=>{"class"in e&&o(0,l=e.class),"name"in e&&o(7,c=e.name),"selected"in e&&o(8,d=e.selected),"tabs"in e&&o(9,u=e.tabs),"layout"in e&&o(1,h=e.layout),"$$scope"in e&&o(10,s=e.$$scope)},e.$$.update=()=>{896&e.$$.dirty&&o(2,i=u.map((e=>{const t=e.id===d;return{...e,tabId:`tab-${c}-${e.id}`,href:`#panel-${c}-${e.id}`,selected:t}}))),4&e.$$.dirty&&o(4,r=i.length>1)},[l,h,i,n,r,g,$,c,d,u,s,a,(e,t)=>$(t,e.id),(e,t)=>g(t,e.id),function(e){ta[e?"unshift":"push"]((()=>{n=e,o(3,n)}))}]}class Fc extends Fa{constructor(e){super(),za(this,e,zc,Lc,Qr,{class:0,name:7,selected:8,tabs:9,layout:1})}}const Dc=e=>({panel:16&e}),Oc=e=>({panel:e[4][0].id,panelIsActive:!0});function Bc(e,t,o){const i=e.slice();return i[14]=t[o].id,i[15]=t[o].shouldDraw,i[16]=t[o].panelId,i[17]=t[o].tabindex,i[18]=t[o].labelledBy,i[19]=t[o].isActive,i[20]=t[o].hidden,i[3]=t[o].visible,i}const Wc=e=>({panel:16&e,panelIsActive:16&e}),_c=e=>({panel:e[14],panelIsActive:e[19]});function Vc(e){let t,o,i,r,n,a;const s=e[11].default,l=rn(s,e,e[10],Oc);return{c(){t=kn("div"),o=kn("div"),l&&l.c(),An(o,"class",i=Mc([e[1]])),An(t,"class",e[0]),An(t,"style",e[2])},m(i,s){wn(i,t,s),bn(t,o),l&&l.m(o,null),r=!0,n||(a=[Pn(t,"measure",e[13]),hn($c.call(null,t))],n=!0)},p(e,n){l&&l.p&&(!r||1040&n)&&sn(l,s,e,e[10],r?an(s,e[10],n,Dc):ln(e[10]),Oc),(!r||2&n&&i!==(i=Mc([e[1]])))&&An(o,"class",i),(!r||1&n)&&An(t,"class",e[0]),(!r||4&n)&&An(t,"style",e[2])},i(e){r||(xa(l,e),r=!0)},o(e){va(l,e),r=!1},d(e){e&&Sn(t),l&&l.d(e),n=!1,Kr(a)}}}function Nc(e){let t,o,i,r,n,a=[],s=new Map,l=e[4];const c=e=>e[14];for(let t=0;t{u=null})),ba()),(!d||2&h&&r!==(r=Mc(["PinturaTabPanel",t[1]])))&&An(o,"class",r),(!d||16&h&&n!==(n=t[20]))&&(o.hidden=n),(!d||16&h&&a!==(a=t[16]))&&An(o,"id",a),(!d||16&h&&s!==(s=t[17]))&&An(o,"tabindex",s),(!d||16&h&&l!==(l=t[18]))&&An(o,"aria-labelledby",l),(!d||16&h&&c!==(c=!t[3]))&&An(o,"data-inert",c)},i(e){d||(xa(u),d=!0)},o(e){va(u),d=!1},d(e){e&&Sn(o),u&&u.d()}}}function Uc(e){let t,o,i,r;const n=[Nc,Vc],a=[];function s(e,t){return e[5]?0:1}return t=s(e),o=a[t]=n[t](e),{c(){o.c(),i=Rn()},m(e,o){a[t].m(e,o),wn(e,i,o),r=!0},p(e,[r]){let l=t;t=s(e),t===l?a[t].p(e,r):(ya(),va(a[l],1,1,(()=>{a[l]=null})),ba(),o=a[t],o?o.p(e,r):(o=a[t]=n[t](e),o.c()),xa(o,1),o.m(i.parentNode,i))},i(e){r||(xa(o),r=!0)},o(e){va(o),r=!1},d(e){a[t].d(e),e&&Sn(i)}}}function Gc(e,t,o){let i,r,{$$slots:n={},$$scope:a}=t,{class:s}=t,{name:l}=t,{selected:c}=t,{panelClass:d}=t,{panels:u=[]}=t,{visible:h}=t,{style:p}=t;const m={};return e.$$set=e=>{"class"in e&&o(0,s=e.class),"name"in e&&o(6,l=e.name),"selected"in e&&o(7,c=e.selected),"panelClass"in e&&o(1,d=e.panelClass),"panels"in e&&o(8,u=e.panels),"visible"in e&&o(3,h=e.visible),"style"in e&&o(2,p=e.style),"$$scope"in e&&o(10,a=e.$$scope)},e.$$.update=()=>{968&e.$$.dirty&&o(4,i=u.map((e=>{const t=e===c;t&&o(9,m[e]=!0,m);const i=h?-1!==h.indexOf(e):t;return{id:e,panelId:`panel-${l}-${e}`,labelledBy:`tab-${l}-${e}`,isActive:t,hidden:!t,visible:i,tabindex:t?0:-1,shouldDraw:t||m[e]}}))),16&e.$$.dirty&&o(5,r=i.length>1)},[s,d,p,h,i,r,l,c,u,m,a,n,function(t){Qn.call(this,e,t)},function(t){Qn.call(this,e,t)}]}class Zc extends Fa{constructor(e){super(),za(this,e,Gc,Uc,Qr,{class:0,name:6,selected:7,panelClass:1,panels:8,visible:3,style:2})}}var Xc=e=>{const t=Object.getOwnPropertyDescriptors(e.prototype);return Object.keys(t).filter((e=>!!t[e].get))};function Yc(e){let t,o,i,r;const n=[e[4]];function a(t){e[22](t)}var s=e[10];function l(e){let t={};for(let e=0;eEa(t,"name",a))),e[23](t),t.$on("measure",e[11])),{c(){t&&Ia(t.$$.fragment),i=Rn()},m(e,o){t&&Aa(t,e,o),wn(e,i,o),r=!0},p(e,r){const c=16&r[0]?Ra(n,[Pa(e[4])]):{};if(!o&&4&r[0]&&(o=!0,c.name=e[2],ca((()=>o=!1))),s!==(s=e[10])){if(t){ya();const e=t;va(e.$$.fragment,1,0,(()=>{La(e,1)})),ba()}s?(t=Wn(s,l(e)),ta.push((()=>Ea(t,"name",a))),e[23](t),t.$on("measure",e[11]),Ia(t.$$.fragment),xa(t.$$.fragment,1),Aa(t,i.parentNode,i)):t=null}else s&&t.$set(c)},i(e){r||(t&&xa(t.$$.fragment,e),r=!0)},o(e){t&&va(t.$$.fragment,e),r=!1},d(o){e[23](null),o&&Sn(i),t&&La(t,o)}}}function qc(e){let t,o,i,r=e[5]&&Yc(e);return{c(){t=kn("div"),r&&r.c(),An(t,"data-util",e[2]),An(t,"class",o=Mc(["PinturaUtilPanel",e[1]])),An(t,"style",e[6])},m(o,n){wn(o,t,n),r&&r.m(t,null),e[24](t),i=!0},p(e,n){e[5]?r?(r.p(e,n),32&n[0]&&xa(r,1)):(r=Yc(e),r.c(),xa(r,1),r.m(t,null)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),(!i||4&n[0])&&An(t,"data-util",e[2]),(!i||2&n[0]&&o!==(o=Mc(["PinturaUtilPanel",e[1]])))&&An(t,"class",o),(!i||64&n[0])&&An(t,"style",e[6])},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(o){o&&Sn(t),r&&r.d(),e[24](null)}}}function Kc(e,t,o){let i,r,n,a,s,l;const c=qn();let{isActive:d=!0}=t,{stores:u}=t,{content:h}=t,{component:p}=t,{locale:m}=t,{class:g}=t;const $=Jn("isAnimated");let f;on(e,$,(e=>o(21,l=e)));const y=ec(0),b=Wa(y,(e=>ns(e,0,1)));on(e,b,(e=>o(20,s=e)));let x=!d;const v=Ba(d);on(e,v,(e=>o(25,a=e)));const w={isActive:Wa(v,(async(e,t)=>{if(!e)return t(e);await sa(),t(e)})),isActiveFraction:Wa(b,(e=>e)),isVisible:Wa(b,(e=>e>0))},S=h.view,k=Xc(S),C=Object.keys(h.props||{}).reduce(((e,t)=>k.includes(t)?(e[t]=h.props[t],e):e),{}),T=Object.keys(w).reduce(((e,t)=>k.includes(t)?(e[t]=w[t],e):e),{});let M,R;const P=e=>{o(17,f={...e.detail}),I&&d&&c("measure",{...f})};Kn("measurable",$c);const E=Gn().$$.context;let I=!1;return Zn((()=>{if(o(19,I=!0),n)return;o(0,p=new S({target:R,props:{...r},context:E})),o(2,M=p.name);const e=p.$on("measure",P);return()=>{e(),p.$destroy()}})),e.$$set=e=>{"isActive"in e&&o(12,d=e.isActive),"stores"in e&&o(13,u=e.stores),"content"in e&&o(14,h=e.content),"component"in e&&o(0,p=e.component),"locale"in e&&o(15,m=e.locale),"class"in e&&o(1,g=e.class)},e.$$.update=()=>{135169&e.$$.dirty[0]&&f&&d&&p&&c("measure",f),2101248&e.$$.dirty[0]&&y.set(d?1:0,{hard:!1===l}),1310720&e.$$.dirty[0]&&(s<=0&&!x?o(18,x=!0):s>0&&x&&o(18,x=!1)),786432&e.$$.dirty[0]&&I&&c(x?"hide":"show"),1048576&e.$$.dirty[0]&&c("fade",s),1048576&e.$$.dirty[0]&&o(6,i=s<1?"opacity: "+s:void 0),4096&e.$$.dirty[0]&&un(v,a=d,a),40960&e.$$.dirty[0]&&o(4,r={...C,...T,stores:u,locale:m})},o(5,n=!k.includes("external")),[p,g,M,R,r,n,i,$,b,v,S,P,d,u,h,m,y,f,x,I,s,l,function(e){M=e,o(2,M)},function(e){ta[e?"unshift":"push"]((()=>{p=e,o(0,p)}))},function(e){ta[e?"unshift":"push"]((()=>{R=e,o(3,R)}))}]}class Jc extends Fa{constructor(e){super(),za(this,e,Kc,qc,Qr,{isActive:12,stores:13,content:14,component:0,locale:15,class:1,opacity:16},null,[-1,-1])}get opacity(){return this.$$.ctx[16]}}function Qc(e){let t,o,i;const r=e[5].default,n=rn(r,e,e[4],null);return{c(){t=Cn("svg"),n&&n.c(),An(t,"class",e[3]),An(t,"style",e[2]),An(t,"width",e[0]),An(t,"height",e[1]),An(t,"viewBox",o="0 0 "+e[0]+"\n "+e[1]),An(t,"xmlns","http://www.w3.org/2000/svg"),An(t,"aria-hidden","true"),An(t,"focusable","false"),An(t,"stroke-linecap","round"),An(t,"stroke-linejoin","round")},m(e,o){wn(e,t,o),n&&n.m(t,null),i=!0},p(e,[a]){n&&n.p&&(!i||16&a)&&sn(n,r,e,e[4],i?an(r,e[4],a,null):ln(e[4]),null),(!i||8&a)&&An(t,"class",e[3]),(!i||4&a)&&An(t,"style",e[2]),(!i||1&a)&&An(t,"width",e[0]),(!i||2&a)&&An(t,"height",e[1]),(!i||3&a&&o!==(o="0 0 "+e[0]+"\n "+e[1]))&&An(t,"viewBox",o)},i(e){i||(xa(n,e),i=!0)},o(e){va(n,e),i=!1},d(e){e&&Sn(t),n&&n.d(e)}}}function ed(e,t,o){let{$$slots:i={},$$scope:r}=t,{width:n=24}=t,{height:a=24}=t,{style:s}=t,{class:l}=t;return e.$$set=e=>{"width"in e&&o(0,n=e.width),"height"in e&&o(1,a=e.height),"style"in e&&o(2,s=e.style),"class"in e&&o(3,l=e.class),"$$scope"in e&&o(4,r=e.$$scope)},[n,a,s,l,r,i]}class td extends Fa{constructor(e){super(),za(this,e,ed,Qc,Qr,{width:0,height:1,style:2,class:3})}}var od=(e,t)=>t===e.target||t.contains(e.target),id=(e,t,o)=>{return(R(t)?t:e)+(o?` (${i=o,i.map((e=>"CMD"===e?mo()?"⌘":"Ctrl":e)).join("+")})`:"");var i};function rd(e){let t,o;return t=new td({props:{class:"PinturaButtonIcon",$$slots:{default:[nd]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};536870920&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function nd(e){let t;return{c(){t=Cn("g")},m(o,i){wn(o,t,i),t.innerHTML=e[3]},p(e,o){8&o&&(t.innerHTML=e[3])},d(e){e&&Sn(t)}}}function ad(e){let t;return{c(){t=kn("span"),An(t,"class",e[11])},m(o,i){wn(o,t,i),t.innerHTML=e[0]},p(e,o){1&o&&(t.innerHTML=e[0]),2048&o&&An(t,"class",e[11])},d(e){e&&Sn(t)}}}function sd(e){let t,o,i,r,n;const a=e[27].default,s=rn(a,e,e[29],null),l=s||function(e){let t,o,i,r=e[3]&&rd(e),n=e[0]&&ad(e);return{c(){t=kn("span"),r&&r.c(),o=Mn(),n&&n.c(),An(t,"class",e[13])},m(e,a){wn(e,t,a),r&&r.m(t,null),bn(t,o),n&&n.m(t,null),i=!0},p(e,a){e[3]?r?(r.p(e,a),8&a&&xa(r,1)):(r=rd(e),r.c(),xa(r,1),r.m(t,o)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[0]?n?n.p(e,a):(n=ad(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null),(!i||8192&a)&&An(t,"class",e[13])},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){e&&Sn(t),r&&r.d(),n&&n.d()}}}(e);return{c(){t=kn("button"),l&&l.c(),An(t,"type",e[6]),An(t,"style",e[4]),t.disabled=e[5],An(t,"class",e[12]),An(t,"title",o=id(e[0],e[1],e[2]))},m(o,a){wn(o,t,a),l&&l.m(t,null),e[28](t),i=!0,r||(n=[Pn(t,"keydown",(function(){Jr(e[8])&&e[8].apply(this,arguments)})),Pn(t,"click",(function(){Jr(e[7])&&e[7].apply(this,arguments)})),Pn(t,"pointerdown",(function(){Jr(e[14])&&e[14].apply(this,arguments)})),hn(e[9].call(null,t))],r=!0)},p(r,[n]){e=r,s?s.p&&(!i||536870912&n)&&sn(s,a,e,e[29],i?an(a,e[29],n,null):ln(e[29]),null):l&&l.p&&(!i||10249&n)&&l.p(e,i?n:-1),(!i||64&n)&&An(t,"type",e[6]),(!i||16&n)&&An(t,"style",e[4]),(!i||32&n)&&(t.disabled=e[5]),(!i||4096&n)&&An(t,"class",e[12]),(!i||7&n&&o!==(o=id(e[0],e[1],e[2])))&&An(t,"title",o)},i(e){i||(xa(l,e),i=!0)},o(e){va(l,e),i=!1},d(o){o&&Sn(t),l&&l.d(o),e[28](null),r=!1,Kr(n)}}}function ld(e,t,o){let i,r,n,s,l,c,{$$slots:d={},$$scope:u}=t,{class:h}=t,{label:p}=t,{title:m}=t,{shortcut:g}=t,{labelClass:$}=t,{innerClass:f}=t,{hideLabel:y=!1}=t,{icon:b}=t,{style:x}=t,{disabled:v}=t,{type:w="button"}=t,{onclick:S}=t,{onkeydown:k}=t,{onhold:C}=t,{action:T=(()=>{})}=t,{holdThreshold:M=500}=t,{holdSpeedUpFactor:R=.5}=t,{holdSpeedMin:P=20}=t;const E=e=>{o(25,c=setTimeout((()=>{C(),E(Math.max(e*R,P))}),e))};let I;return e.$$set=e=>{"class"in e&&o(15,h=e.class),"label"in e&&o(0,p=e.label),"title"in e&&o(1,m=e.title),"shortcut"in e&&o(2,g=e.shortcut),"labelClass"in e&&o(16,$=e.labelClass),"innerClass"in e&&o(17,f=e.innerClass),"hideLabel"in e&&o(18,y=e.hideLabel),"icon"in e&&o(3,b=e.icon),"style"in e&&o(4,x=e.style),"disabled"in e&&o(5,v=e.disabled),"type"in e&&o(6,w=e.type),"onclick"in e&&o(7,S=e.onclick),"onkeydown"in e&&o(8,k=e.onkeydown),"onhold"in e&&o(19,C=e.onhold),"action"in e&&o(9,T=e.action),"holdThreshold"in e&&o(20,M=e.holdThreshold),"holdSpeedUpFactor"in e&&o(21,R=e.holdSpeedUpFactor),"holdSpeedMin"in e&&o(22,P=e.holdSpeedMin),"$$scope"in e&&o(29,u=e.$$scope)},e.$$.update=()=>{101187584&e.$$.dirty&&o(26,r=C?()=>{c&&(clearTimeout(c),o(25,c=void 0),document.documentElement.removeEventListener("pointerup",r))}:a),68681728&e.$$.dirty&&o(14,i=C?()=>{document.documentElement.addEventListener("pointerup",r),E(M)}:a),131072&e.$$.dirty&&o(13,n=Mc(["PinturaButtonInner",f])),294912&e.$$.dirty&&o(12,s=Mc(["PinturaButton",y&&"PinturaButtonIconOnly",h])),327680&e.$$.dirty&&o(11,l=Mc([y?"implicit":"PinturaButtonLabel",$]))},[p,m,g,b,x,v,w,S,k,T,I,l,s,n,i,h,$,f,y,C,M,R,P,e=>od(e,I),()=>I,c,r,d,function(e){ta[e?"unshift":"push"]((()=>{I=e,o(10,I)}))},u]}class cd extends Fa{constructor(e){super(),za(this,e,ld,sd,Qr,{class:15,label:0,title:1,shortcut:2,labelClass:16,innerClass:17,hideLabel:18,icon:3,style:4,disabled:5,type:6,onclick:7,onkeydown:8,onhold:19,action:9,holdThreshold:20,holdSpeedUpFactor:21,holdSpeedMin:22,isEventTarget:23,getElement:24})}get isEventTarget(){return this.$$.ctx[23]}get getElement(){return this.$$.ctx[24]}}var dd=(e,t)=>{const o=e.findIndex(t);if(o>=0)return e.splice(o,1)};const ud=80;var hd=(e,t={})=>{const{inertia:o=!1,inertiaDurationMultiplier:i=ud,shouldStartInteraction:r=(()=>!0),pinch:n=!1,multiTouch:a,getEventPosition:s=(e=>ue(e.clientX,e.clientY)),observeKeys:l=!1}=t;function c(t,o){e.dispatchEvent(new CustomEvent(t,{detail:o}))}function d(){w&&w(),w=void 0}const u=[],h=e=>0===e.timeStamp?Date.now():e.timeStamp,p=()=>{const e=pe(u[0].position);if(u[1]){const t=.5*(u[1].position.x-e.x),o=.5*(u[1].position.y-e.y);e.x+=t,e.y+=o}return e},m=e=>{e.origin.x=e.position.x,e.origin.y=e.position.y,e.translation.x=0,e.translation.y=0},g=e=>{const t=(e=>u.findIndex((t=>t.event.pointerId===e.pointerId)))(e);if(!(t<0))return u[t]},$=()=>1===u.length,f=()=>2===u.length,y=e=>{const t=Ee(e.map((e=>e.position)));return{center:t,distance:((e,t)=>e.reduce(((e,o)=>e+Re(t,o.position)),0)/e.length)(e,t),velocity:Ee(e.map((e=>e.velocity))),translation:Ee(e.map((e=>e.translation)))}};let b,x,v,w,S,k,C,T,M=0,R=void 0;e.addEventListener("pointerdown",L);const P=["Meta","Control","Alt","Shift"];function E(e){if(!P.includes(e.key))return;const{metaKey:t,ctrlKey:o,altKey:i,shiftKey:r}=e;A({metaKey:t,ctrlKey:o,altKey:i,shiftKey:r})}let I=Date.now();const A=e=>{const t=pe(u[0].translation);let o=C;if(n&&f()){o*=Re(u[0].position,u[1].position)/S,ve(t,u[1].translation)}ve(t,k);const i=Date.now();i-I<16||(I=i,c("interactionupdate",{position:p(),translation:t,scalar:n?o:void 0,isMultiTouching:f(),...e}))};function L(t){if(!f()&&!(e=>Ao(e.button)&&0!==e.button)(t)&&r(t,e))if(d(),(e=>{const t=h(e),o={timeStamp:t,timeStampInitial:t,position:s(e),origin:s(e),velocity:de(),velocityHistory:[],velocityAverage:de(),translation:de(),interactionState:void 0,event:e};u.push(o),o.interactionState=y(u)})(t),l&&(window.addEventListener("keydown",E),window.addEventListener("keyup",E)),$())document.documentElement.addEventListener("pointermove",z),document.documentElement.addEventListener("pointerup",F),document.documentElement.addEventListener("pointercancel",F),document.addEventListener("visibilitychange",O),T=!1,C=1,k=de(),S=void 0,c("interactionstart",{origin:pe(g(t).origin)});else if(n)T=!0,S=Re(u[0].position,u[1].position),k.x+=u[0].translation.x,k.y+=u[0].translation.y,m(u[0]);else if(!1===a)return u.length=0,W(),c("interactioncancel")}function z(e){e.preventDefault(),(e=>{const t=g(e);if(!t)return;const o=h(e),i=s(e),r=Math.max(1,o-t.timeStamp);t.velocity.x=(i.x-t.position.x)/r,t.velocity.y=(i.y-t.position.y)/r,t.velocityHistory.push(pe(t.velocity)),t.velocityHistory=t.velocityHistory.slice(-3),t.velocityAverage=t.velocityHistory.reduce(((e,t,o,i)=>(e.x+=t.x/i.length,e.y+=t.y/i.length,e)),de()),t.translation.x=i.x-t.origin.x,t.translation.y=i.y-t.origin.y,t.timeStamp=o,t.position.x=i.x,t.position.y=i.y,t.event=e})(e);const{metaKey:t=!1,ctrlKey:o=!1,altKey:i=!1,shiftKey:r=!1}=l?e:{};A({metaKey:t,ctrlKey:o,altKey:i,shiftKey:r})}function F(e){if(!g(e))return;const t=p(),r=(e=>{const t=dd(u,(t=>t.event.pointerId===e.pointerId));if(t)return t[0]})(e);if(n&&$()){const e=Re(u[0].position,r.position);C*=e/S,k.x+=u[0].translation.x+r.translation.x,k.y+=u[0].translation.y+r.translation.y,m(u[0])}let a=!1,s=!1;if(!T&&r){const e=performance.now(),t=e-r.timeStampInitial,o=Me(r.translation);a=o<64&&t<300,s=!!(R&&a&&e-M<700&&Me(R,r.position)<128),a&&(R=pe(r.position),M=e)}if(u.length>0)return;W();const l=pe(r.translation),d=pe(r.velocityAverage);let h=!1;c("interactionrelease",{isTap:a,isDoubleTap:s,position:t,translation:l,scalar:C,preventInertia:()=>h=!0});const f=Re(d);if(h||!o||f<.25)return B(l,{isTap:a,isDoubleTap:s});x=pe(t),v=pe(l),b=Jl(pe(l),{easing:Yl,duration:f*i}),b.set({x:l.x+50*d.x,y:l.y+50*d.y}).then((()=>{w&&B(tn(b),{isTap:a,isDoubleTap:s})})),w=b.subscribe(D)}function D(e){e&&c("interactionupdate",{position:ue(x.x+(e.x-v.x),x.y+(e.y-v.y)),translation:e,scalar:n?C:void 0})}function O(e){if("visible"===document.visibilityState||!u.length)return;const t=y(u);d(),c("interactionend",{...t}),u.length=0,W()}function B(e,t){d(),c("interactionend",{...t,translation:e,scalar:n?C:void 0})}function W(){l&&window.removeEventListener("keydown",E),l&&window.removeEventListener("keyup",E),document.documentElement.removeEventListener("pointermove",z),document.documentElement.removeEventListener("pointerup",F),document.documentElement.removeEventListener("pointercancel",F),document.addEventListener("visibilitychange",O)}return{destroy(){d(),e.removeEventListener("pointerdown",L)}}},pd=(e,t={})=>{const{direction:o,shiftMultiplier:i=10,bubbles:r=!1,preventDefault:n=!1,stopKeydownPropagation:a=!0}=t,s="horizontal"===o,l="vertical"===o,c=t=>{const{key:o}=t,c=t.shiftKey,d=/up|down/i.test(o),u=/left|right/i.test(o);if(!u&&!d)return;if(s&&d)return;if(l&&u)return;const h=c?i:1;a&&t.stopPropagation(),n&&t.preventDefault(),e.dispatchEvent(new CustomEvent("nudge",{bubbles:r,detail:ue((/left/i.test(o)?-1:/right/i.test(o)?1:0)*h,(/up/i.test(o)?-1:/down/i.test(o)?1:0)*h)}))};return e.addEventListener("keydown",c),{destroy(){e.removeEventListener("keydown",c)}}};function md(e,t){return t?t*Math.sign(e)*Math.log10(1+Math.abs(e)/t):e}const gd=(e,t,o)=>{if(!t||!o)return{...e};const i=e.x+md(t.x-e.x,o),r=e.x+e.width+md(t.x+t.width-(e.x+e.width),o),n=e.y+md(t.y-e.y,o);return{x:i,y:n,width:r-i,height:e.y+e.height+md(t.y+t.height-(e.y+e.height),o)-n}},$d=(e,t,o)=>t&&o?ue(e.x+md(t.x-e.x,o),e.y+md(t.y-e.y,o)):{...e};var fd=(e,t)=>{if(e)return/em/.test(e)?16*parseInt(e,10):/px/.test(e)?parseInt(e,10):void 0},yd=e=>{let t=e.detail||0;const{deltaX:o,deltaY:i,wheelDelta:r,wheelDeltaX:n,wheelDeltaY:a}=e;return Ao(n)&&Math.abs(n)>Math.abs(a)?t=n/-120:Ao(o)&&Math.abs(o)>Math.abs(i)?t=o/20:(r||a)&&(t=(r||a)/-120),t||(t=i/20),(qo()||Xt())&&(t*=2),t};function bd(e){let t,o,i,r,n,a,s;const l=e[36].default,c=rn(l,e,e[35],null);return{c(){t=kn("div"),o=kn("div"),c&&c.c(),An(o,"style",e[5]),An(t,"class",i=Mc(["PinturaScrollable",e[0]])),An(t,"style",e[4]),An(t,"data-direction",e[1]),An(t,"data-state",e[6])},m(i,l){wn(i,t,l),bn(t,o),c&&c.m(o,null),e[38](t),n=!0,a||(s=[Pn(o,"interactionstart",e[8]),Pn(o,"interactionupdate",e[10]),Pn(o,"interactionend",e[11]),Pn(o,"interactionrelease",e[9]),hn(hd.call(null,o,{inertia:!0})),Pn(o,"measure",e[37]),hn($c.call(null,o)),Pn(t,"wheel",e[13],{passive:!1}),Pn(t,"scroll",e[15]),Pn(t,"focusin",e[14]),Pn(t,"nudge",e[16]),Pn(t,"measure",e[12]),hn($c.call(null,t,{observePosition:!0})),hn(r=pd.call(null,t,{direction:"x"===e[1]?"horizontal":"vertical",stopKeydownPropagation:!1}))],a=!0)},p(e,a){c&&c.p&&(!n||16&a[1])&&sn(c,l,e,e[35],n?an(l,e[35],a,null):ln(e[35]),null),(!n||32&a[0])&&An(o,"style",e[5]),(!n||1&a[0]&&i!==(i=Mc(["PinturaScrollable",e[0]])))&&An(t,"class",i),(!n||16&a[0])&&An(t,"style",e[4]),(!n||2&a[0])&&An(t,"data-direction",e[1]),(!n||64&a[0])&&An(t,"data-state",e[6]),r&&Jr(r.update)&&2&a[0]&&r.update.call(null,{direction:"x"===e[1]?"horizontal":"vertical",stopKeydownPropagation:!1})},i(e){n||(xa(c,e),n=!0)},o(e){va(c,e),n=!1},d(o){o&&Sn(t),c&&c.d(o),e[38](null),a=!1,Kr(s)}}}function xd(e,t,o){let i,r,n,s,l,c,d,u,{$$slots:h={},$$scope:p}=t;const m=qn();let g,$,f,y,b="idle",x=ec(0);on(e,x,(e=>o(34,u=e)));let v,{class:w}=t,{scrollBlockInteractionDist:S=5}=t,{scrollStep:k=10}=t,{scrollFocusMargin:C=64}=t,{scrollDirection:T="x"}=t,{scrollAutoCancel:M=!1}=t,{elasticity:R=0}=t,{onscroll:P=a}=t,{maskFeatherSize:E}=t,{maskFeatherStartOpacity:I}=t,{maskFeatherEndOpacity:A}=t,{scroll:L}=t,z="",F=!0;const D=x.subscribe((e=>{const t=de();t[T]=e,P(t)})),O=e=>Math.max(Math.min(0,e),f[i]-$[i]);let B,W,_;const V=(e,t={})=>{const{elastic:i=!1,animate:r=!1,preventScrollState:n=!1}=t;Math.abs(e-g)>S&&"idle"===b&&!y&&!n&&o(27,b="scrolling");const a=O(e),s=i&&R&&!y?a+md(e-a,R):a;let l=!0;r?l=!1:F||(l=!y),F=!1,x.set(s,{hard:l}).then((e=>{y&&(F=!0)}))};Yn((()=>{D()}));return e.$$set=e=>{"class"in e&&o(0,w=e.class),"scrollBlockInteractionDist"in e&&o(20,S=e.scrollBlockInteractionDist),"scrollStep"in e&&o(21,k=e.scrollStep),"scrollFocusMargin"in e&&o(22,C=e.scrollFocusMargin),"scrollDirection"in e&&o(1,T=e.scrollDirection),"scrollAutoCancel"in e&&o(23,M=e.scrollAutoCancel),"elasticity"in e&&o(24,R=e.elasticity),"onscroll"in e&&o(25,P=e.onscroll),"maskFeatherSize"in e&&o(19,E=e.maskFeatherSize),"maskFeatherStartOpacity"in e&&o(17,I=e.maskFeatherStartOpacity),"maskFeatherEndOpacity"in e&&o(18,A=e.maskFeatherEndOpacity),"scroll"in e&&o(26,L=e.scroll),"$$scope"in e&&o(35,p=e.$$scope)},e.$$.update=()=>{if(2&e.$$.dirty[0]&&o(31,i="x"===T?"width":"height"),2&e.$$.dirty[0]&&o(29,r=T.toUpperCase()),8&e.$$.dirty[0]&&o(33,n=v&&getComputedStyle(v)),8&e.$$.dirty[0]|4&e.$$.dirty[1]&&o(32,s=n&&fd(n.getPropertyValue("--scrollable-feather-size"))),268828676&e.$$.dirty[0]|11&e.$$.dirty[1]&&null!=u&&f&&null!=s&&$){const e=-1*u/s,t=-(f[i]-$[i]-u)/s;o(17,I=ns(1-e,0,1)),o(18,A=ns(1-t,0,1)),o(19,E=s),o(4,z=`--scrollable-feather-start-opacity: ${I};--scrollable-feather-end-opacity: ${A}`)}67108872&e.$$.dirty[0]&&v&&void 0!==L&&(Ao(L)?V(L):V(L.scrollOffset,L)),268435460&e.$$.dirty[0]|1&e.$$.dirty[1]&&o(30,l=f&&$?$[i]>f[i]:void 0),1207959552&e.$$.dirty[0]&&o(6,c=Mc([b,l?"overflows":void 0])),1610612736&e.$$.dirty[0]|8&e.$$.dirty[1]&&o(5,d=l?`transform: translate${r}(${u}px)`:void 0)},[w,T,$,v,z,d,c,x,()=>{l&&(W=!1,B=!0,_=ue(0,0),y=!1,o(27,b="idle"),g=tn(x))},({detail:e})=>{l&&(y=!0,o(27,b="idle"))},({detail:e})=>{l&&(W||B&&(B=!1,Me(e.translation)<.1)||(!M||"x"!==T||(e=>{const t=xe(ue(e.x-_.x,e.y-_.y),Math.abs);_=pe(e);const o=Me(t),i=t.x-t.y;return!(o>1&&i<-.5)})(e.translation)?V(g+e.translation[T],{elastic:!0}):W=!0))},({detail:e})=>{if(!l)return;if(W)return;const t=g+e.translation[T],o=O(t);F=!1,x.set(o).then((e=>{y&&(F=!0)}))},({detail:e})=>{o(28,f=e),m("measure",{x:e.x,y:e.y,width:e.width,height:e.height})},e=>{if(!l)return;e.preventDefault(),e.stopPropagation();const t=e.shiftKey,o=yd(e)*(t?-1:1),i=tn(x);V(i+o*k,{animate:!0})},e=>{if(!l)return;if(!y)return;let t=e.target;e.target.classList.contains("implicit")&&(t=t.parentNode);const o=t["x"===T?"offsetLeft":"offsetTop"],r=o+t["x"===T?"offsetWidth":"offsetHeight"],n=tn(x),a=C+E;n+of[i]-a&&V(f[i]-r-a,{animate:!0})},()=>{o(3,v["x"===T?"scrollLeft":"scrollTop"]=0,v)},({detail:e})=>{if(v.querySelector("[data-focus-visible]"))return;const t=-2*e[T],o=tn(x);V(o+t*k,{animate:!0,preventScrollState:!0})},I,A,E,S,k,C,M,R,P,L,b,f,r,l,i,s,n,u,p,h,e=>o(2,$=e.detail),function(e){ta[e?"unshift":"push"]((()=>{v=e,o(3,v)}))}]}class vd extends Fa{constructor(e){super(),za(this,e,xd,bd,Qr,{class:0,scrollBlockInteractionDist:20,scrollStep:21,scrollFocusMargin:22,scrollDirection:1,scrollAutoCancel:23,elasticity:24,onscroll:25,maskFeatherSize:19,maskFeatherStartOpacity:17,maskFeatherEndOpacity:18,scroll:26},null,[-1,-1])}}function wd(e,{delay:t=0,duration:o=400,easing:i=Zr}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:o,easing:i,css:e=>"opacity: "+e*r}}function Sd(e){let t,o,i,r,n;return{c(){t=kn("span"),An(t,"class","PinturaStatusMessage")},m(o,a){wn(o,t,a),t.innerHTML=e[0],i=!0,r||(n=[Pn(t,"measure",(function(){Jr(e[1])&&e[1].apply(this,arguments)})),hn($c.call(null,t))],r=!0)},p(o,[r]){e=o,(!i||1&r)&&(t.innerHTML=e[0])},i(e){i||(la((()=>{o||(o=Sa(t,wd,{duration:500},!0)),o.run(1)})),i=!0)},o(e){o||(o=Sa(t,wd,{duration:500},!1)),o.run(0),i=!1},d(e){e&&Sn(t),e&&o&&o.end(),r=!1,Kr(n)}}}function kd(e,t,o){let{text:i}=t,{onmeasure:r=a}=t;return e.$$set=e=>{"text"in e&&o(0,i=e.text),"onmeasure"in e&&o(1,r=e.onmeasure)},[i,r]}class Cd extends Fa{constructor(e){super(),za(this,e,kd,Sd,Qr,{text:0,onmeasure:1})}}function Td(e){let t,o,i,r,n,a,s,l,c;return{c(){t=kn("span"),o=Cn("svg"),i=Cn("g"),r=Cn("circle"),n=Cn("circle"),a=Mn(),s=kn("span"),l=Tn(e[3]),An(r,"class","PinturaProgressIndicatorBar"),An(r,"r","8.5"),An(r,"cx","10"),An(r,"cy","10"),An(r,"stroke-linecap","round"),An(r,"opacity",".25"),An(n,"class","PinturaProgressIndicatorFill"),An(n,"r","8.5"),An(n,"stroke-dasharray",e[2]),An(n,"cx","10"),An(n,"cy","10"),An(n,"transform","rotate(-90) translate(-20)"),An(i,"fill","none"),An(i,"stroke","currentColor"),An(i,"stroke-width","2.5"),An(i,"stroke-linecap","round"),An(i,"opacity",e[1]),An(o,"width","20"),An(o,"height","20"),An(o,"viewBox","0 0 20 20"),An(o,"xmlns","http://www.w3.org/2000/svg"),An(o,"aria-hidden","true"),An(o,"focusable","false"),An(s,"class","implicit"),An(t,"class","PinturaProgressIndicator"),An(t,"data-status",e[0]),An(t,"style",c="opacity:"+e[4])},m(e,c){wn(e,t,c),bn(t,o),bn(o,i),bn(i,r),bn(i,n),bn(t,a),bn(t,s),bn(s,l)},p(e,[o]){4&o&&An(n,"stroke-dasharray",e[2]),2&o&&An(i,"opacity",e[1]),8&o&&Fn(l,e[3]),1&o&&An(t,"data-status",e[0]),16&o&&c!==(c="opacity:"+e[4])&&An(t,"style",c)},i:Gr,o:Gr,d(e){e&&Sn(t)}}}function Md(e,t,o){let i,r,n,a,s,l,c;const d=qn();let{progress:u}=t,{min:h=0}=t,{max:p=100}=t,{labelBusy:m="Busy"}=t,{opacity:g}=t;const $=ec(g,{precision:.01});on(e,$,(e=>o(4,c=e)));const f=ec(0,{precision:.01}),y=ec(0,{precision:.01});on(e,y,(e=>o(13,s=e)));const b=Wa([f],(e=>ns(e,h,p)));on(e,b,(e=>o(14,l=e)));const x=b.subscribe((e=>{1===u&&Math.round(e)>=100&&d("complete")}));return Zn((()=>{y.set(1)})),Yn((()=>{x()})),e.$$set=e=>{"progress"in e&&o(8,u=e.progress),"min"in e&&o(9,h=e.min),"max"in e&&o(10,p=e.max),"labelBusy"in e&&o(11,m=e.labelBusy),"opacity"in e&&o(12,g=e.opacity)},e.$$.update=()=>{4096&e.$$.dirty&&Ao(g)&&$.set(g),256&e.$$.dirty&&u&&u!==1/0&&f.set(100*u),18688&e.$$.dirty&&o(3,i=u===1/0?m:Math.round(l)+"%"),16640&e.$$.dirty&&o(2,r=u===1/0?"26.5 53":l/100*53+" 53"),8192&e.$$.dirty&&o(1,n=s),256&e.$$.dirty&&o(0,a=u===1/0?"busy":"loading")},[a,n,r,i,c,$,y,b,u,h,p,m,g,s,l]}class Rd extends Fa{constructor(e){super(),za(this,e,Md,Td,Qr,{progress:8,min:9,max:10,labelBusy:11,opacity:12})}}function Pd(e){let t,o,i;const r=e[5].default,n=rn(r,e,e[4],null);return{c(){t=kn("span"),n&&n.c(),An(t,"class",o="PinturaStatusAside "+e[0]),An(t,"style",e[1])},m(e,o){wn(e,t,o),n&&n.m(t,null),i=!0},p(e,[a]){n&&n.p&&(!i||16&a)&&sn(n,r,e,e[4],i?an(r,e[4],a,null):ln(e[4]),null),(!i||1&a&&o!==(o="PinturaStatusAside "+e[0]))&&An(t,"class",o),(!i||2&a)&&An(t,"style",e[1])},i(e){i||(xa(n,e),i=!0)},o(e){va(n,e),i=!1},d(e){e&&Sn(t),n&&n.d(e)}}}function Ed(e,t,o){let i,{$$slots:r={},$$scope:n}=t,{offset:a=0}=t,{opacity:s=0}=t,{class:l}=t;return e.$$set=e=>{"offset"in e&&o(2,a=e.offset),"opacity"in e&&o(3,s=e.opacity),"class"in e&&o(0,l=e.class),"$$scope"in e&&o(4,n=e.$$scope)},e.$$.update=()=>{12&e.$$.dirty&&o(1,i=`transform:translateX(${a}px);opacity:${s}`)},[l,i,a,s,n,r]}class Id extends Fa{constructor(e){super(),za(this,e,Ed,Pd,Qr,{offset:2,opacity:3,class:0})}}const{document:Ad}=ka;function Ld(e){let t,o,i,r;return{c(){t=Mn(),o=kn("button"),An(o,"class","PinturaImageButton"),An(o,"type","button"),An(o,"title",e[1]),o.disabled=e[2]},m(n,a){wn(n,t,a),wn(n,o,a),o.innerHTML=e[0],e[11](o),i||(r=[Pn(Ad.body,"load",e[5],!0),Pn(Ad.body,"error",e[6],!0),Pn(o,"pointerdown",e[4])],i=!0)},p(e,[t]){1&t&&(o.innerHTML=e[0]),2&t&&An(o,"title",e[1]),4&t&&(o.disabled=e[2])},i:Gr,o:Gr,d(n){n&&Sn(t),n&&Sn(o),e[11](null),i=!1,Kr(r)}}}function zd(e,t,o){let i,{html:r}=t,{title:n}=t,{onclick:s}=t,{disabled:l=!1}=t,{ongrab:c=a}=t,{ondrag:d=a}=t,{ondrop:u=a}=t;const h=e=>Me(p,ue(e.pageX,e.pageY))<256;let p;const m=e=>{document.documentElement.removeEventListener("pointermove",g),document.documentElement.removeEventListener("pointerup",m);const t=ue(e.pageX,e.pageY);if(Me(p,t)<32)return s(e);h(e)||u(e)},g=e=>{h(e)||d(e)},$=e=>i&&i.contains(e)&&"IMG"===e.nodeName;return e.$$set=e=>{"html"in e&&o(0,r=e.html),"title"in e&&o(1,n=e.title),"onclick"in e&&o(7,s=e.onclick),"disabled"in e&&o(2,l=e.disabled),"ongrab"in e&&o(8,c=e.ongrab),"ondrag"in e&&o(9,d=e.ondrag),"ondrop"in e&&o(10,u=e.ondrop)},e.$$.update=()=>{8&e.$$.dirty&&i&&i.querySelector("img")&&o(3,i.dataset.loader=!0,i)},[r,n,l,i,e=>{p=ue(e.pageX,e.pageY),c(e),document.documentElement.addEventListener("pointermove",g),document.documentElement.addEventListener("pointerup",m)},({target:e})=>{$(e)&&o(3,i.dataset.load=!0,i)},({target:e})=>{$(e)&&o(3,i.dataset.error=!0,i)},s,c,d,u,function(e){ta[e?"unshift":"push"]((()=>{i=e,o(3,i)}))}]}class Fd extends Fa{constructor(e){super(),za(this,e,zd,Ld,Qr,{html:0,title:1,onclick:7,disabled:2,ongrab:8,ondrag:9,ondrop:10})}}function Dd(e,t,o){const i=e.slice();return i[14]=t[o],i}function Od(e,t){let o,i,r,n,a,s,l;function c(){return t[10](t[14])}function d(...e){return t[11](t[14],...e)}function u(...e){return t[12](t[14],...e)}function h(...e){return t[13](t[14],...e)}return i=new Fd({props:{onclick:c,ongrab:d,ondrag:u,ondrop:h,disabled:t[1]||t[14].disabled,title:t[14].title,html:t[14].thumb}}),{key:e,first:null,c(){o=kn("li"),Ia(i.$$.fragment),r=Mn(),An(o,"style",t[6]),this.first=o},m(e,c){wn(e,o,c),Aa(i,o,null),bn(o,r),a=!0,s||(l=hn(n=t[8].call(null,o,t[14])),s=!0)},p(e,r){t=e;const s={};5&r&&(s.onclick=c),9&r&&(s.ongrab=d),17&r&&(s.ondrag=u),33&r&&(s.ondrop=h),3&r&&(s.disabled=t[1]||t[14].disabled),1&r&&(s.title=t[14].title),1&r&&(s.html=t[14].thumb),i.$set(s),(!a||64&r)&&An(o,"style",t[6]),n&&Jr(n.update)&&1&r&&n.update.call(null,t[14])},i(e){a||(xa(i.$$.fragment,e),a=!0)},o(e){va(i.$$.fragment,e),a=!1},d(e){e&&Sn(o),La(i),s=!1,l()}}}function Bd(e){let t,o,i=[],r=new Map,n=e[0];const a=e=>e[14].id;for(let t=0;to(9,r=e)));Zn((()=>u.set(1)));return e.$$set=e=>{"items"in e&&o(0,n=e.items),"disabled"in e&&o(1,a=e.disabled),"onclickitem"in e&&o(2,s=e.onclickitem),"ongrabitem"in e&&o(3,l=e.ongrabitem),"ondragitem"in e&&o(4,c=e.ondragitem),"ondropitem"in e&&o(5,d=e.ondropitem)},e.$$.update=()=>{512&e.$$.dirty&&o(6,i="opacity:"+r)},[n,a,s,l,c,d,i,u,(e,t)=>t.mount&&t.mount(e.firstChild,t),r,e=>s(e.id),(e,t)=>l&&l(e.id,t),(e,t)=>c&&c(e.id,t),(e,t)=>d&&d(e.id,t)]}class _d extends Fa{constructor(e){super(),za(this,e,Wd,Bd,Qr,{items:0,disabled:1,onclickitem:2,ongrabitem:3,ondragitem:4,ondropitem:5})}}var Vd=()=>u()&&window.devicePixelRatio||1;let Nd=null;var Hd=e=>(null===Nd&&(Nd=1===Vd()?Math.round:e=>e),Nd(e)),jd=(e,t={})=>{if(e){if(t.preventScroll&&Xt()){const t=document.body.scrollTop;return e.focus(),void(document.body.scrollTop=t)}e.focus(t)}},Ud=e=>/date|email|number|search|text|url/.test(e.type),Gd=e=>(e=>/textarea/i.test(e.nodeName))(e)||Ud(e)||e.isContentEditable;const Zd=e=>({}),Xd=e=>({}),Yd=e=>({}),qd=e=>({});function Kd(e){let t,o;const i=[e[7]];let r={$$slots:{default:[Qd]},$$scope:{ctx:e}};for(let e=0;e{u[s]=null})),ba(),i=u[o],i?i.p(e,a):(i=u[o]=d[o](e),i.c()),xa(i,1),i.m(r.parentNode,r)),e[6]?p?(p.p(e,a),64&a[0]&&xa(p,1)):(p=eu(e),p.c(),xa(p,1),p.m(n.parentNode,n)):p&&(ya(),va(p,1,1,(()=>{p=null})),ba())},i(e){s||(xa(i),xa(p),xa(false),s=!0)},o(e){va(i),va(p),va(false),s=!1},d(e){e&&Sn(t),u[o].d(e),e&&Sn(r),p&&p.d(e),e&&Sn(n),e&&Sn(a),l=!1,Kr(c)}}}let ou=12;function iu(e,t,o){let i,r,n,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,{$$slots:w={},$$scope:S}=t,{buttonClass:k}=t,{buttonLabel:C}=t,{buttonLabelClass:T}=t,{buttonHideLabel:M}=t,{buttonIcon:R}=t,{buttonTitle:P}=t,{panelClass:E}=t,{isActive:I=!1}=t,{onshow:A=(({panel:e})=>jd(e,{preventScroll:!0}))}=t,{onhide:L=a}=t;const z=Jn("isAnimated");on(e,z,(e=>o(41,v=e)));const F=Jn("rootPortal");on(e,F,(e=>o(36,$=e)));const D=Jn("rootRect");let O,B,W;on(e,D,(e=>o(40,x=e)));const _=()=>o(26,W=i&&i.getBoundingClientRect());let V=de(),N=ec(0);on(e,N,(e=>o(38,y=e)));let H=de();const j=Ba({x:0,y:0});on(e,j,(e=>o(37,f=e)));const U=ec(-5,{stiffness:.1,damping:.35,precision:.001});on(e,U,(e=>o(39,b=e)));const G=e=>od(e,$)||B.isEventTarget(e);let Z,X,Y=!1;const q=e=>{Gd(e.target)||(I||_(),o(30,X=e),o(0,I=!I))},K=e=>{/down/i.test(e.key)&&(o(0,I=!0),o(30,X=e))};Yn((()=>{if(!$)return;if(!Z)return;const e=Z;sa().then((()=>{e.parentNode&&e.remove()}))}));return e.$$set=e=>{"buttonClass"in e&&o(19,k=e.buttonClass),"buttonLabel"in e&&o(1,C=e.buttonLabel),"buttonLabelClass"in e&&o(20,T=e.buttonLabelClass),"buttonHideLabel"in e&&o(21,M=e.buttonHideLabel),"buttonIcon"in e&&o(22,R=e.buttonIcon),"buttonTitle"in e&&o(23,P=e.buttonTitle),"panelClass"in e&&o(2,E=e.panelClass),"isActive"in e&&o(0,I=e.isActive),"onshow"in e&&o(24,A=e.onshow),"onhide"in e&&o(25,L=e.onhide),"$$scope"in e&&o(48,S=e.$$scope)},e.$$.update=()=>{if(16&e.$$.dirty[0]&&(i=B&&B.getElement()),536870913&e.$$.dirty[0]&&o(8,m=I?e=>{Y&&(o(29,Y=!1),G(e)||o(0,I=!1))}:void 0),1&e.$$.dirty[0]|1024&e.$$.dirty[1]&&N.set(I?1:0,{hard:!1===v}),1&e.$$.dirty[0]|1024&e.$$.dirty[1]&&U.set(I?0:-5,{hard:!1===v}),256&e.$$.dirty[1]&&o(33,r=1-b/-5),1&e.$$.dirty[0]|512&e.$$.dirty[1]&&x&&I&&_(),67108873&e.$$.dirty[0]|512&e.$$.dirty[1]&&x&&O&&W&&I){let e=W.x-x.x+.5*W.width-.5*O.width,t=W.y-x.y+W.height;const i=ou,r=ou,n=x.width-ou,a=x.height-ou,s=e,l=t,c=s+O.width,d=l+O.height;if(sn&&(o(28,H.x=c-n,H),e=n-O.width),d>a){o(27,V.y=-1,V);r0),128&e.$$.dirty[1]&&o(35,s=y<1),134217728&e.$$.dirty[0]|320&e.$$.dirty[1]&&o(34,l=`translateX(${Math.round(f.x)+V.x*ou}px) translateY(${Math.round(f.y)+V.y*ou+V.y*b}px)`),152&e.$$.dirty[1]&&o(11,c=s?`opacity: ${y}; pointer-events: ${y<1?"none":"all"}; transform: ${l};`:"transform: "+l),4&e.$$.dirty[1]&&o(31,d=.5+.5*r),4&e.$$.dirty[1]&&o(32,u=r),402653192&e.$$.dirty[0]|67&e.$$.dirty[1]&&o(10,h=f&&O&&`opacity:${u};transform:scaleX(${d})rotate(45deg);top:${V.y<0?H.y+O.height:0}px;left:${H.x+.5*O.width}px`),1&e.$$.dirty[0]&&o(9,p=I?e=>{G(e)||o(29,Y=!0)}:void 0),96&e.$$.dirty[0]|32&e.$$.dirty[1]&&n&&$&&Z&&Z.parentNode!==$&&$.append(Z),1&e.$$.dirty[0]&&(I||o(30,X=void 0)),1090519137&e.$$.dirty[0]&&I&&n&&Z&&A({e:X,panel:Z}),33554497&e.$$.dirty[0]&&n&&!I&&L(),16252930&e.$$.dirty[0]&&o(7,g={label:C,icon:R,class:Mc(["PinturaPanelButton",k]),onkeydown:K,onclick:q,hideLabel:M,labelClass:T,title:P})},[I,C,E,O,B,Z,n,g,m,p,h,c,z,F,D,N,j,U,e=>{/esc/i.test(e.key)&&(o(0,I=!1),i.focus())},k,T,M,R,P,A,L,W,V,H,Y,X,d,u,r,l,s,$,f,y,b,x,v,w,function(e){ta[e?"unshift":"push"]((()=>{B=e,o(4,B)}))},function(e){ta[e?"unshift":"push"]((()=>{B=e,o(4,B)}))},function(e){ta[e?"unshift":"push"]((()=>{Z=e,o(5,Z)}))},e=>{e.stopPropagation(),o(0,I=!1)},e=>o(3,O=Fe(e.detail)),S]}class ru extends Fa{constructor(e){super(),za(this,e,iu,tu,Qr,{buttonClass:19,buttonLabel:1,buttonLabelClass:20,buttonHideLabel:21,buttonIcon:22,buttonTitle:23,panelClass:2,isActive:0,onshow:24,onhide:25},null,[-1,-1])}}var nu={Up:38,Down:40,Left:37,Right:39};function au(e){let t,o,i,r,n,a,s,l;const c=e[15].default,d=rn(c,e,e[14],null);return{c(){t=kn("li"),o=kn("input"),i=Mn(),r=kn("label"),d&&d.c(),An(o,"type","radio"),An(o,"class","implicit"),An(o,"id",e[7]),An(o,"name",e[0]),o.value=e[3],o.disabled=e[6],o.hidden=e[5],o.checked=e[4],An(r,"for",e[7]),An(r,"title",e[2]),An(t,"class",n=Mc(["PinturaRadioGroupOption",e[1]])),An(t,"data-hidden",e[5]),An(t,"data-disabled",e[6]),An(t,"data-selected",e[4])},m(n,c){wn(n,t,c),bn(t,o),bn(t,i),bn(t,r),d&&d.m(r,null),a=!0,s||(l=[Pn(o,"change",In(e[16])),Pn(o,"keydown",e[9]),Pn(o,"click",e[10])],s=!0)},p(e,[i]){(!a||128&i)&&An(o,"id",e[7]),(!a||1&i)&&An(o,"name",e[0]),(!a||8&i)&&(o.value=e[3]),(!a||64&i)&&(o.disabled=e[6]),(!a||32&i)&&(o.hidden=e[5]),(!a||16&i)&&(o.checked=e[4]),d&&d.p&&(!a||16384&i)&&sn(d,c,e,e[14],a?an(c,e[14],i,null):ln(e[14]),null),(!a||128&i)&&An(r,"for",e[7]),(!a||4&i)&&An(r,"title",e[2]),(!a||2&i&&n!==(n=Mc(["PinturaRadioGroupOption",e[1]])))&&An(t,"class",n),(!a||32&i)&&An(t,"data-hidden",e[5]),(!a||64&i)&&An(t,"data-disabled",e[6]),(!a||16&i)&&An(t,"data-selected",e[4])},i(e){a||(xa(d,e),a=!0)},o(e){va(d,e),a=!1},d(e){e&&Sn(t),d&&d.d(e),s=!1,Kr(l)}}}function su(e,t,o){let i,r,{$$slots:n={},$$scope:a}=t,{name:s}=t,{class:l}=t,{label:c}=t,{id:d}=t,{value:u}=t,{checked:h}=t,{onkeydown:p}=t,{onclick:m}=t,{hidden:g=!1}=t,{disabled:$=!1}=t;const f=Object.values(nu),y=Jn("keysPressed");on(e,y,(e=>o(17,r=e)));return e.$$set=e=>{"name"in e&&o(0,s=e.name),"class"in e&&o(1,l=e.class),"label"in e&&o(2,c=e.label),"id"in e&&o(11,d=e.id),"value"in e&&o(3,u=e.value),"checked"in e&&o(4,h=e.checked),"onkeydown"in e&&o(12,p=e.onkeydown),"onclick"in e&&o(13,m=e.onclick),"hidden"in e&&o(5,g=e.hidden),"disabled"in e&&o(6,$=e.disabled),"$$scope"in e&&o(14,a=e.$$scope)},e.$$.update=()=>{2049&e.$$.dirty&&o(7,i=`${s}-${d}`)},[s,l,c,u,h,g,$,i,y,e=>{p(e)},e=>{r.some((e=>f.includes(e)))||m(e)},d,p,m,a,n,function(t){Qn.call(this,e,t)}]}class lu extends Fa{constructor(e){super(),za(this,e,su,au,Qr,{name:0,class:1,label:2,id:11,value:3,checked:4,onkeydown:12,onclick:13,hidden:5,disabled:6})}}var cu=(e=[])=>e.reduce(((e,t)=>(Fo(t)?Fo(t[1]):!!t.options)?e.concat(Fo(t)?t[1]:t.options):(e.push(t),e)),[]);const du=(e,t,o)=>{let i;return Fo(e)?i={id:t,value:e[0],label:e[1],...e[2]||{}}:(i=e,i.id=null!=i.id?i.id:t),o?o(i):i};var uu=(e,t,o)=>P(e)?e(t,o):e;const hu=(e,t)=>e.map((([e,o,i])=>{if(Fo(o))return[uu(e,t),hu(o,t)];{const r=[e,uu(o,t)];if(i){let e={...i};i.icon&&(e.icon=uu(i.icon,t)),r.push(e)}return r}}));var pu=(e,t)=>hu(e,t),mu=(e,t)=>Array.isArray(e)&&Array.isArray(t)?ds(e,t):e===t;function gu(e,t,o){const i=e.slice();return i[27]=t[o],i}const $u=e=>({option:1024&e[0]}),fu=e=>({option:e[27]});function yu(e,t,o){const i=e.slice();return i[27]=t[o],i}const bu=e=>({option:1024&e[0]}),xu=e=>({option:e[27]}),vu=e=>({option:1024&e[0]}),wu=e=>({option:e[27]});function Su(e){let t,o,i,r,n,a=[],s=new Map,l=e[1]&&ku(e),c=e[10];const d=e=>e[27].id;for(let t=0;te[27].id;for(let t=0;t{r=null})),ba()),e[27].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=Pu(e),n.c(),n.m(o.parentNode,o))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}(e);return{c(){r&&r.c()},m(e,o){r&&r.m(e,o),t=!0},p(e,n){i?i.p&&(!t||8389632&n[0])&&sn(i,o,e,e[23],t?an(o,e[23],n,$u):ln(e[23]),fu):r&&r.p&&(!t||1088&n[0])&&r.p(e,t?n:[-1,-1])},i(e){t||(xa(r,e),t=!0)},o(e){va(r,e),t=!1},d(e){r&&r.d(e)}}}function Iu(e){let t,o;return t=new td({props:{$$slots:{default:[Au]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8389632&o[0]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Au(e){let t,o=e[27].icon+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){1024&i[0]&&o!==(o=e[27].icon+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function Lu(e){let t,o,i=e[27].label+"";return{c(){t=kn("span"),o=Tn(i),An(t,"class",e[6])},m(e,i){wn(e,t,i),bn(t,o)},p(e,r){1024&r[0]&&i!==(i=e[27].label+"")&&Fn(o,i),64&r[0]&&An(t,"class",e[6])},d(e){e&&Sn(t)}}}function zu(e){let t;const o=e[22].option,i=rn(o,e,e[23],xu),r=i||function(e){let t,o,i,r=e[27].icon&&Iu(e),n=!e[27].hideLabel&&Lu(e);return{c(){r&&r.c(),t=Mn(),n&&n.c(),o=Mn()},m(e,a){r&&r.m(e,a),wn(e,t,a),n&&n.m(e,a),wn(e,o,a),i=!0},p(e,i){e[27].icon?r?(r.p(e,i),1024&i[0]&&xa(r,1)):(r=Iu(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[27].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=Lu(e),n.c(),n.m(o.parentNode,o))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}(e);return{c(){r&&r.c()},m(e,o){r&&r.m(e,o),t=!0},p(e,n){i?i.p&&(!t||8389632&n[0])&&sn(i,o,e,e[23],t?an(o,e[23],n,bu):ln(e[23]),xu):r&&r.p&&(!t||1088&n[0])&&r.p(e,t?n:[-1,-1])},i(e){t||(xa(r,e),t=!0)},o(e){va(r,e),t=!1},d(e){r&&r.d(e)}}}function Fu(e,t){let o,i,r;return i=new lu({props:{name:t[4],label:t[27].label,id:t[27].id,value:t[27].value,disabled:t[27].disabled,hidden:t[27].hidden,class:t[8],checked:t[12](t[27])===t[0],onkeydown:t[13](t[27]),onclick:t[14](t[27]),$$slots:{default:[zu]},$$scope:{ctx:t}}}),{key:e,first:null,c(){o=Rn(),Ia(i.$$.fragment),this.first=o},m(e,t){wn(e,o,t),Aa(i,e,t),r=!0},p(e,o){t=e;const r={};16&o[0]&&(r.name=t[4]),1024&o[0]&&(r.label=t[27].label),1024&o[0]&&(r.id=t[27].id),1024&o[0]&&(r.value=t[27].value),1024&o[0]&&(r.disabled=t[27].disabled),1024&o[0]&&(r.hidden=t[27].hidden),256&o[0]&&(r.class=t[8]),1025&o[0]&&(r.checked=t[12](t[27])===t[0]),1024&o[0]&&(r.onkeydown=t[13](t[27])),1024&o[0]&&(r.onclick=t[14](t[27])),8389696&o[0]&&(r.$$scope={dirty:o,ctx:t}),i.$set(r)},i(e){r||(xa(i.$$.fragment,e),r=!0)},o(e){va(i.$$.fragment,e),r=!1},d(e){e&&Sn(o),La(i,e)}}}function Du(e,t){let o,i,r,n,a;const s=[Tu,Cu],l=[];function c(e,t){return e[27].options?0:1}return i=c(t),r=l[i]=s[i](t),{key:e,first:null,c(){o=Rn(),r.c(),n=Rn(),this.first=o},m(e,t){wn(e,o,t),l[i].m(e,t),wn(e,n,t),a=!0},p(e,o){let a=i;i=c(t=e),i===a?l[i].p(t,o):(ya(),va(l[a],1,1,(()=>{l[a]=null})),ba(),r=l[i],r?r.p(t,o):(r=l[i]=s[i](t),r.c()),xa(r,1),r.m(n.parentNode,n))},i(e){a||(xa(r),a=!0)},o(e){va(r),a=!1},d(e){e&&Sn(o),l[i].d(e),e&&Sn(n)}}}function Ou(e){let t,o,i,r=e[11].length&&Su(e);return{c(){r&&r.c(),t=Mn(),o=Rn()},m(e,n){r&&r.m(e,n),wn(e,t,n),wn(e,o,n),i=!0},p(e,o){e[11].length?r?(r.p(e,o),2048&o[0]&&xa(r,1)):(r=Su(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba())},i(e){i||(xa(r),xa(false),i=!0)},o(e){va(r),va(false),i=!1},d(e){r&&r.d(e),e&&Sn(t),e&&Sn(o)}}}function Bu(e,t,o){let i,r,n,{$$slots:a={},$$scope:s}=t;const l=qn();let{label:c}=t,{hideLabel:d=!0}=t,{class:u}=t,{name:h="radio-group-"+L()}=t,{selectedIndex:p=-1}=t,{options:m=[]}=t,{onchange:g}=t,{layout:$}=t,{optionMapper:f}=t,{optionFilter:y}=t,{value:b}=t,{optionLabelClass:x}=t,{title:v}=t,{locale:w}=t,{optionClass:S}=t,{optionGroupClass:k}=t;const C=e=>n.findIndex((t=>t.id===e.id)),T=(e,t)=>{o(0,p=C(e));const i={index:p,...e};((e,...t)=>{e&&e(...t)})(g,i,t),l("change",i)};return e.$$set=e=>{"label"in e&&o(1,c=e.label),"hideLabel"in e&&o(2,d=e.hideLabel),"class"in e&&o(3,u=e.class),"name"in e&&o(4,h=e.name),"selectedIndex"in e&&o(0,p=e.selectedIndex),"options"in e&&o(15,m=e.options),"onchange"in e&&o(16,g=e.onchange),"layout"in e&&o(5,$=e.layout),"optionMapper"in e&&o(17,f=e.optionMapper),"optionFilter"in e&&o(18,y=e.optionFilter),"value"in e&&o(19,b=e.value),"optionLabelClass"in e&&o(6,x=e.optionLabelClass),"title"in e&&o(7,v=e.title),"locale"in e&&o(20,w=e.locale),"optionClass"in e&&o(8,S=e.optionClass),"optionGroupClass"in e&&o(9,k=e.optionGroupClass),"$$scope"in e&&o(23,s=e.$$scope)},e.$$.update=()=>{1343488&e.$$.dirty[0]&&o(11,i=pu(y?m.filter(y):m,w)),133120&e.$$.dirty[0]&&o(10,r=((e=[],t)=>{let o=0;return e.map((e=>(o++,Fo(e)?Fo(e[1])?{id:o,label:e[0],options:e[1].map((e=>du(e,++o,t)))}:du(e,o,t):e.options?{id:e.id||o,label:e.label,options:e.options.map((e=>du(e,++o,t)))}:du(e,o,t))))})(i,f)),1024&e.$$.dirty[0]&&o(21,n=cu(r)),2654209&e.$$.dirty[0]&&p<0&&(o(0,p=n.findIndex((e=>mu(e.value,b)))),p<0&&o(0,p=(e=>e.findIndex((e=>void 0===e[0])))(m)))},[p,c,d,u,h,$,x,v,S,k,r,i,C,e=>t=>{var o;(o=t.key,/enter| /i.test(o))&&T(e,t)},e=>t=>{T(e,t)},m,g,f,y,b,w,n,a,s]}class Wu extends Fa{constructor(e){super(),za(this,e,Bu,Ou,Qr,{label:1,hideLabel:2,class:3,name:4,selectedIndex:0,options:15,onchange:16,layout:5,optionMapper:17,optionFilter:18,value:19,optionLabelClass:6,title:7,locale:20,optionClass:8,optionGroupClass:9},null,[-1,-1])}}function _u(e){let t,o,i,r,n,a,s,l,c,d;return{c(){t=kn("div"),o=kn("button"),i=Tn("▲"),n=Mn(),a=kn("button"),s=Tn("▼"),An(o,"type","button"),An(o,"tabindex","-1"),An(o,"aria-label",r="increase "+e[7]),An(a,"type","button"),An(a,"tabindex","-1"),An(a,"aria-label",l="decrease "+e[7]),An(t,"class","PinturaInputSpinners")},m(r,l){wn(r,t,l),bn(t,o),bn(o,i),bn(t,n),bn(t,a),bn(a,s),c||(d=[Pn(o,"click",e[17]),Pn(a,"click",e[18])],c=!0)},p(e,t){128&t&&r!==(r="increase "+e[7])&&An(o,"aria-label",r),128&t&&l!==(l="decrease "+e[7])&&An(a,"aria-label",l)},d(e){e&&Sn(t),c=!1,Kr(d)}}}function Vu(e){let t,o,i,r,n,a,s="number"===e[1]&&e[9]&&_u(e);return{c(){t=kn("div"),o=kn("input"),r=Mn(),s&&s.c(),An(o,"class","PinturaInputField"),An(o,"title",e[7]),An(o,"type",e[1]),An(o,"min",e[4]),An(o,"max",e[5]),An(o,"step",e[6]),An(o,"inputmode",e[3]),o.value=i=e[14]?e[13]:e[0],An(o,"style",e[11]),An(o,"placeholder",e[8]),An(o,"maxlength",e[12]),o.disabled=e[2],An(o,"spellcheck","false"),An(o,"autocorrect","off"),An(o,"autocapitalize","off"),An(t,"class","PinturaInput")},m(i,l){wn(i,t,l),bn(t,o),e[26](o),bn(t,r),s&&s.m(t,null),n||(a=[Pn(o,"input",e[16]),Pn(o,"blur",(function(){Jr(e[14]&&e[15])&&(e[14]&&e[15]).apply(this,arguments)})),Pn(o,"keydown",e[19]),Pn(o,"keyup",e[20])],n=!0)},p(r,[n]){e=r,128&n&&An(o,"title",e[7]),2&n&&An(o,"type",e[1]),16&n&&An(o,"min",e[4]),32&n&&An(o,"max",e[5]),64&n&&An(o,"step",e[6]),8&n&&An(o,"inputmode",e[3]),24577&n&&i!==(i=e[14]?e[13]:e[0])&&o.value!==i&&(o.value=i),2048&n&&An(o,"style",e[11]),256&n&&An(o,"placeholder",e[8]),4096&n&&An(o,"maxlength",e[12]),4&n&&(o.disabled=e[2]),"number"===e[1]&&e[9]?s?s.p(e,n):(s=_u(e),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},i:Gr,o:Gr,d(o){o&&Sn(t),e[26](null),s&&s.d(),n=!1,Kr(a)}}}function Nu(e,t,o){let i,r,n,s,l,c,d,{value:u}=t,{type:h="text"}=t,{disabled:p=!1}=t,{inputmode:m}=t,{min:g}=t,{max:$}=t,{step:f}=t,{onchange:y=a}=t,{onkeydown:b=a}=t,{title:x}=t,{stepMultiplier:v=10}=t,{placeholder:w}=t,{enableSpinButtons:S=!0}=t;const k=()=>{let e=c.value;return"number"===h&&(e="numeric"===m?parseInt(e,10):parseFloat(e),!Ao(e)||Number.isNaN(e)?e=g||0:i&&(e=ns(e,g,$))),e};let C=u;const T=()=>{const e=ns(k()+(d?f*v:f),g,$);e!==u&&(o(24,C=e),o(0,u=e),y(u))},M=()=>{const e=ns(k()-(d?f*v:f),g,$);e!==u&&(o(24,C=e),o(0,u=e),y(u))};return e.$$set=e=>{"value"in e&&o(0,u=e.value),"type"in e&&o(1,h=e.type),"disabled"in e&&o(2,p=e.disabled),"inputmode"in e&&o(3,m=e.inputmode),"min"in e&&o(4,g=e.min),"max"in e&&o(5,$=e.max),"step"in e&&o(6,f=e.step),"onchange"in e&&o(21,y=e.onchange),"onkeydown"in e&&o(22,b=e.onkeydown),"title"in e&&o(7,x=e.title),"stepMultiplier"in e&&o(23,v=e.stepMultiplier),"placeholder"in e&&o(8,w=e.placeholder),"enableSpinButtons"in e&&o(9,S=e.enableSpinButtons)},e.$$.update=()=>{48&e.$$.dirty&&o(14,i=Ao(g)&&Ao($)),16778241&e.$$.dirty&&o(13,r=c===document.activeElement?C:u),32&e.$$.dirty&&o(25,n=$?($+"").length:void 0),33554440&e.$$.dirty&&o(12,s="numeric"===m&&n?n:void 0),33554432&e.$$.dirty&&o(11,l=n?`min-width:${n}em`:void 0)},[u,h,p,m,g,$,f,x,w,S,c,l,s,r,i,()=>{o(24,C=k()),y(u)},()=>{o(24,C=c.value),y(k())},T,M,e=>{d=e.shiftKey,b(e);const{key:t}=e;/up|down/i.test(t)&&(/up/i.test(t)&&T(),/down/i.test(t)&&M(),e.preventDefault(),e.stopPropagation())},e=>{const{key:t}=e;/up|down/i.test(t)&&(e.preventDefault(),e.stopPropagation())},y,b,v,C,n,function(e){ta[e?"unshift":"push"]((()=>{c=e,o(10,c)}))}]}class Hu extends Fa{constructor(e){super(),za(this,e,Nu,Vu,Qr,{value:0,type:1,disabled:2,inputmode:3,min:4,max:5,step:6,onchange:21,onkeydown:22,title:7,stepMultiplier:23,placeholder:8,enableSpinButtons:9})}}const ju=e=>({}),Uu=e=>({});function Gu(e){let t,o,i,r,n=(e[2]||e[21])+"",a=e[6]&&Xu(e);return{c(){a&&a.c(),t=Mn(),o=kn("span"),An(o,"class",i=Mc(["PinturaButtonLabel",e[3],e[5]&&"implicit"]))},m(e,i){a&&a.m(e,i),wn(e,t,i),wn(e,o,i),o.innerHTML=n,r=!0},p(e,s){e[6]?a?(a.p(e,s),64&s[0]&&xa(a,1)):(a=Xu(e),a.c(),xa(a,1),a.m(t.parentNode,t)):a&&(ya(),va(a,1,1,(()=>{a=null})),ba()),(!r||2097156&s[0])&&n!==(n=(e[2]||e[21])+"")&&(o.innerHTML=n),(!r||40&s[0]&&i!==(i=Mc(["PinturaButtonLabel",e[3],e[5]&&"implicit"])))&&An(o,"class",i)},i(e){r||(xa(a),r=!0)},o(e){va(a),r=!1},d(e){a&&a.d(e),e&&Sn(t),e&&Sn(o)}}}function Zu(e){let t,o;return t=new Hu({props:{value:e[10],onchange:e[17],type:"number",inputmode:"numeric",min:e[8].reduce(nh,1/0),max:e[8].reduce(ah,-1/0),enableSpinButtons:!1}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1024&o[0]&&(i.value=e[10]),131072&o[0]&&(i.onchange=e[17]),256&o[0]&&(i.min=e[8].reduce(nh,1/0)),256&o[0]&&(i.max=e[8].reduce(ah,-1/0)),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Xu(e){let t,o;return t=new td({props:{class:"PinturaButtonIcon",$$slots:{default:[Yu]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};536870976&o[0]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Yu(e){let t;return{c(){t=Cn("g")},m(o,i){wn(o,t,i),t.innerHTML=e[6]},p(e,o){64&o[0]&&(t.innerHTML=e[6])},d(e){e&&Sn(t)}}}function qu(e){let t,o,i,r,n,a;const s=[Zu,Gu],l=[];function c(e,t){return e[18]?0:1}return o=c(e),i=l[o]=s[o](e),{c(){t=kn("span"),i.c(),An(t,"slot","label"),An(t,"title",r=uu(e[1],e[16])),An(t,"class",n=Mc(["PinturaButtonInner",e[18]&&"PinturaComboBox",e[4]]))},m(e,i){wn(e,t,i),l[o].m(t,null),a=!0},p(e,d){let u=o;o=c(e),o===u?l[o].p(e,d):(ya(),va(l[u],1,1,(()=>{l[u]=null})),ba(),i=l[o],i?i.p(e,d):(i=l[o]=s[o](e),i.c()),xa(i,1),i.m(t,null)),(!a||65538&d[0]&&r!==(r=uu(e[1],e[16])))&&An(t,"title",r),(!a||262160&d[0]&&n!==(n=Mc(["PinturaButtonInner",e[18]&&"PinturaComboBox",e[4]])))&&An(t,"class",n)},i(e){a||(xa(i),a=!0)},o(e){va(i),a=!1},d(e){e&&Sn(t),l[o].d()}}}function Ku(e){let t,o,i=e[31].label+"";return{c(){t=kn("span"),o=Tn(i),An(t,"slot","group")},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){1&t[1]&&i!==(i=e[31].label+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Ju(e){let t,o;return t=new td({props:{style:P(e[14])?e[14](e[31].value):e[14],$$slots:{default:[Qu]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16384&o[0]|1&o[1]&&(i.style=P(e[14])?e[14](e[31].value):e[14]),536870912&o[0]|1&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Qu(e){let t,o=e[31].icon+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){1&i[1]&&o!==(o=e[31].icon+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function eh(e){let t,o,i,r,n,a=e[31].label+"",s=e[31].sublabel&&th(e);return{c(){t=kn("span"),o=new Bn(!1),i=Mn(),s&&s.c(),o.a=i,An(t,"style",r=P(e[15])?e[15](e[31].value):e[15]),An(t,"class",n=Mc(["PinturaDropdownOptionLabel",e[11]]))},m(e,r){wn(e,t,r),o.m(a,t),bn(t,i),s&&s.m(t,null)},p(e,i){1&i[1]&&a!==(a=e[31].label+"")&&o.p(a),e[31].sublabel?s?s.p(e,i):(s=th(e),s.c(),s.m(t,null)):s&&(s.d(1),s=null),32768&i[0]|1&i[1]&&r!==(r=P(e[15])?e[15](e[31].value):e[15])&&An(t,"style",r),2048&i[0]&&n!==(n=Mc(["PinturaDropdownOptionLabel",e[11]]))&&An(t,"class",n)},d(e){e&&Sn(t),s&&s.d()}}}function th(e){let t,o=e[31].sublabel+"";return{c(){t=kn("span"),An(t,"class","PinturaDropdownOptionSublabel")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){1&i[1]&&o!==(o=e[31].sublabel+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function oh(e){let t,o,i,r=e[31].icon&&Ju(e),n=!e[31].hideLabel&&eh(e);return{c(){t=kn("span"),r&&r.c(),o=Mn(),n&&n.c(),An(t,"slot","option")},m(e,a){wn(e,t,a),r&&r.m(t,null),bn(t,o),n&&n.m(t,null),i=!0},p(e,i){e[31].icon?r?(r.p(e,i),1&i[1]&&xa(r,1)):(r=Ju(e),r.c(),xa(r,1),r.m(t,o)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[31].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=eh(e),n.c(),n.m(t,null))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){e&&Sn(t),r&&r.d(),n&&n.d()}}}function ih(e){let t,o,i,r,n,a;const s=e[27].controls,l=rn(s,e,e[29],Uu);return i=new Wu({props:{class:"PinturaOptionsList PinturaScrollableContent",name:e[7],value:e[10],selectedIndex:e[9],optionFilter:e[12],optionMapper:e[13],optionLabelClass:Mc(["PinturaDropdownOptionLabel",e[11]]),optionGroupClass:"PinturaListOptionGroup",optionClass:"PinturaListOption",options:e[19],onchange:e[22],$$slots:{option:[oh,({option:e})=>({31:e}),({option:e})=>[0,e?1:0]],group:[Ku,({option:e})=>({31:e}),({option:e})=>[0,e?1:0]]},$$scope:{ctx:e}}}),{c(){t=kn("div"),l&&l.c(),o=Mn(),Ia(i.$$.fragment),An(t,"slot","details"),An(t,"class","PinturaOptionsListWrapper")},m(s,c){wn(s,t,c),l&&l.m(t,null),bn(t,o),Aa(i,t,null),r=!0,n||(a=Pn(t,"keydown",e[24]),n=!0)},p(e,t){l&&l.p&&(!r||536870912&t[0])&&sn(l,s,e,e[29],r?an(s,e[29],t,ju):ln(e[29]),Uu);const o={};128&t[0]&&(o.name=e[7]),1024&t[0]&&(o.value=e[10]),512&t[0]&&(o.selectedIndex=e[9]),4096&t[0]&&(o.optionFilter=e[12]),8192&t[0]&&(o.optionMapper=e[13]),2048&t[0]&&(o.optionLabelClass=Mc(["PinturaDropdownOptionLabel",e[11]])),524288&t[0]&&(o.options=e[19]),536922112&t[0]|1&t[1]&&(o.$$scope={dirty:t,ctx:e}),i.$set(o)},i(e){r||(xa(l,e),xa(i.$$.fragment,e),r=!0)},o(e){va(l,e),va(i.$$.fragment,e),r=!1},d(e){e&&Sn(t),l&&l.d(e),La(i),n=!1,a()}}}function rh(e){let t,o,i;function r(t){e[28](t)}let n={onshow:e[23],buttonClass:Mc(["PinturaDropdownButton",e[0],e[5]&&"PinturaDropdownIconOnly"]),$$slots:{details:[ih],label:[qu]},$$scope:{ctx:e}};return void 0!==e[20]&&(n.isActive=e[20]),t=new ru({props:n}),ta.push((()=>Ea(t,"isActive",r))),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};33&i[0]&&(r.buttonClass=Mc(["PinturaDropdownButton",e[0],e[5]&&"PinturaDropdownIconOnly"])),540016638&i[0]&&(r.$$scope={dirty:i,ctx:e}),!o&&1048576&i[0]&&(o=!0,r.isActive=e[20],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}const nh=(e,[t])=>tt>e?t:e;function sh(e,t,o){let i,r,{$$slots:n={},$$scope:s}=t,{class:l}=t,{title:c}=t,{label:d}=t,{labelClass:u}=t,{innerClass:h}=t,{hideLabel:p=!1}=t,{icon:m}=t,{name:g}=t,{options:$=[]}=t,{selectedIndex:f=-1}=t,{value:y}=t,{optionLabelClass:b}=t,{optionFilter:x}=t,{optionMapper:v}=t,{optionIconStyle:w}=t,{optionLabelStyle:S}=t,{locale:k}=t,{onchange:C=a}=t,{onload:T=a}=t,{ondestroy:M=a}=t,{enableInput:R=!1}=t;let P;return Zn((()=>T({options:$}))),Yn((()=>M({options:$}))),e.$$set=e=>{"class"in e&&o(0,l=e.class),"title"in e&&o(1,c=e.title),"label"in e&&o(2,d=e.label),"labelClass"in e&&o(3,u=e.labelClass),"innerClass"in e&&o(4,h=e.innerClass),"hideLabel"in e&&o(5,p=e.hideLabel),"icon"in e&&o(6,m=e.icon),"name"in e&&o(7,g=e.name),"options"in e&&o(8,$=e.options),"selectedIndex"in e&&o(9,f=e.selectedIndex),"value"in e&&o(10,y=e.value),"optionLabelClass"in e&&o(11,b=e.optionLabelClass),"optionFilter"in e&&o(12,x=e.optionFilter),"optionMapper"in e&&o(13,v=e.optionMapper),"optionIconStyle"in e&&o(14,w=e.optionIconStyle),"optionLabelStyle"in e&&o(15,S=e.optionLabelStyle),"locale"in e&&o(16,k=e.locale),"onchange"in e&&o(17,C=e.onchange),"onload"in e&&o(25,T=e.onload),"ondestroy"in e&&o(26,M=e.ondestroy),"enableInput"in e&&o(18,R=e.enableInput),"$$scope"in e&&o(29,s=e.$$scope)},e.$$.update=()=>{65792&e.$$.dirty[0]&&o(19,i=k?pu($,k):$),525312&e.$$.dirty[0]&&o(21,r=i.reduce(((e,t)=>{if(e)return e;const o=Array.isArray(t)?t:[t,t],[i,r]=o;return mu(i,y)?r:void 0}),void 0)||(e=>{const t=e.find((e=>void 0===e[0]));if(t)return t[1]})(i)||y)},[l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,R,i,P,r,e=>{o(21,r=e.value),C(e),o(20,P=!1)},({e:e,panel:t})=>{if(e&&e.key&&/up|down/i.test(e.key))return jd(t.querySelector("input:not([disabled])"));jd(t.querySelector("fieldset"))},e=>{/tab/i.test(e.key)&&e.preventDefault()},T,M,n,function(e){P=e,o(20,P)},s]}class lh extends Fa{constructor(e){super(),za(this,e,sh,rh,Qr,{class:0,title:1,label:2,labelClass:3,innerClass:4,hideLabel:5,icon:6,name:7,options:8,selectedIndex:9,value:10,optionLabelClass:11,optionFilter:12,optionMapper:13,optionIconStyle:14,optionLabelStyle:15,locale:16,onchange:17,onload:25,ondestroy:26,enableInput:18},null,[-1,-1])}}function ch(e){let t;return{c(){t=kn("div"),An(t,"slot","details")},m(o,i){wn(o,t,i),e[14](t)},p:Gr,d(o){o&&Sn(t),e[14](null)}}}function dh(e){let t,o,i;function r(t){e[15](t)}let n={buttonLabel:e[0],buttonClass:e[1],buttonIcon:e[2],buttonHideLabel:e[3],buttonTitle:e[4],buttonLabelClass:e[5],onshow:e[6],onhide:e[7],$$slots:{details:[ch]},$$scope:{ctx:e}};return void 0!==e[9]&&(n.isActive=e[9]),t=new ru({props:n}),ta.push((()=>Ea(t,"isActive",r))),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,[i]){const r={};1&i&&(r.buttonLabel=e[0]),2&i&&(r.buttonClass=e[1]),4&i&&(r.buttonIcon=e[2]),8&i&&(r.buttonHideLabel=e[3]),16&i&&(r.buttonTitle=e[4]),32&i&&(r.buttonLabelClass=e[5]),64&i&&(r.onshow=e[6]),128&i&&(r.onhide=e[7]),65792&i&&(r.$$scope={dirty:i,ctx:e}),!o&&512&i&&(o=!0,r.isActive=e[9],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function uh(e,t,o){let{buttonLabel:i}=t,{buttonClass:r}=t,{buttonIcon:n}=t,{buttonHideLabel:s}=t,{buttonTitle:l}=t,{buttonLabelClass:c}=t,{root:d}=t,{ondestroy:u=a}=t,{onshow:h=a}=t,{onhide:p=a}=t;let m,g=!1;return Yn(u),e.$$set=e=>{"buttonLabel"in e&&o(0,i=e.buttonLabel),"buttonClass"in e&&o(1,r=e.buttonClass),"buttonIcon"in e&&o(2,n=e.buttonIcon),"buttonHideLabel"in e&&o(3,s=e.buttonHideLabel),"buttonTitle"in e&&o(4,l=e.buttonTitle),"buttonLabelClass"in e&&o(5,c=e.buttonLabelClass),"root"in e&&o(10,d=e.root),"ondestroy"in e&&o(11,u=e.ondestroy),"onshow"in e&&o(6,h=e.onshow),"onhide"in e&&o(7,p=e.onhide)},e.$$.update=()=>{1280&e.$$.dirty&&m&&d&&m.firstChild!==d&&(m.hasChildNodes()?m.replaceChild(d,m.firstChild):m.append(d))},[i,r,n,s,l,c,h,p,m,g,d,u,()=>o(9,g=!1),()=>o(9,g=!0),function(e){ta[e?"unshift":"push"]((()=>{m=e,o(8,m)}))},function(e){g=e,o(9,g)}]}class hh extends Fa{constructor(e){super(),za(this,e,uh,dh,Qr,{buttonLabel:0,buttonClass:1,buttonIcon:2,buttonHideLabel:3,buttonTitle:4,buttonLabelClass:5,root:10,ondestroy:11,onshow:6,onhide:7,hide:12,show:13})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}}var ph=(e,t,o)=>(e-t)/(o-t);const mh=e=>({}),gh=e=>({});function $h(e){let t,o,i,r,n,a,s,l;return o=new td({props:{$$slots:{default:[fh]},$$scope:{ctx:e}}}),n=new td({props:{$$slots:{default:[yh]},$$scope:{ctx:e}}}),{c(){t=kn("button"),Ia(o.$$.fragment),i=Mn(),r=kn("button"),Ia(n.$$.fragment),An(t,"type","button"),An(t,"aria-label","Increase"),An(r,"type","button"),An(r,"aria-label","Decrease")},m(c,d){wn(c,t,d),Aa(o,t,null),wn(c,i,d),wn(c,r,d),Aa(n,r,null),a=!0,s||(l=[Pn(t,"pointerdown",e[20](1)),Pn(r,"pointerdown",e[20](-1))],s=!0)},p(e,t){const i={};128&t[1]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i);const r={};128&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){a||(xa(o.$$.fragment,e),xa(n.$$.fragment,e),a=!0)},o(e){va(o.$$.fragment,e),va(n.$$.fragment,e),a=!1},d(e){e&&Sn(t),La(o),e&&Sn(i),e&&Sn(r),La(n),s=!1,Kr(l)}}}function fh(e){let t;return{c(){t=Cn("path"),An(t,"d","M8 12 h8 M12 8 v8")},m(e,o){wn(e,t,o)},p:Gr,d(e){e&&Sn(t)}}}function yh(e){let t;return{c(){t=Cn("path"),An(t,"d","M9 12 h6")},m(e,o){wn(e,t,o)},p:Gr,d(e){e&&Sn(t)}}}function bh(e){let t,o,i,r,n,a,s,l,c,d,u,h,p,m,g,$,f;const y=e[36].default,b=rn(y,e,e[38],null),x=e[36].knob,v=rn(x,e,e[38],gh);let w=e[9]&&$h(e);return{c(){t=kn("div"),o=kn("div"),i=kn("input"),n=Mn(),a=kn("div"),b&&b.c(),l=Mn(),c=kn("div"),d=kn("div"),v&&v.c(),p=Mn(),w&&w.c(),An(i,"type","range"),An(i,"id",e[3]),An(i,"min",e[0]),An(i,"max",e[1]),An(i,"step",e[2]),i.value=e[14],An(i,"style",r=e[10]?"pointer-events:none":""),An(a,"class",s=Mc(["PinturaSliderTrack",e[5]])),An(a,"style",e[4]),An(d,"class",u=Mc(["PinturaSliderKnob",e[7]])),An(d,"style",e[6]),An(c,"class","PinturaSliderKnobController"),An(c,"style",e[17]),An(o,"class","PinturaSliderControl"),An(o,"style",h="--slider-position:"+Math.round(e[15])),An(t,"class",m=Mc(["PinturaSlider",e[12]])),An(t,"data-direction",e[8])},m(r,s){wn(r,t,s),bn(t,o),bn(o,i),e[37](i),bn(o,n),bn(o,a),b&&b.m(a,null),bn(o,l),bn(o,c),bn(c,d),v&&v.m(d,null),bn(t,p),w&&w.m(t,null),g=!0,$||(f=[Pn(i,"input",e[18]),Pn(i,"nudge",e[19]),hn(pd.call(null,i)),Pn(o,"pointerdown",(function(){Jr(e[11]&&e[13])&&(e[11]&&e[13]).apply(this,arguments)}))],$=!0)},p(n,l){e=n,(!g||8&l[0])&&An(i,"id",e[3]),(!g||1&l[0])&&An(i,"min",e[0]),(!g||2&l[0])&&An(i,"max",e[1]),(!g||4&l[0])&&An(i,"step",e[2]),(!g||16384&l[0])&&(i.value=e[14]),(!g||1024&l[0]&&r!==(r=e[10]?"pointer-events:none":""))&&An(i,"style",r),b&&b.p&&(!g||128&l[1])&&sn(b,y,e,e[38],g?an(y,e[38],l,null):ln(e[38]),null),(!g||32&l[0]&&s!==(s=Mc(["PinturaSliderTrack",e[5]])))&&An(a,"class",s),(!g||16&l[0])&&An(a,"style",e[4]),v&&v.p&&(!g||128&l[1])&&sn(v,x,e,e[38],g?an(x,e[38],l,mh):ln(e[38]),gh),(!g||128&l[0]&&u!==(u=Mc(["PinturaSliderKnob",e[7]])))&&An(d,"class",u),(!g||64&l[0])&&An(d,"style",e[6]),(!g||131072&l[0])&&An(c,"style",e[17]),(!g||32768&l[0]&&h!==(h="--slider-position:"+Math.round(e[15])))&&An(o,"style",h),e[9]?w?(w.p(e,l),512&l[0]&&xa(w,1)):(w=$h(e),w.c(),xa(w,1),w.m(t,null)):w&&(ya(),va(w,1,1,(()=>{w=null})),ba()),(!g||4096&l[0]&&m!==(m=Mc(["PinturaSlider",e[12]])))&&An(t,"class",m),(!g||256&l[0])&&An(t,"data-direction",e[8])},i(e){g||(xa(b,e),xa(v,e),xa(w),g=!0)},o(e){va(b,e),va(v,e),va(w),g=!1},d(o){o&&Sn(t),e[37](null),b&&b.d(o),v&&v.d(o),w&&w.d(),$=!1,Kr(f)}}}function xh(e,t,o){let i,r,n,s,l,c,d,u,h,p,m,g,$,f,y,{$$slots:b={},$$scope:x}=t,{min:v=0}=t,{max:w=100}=t,{step:S=1}=t,{id:k}=t,{value:C=0}=t,{valueMin:T}=t,{valueMax:M}=t,{trackStyle:P}=t,{trackClass:E}=t,{knobStyle:I}=t,{knobClass:A}=t,{ongrab:L=a}=t,{onchange:z=a}=t,{onrelease:F=a}=t,{onexceed:D=a}=t,{direction:O="x"}=t,{getValue:B=G}=t,{setValue:W=G}=t,{enableSpinButtons:_=!0}=t,{enableForceUseKnob:V=!1}=t,{enableStopPropagation:N=!0}=t,{enablePointerdownListener:H=!0}=t,{maxInteractionDistance:j=6}=t,{class:U}=t;const Z=e=>W(((e,t)=>(t=1/t,Math.round(e*t)/t))(ns(e,v,w),S),C),X=(e,t,i={})=>{const{grabbed:n=!1,released:a=!1}=i,s=Z(v+e/t*r),l=T||v,c=M||w;o(21,C=R(s)?s:ns(s,l,c)),y!==s&&(y=s,!R(s)&&(sc)&&D(C,s),C!==f&&(f=C,n&&L(C),z(C),a&&F(C)))};let Y;const q=e=>{const t=e[u]-$;X(g+t,m)},K=e=>{m=void 0,document.documentElement.removeEventListener("pointermove",q),document.documentElement.removeEventListener("pointerup",K),z(C),F(C)},J=()=>{o(21,C=Z(i+ee*S)),z(C)};let Q,ee=1,te=!1;const oe=e=>{clearTimeout(Q),te||J(),F(C),document.removeEventListener("pointerup",oe)};return e.$$set=e=>{"min"in e&&o(0,v=e.min),"max"in e&&o(1,w=e.max),"step"in e&&o(2,S=e.step),"id"in e&&o(3,k=e.id),"value"in e&&o(21,C=e.value),"valueMin"in e&&o(22,T=e.valueMin),"valueMax"in e&&o(23,M=e.valueMax),"trackStyle"in e&&o(4,P=e.trackStyle),"trackClass"in e&&o(5,E=e.trackClass),"knobStyle"in e&&o(6,I=e.knobStyle),"knobClass"in e&&o(7,A=e.knobClass),"ongrab"in e&&o(24,L=e.ongrab),"onchange"in e&&o(25,z=e.onchange),"onrelease"in e&&o(26,F=e.onrelease),"onexceed"in e&&o(27,D=e.onexceed),"direction"in e&&o(8,O=e.direction),"getValue"in e&&o(28,B=e.getValue),"setValue"in e&&o(29,W=e.setValue),"enableSpinButtons"in e&&o(9,_=e.enableSpinButtons),"enableForceUseKnob"in e&&o(10,V=e.enableForceUseKnob),"enableStopPropagation"in e&&o(30,N=e.enableStopPropagation),"enablePointerdownListener"in e&&o(11,H=e.enablePointerdownListener),"maxInteractionDistance"in e&&o(31,j=e.maxInteractionDistance),"class"in e&&o(12,U=e.class),"$$scope"in e&&o(38,x=e.$$scope)},e.$$.update=()=>{270532608&e.$$.dirty[0]&&o(14,i=void 0!==C?B(C):0),3&e.$$.dirty[0]&&(r=w-v),16387&e.$$.dirty[0]&&o(33,n=ph(i,v,w)),4&e.$$.dirty[1]&&o(15,s=100*n),256&e.$$.dirty[0]&&o(34,l=O.toUpperCase()),256&e.$$.dirty[0]&&o(35,c="x"===O?"Width":"Height"),16&e.$$.dirty[1]&&(d="offset"+c),e.$$.dirty[1],8&e.$$.dirty[1]&&(u="page"+l),32768&e.$$.dirty[0]|8&e.$$.dirty[1]&&o(17,h=`transform: translate${l}(${s}%)`)},[v,w,S,k,P,E,I,A,O,_,V,H,U,e=>{let t=!1;N&&e.stopPropagation(),clearTimeout(Y);const o=p.getBoundingClientRect();if(m=p[d],$=e[u],g=$-o[O],V){if(Math.abs(g-n*m)>j)return;t=!0,e.stopPropagation()}return document.activeElement!==p&&p.focus(),X(g,m,{grabbed:!0}),document.documentElement.addEventListener("pointermove",q),document.documentElement.addEventListener("pointerup",K),t},i,s,p,h,e=>{m||(o(21,C=W(parseFloat(e.target.value))),C!==f&&(f=C,z(C)))},e=>{const t=p[d];X(i/r*t+e.detail[O],t),clearTimeout(Y),Y=setTimeout((()=>{F(C)}),250)},e=>t=>{clearTimeout(Y),ee=e,te=!1,Q=setInterval((()=>{te=!0,J()}),100),document.addEventListener("pointercancel",oe),document.addEventListener("pointerup",oe)},C,T,M,L,z,F,D,B,W,N,j,e=>{const t=p.getBoundingClientRect(),o=e[u]-t[O],i=p[d];return Math.abs(o-n*i)},n,l,c,b,function(e){ta[e?"unshift":"push"]((()=>{p=e,o(16,p)}))},x]}class vh extends Fa{constructor(e){super(),za(this,e,xh,bh,Qr,{min:0,max:1,step:2,id:3,value:21,valueMin:22,valueMax:23,trackStyle:4,trackClass:5,knobStyle:6,knobClass:7,ongrab:24,onchange:25,onrelease:26,onexceed:27,direction:8,getValue:28,setValue:29,enableSpinButtons:9,enableForceUseKnob:10,enableStopPropagation:30,enablePointerdownListener:11,maxInteractionDistance:31,class:12,eventDistanceToKnob:32,handlePointerDown:13},null,[-1,-1])}get eventDistanceToKnob(){return this.$$.ctx[32]}get handlePointerDown(){return this.$$.ctx[13]}}function wh(e){let t,o;return t=new td({props:{class:"PinturaButtonIcon",$$slots:{default:[Sh]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1048580&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Sh(e){let t;return{c(){t=Cn("g")},m(o,i){wn(o,t,i),t.innerHTML=e[2]},p(e,o){4&o&&(t.innerHTML=e[2])},d(e){e&&Sn(t)}}}function kh(e){let t,o,i=uu(e[8],e[6])+"";return{c(){t=kn("span"),o=Tn(i),An(t,"class","PinturaButtonLabelPrefix")},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){320&t&&i!==(i=uu(e[8],e[6])+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Ch(e){let t,o,i,r,n,a,s,l,c,d=e[2]&&wh(e),u=e[8]&&kh(e);return{c(){t=kn("span"),d&&d.c(),o=Mn(),u&&u.c(),i=Mn(),r=kn("span"),n=Tn(e[9]),An(r,"class",a=Mc(["PinturaButtonLabel",e[3],e[5]&&"implicit"])),An(t,"slot","label"),An(t,"title",s=uu(e[1],e[6])),An(t,"class",l=Mc(["PinturaButtonInner",e[4]]))},m(e,a){wn(e,t,a),d&&d.m(t,null),bn(t,o),u&&u.m(t,null),bn(t,i),bn(t,r),bn(r,n),c=!0},p(e,h){e[2]?d?(d.p(e,h),4&h&&xa(d,1)):(d=wh(e),d.c(),xa(d,1),d.m(t,o)):d&&(ya(),va(d,1,1,(()=>{d=null})),ba()),e[8]?u?u.p(e,h):(u=kh(e),u.c(),u.m(t,i)):u&&(u.d(1),u=null),(!c||512&h)&&Fn(n,e[9]),(!c||40&h&&a!==(a=Mc(["PinturaButtonLabel",e[3],e[5]&&"implicit"])))&&An(r,"class",a),(!c||66&h&&s!==(s=uu(e[1],e[6])))&&An(t,"title",s),(!c||16&h&&l!==(l=Mc(["PinturaButtonInner",e[4]])))&&An(t,"class",l)},i(e){c||(xa(d),c=!0)},o(e){va(d),c=!1},d(e){e&&Sn(t),d&&d.d(),u&&u.d()}}}function Th(e){let t,o,i,r,n;const a=[e[12],{value:e[7]},{onchange:e[11]}];let s={};for(let e=0;eo(9,x=(e=>P(l)?l(b(e),f,y,e):l)(e));return e.$$set=e=>{t=Xr(Xr({},t),cn(e)),o(12,r=dn(t,i)),"class"in e&&o(0,n=e.class),"title"in e&&o(1,s=e.title),"label"in e&&o(13,l=e.label),"icon"in e&&o(2,c=e.icon),"labelClass"in e&&o(3,d=e.labelClass),"innerClass"in e&&o(4,u=e.innerClass),"hideLabel"in e&&o(5,h=e.hideLabel),"locale"in e&&o(6,p=e.locale),"value"in e&&o(7,m=e.value),"onchange"in e&&o(14,g=e.onchange),"labelPrefix"in e&&o(8,$=e.labelPrefix)},e.$$.update=()=>{8320&e.$$.dirty&&v(m)},[n,s,c,d,u,h,p,m,$,x,e=>{/tab/i.test(e.key)&&e.preventDefault()},e=>{v(e),g(e)},r,l,g]}class Ph extends Fa{constructor(e){super(),za(this,e,Rh,Mh,Qr,{class:0,title:1,label:13,icon:2,labelClass:3,innerClass:4,hideLabel:5,locale:6,value:7,onchange:14,labelPrefix:8})}}function Eh(e){let t,o,i=uu(e[0],e[1])+"";return{c(){t=kn("span"),o=Tn(i),An(t,"class",e[3])},m(e,i){wn(e,t,i),bn(t,o)},p(e,r){3&r&&i!==(i=uu(e[0],e[1])+"")&&Fn(o,i),8&r&&An(t,"class",e[3])},d(e){e&&Sn(t)}}}function Ih(e){let t,o,i,r,n=e[0]&&Eh(e);return i=new up({props:{items:e[2]}}),{c(){t=kn("li"),n&&n.c(),o=Mn(),Ia(i.$$.fragment),An(t,"class","PinturaShapeStyle")},m(e,a){wn(e,t,a),n&&n.m(t,null),bn(t,o),Aa(i,t,null),r=!0},p(e,[r]){e[0]?n?n.p(e,r):(n=Eh(e),n.c(),n.m(t,o)):n&&(n.d(1),n=null);const a={};4&r&&(a.items=e[2]),i.$set(a)},i(e){r||(xa(i.$$.fragment,e),r=!0)},o(e){va(i.$$.fragment,e),r=!1},d(e){e&&Sn(t),n&&n.d(),La(i)}}}function Ah(e,t,o){let i,{title:r}=t,{locale:n}=t,{items:a}=t,{hideTitle:s=!1}=t;return e.$$set=e=>{"title"in e&&o(0,r=e.title),"locale"in e&&o(1,n=e.locale),"items"in e&&o(2,a=e.items),"hideTitle"in e&&o(4,s=e.hideTitle)},e.$$.update=()=>{16&e.$$.dirty&&o(3,i="PinturaShapeStyleLabel"+(s?" implicit":""))},[r,n,a,i,s]}class Lh extends Fa{constructor(e){super(),za(this,e,Ah,Ih,Qr,{title:0,locale:1,items:2,hideTitle:4})}}var zh=(e,t,o)=>{let i,r,n;const a=Math.floor(6*e),s=6*e-a,l=o*(1-t),c=o*(1-s*t),d=o*(1-(1-s)*t);switch(a%6){case 0:i=o,r=d,n=l;break;case 1:i=c,r=o,n=l;break;case 2:i=l,r=o,n=d;break;case 3:i=l,r=c,n=o;break;case 4:i=d,r=l,n=o;break;case 5:i=o,r=l,n=c}return[i,r,n]};function Fh(e){let t,o,i;return{c(){t=kn("div"),o=kn("span"),An(t,"class","PinturaColorPreview"),An(t,"title",e[0]),An(t,"style",i="--color:"+e[1])},m(e,i){wn(e,t,i),bn(t,o)},p(e,[o]){1&o&&An(t,"title",e[0]),2&o&&i!==(i="--color:"+e[1])&&An(t,"style",i)},i:Gr,o:Gr,d(e){e&&Sn(t)}}}function Dh(e,t,o){let i,{color:r}=t,{title:n}=t;return e.$$set=e=>{"color"in e&&o(2,r=e.color),"title"in e&&o(0,n=e.title)},e.$$.update=()=>{4&e.$$.dirty&&o(1,i=r?Ho(r):"transparent")},[n,i,r]}class Oh extends Fa{constructor(e){super(),za(this,e,Dh,Fh,Qr,{color:2,title:0})}}var Bh=e=>(e=e.trim(),/^rgba/.test(e)?e.substr(5).split(",").map(parseFloat).map(((e,t)=>e/(3===t?1:255))):/^rgb/.test(e)?e.substr(4).split(",").map(parseFloat).map((e=>e/255)):/^#/.test(e)?(e=>{const[,t,o,i,r]=e.split("");e=e.length>=4&&e.length<=5?`#${t}${t}${o}${o}${i}${i}${r?`${r}${r}`:""}`:e;const[n,a,s,l,c]=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e)||[];if(n)return[a,s,l,c].filter((e=>void 0!==e)).map((e=>parseInt(e,16)/255))})(e):/[0-9]{1,3}\s?,\s?[0-9]{1,3}\s?,\s?[0-9]{1,3}/.test(e)?e.split(",").map((e=>parseInt(e,10))).map((e=>e/255)):void 0);function Wh(e){let t,o;return{c(){t=kn("span"),o=Tn(e[0])},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){1&t[0]&&Fn(o,e[0])},d(e){e&&Sn(t)}}}function _h(e){let t,o,i,r;o=new Oh({props:{color:e[4],title:uu(e[8],e[10])}});let n=!e[9]&&Wh(e);return{c(){t=kn("span"),Ia(o.$$.fragment),i=Mn(),n&&n.c(),An(t,"slot","label"),An(t,"class","PinturaButtonLabel")},m(e,a){wn(e,t,a),Aa(o,t,null),bn(t,i),n&&n.m(t,null),r=!0},p(e,i){const r={};16&i[0]&&(r.color=e[4]),1280&i[0]&&(r.title=uu(e[8],e[10])),o.$set(r),e[9]?n&&(n.d(1),n=null):n?n.p(e,i):(n=Wh(e),n.c(),n.m(t,null))},i(e){r||(xa(o.$$.fragment,e),r=!0)},o(e){va(o.$$.fragment,e),r=!1},d(e){e&&Sn(t),La(o),n&&n.d()}}}function Vh(e){let t,o,i,r,n,a,s,l,c,d,u,h,p,m;c=new vh({props:{class:"PinturaHuePicker",knobStyle:"background-color:"+e[20],onchange:e[26],value:e[15],min:0,max:1,step:.01}});let g=e[11]&&Nh(e),$=e[14]&&Hh(e);return{c(){t=kn("div"),o=kn("div"),i=kn("div"),r=kn("div"),l=Mn(),Ia(c.$$.fragment),d=Mn(),g&&g.c(),u=Mn(),$&&$.c(),An(r,"role","button"),An(r,"aria-label","Saturation slider"),An(r,"class","PinturaPickerKnob"),An(r,"tabindex","0"),An(r,"style",n=`background-color:${e[19]};`),An(i,"class","PinturaPickerKnobController"),An(i,"style",a=`transform:translate(${e[24]}%,${e[23]}%)`),An(o,"class","PinturaSaturationPicker"),An(o,"style",s="background-color: "+e[20]),An(t,"class","PinturaPicker")},m(n,a){wn(n,t,a),bn(t,o),bn(o,i),bn(i,r),e[37](o),bn(t,l),Aa(c,t,null),bn(t,d),g&&g.m(t,null),bn(t,u),$&&$.m(t,null),h=!0,p||(m=[Pn(r,"nudge",e[29]),hn(pd.call(null,r,{preventDefault:!0})),Pn(o,"pointerdown",e[28])],p=!0)},p(e,l){(!h||524288&l[0]&&n!==(n=`background-color:${e[19]};`))&&An(r,"style",n),(!h||25165824&l[0]&&a!==(a=`transform:translate(${e[24]}%,${e[23]}%)`))&&An(i,"style",a),(!h||1048576&l[0]&&s!==(s="background-color: "+e[20]))&&An(o,"style",s);const d={};1048576&l[0]&&(d.knobStyle="background-color:"+e[20]),32768&l[0]&&(d.value=e[15]),c.$set(d),e[11]?g?(g.p(e,l),2048&l[0]&&xa(g,1)):(g=Nh(e),g.c(),xa(g,1),g.m(t,u)):g&&(ya(),va(g,1,1,(()=>{g=null})),ba()),e[14]?$?$.p(e,l):($=Hh(e),$.c(),$.m(t,null)):$&&($.d(1),$=null)},i(e){h||(xa(c.$$.fragment,e),xa(g),h=!0)},o(e){va(c.$$.fragment,e),va(g),h=!1},d(o){o&&Sn(t),e[37](null),La(c),g&&g.d(),$&&$.d(),p=!1,Kr(m)}}}function Nh(e){let t,o;return t=new vh({props:{class:"PinturaOpacityPicker",knobStyle:"background-color:"+e[17],trackStyle:`background-image:linear-gradient(to right,${e[18]},${e[19]})`,onchange:e[27],value:e[16],min:0,max:1,step:.01}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};131072&o[0]&&(i.knobStyle="background-color:"+e[17]),786432&o[0]&&(i.trackStyle=`background-image:linear-gradient(to right,${e[18]},${e[19]})`),65536&o[0]&&(i.value=e[16]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Hh(e){let t,o,i;return{c(){t=kn("input"),An(t,"class","PinturaColorPickerInput"),An(t,"type","text"),t.value=e[22]},m(r,n){wn(r,t,n),o||(i=Pn(t,"input",e[30]),o=!0)},p(e,o){4194304&o[0]&&t.value!==e[22]&&(t.value=e[22])},d(e){e&&Sn(t),o=!1,i()}}}function jh(e){let t,o;return t=new Wu({props:{label:uu(e[10].labelColorPalette,e[10]),class:Mc(["PinturaColorPresets",e[9]?"PinturaColorPresetsGrid":"PinturaColorPresetsList"]),hideLabel:!1,name:e[1],value:e[4],optionGroupClass:"PinturaListOptionGroup",optionClass:"PinturaListOption",options:e[2].map(e[38]),selectedIndex:e[3],optionMapper:e[7],optionLabelClass:e[6],onchange:e[39],$$slots:{option:[Zh,({option:e})=>({51:e}),({option:e})=>[0,e?1048576:0]],group:[Uh,({option:e})=>({51:e}),({option:e})=>[0,e?1048576:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1024&o[0]&&(i.label=uu(e[10].labelColorPalette,e[10])),512&o[0]&&(i.class=Mc(["PinturaColorPresets",e[9]?"PinturaColorPresetsGrid":"PinturaColorPresetsList"])),2&o[0]&&(i.name=e[1]),16&o[0]&&(i.value=e[4]),1028&o[0]&&(i.options=e[2].map(e[38])),8&o[0]&&(i.selectedIndex=e[3]),128&o[0]&&(i.optionMapper=e[7]),64&o[0]&&(i.optionLabelClass=e[6]),512&o[0]|3145728&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Uh(e){let t,o,i=e[51].label+"";return{c(){t=kn("span"),o=Tn(i),An(t,"slot","group")},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){1048576&t[1]&&i!==(i=e[51].label+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Gh(e){let t,o,i=e[51].label+"";return{c(){t=kn("span"),o=Tn(i),An(t,"class","PinturaButtonLabel")},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){1048576&t[1]&&i!==(i=e[51].label+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Zh(e){let t,o,i,r;o=new Oh({props:{title:e[51].label,color:e[51].value}});let n=!e[9]&&Gh(e);return{c(){t=kn("span"),Ia(o.$$.fragment),i=Mn(),n&&n.c(),An(t,"slot","option")},m(e,a){wn(e,t,a),Aa(o,t,null),bn(t,i),n&&n.m(t,null),r=!0},p(e,i){const r={};1048576&i[1]&&(r.title=e[51].label),1048576&i[1]&&(r.color=e[51].value),o.$set(r),e[9]?n&&(n.d(1),n=null):n?n.p(e,i):(n=Gh(e),n.c(),n.m(t,null))},i(e){r||(xa(o.$$.fragment,e),r=!0)},o(e){va(o.$$.fragment,e),r=!1},d(e){e&&Sn(t),La(o),n&&n.d()}}}function Xh(e){let t,o,i,r=e[13]&&Vh(e),n=e[12]&&jh(e);return{c(){t=kn("div"),r&&r.c(),o=Mn(),n&&n.c(),An(t,"slot","details"),An(t,"class","PinturaColorPickerPanel")},m(e,a){wn(e,t,a),r&&r.m(t,null),bn(t,o),n&&n.m(t,null),i=!0},p(e,i){e[13]?r?(r.p(e,i),8192&i[0]&&xa(r,1)):(r=Vh(e),r.c(),xa(r,1),r.m(t,o)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[12]?n?(n.p(e,i),4096&i[0]&&xa(n,1)):(n=jh(e),n.c(),xa(n,1),n.m(t,null)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){e&&Sn(t),r&&r.d(),n&&n.d()}}}function Yh(e){let t,o;return t=new ru({props:{buttonClass:Mc(["PinturaColorPickerButton",e[5]]),$$slots:{details:[Xh],label:[_h]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};32&o[0]&&(i.buttonClass=Mc(["PinturaColorPickerButton",e[5]])),33554399&o[0]|2097152&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function qh(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,{label:f}=t,{name:y}=t,{options:b=[]}=t,{selectedIndex:x=-1}=t,{value:v}=t,{buttonClass:w}=t,{optionLabelClass:S}=t,{optionMapper:k}=t,{onchange:C}=t,{title:T}=t,{hidePresetLabel:M=!0}=t,{locale:R}=t,{enableOpacity:E=!0}=t,{enablePresets:I=!0}=t,{enablePicker:A=!0}=t,{enableInput:L=!1}=t;const z=(e,t)=>{if(u=[e[0],e[1],e[2]],t){let t=((e,t,o)=>{let i=Math.max(e,t,o),r=i-Math.min(e,t,o),n=r&&(i==e?(t-o)/r:i==t?2+(o-e)/r:4+(e-t)/r);return[60*(n<0?n+6:n)/360,i&&r/i,i]})(...u);o(15,s=t[0]),o(32,l=t[1]),o(33,c=t[2]),o(16,d=Ao(e[3])?e[3]:1)}o(17,h=Ho(e)),o(18,p=Ho([...u,0])),o(19,m=Ho([...u,1])),o(20,g=Ho(zh(s,1,1)))},F=()=>{const e=[...zh(s,l,c),d];z(e),C(e)},D=e=>{const t=3===e.length?[...e,1]:e;z(t,!0),C(t)},O=(e,t)=>{const i=ns(e.x/t.width,0,1),r=ns(e.y/t.height,0,1);var n;n=1-r,o(32,l=i),o(33,c=n),0===d&&o(16,d=1),F()};let B,W,_,V;const N=e=>{const t=we(he(e),V);O(ve(pe(_),t),W)},H=e=>{W=void 0,document.documentElement.removeEventListener("pointermove",N),document.documentElement.removeEventListener("pointerup",H)};let j;return e.$$set=e=>{"label"in e&&o(0,f=e.label),"name"in e&&o(1,y=e.name),"options"in e&&o(2,b=e.options),"selectedIndex"in e&&o(3,x=e.selectedIndex),"value"in e&&o(4,v=e.value),"buttonClass"in e&&o(5,w=e.buttonClass),"optionLabelClass"in e&&o(6,S=e.optionLabelClass),"optionMapper"in e&&o(7,k=e.optionMapper),"onchange"in e&&o(31,C=e.onchange),"title"in e&&o(8,T=e.title),"hidePresetLabel"in e&&o(9,M=e.hidePresetLabel),"locale"in e&&o(10,R=e.locale),"enableOpacity"in e&&o(11,E=e.enableOpacity),"enablePresets"in e&&o(12,I=e.enablePresets),"enablePicker"in e&&o(13,A=e.enablePicker),"enableInput"in e&&o(14,L=e.enableInput)},e.$$.update=()=>{16&e.$$.dirty[0]|8&e.$$.dirty[1]&&(!v||$&&ds(v,$)||(o(34,$=[...v]),z(v,!0))),2&e.$$.dirty[1]&&o(24,i=100*l),4&e.$$.dirty[1]&&o(23,r=100-100*c),16&e.$$.dirty[1]&&o(36,n=!!j&&(j.length>=4&&j.length<=5)),18448&e.$$.dirty[0]|32&e.$$.dirty[1]&&o(22,a=L&&v?((e,t,o)=>{let i=e.map((e=>Math.round(255*e).toString(16).toLowerCase().padStart(2,"0")));return(!t&&i.length>3||"ff"===i[3])&&i.pop(),o&&(i=i.map((e=>e.substring(0,1)))),"#"+i.join("")})(v,E,n):void 0)},[f,y,b,x,v,w,S,k,T,M,R,E,I,A,L,s,d,h,p,m,g,B,a,r,i,D,e=>{o(15,s=e),0===d&&o(16,d=1),F()},e=>{o(16,d=e),F()},e=>{e.stopPropagation(),W=We(B.offsetWidth,B.offsetHeight),_=(e=>ue(e.offsetX,e.offsetY))(e),V=he(e),O(_,W),document.documentElement.addEventListener("pointermove",N),document.documentElement.addEventListener("pointerup",H)},e=>{W=We(B.offsetWidth,B.offsetHeight);const t=i/100*W.width,o=r/100*W.height;O({x:t+e.detail.x,y:o+e.detail.y},W)},e=>{const{value:t}=e.target,i=t.length;if(!t.startsWith("#")||i<4||6===i||8===i||i>9)return;if(!E&&i>7)return;const r=Bh(t);r&&(o(35,j=t),z(r),C(r))},C,l,c,$,j,n,function(e){ta[e?"unshift":"push"]((()=>{B=e,o(21,B)}))},([e,t])=>[e,P(t)?t(R):t],e=>D(e.value)]}class Kh extends Fa{constructor(e){super(),za(this,e,qh,Yh,Qr,{label:0,name:1,options:2,selectedIndex:3,value:4,buttonClass:5,optionLabelClass:6,optionMapper:7,onchange:31,title:8,hidePresetLabel:9,locale:10,enableOpacity:11,enablePresets:12,enablePicker:13,enableInput:14},null,[-1,-1])}}function Jh(e){let t,o,i;return o=new up({props:{items:e[0]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaShorthandControl PinturaShapeStyle")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,[t]){const i={};1&t&&(i.items=e[0]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Qh(e,t,o){let i,r,{value:n}=t,{onchange:a}=t,{controls:s=[]}=t;return e.$$set=e=>{o(6,t=Xr(Xr({},t),cn(e))),"value"in e&&o(1,n=e.value),"onchange"in e&&o(2,a=e.onchange),"controls"in e&&o(3,s=e.controls)},e.$$.update=()=>{o(4,i=(e=>{const{controls:t,...o}=e;return o})(t)),30&e.$$.dirty&&o(0,r=s.map(((e,t)=>{const[o,r,s]=e;return[o,r,{...i,...s,value:n[t],onchange:e=>{const o=[...n];o[t]=e,a(o)}}]})))},t=cn(t),[r,n,a,s,i]}class ep extends Fa{constructor(e){super(),za(this,e,Qh,Jh,Qr,{value:1,onchange:2,controls:3})}}function tp(e,t,o){const i=e.slice();return i[9]=t[o][0],i[0]=t[o][1],i[10]=t[o][2],i[2]=t[o][3],i}function op(e){let t,o,i;const r=[e[10]];var n=e[3][e[9]]||e[9];function a(e){let t={};for(let e=0;e{La(e,1)})),ba()}n?(t=Wn(n,a()),Ia(t.$$.fragment),xa(t.$$.fragment,1),Aa(t,o.parentNode,o)):t=null}else n&&t.$set(s)},i(e){i||(t&&xa(t.$$.fragment,e),i=!0)},o(e){t&&va(t.$$.fragment,e),i=!1},d(e){e&&Sn(o),t&&La(t,e)}}}function ip(e){let t,o=e[9],i=e[9]&&sp(e);return{c(){i&&i.c(),t=Rn()},m(e,o){i&&i.m(e,o),wn(e,t,o)},p(e,r){e[9]?o?Qr(o,e[9])?(i.d(1),i=sp(e),i.c(),i.m(t.parentNode,t)):i.p(e,r):(i=sp(e),i.c(),i.m(t.parentNode,t)):o&&(i.d(1),i=null),o=e[9]},i:Gr,o(e){va(i)},d(e){e&&Sn(t),i&&i.d(e)}}}function rp(e){let t,o,i=e[10].innerHTML+"";return{c(){t=new Bn(!1),o=Rn(),t.a=o},m(e,r){t.m(i,e,r),wn(e,o,r)},p(e,o){4&o&&i!==(i=e[10].innerHTML+"")&&t.p(i)},i:Gr,o:Gr,d(e){e&&Sn(o),e&&t.d()}}}function np(e){let t,o=e[10].textContent+"";return{c(){t=Tn(o)},m(e,o){wn(e,t,o)},p(e,i){4&i&&o!==(o=e[10].textContent+"")&&Fn(t,o)},i:Gr,o:Gr,d(e){e&&Sn(t)}}}function ap(e){let t,o;return t=new up({props:{items:e[2],discardEmptyItems:!0}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};4&o&&(i.items=e[2]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function sp(e){let t,o,i,r,n;const a=[ap,np,rp],s=[];function l(e,t){return e[2]&&e[2].length?0:e[10].textContent?1:e[10].innerHTML?2:-1}~(o=l(e))&&(i=s[o]=a[o](e));let c=[e[4](e[10])],d={};for(let e=0;e{s[u]=null})),ba()),~o?(i=s[o],i?i.p(e,n):(i=s[o]=a[o](e),i.c()),xa(i,1),i.m(t,r)):i=null),d=Ra(c,[4&n&&e[4](e[10])]),/-/.test(e[9])?zn(t,d):Ln(t,d)},i(e){n||(xa(i),n=!0)},o(e){va(i),n=!1},d(e){e&&Sn(t),~o&&s[o].d()}}}function lp(e,t){let o,i,r,n,a,s;const l=[ip,op],c=[];function d(e,t){return 4&t&&(i=null),null==i&&(i=!e[5](e[9])),i?0:1}return r=d(t,-1),n=c[r]=l[r](t),{key:e,first:null,c(){o=Rn(),n.c(),a=Rn(),this.first=o},m(e,t){wn(e,o,t),c[r].m(e,t),wn(e,a,t),s=!0},p(e,o){let i=r;r=d(t=e,o),r===i?c[r].p(t,o):(ya(),va(c[i],1,1,(()=>{c[i]=null})),ba(),n=c[r],n?n.p(t,o):(n=c[r]=l[r](t),n.c()),xa(n,1),n.m(a.parentNode,a))},i(e){s||(xa(n),s=!0)},o(e){va(n),s=!1},d(e){e&&Sn(o),c[r].d(e),e&&Sn(a)}}}function cp(e){let t,o,i=[],r=new Map,n=e[2];const a=e=>e[0]+e[1];for(let t=0;t!R(e)||!!l[e],d=e=>{if(!e)return!1;const[t,,o,i=[]]=e;return!!c(t)||(i.some(d)||o.textContent||o.innerHTML)};return e.$$set=e=>{"items"in e&&o(6,n=e.items),"discardEmptyItems"in e&&o(7,a=e.discardEmptyItems),"key"in e&&o(0,s=e.key)},e.$$.update=()=>{1&e.$$.dirty&&o(1,i=s),192&e.$$.dirty&&o(2,r=(n&&a?n.filter(d):n)||[])},[s,i,r,l,(e={})=>{const{textContent:t,innerHTML:o,...i}=e;return i},c,n,a]}class up extends Fa{constructor(e){super(),za(this,e,dp,cp,Qr,{items:6,discardEmptyItems:7,key:0})}}let hp=null;var pp=e=>{if(null===hp&&(hp=u()&&"visualViewport"in window),!hp)return!1;const t=visualViewport.height,o=()=>{e(visualViewport.heightvisualViewport.removeEventListener("resize",o)};function mp(e){let t,o;const i=[{onclick:e[1]},e[3]];let r={};for(let e=0;e{c=null})),ba()),u&&u.p&&(!a||8388608&r[0])&&sn(u,d,e,e[23],a?an(d,e[23],r,null):ln(e[23]),null),e[2]?h?(h.p(e,r),4&r[0]&&xa(h,1)):(h=gp(e),h.c(),xa(h,1),h.m(o,null)):h&&(ya(),va(h,1,1,(()=>{h=null})),ba()),(!a||16&r[0])&&An(t,"data-layout",e[4]),(!a||64&r[0])&&An(t,"style",e[6])},i(e){a||(xa(c),xa(u,e),xa(h),a=!0)},o(e){va(c),va(u,e),va(h),a=!1},d(o){o&&Sn(t),c&&c.d(),u&&u.d(o),h&&h.d(),e[25](null),s=!1,Kr(l)}}}function fp(e,t,o){let i,r,n,a,s,{$$slots:l={},$$scope:c}=t,{onconfirm:d}=t,{oncancel:u}=t,{autoFocus:h=!0}=t,{autoPositionCursor:p=!0}=t,{buttonConfirm:m}=t,{buttonCancel:g}=t,{layout:$="stack"}=t,{parentRect:f}=t,{align:y}=t,{justify:b}=t,{parentMargin:x=16}=t,{panelOffset:w=de()}=t,S=!1,k=void 0,C=void 0,T="",M=0;const R=()=>{const e=s.querySelector("input, textarea");e.focus(),M>=1||e.select()},P=()=>{S=!0,I||!$o()&&!v()||o(19,T="top:1em;bottom:auto;"),$o()&&(e=>{let t;const o=e=>t=e.touches[0].screenY,i=e=>{const o=e.touches[0].screenY,i=e.target;/textarea/i.test(i.nodeName)?(o>t?0==i.scrollTop&&e.preventDefault():o{n?"hidden"!==e||S?(clearTimeout(C),C=void 0,o(19,T=`top:${visualViewport.height-k.height-w.y}px`),"visible"===e?(o(5,s.dataset.stick=!0,s),R(),P()):(S=!1,o(20,M=0))):R():o(19,T="top: 4.5em; bottom: auto")}));return Zn((()=>{h&&R()})),Yn((()=>{I&&I()})),e.$$set=e=>{"onconfirm"in e&&o(0,d=e.onconfirm),"oncancel"in e&&o(1,u=e.oncancel),"autoFocus"in e&&o(11,h=e.autoFocus),"autoPositionCursor"in e&&o(12,p=e.autoPositionCursor),"buttonConfirm"in e&&o(2,m=e.buttonConfirm),"buttonCancel"in e&&o(3,g=e.buttonCancel),"layout"in e&&o(4,$=e.layout),"parentRect"in e&&o(13,f=e.parentRect),"align"in e&&o(14,y=e.align),"justify"in e&&o(15,b=e.justify),"parentMargin"in e&&o(16,x=e.parentMargin),"panelOffset"in e&&o(17,w=e.panelOffset),"$$scope"in e&&o(23,c=e.$$scope)},e.$$.update=()=>{385024&e.$$.dirty[0]&&o(21,i=f&&k?((e,t,o,i,r)=>{let n,a;return n="center"===i?e.x+.5*e.width-.5*t.width:"right"===i?e.x+e.width-t.width-r:e.x+r,a="center"===o?e.y+.5*e.height-.5*t.height:"bottom"===o?e.y+e.height-t.height-r:e.y+r,`left:${n}px;top:${a}px;right:auto;bottom:auto;`})(f,k,y,b,x):void 0),32&e.$$.dirty[0]&&o(22,r=s&&getComputedStyle(s)),4194304&e.$$.dirty[0]&&(n=r&&"1"===r.getPropertyValue("--editor-modal")),3670016&e.$$.dirty[0]&&o(6,a=`opacity:${M};${i||T}`)},[d,u,m,g,$,s,a,e=>{var t;((e=>/textarea/i.test(e))(e.target)||Ud(e.target))&&(E=Date.now(),p&&((t=e.target).selectionStart=t.selectionEnd=t.value.length),clearTimeout(C),C=setTimeout(P,200))},e=>{Date.now()-E>50||(e.stopPropagation(),R())},({detail:e})=>{o(18,k={width:e.width,height:e.height})},e=>"Enter"===e.key?d():"Escape"===e.key?u():void 0,h,p,f,y,b,x,w,k,T,M,i,r,c,l,function(e){ta[e?"unshift":"push"]((()=>{s=e,o(5,s)}))}]}class yp extends Fa{constructor(e){super(),za(this,e,fp,$p,Qr,{onconfirm:0,oncancel:1,autoFocus:11,autoPositionCursor:12,buttonConfirm:2,buttonCancel:3,layout:4,parentRect:13,align:14,justify:15,parentMargin:16,panelOffset:17},null,[-1,-1])}}const bp=["aspectRatio","isRotatedSideways","flip","cropSize"],xp=gs.map((([e])=>e)).filter((e=>!bp.includes(e)));var vp=(e,t)=>new CustomEvent("ping",{detail:{type:e,data:t},cancelable:!0,bubbles:!0}),wp=(e,t)=>(t?dl(e,t):e).replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase(),Sp=(e,t=G)=>{const{subscribe:o,set:i}=Ba(void 0);return{subscribe:o,destroy:((e,t)=>{const o=matchMedia(e);return o.addListener(t),t(o),{get matches(){return o.matches},destroy:()=>o.removeListener(t)}})(e,(({matches:e})=>i(t(e)))).destroy}},kp=e=>/video/.test(e.type);var Cp=(e,t,o)=>new Promise(((i,r)=>{(async()=>{kp(e)&&i(await(e=>new Promise(((t,o)=>{const i=g("video");i.onseeked=()=>{const e=g("canvas");qt(i).then((({width:o,height:r})=>{e.width=o,e.height=r;const n=e.getContext("2d",{willReadFrequently:!0}),a=()=>{n.drawImage(i,0,0,e.width,e.height);const o=n.getImageData(0,0,e.width,e.height);f(e),URL.revokeObjectURL(i.src),t(o)};Xt()?setTimeout(a,16):a()}))},i.onloadeddata=()=>{i.currentTime=0},i.onerror=e=>{console.error(e),o(i.error)},i.src=URL.createObjectURL(e),i.load()})))(e));const n=await t.read(e),a=e=>D(e,o).then((e=>t.apply(e,n))).then(i).catch(r);if(A(e)||!I()||Xt()||$o())return a(e);let s;try{s=await F(((e,t)=>createImageBitmap(e).then((e=>t(null,e))).catch(t)),[e])}catch(e){}s&&s.width?await p()?Dl()&&n>1?i(await(async e=>m(await S(e)))(s)):i(s):i(t.apply(s,n)):a(e)})()})),Tp=(e,t)=>new Promise((async o=>{if(e.width{if(null===Mp){let e=g("canvas");Mp=!!Tl(e),f(e),e=void 0}return Mp};const Pp=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Ep={precision:1e-4},Ip={precision:.01*Ep.precision};var Ap=()=>{const e=[],t=[],o=[],i=()=>{t.forEach((e=>e(o)))},r=t=>{t.unsub=t.subscribe((r=>((t,r)=>{const n=e.indexOf(t);n<0||(o[n]=r,i())})(t,r))),i()};return{get length(){return e.length},clear:()=>{e.forEach((e=>e.unsub())),e.length=0,o.length=0},unshift:t=>{e.unshift(t),r(t)},get:t=>e[t],push:t=>{e.push(t),r(t)},remove:t=>{t.unsub();const i=e.indexOf(t);e.splice(i,1),o.splice(i,1)},forEach:t=>e.forEach(t),filter:t=>e.filter(t),subscribe:e=>(t.push(e),e(o),()=>{t.splice(t.indexOf(e),1)})}},Lp=e=>e[0]<.25&&e[1]<.25&&e[2]<.25,zp=(e={})=>new Promise((t=>{const{accept:o="image/*"}=e,i=g("input",{style:"position:absolute;visibility:hidden;width:0;height:0;",type:"file",accept:o}),r=()=>{const[e]=i.files;i.parentNode&&i.remove(),i.removeEventListener("change",r),t(e)};i.addEventListener("change",r),$o()&&document.body.append(i),i.click()})),Fp=e=>{try{return e()}catch(e){console.error(e)}},Dp=([e,t])=>e+.5*(t-e),Op=e=>Math.round(100*e),Bp=e=>ue(e.clientX,e.clientY),Wp=(e,t,o)=>{const i=Bp(e);return we(we(i,t),o)};function _p(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,{root:S}=t,{locale:k}=t,{stores:C}=t,{allowPan:T=!0}=t,{allowZoom:M=!0}=t,{enablePan:R=!0}=t,{enableZoom:P=!0}=t,{enableZoomControls:E=P}=t,{enableZoomInput:I=!0}=t,{enablePanInput:A=!0}=t,{enablePanLimit:L=!0}=t,{panLimitGutterScalar:z=0}=t,{zoomOptions:F=[.25,.5,1,1.25,1.5,2,3,4,6,8,16]}=t,{zoomAdjustStep:D=.25}=t,{zoomAdjustFactor:O=.1}=t,{zoomAdjustWheelFactor:B=1}=t,{elasticity:W=5}=t,{imageSelectionRectCentered:_}=t,{imageSelectionRectScalar:V}=t,{zoomLevel:N=null}=t,{zoomControls:H}=t,{zoomMultiTouching:j=!1}=t;const{isAnimated:U,isInteracting:G,rootRect:Z,stageRect:X,stageScalar:Y,imageSelectionPan:q,imageSelectionZoom:K,imageSelectionStageFitScalar:J,imageSelectionRect:Q,imageSelectionStoredState:ee,imagePreviewUpscale:te}=C;on(e,U,(e=>o(68,v=e))),on(e,G,(e=>o(67,b=e))),on(e,Z,(e=>o(65,f=e))),on(e,X,(e=>o(64,$=e))),on(e,Y,(e=>o(45,x=e))),on(e,q,(e=>o(63,p=e))),on(e,K,(e=>o(42,h=e))),on(e,J,(e=>o(43,m=e))),on(e,Q,(e=>o(66,y=e))),on(e,ee,(e=>o(69,w=e))),on(e,te,(e=>o(44,g=e)));let oe=!1,ie=void 0,re=void 0,ne=void 0,ae=void 0;const se=e=>{const t=S.querySelector(".PinturaMain > .PinturaUtilMain")||S.querySelector('div[tabindex="0"] .PinturaUtilMain');return!!t&&(!!t.contains(e.target)&&!Gd(e.target))},le=(e={})=>{const{pan:t=p,zoom:o=h}=e;un(ee,w={translation:t,zoom:o},w)},ce=()=>p&&0===p.x&&0===p.y,he=()=>{un(K,h=void 0,h),ce()||un(q,p=de(),p),ge.set(void 0,{hard:!0})},me=()=>{he(),le()},ge=ec(void 0,{precision:.01});ge.subscribe((e=>{if(void 0===e)return un(K,h=void 0,h),void(ce()||un(q,p=de(),p));const t=h;e<=1?ce()||un(q,p=de(),p):e<=t&&un(q,p=ke(p,.8),p),un(K,h=e,h)}));const fe=e=>{ge.update((t=>{const o=e(t||m);return le({zoom:o}),o}))},ye=e=>{e?ge.set(e,{hard:!1===v}):(e=void 0,ge.set(void 0,{hard:!0})),un(K,h=e,h),le({zoom:e})},be=(e,t)=>{const o=V*t,i={..._},r=1-ns(z,0,1);lt(i,oi.x&&(a.x=i.x),n.y>i.y&&(a.y=i.y),n.x+n.width{if(!ie)return;let i=e;const r=ue(ie.x+i.x,ie.y+i.y);if(!L)return r;const n=be(r,t);return o?$d(n,r,W):n};let ve,Ce;const Te=()=>{Ce=void 0,un(G,b=!0,b),o(33,oe=A),ve=!1,ne=!1,ie={...p},re=g?h||m:n?h||1:h||m},Me=e=>{const{scalar:t,translation:r,isMultiTouching:n}=e.detail;if(!ie||!n&&!A)return;n&&ke(r,.5),(A||n)&&(ve=!0),j||o(12,j=n);const a=i?ns(re*t,s,l):1,c=xe({translation:r,zoom:a,elastify:!0}),d=$e(c);ae=$e(p),ne=d{un(G,b=!1,b),o(33,oe=!1),o(12,j=!1),ne&&ae<50&&(ie=void 0,re=void 0,q.set(de()))},Pe=e=>{un(G,b=!1,b),o(33,oe=!1),o(12,j=!1),Promise.resolve().then((()=>{if(ve&&ie){const t=Ce||e.detail,o=i?ns(re*t.scalar,s,l):1,r=xe({elastify:!1,translation:t.translation,zoom:o});q.set(r)}ie=void 0,re=void 0,A&&e.detail.isDoubleTap&&me(),le()}))};let Ee,Ie=Date.now(),Ae=0,Le=!1,ze=!1;const Fe=e=>{if(!se(e))return;if(e.preventDefault(),e.stopPropagation(),ze)return;clearTimeout(Ee);const t=yd(e),o=Date.now(),i=o-Ie;Ie=o;const r=Math.abs(t/i)>.2;Ae=r?Ae+1:0;const n=1+-1*t*B/(r?50:100),a=Wp(e,f,$);De(a,n,{isZoomingFast:r})},De=(e,t,{isZoomingFast:o})=>{const i=g?h||m:n?h||1:h||m,r=i*t,a=de(),c=p,d=g?m:n?1:m,u=Math.abs(r-d),$=rd&&$||ii,b=Ae>=5;if(o||(Le=!1),Ae>0&&!Le&&(Le=f),b&&Le)return me(),ze=!0,void setTimeout((()=>{ze=!1}),100);if(b)return;!o&&f&&u<=.05&&(Ee=setTimeout((()=>{me()}),250)),un(K,h=ns(r,s,l),h);const x=Ke(y);lt(x,i),st(x,c);const v=at(x),w=Ke(x);lt(w,h-i+1,e);const S=at(w),k=Se(we(S,v),i);((e,t,o)=>{e.x=t,e.y=o})(a,c.x+k.x,c.y+k.y),un(q,p=$&&o?ke(pe(p),.85):be(a,i),p),le()},Oe=e=>(e?"add":"remove")+"EventListener";let Be,We,_e,Ve;const Ne=e=>{e.preventDefault(),We={...p},Ve=Ke(y),_e=Wp(e,f,$),Be=g?h||m:n?h||1:h||m},He=e=>{e.preventDefault(),un(K,h=ns(e.scale*Be,s,l),h);const t=Ke(Ve);lt(t,Be),st(t,We);const o=at(t),i=Ke(t);lt(i,h-Be+1,_e);const r=at(i),n=Se(we(r,o),Be),a={x:We.x+n.x,y:We.y+n.y};un(q,p=be(a,h),p)},je=e=>{e.preventDefault()},Ue=e=>{S[Oe(e)]("wheel",Fe),$o()||(S[Oe(e)]("gesturestart",Ne),S[Oe(e)]("gesturechange",He),S[Oe(e)]("gestureend",je))},Ge=e=>{const t=Oe(e);S[t]("interactionstart",Te),S[t]("interactionupdate",Me),S[t]("interactionrelease",Re),S[t]("interactionend",Pe)};let Ze;return Zn((()=>{Ze=hd(S,{drag:!0,pinch:!0,inertia:!0,inertiaDurationMultiplier:10,shouldStartInteraction:se})})),Yn((()=>{Ue(!1),Ge(!1),Ze.destroy(),Ze=void 0})),e.$$set=e=>{"root"in e&&o(13,S=e.root),"locale"in e&&o(14,k=e.locale),"stores"in e&&o(15,C=e.stores),"allowPan"in e&&o(16,T=e.allowPan),"allowZoom"in e&&o(17,M=e.allowZoom),"enablePan"in e&&o(18,R=e.enablePan),"enableZoom"in e&&o(19,P=e.enableZoom),"enableZoomControls"in e&&o(20,E=e.enableZoomControls),"enableZoomInput"in e&&o(21,I=e.enableZoomInput),"enablePanInput"in e&&o(22,A=e.enablePanInput),"enablePanLimit"in e&&o(23,L=e.enablePanLimit),"panLimitGutterScalar"in e&&o(24,z=e.panLimitGutterScalar),"zoomOptions"in e&&o(25,F=e.zoomOptions),"zoomAdjustStep"in e&&o(26,D=e.zoomAdjustStep),"zoomAdjustFactor"in e&&o(27,O=e.zoomAdjustFactor),"zoomAdjustWheelFactor"in e&&o(28,B=e.zoomAdjustWheelFactor),"elasticity"in e&&o(29,W=e.elasticity),"imageSelectionRectCentered"in e&&o(30,_=e.imageSelectionRectCentered),"imageSelectionRectScalar"in e&&o(31,V=e.imageSelectionRectScalar),"zoomLevel"in e&&o(32,N=e.zoomLevel),"zoomControls"in e&&o(11,H=e.zoomControls),"zoomMultiTouching"in e&&o(12,j=e.zoomMultiTouching)},e.$$.update=()=>{var t,$;2752512&e.$$.dirty[0]&&o(35,i=M&&P&&I),327680&e.$$.dirty[0]&&o(34,r=T&&R),196608&e.$$.dirty[0]&&(T||M?(un(K,h=P?w.zoom:void 0,h),un(q,p=R?pe(w.translation):ce()?p:de(),p),ge.set(h)):he()),16384&e.$$.dirty[1]&&(n=x>=1),33570816&e.$$.dirty[0]|28672&e.$$.dirty[1]&&o(39,a=[(g||x<1)&&[m,Op(m)+"%",{sublabel:k.labelZoomFit}],...F.map((e=>[e,Op(e)+"%"]))].filter(Boolean).map((e=>(1===e[0]&&(e[2]={sublabel:k.labelZoomActual}),e))).sort(((e,t)=>{const o=e[0]||m,i=t[0]||m;return ott>e?t:e),Number.MIN_SAFE_INTEGER)),2&e.$$.dirty[1]&&null!==N&&ye(N),30720&e.$$.dirty[1]&&o(41,d=h||(g||x<1?m:1)),1280&e.$$.dirty[1]&&o(38,(t=a.map((([e])=>e)),$=d,c=t.findIndex((e=>e===$)))),1024&e.$$.dirty[1]&&o(40,u=Op(d)+"%"),202522624&e.$$.dirty[0]|3040&e.$$.dirty[1]&&o(11,H=(M||M)&&E?[["Button","zoom-out",{hideLabel:!0,label:k.labelZoomOut,icon:k.iconZoomOut,disabled:h===s,onclick:()=>fe((e=>Math.max(s,e-D))),onhold:()=>fe((e=>Math.max(s,e*(1-O))))}],["Dropdown","zoom-level",{label:u,labelClass:"PinturaFixedWidthCharacters",options:a,selectedIndex:c,onchange:e=>ye(e.value)}],["Button","zoom-in",{hideLabel:!0,label:k.labelZoomIn,icon:k.iconZoomIn,disabled:h===l,onclick:()=>fe((e=>Math.min(l,e+D))),onhold:()=>fe((e=>Math.min(l,e*(1+O))))}]]:[]),8192&e.$$.dirty[0]|16&e.$$.dirty[1]&&S&&Ue(i),8192&e.$$.dirty[0]|8&e.$$.dirty[1]&&S&&Ge(r),4202496&e.$$.dirty[0]|12&e.$$.dirty[1]&&S&&S.style.setProperty("--cursor",r&&A?oe?"grabbing":"grab":"")},[U,G,Z,X,Y,q,K,J,Q,ee,te,H,j,S,k,C,T,M,R,P,E,I,A,L,z,F,D,O,B,W,_,V,N,oe,r,i,l,s,c,a,u,d,h,m,g,x]}class Vp extends Fa{constructor(e){super(),za(this,e,_p,null,Qr,{root:13,locale:14,stores:15,allowPan:16,allowZoom:17,enablePan:18,enableZoom:19,enableZoomControls:20,enableZoomInput:21,enablePanInput:22,enablePanLimit:23,panLimitGutterScalar:24,zoomOptions:25,zoomAdjustStep:26,zoomAdjustFactor:27,zoomAdjustWheelFactor:28,elasticity:29,imageSelectionRectCentered:30,imageSelectionRectScalar:31,zoomLevel:32,zoomControls:11,zoomMultiTouching:12},null,[-1,-1,-1,-1])}}const Np=e=>new Promise((t=>{const o=new FileReader;o.onload=()=>t(o.result),o.readAsArrayBuffer(e)})),Hp=1836476516,jp=(e,t=0,o=e.byteLength)=>{const i=[],r=t+o;for(;t{let o=0;o+=4;if(1718909296!==e.getUint32(o))return 0;o+=4;const i=e.getUint32(o);return 1836069938===i?((e,t,o)=>{let i=!1,r=-1;for(let n=t;n{const t=jp(e).find((e=>1836019574===e.type));if(!t)return 0;const o=jp(e,t.bodyOffset,t.bodySize);o.filter((e=>1953653099===e.type)).forEach((t=>{o.push(...jp(e,t.bodyOffset,t.bodySize))}));const i=[Hp,1953196132],r=o.filter((e=>i.includes(e.type)));for(const{type:t,bodyOffset:o}of r){const i=e.getUint8(o);let r=o+4;r+=t===Hp?32:36,r+=1===i?12:0;const n=e.getInt32(r),a=e.getInt32(r+4);if(0===n&&a>0)return 90;if(n<0&&0===a)return 180;if(0===n&&a<0)return 270}return 0})(e):0},{window:Gp}=ka;function Zp(e){let t,o,i,r=e[42]&&Xp(e),n=e[39]&&im(e);return{c(){r&&r.c(),t=Mn(),n&&n.c(),o=Rn()},m(e,a){r&&r.m(e,a),wn(e,t,a),n&&n.m(e,a),wn(e,o,a),i=!0},p(e,i){e[42]?r?(r.p(e,i),2048&i[1]&&xa(r,1)):(r=Xp(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[39]?n?(n.p(e,i),256&i[1]&&xa(n,1)):(n=im(e),n.c(),xa(n,1),n.m(o.parentNode,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function Xp(e){let t,o,i,r,n,a;const s=[qp,Yp],l=[];function c(e,t){return e[40]?0:e[35]?1:-1}return~(i=c(e))&&(r=l[i]=s[i](e)),{c(){t=kn("div"),o=kn("p"),r&&r.c(),An(o,"style",e[73]),An(t,"class","PinturaStatus"),An(t,"style",n="opacity: "+e[55])},m(e,r){wn(e,t,r),bn(t,o),~i&&l[i].m(o,null),a=!0},p(e,d){let u=i;i=c(e),i===u?~i&&l[i].p(e,d):(r&&(ya(),va(l[u],1,1,(()=>{l[u]=null})),ba()),~i?(r=l[i],r?r.p(e,d):(r=l[i]=s[i](e),r.c()),xa(r,1),r.m(o,null)):r=null),(!a||2048&d[2])&&An(o,"style",e[73]),(!a||16777216&d[1]&&n!==(n="opacity: "+e[55]))&&An(t,"style",n)},i(e){a||(xa(r),a=!0)},o(e){va(r),a=!1},d(e){e&&Sn(t),~i&&l[i].d()}}}function Yp(e){let t,o,i,r;t=new Cd({props:{text:e[35].text||"",onmeasure:e[214]}});let n=e[35].aside&&Kp(e);return{c(){Ia(t.$$.fragment),o=Mn(),n&&n.c(),i=Rn()},m(e,a){Aa(t,e,a),wn(e,o,a),n&&n.m(e,a),wn(e,i,a),r=!0},p(e,o){const r={};16&o[1]&&(r.text=e[35].text||""),t.$set(r),e[35].aside?n?(n.p(e,o),16&o[1]&&xa(n,1)):(n=Kp(e),n.c(),xa(n,1),n.m(i.parentNode,i)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){r||(xa(t.$$.fragment,e),xa(n),r=!0)},o(e){va(t.$$.fragment,e),va(n),r=!1},d(e){La(t,e),e&&Sn(o),n&&n.d(e),e&&Sn(i)}}}function qp(e){let t,o,i,r;return t=new Cd({props:{text:e[40],onmeasure:e[214]}}),i=new Id({props:{class:"PinturaStatusIcon",offset:e[83],opacity:e[84],$$slots:{default:[om]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment),o=Mn(),Ia(i.$$.fragment)},m(e,n){Aa(t,e,n),wn(e,o,n),Aa(i,e,n),r=!0},p(e,o){const r={};512&o[1]&&(r.text=e[40]),t.$set(r);const n={};2097152&o[2]&&(n.offset=e[83]),4194304&o[2]&&(n.opacity=e[84]),8&o[0]|536870912&o[18]&&(n.$$scope={dirty:o,ctx:e}),i.$set(n)},i(e){r||(xa(t.$$.fragment,e),xa(i.$$.fragment,e),r=!0)},o(e){va(t.$$.fragment,e),va(i.$$.fragment,e),r=!1},d(e){La(t,e),e&&Sn(o),La(i,e)}}}function Kp(e){let t,o;return t=new Id({props:{class:"PinturaStatusButton",offset:e[83],opacity:e[84],$$slots:{default:[em]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};2097152&o[2]&&(i.offset=e[83]),4194304&o[2]&&(i.opacity=e[84]),16&o[1]|536870912&o[18]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Jp(e){let t,o;return t=new Rd({props:{progress:e[35].progressIndicator.progress}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[1]&&(i.progress=e[35].progressIndicator.progress),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Qp(e){let t,o;const i=[e[35].closeButton,{hideLabel:!0}];let r={};for(let e=0;e{r=null})),ba()),e[35].closeButton&&e[35].text?n?(n.p(e,i),16&i[1]&&xa(n,1)):(n=Qp(e),n.c(),xa(n,1),n.m(o.parentNode,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function tm(e){let t,o=e[3].iconSupportError+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){8&i[0]&&o!==(o=e[3].iconSupportError+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function om(e){let t,o;return t=new td({props:{$$slots:{default:[tm]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8&o[0]|536870912&o[18]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function im(e){let t,o,i,r,n,a,s,l,c,d,u,h,p,m,g=e[10]&&rm(e),$=e[46]&&e[45]&&nm(e);const f=[dm,cm],y=[];function b(e,t){return e[46]?0:1}function x(t){e[427](t)}function v(t){e[428](t)}function w(t){e[429](t)}i=b(e),r=y[i]=f[i](e),a=new Tc({props:{isAnimated:e[54],isTransparent:e[20],pixelRatio:e[58],textPixelRatio:e[6],backgroundColor:e[57],maskRect:e[59],maskOpacity:e[74]?e[74].maskOpacity:1,maskMarkupOpacity:e[7],maskFrameOpacity:e[5],clipAnnotationsToImage:e[86],images:e[56],interfaceImages:e[87],loadImageData:e[28],enableGrid:e[11],gridSize:e[88],gridColors:[e[89],e[90]],gridOpacity:e[91],selectionColor:e[92],willRequest:e[82]||e[93],willRender:e[424],didRender:e[425]}});let S={root:e[2],locale:e[3],stores:e[200],allowPan:e[95],enablePan:e[17],enablePanLimit:e[21],panLimitGutterScalar:e[22],enablePanInput:e[96],allowZoom:e[97],enableZoom:e[18],enableZoomInput:void 0!==e[19]?e[19]:e[98],enableZoomControls:e[99],zoomOptions:e[13]||e[23],zoomAdjustStep:e[14]||e[24],zoomAdjustFactor:e[15]||e[25],zoomAdjustWheelFactor:e[16]||e[26],imageSelectionRectCentered:e[100],imageSelectionRectScalar:e[101],elasticity:$m*e[8]};return void 0!==e[0]&&(S.zoomLevel=e[0]),void 0!==e[33]&&(S.zoomControls=e[33]),void 0!==e[34]&&(S.zoomMultiTouching=e[34]),d=new Vp({props:S}),ta.push((()=>Ea(d,"zoomLevel",x))),ta.push((()=>Ea(d,"zoomControls",v))),ta.push((()=>Ea(d,"zoomMultiTouching",w))),{c(){g&&g.c(),t=Mn(),$&&$.c(),o=Mn(),r.c(),n=Mn(),Ia(a.$$.fragment),s=Mn(),l=kn("div"),c=Mn(),Ia(d.$$.fragment),An(l,"class","PinturaRootPortal")},m(r,u){g&&g.m(r,u),wn(r,t,u),$&&$.m(r,u),wn(r,o,u),y[i].m(r,u),wn(r,n,u),Aa(a,r,u),wn(r,s,u),wn(r,l,u),e[426](l),wn(r,c,u),Aa(d,r,u),m=!0},p(e,s){e[10]?g?(g.p(e,s),1024&s[0]&&xa(g,1)):(g=rm(e),g.c(),xa(g,1),g.m(t.parentNode,t)):g&&(ya(),va(g,1,1,(()=>{g=null})),ba()),e[46]&&e[45]?$?($.p(e,s),49152&s[1]&&xa($,1)):($=nm(e),$.c(),xa($,1),$.m(o.parentNode,o)):$&&(ya(),va($,1,1,(()=>{$=null})),ba());let l=i;i=b(e),i===l?y[i].p(e,s):(ya(),va(y[l],1,1,(()=>{y[l]=null})),ba(),r=y[i],r?r.p(e,s):(r=y[i]=f[i](e),r.c()),xa(r,1),r.m(n.parentNode,n));const c={};8388608&s[1]&&(c.isAnimated=e[54]),1048576&s[0]&&(c.isTransparent=e[20]),134217728&s[1]&&(c.pixelRatio=e[58]),64&s[0]&&(c.textPixelRatio=e[6]),67108864&s[1]&&(c.backgroundColor=e[57]),268435456&s[1]&&(c.maskRect=e[59]),4096&s[2]&&(c.maskOpacity=e[74]?e[74].maskOpacity:1),128&s[0]&&(c.maskMarkupOpacity=e[7]),32&s[0]&&(c.maskFrameOpacity=e[5]),16777216&s[2]&&(c.clipAnnotationsToImage=e[86]),33554432&s[1]&&(c.images=e[56]),33554432&s[2]&&(c.interfaceImages=e[87]),268435456&s[0]&&(c.loadImageData=e[28]),2048&s[0]&&(c.enableGrid=e[11]),67108864&s[2]&&(c.gridSize=e[88]),402653184&s[2]&&(c.gridColors=[e[89],e[90]]),536870912&s[2]&&(c.gridOpacity=e[91]),1073741824&s[2]&&(c.selectionColor=e[92]),1048576&s[2]|1&s[3]&&(c.willRequest=e[82]||e[93]),512&s[0]|541982784&s[1]|2&s[3]&&(c.willRender=e[424]),124&s[2]&&(c.didRender=e[425]),a.$set(c);const m={};4&s[0]&&(m.root=e[2]),8&s[0]&&(m.locale=e[3]),4&s[3]&&(m.allowPan=e[95]),131072&s[0]&&(m.enablePan=e[17]),2097152&s[0]&&(m.enablePanLimit=e[21]),4194304&s[0]&&(m.panLimitGutterScalar=e[22]),8&s[3]&&(m.enablePanInput=e[96]),16&s[3]&&(m.allowZoom=e[97]),262144&s[0]&&(m.enableZoom=e[18]),524288&s[0]|32&s[3]&&(m.enableZoomInput=void 0!==e[19]?e[19]:e[98]),64&s[3]&&(m.enableZoomControls=e[99]),8396800&s[0]&&(m.zoomOptions=e[13]||e[23]),16793600&s[0]&&(m.zoomAdjustStep=e[14]||e[24]),33587200&s[0]&&(m.zoomAdjustFactor=e[15]||e[25]),67174400&s[0]&&(m.zoomAdjustWheelFactor=e[16]||e[26]),128&s[3]&&(m.imageSelectionRectCentered=e[100]),256&s[3]&&(m.imageSelectionRectScalar=e[101]),256&s[0]&&(m.elasticity=$m*e[8]),!u&&1&s[0]&&(u=!0,m.zoomLevel=e[0],ca((()=>u=!1))),!h&&4&s[1]&&(h=!0,m.zoomControls=e[33],ca((()=>h=!1))),!p&&8&s[1]&&(p=!0,m.zoomMultiTouching=e[34],ca((()=>p=!1))),d.$set(m)},i(e){m||(xa(g),xa($),xa(r),xa(a.$$.fragment,e),xa(d.$$.fragment,e),m=!0)},o(e){va(g),va($),va(r),va(a.$$.fragment,e),va(d.$$.fragment,e),m=!1},d(r){g&&g.d(r),r&&Sn(t),$&&$.d(r),r&&Sn(o),y[i].d(r),r&&Sn(n),La(a,r),r&&Sn(s),r&&Sn(l),e[426](null),r&&Sn(c),La(d,r)}}}function rm(e){let t,o,i,r,n;return o=new up({props:{items:e[70]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaNav PinturaNavTools")},m(a,s){wn(a,t,s),Aa(o,t,null),i=!0,r||(n=[Pn(t,"measure",e[411]),hn($c.call(null,t))],r=!0)},p(e,t){const i={};256&t[2]&&(i.items=e[70]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o),r=!1,Kr(n)}}}function nm(e){let t,o,i;return o=new vd({props:{elasticity:e[8]*ym,scrollDirection:e[76]?"y":"x",$$slots:{default:[lm]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaNav PinturaNavMain")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};256&t[0]&&(i.elasticity=e[8]*ym),16384&t[2]&&(i.scrollDirection=e[76]?"y":"x"),8192&t[1]|393216&t[2]|536870912&t[18]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function am(e){let t,o=e[586].icon+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){268435456&i[18]&&o!==(o=e[586].icon+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function sm(e){let t,o,i,r,n,a=e[586].label+"";return t=new td({props:{$$slots:{default:[am]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment),o=Mn(),i=kn("span"),r=Tn(a)},m(e,a){Aa(t,e,a),wn(e,o,a),wn(e,i,a),bn(i,r),n=!0},p(e,o){const i={};805306368&o[18]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i),(!n||268435456&o[18])&&a!==(a=e[586].label+"")&&Fn(r,a)},i(e){n||(xa(t.$$.fragment,e),n=!0)},o(e){va(t.$$.fragment,e),n=!1},d(e){La(t,e),e&&Sn(o),e&&Sn(i)}}}function lm(e){let t,o;const i=[e[80],{tabs:e[79]}];let r={$$slots:{default:[sm,({tab:e})=>({586:e}),({tab:e})=>[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e?268435456:0]]},$$scope:{ctx:e}};for(let e=0;eEa(t,"component",r))),t.$on("measure",e[226]),t.$on("show",e[421]),t.$on("hide",e[422]),t.$on("fade",e[423]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};134217728&i[0]|73728&i[1]&&(r.content={...e[47].find(e[419]),props:e[27][e[44]]}),8&i[0]&&(r.locale=e[3]),!o&&2&i[0]|8192&i[1]&&(o=!0,r.component=e[1][e[44]],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function dm(e){let t,o;const i=[{class:"PinturaMain"},{visible:e[63]},e[80],{panels:e[78]}];let r={$$slots:{default:[um,({panel:e,panelIsActive:t})=>({584:e,585:t}),({panel:e,panelIsActive:t})=>[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(e?67108864:0)|(t?134217728:0)]]},$$scope:{ctx:e}};for(let e=0;eEa(t,"component",n))),t.$on("measure",e[226]),t.$on("show",(function(){return e[415](e[584])})),t.$on("hide",(function(){return e[416](e[584])})),t.$on("fade",(function(...t){return e[417](e[584],...t)})),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(i,n){e=i;const a={};134217728&n[0]|65536&n[1]|67108864&n[18]&&(a.content={...e[47].find(r),props:e[27][e[584]]}),8&n[0]&&(a.locale=e[3]),134217728&n[18]&&(a.isActive=e[585]),!o&&2&n[0]|67108864&n[18]&&(o=!0,a.component=e[1][e[584]],ca((()=>o=!1))),t.$set(a)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function hm(e){let t,o;return{c(){t=kn("span"),An(t,"class","PinturaEditorOverlay"),An(t,"style",o="opacity:"+e[102])},m(e,o){wn(e,t,o)},p(e,i){512&i[3]&&o!==(o="opacity:"+e[102])&&An(t,"style",o)},d(e){e&&Sn(t)}}}function pm(e){let t,o;const i=[{layout:"row"},{parentRect:e[51]},e[61]];let r={$$slots:{default:[mm]},$$scope:{ctx:e}};for(let e=0;e0&&hm(e),d=e[61]&&pm(e);return{c(){t=kn("div"),l&&l.c(),o=Mn(),c&&c.c(),i=Mn(),d&&d.c(),An(t,"id",e[4]),An(t,"class",e[77]),An(t,"data-env",e[75]),An(t,"dir",e[12])},m(u,h){wn(u,t,h),l&&l.m(t,null),bn(t,o),c&&c.m(t,null),bn(t,i),d&&d.m(t,null),e[431](t),r=!0,n||(s=[Pn(Gp,"keydown",e[217]),Pn(Gp,"keyup",e[218]),Pn(Gp,"blur",e[219]),Pn(Gp,"paste",e[223]),Pn(Gp,"resize",e[410]),Pn(t,"ping",(function(){Jr(e[69])&&e[69].apply(this,arguments)})),Pn(t,"contextmenu",e[220]),Pn(t,"touchstart",e[215],{passive:!1}),Pn(t,"touchmove",(function(){Jr(e[72])&&e[72].apply(this,arguments)})),Pn(t,"pointermove",(function(){Jr(e[71])&&e[71].apply(this,arguments)})),Pn(t,"transitionend",e[205]),Pn(t,"dropfiles",e[221]),Pn(t,"measure",e[432]),Pn(t,"click",(function(){Jr(e[43]?e[222]:a)&&(e[43]?e[222]:a).apply(this,arguments)})),hn($c.call(null,t,{observeViewRect:!0,isMeasureRoot:!0})),hn(fc.call(null,t)),hn(bc.call(null,t))],n=!0)},p(n,a){(e=n)[41]?l?(l.p(e,a),1024&a[1]&&xa(l,1)):(l=Zp(e),l.c(),xa(l,1),l.m(t,o)):l&&(ya(),va(l,1,1,(()=>{l=null})),ba()),e[102]>0?c?c.p(e,a):(c=hm(e),c.c(),c.m(t,i)):c&&(c.d(1),c=null),e[61]?d?(d.p(e,a),1073741824&a[1]&&xa(d,1)):(d=pm(e),d.c(),xa(d,1),d.m(t,null)):d&&(ya(),va(d,1,1,(()=>{d=null})),ba()),(!r||16&a[0])&&An(t,"id",e[4]),(!r||32768&a[2])&&An(t,"class",e[77]),(!r||8192&a[2])&&An(t,"data-env",e[75]),(!r||4096&a[0])&&An(t,"dir",e[12])},i(e){r||(xa(l),xa(d),r=!0)},o(e){va(l),va(d),r=!1},d(o){o&&Sn(t),l&&l.d(),c&&c.d(),d&&d.d(),e[431](null),n=!1,Kr(s)}}}const $m=1,fm="stage-overlay",ym=10;function bm(e,t,o){let i,r,n,s,l,c,d,u,h,p,g,$,y,b,x,S,k,C,T,M,P,E,I,A,z,F,D,O,B,W,_,V,N,H,j,U,Z,X,Y,q,K,J,Q,ee,te,oe,ie,re,ne,ae,le,ce,he,pe,me,ge,$e,fe,ye,be,ve,we,Se,ke,Ce,Te,Me,Re,Pe,Ee,Ie,Ae,Le,ze,Fe,De,Oe,Be,_e,Ve,Ne,He,je,Ue,Ge,Ze,Xe,Ye,qe,et,tt,it,rt,at,ct,dt,mt,gt,yt,bt,wt,kt,Tt,Mt,Rt,Pt,Et,It,At,Lt,zt,Ft,Dt,Ot,Bt,Vt,Nt,Ht,jt,Ut,Gt,Zt,Yt,qt,Kt,Jt,Qt,eo,to,oo,io,ro,no,ao,so,lo,uo,ho,po,mo,go,fo,yo,bo,xo,vo,wo,So,ko,Co,To,Mo,Ro,Po,Eo,Io,Lo,zo,Fo,Do,Oo,Bo,Wo,_o,No,Ho,jo,Uo,Go,Zo,Yo,Ko,Jo,Qo,ei,ti,oi,ii,ri,ni,ai,si,li,ci,di,ui,hi,pi,mi,gi,$i,yi,bi,xi,vi,wi,Si,Ti,Mi,Ri,Ei,Ii,Li,zi,Fi,Di,Oi,Bi,Wi=Gr,_i=Gr;on(e,tc,(e=>o(398,Yo=e))),e.$$.on_destroy.push((()=>Wi())),e.$$.on_destroy.push((()=>_i()));const Vi=Xo(),Ni=qn();let Hi,ji,{class:Ui}=t,{layout:Gi}=t,{stores:Zi}=t,{locale:Xi}=t,{id:Yi}=t,{util:qi}=t,{utils:Ki}=t,{animations:Ji="auto"}=t,{disabled:Qi=!1}=t,{status:er}=t,{previewUpscale:tr=!1}=t,{previewPad:or=!1}=t,{previewMaskOpacity:ir=.95}=t,{previewImageDataMaxSize:rr}=t,{previewImageTextPixelRatio:nr}=t,{markupMaskOpacity:ar=1}=t,{zoomMaskOpacity:sr=.85}=t,{elasticityMultiplier:lr=10}=t,{willRevert:cr=(()=>Promise.resolve(!0))}=t,{willProcessImage:dr=(()=>Promise.resolve(!0))}=t,{willRenderCanvas:ur=G}=t,{willRenderToolbar:hr=G}=t,{willSetHistoryInitialState:mr=G}=t,{enableButtonExport:gr=!0}=t,{enableButtonRevert:$r=!0}=t,{enableNavigateHistory:fr=!0}=t,{enableToolbar:xr=!0}=t,{enableUtils:vr=!0}=t,{enableButtonClose:wr=!1}=t,{enableDropImage:kr=!1}=t,{enablePasteImage:Cr=!1}=t,{enableBrowseImage:Tr=!1}=t,{enableTransparencyGrid:Mr=!1}=t,{layoutDirectionPreference:Rr="auto"}=t,{layoutHorizontalUtilsPreference:Pr="left"}=t,{layoutVerticalUtilsPreference:Er="bottom"}=t,{layoutVerticalToolbarPreference:Ir="top"}=t,{layoutVerticalControlGroupsPreference:Ar="bottom"}=t,{layoutVerticalControlTabsPreference:Lr="bottom"}=t,{textDirection:zr}=t,{markupEditorZoomLevel:Fr=null}=t,{markupEditorZoomLevels:Dr}=t,{markupEditorZoomAdjustStep:Or}=t,{markupEditorZoomAdjustFactor:Br}=t,{markupEditorZoomAdjustWheelFactor:Wr}=t,{markupEditorInteractionMode:_r=!1}=t,{muteAudio:Vr=!0}=t,{willSetMediaInitialTimeOffset:Nr=((e,t)=>e*Dp(t[0]))}=t,{enablePan:Hr=!0}=t,{enableZoom:Zr=!0}=t,{enableZoomControls:Xr=!0}=t,{enableZoomInput:Yr}=t,{enablePanInput:qr}=t,{enableCanvasAlpha:Kr=!1}=t,{enablePanLimit:Jr}=t,{panLimitGutterScalar:Qr}=t,{zoomPresetOptions:rn=[.25,.5,1,1.25,1.5,2,3,4,6,8,16]}=t,{zoomAdjustStep:nn=.25}=t,{zoomAdjustFactor:an=.1}=t,{zoomAdjustWheelFactor:sn=1}=t,{zoomLevel:ln=null}=t;let{imagePreviewSrc:cn}=t,{imageOrienter:dn={read:()=>1,apply:e=>e}}=t,{pluginComponents:hn}=t,{pluginOptions:pn={}}=t;const mn=Vi.sub,gn={};let{root:$n}=t;const fn=()=>{mt.setAttribute("data-redraw","true"),_n.set({})},yn=Ba(!0);on(e,yn,(e=>o(464,Nt=e)));const bn=Ba(void 0);on(e,bn,(e=>o(406,di=e)));const xn=Ba(0);on(e,xn,(e=>o(407,ui=e)));const vn=Ba(0),wn=Ba(!1),Sn=e=>{wn.set("play"===e.type),Vi.pub(e.type)};let kn,Cn;let Tn,Mn,Rn=!1;const Pn=()=>{if(!r||!In())return;Mn=u,un(bn,di=void 0,di);const e=mt;Rn=!1;const t=1/24,o=On();(Math.abs(c*o-ui*o)<=t||o-o*ui<=t)&&un(xn,ui=l,ui),Wn(On()*ui),e.play().catch((()=>{}));const i=()=>{In()||(Tn=requestAnimationFrame(i),un(xn,ui=Bn()/On(),ui),Mn>=0&&ui>=c&&(un(xn,ui=c,ui),En()),u>-1&&(Rn=!0),Rn&&-1===u&&h>0&&(un(xn,ui=s[h][0],ui),Wn(ui*On())),fn())};i()},En=()=>{r&&!In()&&(un(bn,di=void 0,di),Mn=void 0,mt.pause(),cancelAnimationFrame(Tn),fn())},In=()=>mt&&mt.paused,An=()=>{if(r)return In()?Pn():En()},Ln=()=>{if(!r)return;mt.muted=!0},zn=()=>{if(!r)return;mt.muted=!1},Fn=()=>{r&&un(Dn,ci=!ci,ci)},Dn=Ba(Vr);on(e,Dn,(e=>o(405,ci=e)));const On=()=>{if(r)return mt.duration},Bn=()=>{if(!r)return;return mt.currentTime},Wn=e=>{if(!r)return;mt.currentTime=e,vn.set(e)};Kn("previewcontrols",{play:Pn,pause:En,togglePlayPause:An,mute:Ln,unmute:zn,toggleMute:Fn,setCurrentTime:Wn,getCurrentTime:Bn,getDuration:On,currentTime:vn,frameOffset:xn,framePeekOffset:bn,isPlaying:wn,isMuted:Dn});const _n=Ba({});on(e,_n,(e=>o(53,Ut=e))),Kn("redrawTrigger",_n);const Vn=Ba(lr);on(e,Vn,(e=>o(480,si=e))),Kn("elasticityMultiplier",Vn);let Nn=[];const Hn=ec();on(e,Hn,(e=>o(102,Bi=e)));const jn=Fl()||1024,Un=We(jn,jn),Gn=Cs(),Zn=e=>Promise.resolve(ai&&ai(e,{resourceType:"image"})).then((t=>{if(!1===t)return;const{headers:o,credentials:i}=t||{};return fetch(e,{headers:o,credentials:i}).then((e=>{if(200!==e.status)throw`${e.status} (${e.statusText})`;return e.blob()})).then((e=>Cp(e,dn,Gn))).then((e=>Tp(e,$)))}));let{imageSourceToImageData:Xn=(e=>R(e)?Zn(e):Wt(e)?new Promise((t=>t(m(e)))):co(e)||_t(e)?Cp(e,dn,Gn).then((e=>Tp(e,$))):void 0)}=t;const Jn=(()=>{let e,t;const o=xp.reduce(((e,o)=>(e[o]=function(e,t,o){let i=[];return{set:t,update:o,publish:e=>{i.forEach((t=>t(e)))},subscribe:t=>(i.push(t),e(t),()=>{i=i.filter((e=>e!==t))})}}((e=>{if(!t)return e();t.stores[o].subscribe(e)()}),(e=>{t&&t.stores[o].set(e)}),(e=>{t&&t.stores[o].update(e)})),e)),{});return{update:i=>{if(t=i,e&&(e.forEach((e=>e())),e=void 0),!i)return o.file.publish(void 0),void o.loadState.publish(void 0);e=xp.map((e=>i.stores[e].subscribe((t=>{o[e].publish(t)}))))},stores:o,destroy:()=>{e&&e.forEach((e=>e()))}}})(),{file:Qn,size:ea,duration:oa,trim:ia,volume:ra,minDuration:na,maxDuration:aa,loadState:sa,processState:la,cropAspectRatio:ca,cropLimitToImage:da,crop:ua,cropMinSize:ha,cropMaxSize:pa,cropRange:ma,cropOrigin:ga,cropRectAspectRatio:$a,rotation:fa,rotationRange:ya,targetSize:ba,flipX:xa,flipY:va,backgroundColor:wa,backgroundImage:Sa,colorMatrix:ka,convolutionMatrix:Ca,gamma:Ta,vignette:Ma,noise:Ra,decoration:Pa,annotation:Ea,manipulation:Ia,redaction:Aa,frame:La,selection:za,state:Fa}=Jn.stores;on(e,Qn,(e=>o(382,mo=e))),on(e,ea,(e=>o(355,bt=e))),on(e,oa,(e=>o(408,hi=e))),on(e,ia,(e=>o(403,ni=e))),on(e,ra,(e=>o(404,li=e))),on(e,aa,(e=>o(409,pi=e))),on(e,sa,(e=>o(374,oo=e))),on(e,la,(e=>o(373,to=e))),on(e,ca,(e=>o(477,Jo=e))),on(e,da,(e=>o(86,yi=e))),on(e,ua,(e=>o(393,zo=e))),on(e,fa,(e=>o(358,Tt=e))),on(e,xa,(e=>o(357,kt=e))),on(e,va,(e=>o(356,wt=e))),on(e,wa,(e=>o(364,Ot=e))),on(e,Pa,(e=>o(49,yt=e))),on(e,Ea,(e=>o(50,Mt=e))),on(e,Ia,(e=>o(361,zt=e))),on(e,Aa,(e=>o(362,Ft=e))),on(e,La,(e=>o(48,gt=e))),on(e,za,(e=>o(60,oi=e))),on(e,Fa,(e=>o(466,yo=e)));const Da=(e,t,o=0)=>new Promise(((i,r)=>{if(kp(e)){return void(qo()?(async e=>{const t=await Np(e),o=new DataView(t);return Up(o)})(e):Promise.resolve()).then((t=>{const o=document.createElement("video");o.onerror=()=>console.error(o.error),o.playsInline=!0,o.preload="auto",o.onloadeddata=()=>{o.onloadeddata=void 0,o.dataset.rotation=t||"0",Ms(o).then((()=>{const e=Nr(o.duration,ni||[[0,1]]);e>0?(o.onseeked=()=>{o.onseeked=void 0,i(o)},o.currentTime=e):(o.currentTime=e,i(o))}))},o.src=URL.createObjectURL(e),o.load()}))}let n,a=!1;t.cancel=()=>a=!0;const s=Date.now();Xn(e).then((e=>{const t=Date.now()-s;clearTimeout(n),n=setTimeout((()=>{a||i(e)}),Math.max(0,o-t))})).catch(r)})),{images:_a,shapePreprocessor:Va,imageScrambler:Na,imageRedactionRendering:Ha,willRequest:ja,willRequestResource:Ua}=Zi;let Ga;on(e,_a,(e=>o(402,ri=e))),on(e,Va,(e=>o(401,ii=e))),on(e,Na,(e=>o(365,Bt=e))),on(e,Ha,(e=>o(363,Dt=e))),on(e,ja,(e=>o(82,ai=e))),on(e,Ua,(e=>o(93,Mi=e)));const Za=Wa(Sa,((e,t)=>{if(!e)return t(void 0);Ga&&(Ga.cancel(),Ga=void 0),Ga={cancel:a},Da(e,Ga).then(t).catch((e=>{}))})),Xa=Fa.subscribe((e=>Vi.pub("update",e))),Ya=Ba();Kn("ui",Ba({})),Kn("selection",za);const qa=Ba(!0);on(e,qa,(e=>o(95,Ei=e)));const Ka=Ba(!0);on(e,Ka,(e=>o(97,Li=e)));const Ja=Ba(!0);on(e,Ja,(e=>o(400,ti=e)));const Qa=Ba(!0);on(e,Qa,(e=>o(478,Qo=e)));const es=Ba(!0);on(e,es,(e=>o(98,zi=e)));const ts=Ba();on(e,ts,(e=>o(99,Fi=e)));const os=Ba();on(e,os,(e=>o(479,ei=e)));const is=Wa([os,Qa],(()=>void 0!==ei?ei:Qo));on(e,is,(e=>o(96,Ii=e)));const rs=Ba([0,0,0]);on(e,rs,(e=>o(57,So=e)));const as=Ba([1,1,1]);on(e,as,(e=>o(462,Lt=e)));const ss=ec([1,1,1]);on(e,ss,(e=>o(461,At=e)));const ls=Ba();on(e,ls,(e=>o(92,Ti=e)));const cs=Ba(),us=Ba();on(e,us,(e=>o(52,Ht=e)));const hs=Ba();on(e,hs,(e=>o(359,Pt=e)));const ps=Ba(Je());on(e,ps,(e=>o(81,bo=e)));const ms=Ba(0);on(e,ms,(e=>o(399,Ko=e)));const gs=Ba(Je());on(e,gs,(e=>o(85,$i=e)));const $s=Ba();on(e,$s,(e=>o(459,dt=e)));const fs=Sp("(pointer: fine)",(e=>e?"pointer-fine":"pointer-coarse"));on(e,fs,(e=>o(380,ho=e)));const ys=Sp("(hover: hover)",(e=>e?"pointer-hover":"pointer-no-hover"));on(e,ys,(e=>o(379,uo=e)));const bs=Ba(!1),xs=Ba(!1);on(e,xs,(e=>o(360,It=e)));const vs=Oa(void 0,(e=>{const t=ec(0),o=[xs.subscribe((e=>{t.set(e?1:0)})),t.subscribe(e)];return()=>o.forEach((e=>e()))}));on(e,vs,(e=>o(460,Et=e)));const ws=Ba();on(e,ws,(e=>o(465,ao=e)));const Ss=Ba();let ks;on(e,Ss,(e=>o(54,Zt=e))),Kn("isAnimated",Ss);const Ts=Ba(tr);on(e,Ts,(e=>o(383,go=e)));const Rs=Ba(!1);on(e,Rs,(e=>o(471,Bo=e))),Kn("imageIsStatic",Rs);const Ps=Ba();on(e,Ps,(e=>o(472,Wo=e)));const Es=Ba();on(e,Es,(e=>o(469,Do=e)));const Is=Oa(void 0,(e=>{const t=Ba(void 0),o=[ua.subscribe((()=>{if(!zo)return;if(Bo)return t.set(Ke(zo));const e=gd(zo,Do,5*lr);t.set(e)})),t.subscribe(e)];return()=>o.forEach((e=>e()))})),As=Ba();on(e,As,(e=>o(468,Lo=e)));const Ls=Ba();on(e,Ls,(e=>o(470,Oo=e)));const zs=Ba(void 0);on(e,zs,(e=>o(475,Uo=e)));const Fs=Ba(de());on(e,Fs,(e=>o(476,Go=e)));const Ds=(e,t)=>{if(!t||!e)return{top:0,right:0,bottom:0,left:0};const o=br(t,e,y),i=yr(o,e);return{top:Math.abs(i.top),right:Math.abs(i.right),bottom:Math.abs(i.bottom),left:Math.abs(i.left)}},Os=Ba({}),Bs=Wa([$s,ps,gs,Os],(([e,t,o,i],r)=>{if(!e)return r(void 0);let n=0;1!==O.length||p||"bottom"===Ir||(n=o.y+o.height),r(nt(e.x+t.x,e.y+t.y+n,e.width,e.height))}));let Ws={left:0,right:0,top:0,bottom:0};const _s=Ba(!1),Vs=Wa([_s,La,Bs,xs],(([e,t,o,i],r)=>{if(!o)return r({left:0,right:0,top:0,bottom:0});if(!e)return;const n=Math.min(o.width,o.height),a=Ds({width:n,height:n},t);se(Ws.top,4)===se(a.top,4)&&se(Ws.bottom,4)===se(a.bottom,4)&&se(Ws.right,4)===se(a.right,4)&&se(Ws.left,4)===se(a.left,4)||(Ws=a,r(a))}));on(e,Vs,(e=>o(391,Po=e)));const Ns=Wa([_s,Vs],(([e,t],o)=>{if(!e)return o(!1);o(Object.values(t).some((e=>e>0)))}));on(e,Ns,(e=>o(392,Eo=e)));const Hs=Wa([_s,$s,Ns,Vs],(([e,t,o,i],r)=>{if(t)return e&&o?void r(nt(t.x+i.left,t.y+i.top,t.width-i.left-i.right,t.height-i.top-i.bottom)):r({...t})})),js=Wa([Bs,Ns,Vs],(([e,t,o],i)=>e?t?void i(nt(e.x+o.left,e.y+o.top,e.width-o.left-o.right,e.height-o.top-o.bottom)):i(e):i(void 0)));on(e,js,(e=>o(51,Rt=e)));const Us=Wa([Rs,ea,fa],(([e,t,o],i)=>{if(!e||!t)return i(void 0);const r=Qe(t);i($t(r,o))})),Gs=Wa([Us],(([e],t)=>{if(!e)return t(void 0);const o=ot(e);t(Ct(o))}));on(e,Gs,(e=>o(394,Fo=e)));const Zs=Wa([js,ua,Gs,Ts],(([e,t,o,i],r)=>{if(!e||!t||!(!Wo&&!Do))return;const{width:n,height:a}=o||t,s=Math.min(e.width/n,e.height/a);r(i?s:Math.min(1,s))}));on(e,Zs,(e=>o(395,No=e)));Kn("imageStaticVisualCorners",Wa([Rs,ea,fa,js,$s,Zs],(([e,t,o,i,r,n],a)=>{if(!(e&&i&&r&&t))return a(void 0);const s=Qe(t),l=Ct(lt(s,n)),c=ft(i,l);l.x=c.x,l.y=c.y;a($t(l,o))})));const Xs=Ba(void 0);on(e,Xs,(e=>o(397,Zo=e)));const Ys=Wa([ua,js],(([e,t])=>{if(t&&e)return Math.min(t.width/e.width,t.height/e.height)})),qs=Wa([ua,As],(([e,t])=>e&&t?Math.min(e.width/t.width,e.height/t.height):1));on(e,qs,(e=>o(101,Oi=e)));const Ks=Wa([Xs,qs],(([e,t])=>e&&t?t*e:1));on(e,Ks,(e=>o(474,Ho=e)));const Js=Ba(de());on(e,Js,(e=>o(396,jo=e)));const Qs=Ba({scalar:Ho,translation:jo}),el=()=>{Qs.set({scalar:void 0,translation:de()})},tl=Oa(void 0,(e=>{const t=ec(void 0,{precision:1e-4}),o=1===Vd()?e=>St(e,Math.round):G,i=()=>{if(!Lo)return;const e=It||!ao;if(Bo){const o=Ke(Lo);return st(o,Go),st(o,Rt),t.set(o,{hard:e})}const i=gd(Lo,Uo,$m*lr);i.width<0&&(i.width=0,i.x=Lo.x),i.height<0&&(i.height=0,i.y=Lo.y),st(i,Rt),st(i,jo),lt(i,Ho),!e&&o(i),t.set(i,{hard:e})},r=[js.subscribe(i),As.subscribe(i),Ks.subscribe(i),Js.subscribe(i),La.subscribe(i),t.subscribe(e)];return()=>r.forEach((e=>e()))}));on(e,tl,(e=>o(59,Ro=e)));const ol=Ba(1);on(e,ol,(e=>o(467,Io=e)));const il=()=>{if(!zo||!Rt)return;let e=ut(Ke(zo),No||1);const t=ft(Rt,ut(Ke(Fo),No));st(e,t);const o=dt.width/e.width,i=dt.height/e.height,r=Math.min(1,o,i);ol.set(r),lt(e,r),((e,t)=>{const[o,i,r,n]=vt(e);ot.width&&(e.x=t.width-e.width),r>t.height&&(e.y=t.height-e.height),n{e&&(o||i)&&r(nl(e,t||1,o||i))}));on(e,rl,(e=>o(100,Di=e)));const nl=(e,t,o)=>o.width<=e.width&&o.height<=e.height?ft(e,ut(Ke(o),t)):xt(e,pt(o));let sl,ll;const cl=e=>{if(p&&sl&&ht(sl,e)&&ll===No)return;if(Bo)return il();sl=e,ll=No;const t=nl(e,No,zo||bt);As.set(t)};let ul=!1;const hl=Zs.subscribe((e=>{!ul&&void 0!==e&&zo&&(cl(Rt),ul=!0)})),pl=js.subscribe((e=>{e&&void 0!==No&&zo&&cl(e)})),ml=Rs.subscribe((e=>{!e&&Rt&&cl(Rt)}));let gl;const $l=Ls.subscribe((e=>{if(!e)return gl=void 0,void un(Ps,Wo=void 0,Wo);gl=_o;const t=Ke(zo);Ps.set(t)})),fl=As.subscribe((e=>{if(!e||!Oo)return;const t=(o=Ke(e),i=Oo,o.x-=i.x,o.y-=i.y,o.width-=i.width,o.height-=i.height,o);var o,i;((e,t)=>{e.x/=t,e.y/=t,e.width/=t,e.height/=t})(t,gl);const r=((e,t)=>(e.x+=t.x,e.y+=t.y,e.width+=t.width,e.height+=t.height,e))(Ke(Wo),t);ua.set(r)})),yl=ua.subscribe((e=>{if(!e||!Lo)return;if(Bo)return void(Oo||il());if(It||Oo||Do)return;const t=pt(Lo),o=pt(e);if(se(t,6)===se(o,6))return;const{width:i,height:r}=Fo||zo,n=Math.min(Rt.width/i,Rt.height/r),a=We(e.width*n,e.height*n),s=.5*(Lo.width-a.width),l=.5*(Lo.height-a.height),c=nt(Lo.x+s,Lo.y+l,a.width,a.height);As.set(c)})),bl=Wa([Zs,ua,As,Rs],(([e,t,o,i],r)=>{if(!e||!t||!o)return;if(i)return r(Io);const n=o.width/t.width,a=o.height/t.height;r(Math.max(n,a)/e)})),xl=Wa([Zs,bl],(([e,t],o)=>{if(!t)return;o(e*t)}));on(e,xl,(e=>o(473,_o=e)));let vl={left:0,right:0,top:0,bottom:0};const wl=Wa([La,As],(([e,t],o)=>{if(!t)return o(vl);const i=Ds(t,e);se(vl.top,4)===se(i.top,4)&&se(vl.bottom,4)===se(i.bottom,4)&&se(vl.right,4)===se(i.right,4)&&se(vl.left,4)===se(i.left,4)||(vl=i,o(i))})),Sl=Wa([wl],(([e],t)=>{t(Object.values(e).some((e=>e>0)))})),kl=ec(.075,{stiffness:.03,damping:.4,precision:.001}),Cl=Wa([ss,rs,kl,tl,Ks,La,Sl,wl,Ns],(([e,t,o,i,r,n,a,s,l],c)=>{if(!i||p)return c([]);let{x:d,y:u,width:h,height:m}=i;d+=.5,u+=.5,h-=.5,m-=.5;const g=[];if(n){if(a){let{left:e,right:o,top:i,bottom:n}=s;e*=r,o*=r,i*=r,n*=r;const a=Lp(t)?[1,1,1,.125]:[0,0,0,.075];g.push({x:d-e-.5,y:u-i-.5,width:h+e+o+1,height:m+i+n+1,strokeWidth:1,strokeColor:a,opacity:l?1:.5})}const i=Lp(e);n&&n.frameColor&&Lp(n.frameColor)||i||(g.push({x:d-1,y:u-1,width:h+2,height:m+2,strokeWidth:2,strokeColor:[0,0,0,.1],opacity:o}),g.push({x:d+1,y:u+1,width:h-2,height:m-2,strokeWidth:2,strokeColor:[0,0,0,.1],opacity:o}))}c([...g,{x:d,y:u,width:h,height:m,strokeWidth:1,strokeColor:e,opacity:o}])})),Tl=Ba([]);on(e,Tl,(e=>o(385,xo=e)));const Ml=Wa([Cl,Tl],(([e,t],o)=>{o([...e,...t])}));on(e,Ml,(e=>o(94,Ri=e)));const Rl=ec(0,{precision:.001});on(e,Rl,(e=>o(387,wo=e)));const Pl=ec();on(e,Pl,(e=>o(390,To=e)));const El=ec();on(e,El,(e=>o(389,Co=e)));const Il=ec();on(e,Il,(e=>o(388,ko=e)));const Al=ec();on(e,Al,(e=>o(386,vo=e)));const Ll=Ba(!1);on(e,Ll,(e=>o(372,eo=e)));const zl=Ba();let Ol;on(e,zl,(e=>o(375,io=e)));const Bl=Wa([Ll,zl],(([e,t],i)=>{if(!e||!t)return void i(void 0);if(Ol&&(Ol.cancel(),o(282,Ol=void 0)),Sr(t))return i(w(t));const r=ac.length?0:Zt?250:0;o(282,Ol={cancel:a}),Da(t,Ol,r).then(i).catch((e=>{un(sa,oo.error=e,oo)})).finally((()=>{o(282,Ol=void 0)}))}));Wi(),Wi=en(Bl,(e=>o(354,mt=e)));let{imagePreviewCurrent:Wl}=t;const _l=Ba({});on(e,_l,(e=>o(377,so=e)));const Vl=Ba([]);on(e,Vl,(e=>o(87,bi=e)));const Nl=Wa([js,hs,ea,Is,As,xl,fa,xa,va,Ks,Js,bs],(([e,t,o,i,r,n,a,s,l,c,d,u],h)=>{if(!e||!r)return;const p=al(e,t,o,i,r,c,d,n,a,s,l);!u&&z(p),h(p)}));on(e,Nl,(e=>o(378,lo=e)));const Hl=Wa([ka,Ca,Ta,Ma,Ra],(([e,t,o,i,r],n)=>{const a=e&&Object.keys(e).map((t=>e[t])).filter(Boolean);n({gamma:o||void 0,vignette:i||void 0,noise:r||void 0,convolutionMatrix:t||void 0,colorMatrix:a&&a.length&&jr(a)})}));let jl,Ul;const Gl=(()=>{if(!$o())return!1;const e=navigator.userAgent.match(/OS (\d+)_(\d+)_?(\d+)?/i)||[],[,t,o]=e.map((e=>parseInt(e,10)||0));return t>13||13===t&&o>=4})(),Zl=Ba({});on(e,Zl,(e=>o(366,jt=e))),Kn("env",Zl);const Xl=Vd(),Yl=Oa(Xl,(e=>{const t=()=>e(Vd()),o=matchMedia(`(resolution: ${Xl}dppx)`);return o.addListener(t),()=>o.removeListener(t)}));on(e,Yl,(e=>o(58,Mo=e)));const ql=((e,t)=>{const{sub:o,pub:i}=Xo(),r=[],n=Ba(0),a=[],s=()=>a.forEach((e=>e({index:tn(n),length:r.length}))),l={get index(){return tn(n)},set index(e){e=Number.isInteger(e)?e:0,e=ns(e,0,r.length-1),n.set(e),t(r[l.index]),s()},get state(){return r[r.length-1]},length:()=>r.length,undo(){const e=l.index--;return i("undo",e),e},redo(){const e=l.index++;return i("redo",l.index),e},revert(){r.length=1,l.index=0,i("revert")},write(o){o&&t({...e(),...o});const a=e(),c=r[r.length-1];JSON.stringify(a)!==JSON.stringify(c)&&(r.length=l.index+1,r.push(a),n.set(r.length-1),s(),i("writehistory"))},set(e={}){r.length=0,l.index=0;const t=Array.isArray(e)?e:[e];r.push(...t),l.index=r.length-1},get:()=>[...r],subscribe:e=>(a.push(e),e({index:l.index,length:r.length}),()=>a.splice(a.indexOf(e),1)),on:o};return l})((()=>yo),(e=>{un(Fa,yo=e,yo),ps.set(bo)}));_i(),_i=en(ql,(e=>o(384,fo=e)));const Kl=()=>{const e={x:0,y:0,...bt},t=St(xt(e,yo.cropAspectRatio),Math.round),o=mr({...yo,rotation:0,crop:t},yo),i=[o];JSON.stringify(o)!==JSON.stringify(yo)&&i.push({...yo}),ql.set(i)},Ql=sa.subscribe((e=>{e&&e.complete&&Kl()})),oc=()=>cr().then((e=>e&&ql.revert())),ic=Ba(!1);on(e,ic,(e=>o(367,Gt=e)));const rc=()=>{un(ic,Gt=!0,Gt),dr().then((e=>{if(!e)return void un(ic,Gt=!1,Gt);let t;t=Lc.subscribe((e=>{1===e&&(t&&t(),Ni("processImage"))}))}))},nc=la.subscribe((e=>{if(!e)return void un(ic,Gt=!1,Gt);un(ic,Gt=!0,Gt);const{complete:t,abort:o}=e;(t||o)&&un(ic,Gt=!1,Gt)})),ac=Ap();on(e,ac,(e=>o(56,ro=e)));const sc=Wa([ac],(([e],t)=>{if(!e.length)return t();const{origin:o,translation:i,rotation:r,scale:n}=e[0];t({origin:o,translation:i,rotation:r,scale:n})})),lc=Ba();on(e,lc,(e=>o(381,po=e)));let cc,dc=[];const uc=Ba(),hc=Ba(),pc=Wa([Xs,hc,Zs,Ys],(([e,t,o,i])=>e||(t||o<1?i:1))),mc={...Zi,imageFile:Qn,imageSize:ea,mediaDuration:oa,mediaMinDuration:na,mediaMaxDuration:aa,mediaTrim:ia,imageBackgroundColor:wa,imageBackgroundImage:Sa,imageCropAspectRatio:ca,imageCropMinSize:ha,imageCropMaxSize:pa,imageCropLimitToImage:da,imageCropRect:ua,imageCropRectOrigin:ga,imageCropRectSnapshot:Ps,imageCropRectAspectRatio:$a,imageCropRange:ma,imageRotation:fa,imageRotationRange:ya,imageFlipX:xa,imageFlipY:va,imageOutputSize:ba,imageColorMatrix:ka,imageConvolutionMatrix:Ca,imageGamma:Ta,imageVignette:Ma,imageNoise:Ra,imageManipulation:Ia,imageDecoration:Pa,imageAnnotation:Ea,imageRedaction:Aa,imageFrame:La,imagePreview:Bl,imagePreviewSource:zl,imageTransforms:Nl,imagePreviewModifiers:_l,history:ql,animation:ws,pixelRatio:Yl,elasticityMultiplier:lr,scrollElasticity:ym,rangeInputElasticity:5,redrawTrigger:_n,pointerAccuracy:fs,pointerHoverable:ys,env:Zl,rootRect:hs,stageRect:js,stageRectBase:Bs,stageRecenter:Os,stageScalar:Zs,stagePadding:Vs,stagePadded:Ns,presentationScalar:xl,imagePreviewUpscale:hc,utilRect:$s,utilRectPadded:Hs,allowPlayPause:yn,allowPan:qa,allowZoom:Ka,allowZoomControls:Ja,enableZoomInput:es,enablePanInput:Qa,enablePanInputStatus:is,imageSelectionMultiTouching:uc,rootBackgroundColor:rs,rootForegroundColor:as,rootLineColor:ss,rootColorSecondary:cs,imageOutlineOpacity:kl,utilTools:lc,imageSelectionPan:Js,imageSelectionZoom:Xs,imageSelectionZoomCurrent:pc,imageSelectionStageFitScalar:Ys,imageSelectionStoredState:Qs,imageOverlayMarkup:Tl,interfaceImages:Vl,isInteracting:xs,isTransformingImage:bs,isInteractingFraction:vs,imageCropRectIntent:Es,imageCropRectPresentation:Is,imageSelectionRect:As,imageSelectionRectIntent:zs,imageSelectionRectPresentation:tl,imageSelectionRectSnapshot:Ls,imageScalar:bl,imageTransformsInterpolated:sc,imageEffects:Hl};delete mc.image;const gc="util-"+L();let $c=[];const fc=e=>B.find((([t])=>e===t));let yc=[],bc=$o();const xc=(e,t,o)=>{let i=ye.getPropertyValue(e);i=o?o(i):/^[0-9]+$/.test(i)?parseFloat(i):void 0,t.set(i,{hard:!Zt})},wc=(e,t,o=!1)=>{const i=(e=>{const t=ye.getPropertyValue(e);return Bh(t)})(e);i&&0!==i[3]&&(o||(i.length=3),t.set(i,{hard:!Zt}))},Sc=Ba();on(e,Sc,(e=>o(88,xi=e)));const kc=Ba();on(e,kc,(e=>o(89,vi=e)));const Cc=Ba();on(e,Cc,(e=>o(90,wi=e)));const Tc=ec(0,{damping:.9});on(e,Tc,(e=>o(91,Si=e)));const Rc=()=>{wc("color",as),wc(Kr?"--color-background":"background-color",rs),wc("outline-color",ss),wc("--color-primary",ls),wc("--color-secondary",cs),wc("--grid-color-even",kc,!0),wc("--grid-color-odd",Cc,!0),xc("--grid-size",Sc),xc("--editor-inset-top",ms,(e=>parseInt(e,10)))},Pc=Wa([Nl,Hl,wa,Za],(([e,t,o,i])=>e&&{...e,...t,backgroundColor:o,backgroundImage:i}));on(e,Pc,(e=>o(376,no=e)));const Ec=()=>{const e=ac.length?void 0:{resize:1.05},t=((e,t,o={})=>{const{resize:i=1,opacity:r=0}=o,n={opacity:[ec(r,{...Ep,stiffness:.1}),G],resize:[ec(i,{...Ep,stiffness:.1}),G],translation:[ec(void 0,Ep),G],rotation:[ec(void 0,Ip),G],origin:[ec(void 0,Ep),G],scale:[ec(void 0,Ip),G],gamma:[ec(void 0,Ip),e=>e||1],vignette:[ec(void 0,Ip),e=>e||0],colorMatrix:[ec([...Pp],Ep),e=>e||[...Pp]],convolutionMatrix:[Ba(void 0),e=>e&&e.clarity||void 0],backgroundColor:[ec(void 0,Ep),(e,t,o)=>{if(Array.isArray(e)){if(Array.isArray(t)){const i=[...e];0===t[3]?(i[3]=0,o(i)):0===i[3]&&((e=[...t])[3]=0)}return e}}],backgroundImage:[Ba(void 0),G]},a=Object.entries(n).map((([e,t])=>[e,t[0]])),s=a.map((([,e])=>e)),l=Object.entries(n).reduce(((e,[t,o])=>{const[i,r]=o;return e[t]=(e,o)=>i.set(r(e,c[t],(e=>{i.set(e,{hard:!0})})),o),e}),{});let c;const d=Wa(s,(o=>(c=o.reduce(((e,t,o)=>(e[a[o][0]]=t,e)),{}),c.data=e,c.size=t,c.scale*=o[1],c)));return d.get=()=>c,d.set=(e,t)=>{const o={hard:!t};Object.entries(e).forEach((([e,t])=>{l[e]&&l[e](t,o)}))},d})(mt,bt,e);ac.unshift(t),Ic(no)},Ic=e=>{ac.forEach(((t,o)=>{const i=0===o?1:0;t.set({...e,opacity:i,resize:1},ao)}))};let Ac;const Lc=Jl(void 0,{duration:500});let zc;on(e,Lc,(e=>o(55,Jt=e)));const Fc=Ba(!1);let Dc;on(e,Fc,(e=>o(371,Qt=e)));const Oc=ec(void 0,{stiffness:.1,damping:.7,precision:.25});on(e,Oc,(e=>o(83,mi=e)));const Bc=ec(0,{stiffness:.1,precision:.05});on(e,Bc,(e=>o(84,gi=e)));const Wc=ec(0,{stiffness:.02,damping:.5,precision:.25});on(e,Wc,(e=>o(369,qt=e)));const _c=ec(void 0,{stiffness:.02,damping:.5,precision:.25});on(e,_c,(e=>o(370,Kt=e)));const Vc=ec(void 0,{stiffness:.02,damping:.5,precision:.25});let Nc;on(e,Vc,(e=>o(368,Yt=e)));const Hc=()=>{Ni("abortLoadImage")},jc=()=>{Ni("abortProcessImage"),un(ic,Gt=!1,Gt)},Uc=e=>{e.target&&"true"===e.target.dataset.touchScroll||e.preventDefault()},Gc=Gl?e=>{const t=e.touches?e.touches[0]:e;t.pageX>20&&t.pageXo(463,Vt=e))),Kn("keysPressed",Zc);const Xc=e=>{!e||Vo(e)&&!(e=>/^image/.test(e.type)&&!/svg/.test(e.type))(e)||!Vo(e)&&!/^http/.test(e)||Ni("loadImage",e)},Yc=e=>{e&&Xc(e)};let qc=void 0;let Kc,Jc=[];const Qc=Ba();Kn("rootPortal",Qc),Kn("rootRect",hs);const ed=()=>({foregroundColor:[...Lt],lineColor:[...At],utilVisibility:{...N},isInteracting:It,isInteractingFraction:Et,rootRect:Ke(Pt),stageRect:Ke(Rt),manipulationShapesDirty:yd,annotationShapesDirty:pd,decorationShapesDirty:$d,frameShapesDirty:fd}),td=(e,t,o)=>pr(e,We(t.width/o,t.height/o)),od=(e,t,o)=>{var i;return e._translate=ue((i=t).x,i.y),e._scale=o,e},id=e=>{const t=[];return e.forEach((e=>t.push(rd(e)))),t.filter(Boolean)},rd=e=>Pi(e)?(e.points=[ue(e.x1,e.y1),ue(e.x2,e.y2)],e):(!(e=>ki(e)&&!e.text.length)(e)||e.backgroundColor&&0!==e.backgroundColor[3]||(Ci(e)&&(e.width=5,e.height=e.lineHeight),e.strokeWidth=1,e.strokeColor=[1,1,1,.5],e.backgroundColor=[0,0,0,.1]),e);let nd,ad=[],sd=[],ld=[],cd=[],dd=[],ud={};const hd=(e,t,o,i,r,n,a)=>{const{manipulationShapesDirty:s,annotationShapesDirty:l,decorationShapesDirty:c,frameShapesDirty:d,selectionRect:u,scale:h}=e,p=nd!==h,m=p||!ht(ud,u);m&&(nd=h,ud=u),s&&(ld=t.filter(Ai).map(fi).map((e=>pr(e,bt)))),(l||o!==Mt)&&(ad=o.filter(Ai).map(fi).sort(((e,t)=>e.alwaysOnTop?1:t.alwaysOnTop?-1:0)).map((e=>pr(e,bt)))),(p||md||l||o!==Mt)&&(sd=id(ad.map((e=>y(e,{flipX:kt,flipY:wt,rotation:Tt,scale:h,context:Qe(bt)}))).flat())),(c||i!==yt||m)&&(cd=id(i.filter(Ai).map(fi).sort(((e,t)=>e.alwaysOnTop?1:t.alwaysOnTop?-1:0)).map((e=>td(e,u,h))).map((e=>y(e,{context:u}))).flat().map((e=>od(e,u,h))))),(d||n!==gt||m)&&(dd=n?id([n].map(fi).map((e=>td(e,u,h))).map(y).flat().map((e=>od(e,u,h)))):[]);let g=id(r.filter(Ai));return"undefined"!=typeof window&&(e=>{if(e&&e._clpdx4s)return;const[t]=[[85,110,108,105,99,101,110,115,101,100,32,80,105,110,116,117,114,97,32,105,110,115,116,97,110,99,101]].map((e=>e.map((e=>String.fromCharCode(e))).join("")));g=[...g,{x:u.x+.5*u.width-82,y:u.y+u.height-16-12,width:164,height:16,text:t,fontWeight:900,fontSize:12,color:[1,1,1,.25]}]})(window),{manipulationShapesDirty:s,manipulationShapes:ld,annotationShapesDirty:l,annotationShapes:sd,decorationShapesDirty:c,decorationShapes:cd,frameShapesDirty:d,frameShapes:dd,interfaceShapes:g,selectionShapes:a.map(fi).map((e=>pr(e,bt)))}};let pd=!0;let md=!0;let $d=!0;let fd=!0;let yd=!0;Yn((()=>{En(),mt&&R(mt.src)&&/^blob:/.test(mt.src)&&URL.revokeObjectURL(mt.src),Xa(),pl(),hl(),ml(),$l(),fl(),yl(),Ql(),nc(),fs.destroy(),ys.destroy(),Jn.destroy(),ac.clear(),ad.length=0,sd.length=0,ld.length=0,cd.length=0,dd.length=0;try{o(228,Wl=void 0),o(283,Ac=void 0)}catch(e){}}));return e.$$set=e=>{"class"in e&&o(229,Ui=e.class),"layout"in e&&o(230,Gi=e.layout),"stores"in e&&o(231,Zi=e.stores),"locale"in e&&o(3,Xi=e.locale),"id"in e&&o(4,Yi=e.id),"util"in e&&o(232,qi=e.util),"utils"in e&&o(233,Ki=e.utils),"animations"in e&&o(234,Ji=e.animations),"disabled"in e&&o(235,Qi=e.disabled),"status"in e&&o(227,er=e.status),"previewUpscale"in e&&o(236,tr=e.previewUpscale),"previewPad"in e&&o(237,or=e.previewPad),"previewMaskOpacity"in e&&o(5,ir=e.previewMaskOpacity),"previewImageDataMaxSize"in e&&o(238,rr=e.previewImageDataMaxSize),"previewImageTextPixelRatio"in e&&o(6,nr=e.previewImageTextPixelRatio),"markupMaskOpacity"in e&&o(7,ar=e.markupMaskOpacity),"zoomMaskOpacity"in e&&o(239,sr=e.zoomMaskOpacity),"elasticityMultiplier"in e&&o(8,lr=e.elasticityMultiplier),"willRevert"in e&&o(240,cr=e.willRevert),"willProcessImage"in e&&o(241,dr=e.willProcessImage),"willRenderCanvas"in e&&o(9,ur=e.willRenderCanvas),"willRenderToolbar"in e&&o(242,hr=e.willRenderToolbar),"willSetHistoryInitialState"in e&&o(243,mr=e.willSetHistoryInitialState),"enableButtonExport"in e&&o(244,gr=e.enableButtonExport),"enableButtonRevert"in e&&o(245,$r=e.enableButtonRevert),"enableNavigateHistory"in e&&o(246,fr=e.enableNavigateHistory),"enableToolbar"in e&&o(10,xr=e.enableToolbar),"enableUtils"in e&&o(247,vr=e.enableUtils),"enableButtonClose"in e&&o(248,wr=e.enableButtonClose),"enableDropImage"in e&&o(249,kr=e.enableDropImage),"enablePasteImage"in e&&o(250,Cr=e.enablePasteImage),"enableBrowseImage"in e&&o(251,Tr=e.enableBrowseImage),"enableTransparencyGrid"in e&&o(11,Mr=e.enableTransparencyGrid),"layoutDirectionPreference"in e&&o(252,Rr=e.layoutDirectionPreference),"layoutHorizontalUtilsPreference"in e&&o(253,Pr=e.layoutHorizontalUtilsPreference),"layoutVerticalUtilsPreference"in e&&o(254,Er=e.layoutVerticalUtilsPreference),"layoutVerticalToolbarPreference"in e&&o(255,Ir=e.layoutVerticalToolbarPreference),"layoutVerticalControlGroupsPreference"in e&&o(256,Ar=e.layoutVerticalControlGroupsPreference),"layoutVerticalControlTabsPreference"in e&&o(257,Lr=e.layoutVerticalControlTabsPreference),"textDirection"in e&&o(12,zr=e.textDirection),"markupEditorZoomLevel"in e&&o(258,Fr=e.markupEditorZoomLevel),"markupEditorZoomLevels"in e&&o(13,Dr=e.markupEditorZoomLevels),"markupEditorZoomAdjustStep"in e&&o(14,Or=e.markupEditorZoomAdjustStep),"markupEditorZoomAdjustFactor"in e&&o(15,Br=e.markupEditorZoomAdjustFactor),"markupEditorZoomAdjustWheelFactor"in e&&o(16,Wr=e.markupEditorZoomAdjustWheelFactor),"markupEditorInteractionMode"in e&&o(259,_r=e.markupEditorInteractionMode),"muteAudio"in e&&o(260,Vr=e.muteAudio),"willSetMediaInitialTimeOffset"in e&&o(261,Nr=e.willSetMediaInitialTimeOffset),"enablePan"in e&&o(17,Hr=e.enablePan),"enableZoom"in e&&o(18,Zr=e.enableZoom),"enableZoomControls"in e&&o(262,Xr=e.enableZoomControls),"enableZoomInput"in e&&o(19,Yr=e.enableZoomInput),"enablePanInput"in e&&o(263,qr=e.enablePanInput),"enableCanvasAlpha"in e&&o(20,Kr=e.enableCanvasAlpha),"enablePanLimit"in e&&o(21,Jr=e.enablePanLimit),"panLimitGutterScalar"in e&&o(22,Qr=e.panLimitGutterScalar),"zoomPresetOptions"in e&&o(23,rn=e.zoomPresetOptions),"zoomAdjustStep"in e&&o(24,nn=e.zoomAdjustStep),"zoomAdjustFactor"in e&&o(25,an=e.zoomAdjustFactor),"zoomAdjustWheelFactor"in e&&o(26,sn=e.zoomAdjustWheelFactor),"zoomLevel"in e&&o(0,ln=e.zoomLevel),"imagePreviewSrc"in e&&o(266,cn=e.imagePreviewSrc),"imageOrienter"in e&&o(267,dn=e.imageOrienter),"pluginComponents"in e&&o(268,hn=e.pluginComponents),"pluginOptions"in e&&o(27,pn=e.pluginOptions),"root"in e&&o(2,$n=e.root),"imageSourceToImageData"in e&&o(28,Xn=e.imageSourceToImageData),"imagePreviewCurrent"in e&&o(228,Wl=e.imagePreviewCurrent)},e.$$.update=()=>{if(1&e.$$.dirty[0]|1024&e.$$.dirty[8]&&o(0,ln=null===ln?Fr:ln),2&e.$$.dirty[0]|1048576&e.$$.dirty[8]){let e=!1;hn.forEach((([t])=>{gn[t]||(o(1,gn[t]={},gn),e=!0)})),e&&o(280,Nn=[...hn])}var t,m,v,w;if(8&e.$$.dirty[0]|65536&e.$$.dirty[7]|2&e.$$.dirty[9]&&o(335,O=Xi&&Nn.length?Ki||Nn.map((([e])=>e)):[]),134217728&e.$$.dirty[0]|2&e.$$.dirty[9]|33554432&e.$$.dirty[10]|1024&e.$$.dirty[12]&&o(336,B=((e,t,o,i)=>{const r=t.filter((([t])=>e.includes(t))).filter((([e,{isSupported:t}])=>t({...i,...o[e]}))).map((([e,t])=>[e,t.Component]));return ds(r,$c,((e,t)=>e[0]===t[0]&&e[1]===t[1]))?$c:($c=r,r)})(O,Nn,pn,{src:mo})),67108864&e.$$.dirty[10]&&o(291,W=B.length),8&e.$$.dirty[0]|4096&e.$$.dirty[9]|33554432&e.$$.dirty[10]&&o(47,_=W&&O.map((e=>{const t=fc(e);if(t)return{id:e,view:t[1],tabIcon:Xi[e+"Icon"],tabLabel:Xi[e+"Label"]}})).filter(Boolean)||[]),65536&e.$$.dirty[1]&&o(353,i=!!_.find((e=>"trim"===e.id))),12288&e.$$.dirty[11]|32&e.$$.dirty[13]&&o(290,r=!!(hi&&mt&&i)),32768&e.$$.dirty[7]|4096&e.$$.dirty[9]&&o(44,V=W&&qi&&"string"==typeof qi&&fc(qi)?qi:W>0?B[0][0]:void 0),8192&e.$$.dirty[1]|2048&e.$$.dirty[9]&&r&&V&&En(),2048&e.$$.dirty[9]|8192&e.$$.dirty[11]&&(r?(mt.addEventListener("play",Sn),mt.addEventListener("pause",Sn)):mt&&"video"===mt.nodeName&&(mt.removeEventListener("play",Sn),mt.removeEventListener("pause",Sn))),2048&e.$$.dirty[9]&&r&&xn.set(Bn()/On()),24&e.$$.dirty[13]&&(e=>{if(!In())return;const t=Date.now();if(Cn&&t-Cn<16)return;Cn=t;const o=hi*e;if(o.toFixed(1)===kn)return;kn=o.toFixed(1);const i=mt,r=()=>{i.removeEventListener("seeked",r),fn()};i.addEventListener("seeked",r),((e,t)=>{e.fastSeek&&e.fastSeek(t),e.currentTime=t})(i,o)})(di||ui),16&e.$$.dirty[13]&&o(351,n=ui&&se(ui,6)),97&e.$$.dirty[13]&&o(349,s=ni||[[0,Math.min(hi,pi)/hi]]),256&e.$$.dirty[11]&&(l=s[0][0]),256&e.$$.dirty[11]&&(c=s[s.length-1][1]),256&e.$$.dirty[11]&&o(352,d=s.map((([e,t])=>[se(e,6),se(t,6)]))),3072&e.$$.dirty[11]&&o(350,u=d.findIndex((([e,t])=>n>=e&&n<=t))),3584&e.$$.dirty[11]&&(h=-1===u&&d.findIndex(((e,t,o)=>{const i=o[t-1];return i?n<=e[0]&&n>=i[1]:n<=e[0]}))),4096&e.$$.dirty[8]&&Dn.set(Vr),8192&e.$$.dirty[11]|4&e.$$.dirty[13]&&(mt&&ci?Ln():zn()),8192&e.$$.dirty[11]|2&e.$$.dirty[13]&&mt&&(e=>{if(!r)return;mt.volume=Math.min(1,e)})(li),256&e.$$.dirty[0]&&un(Vn,si=lr,si),8192&e.$$.dirty[7]&&o(345,p="overlay"===Gi),1073741824&e.$$.dirty[7]|16&e.$$.dirty[11]&&o(45,g=vr&&!p),134217730&e.$$.dirty[0]&&pn&&Object.entries(pn).forEach((([e,t])=>{Object.entries(t).forEach((([t,i])=>{gn[e]&&o(1,gn[e][t]=i,gn)}))})),262144&e.$$.dirty[7]&&Hn.set(Qi?1:0),2097152&e.$$.dirty[7]&&($=rr?(t=rr,m=Un,We(Math.min(t.width,m.width),Math.min(t.height,m.height))):Un),1073741824&e.$$.dirty[12]&&Jn.update(ri[0]),536870912&e.$$.dirty[12]&&(y=ii?(e,t)=>ii(e,{flipX:void 0,flipY:void 0,rotation:void 0,...t,isPreview:!0}):G),536870912&e.$$.dirty[1]&&Array.isArray(oi)&&Ni("selectionchange",[...oi]),16384&e.$$.dirty[8]|268435456&e.$$.dirty[12]&&ts.set(ti&&Xr),34816&e.$$.dirty[8]&&os.set("pan"===_r||qr),2097152&e.$$.dirty[1]&&Ht&&hs.set(nt(Ht.x,Ht.y,Ht.width,Ht.height)),262160&e.$$.dirty[11]|4&e.$$.dirty[12]&&Pt&&p&&oo&&oo.complete&&(()=>{const e=Jo,t=pt(Pt);e&&e===t||(ca.set(pt(Pt)),Kl())})(),33554432&e.$$.dirty[10]&&o(46,Z=O.length>1),32768&e.$$.dirty[1]&&(Z||ps.set(Je())),1024&e.$$.dirty[0]|134217728&e.$$.dirty[12]&&(xr||gs.set(nt(0,Ko,0,0))),524352&e.$$.dirty[11]&&o(348,x=!It&&b),67108864&e.$$.dirty[12]&&o(346,S=!Yo),2097152&e.$$.dirty[1]&&o(292,qe=Ht&&Ht.width>0&&Ht.height>0),8&e.$$.dirty[0]|12288&e.$$.dirty[9]&&o(41,et=qe&&Xi&&!!W),1024&e.$$.dirty[1]&&setTimeout((()=>o(281,ks=et)),1),131072&e.$$.dirty[7]|4&e.$$.dirty[9]|160&e.$$.dirty[11]&&un(ws,ao="always"===Ji?x:"never"!==Ji&&(x&&ks&&S),ao),131072&e.$$.dirty[7]|96&e.$$.dirty[11]&&un(Ss,Zt="always"===Ji?b:"never"!==Ji&&(b&&S),Zt),524288&e.$$.dirty[7]|16&e.$$.dirty[11]&&Ts.set(tr||p),1048576&e.$$.dirty[7]&&_s.set(or),4&e.$$.dirty[0]|41943040&e.$$.dirty[12]&&$n&&($n.dispatchEvent(vp("markupzoom",Zo)),$n.dispatchEvent(vp("zoom",Ao(Zo)?Zo:No))),4&e.$$.dirty[0]|16777216&e.$$.dirty[12]&&$n&&($n.dispatchEvent(vp("markuppan",jo)),$n.dispatchEvent(vp("pan",jo))),2097152&e.$$.dirty[12]&&zo&&el(),4194304&e.$$.dirty[12]&&Fo&&il(),8396800&e.$$.dirty[1]&&V&&kl.set(.075,{hard:!Zt}),4194304&e.$$.dirty[7]&&o(343,k=sr),1572864&e.$$.dirty[12]&&o(344,C=Eo?-Math.max(...Object.values(Po)):0),277872640&e.$$.dirty[1]|12&e.$$.dirty[11]&&Ro){let e=Ro.x-Rt.x,t=Rt.x+Rt.width-(Ro.x+Ro.width),o=Ro.y-Rt.y,i=Rt.y+Rt.height-(Ro.y+Ro.height),r=Math.min(e,o,t,i);Rl.set(r>C?0:Math.min(k,Math.abs(r/64)),{hard:!Zt})}if(134217728&e.$$.dirty[1]&&o(342,T=.55/Mo),9437184&e.$$.dirty[1]|2&e.$$.dirty[11]&&Rt&&Pl.set({x:0,y:Rt.y,width:Rt.x<64?0:Rt.x,height:Rt.height+T},{hard:!Zt}),9437184&e.$$.dirty[1]|262146&e.$$.dirty[11]&&Rt&&El.set({x:0,y:0,width:Pt.width,height:Rt.y+T},{hard:!Zt}),9437184&e.$$.dirty[1]|262146&e.$$.dirty[11]&&Rt){let e=Rt.x+Rt.width,t=Pt.width-(Rt.x+Rt.width);t<64&&(e+=t,t=0),Il.set({x:e,y:Rt.y,width:t,height:Rt.height+T},{hard:!Zt})}if(9437184&e.$$.dirty[1]|262144&e.$$.dirty[11]&&Rt&&Al.set({x:0,y:Rt.y+Rt.height,width:Pt.width,height:Pt.height-(Rt.y+Rt.height)},{hard:!Zt}),67108864&e.$$.dirty[1]|294912&e.$$.dirty[12]&&o(338,M=To&&{id:fm,backgroundColor:So,opacity:wo,...To}),67108864&e.$$.dirty[1]|163840&e.$$.dirty[12]&&o(341,P=Co&&{id:fm,backgroundColor:So,opacity:wo,...Co}),67108864&e.$$.dirty[1]|98304&e.$$.dirty[12]&&o(340,E=ko&&{id:fm,backgroundColor:So,opacity:wo,...ko}),67108864&e.$$.dirty[1]|49152&e.$$.dirty[12]&&o(339,I=vo&&{id:fm,backgroundColor:So,opacity:wo,...vo}),1879048192&e.$$.dirty[10]|1&e.$$.dirty[11]&&o(337,A=[P,E,I,M].filter(Boolean)),134217728&e.$$.dirty[10]|8192&e.$$.dirty[12]&&A&&xo&&Tl.update((e=>[...e.filter((e=>e.id!==fm)),...A])),262144&e.$$.dirty[8]|1024&e.$$.dirty[12]&&zl.set(cn||(mo||void 0)),4&e.$$.dirty[0]|2048&e.$$.dirty[7]|8192&e.$$.dirty[11]&&(o(228,Wl=mt),mt&&$n.dispatchEvent(vp("loadpreview",Wl))),8&e.$$.dirty[12]&&io&&(Js.set(de()),Xs.set(void 0),el(),Vl.set([])),4096&e.$$.dirty[12]&&o(296,F=fo.index>0),4096&e.$$.dirty[12]&&o(295,D=fo.index(e[t.id]=N&&N[t.id]||0,e)),{})),8192&e.$$.dirty[1]&&o(80,H={name:gc,selected:V}),65536&e.$$.dirty[1]&&o(79,j=_.map((e=>({id:e.id,icon:e.tabIcon,label:e.tabLabel})))),65536&e.$$.dirty[1]&&o(78,U=_.map((e=>e.id))),4096&e.$$.dirty[7]&&o(77,X=Mc(["PinturaRoot","PinturaRootComponent",Ui])),262144&e.$$.dirty[11]&&o(331,Y=Pt&&(Pt.width>1e3?"wide":Pt.width<600?"narrow":void 0)),262144&e.$$.dirty[11]&&o(318,q=Pt&&(Pt.width<=320||Pt.height<=460)),262144&e.$$.dirty[11]&&o(330,K=Pt&&(Pt.height>1e3?"tall":Pt.height<600?"short":void 0)),4&e.$$.dirty[0]&&o(298,J=$n&&$n.parentNode&&$n.parentNode.classList.contains("PinturaModal")),1&e.$$.dirty[1]|524288&e.$$.dirty[9]|262144&e.$$.dirty[11]&&o(323,Q=J&&Pt&&jl>Pt.width),2&e.$$.dirty[1]|524288&e.$$.dirty[9]|262144&e.$$.dirty[11]&&o(322,ee=J&&Pt&&Ul>Pt.height),12288&e.$$.dirty[10]&&o(324,te=Q&&ee),1048576&e.$$.dirty[0]&&o(321,oe=Kr),2097152&e.$$.dirty[10]&&o(293,ie="narrow"===Y),16&e.$$.dirty[8]|262144&e.$$.dirty[11]&&o(332,(v=Pt,w=Rr,re=Pt?"auto"===w?v.width>v.height?"landscape":"portrait":"horizontal"===w?v.width<500?"portrait":"landscape":"vertical"===w?v.height<400?"landscape":"portrait":void 0:"landscape")),4194304&e.$$.dirty[10]&&o(76,ne="landscape"===re),16384&e.$$.dirty[9]|1048576&e.$$.dirty[10]&&o(320,ae=ie||"short"===K),1&e.$$.dirty[1]|262144&e.$$.dirty[11]&&o(319,le=bc&&Pt&&jl===Pt.width&&!Gl),4&e.$$.dirty[1]|512&e.$$.dirty[12]&&o(294,ce=[...po||[],...dc].filter(Boolean)),32&e.$$.dirty[8]&&o(329,he="has-navigation-preference-"+Pr),64&e.$$.dirty[8]&&o(328,pe="has-navigation-preference-"+Er),128&e.$$.dirty[8]&&o(325,me="has-toolbar-preference-"+Ir),256&e.$$.dirty[8]&&o(327,ge="has-controlgroups-preference-"+Ar),512&e.$$.dirty[8]&&o(326,$e="has-controltabs-preference-"+Lr),262144&e.$$.dirty[11]&&o(334,fe=void 0!==Pt&&Pt.width>0&&Pt.height>0),4&e.$$.dirty[0]|16777216&e.$$.dirty[10]&&o(333,ye=fe&&$n&&getComputedStyle($n)),8388608&e.$$.dirty[10]&&ye&&Rc(),1024&e.$$.dirty[0]|8437760&e.$$.dirty[1]|270336&e.$$.dirty[7]|524288&e.$$.dirty[9]|8388352&e.$$.dirty[10]|33554432&e.$$.dirty[11]|384&e.$$.dirty[12]&&Zl.set({...jt,layoutMode:Gi,orientation:re,horizontalSpace:Y,verticalSpace:K,navigationHorizontalPreference:he,navigationVerticalPreference:pe,controlGroupsVerticalPreference:ge,controlTabsVerticalpreference:$e,toolbarVerticalPreference:me,isModal:J,isDisabled:Qi,isCentered:te,isCenteredHorizontally:Q,isCenteredVertically:ee,isAnimated:Zt,isTransparent:oe,pointerAccuracy:ho,pointerHoverable:uo,isCompact:ae,hasSwipeNavigation:le,hasLimitedSpace:q,hasToolbar:xr,hasNavigation:Z&&g,isIOS:bc,browserVersion:Dl()?"chrome-"+(navigator.userAgent.match(/Chrome\/([0-9]+)/)||[])[1]:void 0}),33554432&e.$$.dirty[11]&&o(75,be=Object.entries(jt).map((([e,t])=>/^is|has/.test(e)?t?wp(e):void 0:t)).filter(Boolean).join(" ")),8192&e.$$.dirty[1]&&V&&lc.set([]),96&e.$$.dirty[12]&&o(74,ve=lo&&Object.entries(so).filter((([,e])=>null!=e)).reduce(((e,[,t])=>e={...e,...t}),{})),4&e.$$.dirty[12]&&o(315,Ce=oo&&"any-to-file"===oo.task),32&e.$$.dirty[10]&&Ce&&ac&&ac.clear(),16&e.$$.dirty[12]&&o(317,we=!!no&&!!no.translation),16&e.$$.dirty[9]|128&e.$$.dirty[10]|8192&e.$$.dirty[11]&&we&&mt&&mt!==Ac&&(o(283,Ac=mt),Ec()),128&e.$$.dirty[10]|16&e.$$.dirty[12]&&we&&Ic(no),33554432&e.$$.dirty[1]&&ro&&ro.length>1){let e=[];ac.forEach(((t,o)=>{0!==o&&t.get().opacity<=0&&e.push(t)})),e.forEach((e=>ac.remove(e)))}if(8&e.$$.dirty[0]|64&e.$$.dirty[10]&&o(40,ke=Xi&&Se.length&&Xi.labelSupportError(Se)),4&e.$$.dirty[12]&&o(307,Te=oo&&!!oo.error),4&e.$$.dirty[12]&&o(43,Me=!oo||!oo.complete&&void 0===oo.task),4&e.$$.dirty[12]&&o(308,Re=oo&&(oo.taskLengthComputable?oo.taskProgress:1/0)),32&e.$$.dirty[10]&&Ce&&un(Ll,eo=!1,eo),8388608&e.$$.dirty[1]|32&e.$$.dirty[9]|4&e.$$.dirty[12]&&oo&&oo.complete){const e=Zt?250:0;clearTimeout(zc),o(284,zc=setTimeout((()=>{un(Ll,eo=!0,eo)}),e))}if(4096&e.$$.dirty[1]|268435456&e.$$.dirty[9]|5&e.$$.dirty[12]&&o(312,Pe=oo&&!Te&&!Me&&!eo),8&e.$$.dirty[9]|8192&e.$$.dirty[11]|8&e.$$.dirty[12]&&o(311,Ee=!(!io||mt&&!Ol)),8388608&e.$$.dirty[1]|1&e.$$.dirty[12])if(eo){setTimeout((()=>Tc.set(1)),Zt?500:0)}else Tc.set(0);if(67108864&e.$$.dirty[11]|2&e.$$.dirty[12]&&o(306,Ie=!!(Gt||to&&void 0!==to.progress&&!to.complete)),134217728&e.$$.dirty[9]&&Ie&&En(),4096&e.$$.dirty[1]|4&e.$$.dirty[12]&&o(309,Ae=oo&&!(oo.error||Me)),8&e.$$.dirty[0]|4&e.$$.dirty[12]&&o(310,Le=Xi&&(oo?!oo.complete||oo.error?dl(Xi.statusLabelLoadImage(oo),oo.error&&oo.error.metadata,"{","}"):Xi.statusLabelLoadImage({progress:1/0,task:"blob-to-bitmap"}):Xi.statusLabelLoadImage(oo))),8&e.$$.dirty[0]|2&e.$$.dirty[12]&&o(305,ze=to&&Xi&&Xi.statusLabelProcessImage(to)),2&e.$$.dirty[12]&&o(303,Fe=to&&(to.taskLengthComputable?to.taskProgress:1/0)),2&e.$$.dirty[12]&&o(304,De=to&&!to.error),2&e.$$.dirty[12]&&o(302,Oe=!(!to||!to.error)),8&e.$$.dirty[0]|4096&e.$$.dirty[1]|1024&e.$$.dirty[7]|2139095040&e.$$.dirty[9]|7&e.$$.dirty[10])if(er){let e,t,i,r,n;R(er)&&(e=er),Ao(er)?t=er:Array.isArray(er)&&([e,t,n]=er,!1===t&&(r=!0),Ao(t)&&(i=!0)),o(35,Dc=(e||t)&&{text:e,aside:r||i,progressIndicator:{visible:i,progress:t},closeButton:r&&{label:Xi.statusLabelButtonClose,icon:Xi.statusIconButtonClose,onclick:n||(()=>o(227,er=void 0))}})}else o(35,Dc=Xi&&Me||Te||Pe||Ee?{text:Le,aside:Te||Ae,progressIndicator:{visible:Ae,progress:Re},closeButton:Te&&{label:Xi.statusLabelButtonClose,icon:Xi.statusIconButtonClose,onclick:Hc}}:Xi&&Ie&&ze?{text:ze,aside:Oe||De,progressIndicator:{visible:De,progress:Fe},closeButton:Oe&&{label:Xi.statusLabelButtonClose,icon:Xi.statusIconButtonClose,onclick:jc}}:void 0);if(1024&e.$$.dirty[7]&&o(314,Be=void 0!==er),8388608&e.$$.dirty[1]|524288&e.$$.dirty[9]|2&e.$$.dirty[12]&&J&&to&&to.complete&&(Fc.set(!0),setTimeout((()=>Fc.set(!1)),Zt?100:0)),4&e.$$.dirty[0]|8192&e.$$.dirty[1]|1&e.$$.dirty[12]&&eo&&$n&&$n.dispatchEvent(vp("selectutil",V)),4608&e.$$.dirty[1]|402653184&e.$$.dirty[9]|22&e.$$.dirty[10]|1073741824&e.$$.dirty[11]&&o(313,_e=Qt||ke||Me||Te||Pe||Ee||Ie||Be),8&e.$$.dirty[10]&&un(Lc,Jt=_e?1:0,Jt),8388608&e.$$.dirty[1]|8&e.$$.dirty[10]&&Lc.set(_e?1:0,{duration:Zt?500:1}),16777216&e.$$.dirty[1]&&o(42,Ve=Jt>0),16&e.$$.dirty[1]&&o(301,Ne=!(!Dc||!Dc.aside)),8390672&e.$$.dirty[1]|4194368&e.$$.dirty[9]|536870912&e.$$.dirty[11]&&Ve&&Dc){clearTimeout(Nc);const e={hard:!1===Zt};if(Ne){const t=!!Dc.error||!Zt;Bc.set(1,e),Oc.set(Kt,{hard:t}),o(285,Nc=setTimeout((()=>{Wc.set(16,e)}),1))}else Bc.set(0,e),o(285,Nc=setTimeout((()=>{Wc.set(0,e)}),1))}if(2048&e.$$.dirty[1]&&(Ve||(Vc.set(void 0,{hard:!0}),Oc.set(void 0,{hard:!0}),Wc.set(0,{hard:!0}))),268435456&e.$$.dirty[11]&&o(300,He=.5*qt),2097152&e.$$.dirty[9]|134217728&e.$$.dirty[11]&&o(73,je=`transform: translateX(${Yt-He}px)`),512&e.$$.dirty[1]|8192&e.$$.dirty[11]&&o(39,ct=mt&&!ke),256&e.$$.dirty[1]|1572864&e.$$.dirty[9]&&o(297,Ge=Ue&&(ct||J)?Uc:a),262144&e.$$.dirty[9]&&o(72,Ze=Ge),262144&e.$$.dirty[9]&&o(71,Xe=Ge),8&e.$$.dirty[0]|4194304&e.$$.dirty[1]|973078528&e.$$.dirty[7]|1&e.$$.dirty[8]|245760&e.$$.dirty[9]|33554432&e.$$.dirty[11]&&o(70,Ye=Xi&&Ut&&Fp((()=>hr([["div","alpha",{class:"PinturaNavGroup"},[["div","alpha-set",{class:"PinturaNavSet"},[wr&&["Button","close",{label:Xi.labelClose,icon:Xi.iconButtonClose,onclick:()=>Ni("close"),hideLabel:!0}],$r&&["Button","revert",{label:Xi.labelButtonRevert,icon:Xi.iconButtonRevert,disabled:!F,onclick:oc,hideLabel:!0}]]]]],["div","beta",{class:"PinturaNavGroup PinturaNavGroupFloat"},[fr&&["div","history",{class:"PinturaNavSet"},[["Button","undo",{label:Xi.labelButtonUndo,icon:Xi.iconButtonUndo,disabled:!F,onclick:ql.undo,hideLabel:!0}],["Button","redo",{label:Xi.labelButtonRedo,icon:Xi.iconButtonRedo,disabled:!D,onclick:ql.redo,hideLabel:!0}]]],ce.length&&["div","plugin-tools",{class:"PinturaNavSet"},ce.filter(Boolean).map((([e,t,o])=>[e,t,{...o}]))]]],["div","gamma",{class:"PinturaNavGroup"},[gr&&["Button","export",{label:Xi.labelButtonExport,icon:ie&&Xi.iconButtonExport,class:"PinturaButtonExport",onclick:rc,hideLabel:ie}]]]],{...jt},(()=>_n.set({})))))),2097152&e.$$.dirty[11]&&o(289,tt=Ft&&!!Ft.length),1024&e.$$.dirty[9]|2113536&e.$$.dirty[11]&&o(288,it=tt&&Ur(bt,Ft)),1536&e.$$.dirty[9]|25174016&e.$$.dirty[11]&&tt&&((e,t,i,r)=>{if(!t)return;const n={dataSizeScalar:i};r&&r[3]>0&&(n.backgroundColor=[...r]),t(e,n).then((e=>{qc&&f(qc),o(286,qc=e)}))})(mt,Bt,it,Ot),128&e.$$.dirty[9]|6307840&e.$$.dirty[11]&&Ft&&qc&&bt){const{width:e,height:t}=bt,i=Xt()?"pixelated":"auto"===Dt?"auto":"pixelated";o(287,Jc=Ft.map((o=>{const r=nt(o.x,o.y,o.width,o.height),n=$t(Ke(r),o.rotation).map((o=>ue(o.x/e,o.y/t)));return{...o,id:"redaction",flipX:!1,flipY:!1,cornerRadius:0,strokeWidth:0,strokeColor:void 0,backgroundColor:[0,0,0,0],backgroundImage:qc,backgroundImageRendering:i,backgroundCorners:n}})))}256&e.$$.dirty[9]|1048576&e.$$.dirty[11]&&o(37,rt=[...Jc,...zt||[]]),32&e.$$.dirty[1]&&Kc&&Qc.set(Kc),4&e.$$.dirty[0]|256&e.$$.dirty[1]&&ct&&$n.dispatchEvent(vp("ready")),524288&e.$$.dirty[1]&&o(64,pd=!0),245760&e.$$.dirty[11]&&o(65,md=!0),262144&e.$$.dirty[1]&&o(66,$d=!0),131072&e.$$.dirty[1]&&o(67,fd=!0),64&e.$$.dirty[1]&&o(68,yd=!0)},o(347,b=!vc()),z=1===Vd()?e=>{e&&(xe(e.origin,Math.round),xe(e.translation,Math.round))}:G,o(316,Se=[!Rp()&&"WebGL"].filter(Boolean)),o(299,Ue=$o()||v()&&qo()),o(69,at=((e,t=!0)=>o=>{"ping"===o.type&&(t&&o.stopPropagation(),e(o.detail.type,o.detail.data))})(Vi.pub)),[ln,gn,$n,Xi,Yi,ir,nr,ar,lr,ur,xr,Mr,zr,Dr,Or,Br,Wr,Hr,Zr,Yr,Kr,Jr,Qr,rn,nn,an,sn,pn,Xn,Bl,ql,jl,Ul,dc,cc,Dc,Kc,rt,N,ct,ke,et,Ve,Me,V,g,Z,_,gt,yt,Mt,Rt,Ht,Ut,Zt,Jt,ro,So,Mo,Ro,oi,Hi,ji,yc,pd,md,$d,fd,yd,at,Ye,Xe,Ze,je,ve,be,ne,X,U,j,H,bo,ai,mi,gi,$i,yi,bi,xi,vi,wi,Si,Ti,Mi,Ri,Ei,Ii,Li,zi,Fi,Di,Oi,Bi,yn,bn,xn,Dn,_n,Vn,Hn,Qn,ea,oa,ia,ra,aa,sa,la,ca,da,ua,fa,xa,va,wa,Pa,Ea,Ia,Aa,La,za,Fa,_a,Va,Na,Ha,ja,Ua,qa,Ka,Ja,Qa,es,ts,os,is,rs,as,ss,ls,us,hs,ps,ms,gs,$s,fs,ys,xs,vs,ws,Ss,Ts,Rs,Ps,Es,As,Ls,zs,Fs,Vs,Ns,js,Gs,Zs,Xs,qs,Ks,Js,tl,ol,rl,xl,Tl,Ml,Rl,Pl,El,Il,Al,Ll,zl,_l,Vl,Nl,Zl,Yl,ic,ac,lc,mc,Sc,kc,Cc,Tc,({target:e,propertyName:t})=>{e===$n&&/background|outline/.test(t)&&ye&&Rc()},Pc,Lc,Fc,Oc,Bc,Wc,_c,Vc,e=>{const t=!(!Dc||!Dc.closeButton)||!Zt;_c.set(e.detail.width,{hard:t}),Vc.set(Math.round(.5*-e.detail.width),{hard:t})},Gc,Zc,e=>{const{keyCode:t,metaKey:o,ctrlKey:i,shiftKey:n}=e;if(9===t&&Qi)return void e.preventDefault();if(e.target&&32===t&&$n.contains(e.target)&&!Gd(e.target)&&(Nt&&r&&An(),e.preventDefault()),90===t&&(o||i))return void(n&&o?ql.redo():ql.undo());if(89===t&&i)return void ql.redo();if(229===t)return;const a=new Set([...Vt,t]);Zc.set(Array.from(a))},({key:e,keyCode:t})=>{if("Meta"===e)return Zc.set([]);Zc.set(Vt.filter((e=>e!==t)))},()=>{Zc.set([])},e=>{Gd(e.target)||e.preventDefault()},e=>{kr&&Xc(e.detail.resources[0])},()=>{Tr&&zp().then(Yc)},e=>{if(!Cr)return;const t=ns((window.innerWidth-Math.abs(Pt.x))/Pt.width,0,1),o=ns((window.innerHeight-Math.abs(Pt.y))/Pt.height,0,1);t<.75&&o<.75||Xc((e.clipboardData||window.clipboardData).files[0])},ed,hd,e=>{dt&&ht(e.detail,dt)||un($s,dt=e.detail,dt)},er,Wl,Ui,Gi,Zi,qi,Ki,Ji,Qi,tr,or,rr,sr,cr,dr,hr,mr,gr,$r,fr,vr,wr,kr,Cr,Tr,Rr,Pr,Er,Ir,Ar,Lr,Fr,_r,Vr,Nr,Xr,qr,()=>o(61,Hi=void 0),(e,t,i)=>{const{text:r="",placeholder:n="",autoClose:a=!0,align:s="top",justify:l="center",buttonConfirm:c,buttonCancel:d}=i;o(61,Hi={align:s,justify:l,text:r,placeholder:n,buttonConfirm:c,buttonCancel:d,onconfirm:()=>{e(ji.value),a&&o(61,Hi=void 0)},oncancel:()=>{t(void 0),o(61,Hi=void 0)}})},cn,dn,hn,mn,Pn,En,In,An,Ln,zn,Fn,On,Bn,Wn,Nn,ks,Ol,Ac,zc,Nc,qc,Jc,it,tt,r,W,qe,ie,ce,D,F,Ge,J,Ue,He,Ne,Oe,Fe,De,ze,Ie,Te,Re,Ae,Le,Ee,Pe,_e,Be,Ce,Se,we,q,le,ae,oe,ee,Q,te,me,$e,ge,pe,he,K,Y,re,ye,fe,O,B,A,M,I,E,P,T,k,C,p,S,b,x,s,u,n,d,i,mt,bt,wt,kt,Tt,Pt,It,zt,Ft,Dt,Ot,Bt,jt,Gt,Yt,qt,Kt,Qt,eo,to,oo,io,no,so,lo,uo,ho,po,mo,go,fo,xo,vo,wo,ko,Co,To,Po,Eo,zo,Fo,No,jo,Zo,Yo,Ko,ti,ii,ri,ni,li,ci,di,ui,hi,pi,function(){o(31,jl=Gp.innerWidth),o(32,Ul=Gp.innerHeight)},e=>un(gs,$i=e.detail,$i),({detail:e})=>o(44,V=e),(e,t)=>t.id===e,function(t,i){e.$$.not_equal(gn[i],t)&&(gn[i]=t,o(1,gn),o(268,hn),o(27,pn))},e=>o(63,yc=yc.concat(e)),e=>o(63,yc=yc.filter((t=>t!==e))),(e,{detail:t})=>o(38,N[e]=t,N),e=>un(ps,bo=e.detail,bo),e=>e.id===V,function(t){e.$$.not_equal(gn[V],t)&&(gn[V]=t,o(1,gn),o(268,hn),o(27,pn))},()=>o(63,yc=yc.concat(V)),()=>o(63,yc=yc.filter((e=>e!==V))),({detail:e})=>o(38,N[V]=e,N),e=>{const t={...e,...ed()},{annotationShapes:o,decorationShapes:i,interfaceShapes:r,frameShapes:n,selectionShapes:a}=ur({annotationShapes:Mt,decorationShapes:yt,interfaceShapes:Ri,frameShapes:gt,selectionShapes:oi},t);return hd(t,rt,o,i,r,n,a)},()=>{o(64,pd=!1),o(65,md=!1),o(66,$d=!1),o(67,fd=!1),o(68,yd=!1)},function(e){ta[e?"unshift":"push"]((()=>{Kc=e,o(36,Kc)}))},function(e){ln=e,o(0,ln),o(258,Fr)},function(e){dc=e,o(33,dc)},function(e){cc=e,o(34,cc)},function(e){ta[e?"unshift":"push"]((()=>{ji=e,o(62,ji)}))},function(e){ta[e?"unshift":"push"]((()=>{$n=e,o(2,$n)}))},e=>un(us,Ht=e.detail,Ht)]}class xm extends Fa{constructor(e){super(),za(this,e,bm,gm,Qr,{class:229,layout:230,stores:231,locale:3,id:4,util:232,utils:233,animations:234,disabled:235,status:227,previewUpscale:236,previewPad:237,previewMaskOpacity:5,previewImageDataMaxSize:238,previewImageTextPixelRatio:6,markupMaskOpacity:7,zoomMaskOpacity:239,elasticityMultiplier:8,willRevert:240,willProcessImage:241,willRenderCanvas:9,willRenderToolbar:242,willSetHistoryInitialState:243,enableButtonExport:244,enableButtonRevert:245,enableNavigateHistory:246,enableToolbar:10,enableUtils:247,enableButtonClose:248,enableDropImage:249,enablePasteImage:250,enableBrowseImage:251,enableTransparencyGrid:11,layoutDirectionPreference:252,layoutHorizontalUtilsPreference:253,layoutVerticalUtilsPreference:254,layoutVerticalToolbarPreference:255,layoutVerticalControlGroupsPreference:256,layoutVerticalControlTabsPreference:257,textDirection:12,markupEditorZoomLevel:258,markupEditorZoomLevels:13,markupEditorZoomAdjustStep:14,markupEditorZoomAdjustFactor:15,markupEditorZoomAdjustWheelFactor:16,markupEditorInteractionMode:259,muteAudio:260,willSetMediaInitialTimeOffset:261,enablePan:17,enableZoom:18,enableZoomControls:262,enableZoomInput:19,enablePanInput:263,enableCanvasAlpha:20,enablePanLimit:21,panLimitGutterScalar:22,zoomPresetOptions:23,zoomAdjustStep:24,zoomAdjustFactor:25,zoomAdjustWheelFactor:26,zoomLevel:0,hideTextInput:264,showTextInput:265,imagePreviewSrc:266,imageOrienter:267,pluginComponents:268,pluginOptions:27,sub:269,pluginInterface:1,root:2,play:270,pause:271,isPaused:272,togglePlayPause:273,mute:274,unmute:275,toggleMute:276,getDuration:277,getCurrentTime:278,setCurrentTime:279,imageSourceToImageData:28,imagePreview:29,imagePreviewCurrent:228,history:30},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}get class(){return this.$$.ctx[229]}set class(e){this.$$set({class:e}),pa()}get layout(){return this.$$.ctx[230]}set layout(e){this.$$set({layout:e}),pa()}get stores(){return this.$$.ctx[231]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[3]}set locale(e){this.$$set({locale:e}),pa()}get id(){return this.$$.ctx[4]}set id(e){this.$$set({id:e}),pa()}get util(){return this.$$.ctx[232]}set util(e){this.$$set({util:e}),pa()}get utils(){return this.$$.ctx[233]}set utils(e){this.$$set({utils:e}),pa()}get animations(){return this.$$.ctx[234]}set animations(e){this.$$set({animations:e}),pa()}get disabled(){return this.$$.ctx[235]}set disabled(e){this.$$set({disabled:e}),pa()}get status(){return this.$$.ctx[227]}set status(e){this.$$set({status:e}),pa()}get previewUpscale(){return this.$$.ctx[236]}set previewUpscale(e){this.$$set({previewUpscale:e}),pa()}get previewPad(){return this.$$.ctx[237]}set previewPad(e){this.$$set({previewPad:e}),pa()}get previewMaskOpacity(){return this.$$.ctx[5]}set previewMaskOpacity(e){this.$$set({previewMaskOpacity:e}),pa()}get previewImageDataMaxSize(){return this.$$.ctx[238]}set previewImageDataMaxSize(e){this.$$set({previewImageDataMaxSize:e}),pa()}get previewImageTextPixelRatio(){return this.$$.ctx[6]}set previewImageTextPixelRatio(e){this.$$set({previewImageTextPixelRatio:e}),pa()}get markupMaskOpacity(){return this.$$.ctx[7]}set markupMaskOpacity(e){this.$$set({markupMaskOpacity:e}),pa()}get zoomMaskOpacity(){return this.$$.ctx[239]}set zoomMaskOpacity(e){this.$$set({zoomMaskOpacity:e}),pa()}get elasticityMultiplier(){return this.$$.ctx[8]}set elasticityMultiplier(e){this.$$set({elasticityMultiplier:e}),pa()}get willRevert(){return this.$$.ctx[240]}set willRevert(e){this.$$set({willRevert:e}),pa()}get willProcessImage(){return this.$$.ctx[241]}set willProcessImage(e){this.$$set({willProcessImage:e}),pa()}get willRenderCanvas(){return this.$$.ctx[9]}set willRenderCanvas(e){this.$$set({willRenderCanvas:e}),pa()}get willRenderToolbar(){return this.$$.ctx[242]}set willRenderToolbar(e){this.$$set({willRenderToolbar:e}),pa()}get willSetHistoryInitialState(){return this.$$.ctx[243]}set willSetHistoryInitialState(e){this.$$set({willSetHistoryInitialState:e}),pa()}get enableButtonExport(){return this.$$.ctx[244]}set enableButtonExport(e){this.$$set({enableButtonExport:e}),pa()}get enableButtonRevert(){return this.$$.ctx[245]}set enableButtonRevert(e){this.$$set({enableButtonRevert:e}),pa()}get enableNavigateHistory(){return this.$$.ctx[246]}set enableNavigateHistory(e){this.$$set({enableNavigateHistory:e}),pa()}get enableToolbar(){return this.$$.ctx[10]}set enableToolbar(e){this.$$set({enableToolbar:e}),pa()}get enableUtils(){return this.$$.ctx[247]}set enableUtils(e){this.$$set({enableUtils:e}),pa()}get enableButtonClose(){return this.$$.ctx[248]}set enableButtonClose(e){this.$$set({enableButtonClose:e}),pa()}get enableDropImage(){return this.$$.ctx[249]}set enableDropImage(e){this.$$set({enableDropImage:e}),pa()}get enablePasteImage(){return this.$$.ctx[250]}set enablePasteImage(e){this.$$set({enablePasteImage:e}),pa()}get enableBrowseImage(){return this.$$.ctx[251]}set enableBrowseImage(e){this.$$set({enableBrowseImage:e}),pa()}get enableTransparencyGrid(){return this.$$.ctx[11]}set enableTransparencyGrid(e){this.$$set({enableTransparencyGrid:e}),pa()}get layoutDirectionPreference(){return this.$$.ctx[252]}set layoutDirectionPreference(e){this.$$set({layoutDirectionPreference:e}),pa()}get layoutHorizontalUtilsPreference(){return this.$$.ctx[253]}set layoutHorizontalUtilsPreference(e){this.$$set({layoutHorizontalUtilsPreference:e}),pa()}get layoutVerticalUtilsPreference(){return this.$$.ctx[254]}set layoutVerticalUtilsPreference(e){this.$$set({layoutVerticalUtilsPreference:e}),pa()}get layoutVerticalToolbarPreference(){return this.$$.ctx[255]}set layoutVerticalToolbarPreference(e){this.$$set({layoutVerticalToolbarPreference:e}),pa()}get layoutVerticalControlGroupsPreference(){return this.$$.ctx[256]}set layoutVerticalControlGroupsPreference(e){this.$$set({layoutVerticalControlGroupsPreference:e}),pa()}get layoutVerticalControlTabsPreference(){return this.$$.ctx[257]}set layoutVerticalControlTabsPreference(e){this.$$set({layoutVerticalControlTabsPreference:e}),pa()}get textDirection(){return this.$$.ctx[12]}set textDirection(e){this.$$set({textDirection:e}),pa()}get markupEditorZoomLevel(){return this.$$.ctx[258]}set markupEditorZoomLevel(e){this.$$set({markupEditorZoomLevel:e}),pa()}get markupEditorZoomLevels(){return this.$$.ctx[13]}set markupEditorZoomLevels(e){this.$$set({markupEditorZoomLevels:e}),pa()}get markupEditorZoomAdjustStep(){return this.$$.ctx[14]}set markupEditorZoomAdjustStep(e){this.$$set({markupEditorZoomAdjustStep:e}),pa()}get markupEditorZoomAdjustFactor(){return this.$$.ctx[15]}set markupEditorZoomAdjustFactor(e){this.$$set({markupEditorZoomAdjustFactor:e}),pa()}get markupEditorZoomAdjustWheelFactor(){return this.$$.ctx[16]}set markupEditorZoomAdjustWheelFactor(e){this.$$set({markupEditorZoomAdjustWheelFactor:e}),pa()}get markupEditorInteractionMode(){return this.$$.ctx[259]}set markupEditorInteractionMode(e){this.$$set({markupEditorInteractionMode:e}),pa()}get muteAudio(){return this.$$.ctx[260]}set muteAudio(e){this.$$set({muteAudio:e}),pa()}get willSetMediaInitialTimeOffset(){return this.$$.ctx[261]}set willSetMediaInitialTimeOffset(e){this.$$set({willSetMediaInitialTimeOffset:e}),pa()}get enablePan(){return this.$$.ctx[17]}set enablePan(e){this.$$set({enablePan:e}),pa()}get enableZoom(){return this.$$.ctx[18]}set enableZoom(e){this.$$set({enableZoom:e}),pa()}get enableZoomControls(){return this.$$.ctx[262]}set enableZoomControls(e){this.$$set({enableZoomControls:e}),pa()}get enableZoomInput(){return this.$$.ctx[19]}set enableZoomInput(e){this.$$set({enableZoomInput:e}),pa()}get enablePanInput(){return this.$$.ctx[263]}set enablePanInput(e){this.$$set({enablePanInput:e}),pa()}get enableCanvasAlpha(){return this.$$.ctx[20]}set enableCanvasAlpha(e){this.$$set({enableCanvasAlpha:e}),pa()}get enablePanLimit(){return this.$$.ctx[21]}set enablePanLimit(e){this.$$set({enablePanLimit:e}),pa()}get panLimitGutterScalar(){return this.$$.ctx[22]}set panLimitGutterScalar(e){this.$$set({panLimitGutterScalar:e}),pa()}get zoomPresetOptions(){return this.$$.ctx[23]}set zoomPresetOptions(e){this.$$set({zoomPresetOptions:e}),pa()}get zoomAdjustStep(){return this.$$.ctx[24]}set zoomAdjustStep(e){this.$$set({zoomAdjustStep:e}),pa()}get zoomAdjustFactor(){return this.$$.ctx[25]}set zoomAdjustFactor(e){this.$$set({zoomAdjustFactor:e}),pa()}get zoomAdjustWheelFactor(){return this.$$.ctx[26]}set zoomAdjustWheelFactor(e){this.$$set({zoomAdjustWheelFactor:e}),pa()}get zoomLevel(){return this.$$.ctx[0]}set zoomLevel(e){this.$$set({zoomLevel:e}),pa()}get hideTextInput(){return this.$$.ctx[264]}get showTextInput(){return this.$$.ctx[265]}get imagePreviewSrc(){return this.$$.ctx[266]}set imagePreviewSrc(e){this.$$set({imagePreviewSrc:e}),pa()}get imageOrienter(){return this.$$.ctx[267]}set imageOrienter(e){this.$$set({imageOrienter:e}),pa()}get pluginComponents(){return this.$$.ctx[268]}set pluginComponents(e){this.$$set({pluginComponents:e}),pa()}get pluginOptions(){return this.$$.ctx[27]}set pluginOptions(e){this.$$set({pluginOptions:e}),pa()}get sub(){return this.$$.ctx[269]}get pluginInterface(){return this.$$.ctx[1]}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),pa()}get play(){return this.$$.ctx[270]}get pause(){return this.$$.ctx[271]}get isPaused(){return this.$$.ctx[272]}get togglePlayPause(){return this.$$.ctx[273]}get mute(){return this.$$.ctx[274]}get unmute(){return this.$$.ctx[275]}get toggleMute(){return this.$$.ctx[276]}get getDuration(){return this.$$.ctx[277]}get getCurrentTime(){return this.$$.ctx[278]}get setCurrentTime(){return this.$$.ctx[279]}get imageSourceToImageData(){return this.$$.ctx[28]}set imageSourceToImageData(e){this.$$set({imageSourceToImageData:e}),pa()}get imagePreview(){return this.$$.ctx[29]}get imagePreviewCurrent(){return this.$$.ctx[228]}set imagePreviewCurrent(e){this.$$set({imagePreviewCurrent:e}),pa()}get history(){return this.$$.ctx[30]}}"undefined"!=typeof window&&(e=>{if(e&&e._clpdx4s)return;const[t,o,i]=[[99,111,110,115,111,108,101],[108,111,103],[84,104,105,115,32,118,101,114,115,105,111,110,32,111,102,32,80,105,110,116,117,114,97,32,105,115,32,102,111,114,32,116,101,115,116,105,110,103,32,112,117,114,112,111,115,101,115,32,111,110,108,121,46,32,86,105,115,105,116,32,104,116,116,112,115,58,47,47,112,113,105,110,97,46,110,108,47,112,105,110,116,117,114,97,47,32,116,111,32,112,117,114,99,104,97,115,101,32,97,32,118,97,108,105,100,32,108,105,99,101,110,115,101,46]].map((e=>e.map((e=>String.fromCharCode(e))).join("")));e&&e[t]&&e[t][o](i)})(window);const vm=["klass","stores","isVisible","isActive","isActiveFraction","locale"],wm=["history","klass","stores","navButtons","pluginComponents","pluginInterface","pluginOptions","sub","imagePreviewSrc","imagePreview","imagePreviewCurrent"],Sm=["locale"];let km;const Cm=new Set([]),Tm={},Mm=new Map,Rm=(...e)=>{e.filter((e=>!!e.util)).forEach((e=>{const[t,o,i=(()=>!0)]=e.util;Mm.has(t)||(Mm.set(t,{Component:o,isSupported:i}),Xc(o).filter((e=>!vm.includes(e))).forEach((e=>{Cm.add(e),Tm[e]?Tm[e].push(t):Tm[e]=[t]})))}))};var Pm=[...fs,"init","update","undo","redo","revert","writehistory","destroy","show","hide","close","ready","zoom","pan","loadpreview","selectshape","blurshape","updateshape","addshape","removeshape","selectstyle","markuptap","markupzoom","markuppan","selectutil","selectcontrol","selectiondown","selectionup","selectionchange"];var Em=(e,t,o={})=>{const{prefix:i="pintura:"}=o;return Pm.map((o=>e.on(o,(e=>Wt(t)?((e,t,o)=>e.dispatchEvent(new CustomEvent(t,{detail:o,bubbles:!0,cancelable:!0})))(t,`${i}${o}`,e):t(o,e)))))};const Im=e=>R(e[0]),Am=e=>!Im(e),Lm=e=>e[1],zm=e=>e[3]||[];const Fm=(e,t,o,i=(e=>e))=>{const r=Bm(t,o),n=r.findIndex((e=>Lm(e)===t));var a,s,l;a=r,s=i(n),l=e,a.splice(s,0,l)},Dm=(e,t)=>{const o=Bm(e,t);return dd(o,(t=>Lm(t)===e)),o},Om=(e,t)=>{if(t&&t.length){if(Im(t)){if(Lm(t)===e)return t;const o=Om(e,zm(t));if(o)return o}if(Am(t))for(const o of t){const t=Om(e,o);if(t)return t}}},Bm=(e,t)=>{if(Am(t)){if(t.find((t=>Lm(t)===e)))return t;const o=t.find((t=>Bm(e,zm(t))));return o&&o[3]}return Bm(e,zm(t))},Wm=()=>[.75,.25,.25,0,0,.25,.75,.25,0,0,.25,.25,.75,0,0,0,0,0,1,0],_m=()=>[1.398,-.316,.065,-.273,.201,-.051,1.278,-.08,-.273,.201,-.051,.119,1.151,-.29,.215,0,0,0,1,0],Vm=()=>[1.073,-.015,.092,-.115,-.017,.107,.859,.184,-.115,-.017,.015,.077,1.104,-.115,-.017,0,0,0,1,0],Nm=()=>[1.06,0,0,0,0,0,1.01,0,0,0,0,0,.93,0,0,0,0,0,1,0],Hm=()=>[1.1,0,0,0,-.1,0,1.1,0,0,-.1,0,0,1.2,0,-.1,0,0,0,1,0],jm=()=>[.212,.715,.114,0,0,.212,.715,.114,0,0,.212,.715,.114,0,0,0,0,0,1,0],Um=()=>[.15,1.3,-.25,.1,-.2,.15,1.3,-.25,.1,-.2,.15,1.3,-.25,.1,-.2,0,0,0,1,0],Gm=()=>[.163,.518,.084,-.01,.208,.163,.529,.082,-.02,.21,.171,.529,.084,0,.214,0,0,0,1,0],Zm=()=>[.338,.991,.117,.093,-.196,.302,1.049,.096,.078,-.196,.286,1.016,.146,.101,-.196,0,0,0,1,0],Xm=()=>[.393,.768,.188,0,0,.349,.685,.167,0,0,.272,.533,.13,0,0,0,0,0,1,0],Ym=()=>[.289,.62,.185,0,.077,.257,.566,.163,0,.115,.2,.43,.128,0,.188,0,0,0,1,0],qm=()=>[.269,.764,.172,.05,.1,.239,.527,.152,0,.176,.186,.4,.119,0,.159,0,0,0,1,0],Km=()=>[.547,.764,.134,0,-.147,.281,.925,.12,0,-.135,.225,.558,.33,0,-.113,0,0,0,1,0],Jm={chrome:_m,fade:Vm,pastel:Wm,cold:Hm,warm:Nm,monoDefault:jm,monoWash:Gm,monoNoir:Um,monoStark:Zm,sepiaDefault:Xm,sepiaRust:qm,sepiaBlues:Ym,sepiaColor:Km};var Qm={filterFunctions:Jm,filterOptions:[["Default",[[void 0,e=>e.labelDefault]]],["Classic",[["chrome",e=>e.filterLabelChrome],["fade",e=>e.filterLabelFade],["cold",e=>e.filterLabelCold],["warm",e=>e.filterLabelWarm],["pastel",e=>e.filterLabelPastel]]],["Monochrome",[["monoDefault",e=>e.filterLabelMonoDefault],["monoNoir",e=>e.filterLabelMonoNoir],["monoStark",e=>e.filterLabelMonoStark],["monoWash",e=>e.filterLabelMonoWash]]],["Sepia",[["sepiaDefault",e=>e.filterLabelSepiaDefault],["sepiaRust",e=>e.filterLabelSepiaRust],["sepiaBlues",e=>e.filterLabelSepiaBlues],["sepiaColor",e=>e.filterLabelSepiaColor]]]]};const eg={borderColor:"strokeColor",borderWidth:"strokeWidth",lineWidth:"strokeWidth",fontColor:"color",lineColor:"strokeColor",src:"backgroundImage",fit:"backgroundSize"},tg=e=>0===e||"0%"===e||"0px"===e?0:/px$/.test(e)?parseInt(e,10):/\%$/.test(e)?e:e<=1?100*e+"%":void 0,og=(e,t)=>{let o,i;return/%$/.test(e)?(o=parseFloat(e),i=parseFloat(t),o+i+"%"):/px$/.test(e)?(o=parseInt(e,10),i=parseInt(t,10),o+i+"px"):void 0},ig=(e,t)=>{const o=e,i=t,r=1.5707963267948966-t,n=Math.sin(1.5707963267948966),a=Math.sin(i),s=Math.sin(r),l=Math.cos(r),c=o/n;return ue(l*(c*a),l*(c*s))},rg=(e,{flip:t,aspectRatio:o,rotation:i,center:r,zoom:n,scaleToFit:a})=>{const s={flipX:!1,flipY:!1},l=!r||r&&.5===r.x&&.5===r.y;t&&t.horizontal&&(s.flipX=t.horizontal),t&&t.vertical&&(s.flipY=t.vertical);const c=((e,t)=>null!=t?1/t:e.width/e.height)(e,o),d=!(!1===a),u=((e,t,o=1)=>{const i=e.height/e.width,r=t;let n=1,a=i;a>r&&(a=r,n=a/i);const s=Math.max(1/n,r/a),l=e.width/(o*s*n);return{width:l,height:l*t}})(e,o,n),h=l?e:((e,t)=>{const o=t.x>.5?1-t.x:t.x,i=t.y>.5?1-t.y:t.y;return We(2*o*e.width,2*i*e.height)})(e,d?r:{x:.5,y:.5}),p=((e,t)=>{let o=e.width,i=o*t;i>e.height&&(i=e.height,o=i/t);const r=.5*(e.width-o),n=.5*(e.height-i);return nt(r,n,o,i)})(e,o);if((o||!l||n)&&(s.crop=xt(Qe(h),c)),"number"==typeof i&&null!==i&&0!==i){null!=i&&(s.rotation=i);const t=((e,t)=>{const o=e.width,i=e.height,r=ig(o,t),n=ig(i,t),a=ue(e.x+Math.abs(r.x),e.y-Math.abs(r.y)),s=ue(e.x+e.width+Math.abs(n.y),e.y+Math.abs(n.x)),l=ue(e.x-Math.abs(n.y),e.y+e.height-Math.abs(n.x));return{width:Re(a,s),height:Re(a,l)}})(p,i),o=Math.max(t.width/h.width,t.height/h.height),n=ue(r.x*e.width,r.y*e.height),a=Bt(e,i),l=Ne(a),c=ue(.5*(a.width-e.width),.5*(a.height-e.height)),d=$t({x:c.x+n.x-u.width/o*.5,y:c.y+n.y-u.height/o*.5,width:u.width/o,height:u.height/o},i),m=Ae(d.map(pe),i,l.x,l.y),g=at(ot(m)),$=Ae(m.map(pe),-2*i,g.x,g.y);s.crop=ot($)}else null!=n&<(s.crop,1/n);return d||(s.cropLimitToImage=!1),s};let ng=null;const ag={base:0,min:-.25,max:.25,getLabel:e=>Op(e/.25),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.brightness)return e.brightness[4]},setValue:(e,t)=>e.update((e=>({...e,brightness:[1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0]})))},sg={base:1,min:.5,max:1.5,getLabel:e=>Op(2*(e-.5)-1),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.contrast)return e.contrast[0]},setValue:(e,t)=>e.update((e=>({...e,contrast:[t,0,0,0,.5*(1-t),0,t,0,0,.5*(1-t),0,0,t,0,.5*(1-t),0,0,0,1,0]})))},lg={base:1,min:0,max:2,getLabel:e=>Op(e-1),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.saturation)return(e.saturation[0]-.213)/.787},setValue:(e,t)=>e.update((e=>({...e,saturation:[.213+.787*t,.715-.715*t,.072-.072*t,0,0,.213-.213*t,.715+.285*t,.072-.072*t,0,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,0,1,0]})))},cg={base:1,min:.5,max:1.5,getLabel:e=>Op(2*(e-.5)-1),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.exposure)return e.exposure[0]},setValue:(e,t)=>e.update((e=>({...e,exposure:[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0]})))},dg={base:1,min:.15,max:4,getLabel:e=>Op(e<1?(e-.15)/.85-1:(e-1)/3),getStore:({imageGamma:e})=>e},ug={base:0,min:-1,max:1,getStore:({imageVignette:e})=>e},hg={base:0,min:-1,max:1,getStore:({imageConvolutionMatrix:e})=>e,getValue:e=>{if(e.clarity)return 0===e.clarity[0]?e.clarity[1]/-1:e.clarity[1]/-2},setValue:(e,t)=>{e.update((e=>({...e,clarity:t>=0?[0,-1*t,0,-1*t,1+4*t,-1*t,0,-1*t,0]:[-1*t,-2*t,-1*t,-2*t,1+-3*t,-2*t,-1*t,-2*t,-1*t]})))}},pg={base:0,min:-1,max:1,getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(!e.temperature)return;const t=e.temperature[0];return t>=1?(t-1)/.1:(1-t)/-.15},setValue:(e,t)=>e.update((e=>({...e,temperature:t>0?[1+.1*t,0,0,0,0,0,1,0,0,0,0,0,1+.1*-t,0,0,0,0,0,1,0]:[1+.15*t,0,0,0,0,0,1+.05*t,0,0,0,0,0,1+.15*-t,0,0,0,0,0,1,0]})))};var mg={finetuneControlConfiguration:{gamma:dg,brightness:ag,contrast:sg,saturation:lg,exposure:cg,temperature:pg,clarity:hg,vignette:ug},finetuneOptions:[["brightness",e=>e.finetuneLabelBrightness],["contrast",e=>e.finetuneLabelContrast],["saturation",e=>e.finetuneLabelSaturation],["exposure",e=>e.finetuneLabelExposure],["temperature",e=>e.finetuneLabelTemperature],["gamma",e=>e.finetuneLabelGamma],!vc()&&["clarity",e=>e.finetuneLabelClarity],["vignette",e=>e.finetuneLabelVignette]].filter(Boolean)};const gg={shape:{frameColor:[1,1,1],frameStyle:"solid",frameSize:"2.5%"},thumb:''},$g={shape:{frameColor:[1,1,1],frameStyle:"solid",frameSize:"2.5%",frameRound:!0},thumb:''},fg={shape:{frameColor:[1,1,1],frameStyle:"line",frameInset:"2.5%",frameSize:".3125%",frameRadius:0},thumb:'
'},yg={shape:{frameColor:[1,1,1],frameStyle:"line",frameAmount:2,frameInset:"2.5%",frameSize:".3125%",frameOffset:"1.25%",frameRadius:0},thumb:'
'},bg={shape:{frameColor:[1,1,1],frameStyle:"edge",frameInset:"2.5%",frameOffset:"5%",frameSize:".3125%"},thumb:'
'},xg={shape:{frameColor:[1,1,1],frameStyle:"edge",frameInset:"2.5%",frameSize:".3125%"},thumb:'
'},vg={shape:{frameColor:[1,1,1],frameStyle:"edge",frameOffset:"1.5%",frameSize:".3125%"},thumb:'
'},wg={shape:{frameColor:[1,1,1],frameStyle:"hook",frameInset:"2.5%",frameSize:".3125%",frameLength:"5%"},thumb:'
'},Sg={shape:{frameColor:[1,1,1],frameStyle:"polaroid"},thumb:''};var kg={frameStyles:{solidSharp:gg,solidRound:$g,lineSingle:fg,lineMultiple:yg,edgeSeparate:bg,edgeCross:xg,edgeOverlap:vg,hook:wg,polaroid:Sg},frameOptions:[[void 0,e=>e.labelNone],["solidSharp",e=>e.frameLabelMatSharp],["solidRound",e=>e.frameLabelMatRound],["lineSingle",e=>e.frameLabelLineSingle],["lineMultiple",e=>e.frameLabelLineMultiple],["edgeCross",e=>e.frameLabelEdgeCross],["edgeSeparate",e=>e.frameLabelEdgeSeparate],["edgeOverlap",e=>e.frameLabelEdgeOverlap],["hook",e=>e.frameLabelCornerHooks],["polaroid",e=>e.frameLabelPolaroid]]},Cg=e=>e.charAt(0).toUpperCase()+e.slice(1);let Tg=null;var Mg=()=>{if(null===Tg)if(u())try{Tg=!1===document.fonts.check("16px TestNonExistingFont")}catch(e){Tg=!1}else Tg=!1;return Tg};const Rg=(e,t)=>o=>o[t?`${t}${Cg(e)}`:e],Pg=e=>[e,""+e],Eg=(e,t)=>o=>[e[o],Rg(o,t)],Ig=e=>Array.isArray(e)&&e.every(Ao)?e.map(Pg):e,Ag=[1,.2549,.2118],Lg="0.5%",zg=[1,1,1,0],Fg={brush:["path",{bitmap:!0,drawMode:"add",strokeWidth:"5%",cursorStyle:"ellipse",cursorSize:"strokeWidth",disableStyle:["strokeColor"],settings:{strokeWidth:{control:"brushSize"}}}],lassoo:["path",{drawMode:"add",disableStyle:["strokeWidth","strokeColor"],pathClose:!0}],rectangle:["rectangle",{disableStyle:["backgroundColor","strokeWidth","strokeColor","cornerRadius"],drawMode:"add"}],ellipse:["ellipse",{disableStyle:["backgroundColor","strokeWidth","strokeColor"],drawMode:"add"}]},Dg=["brush","lassoo","rectangle","ellipse"],Og=e=>{const{hideLabel:t=!0}=e||{};return f$(["new","add","subtract"].map((e=>[e,Rg(e,"shapeLabelSelectionMode"),{icon:Rg(e,"shapeIconSelectionMode"),hideLabel:t}])),{title:e=>e.shapeTitleSelectionMode,layout:"radio"})},Bg=e=>$$(e,{title:e=>e.shapeTitleBrushSize,layout:"radio",optionHideLabel:!0,optionIcon:(e,t)=>``}),Wg={eraser:()=>({eraseRadius:8,cursorStyle:"ellipse",cursorSize:"eraseRadius"}),path:()=>({points:[]}),line:()=>({x1:0,y1:0,x2:0,y2:0,disableErase:!1}),rectangle:()=>({x:0,y:0,width:0,height:0}),ellipse:()=>({x:0,y:0,rx:0,ry:0}),text:()=>({x:0,y:0,text:"Text"})},_g=(e,t={},o)=>{if(!Wg[e])return;const{position:i="relative",inputMode:r="drag",isSelection:n=!1}=o||{};return[{...Wg[e](),...t},{position:i,inputMode:r,isSelection:n}]},Vg=e=>({sharpie:_g("path",{bitmap:!0,strokeJoin:"round",strokeCap:"round",strokeWidth:Lg,strokeColor:[...Ag],cursorStyle:"ellipse",cursorSize:"strokeWidth",disableErase:!1,disableResize:!0,disableMove:!0}),eraser:_g("eraser"),path:_g("path",{pathClose:void 0,strokeWidth:Lg,strokeColor:[...Ag],backgroundColor:[0,0,0,0]},{inputMode:"step"}),line:_g("line",{strokeColor:[...Ag],strokeWidth:Lg}),arrow:_g("line",{lineStart:"none",lineEnd:"arrow-solid",strokeColor:[...Ag],strokeWidth:Lg}),rectangle:_g("rectangle",{strokeColor:[...zg],backgroundColor:[...Ag]}),ellipse:_g("ellipse",{strokeColor:[...zg],backgroundColor:[...Ag]}),text:_g("text",{color:[...Ag],fontSize:"2%"}),...e}),Ng=(e,t,o)=>[e,t||Rg(e,"shapeLabelTool"),{icon:Rg(e,"shapeIconTool"),...o}],Hg=(e=["move","view","sharpie","eraser","path","line","arrow","rectangle","ellipse","text","preset"])=>e.map((e=>R(e)?Ng(e):Array.isArray(e)?C(e[1])?Ng(e[0],void 0,e[1]):Ng(e[0],e[1],e[2]):void 0)).filter(Boolean),jg=()=>({transparent:[1,1,1,0],white:[1,1,1],silver:[.8667,.8667,.8667],gray:[.6667,.6667,.6667],black:[0,0,0],navy:[0,.1216,.2471],blue:[0,.4549,.851],aqua:[.498,.8588,1],teal:[.2235,.8,.8],olive:[.2392,.6,.4392],green:[.1804,.8,.251],yellow:[1,.8627,0],orange:[1,.5216,.1059],red:[1,.2549,.2118],maroon:[.5216,.0784,.2941],fuchsia:[.9412,.0706,.7451],purple:[.6941,.051,.7882]}),Ug=()=>[16,18,20,24,30,36,48,64,72,96,128,144],Gg=Ug,Zg=()=>({extraSmall:"2%",small:"4%",mediumSmall:"8%",medium:"10%",mediumLarge:"15%",large:"20%",extraLarge:"25%"}),Xg=()=>({extraSmall:"40%",small:"60%",mediumSmall:"100%",medium:"120%",mediumLarge:"140%",large:"180%",extraLarge:"220%"}),Yg=()=>({extraSmall:"0.25%",small:"0.5%",mediumSmall:"1%",medium:"1.75%",mediumLarge:"2.5%",large:"3.5%",extraLarge:"5%"}),qg=()=>["bar","arrow","arrowSolid","circle","circleSolid","square","squareSolid"],Kg=()=>[["Helvetica, Arial, Verdana, 'Droid Sans', sans-serif","Sans Serif"],["'Arial Black', 'Avenir-Black', 'Arial Bold'","Black"],["'Arial Narrow', 'Futura-CondensedMedium'","Narrow"],["'Trebuchet MS'","Humanist"],["Georgia, 'Avenir-Black', 'Times New Roman', 'Droid Serif', serif","Serif"],["Palatino","Old-Style"],["'Times New Roman', 'TimesNewRomanPSMT'","Transitional"],["Menlo, Monaco, 'Lucida Console', monospace","Monospaced"],["'Courier New', monospace","Slab Serif"]],Jg=()=>["left","center","right"],Qg=()=>[["normal","bold"],["italic","normal"],["italic","bold"]],e$=e=>Object.keys(e).map(Eg(e,"shapeTitleColor")),t$=e=>Object.keys(e).map(Eg(e,"labelSize")),o$=e=>Object.keys(e).map(Eg(e,"labelSize")),i$=e=>Object.keys(e).map(Eg(e,"labelSize")),r$=e=>[...e],n$=e=>e.map((e=>[e,t=>t["shapeLabelFontStyle"+e.filter((e=>"normal"!==e)).map(Cg).join("")]])),a$=e=>e.map((e=>[wp(e),t=>t["shapeTitleLineDecoration"+Cg(e)],{icon:t=>t["shapeIconLineDecoration"+Cg(e)]}])),s$=(e,t)=>{const{defaultKey:o,defaultValue:i,defaultOptions:r}=t||{},n=[];return o&&(n[0]=[i,e=>e[o],{...r}]),[...n,...e]},l$=e=>e.split(",").map((e=>e.trim())).some((e=>document.fonts.check("16px "+e))),c$=(e={})=>["ToggleSlider",{...e}],d$="PinturaFontTest",u$=(e,t={defaultKey:"labelDefault"})=>["Dropdown",{title:e=>e.shapeTitleFontFamily,onload:({options:e=[]})=>{Mg()&&e.map((([e])=>e)).filter(Boolean).filter((e=>!l$(e))).forEach((e=>{const t="PinturaFontTest-"+e.replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();document.getElementById(t)||document.body.append(g("span",{textContent:" ",id:t,class:d$,style:`font-family:${e};font-size:0;color:transparent;`}))}))},ondestroy:()=>{if(!Mg())return;document.querySelectorAll(".PinturaFontTest").forEach((e=>e.remove()))},optionLabelStyle:e=>"font-family: "+e,options:s$(e,t),optionFilter:e=>{if(!Mg())return!0;const[t]=e;if(!t)return!0;return l$(t)}}],h$=(e,t={})=>["ColorPicker",{options:s$(e),...t}],p$=(e,t={})=>h$(e,{title:e=>e.labelColor,...t}),m$=(e,t={})=>h$(e,{title:e=>e.shapeTitleBackgroundColor,...t}),g$=(e,t={})=>h$(e,{title:e=>e.shapeTitleStrokeColor,options:s$(e),buttonClass:"PinturaColorPickerButtonStroke",onchange:(e,o)=>{const i=o.strokeWidth;(Ao(i)||R(i)?parseFloat(i):0)>0||(o.strokeWidth=t&&t.defaultStrokeWidth||"0.5%")},...t}),$$=(e,t)=>{const{title:o,optionHideLabel:i=!1,layout:r,optionIcon:n=!1}=t||{},a=Ig(e),s=e.map((([e])=>R(e)?parseFloat(e):e)),l=Math.max(...s),c=Math.min(...s),d=l-c;return["radio"===r?"RadioGroup":"Dropdown",{title:!1===o?void 0:o||(e=>e.shapeTitleStrokeWidth),options:e=>{const o=t?a.map((e=>{const[t,o,r={}]=e,a=R(t)?parseFloat(t):t,s=(a-c)/d;let l=void 0;return"line"===n?l=``:"dot"===n?l=``:R(n)?l=n:P(n)&&(l=n(a,s)),[t,o,{icon:l,hideLabel:i,...r}]})):a;return zo(e,"backgroundColor")?s$(o,{defaultKey:"shapeLabelStrokeNone"}):s$(o)},onchange:(e,t)=>{if(!e)return;const o=t.strokeColor||[];if(o[3])return;const i=[...o];i[3]=1,t.strokeColor=i}}]},f$=(e,t)=>{const{title:o,layout:i}=t||{};return["radio"===i?"RadioGroup":"Dropdown",{title:o,options:s$(e)}]},y$=(e,t,o)=>["Dropdown",{title:e=>e[t],options:s$(e,{defaultKey:"labelNone",defaultOptions:{icon:''}}),optionIconStyle:o}],b$=e=>y$(e,"shapeTitleLineStart","transform: scaleX(-1)"),x$=e=>y$(e,"shapeTitleLineEnd"),v$=e=>h$(e,{title:e=>e.shapeTitleTextColor,options:s$(e)}),w$=e=>["Dropdown",{title:e=>e.shapeTitleFontStyle,optionLabelStyle:e=>e&&`font-style:${e[0]};font-weight:${e[1]}`,options:s$(e,{defaultKey:"shapeLabelFontStyleNormal"})}],S$=e=>["ShorthandControl",e],k$=(e,t,o,i)=>{i||e.find((([e])=>e===o))||(i={defaultKey:"labelAuto",defaultValue:o});const r=Ig(e);return["Dropdown",{title:t,options:s$(r,i),...i}]},C$=(e,t)=>k$(e,(e=>e.shapeTitleFontSize),"4%",t),T$=(e,t)=>k$(e,(e=>e.shapeTitleLineHeight),"120%",t),M$=e=>["RadioGroup",{title:e=>e.shapeTitleTextAlign,options:s$(e)}],R$={colorOptions:()=>e$({transparent:[1,1,1,0],white:[1,1,1],silver:[.8667,.8667,.8667],gray:[.6667,.6667,.6667],black:[0,0,0],navy:[0,.1216,.2471],blue:[0,.4549,.851],aqua:[.498,.8588,1],teal:[.2235,.8,.8],olive:[.2392,.6,.4392],green:[.1804,.8,.251],yellow:[1,.8627,0],orange:[1,.5216,.1059],red:[1,.2549,.2118],maroon:[.5216,.0784,.2941],fuchsia:[.9412,.0706,.7451],purple:[.6941,.051,.7882]}),lineEndStyleOptions:()=>a$(["bar","arrow","arrowSolid","circle","circleSolid","square","squareSolid"]),fontFamilyOptions:()=>r$([["Helvetica, Arial, Verdana, 'Droid Sans', sans-serif","Sans Serif"],["'Arial Black', 'Avenir-Black', 'Arial Bold'","Black"],["'Arial Narrow', 'Futura-CondensedMedium'","Narrow"],["'Trebuchet MS'","Humanist"],["Georgia, 'Avenir-Black', 'Times New Roman', 'Droid Serif', serif","Serif"],["Palatino","Old-Style"],["'Times New Roman', 'TimesNewRomanPSMT'","Transitional"],["Menlo, Monaco, 'Lucida Console', monospace","Monospaced"],["'Courier New', monospace","Slab Serif"]]),fontStyleOptions:()=>n$([["normal","bold"],["italic","normal"],["italic","bold"]]),textAlignOptions:()=>["left","center","right"].map((e=>[e,t=>t["shapeTitleTextAlign"+Cg(e)],{hideLabel:!0,icon:t=>t["shapeIconTextAlign"+Cg(e)]}])),strokeWidthOptions:()=>i$({extraSmall:"0.25%",small:"0.5%",mediumSmall:"1%",medium:"1.75%",mediumLarge:"2.5%",large:"3.5%",extraLarge:"5%"}),brushSizeOptions:()=>i$(Object.entries({extraSmall:"0.25%",small:"0.5%",mediumSmall:"1%",medium:"1.75%",mediumLarge:"2.5%",large:"3.5%",extraLarge:"5%"}).reduce(((e,[t,o])=>(e[t]=2*parseFloat(o)+"%",e)),{})),fontSizeOptions:()=>t$({extraSmall:"2%",small:"4%",mediumSmall:"8%",medium:"10%",mediumLarge:"15%",large:"20%",extraLarge:"25%"}),lineHeightOptions:()=>o$({extraSmall:"40%",small:"60%",mediumSmall:"100%",medium:"120%",mediumLarge:"140%",large:"180%",extraLarge:"220%"})},P$=new Intl.NumberFormat("default",{minimumFractionDigits:1,maximumFractionDigits:1}),E$=(e,t)=>R(t)?e+"%":e,I$=(e,t,o,i)=>R(i)?Math.round(e/o*100)+"%":""+P$.format(e),A$={getValue:e=>parseFloat(e),setValue:E$,label:I$,step:.05,labelClass:"PinturaPercentageLabel"},L$={factory:S$,options:{title:"Text shadow",controls:[["ToggleSlider","x",{...A$,min:-100,max:100,labelPrefix:"X"}],["ToggleSlider","y",{...A$,min:-100,max:100,labelPrefix:"Y"}],["ToggleSlider","blur",{...A$,min:0,max:25,labelPrefix:e=>e.shapeTitleTextShadowBlur}],["ColorPicker","color",{enablePresets:!1}]]}},z$={defaultColor:{factory:p$,items:"colorOptions"},defaultNumber:{factory:c$},defaultPercentage:{factory:c$,options:{getValue:e=>parseFloat(e),setValue:e=>e+"%",step:.05,label:(e,t,o)=>Math.round(e/o*100)+"%",labelClass:"PinturaPercentageLabel"}},backgroundColor:{items:"colorOptions",factory:m$},strokeColor:{items:"colorOptions",factory:g$},strokeWidth:{items:"strokeWidthOptions",factory:$$},brushSize:{items:"brushSizeOptions",factory:Bg},drawMode:{factory:Og},lineStart:{items:"lineEndStyleOptions",factory:b$},lineEnd:{items:"lineEndStyleOptions",factory:x$},color:{items:"colorOptions",factory:v$},fontFamily:{items:"fontFamilyOptions",factory:u$},fontStyle_fontWeight:{items:"fontStyleOptions",factory:w$},fontSize:{items:"fontSizeOptions",factory:C$},lineHeight:{items:"lineHeightOptions",factory:T$},textAlign:{items:"textAlignOptions",factory:M$},textShadowX_textShadowY_textShadowBlur_textShadowColor:L$,textOutlineWidth_textOutlineColor:{factory:S$,options:{title:"Text outline",controls:[["ToggleSlider","width",{getValue:e=>parseFloat(e),setValue:E$,label:I$,min:0,max:15,step:.05,labelClass:"PinturaPercentageLabel",labelPrefix:e=>e.shapeTitleTextOutlineWidth}],["ColorPicker","color",{enablePresets:!1}]]}},cornerRadius:{factory:"defaultPercentage",options:{min:0,max:50,title:e=>e.shapeTitleCornerRadius}},frameColor:{factory:"defaultColor"},frameSize:{factory:"defaultPercentage",options:{min:.2,max:10,title:e=>e.labelSize}},frameInset:{factory:"defaultPercentage",options:{min:.5,max:10,title:e=>e.labelOffset}},frameOffset:{factory:"defaultPercentage",options:{min:.5,max:10,title:e=>e.labelOffset}},frameRadius:{factory:"defaultPercentage",options:{min:.5,max:10,title:e=>e.labelRadius}},frameAmount:{factory:"defaultNumber",options:{min:1,max:5,step:1,title:e=>e.labelAmount}}},F$=(e={})=>{const t={...z$,...e},o={};return Object.entries(t).forEach((([e,i])=>{if(!/Options$/.test(e))if(z$[e]&&C(i)&&!Fo(i)){const{component:i,factory:r,items:n,options:a={}}=t[e];if(R(r))o[e]=[r,a];else{const s=z$[e].items;let l=R(s)?t[s]||R$[s]():void 0;R(n)&&R$[n]?l=t[n]?t[n].every((e=>!Array.isArray(e)))?t[n].map((e=>[e,e])):t[n]:R$[n]():(n||a.items)&&(l=n||a.items);let c=r||z$[e].factory;P(c)?o[e]=l?c(l,a):c(a):i&&(o[e]=[i,{...a,items:n}])}}else o[e]=i})),o};function D$(e){let t,o,i,r,n;const a=e[7].default,s=rn(a,e,e[6],null);return{c(){t=kn("div"),o=kn("div"),s&&s.c(),An(o,"class","PinturaToolbarInner"),An(t,"class","PinturaToolbar"),An(t,"data-layout",e[1]),An(t,"data-overflow",e[0])},m(a,l){wn(a,t,l),bn(t,o),s&&s.m(o,null),i=!0,r||(n=[Pn(o,"measure",e[3]),hn($c.call(null,o)),Pn(t,"measure",e[2]),hn($c.call(null,t))],r=!0)},p(e,[o]){s&&s.p&&(!i||64&o)&&sn(s,a,e,e[6],i?an(a,e[6],o,null):ln(e[6]),null),(!i||2&o)&&An(t,"data-layout",e[1]),(!i||1&o)&&An(t,"data-overflow",e[0])},i(e){i||(xa(s,e),i=!0)},o(e){va(s,e),i=!1},d(e){e&&Sn(t),s&&s.d(e),r=!1,Kr(n)}}}function O$(e,t,o){let i,r,{$$slots:n={},$$scope:a}=t,s=0,l=0,c=0;const d=()=>{o(0,r="compact"===i&&s>c?"overflow":void 0)};return e.$$set=e=>{"$$scope"in e&&o(6,a=e.$$scope)},e.$$.update=()=>{48&e.$$.dirty&&o(1,i=l>c?"compact":"default")},[r,i,({detail:e})=>{const{width:t}=e;o(5,c=t),d()},({detail:e})=>{const{width:t}=e;t>l&&o(4,l=t),s=t,r||d()},l,c,a,n]}class B$ extends Fa{constructor(e){super(),za(this,e,O$,D$,Qr,{})}}function W$(e){let t,o,i,r;const n=e[5].default,a=rn(n,e,e[4],null);return{c(){t=kn("div"),a&&a.c(),An(t,"class",e[0])},m(n,s){wn(n,t,s),a&&a.m(t,null),o=!0,i||(r=[Pn(t,"measure",(function(){Jr(e[1]&&e[3])&&(e[1]&&e[3]).apply(this,arguments)})),hn(e[2].call(null,t))],i=!0)},p(i,[r]){e=i,a&&a.p&&(!o||16&r)&&sn(a,n,e,e[4],o?an(n,e[4],r,null):ln(e[4]),null),(!o||1&r)&&An(t,"class",e[0])},i(e){o||(xa(a,e),o=!0)},o(e){va(a,e),o=!1},d(e){e&&Sn(t),a&&a.d(e),i=!1,Kr(r)}}}function _$(e,t,o){let{$$slots:i={},$$scope:r}=t;const n=qn();let{class:a=null}=t;const s=Jn("measurable");let l=!1;return Zn((()=>o(1,l=!0))),e.$$set=e=>{"class"in e&&o(0,a=e.class),"$$scope"in e&&o(4,r=e.$$scope)},[a,l,s,({detail:e})=>n("measure",e),r,i]}class V$ extends Fa{constructor(e){super(),za(this,e,_$,W$,Qr,{class:0})}}const N$=e=>({}),H$=e=>({}),j$=e=>({}),U$=e=>({}),G$=e=>({}),Z$=e=>({});function X$(e){let t,o;const i=e[4].header,r=rn(i,e,e[3],Z$);return{c(){t=kn("div"),r&&r.c(),An(t,"class","PinturaUtilHeader")},m(e,i){wn(e,t,i),r&&r.m(t,null),o=!0},p(e,t){r&&r.p&&(!o||8&t)&&sn(r,i,e,e[3],o?an(i,e[3],t,G$):ln(e[3]),Z$)},i(e){o||(xa(r,e),o=!0)},o(e){va(r,e),o=!1},d(e){e&&Sn(t),r&&r.d(e)}}}function Y$(e){let t,o;const i=e[4].footer,r=rn(i,e,e[3],H$);return{c(){t=kn("div"),r&&r.c(),An(t,"class","PinturaUtilFooter")},m(e,i){wn(e,t,i),r&&r.m(t,null),o=!0},p(e,t){r&&r.p&&(!o||8&t)&&sn(r,i,e,e[3],o?an(i,e[3],t,N$):ln(e[3]),H$)},i(e){o||(xa(r,e),o=!0)},o(e){va(r,e),o=!1},d(e){e&&Sn(t),r&&r.d(e)}}}function q$(e){let t,o,i,r,n,a,s=e[1]&&X$(e);const l=e[4].main,c=rn(l,e,e[3],U$),d=c||function(e){let t,o;return t=new V$({props:{class:"PinturaStage"}}),t.$on("measure",e[5]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p:Gr,i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}(e);let u=e[2]&&Y$(e);return{c(){s&&s.c(),t=Mn(),o=kn("div"),d&&d.c(),i=Mn(),u&&u.c(),r=Mn(),n=Rn(),An(o,"class","PinturaUtilMain")},m(l,c){s&&s.m(l,c),wn(l,t,c),wn(l,o,c),d&&d.m(o,null),e[6](o),wn(l,i,c),u&&u.m(l,c),wn(l,r,c),wn(l,n,c),a=!0},p(e,[o]){e[1]?s?(s.p(e,o),2&o&&xa(s,1)):(s=X$(e),s.c(),xa(s,1),s.m(t.parentNode,t)):s&&(ya(),va(s,1,1,(()=>{s=null})),ba()),c&&c.p&&(!a||8&o)&&sn(c,l,e,e[3],a?an(l,e[3],o,j$):ln(e[3]),U$),e[2]?u?(u.p(e,o),4&o&&xa(u,1)):(u=Y$(e),u.c(),xa(u,1),u.m(r.parentNode,r)):u&&(ya(),va(u,1,1,(()=>{u=null})),ba())},i(e){a||(xa(s),xa(d,e),xa(u),xa(false),a=!0)},o(e){va(s),va(d,e),va(u),va(false),a=!1},d(a){s&&s.d(a),a&&Sn(t),a&&Sn(o),d&&d.d(a),e[6](null),a&&Sn(i),u&&u.d(a),a&&Sn(r),a&&Sn(n)}}}function K$(e,t,o){let{$$slots:i={},$$scope:r}=t,{hasHeader:n=!!t.$$slots.header}=t,{hasFooter:a=!!t.$$slots.footer}=t,{root:s}=t;return e.$$set=e=>{o(7,t=Xr(Xr({},t),cn(e))),"hasHeader"in e&&o(1,n=e.hasHeader),"hasFooter"in e&&o(2,a=e.hasFooter),"root"in e&&o(0,s=e.root),"$$scope"in e&&o(3,r=e.$$scope)},t=cn(t),[s,n,a,r,i,function(t){Qn.call(this,e,t)},function(e){ta[e?"unshift":"push"]((()=>{s=e,o(0,s)}))}]}class J$ extends Fa{constructor(e){super(),za(this,e,K$,q$,Qr,{hasHeader:1,hasFooter:2,root:0})}}function Q$(e){let t,o;return{c(){t=kn("div"),An(t,"class","PinturaRangeInputMeter"),An(t,"style",o=`transform: translateX(${e[9].x-e[11].x}px) translateY(${e[9].y-e[11].y}px)`)},m(o,i){wn(o,t,i),t.innerHTML=e[7]},p(e,i){128&i[0]&&(t.innerHTML=e[7]),512&i[0]&&o!==(o=`transform: translateX(${e[9].x-e[11].x}px) translateY(${e[9].y-e[11].y}px)`)&&An(t,"style",o)},d(e){e&&Sn(t)}}}function ef(e){let t,o,i,r,n,a,s,l,c,d,u,h=e[9]&&Q$(e);return{c(){t=kn("div"),o=kn("span"),i=Mn(),r=kn("button"),n=Tn(e[1]),s=Mn(),l=kn("div"),h&&h.c(),An(o,"class","PinturaRangeInputValue"),An(r,"class","PinturaRangeInputReset"),An(r,"type","button"),r.disabled=a=e[0]===e[2],An(l,"class","PinturaRangeInputInner"),An(l,"style",e[8]),An(l,"data-value-limited",e[5]),An(t,"class","PinturaRangeInput"),An(t,"tabindex","0")},m(a,p){wn(a,t,p),bn(t,o),o.innerHTML=e[3],bn(t,i),bn(t,r),bn(r,n),bn(t,s),bn(t,l),h&&h.m(l,null),d||(u=[Pn(r,"click",e[16]),Pn(l,"interactionstart",e[12]),Pn(l,"interactionupdate",e[14]),Pn(l,"interactionend",e[15]),Pn(l,"interactionrelease",e[13]),hn(c=hd.call(null,l,{inertia:e[6]})),Pn(l,"measure",e[36]),hn($c.call(null,l)),Pn(t,"wheel",e[18],{passive:!1}),Pn(t,"nudge",e[19]),hn(pd.call(null,t,{direction:"horizontal",preventDefault:!0}))],d=!0)},p(e,t){8&t[0]&&(o.innerHTML=e[3]),2&t[0]&&Fn(n,e[1]),5&t[0]&&a!==(a=e[0]===e[2])&&(r.disabled=a),e[9]?h?h.p(e,t):(h=Q$(e),h.c(),h.m(l,null)):h&&(h.d(1),h=null),256&t[0]&&An(l,"style",e[8]),32&t[0]&&An(l,"data-value-limited",e[5]),c&&Jr(c.update)&&64&t[0]&&c.update.call(null,{inertia:e[6]})},i:Gr,o:Gr,d(e){e&&Sn(t),h&&h.d(),d=!1,Kr(u)}}}function tf(e,t,o){let i,r,n,s,l,c,d,u,h,{labelReset:p="Reset"}=t,{direction:m="x"}=t,{min:g=0}=t,{max:$=1}=t,{base:f=g}=t,{value:y=0}=t,{valueLabel:b=0}=t,{valueMin:x}=t,{valueMax:v}=t,{oninputstart:w=a}=t,{oninputmove:S=a}=t,{oninputend:k=a}=t,{elasticity:C=0}=t,{nudgeMultiplier:T}=t,{step:M=8}=t;const R=Jn("isAnimated");on(e,R,(e=>o(6,u=e)));const P=(e,t,o)=>Math.ceil((e-o)/t)*t+o;let E,I,A;const L={x:2,y:0},z=(e,t,o)=>`M ${e-o} ${t} a ${o} ${o} 0 1 0 0 -1`;let F,D=void 0,O=!1,B={snap:!1,elastic:!1};const W=(e,t,o)=>{const i=e[m]+t[m],r=ns(i,F[1][m],F[0][m]),n=C?r+md(i-r,C):r,a=o.elastic?n:r,s=ue(0,0);return s[m]=a,_.set(s,{hard:o.snap}),ns(N(s,m),g,$)},_=ec();on(e,_,(e=>o(9,h=e)));const V=(e,t)=>{const o=.5*(E[t]-s[t])-(ph(e,g,$)*s[t]-.5*s[t]);return{x:"x"===t?o:0,y:"y"===t?o:0}},N=(e,t)=>{const o=-(e[t]-.5*E[t])/s[t];return g+o*i},H=_.subscribe((e=>{e&&D&&S(ns(N(e,m),g,$))})),j=e=>{const t=[V(null!=x?x:g,m),V(null!=v?v:$,m)],o={x:"x"===m?h.x+e:0,y:"y"===m?h.y+e:0},i=ns(o[m],t[1][m],t[0][m]),r={...h,[m]:i};un(_,h=r,h);const n=ns(N(r,m),g,$);w(),S(n),k(n)};Yn((()=>{H()}));return e.$$set=e=>{"labelReset"in e&&o(1,p=e.labelReset),"direction"in e&&o(20,m=e.direction),"min"in e&&o(21,g=e.min),"max"in e&&o(22,$=e.max),"base"in e&&o(2,f=e.base),"value"in e&&o(0,y=e.value),"valueLabel"in e&&o(3,b=e.valueLabel),"valueMin"in e&&o(23,x=e.valueMin),"valueMax"in e&&o(24,v=e.valueMax),"oninputstart"in e&&o(25,w=e.oninputstart),"oninputmove"in e&&o(26,S=e.oninputmove),"oninputend"in e&&o(27,k=e.oninputend),"elasticity"in e&&o(28,C=e.elasticity),"nudgeMultiplier"in e&&o(29,T=e.nudgeMultiplier),"step"in e&&o(30,M=e.step)},e.$$.update=()=>{if(6291456&e.$$.dirty[0]&&o(32,i=$-g),10485760&e.$$.dirty[0]&&o(34,r=null!=x?Math.max(x,g):g),20971520&e.$$.dirty[0]&&o(33,n=null!=v?Math.min(v,$):$),6291460&e.$$.dirty[0]&&o(35,l=ph(f,g,$)),16&e.$$.dirty[0]|16&e.$$.dirty[1]&&E){const e=.5*E.y;let t,i=40*l,r="",n=E.y,a="";for(let o=0;o<=40;o++){const n=L.x+10*o,s=e;r+=z(n,s,o%5==0?2:.75)+" ",t=n+L.x,o===i&&(a=``)}o(7,I=``),o(31,A={x:t-2*L.x,y:n})}16&e.$$.dirty[0]|1&e.$$.dirty[1]&&(s=E&&A),6291456&e.$$.dirty[0]|12&e.$$.dirty[1]&&o(5,c=r!==g||n!==$),32&e.$$.dirty[0]|12&e.$$.dirty[1]&&o(8,d=c?function(e,t){const o=1/40,i=ph(e,g,$),r=ph(t,g,$);return`--range-mask-from:${100*se(P(i,o,0)-.0125)}%;--range-mask-to:${100*se(P(r,o,0)-.0125)}%`}(r,n):""),1048657&e.$$.dirty[0]|2&e.$$.dirty[1]&&i&&E&&E.x&&E.y&&_.set(V(y,m),{hard:!1===u})},[y,p,f,b,E,c,u,I,d,h,R,L,()=>{O=!1,D=tn(_),F=[V(null!=x?x:g,m),V(null!=v?v:$,m)],w()},()=>{O=!0},({detail:e})=>{B.snap=!O,B.elastic=!O,W(D,e.translation,B)},({detail:e})=>{B.snap=!1,B.elastic=!1;const t=W(D,e.translation,B);if(D=void 0,F=void 0,Math.abs(t-f)<.01)return k(f);k(t)},()=>{o(0,y=ns(f,r,n)),w(),k(y)},_,e=>{e.preventDefault(),e.stopPropagation();const t=yd(e)*M;j(t)},({detail:e})=>{j(e[m]*Math.abs(T||8))},m,g,$,x,v,w,S,k,C,T,M,A,i,n,r,l,e=>o(4,E=(e=>ue(e.width,e.height))(e.detail))]}class of extends Fa{constructor(e){super(),za(this,e,tf,ef,Qr,{labelReset:1,direction:20,min:21,max:22,base:2,value:0,valueLabel:3,valueMin:23,valueMax:24,oninputstart:25,oninputmove:26,oninputend:27,elasticity:28,nudgeMultiplier:29,step:30},null,[-1,-1])}}var rf={[J]:e=>({x:e.x,y:e.y}),[ie]:e=>({x:e.x+e.width,y:e.y}),[Q]:e=>({x:e.x+e.width,y:e.y}),[re]:e=>({x:e.x+e.width,y:e.y+e.height}),[ee]:e=>({x:e.x,y:e.y+e.height}),[ne]:e=>({x:e.x,y:e.y+e.height}),[te]:e=>({x:e.x,y:e.y}),[oe]:e=>({x:e.x,y:e.y})};function nf(e,t,o){const i=e.slice();return i[14]=t[o].key,i[15]=t[o].translate,i[16]=t[o].scale,i[17]=t[o].type,i[18]=t[o].opacity,i}function af(e,t){let o,i,r,n,a,s,l,c;return{key:e,first:null,c(){o=kn("div"),An(o,"role","button"),An(o,"aria-label",i=`Drag ${t[17]} ${t[14]}`),An(o,"tabindex",r="edge"===t[17]?-1:0),An(o,"class","PinturaRectManipulator"),An(o,"data-direction",n=t[14]),An(o,"data-shape",a=""+("edge"===t[17]?"edge":""+t[0])),An(o,"style",s=`--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`),this.first=o},m(e,i){wn(e,o,i),l||(c=[Pn(o,"nudge",(function(){Jr(t[6](t[14]))&&t[6](t[14]).apply(this,arguments)})),hn(pd.call(null,o,{preventDefault:!0})),Pn(o,"interactionstart",(function(){Jr(t[5]("resizestart",t[14]))&&t[5]("resizestart",t[14]).apply(this,arguments)})),Pn(o,"interactionupdate",(function(){Jr(t[5]("resizemove",t[14]))&&t[5]("resizemove",t[14]).apply(this,arguments)})),Pn(o,"interactionend",(function(){Jr(t[5]("resizeend",t[14]))&&t[5]("resizeend",t[14]).apply(this,arguments)})),hn(hd.call(null,o))],l=!0)},p(e,l){t=e,2&l&&i!==(i=`Drag ${t[17]} ${t[14]}`)&&An(o,"aria-label",i),2&l&&r!==(r="edge"===t[17]?-1:0)&&An(o,"tabindex",r),2&l&&n!==(n=t[14])&&An(o,"data-direction",n),3&l&&a!==(a=""+("edge"===t[17]?"edge":""+t[0]))&&An(o,"data-shape",a),2&l&&s!==(s=`--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`)&&An(o,"style",s)},d(e){e&&Sn(o),l=!1,Kr(c)}}}function sf(e){let t,o=[],i=new Map,r=e[1];const n=e=>e[14];for(let t=0;to(11,a=e)));const u=ec(void 0,{precision:1e-4,stiffness:.2,damping:.4});on(e,u,(e=>o(10,n=e)));const h=ec(0,{precision:.001});let p;on(e,h,(e=>o(9,r=e)));const m=qn();return e.$$set=e=>{"rect"in e&&o(7,s=e.rect),"visible"in e&&o(8,l=e.visible),"style"in e&&o(0,c=e.style)},e.$$.update=()=>{2304&e.$$.dirty&&u.set(l?1:.5,{hard:!1===a}),2304&e.$$.dirty&&h.set(l?1:0,{hard:!1===a}),1664&e.$$.dirty&&o(1,i=Object.keys(K).map(((e,t)=>{const o=K[e],i=rf[o](s),a=1===o.length?"edge":"corner",l="corner"===a;return{key:o,type:a,scale:{x:/^(t|b)$/.test(o)?s.width:l?ns(n,.5,1.25):1,y:/^(r|l)$/.test(o)?s.height:l?ns(n,.5,1.25):1},translate:{x:i.x,y:i.y},opacity:r}})))},[c,i,d,u,h,(e,t)=>({detail:o})=>{p&&t!==p||"resizestart"!==e&&void 0===p||("resizestart"===e&&(p=t),"resizeend"===e&&(p=void 0),m(e,{direction:t,translation:o&&o.translation}))},e=>({detail:t})=>{m("resizestart",{direction:e,translation:{x:0,y:0}}),m("resizemove",{direction:e,translation:t}),m("resizeend",{direction:e,translation:{x:0,y:0}})},s,l,r,n,a]}class cf extends Fa{constructor(e){super(),za(this,e,lf,sf,Qr,{rect:7,visible:8,style:0})}}var df=e=>{function t(t,o){e.dispatchEvent(new CustomEvent(t,{detail:o}))}const o=o=>{o.preventDefault(),e.addEventListener("gesturechange",i),e.addEventListener("gestureend",r),t("gesturedown")},i=e=>{e.preventDefault(),t("gestureupdate",e.scale)},r=e=>{t("gestureup",e.scale),e.preventDefault(),n()},n=()=>{e.removeEventListener("gesturechange",i),e.removeEventListener("gestureend",r)};return e.addEventListener("gesturestart",o),{destroy:()=>{n(),e.removeEventListener("gesturestart",o)}}},uf={[J]:ee,[Q]:te,[ee]:J,[te]:Q,[oe]:re,[ie]:ne,[re]:oe,[ne]:ie},hf=e=>{const t=e===te||e===Q,o=e===J||e===ee;return[e===Q||e===ie||e===re,e===te||e===ne||e===oe,e===J||e===ie||e===oe,e===ee||e===re||e===ne,t,o,t||o]},pf=(e,t,o,i={})=>{const{target:r,translate:n}=t,{aspectRatio:a,minSize:s,maxSize:l}=i,c=ae[uf[r]],d=ve(ue(e.x,e.y),ue(c[0]*e.width,c[1]*e.height)),u=ae[r],h=ve(Ke(e),ue(u[0]*e.width,u[1]*e.height)),[p,m,g,$,f,y,b]=hf(r);let x=n.x,v=n.y;f?v=0:y&&(x=0);const{inner:w,outer:S}=mf(d,r,o,{aspectRatio:a,minSize:s,maxSize:l});let[k,C,T,M]=vt(e);if(p?M=d.x:m&&(C=d.x),$?k=d.y:g&&(T=d.y),p){const e=w.x+w.width,t=S.x+S.width;C=ns(h.x+x,e,t)}else if(m){const e=S.x,t=w.x;M=ns(h.x+x,e,t)}if($){const e=w.y+w.height,t=S.y+S.height;T=ns(h.y+v,e,t)}else if(g){const e=S.y,t=w.y;k=ns(h.y+v,e,t)}if(M>w.x&&(M=w.x),Cw.y&&(k=w.y),TS.x+S.width){const e=C-(S.x+S.width);C=S.x+S.width,M-=e}if(kS.y+S.height){const e=T-(S.y+S.height);T=S.y+S.height,k-=e}if(a)if(b){let e=C-M,t=T-k;f?(t=e/a,k=d.y-.5*t,T=d.y+.5*t):y&&(e=t*a,M=d.x-.5*e,C=d.x+.5*e)}else{const e=ue(h.x+x-d.x,h.y+v-d.y);r===ie?(e.x=Math.max(0,e.x),e.y=Math.min(0,e.y)):r===re?(e.x=Math.max(0,e.x),e.y=Math.max(0,e.y)):r===ne?(e.x=Math.min(0,e.x),e.y=Math.max(0,e.y)):r===oe&&(e.x=Math.min(0,e.x),e.y=Math.min(0,e.y));const t=$e(e),o=$e(ue(w.width,w.height)),i=$e(ue(S.width,S.height)),n=ns(t,o,i),s=ue(a,1),l=ke(fe(s),n);r===ie?(C=d.x+l.x,k=d.y-l.y):r===re?(C=d.x+l.x,T=d.y+l.y):r===ne?(M=d.x-l.x,T=d.y+l.y):r===oe&&(M=d.x-l.x,k=d.y-l.y)}return nt(M,k,C-M,T-k)};const mf=(e,t,o,i)=>{const{aspectRatio:r,minSize:n,maxSize:a}=i,s=t===Q||t===ie||t===re,l=t===te||t===ne||t===oe,c=t===J||t===ie||t===oe,d=t===ee||t===re||t===ne,u=t===te||t===Q,h=t===J||t===ee,p=Ke(o);s?(p.x=e.x,p.width-=e.x):l&&(p.width=e.x),d?(p.y=e.y,p.height-=e.y):c&&(p.height=e.y);const m=((e,t)=>qe(0,0,e,t))(Math.min(p.width,a.width),Math.min(p.height,a.height));if(r)if(u){const t=Math.min(e.y,o.height-e.y);m.height=Math.min(2*t,m.height)}else if(h){const t=Math.min(e.x,o.width-e.x);m.width=Math.min(2*t,m.width)}const g=r?De(bt(Qe(n),r)):n,$=r?De(xt(m,r)):m;let f,y,b,x;s?f=e.x:l&&(y=e.x),d?b=e.y:c&&(x=e.y),s?y=f+g.width:l&&(f=y-g.width),d?x=b+g.height:c&&(b=x-g.height),u?(b=e.y-.5*g.height,x=e.y+.5*g.height):h&&(f=e.x-.5*g.width,y=e.x+.5*g.width);const v=ot([ue(f,b),ue(y,x)]);s?y=f+$.width:l&&(f=y-$.width),d?x=b+$.height:c&&(b=x-$.height),u?(b=e.y-.5*$.height,x=e.y+.5*$.height):h&&(f=e.x-.5*$.width,y=e.x+.5*$.width),f=Math.max(o.x,f),y=Math.min(o.x+o.width,y),b=Math.max(o.y,b),x=Math.min(o.y+o.height,x);return{inner:v,outer:ot([ue(f,b),ue(y,x)])}};var gf=e=>180*e/Math.PI;function $f(e){let t,o,i;return o=new of({props:{elasticity:e[5],min:e[9],max:e[10],value:e[11],valueMin:Math.max(e[9],e[0]),valueMax:Math.min(e[10],e[1]),labelReset:e[6],base:e[12],valueLabel:Math.round(gf(e[11]))+"°",oninputstart:e[2],oninputmove:e[17],oninputend:e[18]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaImageRotator")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,[t]){const i={};32&t&&(i.elasticity=e[5]),512&t&&(i.min=e[9]),1024&t&&(i.max=e[10]),2048&t&&(i.value=e[11]),513&t&&(i.valueMin=Math.max(e[9],e[0])),1026&t&&(i.valueMax=Math.min(e[10],e[1])),64&t&&(i.labelReset=e[6]),4096&t&&(i.base=e[12]),2048&t&&(i.valueLabel=Math.round(gf(e[11]))+"°"),4&t&&(i.oninputstart=e[2]),392&t&&(i.oninputmove=e[17]),400&t&&(i.oninputend=e[18]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function ff(e,t,o){let i,r,n,s,l,c,d,{rotation:u}=t,{valueMin:h}=t,{valueMax:p}=t,{oninputstart:m=a}=t,{oninputmove:g=a}=t,{oninputend:$=a}=t,{elasticity:f=0}=t,{labelReset:y}=t,{rotationMin:b}=t,{rotationMax:x}=t;return e.$$set=e=>{"rotation"in e&&o(13,u=e.rotation),"valueMin"in e&&o(0,h=e.valueMin),"valueMax"in e&&o(1,p=e.valueMax),"oninputstart"in e&&o(2,m=e.oninputstart),"oninputmove"in e&&o(3,g=e.oninputmove),"oninputend"in e&&o(4,$=e.oninputend),"elasticity"in e&&o(5,f=e.elasticity),"labelReset"in e&&o(6,y=e.labelReset),"rotationMin"in e&&o(14,b=e.rotationMin),"rotationMax"in e&&o(15,x=e.rotationMax)},e.$$.update=()=>{16384&e.$$.dirty&&o(9,i=b+1e-9),32768&e.$$.dirty&&o(10,r=x-1e-9),1536&e.$$.dirty&&o(12,n=i+.5*(r-i)),32768&e.$$.dirty&&o(16,s=2*x),8192&e.$$.dirty&&o(8,l=Math.sign(u)),73728&e.$$.dirty&&o(7,c=Math.round(Math.abs(u)/s)*s),8576&e.$$.dirty&&o(11,d=u-l*c)},[h,p,m,g,$,f,y,c,l,i,r,d,n,u,b,x,s,e=>g(l*c+e),e=>$(l*c+e)]}class yf extends Fa{constructor(e){super(),za(this,e,ff,$f,Qr,{rotation:13,valueMin:0,valueMax:1,oninputstart:2,oninputmove:3,oninputend:4,elasticity:5,labelReset:6,rotationMin:14,rotationMax:15})}}function bf(e){let t,o,i,r,n;return{c(){t=kn("div"),o=kn("p"),i=Tn(e[0]),r=Tn(" × "),n=Tn(e[1]),An(t,"class","PinturaImageInfo")},m(e,a){wn(e,t,a),bn(t,o),bn(o,i),bn(o,r),bn(o,n)},p(e,[t]){1&t&&Fn(i,e[0]),2&t&&Fn(n,e[1])},i:Gr,o:Gr,d(e){e&&Sn(t)}}}function xf(e,t,o){let{width:i}=t,{height:r}=t;return e.$$set=e=>{"width"in e&&o(0,i=e.width),"height"in e&&o(1,r=e.height)},[i,r]}class vf extends Fa{constructor(e){super(),za(this,e,xf,bf,Qr,{width:0,height:1})}}function wf(e){let t,o;return t=new Wu({props:{class:"PinturaPresetListFilter",layout:"row",options:e[8],selectedIndex:e[7],onchange:e[10]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};256&o&&(i.options=e[8]),128&o&&(i.selectedIndex=e[7]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Sf(e){let t,o;return t=new lh({props:{icon:e[0],label:e[1],labelClass:e[2],hideLabel:e[3],options:e[9],selectedIndex:e[4],onchange:e[5],optionMapper:e[6],$$slots:{controls:[wf]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,[o]){const i={};1&o&&(i.icon=e[0]),2&o&&(i.label=e[1]),4&o&&(i.labelClass=e[2]),8&o&&(i.hideLabel=e[3]),512&o&&(i.options=e[9]),16&o&&(i.selectedIndex=e[4]),32&o&&(i.onchange=e[5]),64&o&&(i.optionMapper=e[6]),262528&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}const kf='fill="none" stroke="currentColor"';function Cf(e,t,o){let i,r,n,{icon:s}=t,{label:l}=t,{labelClass:c}=t,{hideLabel:d}=t,{options:u}=t,{selectedIndex:h}=t,{onchange:p}=t,{optionMapper:m}=t,{filter:g="landscape"}=t,{onfilterchange:$=a}=t;const f=(e,t,o,i,r)=>`\n `,y=(e,t)=>``;return e.$$set=e=>{"icon"in e&&o(0,s=e.icon),"label"in e&&o(1,l=e.label),"labelClass"in e&&o(2,c=e.labelClass),"hideLabel"in e&&o(3,d=e.hideLabel),"options"in e&&o(12,u=e.options),"selectedIndex"in e&&o(4,h=e.selectedIndex),"onchange"in e&&o(5,p=e.onchange),"optionMapper"in e&&o(6,m=e.optionMapper),"filter"in e&&o(11,g=e.filter),"onfilterchange"in e&&o(13,$=e.onfilterchange)},e.$$.update=()=>{6144&e.$$.dirty&&o(9,i=((e,t)=>(e||[]).map((e=>R(e[0])?(e[1]=e[1].map(t),e):t(e))))(u,(e=>t=>{const[o,i,r={}]=t;return Ao(o)&&(r.hidden="landscape"===e?o<1:o>1),[o,i,r]})(g))),2048&e.$$.dirty&&o(7,r="landscape"===g?0:1),128&e.$$.dirty&&o(8,n=[["landscape","Landscape",{hideLabel:!0,icon:f(2,6,19,12,2)+(0===r?y(9,12):"")}],["portrait","Portrait",{hideLabel:!0,icon:f(5,3,13,18,2)+(1===r?y(9,12):"")}]])},[s,l,c,d,h,p,m,r,n,i,e=>{o(11,g=e.value),$(e.value)},g,u,$]}class Tf extends Fa{constructor(e){super(),za(this,e,Cf,Sf,Qr,{icon:0,label:1,labelClass:2,hideLabel:3,options:12,selectedIndex:4,onchange:5,optionMapper:6,filter:11,onfilterchange:13})}}const Mf=e=>xe(e,(e=>se(e,6))),Rf=e=>St(e,(e=>se(e,6))),Pf=(e,t,o=1e-4)=>Math.abs(e-t){const{aspectRatio:n}=r;e=Rf(e),i=i.map(Mf);const a=dt(e,uf[o.target]),s=xe(a,(e=>se(e,6))),l=n?bt(r.minSize,n):r.minSize,c=n?xt(r.maxSize,n):r.maxSize,d=dt(t,o.target);if(Re(d,a)<1){t=Ke(e);const o=Math.min(l.width/e.width,l.height/e.height);lt(t,o,a)}t=ct(Ke(t),l,c,a);let u=Ke(t);t=Rf(t);const h=At(i,1),p=wt(e),m=wt(t),g=p.findIndex((e=>be(xe(e,(e=>se(e,6))),s))),$=e=>h.map((t=>Mt(t,e))).filter(Boolean).pop();if(n){const t=m.map(((e,t)=>{if(t===g)return;const o=ue(a.x-e.x,a.y-e.y);fe(o),ke(o,.5);const i=ue(a.x-o.x,a.y-o.y),r=Ge(i,Mf(e)),n=$(r);if(!n)return;const s=p[t];return{intersection:n,cornerDist:Re(a,s),intersectionDist:Re(a,n)}})).filter(Boolean);if(t.length){const o=t.reduce(((e,t)=>{const o=t.intersectionDist/t.cornerDist;return o{if(o===g)return;const i=m[o],n=!Pf(i.x,s.x)&&!Pf(i.y,s.y);if(!e&&!r&&n)return;if(e&&(Pf(i.x,s.x)||Pf(i.y,s.y)))return;const l=pe(e?t:a),c=we(pe(l),i);fe(c),ke(c,.5),e?ve(l,c):we(l,c);const d=Ge(l,i),u=$(d);return u||void 0})).filter(Boolean);if(n.length){const[e,i,r,l]=hf(o.target);let[c,d,h,p]=vt(t);n.forEach((({x:t,y:o})=>{const n=se(t,6),a=se(o,6);r&&!Pf(a,s.y)&&(c=Math.max(c,o)),e&&!Pf(n,s.x)&&(d=Math.min(d,t)),l&&!Pf(a,s.y)&&(h=Math.min(h,o)),i&&!Pf(n,s.x)&&(p=Math.max(p,t))})),u=et([c,d,h,p]),lt(u,.9999,a)}}return ct(u,l,c,a),u};function If(e){let t,o;return t=new up({props:{items:e[11]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};2048&o[0]&&(i.items=e[11]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Af(e){let t,o,i;return o=new B$({props:{$$slots:{default:[If]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"slot","header")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};2048&t[0]|1&t[7]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Lf(e){let t,o;return t=new cd({props:{onclick:e[87],label:e[4].cropLabelButtonRecenter,icon:e[4].cropIconButtonRecenter,class:"PinturaButtonCenter",disabled:!e[9],hideLabel:!0,style:`opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)`}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.label=e[4].cropLabelButtonRecenter),16&o[0]&&(i.icon=e[4].cropIconButtonRecenter),512&o[0]&&(i.disabled=!e[9]),1610612736&o[0]&&(i.style=`opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)`),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function zf(e){let t,o;return t=new cf({props:{rect:e[8],visible:e[12],style:e[1]}}),t.$on("resizestart",e[67]),t.$on("resizemove",e[68]),t.$on("resizeend",e[69]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};256&o[0]&&(i.rect=e[8]),4096&o[0]&&(i.visible=e[12]),2&o[0]&&(i.style=e[1]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Ff(e){let t,o;return t=new vf({props:{width:Math.round(e[13].width),height:Math.round(e[13].height)}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8192&o[0]&&(i.width=Math.round(e[13].width)),8192&o[0]&&(i.height=Math.round(e[13].height)),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Df(e){let t,o,i,r,n,a,s,l,c=e[21]&&e[10]&&Lf(e),d=e[21]&&zf(e),u=e[22]&&Ff(e);return{c(){t=kn("div"),o=kn("div"),c&&c.c(),i=Mn(),d&&d.c(),n=Mn(),u&&u.c(),An(o,"class","PinturaStage"),An(t,"slot","main")},m(h,p){wn(h,t,p),bn(t,o),c&&c.m(o,null),bn(o,i),d&&d.m(o,null),e[161](o),bn(t,n),u&&u.m(t,null),a=!0,s||(l=[hn($c.call(null,o)),Pn(o,"measure",e[159]),Pn(o,"wheel",(function(){Jr(e[2]&&e[86])&&(e[2]&&e[86]).apply(this,arguments)}),{passive:!1}),Pn(o,"interactionstart",e[73]),Pn(o,"interactionupdate",e[74]),Pn(o,"interactionrelease",e[76]),Pn(o,"interactionend",e[75]),hn(r=hd.call(null,o,{drag:!0,inertia:!0,pinch:e[2],shouldStartInteraction:Gf,getEventPosition:e[162]})),Pn(o,"gesturedown",e[83]),Pn(o,"gestureupdate",e[84]),Pn(o,"gestureup",e[85]),hn(df.call(null,o))],s=!0)},p(n,a){(e=n)[21]&&e[10]?c?(c.p(e,a),2098176&a[0]&&xa(c,1)):(c=Lf(e),c.c(),xa(c,1),c.m(o,i)):c&&(ya(),va(c,1,1,(()=>{c=null})),ba()),e[21]?d?(d.p(e,a),2097152&a[0]&&xa(d,1)):(d=zf(e),d.c(),xa(d,1),d.m(o,null)):d&&(ya(),va(d,1,1,(()=>{d=null})),ba()),r&&Jr(r.update)&&16777220&a[0]&&r.update.call(null,{drag:!0,inertia:!0,pinch:e[2],shouldStartInteraction:Gf,getEventPosition:e[162]}),e[22]?u?(u.p(e,a),4194304&a[0]&&xa(u,1)):(u=Ff(e),u.c(),xa(u,1),u.m(t,null)):u&&(ya(),va(u,1,1,(()=>{u=null})),ba())},i(e){a||(xa(c),xa(d),xa(u),a=!0)},o(e){va(c),va(d),va(u),a=!1},d(o){o&&Sn(t),c&&c.d(),d&&d.d(),e[161](null),u&&u.d(),s=!1,Kr(l)}}}function Of(e){let t,o,i,r;const n=[{class:"PinturaControlList"},{tabs:e[7]},e[18]];let a={$$slots:{default:[Bf,({tab:e})=>({216:e}),({tab:e})=>[0,0,0,0,0,0,e?1073741824:0]]},$$scope:{ctx:e}};for(let e=0;e({215:e}),({panel:e})=>[0,0,0,0,0,0,e?536870912:0]]},$$scope:{ctx:e}};for(let e=0;e{a[l]=null})),ba()),~t?(o=a[t],o?o.p(e,r):(o=a[t]=n[t](e),o.c()),xa(o,1),o.m(i.parentNode,i)):o=null)},i(e){r||(xa(o),r=!0)},o(e){va(o),r=!1},d(e){~t&&a[t].d(e),e&&Sn(i)}}}function Nf(e){let t,o,i=e[19]&&Of(e);return{c(){t=kn("div"),i&&i.c(),An(t,"slot","footer"),An(t,"style",e[16])},m(e,r){wn(e,t,r),i&&i.m(t,null),o=!0},p(e,r){e[19]?i?(i.p(e,r),524288&r[0]&&xa(i,1)):(i=Of(e),i.c(),xa(i,1),i.m(t,null)):i&&(ya(),va(i,1,1,(()=>{i=null})),ba()),(!o||65536&r[0])&&An(t,"style",e[16])},i(e){o||(xa(i),o=!0)},o(e){va(i),o=!1},d(e){e&&Sn(t),i&&i.d()}}}function Hf(e){let t,o,i;function r(t){e[163](t)}let n={hasHeader:e[20],$$slots:{footer:[Nf],main:[Df],header:[Af]},$$scope:{ctx:e}};return void 0!==e[15]&&(n.root=e[15]),t=new J$({props:n}),ta.push((()=>Ea(t,"root",r))),t.$on("measure",e[164]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};1048576&i[0]&&(r.hasHeader=e[20]),2146402302&i[0]|1&i[7]&&(r.$$scope={dirty:i,ctx:e}),!o&&32768&i[0]&&(o=!0,r.root=e[15],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}const jf=1,Uf=0,Gf=(e,t)=>e.target===t;function Zf(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,R,P,E,I,A,z,F,D,O,B,W,_,V,N,H,j,Z,X,K,J,Q,ee,te,le,ce,de,he,ge,ye,xe,Se,Ce,Te,Me,Re,Pe,Ee,Ie,Ae,Le,Fe,Be,_e,Ge,Ze,Xe,Ye=Gr,qe=()=>(Ye(),Ye=en(Je,(e=>o(12,I=e))),Je);e.$$.on_destroy.push((()=>Ye()));let{isActive:Je}=t;qe();let{stores:et}=t,{cropImageSelectionCornerStyle:tt="circle"}=t,{cropWillRenderImageSelectionGuides:ot=((e,t)=>{const o="rotate"==e;return{rows:o?5:3,cols:o?5:3,opacity:.25*t}})}=t,{cropAutoCenterImageSelectionTimeout:it}=t,{cropEnableZoomMatchImageAspectRatio:ct=!0}=t,{cropEnableRotateMatchImageAspectRatio:dt="never"}=t,{cropEnableRotationInput:mt=!0}=t,{cropEnableZoom:gt=!0}=t,{cropEnableZoomInput:$t=!0}=t,{cropEnableZoomAutoHide:wt=!0}=t,{cropEnableImageSelection:kt=!0}=t,{cropEnableInfoIndicator:Ct=!1}=t,{cropEnableZoomTowardsWheelPosition:Tt=!0}=t,{cropEnableLimitWheelInputToCropSelection:Mt=!0}=t,{cropEnableCenterImageSelection:Rt=!0}=t,{cropEnableButtonRotateLeft:Pt=!0}=t,{cropEnableButtonRotateRight:Et=!1}=t,{cropEnableButtonFlipHorizontal:It=!0}=t,{cropEnableButtonFlipVertical:At=!1}=t,{cropSelectPresetOptions:Lt}=t,{cropEnableSelectPreset:zt=!0}=t,{cropEnableFilterMatchAspectRatio:Ft=!0}=t,{cropSelectPresetFilter:Dt=!1}=t,{cropEnableButtonToggleCropLimit:Ot=!1}=t,{cropWillRenderTools:Bt=G}=t,{cropActiveTransformTool:Wt="rotation"}=t,{cropMinimizeToolbar:_t="auto"}=t,{cropInteractionFocus:Vt="image"}=t,{cropRotationRange:Nt=Y}=t,{cropMaskOpacity:Ht=.85}=t,{locale:jt={}}=t;const Ut=Jn("isAnimated");on(e,Ut,(e=>o(138,A=e)));const Gt=Jn("elasticityMultiplier");on(e,Gt,(e=>o(25,Fe=e)));const Zt=Jn("redrawTrigger");on(e,Zt,(e=>o(158,Le=e)));const Xt=Jn("imageIsStatic");on(e,Xt,(e=>o(144,_=e)));const Yt=Jn("imageStaticVisualCorners");on(e,Yt,(e=>o(179,Ce=e)));let qt="idle";const Kt=Ba();on(e,Kt,(e=>o(155,Ee=e)));const Jt=()=>void 0===xe,Qt=e=>1/e,eo=e=>{Ft&&Dt!==e&&(o(94,Dt=e),xe&&1!==xe&&to()&&un(_o,xe=Qt(xe),xe))},to=()=>{if(1===xe||!i)return!1;const e=Qt(xe);return!!cu(Ee).find((([t])=>t===e))},oo=(e,t,o)=>q(o)?t.width===Math.round(e.height)||t.height===Math.round(e.width):t.width===Math.round(e.width)||t.height===Math.round(e.height),io=()=>(Jt()||"always"===dt&&to())&&((e,t,o)=>{const i=Ue(He(ze(t),o),(e=>Math.abs(Math.round(e)))),r=Ne(i),n=at(e);return be(r,n)})(V,ee,te)&&oo(V,ee,te),ro=e=>{if("never"!==dt&&io()){un(To,te+=e,te);const t=q(te),o=t?ee.height:ee.width,i=t?ee.width:ee.height;un(Do,V=nt(0,0,o,i),V),Jt()||un(_o,xe=U(o,i),xe)}else un(To,te+=e,te)},{history:no,env:ao,isInteracting:so,isInteractingFraction:lo,isTransformingImage:co,rootRect:uo,stageRect:ho,utilRect:po,utilRectPadded:mo,rootLineColor:go,allowPan:$o,allowZoom:fo,allowPlayPause:yo,rangeInputElasticity:bo,presentationScalar:xo,utilTools:vo,imagePreviewModifiers:wo,imageOutlineOpacity:So,imageFlipX:ko,imageFlipY:Co,imageRotation:To,imageRotationRange:Mo,imageOutputSize:Ro,imageSelectionRect:Po,imageSelectionRectSnapshot:Eo,imageSelectionRectIntent:Io,imageSelectionRectPresentation:Ao,imageCropRectIntent:Lo,imageCropRectOrigin:zo,imageCropRect:Do,imageCropMinSize:Oo,imageCropMaxSize:Bo,imageCropRange:Wo,imageCropAspectRatio:_o,imageCropLimitToImage:Vo,imageSize:No,imageScalar:Ho,imageOverlayMarkup:jo,stagePadded:Uo,stageRecenter:Go}=et;let Zo;on(e,ao,(e=>o(139,z=e))),on(e,so,(e=>o(143,W=e))),on(e,co,(e=>o(172,J=e))),on(e,uo,(e=>o(24,de=e))),on(e,ho,(e=>o(150,K=e))),on(e,mo,(e=>o(147,j=e))),on(e,xo,(e=>o(146,H=e))),on(e,vo,(e=>o(181,Me=e))),on(e,wo,(e=>o(171,O=e))),on(e,ko,(e=>o(157,Ae=e))),on(e,Co,(e=>o(156,Ie=e))),on(e,To,(e=>o(14,te=e))),on(e,Mo,(e=>o(26,Be=e))),on(e,Ro,(e=>o(182,Re=e))),on(e,Po,(e=>o(149,X=e))),on(e,Eo,(e=>o(148,Z=e))),on(e,Io,(e=>o(180,Te=e))),on(e,Ao,(e=>o(142,B=e))),on(e,Lo,(e=>o(174,he=e))),on(e,zo,(e=>o(176,ye=e))),on(e,Do,(e=>o(13,V=e))),on(e,Oo,(e=>o(153,ce=e))),on(e,Bo,(e=>o(178,Se=e))),on(e,Wo,(e=>o(175,ge=e))),on(e,_o,(e=>o(177,xe=e))),on(e,Vo,(e=>o(152,le=e))),on(e,No,(e=>o(151,ee=e))),on(e,Ho,(e=>o(145,N=e))),on(e,Uo,(e=>o(141,D=e)));const Xo=(e,t)=>{const o={target:e,translate:t},i=Ve(ze(ce),H),r=Ve(ze(Se),H);let n=pf(Z,o,{...j,x:0,y:0},{aspectRatio:xe,minSize:i,maxSize:r});if(n=((e,t,o)=>{const[i,r,n,a]=vt(e),s={...e};if(it.x+t.width&&(e.width=t.x+t.width-e.x),n>t.y+t.height&&(e.height=t.y+t.height-e.y),a{const o={target:e,translate:t},i=Ve(ze(ce),H),r=Ve(ze(Se),H),n=((e,t,o={})=>{const{target:i,translate:r}=t,{aspectRatio:n,minSize:a}=o,s=ae[uf[i]],l=ve(Ke(e),ue(s[0]*e.width,s[1]*e.height)),c=ae[i],d=ve(Ke(e),ue(c[0]*e.width,c[1]*e.height)),[u,h,p,m,g,$,f]=hf(i);let y=r.x,b=r.y;g?b=0:$&&(y=0);let[x,v,w,S]=vt(e);if(u?S=l.x:h&&(v=l.x),m?x=l.y:p&&(w=l.y),u?v=d.x+y:h&&(S=d.x+y),m?w=d.y+b:p&&(x=d.y+b),a&&g&&w-x{_&&(t=1,e=me(pe(e)));const o=Math.min(X.width/V.width,X.height/V.height),i=ke(pe(e),1/o);let r;if(Ko){const t=we(pe(Ko),e);Ko=e,r=st(Ke(V),t)}else r=st(Ke(qo),me(pe(i))),void 0!==t&<(r,1/t);un(Lo,he=r,he),un(Do,V=r,V)},Qo=Wa([Wo,Do],(([e,t],o)=>{if(!t)return;const[i,r]=e,n=pt(t);o([De(St(bt(i,n),se)),De(St(xt(r,n),se))])}));on(e,Qo,(e=>o(173,Q=e)));const ei=Wa([No,Vo,Oo,Bo,Wo,To],(([e,t,o,i,r,n],a)=>{if(!e)return;const s=r[0],l=r[1];let c,d;t?(c=((e,t,o)=>q(o)?1-1/Math.min(e.height/t.width,e.width/t.height):1-1/Math.min(e.width/t.width,e.height/t.height))(e,l,n),d=Math.min(s.width/o.width,s.height/o.height)):(c=-1,d=1);a([c,d].map((e=>se(e))))}));on(e,ei,(e=>o(27,_e=e)));const ti=Wa([No,Do,Wo,To],(([e,t,o,i],r)=>{if(!e||!t)return r(0);let n;const a=o[0],s=o[1],l=t.width,c=t.height,d=pt(t),u=q(i)?We(e.height,e.width):e,h=xt(u,d);if(l<=h.width||c<=h.height){const e=h.width-a.width,t=h.height-a.height;n=0===e||0===t?1:1-Math.min((l-a.width)/e,(c-a.height)/t)}else{const e=s.width-h.width,t=s.height-h.height,o=xt({width:e,height:t},d);n=-Math.min((l-h.width)/o.width,(c-h.height)/o.height)}r(n)}));on(e,ti,(e=>o(28,Ge=e)));const oi=e=>{const t=pt(qo);let o,i,r;const n=q(te)?We(ee.height,ee.width):ee,a=xt(n,t);if(e>=0){const n=a.width-ge[0].width,s=a.height-ge[0].height;o=a.width-n*e,i=a.height-s*e,r=bt({width:o,height:i},t)}else{const n=ge[1].width-a.width,s=ge[1].height-a.height;o=a.width+n*-e,i=a.height+s*-e,r=xt({width:o,height:i},t)}o=r.width,i=r.height;const s=qo.x+.5*qo.width-.5*o,l=qo.y+.5*qo.height-.5*i;un(Do,V={x:s,y:l,width:o,height:i},V)};let ii;const ri=e=>{const t=lt(Ke(ii),1/e);un(Lo,he=t,he),un(Do,V=t,V)};let ni;const ai=()=>{Go.set({})};let si;const li=ec(0,{precision:1e-4});on(e,li,(e=>o(29,Ze=e)));const ci=ec();on(e,ci,(e=>o(30,Xe=e)));const di=Wa([_o,Ro,Kt],(([e,t,o],r)=>{if(!i)return;const n=cu(o),a=[...n].map((e=>e[0])).sort(((e,t)=>Fo(e[0])&&!Fo(t[0])?1:-1)).find((o=>{if(Fo(o)&&t){const[i,r]=o,n=t.width===i&&t.height===r,a=e===U(i,r);return n&&a}return o===e}));if(!a)return r(void 0);r(n.map((e=>e[0])).findIndex((e=>Fo(e)?ds(e,a):e===a)))}));on(e,di,(e=>o(154,Pe=e)));const ui=(e,t)=>{if(!i||-1===e||void 0===e)return;const o=cu(t)[e][0];return o?Fo(o)?U(o[0],o[1]):o:void 0},hi=Wa([go,Ao,lo],(([e,t,o],i)=>{const{rows:r,cols:n,opacity:a}=ot(qt,o);if(!t||a<=0)return i([]);const{x:s,y:l,width:c,height:d}=t,u=c/n,h=d/r,p=[];for(let t=1;t<=r-1;t++){const o=l+h*t;p.push({id:"image-selection-guide-row-"+t,points:[ue(s,o),ue(s+c,o)],opacity:a,strokeWidth:1,strokeColor:e})}for(let t=1;t<=n-1;t++){const o=s+u*t;p.push({id:"image-selection-guide-col-"+t,points:[ue(o,l),ue(o,l+d)],opacity:a,strokeWidth:1,strokeColor:e})}i(p)}));on(e,hi,(e=>o(140,F=e)));const pi="crop-"+L();let mi,gi=pi+"-"+(mt?Wt:"zoom"),$i=gi,fi=void 0;const yi=ec(A?20:0);on(e,yi,(e=>o(137,E=e)));return e.$$set=e=>{"isActive"in e&&qe(o(0,Je=e.isActive)),"stores"in e&&o(96,et=e.stores),"cropImageSelectionCornerStyle"in e&&o(1,tt=e.cropImageSelectionCornerStyle),"cropWillRenderImageSelectionGuides"in e&&o(97,ot=e.cropWillRenderImageSelectionGuides),"cropAutoCenterImageSelectionTimeout"in e&&o(98,it=e.cropAutoCenterImageSelectionTimeout),"cropEnableZoomMatchImageAspectRatio"in e&&o(99,ct=e.cropEnableZoomMatchImageAspectRatio),"cropEnableRotateMatchImageAspectRatio"in e&&o(100,dt=e.cropEnableRotateMatchImageAspectRatio),"cropEnableRotationInput"in e&&o(101,mt=e.cropEnableRotationInput),"cropEnableZoom"in e&&o(2,gt=e.cropEnableZoom),"cropEnableZoomInput"in e&&o(102,$t=e.cropEnableZoomInput),"cropEnableZoomAutoHide"in e&&o(103,wt=e.cropEnableZoomAutoHide),"cropEnableImageSelection"in e&&o(104,kt=e.cropEnableImageSelection),"cropEnableInfoIndicator"in e&&o(105,Ct=e.cropEnableInfoIndicator),"cropEnableZoomTowardsWheelPosition"in e&&o(106,Tt=e.cropEnableZoomTowardsWheelPosition),"cropEnableLimitWheelInputToCropSelection"in e&&o(107,Mt=e.cropEnableLimitWheelInputToCropSelection),"cropEnableCenterImageSelection"in e&&o(108,Rt=e.cropEnableCenterImageSelection),"cropEnableButtonRotateLeft"in e&&o(109,Pt=e.cropEnableButtonRotateLeft),"cropEnableButtonRotateRight"in e&&o(110,Et=e.cropEnableButtonRotateRight),"cropEnableButtonFlipHorizontal"in e&&o(111,It=e.cropEnableButtonFlipHorizontal),"cropEnableButtonFlipVertical"in e&&o(112,At=e.cropEnableButtonFlipVertical),"cropSelectPresetOptions"in e&&o(113,Lt=e.cropSelectPresetOptions),"cropEnableSelectPreset"in e&&o(114,zt=e.cropEnableSelectPreset),"cropEnableFilterMatchAspectRatio"in e&&o(115,Ft=e.cropEnableFilterMatchAspectRatio),"cropSelectPresetFilter"in e&&o(94,Dt=e.cropSelectPresetFilter),"cropEnableButtonToggleCropLimit"in e&&o(116,Ot=e.cropEnableButtonToggleCropLimit),"cropWillRenderTools"in e&&o(117,Bt=e.cropWillRenderTools),"cropActiveTransformTool"in e&&o(118,Wt=e.cropActiveTransformTool),"cropMinimizeToolbar"in e&&o(119,_t=e.cropMinimizeToolbar),"cropInteractionFocus"in e&&o(120,Vt=e.cropInteractionFocus),"cropRotationRange"in e&&o(3,Nt=e.cropRotationRange),"cropMaskOpacity"in e&&o(121,Ht=e.cropMaskOpacity),"locale"in e&&o(4,jt=e.locale)},e.$$.update=()=>{4096&e.$$.dirty[0]|134217728&e.$$.dirty[3]&&Xt.set("selection"===Vt&&I),1048576&e.$$.dirty[3]&&o(128,i=Lt&&Array.isArray(Lt)&&Lt.length),1048576&e.$$.dirty[3]|16&e.$$.dirty[4]&&Kt.set(i?Lt:[]),4096&e.$$.dirty[0]&&I&&So.set(1),4096&e.$$.dirty[0]&&$o.set(!I),4096&e.$$.dirty[0]&&fo.set(!I),4096&e.$$.dirty[0]&&I&&yo.set(!0),32768&e.$$.dirty[4]&&o(123,p="overlay"===z.layoutMode),1075838976&e.$$.dirty[3]&&o(127,v=zt&&!p),41943040&e.$$.dirty[4]&&o(136,l=j&&X&&ft(j,X)),33558528&e.$$.dirty[4]&&o(134,c=!(!X||!l)),33559552&e.$$.dirty[4]&&o(132,d=c&&ht(X,l,(e=>se(e,5)))),16400&e.$$.dirty[0]|26148866&e.$$.dirty[3]|2013298968&e.$$.dirty[4]|15&e.$$.dirty[5]&&o(11,r=Le&&Bt([Pt&&["Button","rotate-left",{label:jt.cropLabelButtonRotateLeft,labelClass:"PinturaToolbarContentWide",icon:jt.cropIconButtonRotateLeft,onclick:()=>{ro(-Math.PI/2),no.write()}}],Et&&["Button","rotate-right",{label:jt.cropLabelButtonRotateRight,labelClass:"PinturaToolbarContentWide",icon:jt.cropIconButtonRotateRight,onclick:()=>{ro(Math.PI/2),no.write()}}],It&&["Button","flip-horizontal",{label:jt.cropLabelButtonFlipHorizontal,labelClass:"PinturaToolbarContentWide",icon:jt.cropIconButtonFlipHorizontal,onclick:()=>{q(te)?un(Co,Ie=!Ie,Ie):un(ko,Ae=!Ae,Ae),no.write()}}],At&&["Button","flip-vertical",{label:jt.cropLabelButtonFlipVertical,labelClass:"PinturaToolbarContentWide",icon:jt.cropIconButtonFlipVertical,onclick:()=>{q(te)?un(ko,Ae=!Ae,Ae):un(Co,Ie=!Ie,Ie),no.write()}}],v&&i&&[!1===Dt?"Dropdown":Tf,"select-preset",{icon:uu(jt.cropIconSelectPreset,jt,ui(Pe,Ee)),label:uu(jt.cropLabelSelectPreset,jt,ui(Pe,Ee)),labelClass:"PinturaToolbarContentWide",options:Ee,filter:Dt,onfilterchange:eo,selectedIndex:Pe,onchange:({value:e})=>{Fo(e)?(un(_o,xe=U(e[0],e[1]),xe),un(Ro,Re=Oe(e),Re)):un(_o,xe=e,xe),d&&ai(),no.write()},optionMapper:e=>{let t=!1;const o=Fo(e.value)?e.value[0]/e.value[1]:e.value;if(o){const e=os(ee,te,o);t=e.width{const{width:o=24,height:i=24,bounds:r=16,radius:n=3}=t;let a,s,l,c,d=Fo(e)?U(e[0],e[1]):e,u=!!d;return d=u?d:1,l=d>1?r:d*r,c=l/d,a=Math.round(.5*(o-l)),s=Math.round(.5*(i-c)),``})(e.value,{bounds:14}),{...e,disabled:t}}}],Ot&&["Dropdown","select-crop-limit",{icon:uu(jt.cropIconCropBoundary,jt,le),label:jt.cropLabelCropBoundary,labelClass:"PinturaToolbarContentWide",onchange:({value:e})=>{un(Vo,le=e,le),no.write()},options:[[!0,jt.cropLabelCropBoundaryEdge,{icon:uu(jt.cropIconCropBoundary,jt,!0)}],[!1,jt.cropLabelCropBoundaryNone,{icon:uu(jt.cropIconCropBoundary,jt,!1)}]]}]].filter(Boolean),z,(()=>Zt.set({}))).filter(Boolean)),6144&e.$$.dirty[0]|1140850688&e.$$.dirty[3]|32768&e.$$.dirty[4]&&un(vo,Me=I&&"never"!==_t&&("always"===_t||"short"===z.verticalSpace||p)?r.map((([e,t,o])=>Array.isArray(o)?[e,t,o]:[e,t,{...o,hideLabel:!0}])):[],Me),268435456&e.$$.dirty[4]&&o(23,n=le?0:-1),75497472&e.$$.dirty[4]&&o(129,a=j&&ue(-(K.x-j.x),-(K.y-j.y))),262176&e.$$.dirty[4]&&o(130,s=B&&ue(Hd(B.x+.5*B.width+a.x),Hd(B.y+.5*B.height+a.y))),16777216&e.$$.dirty[4]&&o(133,u=null!=Z),8392704&e.$$.dirty[4]&&o(135,h=j&&l&&(l.height===j.height||l.width===j.width)),6293504&e.$$.dirty[4]&&o(131,m=!h&&H<1&&N<1),1920&e.$$.dirty[4]&&o(9,g=c&&!u&&(!d||m)),8192&e.$$.dirty[0]|1073745920&e.$$.dirty[3]&&o(22,$=Ct&&!!V&&!p),262176&e.$$.dirty[4]&&o(8,b=B&&a&&{x:B.x+a.x,y:B.y+a.y,width:B.width,height:B.height}),256&e.$$.dirty[0]|1073743872&e.$$.dirty[3]&&o(21,f=kt&&!!b&&!p),32800&e.$$.dirty[3]|1048640&e.$$.dirty[4]&&o(10,y=Rt&&!!s&&!it&&!_),512&e.$$.dirty[0]|536870944&e.$$.dirty[3]|524288&e.$$.dirty[4]&&g&&it&&!W&&(clearTimeout(si),o(122,si=setTimeout(ai,it))),536870912&e.$$.dirty[3]|524288&e.$$.dirty[4]&&W&&clearTimeout(si),1536&e.$$.dirty[0]|16384&e.$$.dirty[4]&&li.set(y&&g?1:0,{hard:!1===A}),16448&e.$$.dirty[4]&&ci.set(s,{hard:!1===A}),4096&e.$$.dirty[0]|131072&e.$$.dirty[4]&&(I&&!D?(un(wo,O.crop={maskOpacity:Ht,maskMarkupOpacity:Ht},O),wo.set(O)):(delete O.crop,wo.set(O))),65536&e.$$.dirty[4]&&F&&jo.update((e=>{const t=e.filter((e=>!/^image\-selection\-guide/.test(e.id)));return I?[...t,...F]:t})),32768&e.$$.dirty[4]&&o(126,x="short"!==z.verticalSpace),1140850688&e.$$.dirty[3]|4&e.$$.dirty[4]&&o(20,w="never"===_t&&!p||x&&"always"!==_t),4&e.$$.dirty[0]|512&e.$$.dirty[3]&&o(125,S=gt&&$t),1024&e.$$.dirty[3]|6&e.$$.dirty[4]&&o(124,k=wt?x&&S:S),256&e.$$.dirty[3]|1&e.$$.dirty[4]&&o(19,C=mt||k),1&e.$$.dirty[4]&&(k||o(5,$i=gi)),32&e.$$.dirty[0]&&o(18,T={name:pi,selected:$i}),16&e.$$.dirty[0]|256&e.$$.dirty[3]|1&e.$$.dirty[4]&&o(7,M=[mt&&{id:pi+"-rotation",label:jt.cropLabelTabRotation},k&&{id:pi+"-zoom",label:jt.cropLabelTabZoom}].filter(Boolean)),128&e.$$.dirty[0]&&o(17,R=M.map((e=>e.id))),64&e.$$.dirty[0]|1073741824&e.$$.dirty[3]&&mi&&!mi.children.length&&p&&mi.dispatchEvent(new CustomEvent("measure",{detail:mi.rect})),4096&e.$$.dirty[0]|16384&e.$$.dirty[4]&&A&&yi.set(I?0:20),8192&e.$$.dirty[4]&&o(16,P=E?`transform: translateY(${E}px)`:void 0)},[Je,tt,gt,Nt,jt,$i,mi,M,b,g,y,r,I,V,te,fi,P,R,T,C,w,f,$,n,de,Fe,Be,_e,Ge,Ze,Xe,Ut,Gt,Zt,Xt,Yt,Kt,ao,so,co,uo,ho,mo,bo,xo,vo,wo,ko,Co,To,Mo,Ro,Po,Eo,Io,Ao,Lo,zo,Do,Oo,Bo,Wo,_o,Vo,No,Ho,Uo,()=>{qt="select",un(so,W=!0,W),un(Eo,Z=Ke(X),Z),Zo=_?Xo:Yo},({detail:e})=>{const{boundsLimited:t,boundsIntent:o}=Zo(e.direction,e.translation);un(co,J=!0,J),un(Io,Te=o,Te),un(Po,X=t,X)},({detail:e})=>{const{boundsLimited:t}=Zo(e.direction,e.translation);un(co,J=!1,J),un(so,W=!1,W),un(Io,Te=void 0,Te),$e(e.translation)&&(un(Po,X=t,X),no.write()),un(Eo,Z=void 0,Z),qt=void 0},()=>{qt="rotate",un(so,W=!0,W),un(zo,ye=Ke(V),ye)},e=>{un(co,J=!0,J),un(To,te=e,te)},e=>{un(co,J=!1,J),un(so,W=!1,W),un(To,te=e,te),no.write(),un(zo,ye=void 0,ye)},()=>{qt="pan",Ko=void 0,un(so,W=!0,W),qo=Ke(V)},({detail:e})=>{un(co,J=!0,J),Jo(e)},({detail:e})=>{un(co,J=!1,J),un(so,W=!1,W),($e(e.translation)>0||0!==e.scalar)&&(Jo(e),no.write()),un(Lo,he=void 0,he),qo=void 0},({detail:{translation:e}})=>{_&&(e=me(pe(e))),Ko=e,un(so,W=!1,W)},Qo,ei,ti,()=>{qt="zoom",un(so,W=!0,W),qo=Ke(V)},e=>{un(co,J=!1,J),oi(e)},e=>{oi(e),no.write(),un(co,J=!1,J),un(so,W=!1,W),qo=void 0},()=>{qt="zoom",qo||(ii=Ke(V),un(so,W=!0,W))},({detail:e})=>{ii&&(un(co,J=!0,J),ri(e))},({detail:e})=>{ii&&(un(co,J=!1,J),un(so,W=!1,W),ri(e),un(Lo,he=void 0,he),ii=void 0,no.write())},e=>{const t=Wp(e,de,K);if(Mt&&!yt(X,t))return;qt="zoom",un(so,W=!0,W),un(co,J=!0,J),e.preventDefault(),e.stopPropagation();const o=yd(e),i=1+o/100,r=Ke(V),n=1===Math.min(V.width/ce.width,V.height/ce.height);if(ct&&le){const e=oo(V,ee,te);if(Jt()&&e&&o>0&&d){un(so,W=!1,W),un(co,J=!1,J);const e=q(te)?Qe({height:ee.width,width:ee.height}):Qe(ee);if(ht(r,e))return;if(clearTimeout(ni),ht(no.state.crop,e))return;return un(Do,V=e,V),void no.write()}}let a=at(V);if(Tt&&"selection"!==Vt&&o<0&&!n){const e=we(pe(t),X),o=Math.min(X.width/V.width,X.height/V.height),i=lt(Ke(X),1.1);a=yt(i,t)?ve(Ke(V),ke(e,1/o)):a}let s=lt(Ke(V),i,a);if(je(Q[1],s)||(s=rt(at(s),Q[1])),je(s,Q[0])||(s=rt(at(s),Q[0])),ht(r,s,se))return un(so,W=!1,W),void un(co,J=!1,J);un(Do,V=St(s,(e=>se(e,5))),V),un(so,W=!1,W),un(co,J=!1,J),clearTimeout(ni),ni=setTimeout((()=>{no.write()}),500)},ai,li,ci,di,hi,pi,yi,Dt,"crop",et,ot,it,ct,dt,mt,$t,wt,kt,Ct,Tt,Mt,Rt,Pt,Et,It,At,Lt,zt,Ft,Ot,Bt,Wt,_t,Vt,Ht,si,p,k,S,x,v,i,a,s,m,d,u,c,h,l,E,A,z,F,D,B,W,_,N,H,j,Z,X,K,ee,le,ce,Pe,Ee,Ie,Ae,Le,function(t){Qn.call(this,e,t)},({detail:e})=>o(5,$i=e),function(e){ta[e?"unshift":"push"]((()=>{mi=e,o(6,mi)}))},e=>Bp(e),function(e){fi=e,o(15,fi)},function(t){Qn.call(this,e,t)}]}var Xf={util:["crop",class extends Fa{constructor(e){super(),za(this,e,Zf,Hf,Qr,{name:95,isActive:0,stores:96,cropImageSelectionCornerStyle:1,cropWillRenderImageSelectionGuides:97,cropAutoCenterImageSelectionTimeout:98,cropEnableZoomMatchImageAspectRatio:99,cropEnableRotateMatchImageAspectRatio:100,cropEnableRotationInput:101,cropEnableZoom:2,cropEnableZoomInput:102,cropEnableZoomAutoHide:103,cropEnableImageSelection:104,cropEnableInfoIndicator:105,cropEnableZoomTowardsWheelPosition:106,cropEnableLimitWheelInputToCropSelection:107,cropEnableCenterImageSelection:108,cropEnableButtonRotateLeft:109,cropEnableButtonRotateRight:110,cropEnableButtonFlipHorizontal:111,cropEnableButtonFlipVertical:112,cropSelectPresetOptions:113,cropEnableSelectPreset:114,cropEnableFilterMatchAspectRatio:115,cropSelectPresetFilter:94,cropEnableButtonToggleCropLimit:116,cropWillRenderTools:117,cropActiveTransformTool:118,cropMinimizeToolbar:119,cropInteractionFocus:120,cropRotationRange:3,cropMaskOpacity:121,locale:4},null,[-1,-1,-1,-1,-1,-1,-1,-1])}get name(){return this.$$.ctx[95]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get stores(){return this.$$.ctx[96]}set stores(e){this.$$set({stores:e}),pa()}get cropImageSelectionCornerStyle(){return this.$$.ctx[1]}set cropImageSelectionCornerStyle(e){this.$$set({cropImageSelectionCornerStyle:e}),pa()}get cropWillRenderImageSelectionGuides(){return this.$$.ctx[97]}set cropWillRenderImageSelectionGuides(e){this.$$set({cropWillRenderImageSelectionGuides:e}),pa()}get cropAutoCenterImageSelectionTimeout(){return this.$$.ctx[98]}set cropAutoCenterImageSelectionTimeout(e){this.$$set({cropAutoCenterImageSelectionTimeout:e}),pa()}get cropEnableZoomMatchImageAspectRatio(){return this.$$.ctx[99]}set cropEnableZoomMatchImageAspectRatio(e){this.$$set({cropEnableZoomMatchImageAspectRatio:e}),pa()}get cropEnableRotateMatchImageAspectRatio(){return this.$$.ctx[100]}set cropEnableRotateMatchImageAspectRatio(e){this.$$set({cropEnableRotateMatchImageAspectRatio:e}),pa()}get cropEnableRotationInput(){return this.$$.ctx[101]}set cropEnableRotationInput(e){this.$$set({cropEnableRotationInput:e}),pa()}get cropEnableZoom(){return this.$$.ctx[2]}set cropEnableZoom(e){this.$$set({cropEnableZoom:e}),pa()}get cropEnableZoomInput(){return this.$$.ctx[102]}set cropEnableZoomInput(e){this.$$set({cropEnableZoomInput:e}),pa()}get cropEnableZoomAutoHide(){return this.$$.ctx[103]}set cropEnableZoomAutoHide(e){this.$$set({cropEnableZoomAutoHide:e}),pa()}get cropEnableImageSelection(){return this.$$.ctx[104]}set cropEnableImageSelection(e){this.$$set({cropEnableImageSelection:e}),pa()}get cropEnableInfoIndicator(){return this.$$.ctx[105]}set cropEnableInfoIndicator(e){this.$$set({cropEnableInfoIndicator:e}),pa()}get cropEnableZoomTowardsWheelPosition(){return this.$$.ctx[106]}set cropEnableZoomTowardsWheelPosition(e){this.$$set({cropEnableZoomTowardsWheelPosition:e}),pa()}get cropEnableLimitWheelInputToCropSelection(){return this.$$.ctx[107]}set cropEnableLimitWheelInputToCropSelection(e){this.$$set({cropEnableLimitWheelInputToCropSelection:e}),pa()}get cropEnableCenterImageSelection(){return this.$$.ctx[108]}set cropEnableCenterImageSelection(e){this.$$set({cropEnableCenterImageSelection:e}),pa()}get cropEnableButtonRotateLeft(){return this.$$.ctx[109]}set cropEnableButtonRotateLeft(e){this.$$set({cropEnableButtonRotateLeft:e}),pa()}get cropEnableButtonRotateRight(){return this.$$.ctx[110]}set cropEnableButtonRotateRight(e){this.$$set({cropEnableButtonRotateRight:e}),pa()}get cropEnableButtonFlipHorizontal(){return this.$$.ctx[111]}set cropEnableButtonFlipHorizontal(e){this.$$set({cropEnableButtonFlipHorizontal:e}),pa()}get cropEnableButtonFlipVertical(){return this.$$.ctx[112]}set cropEnableButtonFlipVertical(e){this.$$set({cropEnableButtonFlipVertical:e}),pa()}get cropSelectPresetOptions(){return this.$$.ctx[113]}set cropSelectPresetOptions(e){this.$$set({cropSelectPresetOptions:e}),pa()}get cropEnableSelectPreset(){return this.$$.ctx[114]}set cropEnableSelectPreset(e){this.$$set({cropEnableSelectPreset:e}),pa()}get cropEnableFilterMatchAspectRatio(){return this.$$.ctx[115]}set cropEnableFilterMatchAspectRatio(e){this.$$set({cropEnableFilterMatchAspectRatio:e}),pa()}get cropSelectPresetFilter(){return this.$$.ctx[94]}set cropSelectPresetFilter(e){this.$$set({cropSelectPresetFilter:e}),pa()}get cropEnableButtonToggleCropLimit(){return this.$$.ctx[116]}set cropEnableButtonToggleCropLimit(e){this.$$set({cropEnableButtonToggleCropLimit:e}),pa()}get cropWillRenderTools(){return this.$$.ctx[117]}set cropWillRenderTools(e){this.$$set({cropWillRenderTools:e}),pa()}get cropActiveTransformTool(){return this.$$.ctx[118]}set cropActiveTransformTool(e){this.$$set({cropActiveTransformTool:e}),pa()}get cropMinimizeToolbar(){return this.$$.ctx[119]}set cropMinimizeToolbar(e){this.$$set({cropMinimizeToolbar:e}),pa()}get cropInteractionFocus(){return this.$$.ctx[120]}set cropInteractionFocus(e){this.$$set({cropInteractionFocus:e}),pa()}get cropRotationRange(){return this.$$.ctx[3]}set cropRotationRange(e){this.$$set({cropRotationRange:e}),pa()}get cropMaskOpacity(){return this.$$.ctx[121]}set cropMaskOpacity(e){this.$$set({cropMaskOpacity:e}),pa()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),pa()}}]};function Yf(e){let t,o,i,r,n,a,s,l=e[77],c=(P(e[77].label)?e[77].label(e[2]):e[77].label)+"";function d(...t){return e[51](e[77],...t)}const u=()=>e[52](o,l),h=()=>e[52](null,l);return{c(){t=kn("div"),o=kn("div"),i=Mn(),r=kn("span"),n=Tn(c),An(o,"class",Qf),An(t,"slot","option"),An(t,"class","PinturaFilterOption")},m(e,l){wn(e,t,l),bn(t,o),u(),bn(t,i),bn(t,r),bn(r,n),a||(s=[Pn(o,"measure",d),hn($c.call(null,o))],a=!0)},p(t,o){l!==(e=t)[77]&&(h(),l=e[77],u()),4&o[0]|32768&o[2]&&c!==(c=(P(e[77].label)?e[77].label(e[2]):e[77].label)+"")&&Fn(n,c)},d(e){e&&Sn(t),h(),a=!1,Kr(s)}}}function qf(e){let t,o;return t=new Wu({props:{locale:e[2],layout:"row",options:e[3],selectedIndex:e[12],onchange:e[32],$$slots:{option:[Yf,({option:e})=>({77:e}),({option:e})=>[0,0,e?32768:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};4&o[0]&&(i.locale=e[2]),8&o[0]&&(i.options=e[3]),4096&o[0]&&(i.selectedIndex=e[12]),1028&o[0]|98304&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Kf(e){let t,o,i,r,n,a,s,l;function c(t){e[54](t)}function d(t){e[55](t)}function u(t){e[56](t)}let h={elasticity:e[13]*e[19],onscroll:e[53],$$slots:{default:[qf]},$$scope:{ctx:e}};return void 0!==e[4]&&(h.maskFeatherStartOpacity=e[4]),void 0!==e[5]&&(h.maskFeatherEndOpacity=e[5]),void 0!==e[6]&&(h.maskFeatherSize=e[6]),o=new vd({props:h}),ta.push((()=>Ea(o,"maskFeatherStartOpacity",c))),ta.push((()=>Ea(o,"maskFeatherEndOpacity",d))),ta.push((()=>Ea(o,"maskFeatherSize",u))),o.$on("measure",e[57]),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"slot","footer"),An(t,"style",e[11])},m(i,r){wn(i,t,r),Aa(o,t,null),a=!0,s||(l=[Pn(t,"transitionend",e[30]),Pn(t,"measure",e[58]),hn($c.call(null,t,{observePosition:!0}))],s=!0)},p(e,s){const l={};8192&s[0]&&(l.elasticity=e[13]*e[19]),128&s[0]&&(l.onscroll=e[53]),5132&s[0]|65536&s[2]&&(l.$$scope={dirty:s,ctx:e}),!i&&16&s[0]&&(i=!0,l.maskFeatherStartOpacity=e[4],ca((()=>i=!1))),!r&&32&s[0]&&(r=!0,l.maskFeatherEndOpacity=e[5],ca((()=>r=!1))),!n&&64&s[0]&&(n=!0,l.maskFeatherSize=e[6],ca((()=>n=!1))),o.$set(l),(!a||2048&s[0])&&An(t,"style",e[11])},i(e){a||(xa(o.$$.fragment,e),a=!0)},o(e){va(o.$$.fragment,e),a=!1},d(e){e&&Sn(t),La(o),s=!1,Kr(l)}}}function Jf(e){let t,o;return t=new J$({props:{$$slots:{footer:[Kf]},$$scope:{ctx:e}}}),t.$on("measure",e[59]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16380&o[0]|65536&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}let Qf="PinturaFilterPreview";function ey(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S=Gr,k=()=>(S(),S=en(R,(e=>o(43,d=e))),R),C=Gr,T=()=>(C(),C=en(M,(e=>o(49,b=e))),M);e.$$.on_destroy.push((()=>S())),e.$$.on_destroy.push((()=>C()));let{isActive:M}=t;T();let{isActiveFraction:R}=t;k();let{stores:E}=t,{locale:I}=t,{filterFunctions:A}=t,{filterOptions:L}=t;const z=Jn("elasticityMultiplier");on(e,z,(e=>o(13,w=e)));const{history:F,interfaceImages:D,stageRectBase:O,utilRect:B,animation:W,scrollElasticity:_,imageSize:V,imagePreview:N,imageCropRect:H,imageRotation:j,imageFlipX:U,imageFlipY:G,imageBackgroundColor:Z,imageGamma:X,imageColorMatrix:Y,allowPan:q,allowZoom:K,allowZoomControls:J,allowPlayPause:Q}=E;on(e,D,(e=>o(60,u=e))),on(e,O,(e=>o(48,y=e))),on(e,B,(e=>o(47,f=e))),on(e,W,(e=>o(50,x=e))),on(e,V,(e=>o(62,p=e))),on(e,N,(e=>o(42,c=e))),on(e,Z,(e=>o(61,h=e))),on(e,X,(e=>o(44,m=e))),on(e,Y,(e=>o(40,s=e)));const ee=Ba({});on(e,ee,(e=>o(46,$=e)));const te=(e,t)=>un(ee,$[e.value]=t,$),oe=Wa(ee,(e=>{if(!e[void 0])return;const t=e[void 0];return v&&_e(v,t)?v:ze(t)}));on(e,oe,(e=>o(63,v=e)));const ie=Wa([M,oe,H,V,j,U,G],(([e,t,o,i,r,n,a],s)=>{if(!e||!t||!i)return g;const l=Qe(i),c=at(l),d=rs(i,o,r),u=at(d),h=we(pe(c),u),p=me(pe(h)),m=Math.max(t.width/o.width,t.height/o.height);s({origin:p,translation:h,rotation:{x:a?Math.PI:0,y:n?Math.PI:0,z:r},scale:m})}));on(e,ie,(e=>o(45,g=e)));const re=ec(x?20:0);let ne;on(e,re,(e=>o(39,a=e)));const ae={};let se,le,ce,de,he,ge,$e={x:0,y:0};const fe=Ba([]);on(e,fe,(e=>o(41,l=e)));const ye=e=>{const t={...e,data:c,size:p,offset:{...e.offset},mask:{...e.mask},backgroundColor:h};return t.opacity=d,t.offset.y+=a,t.mask.y+=a,t.id="filter",t},be=()=>u.filter((e=>"filter"!==e.id));Yn((()=>{D.set([])}));return e.$$set=e=>{"isActive"in e&&T(o(0,M=e.isActive)),"isActiveFraction"in e&&k(o(1,R=e.isActiveFraction)),"stores"in e&&o(34,E=e.stores),"locale"in e&&o(2,I=e.locale),"filterFunctions"in e&&o(35,A=e.filterFunctions),"filterOptions"in e&&o(3,L=e.filterOptions)},e.$$.update=()=>{if(262144&e.$$.dirty[1]&&q.set(b),262144&e.$$.dirty[1]&&K.set(b),262144&e.$$.dirty[1]&&J.set(b),262144&e.$$.dirty[1]&&b&&Q.set(!1),8&e.$$.dirty[0]&&o(38,i=cu(L)),640&e.$$.dirty[1]&&o(12,r=((e,t)=>{if(!e||!e.filter||!t)return 0;const o=e.filter;return t.findIndex((([e])=>{if(!A[e])return!1;const t=A[e]();return ds(t,o)}))})(s,i)),786432&e.$$.dirty[1]&&x&&re.set(b?0:20),512&e.$$.dirty[0]|458752&e.$$.dirty[1]&&b&&f&&y&&ge&&o(37,he={x:y.x-f.x,y:y.y-f.y+ge.y}),496&e.$$.dirty[0]|58096&e.$$.dirty[1]&&g&&he&&$e&&de&&ne){const e=he.x+de.x+$e.x,t=he.y,o=de.x+he.x,r=o+de.width;fe.set(i.map((([i],n)=>{const a=$[i],l=$e.x+a.x,c=l+a.width;if(c<0||l>de.width)return!1;const d=e+a.x,u=t+a.y,h=(e=>({origin:pe(e.origin),translation:pe(e.translation),rotation:{...e.rotation},scale:e.scale}))(g);h.offset=ue(.5*a.width+d,.5*a.height+u);h.maskOpacity=1,h.mask=nt(d+0,u,a.width+0,a.height),h.maskFeather=[1,0,1,0,1,r,1,r],lde.width-ce&&le<1&&(h.maskFeather[4]=le,h.maskFeather[5]=r-ce,h.maskFeather[6]=1,h.maskFeather[7]=r),h.maskCornerRadius=ne[i];let p=s&&Object.keys(s).filter((e=>"filter"!=e)).map((e=>s[e]))||[];return P(A[i])&&p.push(A[i]()),h.colorMatrix=p.length?jr(p):void 0,h.gamma=m,h})).filter(Boolean))}if(7424&e.$$.dirty[1])if(d>0&&l){const e=[...be(),...l.map(ye)];D.set(e)}else D.set(be());256&e.$$.dirty[1]&&o(11,n=a?`transform: translateY(${a}px)`:void 0)},[M,R,I,L,se,le,ce,$e,de,ge,ae,n,r,w,z,D,O,B,W,_,V,N,Z,X,Y,ee,te,oe,ie,re,e=>{e.target.className===Qf&&o(36,ne=Object.keys(ae).reduce(((e,t)=>{const o=ae[t],i=getComputedStyle(o),r=["top-left","top-right","bottom-left","bottom-right"].map((e=>i.getPropertyValue(`border-${e}-radius`))).map(fd).map((e=>1.25*e));return e[t]=r,e}),{}))},fe,({value:e})=>{un(Y,s={...s,filter:P(A[e])?A[e]():void 0},s),F.write()},"filter",E,A,ne,he,i,a,s,l,c,d,m,g,$,f,y,b,x,(e,t)=>te(e,t.detail),function(e,t){ta[e?"unshift":"push"]((()=>{ae[t.value]=e,o(10,ae)}))},e=>o(7,$e=e),function(e){se=e,o(4,se)},function(e){le=e,o(5,le)},function(e){ce=e,o(6,ce)},e=>o(8,de=e.detail),e=>o(9,ge=e.detail),function(t){Qn.call(this,e,t)}]}var ty={util:["filter",class extends Fa{constructor(e){super(),za(this,e,ey,Jf,Qr,{name:33,isActive:0,isActiveFraction:1,stores:34,locale:2,filterFunctions:35,filterOptions:3},null,[-1,-1,-1])}get name(){return this.$$.ctx[33]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[1]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get stores(){return this.$$.ctx[34]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[2]}set locale(e){this.$$set({locale:e}),pa()}get filterFunctions(){return this.$$.ctx[35]}set filterFunctions(e){this.$$set({filterFunctions:e}),pa()}get filterOptions(){return this.$$.ctx[3]}set filterOptions(e){this.$$set({filterOptions:e}),pa()}}]};function oy(e){let t,o,i=e[43].label+"";return{c(){t=kn("span"),o=Tn(i)},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){4096&t[1]&&i!==(i=e[43].label+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function iy(e){let t,o;const i=[{class:"PinturaControlList"},{tabs:e[1]},e[5]];let r={$$slots:{default:[oy,({tab:e})=>({43:e}),({tab:e})=>[0,e?4096:0]]},$$scope:{ctx:e}};for(let e=0;e({42:e}),({panel:e})=>[0,e?2048:0]]},$$scope:{ctx:e}};for(let e=0;e(m(),m=en(f,(e=>o(21,c=e))),f);e.$$.on_destroy.push((()=>m()));let{stores:$}=t,{isActive:f}=t;g();let{locale:y={}}=t,{finetuneControlConfiguration:b}=t,{finetuneOptions:x}=t,{finetuneNudgePrecision:v}=t;const{history:w,animation:S,scrollElasticity:k,rangeInputElasticity:C,imageColorMatrix:T,imageConvolutionMatrix:M,imageGamma:R,imageVignette:E,imageNoise:I,allowPan:A,allowZoom:z,allowZoomControls:F,allowPlayPause:D}=$;on(e,S,(e=>o(22,d=e)));const O={imageColorMatrix:T,imageConvolutionMatrix:M,imageGamma:R,imageVignette:E,imageNoise:I},B=Jn("elasticityMultiplier");on(e,B,(e=>o(6,h=e)));const W="finetune-"+L(),_=Ba({});on(e,_,(e=>o(23,u=e)));const V=Ba({});on(e,V,(e=>o(7,p=e)));let N=[];const H=ec(d?20:0);on(e,H,(e=>o(20,l=e)));return e.$$set=e=>{"stores"in e&&o(15,$=e.stores),"isActive"in e&&g(o(0,f=e.isActive)),"locale"in e&&o(16,y=e.locale),"finetuneControlConfiguration"in e&&o(17,b=e.finetuneControlConfiguration),"finetuneOptions"in e&&o(18,x=e.finetuneOptions),"finetuneNudgePrecision"in e&&o(19,v=e.finetuneNudgePrecision)},e.$$.update=()=>{var t;2097152&e.$$.dirty[0]&&A.set(c),2097152&e.$$.dirty[0]&&z.set(c),2097152&e.$$.dirty[0]&&F.set(c),2097152&e.$$.dirty[0]&&c&&D.set(!0),327680&e.$$.dirty[0]&&o(1,i=x?x.map((([e,t])=>({id:e,label:P(t)?t(y):t}))):[]),2&e.$$.dirty[0]&&o(2,r=i.length&&i[0].id),4&e.$$.dirty[0]&&o(5,n={name:W,selected:r}),2&e.$$.dirty[0]&&o(4,a=i.map((e=>e.id))),131072&e.$$.dirty[0]&&b&&(t=b,N&&N.forEach((e=>e())),N=a.map((e=>{const{getStore:o,getValue:i=G}=t[e];return o(O).subscribe((t=>{const o=null!=t?i(t):t;un(_,u={...u,[e]:o},u)}))}))),8519680&e.$$.dirty[0]&&b&&u&&un(V,p=Object.keys(u).reduce(((e,t)=>{const{base:o,min:i,max:r,getLabel:n,getStore:a,setValue:s=((e,t)=>e.set(t))}=b[t],l=a(O),c=null!=u[t]?u[t]:o;return e[t]={base:o,min:i,max:r,value:c,valueLabel:n?n(c,i,r,r-i):Math.round(100*c),oninputmove:e=>{s(l,e)},oninputend:e=>{s(l,e),w.write()},elasticity:h*C,labelReset:y.labelReset,nudgeMultiplier:v},e}),{}),p),6291456&e.$$.dirty[0]&&d&&H.set(c?0:20),1048576&e.$$.dirty[0]&&o(3,s=l?`transform: translateY(${l}px)`:void 0)},[f,i,r,s,a,n,h,p,S,k,B,_,V,H,"finetune",$,y,b,x,v,l,c,d,u,({detail:e})=>o(2,r=e),function(t){Qn.call(this,e,t)}]}var ly={util:["finetune",class extends Fa{constructor(e){super(),za(this,e,sy,ay,Qr,{name:14,stores:15,isActive:0,locale:16,finetuneControlConfiguration:17,finetuneOptions:18,finetuneNudgePrecision:19},null,[-1,-1])}get name(){return this.$$.ctx[14]}get stores(){return this.$$.ctx[15]}set stores(e){this.$$set({stores:e}),pa()}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get locale(){return this.$$.ctx[16]}set locale(e){this.$$set({locale:e}),pa()}get finetuneControlConfiguration(){return this.$$.ctx[17]}set finetuneControlConfiguration(e){this.$$set({finetuneControlConfiguration:e}),pa()}get finetuneOptions(){return this.$$.ctx[18]}set finetuneOptions(e){this.$$set({finetuneOptions:e}),pa()}get finetuneNudgePrecision(){return this.$$.ctx[19]}set finetuneNudgePrecision(e){this.$$set({finetuneNudgePrecision:e}),pa()}}]},cy=(e,t)=>{const o=t.length;return e<0?e%o+o:e>=o?e%o:e};function dy(e,t,o){const i=e.slice();return i[45]=t[o].key,i[46]=t[o].index,i[47]=t[o].translate,i[48]=t[o].scale,i[12]=t[o].rotate,i[49]=t[o].dir,i[50]=t[o].center,i[51]=t[o].type,i[2]=t[o].visible,i}function uy(e){let t,o;return{c(){t=kn("div"),An(t,"class","PinturaShapeManipulator"),An(t,"data-control","point"),An(t,"style",o=`pointer-events:none;transform: translate3d(${e[50].x}px, ${e[50].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)},m(e,o){wn(e,t,o)},p(e,i){56&i[0]&&o!==(o=`pointer-events:none;transform: translate3d(${e[50].x}px, ${e[50].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)&&An(t,"style",o)},d(e){e&&Sn(t)}}}function hy(e,t){let o,i,r,n,a,s,l,c,d;function u(...e){return t[17](t[46],...e)}let h="edge"===t[51]&&t[2]&&uy(t);return{key:e,first:null,c(){o=kn("div"),s=Mn(),h&&h.c(),l=Rn(),An(o,"role","button"),An(o,"aria-label",i=`Drag ${t[51]} ${t[45]}`),An(o,"tabindex",r="edge"===t[51]?-1:0),An(o,"class","PinturaShapeManipulator"),An(o,"data-control",n=t[51]),An(o,"style",a=`cursor:${t[49]?t[49]+"-resize":"move"};opacity:${t[4]};--tx:${t[47].x};--ty:${t[47].y};--r:${"edge"===t[51]?t[12]:0}rad;--sx:${"point"===t[51]?t[5]:t[48].x};--sy:${"point"===t[51]?t[5]:t[48].y};`),this.first=o},m(e,i){wn(e,o,i),wn(e,s,i),h&&h.m(e,i),wn(e,l,i),c||(d=[Pn(o,"nudge",u),hn(pd.call(null,o,{preventDefault:!0})),Pn(o,"interactionstart",(function(){Jr(t[9]("start",t[46]))&&t[9]("start",t[46]).apply(this,arguments)})),Pn(o,"interactionupdate",(function(){Jr(t[9]("move",t[46]))&&t[9]("move",t[46]).apply(this,arguments)})),Pn(o,"interactionend",(function(){Jr(t[9]("end",t[46]))&&t[9]("end",t[46]).apply(this,arguments)})),hn(hd.call(null,o,{observeKeys:!0}))],c=!0)},p(e,s){t=e,8&s[0]&&i!==(i=`Drag ${t[51]} ${t[45]}`)&&An(o,"aria-label",i),8&s[0]&&r!==(r="edge"===t[51]?-1:0)&&An(o,"tabindex",r),8&s[0]&&n!==(n=t[51])&&An(o,"data-control",n),56&s[0]&&a!==(a=`cursor:${t[49]?t[49]+"-resize":"move"};opacity:${t[4]};--tx:${t[47].x};--ty:${t[47].y};--r:${"edge"===t[51]?t[12]:0}rad;--sx:${"point"===t[51]?t[5]:t[48].x};--sy:${"point"===t[51]?t[5]:t[48].y};`)&&An(o,"style",a),"edge"===t[51]&&t[2]?h?h.p(t,s):(h=uy(t),h.c(),h.m(l.parentNode,l)):h&&(h.d(1),h=null)},d(e){e&&Sn(o),e&&Sn(s),h&&h.d(e),e&&Sn(l),c=!1,Kr(d)}}}function py(e){let t,o,i,r;return{c(){t=kn("div"),An(t,"role","button"),An(t,"aria-label","Drag rotator"),An(t,"tabindex","0"),An(t,"class","PinturaShapeManipulator"),An(t,"data-control","rotate"),An(t,"style",o=`transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)},m(o,n){wn(o,t,n),i||(r=[Pn(t,"nudge",e[11]),hn(pd.call(null,t,{preventDefault:!0})),Pn(t,"interactionstart",e[12]("start")),Pn(t,"interactionupdate",e[12]("move")),Pn(t,"interactionend",e[12]("end")),hn(hd.call(null,t,{observeKeys:!0}))],i=!0)},p(e,i){49&i[0]&&o!==(o=`transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)&&An(t,"style",o)},d(e){e&&Sn(t),i=!1,Kr(r)}}}function my(e){let t,o,i=[],r=new Map,n=e[3];const a=e=>e[45];for(let t=0;to(16,r=e)));const O=ec(.5,{precision:1e-4,stiffness:.3,damping:.7});on(e,O,(e=>o(5,a=e)));const B=ec(0,{precision:.001,stiffness:.3,damping:.7});on(e,B,(e=>o(4,n=e)));const W=e=>{let t="";return(e<=d&&e>=c||e>=h&&e<=p)&&(t="ns"),(e<=g||e>=m||e>=f&&e<=$)&&(t="ew"),(e>=w&&e<=S||e<=R&&e>=P)&&(t="nesw"),(e>=b&&e<=x||e<=C&&e>=T)&&(t="nwse"),t},_=(e,t)=>{s("resizestart",{indexes:e,translation:de()}),s("resizemove",{indexes:e,translation:t}),s("resizeend",{indexes:e,translation:de()})};return e.$$set=e=>{"visible"in e&&o(2,E=e.visible),"points"in e&&o(13,I=e.points),"rotatorPoint"in e&&o(0,A=e.rotatorPoint),"enableDragEdges"in e&&o(14,L=e.enableDragEdges),"enableDragPoints"in e&&o(15,z=e.enableDragPoints),"enableRotatePoints"in e&&o(1,F=e.enableRotatePoints)},e.$$.update=()=>{65540&e.$$.dirty[0]&&O.set(E?1:.5,{hard:!1===r}),65540&e.$$.dirty[0]&&B.set(E?1:0,{hard:!1===r}),8192&e.$$.dirty[0]&&o(3,i=((e,t)=>{let o=0;const i=Ee(e),r=[],n=e.length;for(;oo===e&&n===t)))continue;const d=ue(s.x+.5*(l.x-s.x),s.y+.5*(l.y-s.y));r.push({index:[o,n],key:"edge-"+o,type:"edge",scale:{x:Re(s,l),y:1},translate:{x:s.x,y:s.y},angle:c,rotate:c,center:d,visible:Array.isArray(L),dir:W(Math.atan2(i.y-d.y,i.x-d.x))})}return r})(I))},[A,F,E,i,n,a,D,O,B,(e,t)=>({detail:o})=>{const i=o&&o.translation?o.translation:ue(0,0);s("resize"+e,{...o,indexes:t,translation:i})},_,({detail:e})=>{s("rotatestart",{translation:de()}),s("rotatemove",{translation:e}),s("rotateend",{translation:de()})},e=>({detail:t})=>{const o=t&&t.translation?t.translation:ue(0,0);s("rotate"+e,{...t,translation:o})},I,L,z,r,(e,{detail:t})=>_(e,t)]}class $y extends Fa{constructor(e){super(),za(this,e,gy,my,Qr,{visible:2,points:13,rotatorPoint:0,enableDragEdges:14,enableDragPoints:15,enableRotatePoints:1},null,[-1,-1])}}var fy=(e,t)=>{const o=Bp(e);return we(o,t)},yy=e=>document.createTextNode(e),by=e=>(Xt()&&e.endsWith("

")?e.replace(/

<\/div>$/,"

"):e).replace(/

<\/div>/g,"
").replace(/<\/div>/g,"").replace(/
/g,"
");function xy(e){let t,o;return{c(){t=kn("pre"),An(t,"class","PinturaContentEditable"),An(t,"style",o=e[7]+";position:absolute;z-index:-1;pointer-events:none;")},m(o,i){wn(o,t,i),t.innerHTML=e[0]},p(e,i){1&i[0]&&(t.innerHTML=e[0]),128&i[0]&&o!==(o=e[7]+";position:absolute;z-index:-1;pointer-events:none;")&&An(t,"style",o)},d(e){e&&Sn(t)}}}function vy(e){let t,o,i,r,n,a,s=e[8]&&xy(e);return{c(){s&&s.c(),t=Mn(),o=kn("pre"),An(o,"class","PinturaContentEditable"),An(o,"data-wrap-content",i=e[4]||e[5]?"wrap":"nowrap"),An(o,"contenteditable",""),An(o,"spellcheck",e[1]),An(o,"autocorrect",e[2]),An(o,"autocapitalize",e[3]),An(o,"style",r=e[8]?e[15](e[7]):e[7])},m(i,r){s&&s.m(i,r),wn(i,t,r),wn(i,o,r),e[26](o),n||(a=[Pn(o,"input",e[13]),Pn(o,"compositionend",e[12]),Pn(o,"paste",e[14]),Pn(o,"keydown",e[10]),Pn(o,"keyup",e[11]),Pn(o,"blur",e[9])],n=!0)},p(e,n){e[8]?s?s.p(e,n):(s=xy(e),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null),48&n[0]&&i!==(i=e[4]||e[5]?"wrap":"nowrap")&&An(o,"data-wrap-content",i),2&n[0]&&An(o,"spellcheck",e[1]),4&n[0]&&An(o,"autocorrect",e[2]),8&n[0]&&An(o,"autocapitalize",e[3]),384&n[0]&&r!==(r=e[8]?e[15](e[7]):e[7])&&An(o,"style",r)},i:Gr,o:Gr,d(i){s&&s.d(i),i&&Sn(t),i&&Sn(o),e[26](null),n=!1,Kr(a)}}}function wy(e,t,o){let i,r,{spellcheck:n="false"}=t,{autocorrect:s="off"}=t,{autocapitalize:l="off"}=t,{wrapLines:c=!0}=t,{allowNewline:d=!0}=t,{textFormat:u="text"}=t,{formatInput:h=G}=t,{formatPaste:p=G}=t,{style:m}=t,{innerHTML:$}=t,{oninput:f=a}=t,{enableTextStyleShortcuts:y=!1}=t;const b=()=>{if(!v)return;const e=document.createRange();e.selectNodeContents(v);const t=R();t.removeAllRanges(),t.addRange(e)},x=qn();let v;document.execCommand("defaultParagraphSeparator",!1,"br");const w=e=>e.replace(/<\/?(?:i|b|em|u|s|strike|strong|font)>/,"").replace(/style=".*?"/g,"").replace(/\n/gim,"
"),S=()=>{o(0,$=v.innerHTML);const e=by($);x("input",e),f(e),requestAnimationFrame((()=>v&&v.scrollTo(0,0)))},k=()=>{P(v);const e="html"===u?v.innerHTML:w(v.innerHTML);o(6,v.innerHTML=h(e),v),E(v),S()},C={b:"bold",i:"italic",u:"underline",s:"strikethrough"},T=e=>{const t=g("span");return t.dataset.bookmark=e,t},M=(e,t,o)=>{const i=T(o);if(e.nodeType===Node.TEXT_NODE){const r=e.textContent;if("start"===o){const o=yy(r.substr(0,t)),n=yy(r.substr(t));e.replaceWith(o,i,n)}else{const o=yy(r.substr(0,t)),n=yy(r.substr(t));e.replaceWith(o,i,n)}}else e.nodeType===Node.ELEMENT_NODE&&e.insertBefore(i,e.childNodes[t])},R=()=>{const e=v.getRootNode();return"getSelection"in e?e.getSelection():document.getSelection()},P=e=>{const t=R();if(!t.getRangeAt||!t.rangeCount)return;const o=t.getRangeAt(0),{startOffset:i,endOffset:r,startContainer:n,endContainer:a}=o;if(e.contains(o.startContainer)&&e.contains(o.endContainer))if(n.nodeType===Node.TEXT_NODE&&n===a){const e=n.textContent,t=e.substr(0,i),o=T("start"),a=r-i>0?e.substr(i,r):"",s=T("end"),l=e.substr(r);n.replaceWith(t,o,a,s,l)}else M(n,i,"start"),M(a,r+(n===a?1:0),"end")},E=e=>{const t=I(e,"start"),o=I(e,"end");if(!t||!o)return;const i=document.createRange();i.setStart(t,0),i.setEnd(o,0);const r=R();r.removeAllRanges(),r.addRange(i),t.remove(),o.remove()},I=(e,t)=>{const o=e.children;for(let e=0;e{"spellcheck"in e&&o(1,n=e.spellcheck),"autocorrect"in e&&o(2,s=e.autocorrect),"autocapitalize"in e&&o(3,l=e.autocapitalize),"wrapLines"in e&&o(4,c=e.wrapLines),"allowNewline"in e&&o(5,d=e.allowNewline),"textFormat"in e&&o(16,u=e.textFormat),"formatInput"in e&&o(17,h=e.formatInput),"formatPaste"in e&&o(18,p=e.formatPaste),"style"in e&&o(19,m=e.style),"innerHTML"in e&&o(0,$=e.innerHTML),"oninput"in e&&o(20,f=e.oninput),"enableTextStyleShortcuts"in e&&o(21,y=e.enableTextStyleShortcuts)},e.$$.update=()=>{var t;if(64&e.$$.dirty[0]&&o(25,i=!!v),33554433&e.$$.dirty[0]&&i&&$&&(t=$)!==v.innerHTML&&(o(6,v.innerHTML=t,v),v===document.activeElement&&b()),524336&e.$$.dirty[0])if(!c&&d){const e=m.includes(":right")?"text-indent:-100px!important":m.includes(":center")?"":"min-width:calc(100% + 100px)!important";o(7,A=m+";overflow:visible;"+e)}else o(7,A=m);524288&e.$$.dirty[0]&&o(8,r=m.includes("text-stroke"))},[$,n,s,l,c,d,v,A,r,()=>{x("blur")},e=>{if(/escape/i.test(e.code))return e.stopPropagation(),void x("cancel");const t=e.ctrlKey||e.metaKey;if("html"===u&&t&&/b|i|u|s/.test(e.key))return y&&(e=>{const t=C[e];t&&document.execCommand(t)})(e.key),void e.preventDefault();/enter/i.test(e.code)&&(e.stopPropagation(),e.isComposing||(t?x("confirm"):(d||e.preventDefault(),document.execCommand("insertLineBreak"),e.preventDefault())))},()=>{},e=>{""!==e.data&&k()},e=>{const{inputType:t}=e;"insertCompositionText"!==t&&"deleteCompositionText"!==t&&k()},e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain"),o="html"===u?t:w(t),i=p(o);if(!i.length)return;const r=R().getRangeAt(0);r.deleteContents(),r.insertNode(document.createTextNode(i)),S()},e=>e.replace("-webkit-text-stroke","--text-stroke").replace("text-shadow","--text-shadow"),u,h,p,m,f,y,()=>k(),()=>v&&v.focus(),b,i,function(e){ta[e?"unshift":"push"]((()=>{v=e,o(6,v)}))}]}class Sy extends Fa{constructor(e){super(),za(this,e,wy,vy,Qr,{spellcheck:1,autocorrect:2,autocapitalize:3,wrapLines:4,allowNewline:5,textFormat:16,formatInput:17,formatPaste:18,style:19,innerHTML:0,oninput:20,enableTextStyleShortcuts:21,confirm:22,focus:23,select:24},null,[-1,-1])}get spellcheck(){return this.$$.ctx[1]}set spellcheck(e){this.$$set({spellcheck:e}),pa()}get autocorrect(){return this.$$.ctx[2]}set autocorrect(e){this.$$set({autocorrect:e}),pa()}get autocapitalize(){return this.$$.ctx[3]}set autocapitalize(e){this.$$set({autocapitalize:e}),pa()}get wrapLines(){return this.$$.ctx[4]}set wrapLines(e){this.$$set({wrapLines:e}),pa()}get allowNewline(){return this.$$.ctx[5]}set allowNewline(e){this.$$set({allowNewline:e}),pa()}get textFormat(){return this.$$.ctx[16]}set textFormat(e){this.$$set({textFormat:e}),pa()}get formatInput(){return this.$$.ctx[17]}set formatInput(e){this.$$set({formatInput:e}),pa()}get formatPaste(){return this.$$.ctx[18]}set formatPaste(e){this.$$set({formatPaste:e}),pa()}get style(){return this.$$.ctx[19]}set style(e){this.$$set({style:e}),pa()}get innerHTML(){return this.$$.ctx[0]}set innerHTML(e){this.$$set({innerHTML:e}),pa()}get oninput(){return this.$$.ctx[20]}set oninput(e){this.$$set({oninput:e}),pa()}get enableTextStyleShortcuts(){return this.$$.ctx[21]}set enableTextStyleShortcuts(e){this.$$set({enableTextStyleShortcuts:e}),pa()}get confirm(){return this.$$.ctx[22]}get focus(){return this.$$.ctx[23]}get select(){return this.$$.ctx[24]}}const ky=["i","b","u","strike"].map((e=>({tag:e,tagOpen:new RegExp(`<${e}>`,"g"),tagClose:new RegExp(``,"g"),placeholderOpen:new RegExp(`___${e}O___`,"g"),placeholderClose:new RegExp(`___${e}C___`,"g")})));var Cy=e=>e=((e,t=ky)=>(t.forEach((({tag:t,placeholderOpen:o,placeholderClose:i})=>{e=e.replace(o,`<${t}>`).replace(i,``)})),e))(e=(e=((e,t=ky)=>(t.forEach((({tag:t,tagOpen:o,tagClose:i})=>{e=e.replace(o,`___${t}O___`).replace(i,`___${t}C___`)})),e))(e)).replace(/ {2,}/g," ").replace(/\u00a0/g," ").split("\n").join("
")),Ty=(e,t)=>R(e)?parseFloat(e)/100*t:e,My=(e,t)=>({x:No(e.x,t.width),y:No(e.y,t.height)});function Ry(e,t,o){const i=e.slice();return i[276]=t[o],i[278]=o,i}function Py(e,t){let o,i,r,n,a,s,l,c,d,u,h,p=t[276].name+"";function m(){return t[180](t[278])}return r=new Oh({props:{color:t[276].color}}),{key:e,first:null,c(){o=kn("li"),i=kn("button"),Ia(r.$$.fragment),n=Mn(),a=kn("span"),s=Tn(p),c=Mn(),An(i,"class","PinturaShapeListItem"),An(i,"type","button"),An(i,"aria-label",l="Select shape "+t[276].name),this.first=o},m(e,t){wn(e,o,t),bn(o,i),Aa(r,i,null),bn(i,n),bn(i,a),bn(a,s),bn(o,c),d=!0,u||(h=Pn(i,"click",m),u=!0)},p(e,o){t=e;const n={};1048576&o[0]&&(n.color=t[276].color),r.$set(n),(!d||1048576&o[0])&&p!==(p=t[276].name+"")&&Fn(s,p),(!d||1048576&o[0]&&l!==(l="Select shape "+t[276].name))&&An(i,"aria-label",l)},i(e){d||(xa(r.$$.fragment,e),d=!0)},o(e){va(r.$$.fragment,e),d=!1},d(e){e&&Sn(o),La(r),u=!1,h()}}}function Ey(e){let t,o;return t=new $y({props:{visible:!0,points:e[12],rotatorPoint:e[26],enableDragEdges:e[16],enableDragPoints:e[28],enableRotatePoints:e[14]}}),t.$on("resizestart",e[37]),t.$on("resizemove",e[38]),t.$on("resizeend",e[39]),t.$on("rotatestart",e[40]),t.$on("rotatemove",e[41]),t.$on("rotateend",e[42]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};4096&o[0]&&(i.points=e[12]),67108864&o[0]&&(i.rotatorPoint=e[26]),65536&o[0]&&(i.enableDragEdges=e[16]),268435456&o[0]&&(i.enableDragPoints=e[28]),16384&o[0]&&(i.enableRotatePoints=e[14]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Iy(e){let t,o,i,r;const n=[Ly,Ay],a=[];function s(e,t){return"modal"===e[4]?0:"inline"===e[4]?1:-1}return~(t=s(e))&&(o=a[t]=n[t](e)),{c(){o&&o.c(),i=Rn()},m(e,o){~t&&a[t].m(e,o),wn(e,i,o),r=!0},p(e,r){let l=t;t=s(e),t===l?~t&&a[t].p(e,r):(o&&(ya(),va(a[l],1,1,(()=>{a[l]=null})),ba()),~t?(o=a[t],o?o.p(e,r):(o=a[t]=n[t](e),o.c()),xa(o,1),o.m(i.parentNode,i)):o=null)},i(e){r||(xa(o),r=!0)},o(e){va(o),r=!1},d(e){~t&&a[t].d(e),e&&Sn(i)}}}function Ay(e){let t,o,i,r,n,a={formatInput:e[44],wrapLines:!!e[13].width,textFormat:e[13].format,enableTextStyleShortcuts:e[5],allowNewline:e[27],style:e[25]};return o=new Sy({props:a}),e[183](o),o.$on("input",e[45]),o.$on("keyup",e[48]),o.$on("cancel",e[50]),o.$on("confirm",e[49]),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaInlineInput"),An(t,"style",e[24])},m(a,s){wn(a,t,s),Aa(o,t,null),i=!0,r||(n=Pn(t,"focusout",e[184]),r=!0)},p(e,r){const n={};8192&r[0]&&(n.wrapLines=!!e[13].width),8192&r[0]&&(n.textFormat=e[13].format),32&r[0]&&(n.enableTextStyleShortcuts=e[5]),134217728&r[0]&&(n.allowNewline=e[27]),33554432&r[0]&&(n.style=e[25]),o.$set(n),(!i||16777216&r[0])&&An(t,"style",e[24])},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(i){i&&Sn(t),e[183](null),La(o),r=!1,n()}}}function Ly(e){let t,o;return t=new yp({props:{panelOffset:e[2],onconfirm:e[49],oncancel:e[50],buttonCancel:{icon:e[6].shapeIconInputCancel,label:e[6].shapeLabelInputCancel},buttonConfirm:{icon:e[6].shapeLabelInputConfirm,label:e[6].shapeIconInputConfirm,hideLabel:!0},$$slots:{default:[zy]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};4&o[0]&&(i.panelOffset=e[2]),64&o[0]&&(i.buttonCancel={icon:e[6].shapeIconInputCancel,label:e[6].shapeLabelInputCancel}),64&o[0]&&(i.buttonConfirm={icon:e[6].shapeLabelInputConfirm,label:e[6].shapeIconInputConfirm,hideLabel:!0}),41943296&o[0]|1&o[9]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function zy(e){let t,o,i;return{c(){t=kn("textarea"),An(t,"spellcheck","false"),An(t,"autocorrect","off"),An(t,"autocapitalize","off"),An(t,"style",e[25])},m(r,n){wn(r,t,n),e[181](t),Dn(t,e[23]),o||(i=[Pn(t,"keydown",e[47]),Pn(t,"keypress",e[46]),Pn(t,"keyup",e[48]),Pn(t,"input",e[45]),Pn(t,"input",e[182])],o=!0)},p(e,o){33554432&o[0]&&An(t,"style",e[25]),8388608&o[0]&&Dn(t,e[23])},d(r){r&&Sn(t),e[181](null),o=!1,Kr(i)}}}function Fy(e){let t,o,i,r,n;return o=new up({props:{items:e[21],key:e[10]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaShapeControls"),An(t,"style",e[22])},m(a,s){wn(a,t,s),Aa(o,t,null),i=!0,r||(n=[Pn(t,"measure",e[185]),hn($c.call(null,t))],r=!0)},p(e,r){const n={};2097152&r[0]&&(n.items=e[21]),1024&r[0]&&(n.key=e[10]),o.$set(n),(!i||4194304&r[0])&&An(t,"style",e[22])},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o),r=!1,Kr(n)}}}function Dy(e){let t,o,i,r,n,s,l,c,d,u,h=[],p=new Map,m=e[20];const g=e=>e[276].id;for(let t=0;t0&&Fy(e);return{c(){t=kn("div"),o=kn("nav"),i=kn("ul");for(let e=0;e{$=null})),ba()),e[11]?f?(f.p(e,a),2048&a[0]&&xa(f,1)):(f=Iy(e),f.c(),xa(f,1),f.m(t,s)):f&&(ya(),va(f,1,1,(()=>{f=null})),ba()),e[17]>0?y?(y.p(e,a),131072&a[0]&&xa(y,1)):(y=Fy(e),y.c(),xa(y,1),y.m(t,null)):y&&(ya(),va(y,1,1,(()=>{y=null})),ba()),l&&Jr(l.update)&&8&a[0]&&l.update.call(null,{drag:!0,inertia:!0,multiTouch:!1,observeKeys:!0,shouldStartInteraction:Wy,getEventPosition:e[187]})},i(e){if(!c){for(let e=0;ee.target===t;function _y(e,t,o){let i,r,n,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,P,E,I,A,z,F,D,O,B,W,_,V,N,H,j,U,Z,X,Y,q,K,J,Q,ee,te,oe,ie,re,ne,ae,le=Gr,he=()=>(le(),le=en(Ce,(e=>o(175,oe=e))),Ce);e.$$.on_destroy.push((()=>le()));let{uid:me=L()}=t,{ui:$e}=t,{disabled:Se=!1}=t,{shapes:Ce}=t;he();let{selection:Te}=t,{offset:Pe}=t,{contextRotation:Le=0}=t,{contextFlipX:ze=!1}=t,{contextFlipY:De=!1}=t,{contextZoom:Oe=1}=t,{active:Be=!1}=t,{opacity:_e=1}=t,{parentRect:Ve}=t,{rootRect:Ne}=t,{utilRect:He}=t,{hoverColor:je}=t,{caretColor:Ze}=t,{gridColor:Ye}=t,{snapColor:qe}=t,{textInputMode:Ke="inline"}=t,{oninteractionstart:Je=a}=t,{oninteractionupdate:Qe=a}=t,{oninteractionrelease:et=a}=t,{oninteractionend:rt=a}=t,{oninteractioncancel:st=a}=t,{onaddshape:lt=a}=t,{onupdateshape:ct=a}=t,{onselectshape:dt=a}=t,{onblurshape:ut=a}=t,{onremoveshape:ht=a}=t,{ontapshape:pt=a}=t,{onhovershape:mt=a}=t,{onhovercanvas:gt=a}=t,{ontapcanvas:ft=a}=t,{onleavecanvas:yt=a}=t,{beforeSelectShape:bt=(()=>!0)}=t,{beforeDeselectShape:St=(()=>!0)}=t,{beforeRemoveShape:kt=(()=>!0)}=t,{beforeUpdateShape:Ct=((e,t)=>t)}=t,{willRenderShapeControls:Tt=G}=t,{willRenderShapeTextControls:Mt=G}=t,{willStartInteraction:Rt=((e,t)=>!0)}=t,{mapEditorPointToImagePoint:It}=t,{mapImagePointToEditorPoint:At}=t,{eraseRadius:Bt}=t,{selectRadius:Wt}=t,{enableButtonFlipVertical:_t=!1}=t,{enableTapToAddText:Vt=!0}=t,{enableTextStyleControls:Nt=!0}=t,{locale:Ht}=t,{snapThreshold:jt=0}=t,{snapPointer:Ut=!0}=t,{enableSnapToContext:Gt=!0}=t,{gridSize:Zt=0}=t;const Xt=e=>{if(0===jt)return[];let t;return Gt&&(t={...Ve,x:0,y:0}),[...oe.filter((t=>t!==e)).filter((e=>!Fi(e))).map((e=>pr({...e},Ve))),t].filter(Boolean)},Yt=(e,t,o,i)=>0===e?{snapTargets:[]}:{snapThreshold:e,gridSize:t,gridRect:o,snapTargets:Xt(i)},qt=Jn("isAnimated");on(e,qt,(e=>o(176,re=e)));const Kt=e=>e.set(tn(e)),Jt=e=>tn(e).find(Fi),Qt=(e,t)=>{if(!Jt(t))return _i(e),io(e,t)},eo=e=>{Jt(e)&&e.update((e=>e.filter((e=>!Fi(e)))))},to=e=>{const t=Jt(e);if(t)return Vi(t),Kt(e),t},oo=(e,t,o=((e,t)=>({...e,...t})))=>{Jt(t)&&t.update((t=>t.map((t=>Fi(t)?o(t,e):t))))},io=(e,t=Ce)=>(t.update((t=>[...t,e])),e),ro=(e,t,o)=>{const i=Ct({...e},t,{...o});return fr(e,i,o),e},no=(e,t)=>{const o=Re(e,t),i=ye(e,t),r=Math.PI/8,n=r*Math.round(i/r)-Le%r;t.x=e.x+o*Math.cos(n),t.y=e.y+o*Math.sin(n)},ao=Jn("keysPressed");on(e,ao,(e=>o(177,ne=e)));const so=(e,t,o)=>0===e||t&&o?e:t||o?-e:e,lo=e=>{if(null===e.x&&null===e.y)return co();e.x&&o(138,uo=It({x:e.x,y:0}).x),e.y&&o(139,ho=It({x:0,y:e.y}).y)},co=()=>{o(138,uo=null),o(139,ho=null)};let uo=null,ho=null;const po=(e,t)=>{const o=At(e);return It(ve(o,t))},mo=(e,t,o)=>{const i=(o-t)/e+1;return Array.from({length:i},((o,i)=>t+i*e))},go=e=>{let t=[],o=[],i=e.points;if(void 0!==e.x1&&(i=[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2}]),i){const e=i.map(At),r=ot(e),n=e[0],a=e[e.length-1];t=[r.x,r.x+.5*r.width,r.x+r.width,n.x,a.x],o=[r.y,r.y+.5*r.height,r.y+r.height,n.y,a.y]}else if(e.text||void 0!==e.width||void 0!==e.rx){let i;if(e.text&&void 0===e.height){const t=ni(e.text,e);i=nt(e.x,e.y,t.width,t.height)}else i=void 0!==e.width?tt(e):tt({x:e.x-e.rx,y:e.y-e.ry,width:2*e.rx,height:2*e.ry});const r=wt(i).map(At),n=Math.abs(e.rotation)>0?$t(i,e.rotation).map(At):r,a=ot(n),s=at(a),l=.5*a.width,c=.5*a.height;t=[s.x-l,s.x,s.x+l],o=[s.y-c,s.y,s.y+c]}else if(void 0!==e.x){const i=At(e);t=[i.x],o=[i.y]}return{x:t,y:o}},$o=(e,t,o)=>{let i,r,n,a=Number.Infinity,s=null,l=null;for(let c=0;c{const n={x:null,y:null},a={x:null,y:null},s=t.map(go);if(i>0){const e=At({x:0,y:0}),t=At({x:i,y:i}),o=At({x:r.width,y:r.height}),n=t.x-e.x,a=mo(n,e.x,o.x),l=mo(n,e.y,o.y);s.push({x:a,y:l})}return s.forEach((t=>{const{snapTranslation:i,snapLine:r}=((e,t,o)=>{const i={x:null,y:null},r={x:null,y:null},n=$o(e.x,t.x,o);null!==n.target&&(i.x=n.target,r.x=n.target-n.origin);const a=$o(e.y,t.y,o);return null!==a.target&&(i.y=a.target,r.y=a.target-a.origin),{snapTranslation:r,snapLine:i}})(e,t,o);null!==i.x&&(null===a.x||Math.abs(i.x)(null!==t.x&&(e.x+=t.x),null!==t.y&&(e.y+=t.y),e),bo=(e,t,o,i)=>{const{snapThreshold:r=0,gridSize:n=0,gridRect:a,snapTargets:s=[]}=i||{};let l=null;if(Pi(e)){if(r){const i=pr({...e},Ve),l=po(wi(t),o),c=po(Si(t),o),d=go({...i,x1:l.x,y1:l.y,x2:c.x,y2:c.y}),{snapTranslation:u,snapLines:h}=fo(d,s,r,n,a);yo(o,u),lo(h)}const i=po(wi(t),o),c=po(Si(t),o);l={x1:i.x,y1:i.y,x2:c.x,y2:c.y}}else if(e.points){if(r){const i=pr({...e},Ve),l=go({...i,points:t.points.map((e=>po(e,o)))}),{snapTranslation:c,snapLines:d}=fo(l,s,r,n,a);yo(o,c),lo(d)}l={points:t.points.map((e=>po(e,o)))}}else if(Mi(e)||ki(e)||Ri(e)){if(r){const i=pr({...e},Ve),l=po(t,o),c=go({...i,...l}),{snapTranslation:d,snapLines:u}=fo(c,s,r,n,a);yo(o,d),lo(u)}l=po(t,o)}l&&(ro(e,l,Ve),Mo())},xo={0:1,1:0,2:3,3:2},vo={0:3,1:2,2:1,3:0};let wo;const So=()=>{if(oe.length)return oe.find(Fi)},ko=()=>{if(oe.length)return oe.findIndex(Fi)},Co=()=>{const e=So();if(e)return Vi(e),Mo(),e},To=()=>{if(!So())return;const e=[...oe];e.splice(ko(),1),Ce.set(e)},Mo=()=>{Ce.set(oe)},Ro=(e,t=[],o=!0)=>{t.filter(Boolean).forEach((t=>delete e[t])),o&&Mo()},Po=(e,t,o=!0)=>{e=Object.assign(e,t),o&&Mo()},Eo=(e,t,o,i=!0)=>{e[t]=o,i&&Mo()},Io=(e,t=!0)=>{oe.forEach((t=>Po(t,e,!1))),t&&Mo()},Lo=()=>[...oe].reverse().find(Li),Fo=()=>!!Lo(),Do=e=>{if(!kt(e))return!1;Ce.set(oe.filter((t=>t!==e))),ht(e)},Oo=()=>{const e=Lo();if(!e)return;const t=oe.filter((e=>ji(e)&&Hi(e))),o=t.findIndex((t=>t===e));if(!1===Do(e))return;if(Bo=e,t.length-1<=0)return Wo();const i=o-1<0?t.length-1:o-1;Vo(t[i])};let Bo=void 0;const Wo=(e={})=>{const{storePrevious:t=!0}=e;Object.keys(ur).forEach((e=>ur[e]={}));const o=_o();t&&(Bo=o),Io({isSelected:!1,isEditing:!1,_prerender:!1}),o&&ut(o)},_o=()=>oe.find(Li),Vo=(e,t=!0)=>{if(Fi(e))return;const o=_o()||Bo,i=Li(e);Bo=void 0,bt(o,e)&&(Wo(),(e=>{e.isSelected=!0})(e),!i&&dt(e),t&&Mo())},jo=e=>{or&&or.confirm&&e.isEditing&&or.confirm(),Po(e,{isSelected:!1,isEditing:!1,_prerender:!1}),ut(e)},Uo=e=>{Po(e,{isSelected:!0,isEditing:!0,_prerender:"inline"===Ke})},Go=e=>{Po(e,{isSelected:!0,isEditing:!1,_prerender:!1})},Zo=e=>{if(!e.length)return[];const t=e.filter(kt);return Ce.set(oe.filter((e=>!t.includes(e)))),t},Xo=e=>{const t=ni(e.text,e);return nt(e.x,e.y,e.width?Math.min(e.width,t.width):t.width,e.height?Math.min(e.height,t.height):t.height)},Yo=e=>{if(Di(e))return tt(e);if(Ri(e))return it(e);const t=Xo(e);return t.width=Math.max(10,e.width||t.width),t},Ko=(e,t,o=0,i=(()=>!0))=>[...e].reverse().filter(i).map((e=>({shape:e,priority:1}))).filter((e=>{const{shape:i}=e,r=pr(fi(i),Ve),n=o+.5*(r.strokeWidth||0);if(Mi(r))return Ot(t,n,r,i.rotation);if(ki(r)){const o=Yo(r),a=Ot(t,n,o,i.rotation);let s=!1;if(a&&!Li(i)){const a=Xo(r);"right"!==i.textAlign||i.flipX||(a.x=o.x+o.width-a.width),"center"===i.textAlign&&(a.x=o.x+.5*o.width-.5*a.width),s=Ot(t,n,a,i.rotation,at(o)),s||(e.priority=-1)}return a}return Ri(r)?((e,t,o,i,r,n)=>{const a=Lt(ue(o.x,o.y),o.rx,o.ry,i,r,n,12);return Dt(e,t,a)})(t,n,r,i.rotation,i.flipX,i.flipY):Pi(r)?zt(t,Math.max(16,n),wi(r),Si(r)):Ei(r)&&r.pathClose?Dt(t,n,r.points):!!Ei(r)&&(1===r.points.length?Me(t,r.points[0])e.priorityt.priority?-1:0)).map((e=>e.shape)),Jo=(e,t,o,i=0)=>{const r=Math.abs(i),n=Ge(t,o),a=Xe(n,r),s=(({start:e,end:t},o)=>{if(0===o)return[ue(e.x,e.y),ue(e.x,e.y),ue(t.x,t.y),ue(t.x,t.y)];const i=Math.atan2(t.y-e.y,t.x-e.x),r=Math.sin(i)*o,n=Math.cos(i)*o;return[ue(r+e.x,-n+e.y),ue(-r+e.x,n+e.y),ue(-r+t.x,n+t.y),ue(r+t.x,-n+t.y)]})(a,r);return e.filter((e=>{const t=pr(fi(e),Ve);if(Pi(t)||Ei(t)){const e=t.points?[...t.points]:[wi(t),Si(t)];return!!Pt(a,e)}return((e,t)=>!!e.find((e=>Et(e,t)))||!!t.find((t=>Et(t,e))))(s,((e,t=12)=>{if(Mi(e))return $t(e,e.rotation,at(e));if(ki(e)){const t=Yo(e);return $t(t,e.rotation,at(t))}return Ri(e)?Lt(ue(e.x,e.y),e.rx,e.ry,e.rotation,e.flipX,e.flipY,t):[]})(t))}))};let Qo=void 0,ei=void 0,ti=void 0,oi=void 0,ii=void 0,ri=void 0,ai=!1,si=!1,li=!1;const ci=()=>{clearTimeout(ei),ei=void 0,o(141,li=!1),co()};let di=null;const ui=e=>{const t=Ao(e.rotation)&&0!==e.rotation;if(Mi(e)){if(e.width<1&&e.height<1)return;const o=at(e),i=wt(e);return(e.flipX||e.flipY)&&Ie(i,e.flipX,e.flipY,o.x,o.y),t?Ae(i,e.rotation,o.x,o.y):i}if(Ri(e)){if(e.rx<1&&e.ry<1)return;const o=e,i=wt(it(e));return(e.flipX||e.flipY)&&Ie(i,e.flipX,e.flipY,o.x,o.y),t?Ae(i,e.rotation,o.x,o.y):i}if(Pi(e))return[wi(e),Si(e)];if(Ei(e)){if(e.bitmap&&!e.pathClose){const t=ot(e.points);t.x-=.5*e.strokeWidth,t.y-=.5*e.strokeWidth,t.width+=e.strokeWidth,t.height+=e.strokeWidth;return ui({...e,...t})}return[...e.points]}if(ki(e)){if(e.width<5&&e.height<5)return;const o=Yo(e);o.width=Math.max(10,o.width);const i=at(o),r=wt(o);return(e.flipX||e.flipY)&&Ie(r,e.flipX,e.flipY,i.x,i.y),t?Ae(r,e.rotation,i.x,i.y):r}return[]},hi=e=>{const t=ui(e);let o,i;return e.flipY?(o=Ee([t[0],t[1]]),i=fe(ue(t[1].x-t[2].x,t[1].y-t[2].y))):(o=Ee([t[2],t[3]]),i=fe(ue(t[2].x-t[1].x,t[2].y-t[1].y))),ke(i,20/Oe),{origin:o,dir:i}},pi=e=>t=>t.id===e,mi=e=>{const t=pi(e);return e=>e.filter((e=>t=>!e(t))(t))},gi=e=>{const t=pi(e),o=mi(e);return()=>$e.update((e=>e.some(t)?o(e):e))},$i=e=>{const t=mi(e);return(...e)=>{$e.update((o=>[...t(o),...e.filter(Boolean)]))}},yi=gi(By),bi=$i(By);let xi;const vi="markup-manipulator-segment-"+me,Ai=(e,t)=>{const o=e[t],i=t-1<0?e[e.length-1]:e[t-1],r=t+1{if(jt<=0)return e;if(t)return co(),e;const o=It(e),r=Xt(),{snapTranslation:n,snapLines:a}=fo(go(o),r,jt,Zt,i);return lo(a),yo(e,n),e},Wi=ec(0);on(e,Wi,(e=>o(178,ae=e)));const qi="markup-grid-line-"+me,Ki=gi(qi),Ji=$i(qi),Qi="markup-snap-line",er=gi(Qi),tr=$i(Qi);let or;const ir=e=>{o(8,or.innerHTML=Cy(e),or)},rr=e=>{const t=void 0===e.value?e.innerHTML:e.value,o="text"===r.format?by(t).split(/
|/g).join("\n").replace(/ /g,String.fromCharCode(160)).replace(/&/g,"&"):t;return Ci(r)&&!1!==r.disableNewline?(e=>{const t=e.split(/[\n\r]/g);return t.length>1?t.map((e=>e.trim())).filter((e=>e.length)).join(" "):t[0]})(o):o},ar=()=>{const e=rr(or),t=Gi(r,e),o=!0===t?e:t;let i=E.x,n=E.y;if(!r.height){const e=$t({...A},r.rotation),t=ni(o,c),a=$t({x:i,y:n,...t},r.rotation),[s,,l]=e,[d,,u]=a;let h=s,p=d;r.flipX&&(h=l,p=u);const m=we(pe(h),p);i+=m.x,n+=m.y}Po(r,{x:R(P.x)?No(i,Ve.width):i,y:R(P.y)?No(n,Ve.height):n,text:o})},sr=()=>{let e=s;s&&Co(),or&&or.confirm&&or.confirm(),ar(),Go(r),e?lt(r):ct(r)},lr=()=>{s?To():(Po(r,{text:P.text,x:P.x,y:P.y}),Go(r))},cr=(e,t,{flipX:o,flipY:i,rotation:r},n="top left")=>{let a,s;const[l,c,d,u]=$t(e,r),[h,p,m,g]=$t(t,r);if("top center"===n){a=Ee(i?[u,d]:[l,c]),s=Ee(i?[g,m]:[h,p])}else"top right"===n&&!o||"top left"===n&&o?(a=i?d:c,s=i?m:p):(a=i?u:l,s=i?g:h);return we(pe(a),s)},dr=(e,t,o)=>ue(R(e.x)?No(t.x+o.x,Ve.width):t.x+o.x,R(e.y)?No(t.y+o.y,Ve.height):t.y+o.y),ur={},hr=()=>Uo(r),mr=()=>{const e=Ue(ni(r.text,c),(e=>Math.ceil(e))),t=zo(r,"height"),o=!t&&zo(r,"width"),i=r.id;let n=ur[i];n||(ur[i]={},n=ur[i]);const a=e=>{const{width:t,...o}=c,i=ni(r.text,o),n=cr(nt(c.x,c.y,e.width,e.height),nt(c.x,c.y,i.width,i.height),c,"top "+r.textAlign),a=!1!==c.disableNewline;Ro(r,["width","height",a&&"textAlign"]),Po(r,{...dr(r,c,n)})},s=t=>{const o=We(n.width||c.width||e.width,e.height),i=n.textAlign||"left",a=cr(nt(c.x,c.y,t.width,t.height),nt(c.x,c.y,o.width,o.height),c,"top "+i);Ro(r,["height"]),Po(r,{...dr(r,c,a),width:R(r.width)?No(o.width,Ve.width):o.width,textAlign:i})},l=t=>{const o=We(n.width||e.width,n.height||e.height),i=n.textAlign||"left",a=cr(nt(c.x,c.y,t.width,t.height),nt(c.x,c.y,o.width,o.height),c,"top "+i);Po(r,{...dr(r,c,a),width:R(r.width)?No(o.width,Ve.width):o.width,height:R(r.width)?No(o.height,Ve.height):o.height,textAlign:i})};if(t){n.textAlign=r.textAlign,n.width=c.width,n.height=c.height;const e=We(c.width,c.height);Zi(r,"auto-height")?s(e):Zi(r,"auto-width")&&a(e)}else if(o){n.textAlign=r.textAlign,n.width=c.width;const t=We(c.width,e.height);Zi(r,"auto-width")?a(t):Zi(r,"fixed-size")&&l(t)}else{n.textAlign=r.textAlign;const t=We(Math.ceil(e.width),Math.ceil(e.height));Zi(r,"fixed-size")?l(t):Zi(r,"auto-height")&&s(t)}},gr=e=>{e.stopPropagation();const t=r.flipX||!1;Eo(r,"flipX",!t),ct(r)},yr=e=>{e.stopPropagation();const t=r.flipY||!1;Eo(r,"flipY",!t),ct(r)},br=e=>{Eo(r,"opacity",e)},xr=e=>{br(e),ct(r)},vr=e=>{e.stopPropagation(),e.target.blur(),Oo()},wr=e=>{e.stopPropagation();oe.findIndex((e=>e===r))!==oe.length-1&&(Ce.set(oe.filter((e=>e!==r)).concat([r])),ct(r))},Sr=e=>{e.stopPropagation(),kr()},kr=()=>{const e=fi(r);e.id=L();const t=ue(50,-50);if(zo(e,"points")){const o=$r(e,["points"],Ve);o.points.forEach((e=>{e.x+=t.x,e.y+=t.y})),fr(e,o,Ve)}else if(Pi(e)){const o=$r(e,["x1","y1","x2","y2"],Ve);o.x1+=t.x,o.y1+=t.y,o.x2+=t.x,o.y2+=t.y,fr(e,o,Ve)}else{const t=$r(e,["x","y"],Ve);t.x+=50,t.y-=50,fr(e,t,Ve)}Ce.set([...oe,e]),lt(e),Vo(e)},Cr=ec(0,{stiffness:.2,damping:.7});let Tr;on(e,Cr,(e=>o(17,ie=e)));const Mr=(e,t)=>{const{disableTextLayout:o=[]}=t;return"height"in t?o.includes("auto-height")?e.shapeIconButtonTextLayoutAutoWidth:e.shapeIconButtonTextLayoutAutoHeight:"width"in t?o.includes("auto-width")?e.shapeIconButtonTextLayoutFixedSize:e.shapeIconButtonTextLayoutAutoWidth:o.includes("fixed-size")?e.shapeIconButtonTextLayoutAutoHeight:e.shapeIconButtonTextLayoutFixedSize},Rr=(e,t)=>{const{disableTextLayout:o=[]}=t;return"height"in t?o.includes("auto-height")?e.shapeTitleButtonTextLayoutAutoWidth:e.shapeTitleButtonTextLayoutAutoHeight:"width"in t?o.includes("auto-width")?e.shapeTitleButtonTextLayoutFixedSize:e.shapeTitleButtonTextLayoutAutoWidth:o.includes("fixed-size")?e.shapeTitleButtonTextLayoutAutoHeight:e.shapeTitleButtonTextLayoutFixedSize};let Pr=!1;let Er=de(),Ir=void 0;const Ar=e=>{mt(e),o(142,xi=e)};let Lr;Yn((()=>{er(),Ki(),zi(),yi()}));return e.$$set=e=>{"uid"in e&&o(57,me=e.uid),"ui"in e&&o(58,$e=e.ui),"disabled"in e&&o(0,Se=e.disabled),"shapes"in e&&he(o(1,Ce=e.shapes)),"selection"in e&&o(59,Te=e.selection),"offset"in e&&o(2,Pe=e.offset),"contextRotation"in e&&o(60,Le=e.contextRotation),"contextFlipX"in e&&o(61,ze=e.contextFlipX),"contextFlipY"in e&&o(62,De=e.contextFlipY),"contextZoom"in e&&o(63,Oe=e.contextZoom),"active"in e&&o(64,Be=e.active),"opacity"in e&&o(65,_e=e.opacity),"parentRect"in e&&o(66,Ve=e.parentRect),"rootRect"in e&&o(3,Ne=e.rootRect),"utilRect"in e&&o(67,He=e.utilRect),"hoverColor"in e&&o(68,je=e.hoverColor),"caretColor"in e&&o(69,Ze=e.caretColor),"gridColor"in e&&o(70,Ye=e.gridColor),"snapColor"in e&&o(71,qe=e.snapColor),"textInputMode"in e&&o(4,Ke=e.textInputMode),"oninteractionstart"in e&&o(72,Je=e.oninteractionstart),"oninteractionupdate"in e&&o(73,Qe=e.oninteractionupdate),"oninteractionrelease"in e&&o(74,et=e.oninteractionrelease),"oninteractionend"in e&&o(75,rt=e.oninteractionend),"oninteractioncancel"in e&&o(76,st=e.oninteractioncancel),"onaddshape"in e&&o(77,lt=e.onaddshape),"onupdateshape"in e&&o(78,ct=e.onupdateshape),"onselectshape"in e&&o(79,dt=e.onselectshape),"onblurshape"in e&&o(80,ut=e.onblurshape),"onremoveshape"in e&&o(81,ht=e.onremoveshape),"ontapshape"in e&&o(82,pt=e.ontapshape),"onhovershape"in e&&o(83,mt=e.onhovershape),"onhovercanvas"in e&&o(84,gt=e.onhovercanvas),"ontapcanvas"in e&&o(85,ft=e.ontapcanvas),"onleavecanvas"in e&&o(86,yt=e.onleavecanvas),"beforeSelectShape"in e&&o(87,bt=e.beforeSelectShape),"beforeDeselectShape"in e&&o(88,St=e.beforeDeselectShape),"beforeRemoveShape"in e&&o(89,kt=e.beforeRemoveShape),"beforeUpdateShape"in e&&o(90,Ct=e.beforeUpdateShape),"willRenderShapeControls"in e&&o(91,Tt=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(92,Mt=e.willRenderShapeTextControls),"willStartInteraction"in e&&o(93,Rt=e.willStartInteraction),"mapEditorPointToImagePoint"in e&&o(94,It=e.mapEditorPointToImagePoint),"mapImagePointToEditorPoint"in e&&o(95,At=e.mapImagePointToEditorPoint),"eraseRadius"in e&&o(96,Bt=e.eraseRadius),"selectRadius"in e&&o(97,Wt=e.selectRadius),"enableButtonFlipVertical"in e&&o(98,_t=e.enableButtonFlipVertical),"enableTapToAddText"in e&&o(99,Vt=e.enableTapToAddText),"enableTextStyleControls"in e&&o(5,Nt=e.enableTextStyleControls),"locale"in e&&o(6,Ht=e.locale),"snapThreshold"in e&&o(100,jt=e.snapThreshold),"snapPointer"in e&&o(101,Ut=e.snapPointer),"enableSnapToContext"in e&&o(102,Gt=e.enableSnapToContext),"gridSize"in e&&o(103,Zt=e.gridSize)},e.$$.update=()=>{var t,a;16&e.$$.dirty[2]|1024&e.$$.dirty[3]&&o(166,i=Zt>0?{x:0,y:0,...Ve}:void 0),1&e.$$.dirty[0]|1048576&e.$$.dirty[5]&&o(146,r=!Se&&oe&&(So()||Lo())),4194304&e.$$.dirty[4]&&o(173,n=!!r),4194304&e.$$.dirty[4]&&o(160,s=r&&Fi(r)),4194304&e.$$.dirty[4]|32&e.$$.dirty[5]&&o(10,l=r&&!s?r.id:void 0),8&e.$$.dirty[0]|16&e.$$.dirty[2]|4194304&e.$$.dirty[4]&&o(13,c=Ne&&r&&pr(fi(r),Ve)),4194304&e.$$.dirty[4]|32&e.$$.dirty[5]&&o(144,d=!(!r||!s)),8192&e.$$.dirty[0]|8&e.$$.dirty[2]|4194304&e.$$.dirty[4]&&o(172,u=r&&_e&&ui(c)||[]),4194304&e.$$.dirty[4]&&o(174,h=r&&(Xi(t=r)&&Yi(t)&&!0!==t.disableResize&&(Di(t)||Ti(t)||Ri(t)||Pi(t)||Ei(t)&&zo(t,"pathClose")))&&!Ii(r)),4194304&e.$$.dirty[4]&&o(14,p=r&&(e=>Xi(e)&&!0!==e.disableRotate&&(Di(e)||zo(e,"text")||Ri(e)))(r)&&!Ii(r)),4194304&e.$$.dirty[4]|524288&e.$$.dirty[5]&&o(16,m=h&&zo(r,"text")&&!r.height?[[1,2],[3,0]]:(!r||!Pi(r)&&!Ei(r))&&h),65536&e.$$.dirty[0]|4194304&e.$$.dirty[4]|524288&e.$$.dirty[5]&&o(28,g=!!r&&(!Array.isArray(m)&&h)),4194304&e.$$.dirty[4]|131072&e.$$.dirty[5]&&o(15,$=r&&u.length>1),4&e.$$.dirty[3]|131072&e.$$.dirty[5]&&o(170,f=u.map(At)),4&e.$$.dirty[0]|32768&e.$$.dirty[5]&&o(12,y=f.map((e=>ue(e.x-Pe.x,e.y-Pe.y)))),4194304&e.$$.dirty[4]|262144&e.$$.dirty[5]&&o(27,b=n&&(Ti(r)?!zo(r,"disableNewline")||!r.disableNewline:!1===r.disableNewline)),4&e.$$.dirty[3]|262144&e.$$.dirty[4]&&(xi&&At&&!Li(xi)&&Hi(xi)?(e=>{const t=ui(pr(fi(e),Ve));if(!t)return;const o=t.map(At),i=!!e.pathClose||!(!e.bitmap&&(Ei(e)||Pi(e))),r="hook"===e.selectionStyle,n=r?o.map(((e,t,o)=>({id:By,points:Ai(o,t),strokeColor:[0,0,0,.1],strokeWidth:2}))):[{id:By,points:o.map((e=>ue(e.x+1,e.y+1))),strokeColor:[0,0,0,.1],strokeWidth:2,pathClose:i}],a=r?o.map(((e,t,o)=>({id:By,points:Ai(o,t),strokeColor:je,strokeWidth:2}))):[{id:By,points:o,strokeColor:je,strokeWidth:2,pathClose:i}];bi(...n,...a)})(xi):yi()),61440&e.$$.dirty[0]|8&e.$$.dirty[2]&&o(171,x=$&&p&&_e&&y&&(e=>{const t=hi(e),o=At({x:t.origin.x+t.dir.x,y:t.origin.y+t.dir.y});return{origin:At(t.origin),position:o}})(c)),4&e.$$.dirty[0]|65536&e.$$.dirty[5]&&o(26,v=x&&ue(x.position.x-Pe.x,x.position.y-Pe.y)),4194304&e.$$.dirty[5]&&o(165,C=!!(ne||[]).find((e=>[91,93,17].includes(e)))),256&e.$$.dirty[3]|1024&e.$$.dirty[5]&&o(167,w=!(C||!Ut)),8&e.$$.dirty[2]|4718592&e.$$.dirty[4]|36896&e.$$.dirty[5]&&r&&f&&_e>0&&((e,t,o)=>{if(!Hi(t))return;const i=Ei(t),r=i&&zo(t,"pathClose"),n=r&&(e=>e.strokeWidth&&((e,t)=>{const o=e.strokeColor;return!!o&&(3===o.length||o[3]>0)})(e))(t),a=Fi(t),s=Ii(t),l="hook"===t.selectionStyle,{selectionOpacity:c=1}=t;if(a&&i&&!r)return;const d=[],h=[...f],p=h[h.length-1],m=h[0],g=(s?.05:.1)*e*c,$=g>0,y=(s?.5:1)*e*c,b=y>0,v=[0,0,0],w=[1,1,1],S=s?1:1.5;ne.includes(16)&&p&&o&&no(p,o);const k=h.length&&r&&a&&o?Me(m,o):1/0,C=h.length&&r&&a&&o?Me(p,o):1/0,T=k<=Oy,M=C<=Oy;!T&&o&&h.push(o);const R=h.length>1,P=!!t.pathClose||!(!t.bitmap&&(Ei(t)||Pi(t)))||h.length>2&&T;R&&$&&(l?d.push(...h.map(((e,t,o)=>({id:vi,points:Ai(o,t),strokeColor:v,strokeWidth:2,opacity:g})))):d.push({id:vi,points:h.map((e=>ue(e.x+1,e.y+1))),pathClose:P,strokeColor:v,strokeWidth:2,opacity:g})),r&&$&&d.push(...h.map((e=>({id:vi,...e,rx:2*S,ry:2*S,backgroundColor:v,opacity:g})))),x&&$&&d.push({id:vi,points:[ue(x.origin.x+1,x.origin.y+1),ue(x.position.x+1,x.position.y+1)],strokeColor:v,strokeWidth:2,opacity:g}),R&&b&&(l?d.push(...h.map(((e,t,o)=>({id:vi,points:Ai(o,t),strokeColor:w,strokeWidth:S,opacity:y})))):d.push({id:vi,points:h,pathClose:P,strokeColor:w,strokeWidth:S,backgroundColor:a&&r&&t.backgroundColor&&t.backgroundColor[3]>0?t.backgroundColor:[0,0,0,0],opacity:y})),r&&d.push(...h.map((e=>({id:vi,...e,rx:3*S,ry:3*S,backgroundColor:[.5,.5,.5],strokeWidth:S,strokeColor:w})))),r&&a&&f.length>=3&&d.push({...m,id:vi,rx:S*(T?5:4),ry:S*(T?5:4),backgroundColor:T?je:[.5,.5,.5],strokeWidth:S,strokeColor:w}),r&&a&&n&&!T&&u.length>=2&&d.push({...p,id:vi,rx:S*(M?5:4),ry:S*(M?5:4),backgroundColor:M?je:[.5,.5,.5],strokeWidth:S,strokeColor:w}),x&&b&&!l&&d.push({id:vi,points:[{x:x.origin.x,y:x.origin.y},{x:x.position.x,y:x.position.y}],strokeColor:w,strokeWidth:S,opacity:y}),Oi(...d)})(_e,r,s&&Ei(r)?Bi({...Ir},!w):void 0),4194304&e.$$.dirty[4]&&(r||zi()),262144&e.$$.dirty[4]&&o(168,S=!!xi),65536&e.$$.dirty[4]&&o(169,k=!!oi),524288&e.$$.dirty[4]|28672&e.$$.dirty[5]&&(!Ir||k||S||Bi({...Ir},!w)),256&e.$$.dirty[2]|1028&e.$$.dirty[3]|8390656&e.$$.dirty[5]&&Zt>0&&i&&At&&((e,t,o,i)=>{const r=At({x:0,y:0}),n=At({x:e,y:e}),a=At({x:t.width,y:t.height}),s=n.x-r.x;if(Wi.set(s>6?1:0),i<=0)return Ki();const l=mo(s,r.x,a.x).map((e=>({id:qi,opacity:i,points:[{x:e,y:r.y},{x:e,y:a.y}],strokeWidth:1,strokeColor:o}))),c=mo(s,r.y,a.y).map((e=>({id:qi,opacity:i,points:[{x:r.x,y:e},{x:a.x,y:e}],strokeWidth:1,strokeColor:o})));Ji(...c,...l)})(Zt,i,Ye,ae),512&e.$$.dirty[2]|4&e.$$.dirty[3]|49152&e.$$.dirty[4]|1024&e.$$.dirty[5]&&At&&(C?er():((e,t,o)=>{if(null===e&&null===t)return er();let i,r;null!==e&&(i={id:Qi,strokeColor:o,strokeWidth:1.5,points:[At({x:e,y:0}),At({x:e,y:Ve.height})]}),null!==t&&(r={id:Qi,strokeColor:o,strokeWidth:1.5,points:[At({x:0,y:t}),At({x:Ve.width,y:t})]}),tr(i,r)})(uo,ho,qe)),4&e.$$.dirty[2]&&(e=>{if(!e)return Io({_prerender:!1});const t=oe.find((e=>e.isEditing));t&&Po(t,{_prerender:"inline"===Ke})})(Be),4194304&e.$$.dirty[5]&&ne&&ne.length&&(()=>{const[e]=ne;8!==e&&46!==e||Fo()&&(r.isEditing||setTimeout((()=>Oo()),0))})(),272&e.$$.dirty[0]&&or&&"inline"===Ke&&or.focus(),4194304&e.$$.dirty[4]&&o(164,T=r&&ki(r)),4194304&e.$$.dirty[4]|512&e.$$.dirty[5]&&o(11,M=T&&!1!==Gi(r)&&Ii(r)),2048&e.$$.dirty[0]&&o(159,P=M?{...r}:void 0),16&e.$$.dirty[2]|16&e.$$.dirty[5]&&o(161,E=P&&pr({...P},Ve)),64&e.$$.dirty[5]&&o(163,I=E&&ni(E.text,E)),320&e.$$.dirty[5]&&(A=E&&nt(E.x,E.y,I.width,I.height)),2048&e.$$.dirty[0]|4194304&e.$$.dirty[4]&&o(23,z=M?r.text:""),2056&e.$$.dirty[0]|16&e.$$.dirty[2]|4194304&e.$$.dirty[4]&&o(162,F=Ne&&r&&M&&pr({...fi(r),width:Ao(r.width)?Math.floor(r.width):void 0,height:Ao(r.height)?Math.floor(r.height):void 0},Ve)),2064&e.$$.dirty[0]|128&e.$$.dirty[5]&&o(25,D=M&&((e,t)=>{const{textAlign:o="left",fontFamily:i="sans-serif",fontWeight:r="normal",fontStyle:n="normal",letterSpacing:a="normal",textShadowX:s=0,textShadowY:l=0,textShadowBlur:c=0,textShadowColor:d,textOutlineWidth:u=0,textOutlineColor:h}=e,p="!important",m=`caret-color:${B};text-align:${o}${p};font-family:${i}${p};font-weight:${r}${p};font-style:${n}${p};letter-spacing:${Ao(a)?a+"px":"normal"}${p}`;if("modal"===t)return m;const g=u?`;-webkit-text-stroke:${2*u}px ${Ho(h)} ${p}`:"",$=c||s||l?`;text-shadow:${s}px ${l}px ${c}px ${Ho(d)} ${p}`:"";let f=e.fontSize,y=1,b="";f>1e3&&qo()&&(y=f/1e3,b=`transform-origin:0 0;transform:scale(${y})`,f=1e3);let x=e.lineHeight/y;const v=Ho(e.color),w=.5*Math.max(0,f-x);return`--font-scalar:${y};--bottom-inset:${w}px;padding:${w}px 0 0${p};color:${v}${p};font-size:${f}px${p};line-height:${x}px${p};${m};${b}${g}${$}`})(F,Ke)),2052&e.$$.dirty[0]|536870912&e.$$.dirty[1]|2&e.$$.dirty[2]|128&e.$$.dirty[5]&&o(24,O=M&&((e,t,o,i)=>{let n,a;e.width&&e.height?(n=at(e),a=Fe(e)):(a=ni(r.text,c),a.width=c.width||a.width,n=ue(e.x+.5*a.width,e.y+.5*a.height));const s=Math.max(0,e.fontSize-e.lineHeight)+e.lineHeight,l=At(n);let d=l.x-t.x-.5*a.width,u=l.y-t.y-.5*a.height,h=e.flipX,p=e.flipY,m=e.rotation;ze&&De?(h=!h,p=!p):ze?(h=!h,m=-m):De&&(p=!p,m=-m),m+=i;const g=o*(h?-1:1),$=o*(p?-1:1);return`--line-height:${s}px;width:${a.width}px;height:${a.height}px;transform:translate(${d}px,${u}px) rotate(${m}rad) scale(${g}, ${$})`})(F,Pe,Oe,Le)),128&e.$$.dirty[2]&&(B=Ho(Ze)),2320&e.$$.dirty[0]&&M&&or&&"inline"===Ke&&ir(z),72351744&e.$$.dirty[4]&&o(150,W=r&&!d?r:W),67108864&e.$$.dirty[4]&&o(152,_=W&&Ui(W)),67108864&e.$$.dirty[4]&&o(147,V=W&&Zi(W)),67108864&e.$$.dirty[4]&&o(149,N=W&&(e=>!0!==e.disableDuplicate&&Yi(e))(W)),67108864&e.$$.dirty[4]&&o(148,H=W&&ji(W)),67108864&e.$$.dirty[4]&&o(151,j=W&&(e=>!0!==e.disableReorder)(W)),67108864&e.$$.dirty[4]&&o(145,U=W&&!1!==Gi(W)),67108864&e.$$.dirty[4]&&o(153,Z=W&&zo(W,"backgroundImage")&&Ni(W,"opacity")),4194304&e.$$.dirty[4]&&o(155,X=r&&"html"===r.format),5242880&e.$$.dirty[4]|1&e.$$.dirty[5]&&o(158,Y=r&&(!d||X)),131072&e.$$.dirty[4]|2097160&e.$$.dirty[5]&&Cr.set(Y&&!li?1:0,{hard:!1===re}),4096&e.$$.dirty[0]|12&e.$$.dirty[5]&&o(157,q=Y&&y.length?(a=ot(y),xe(ue(a.x+.5*a.width,a.y),Hd)):q),512&e.$$.dirty[0]|32&e.$$.dirty[2]|4&e.$$.dirty[5]&&o(156,K=q&&Tr&&He&&(e=>{const t=He.x,o=He.y,i=t+He.width;let r=Math.max(e.x-.5*Tr.width,t),n=Math.max(e.y-Tr.height-16,o);return r+Tr.width>i&&(r=i-Tr.width),ue(r,n)})(q)),131072&e.$$.dirty[0]|2&e.$$.dirty[5]&&o(22,J=K&&`transform: translate(${K.x}px, ${K.y}px);opacity:${ie}`),2048&e.$$.dirty[0]&&o(154,Q=M?"text":"shape"),1088&e.$$.dirty[0]|1610612736&e.$$.dirty[2]|32&e.$$.dirty[3]|2145386496&e.$$.dirty[4]|1048577&e.$$.dirty[5]&&o(21,ee="text"===Q&&Mt&&X?Fp((()=>Mt([["div","text-styles",{class:"PinturaShapeControlsGroup"},[...[["bold",{label:"B",style:"font-weight:900;",title:"Bold",shortcut:["CMD","B"]}],["italic",{label:"I",style:"font-family:Times New Roman;font-style:italic;",title:"Italic",shortcut:["CMD","I"]}],["underline",{label:"U",style:"text-decoration:underline;",title:"Underline",shortcut:["CMD","U"]}],["strikeThrough",{label:"S",style:"text-decoration:line-through;",title:"Strikethrough",shortcut:["CMD","S"]}]].map((([e,t])=>["Button","style-"+e,{onclick:()=>document.execCommand(e),...t,style:"font-size:1.25em;text-underline-offset:1px;text-decoration-thickness:1.5px;font-weight:400;"+t.style}]))]],["div","text-reset",{class:"PinturaShapeControlsGroup"},[["Button","style-reset",{onclick:()=>document.execCommand("removeFormat"),style:"font-weight:400;",label:'T×',title:"Remove styles"}]]]],l))):"shape"===Q&&Tt&&l?Fp((()=>Tt([Z&&["div","alpha",{class:"PinturaShapeControlsGroup"},[["ToggleSlider","adjust-opacity",{onrelease:xr,onchange:br,step:.01,value:zo(r,"opacity")?r.opacity:1,label:(e,t,o)=>Math.round(e/o*100)+"%",min:0,max:1,direction:"x"}]]],["div","beta",{class:"PinturaShapeControlsGroup"},[_&&["Button","flip-horizontal",{onclick:gr,label:Ht.shapeTitleButtonFlipHorizontal,icon:Ht.shapeIconButtonFlipHorizontal,hideLabel:!0}],_&&_t&&["Button","flip-vertical",{onclick:yr,label:Ht.shapeTitleButtonFlipVertical,icon:Ht.shapeIconButtonFlipVertical,hideLabel:!0}],j&&["Button","to-front",{onclick:wr,label:Ht.shapeTitleButtonMoveToFront,icon:Ht.shapeIconButtonMoveToFront,hideLabel:!0,disabled:oe[oe.length-1]===W}],N&&["Button","duplicate",{onclick:Sr,label:Ht.shapeTitleButtonDuplicate,icon:Ht.shapeIconButtonDuplicate,shortcut:["CMD","D"],hideLabel:!0}],H&&["Button","remove",{onclick:vr,label:Ht.shapeTitleButtonRemove,icon:Ht.shapeIconButtonRemove,shortcut:["Backspace"],hideLabel:!0}]].filter(Boolean)],U&&V&&["div","gamma",{class:"PinturaShapeControlsGroup"},[["Button","text-layout",{onclick:mr,label:uu(Rr,Ht,r),icon:uu(Mr,Ht,r),hideLabel:!0}]]],U&&["div","delta",{class:"PinturaShapeControlsGroup"},[["Button","edit-text",{label:Ht.shapeLabelInputText,onclick:hr}]]]].filter(Boolean),l))):[]),64&e.$$.dirty[0]|1048576&e.$$.dirty[5]&&o(20,te=oe.filter(Hi).filter((e=>e.id)).filter((e=>!Fi(e))).map((e=>({id:e.id,color:ki(e)?e.color:Pi(e)?e.strokeColor:e.backgroundColor,name:e.name||Ht["shapeLabelTool"+Ya(nr(e))]}))))},[Se,Ce,Pe,Ne,Ke,Nt,Ht,Vo,or,Tr,l,M,y,c,p,$,m,ie,Pr,Lr,te,ee,J,z,O,D,v,b,g,qt,ao,e=>{const{origin:t}=e.detail;o(140,oi=void 0),ii=void 0,ri=void 0,ai=!1,ti=void 0,si=!1,co(),clearTimeout(ei),ei=setTimeout((()=>o(141,li=!0)),250);const i=So();if(!i||Ei(i)&&zo(i,"pathClose")||Co(),Qo=It(pe(t)),i&&Ei(i)&&zo(i,"pathClose"))return Je(e);const n=Ko(oe,Qo,Wt,(e=>Hi(e))),a=n.length&&n.shift();if(r&&Ii(r)&&(sr(),Vt&&(si=!0)),!a&&r&&Ii(r)&&jo(r),!Rt(t))return;if(a&&Li(a))return ai=!0,o(140,oi=a),ii=fi(oi),void(ri=pr(fi(oi),Ve));ti=a||void 0;!Je(e)&&a&&(Vo(a),o(140,oi=a),ii=fi(oi),ri=pr(fi(oi),Ve))},e=>{ci(),st(e)},e=>{const{translation:t,ctrlKey:o,metaKey:r,shiftKey:n,position:a}=e.detail;if(oi){if(!Yi(oi))return;if(Ii(oi))return;if(n){let e=Math.abs(t.x),o=Math.abs(t.y);"x"===di&&(o-=64),"y"===di&&(e-=64),e>o?(t.y=0,di="x"):o>e&&(t.x=0,di="y")}else di=null;return bo(oi,ri,t,{...Yt(o||r?0:jt,Zt,i,oi)})}Qe(e)},e=>{ci(),oi?Ii(oi)?lr():e.detail.isTap&&ai&&ki(oi)&&!1!==Gi(oi)&&Uo(oi):et(e)},e=>{const t=ti&&e.detail.isTap;if(e.detail.isTap&&setTimeout((()=>{ft({target:oi||ti,position:Qo},0)})),oi)return pt(oi),i=oi,r=ii,JSON.stringify(i)!==JSON.stringify(r)&&ct(oi),void o(140,oi=void 0);var i,r;const n=_o(),a=!n||St(n,ti||void 0);a&&Wo({storePrevious:!1}),rt(e),a&&t&&Vo(ti)},Wi,e=>{o(141,li=!0),o(140,oi=r),ri=c},e=>{if(!oi)return void o(141,li=!1);const{translation:t,indexes:r,shiftKey:n,ctrlKey:s,metaKey:l}=e.detail;((e,t,o,i,r)=>{const{snapThreshold:n=0,gridSize:s=0,gridRect:l,snapTargets:c=[]}=r||{},d=n?(e,t,o)=>{const{snapTranslation:i,snapLines:r}=fo(go(e),c,n,s,l);yo(t,i),lo(r);const a=po(o(),t);e.x=a.x,e.y=a.y}:a;if(Pi(e)||Ei(e)&&zo(e,"pathClose")){const[r]=o,n=ne.includes(16)?no:(e,t)=>t;let a,s,l;if(Pi(e))0===r?(a=()=>wi(t),s=e=>n(Si(t),e),l=(e,t)=>{e.x1=t.x,e.y1=t.y}):1===r&&(a=()=>Si(t),s=e=>n(wi(t),e),l=(e,t)=>{e.x2=t.x,e.y2=t.y});else{const e=t.points;a=()=>({...e[r]}),s=t=>{const o=e[cy(r-1,e)],i=e[cy(r+1,e)];n(o,t),n(i,t)},l=(e,t)=>e.points[r]=t}const c=po(a(),i);d(c,i,a),s(c),l(e,c)}else if(Di(e)||Ri(e)||Ti(e)){let n,a,s=!1;if(Ri(e))n=it(t);else if(Di(e))n=tt(t);else{s=!0,n=tt(t);const e=ni(t.text,t);n.height=e.height}e.aspectRatio?a=e.aspectRatio:r.shiftKey&&!s&&(a=n.width/n.height);const l=tt(n),c=at(l),u=e.rotation,h=wt(l),p=$t(l,u);if(1===o.length){let t=o[0];e.flipX&&(t=xo[t]),e.flipY&&(t=vo[t]);const[r,n,s,l]=h,m=At(p[t]),g=ve({...m},i),$=It(g);d($,i,(()=>It(m)));const f=ue($.x-p[t].x,$.y-p[t].y),y=ge(pe(f),-u),b=ue(h[t].x+y.x,h[t].y+y.y);let x;0===t&&(x=s),1===t&&(x=l),2===t&&(x=r),3===t&&(x=n);const v=ot([x,b]);if(a){const{width:e,height:t}=xt(v,a),[o,i,r,n]=vt(v);v.width=e,v.height=t,b.y(e.flipX&&(t=xo[t]),e.flipY&&(t=vo[t]),t)));const[t,r]=o.map((e=>p[e])),n={x:t.x+.5*(r.x-t.x),y:t.y+.5*(r.y-t.y)},[l,m]=o.map((e=>h[e])),[g,$]=o.map((e=>{const t=e+2;return t<4?h[t]:h[t-4]})),f={x:g.x+.5*($.x-g.x),y:g.y+.5*($.y-g.y)},y=At(n),b=ve({...y},i),x=It(b);d(x,i,(()=>It(y)));const v=ue(x.x-n.x,x.y-n.y),w=ge(pe(v),-u),S=we(pe(l),m),k=xe(S,(e=>1-Math.abs(Math.sign(e)))),C=ue(w.x*k.x,w.y*k.y);ve(l,C),ve(m,C);const T=ot(h);if(a){let e=T.width,t=T.height;0===k.y?t=e/a:e=t*a,T.width=e,T.height=t,0===k.y?T.y=f.y-.5*t:T.x=f.x-.5*e}const M=$t(T,u,c),R=Ee(M),P=ge(M[0],-u,R),E=ge(M[2],-u,R),I=ot([P,E]);let A;Ri(e)?A=ce(I):Di(e)?A=I:s&&(A={x:I.x,y:I.y,width:I.width}),ro(e,A,Ve)}}Mo()})(oi,ri,r,t,{shiftKey:n,...Yt(s||l?0:jt,Zt,i,oi)})},e=>{if(!oi)return void o(141,li=!1);Vo(oi);const{isTap:t}=e.detail;t&&pt(oi),o(140,oi=void 0),o(141,li=!1),ct(r)},e=>{wo=hi(c).origin,o(141,li=!0),o(140,oi=r),ri=c},e=>{if(!oi)return void o(141,li=!1);const{translation:t,shiftKey:i}=e.detail;((e,t,o,i)=>{const r=Yo(pr(fi(e),Ve)),n=at(r),a=po(wo,o);let s=ye(a,n)+Math.PI/2;if(i.shiftKey){const e=Math.PI/16;s=e*Math.round(s/e)-Le%e}ro(e,{rotation:s},Ve),Mo()})(oi,0,t,{shiftKey:i})},()=>{oi?(Vo(oi),o(140,oi=void 0),o(141,li=!1),ct(r)):o(141,li=!1)},e=>{const{key:t}=e,o=/escape/i.test(t);if(Fo())return o?(e.preventDefault(),e.stopPropagation(),jo(r)):void(N&&"d"===t&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.stopPropagation(),kr()))},e=>{const t=Gi(r,e);return!0===t?e:t},ar,e=>{const{target:t,key:o}=e,i=t.value||t.innerText,n=t.selectionStart||0,a=t.selectionEnd||i.length,s=i.substring(0,n)+o+i.substring(a);if(Gi(r,s)!==s)return e.preventDefault()},e=>Ci(r)&&/enter/i.test(e.code)&&!1!==r.disableNewline?e.preventDefault():/arrow/i.test(e.code)?e.stopPropagation():/escape/i.test(e.key)?lr():void 0,e=>{const{key:t,ctrlKey:o,altKey:i}=e;if(/enter/i.test(t)&&(o||i))return sr()},sr,lr,Cr,e=>{const t=Lo();t&&(Ii(t)||Yi(t)&&(o(140,oi=t),ri=pr(fi(oi),Ve),bo(oi,ri,e.detail)))},e=>{o(18,Pr=!0)},({relatedTarget:e})=>{e&&e.classList.contains("shape-selector__button")||o(18,Pr=!1)},e=>{if("touch"===e.pointerType||"PinturaShapeEditor"!==e.target.className)return void yt();(li||ei)&&Ar(void 0);const t=fy(e,Ne);o(143,Ir=pe(t));const i=xe(It(t),(e=>Math.round(e)));if(be(i,Er))return;if(Er=pe(i),gt(li,t,i),li||ei)return;if(d)return;const[r]=Ko(oe,i,0,Hi);r&&Fi(r)||Ar(r)},e=>{"touch"!==e.pointerType&&yt()},me,$e,Te,Le,ze,De,Oe,Be,_e,Ve,He,je,Ze,Ye,qe,Je,Qe,et,rt,st,lt,ct,dt,ut,ht,pt,mt,gt,ft,yt,bt,St,kt,Ct,Tt,Mt,Rt,It,At,Bt,Wt,_t,Vt,jt,Ut,Gt,Zt,Kt,Jt,Qt,eo,to,oo,io,(e,t={})=>{let o,r,n,a=Ri(e),s=ki(e),l="relative"===t.position;const c=Xt(),d=e=>{if(!jt)return e;const t=It(e),{snapTranslation:o,snapLines:r}=fo(go(t),c,jt,Zt,i);return yo(e,o),lo(r),e},u=!!_o(),h=t.isSelection?Te:Ce,p="step"===t.inputMode;if(Ei(e)){if(p){let t=!1;const i=(e,o)=>{const i=Jt(h),r=e&&ue(Ty(e.x,Ve.width),Ty(e.y,Ve.height)),n=r&&At(r);ne.includes(16)&&n&&no(n,o);const a=It(o),s=i.points.length?i.points[0]:a,c=ue(Ty(s.x,Ve.width),Ty(s.y,Ve.height)),d=At(c),u=Me(d,o);if(!t&&1===i.points.length&&u<36)return eo(h);if(i.points.length>2&&u<=Oy){i.pathClose=!0,Hi(i)&&Vo(i);const e=to(h);return void lt(e)}const p=i.strokeWidth&&i.strokeColor&&(void 0===i.strokeColor[3]||i.strokeColor[3]>0),m=Me(n,o);if(p&&i.points.length>1&&m0&&m<100))return l?My(a,Ve):a};return{start:e=>{const a=Jt(h),{origin:s}=e.detail;if(r=4,o=d(pe(s)),n=pe(o),a){const e=a.points[a.points.length-1],t=i(e,o);return t&&(a.points=[...a.points,t]),void oo({points:a.points},h)}t=!0},update:e=>{if(!t)return;const r=Jt(h);if(!r)return;const n=r.points[0],a=i(n,ue(o.x+e.detail.translation.x,o.y+e.detail.translation.y));a&&(r.points[1]=a,oo({points:r.points},h))},release:e=>e.detail.preventInertia(),end:i=>{if(!t)return;const r=It(o),n=l?My(r,Ve):r,{isTap:a}=i.detail;if(a){if(Ko(oe,r,0,Hi).length)return eo(h)}Qt({...e,points:[n]},h)}}}return{start:t=>{const{origin:i}=t.detail;r=4,o=pe(i),n=pe(o);const a=It(o),s=l?My(a,Ve):a;Qt({...e,points:[s]},h)},update:e=>{const t=Jt(h),{translation:i}=e.detail,a=ue(o.x+i.x,o.y+i.y),s=Re(n,a);if(se(s,5)<=r)return;const c=ye(a,n),d=r-s;n.x+=d*Math.cos(c),n.y+=d*Math.sin(c);const u=It(n),p=l?My(u,Ve):u;oo({points:t.points.concat(p)},h)},release:e=>e.detail.preventInertia(),cancel:()=>{eo(h)},end:e=>{const t=Jt(h);if(e.detail.isTap){let e=!1;if(t.bitmap?(ti&&(e=!0),u&&(e=!0)):e=!0,e)return eo(h)}const o=to(h);lt(o)}}}return a||s||Mi(e)?{start:t=>{const{origin:i}=t.detail;o=d(pe(i));const r=It(o),n=l?My(r,Ve):r,s=-1*so(Le,ze,De),c={...e,rotation:s,...n};c.flipX=ze,c.flipY=De,delete c.position,c.opacity=0;(a?["rx","ry"]:["width","height"]).forEach((e=>{c[e]=l?"0%":0})),Qt(c,h)},update:e=>{const t=Jt(h);t.opacity=1;let{aspectRatio:i}=t,{translation:r,shiftKey:n,ctrlKey:s}=e.detail;!i&&n&&(i=1);const l=d(ue(o.x+r.x,o.y+r.y)),c=It(o),u=It(l);if(i){const e=ot([c,u]),t=xt(e,i);u.x=c.x+t.width,u.y=c.y+t.height}const p={x:c.x+.5*(u.x-c.x),y:c.y+.5*(u.y-c.y)},m=so(Le,ze,De);ge(c,m,p),ge(u,m,p);const g=Math.min(c.x,u.x),$=Math.min(c.y,u.y);let f=Math.max(c.x,u.x)-g,y=Math.max(c.y,u.y)-$,b={};a?(s?(b.x=c.x,b.y=c.y):(b.x=g+.5*f,b.y=$+.5*y),b.rx=.5*f,b.ry=.5*y):(s?(b.x=c.x-.5*f,b.y=c.y-.5*y):(b.x=g,b.y=$),b.width=f,b.height=y),oo(b,h,((e,t)=>ro(e,t,Ve)))},release:e=>{e.detail.preventInertia()},cancel:e=>{eo(h)},end:e=>{const t=Jt(h);if(e.detail.isTap){if(ki(t)&&Vt&&si)return eo(h);if(!ki(t)||!Vt||ti)return eo(h);delete t.width,delete t.height,!1!==t.disableNewline&&delete t.textAlign;const e=pr({...t},Ve),i=ni(t.text,e),r=It({x:o.x,y:o.y-.5*i.height}),n=It({x:o.x+i.width,y:o.y+.5*i.height}),a={x:r.x+.5*(n.x-r.x),y:r.y+.5*(n.y-r.y)},s=so(Le,ze,De);ge(r,s,a),ge(n,s,a);let l=Math.min(r.x,n.x),c=Math.min(r.y,n.y);l<0&&(l=0),c<0&&(c=0),l+i.width>Ve.width&&(l=Ve.width-i.width),c+i.height>Ve.height&&(c=Ve.height-i.height),t.x=R(t.x)?No(l,Ve.width):l,t.y=R(t.y)?No(c,Ve.height):c}if(t.opacity=1,!ki(t)){const e=to(h);lt(e)}Hi(t)&&Vo(t),ki(t)&&Uo(t)}}:Pi(e)?{start:t=>{const{origin:i}=t.detail,r=It(d(i)),n=xe(r,Hd);o=pe(i),Qt({...e,x1:l?No(n.x,Ve.width):n.x,y1:l?No(n.y,Ve.height):n.y,x2:l?No(n.x,Ve.width):n.x,y2:l?No(n.y,Ve.height):n.y,opacity:0},h)},update:e=>{const{translation:t}=e.detail,i=d(ve(pe(o),t));if(ne.includes(16)){const e=Re(o,i),t=ye(o,i),r=Math.PI/4,n=r*Math.round(t/r);i.x=o.x+e*Math.cos(n),i.y=o.y+e*Math.sin(n)}const r=It(i);oo({x2:l?No(r.x,Ve.width):r.x,y2:l?No(r.y,Ve.height):r.y,opacity:1},h)},release:e=>e.detail.preventInertia(),cancel:e=>{eo(h)},end:e=>{const t=Jt(h);if(e.detail.isTap)return eo(h);t.opacity=1;const o=to(h);lt(o),Hi(t)&&Vo(o)}}:void 0},()=>{let e,t;const o=Bt*Bt,i=(e,t,i=!1)=>{const r=Me(e,t);if(!i&&r<2)return!1;const n=oe.filter((e=>!e.disableErase));let a;a=r{e=ue(Math.round(o.detail.origin.x),Math.round(o.detail.origin.y)),i(e,e,!0),t=e},update:o=>{const{translation:r}=o.detail,n=ue(Math.round(e.x+r.x),Math.round(e.y+r.y));i(t,n)&&(t=pe(n))},release:e=>e.detail.preventInertia(),end:()=>{}}},So,ko,e=>{if(!So())return _i(e),io(e)},Co,To,(e={})=>({id:L(),...e}),Mo,Ro,Po,Eo,(e,t,o=!0)=>{oe.forEach((o=>Eo(o,e,t,!1))),o&&Mo()},Io,Lo,Fo,Do,Oo,Wo,jo,Uo,Go,Zo,Xo,Yo,Ko,Jo,uo,ho,oi,li,xi,Ir,d,U,r,V,H,N,W,j,_,Z,Q,X,K,q,Y,P,s,E,F,I,T,C,i,w,S,k,f,x,u,n,h,oe,re,ne,ae,function(t){Qn.call(this,e,t)},e=>Vo(Ce[e]),function(e){ta[e?"unshift":"push"]((()=>{or=e,o(8,or)}))},function(){z=this.value,o(23,z),o(11,M),o(146,r),o(164,T),o(0,Se),o(175,oe)},function(e){ta[e?"unshift":"push"]((()=>{or=e,o(8,or)}))},()=>{Lr&&Lr.focus()},e=>o(9,Tr=e.detail),function(e){ta[e?"unshift":"push"]((()=>{Lr=e,o(19,Lr)}))},e=>fy(e,Ne)]}class Vy extends Fa{constructor(e){super(),za(this,e,_y,Dy,Qr,{uid:57,ui:58,disabled:0,shapes:1,selection:59,offset:2,contextRotation:60,contextFlipX:61,contextFlipY:62,contextZoom:63,active:64,opacity:65,parentRect:66,rootRect:3,utilRect:67,hoverColor:68,caretColor:69,gridColor:70,snapColor:71,textInputMode:4,oninteractionstart:72,oninteractionupdate:73,oninteractionrelease:74,oninteractionend:75,oninteractioncancel:76,onaddshape:77,onupdateshape:78,onselectshape:79,onblurshape:80,onremoveshape:81,ontapshape:82,onhovershape:83,onhovercanvas:84,ontapcanvas:85,onleavecanvas:86,beforeSelectShape:87,beforeDeselectShape:88,beforeRemoveShape:89,beforeUpdateShape:90,willRenderShapeControls:91,willRenderShapeTextControls:92,willStartInteraction:93,mapEditorPointToImagePoint:94,mapImagePointToEditorPoint:95,eraseRadius:96,selectRadius:97,enableButtonFlipVertical:98,enableTapToAddText:99,enableTextStyleControls:5,locale:6,snapThreshold:100,snapPointer:101,enableSnapToContext:102,gridSize:103,syncShapeCollection:104,getShapeDraft:105,addShapeDraft:106,discardShapeDraft:107,confirmShapeDraft:108,updateShapeDraft:109,addShape:110,createShape:111,eraseShape:112,getMarkupItemDraft:113,getMarkupItemDraftIndex:114,addMarkupItemDraft:115,confirmMarkupItemDraft:116,discardMarkupItemDraft:117,createMarkupItem:118,syncShapes:119,removeMarkupShapeProps:120,updateMarkupShape:121,updateMarkupShapeProperty:122,updateMarkupItemsShapeProperty:123,updateMarkupShapeItems:124,getActiveMarkupItem:125,hasActiveMarkupItem:126,removeShape:127,removeActiveMarkupItem:128,blurShapes:129,selectShape:7,deselectMarkupItem:130,editMarkupItem:131,finishEditMarkupItem:132,removeMarkupItems:133,getTextShapeRect:134,getMarkupShapeRect:135,getShapesNearPosition:136,getShapesBetweenPoints:137},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}get syncShapeCollection(){return this.$$.ctx[104]}get getShapeDraft(){return this.$$.ctx[105]}get addShapeDraft(){return this.$$.ctx[106]}get discardShapeDraft(){return this.$$.ctx[107]}get confirmShapeDraft(){return this.$$.ctx[108]}get updateShapeDraft(){return this.$$.ctx[109]}get addShape(){return this.$$.ctx[110]}get createShape(){return this.$$.ctx[111]}get eraseShape(){return this.$$.ctx[112]}get getMarkupItemDraft(){return this.$$.ctx[113]}get getMarkupItemDraftIndex(){return this.$$.ctx[114]}get addMarkupItemDraft(){return this.$$.ctx[115]}get confirmMarkupItemDraft(){return this.$$.ctx[116]}get discardMarkupItemDraft(){return this.$$.ctx[117]}get createMarkupItem(){return this.$$.ctx[118]}get syncShapes(){return this.$$.ctx[119]}get removeMarkupShapeProps(){return this.$$.ctx[120]}get updateMarkupShape(){return this.$$.ctx[121]}get updateMarkupShapeProperty(){return this.$$.ctx[122]}get updateMarkupItemsShapeProperty(){return this.$$.ctx[123]}get updateMarkupShapeItems(){return this.$$.ctx[124]}get getActiveMarkupItem(){return this.$$.ctx[125]}get hasActiveMarkupItem(){return this.$$.ctx[126]}get removeShape(){return this.$$.ctx[127]}get removeActiveMarkupItem(){return this.$$.ctx[128]}get blurShapes(){return this.$$.ctx[129]}get selectShape(){return this.$$.ctx[7]}get deselectMarkupItem(){return this.$$.ctx[130]}get editMarkupItem(){return this.$$.ctx[131]}get finishEditMarkupItem(){return this.$$.ctx[132]}get removeMarkupItems(){return this.$$.ctx[133]}get getTextShapeRect(){return this.$$.ctx[134]}get getMarkupShapeRect(){return this.$$.ctx[135]}get getShapesNearPosition(){return this.$$.ctx[136]}get getShapesBetweenPoints(){return this.$$.ctx[137]}}function Ny(e){let t,o,i;return o=new up({props:{items:e[2]}}),{c(){t=kn("ul"),Ia(o.$$.fragment),An(t,"class","PinturaShapeStyleList")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};4&t&&(i.items=e[2]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Hy(e){let t,o;return t=new vd({props:{class:"PinturaShapeStyles",elasticity:e[0],$$slots:{default:[jy]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1&o&&(i.elasticity=e[0]),131076&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function jy(e){let t,o,i;return o=new up({props:{items:e[2]}}),{c(){t=kn("ul"),Ia(o.$$.fragment),An(t,"class","PinturaShapeStyleList")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};4&t&&(i.items=e[2]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Uy(e){let t,o,i,r;const n=[Hy,Ny],a=[];function s(e,t){return e[1]?0:1}return o=s(e),i=a[o]=n[o](e),{c(){t=kn("div"),i.c(),An(t,"style",e[3])},m(e,i){wn(e,t,i),a[o].m(t,null),r=!0},p(e,[l]){let c=o;o=s(e),o===c?a[o].p(e,l):(ya(),va(a[c],1,1,(()=>{a[c]=null})),ba(),i=a[o],i?i.p(e,l):(i=a[o]=n[o](e),i.c()),xa(i,1),i.m(t,null)),(!r||8&l)&&An(t,"style",e[3])},i(e){r||(xa(i),r=!0)},o(e){va(i),r=!1},d(e){e&&Sn(t),a[o].d()}}}function Gy(e,t,o){let i,r,n,a,s,l,{isActive:c=!1}=t,{controls:d=[]}=t,{locale:u}=t,{scrollElasticity:h}=t,{scrollEnable:p=!0}=t,{hideTitles:m=!1}=t,{willRenderControls:g=G}=t;const $=Jn("redrawTrigger");on(e,$,(e=>o(14,a=e)));const f=Jn("env");on(e,f,(e=>o(13,n=e)));const y=Jn("isAnimated");on(e,y,(e=>o(16,l=e)));const b=ec(0,{stiffness:.25,damping:.9});return on(e,b,(e=>o(15,s=e))),e.$$set=e=>{"isActive"in e&&o(8,c=e.isActive),"controls"in e&&o(9,d=e.controls),"locale"in e&&o(10,u=e.locale),"scrollElasticity"in e&&o(0,h=e.scrollElasticity),"scrollEnable"in e&&o(1,p=e.scrollEnable),"hideTitles"in e&&o(11,m=e.hideTitles),"willRenderControls"in e&&o(12,g=e.willRenderControls)},e.$$.update=()=>{65792&e.$$.dirty&&b.set(c?1:0,{hard:!1===l}),33024&e.$$.dirty&&o(3,i=`opacity:${s};${c?"":"pointer-events:none;"}${s<=0?"visibility:hidden":""}`),32256&e.$$.dirty&&o(2,r=a&&g(d.map((e=>["ShapeStyle",e.id,{title:e.componentProps.title,locale:u,hideTitle:m,items:[[e.component,e.id,e.componentProps]]}])),n,(()=>$.set({}))))},[h,p,r,i,$,f,y,b,c,d,u,m,g,n,a,s,l]}class Zy extends Fa{constructor(e){super(),za(this,e,Gy,Uy,Qr,{isActive:8,controls:9,locale:10,scrollElasticity:0,scrollEnable:1,hideTitles:11,willRenderControls:12})}}function Xy(e,t,o){const i=e.slice();return i[15]=t[o].key,i[6]=t[o].controls,i[16]=t[o].isActive,i}function Yy(e,t){let o,i,r;return i=new Zy({props:{isActive:t[16],controls:t[6],locale:t[1],scrollElasticity:t[2],scrollEnable:t[3],hideTitles:t[4],willRenderControls:t[5]}}),{key:e,first:null,c(){o=Rn(),Ia(i.$$.fragment),this.first=o},m(e,t){wn(e,o,t),Aa(i,e,t),r=!0},p(e,o){t=e;const r={};128&o&&(r.isActive=t[16]),128&o&&(r.controls=t[6]),2&o&&(r.locale=t[1]),4&o&&(r.scrollElasticity=t[2]),8&o&&(r.scrollEnable=t[3]),16&o&&(r.hideTitles=t[4]),32&o&&(r.willRenderControls=t[5]),i.$set(r)},i(e){r||(xa(i.$$.fragment,e),r=!0)},o(e){va(i.$$.fragment,e),r=!1},d(e){e&&Sn(o),La(i,e)}}}function qy(e){let t,o,i,r=[],n=new Map,a=e[7];const s=e=>e[15];for(let t=0;t{"class"in e&&o(0,a=e.class),"controls"in e&&o(6,s=e.controls),"shape"in e&&o(8,l=e.shape),"onchange"in e&&o(9,c=e.onchange),"locale"in e&&o(1,d=e.locale),"scrollElasticity"in e&&o(2,u=e.scrollElasticity),"scrollEnable"in e&&o(3,h=e.scrollEnable),"hideTitles"in e&&o(4,p=e.hideTitles),"willRenderControls"in e&&o(5,m=e.willRenderControls)},e.$$.update=()=>{64&e.$$.dirty&&o(11,i=Object.keys(s).filter((e=>s[e]))),2304&e.$$.dirty&&o(10,r=l&&Object.keys(l).length&&i&&Ni(l)?(e=>i.filter((t=>t.split("_").every((t=>zo(e,t)&&Ni(e,t))))).map((t=>{const o=(e.settings&&e.settings[t]||{}).control||t,i=t.split("_"),r=i.length>1?i.map((t=>e[t])):e[t];if(P(s[o])){const{title:i,component:n}=s[o](r,(e=>{c({[t]:e})}),{selectedShapeId:e.id});return{id:o,component:up,componentProps:{title:i,items:n}}}let[n,a]=s[o];if(R(n)&&s[n]){const e={...a};[n,a]=s[n],a={...a,...e}}const l=P(a.options)?a.options(e):a.options;return{id:o,component:n,componentProps:{...a,options:l,locale:d,value:r,optionLabelClass:"PinturaButtonLabel",onchange:o=>{const r=C(o)&&!Fo(o)?o.value:o;a.onchange&&a.onchange(r,e);const n=i.length>1?i.reduce(((e,t,o)=>({...e,[t]:Array.isArray(r)?r[o]:r})),{}):{[t]:r};c(n)}}}})).filter(Boolean))(l):[]),1280&e.$$.dirty&&o(7,n=((e,t)=>{let o=g.find((t=>t.key===e));return o||(o={key:e,controls:t},g.push(o)),g.forEach((e=>e.isActive=!1)),o.controls=t,o.isActive=!0,g})(l&&Object.keys(l).length?Object.keys(l).join("_"):"none",r||[]))},[a,d,u,h,p,m,s,n,l,c,r,i]}class Jy extends Fa{constructor(e){super(),za(this,e,Ky,qy,Qr,{class:0,controls:6,shape:8,onchange:9,locale:1,scrollElasticity:2,scrollEnable:3,hideTitles:4,willRenderControls:5})}}var Qy=e=>/{a[l]=null})),ba(),o=a[t],o?o.p(e,r):(o=a[t]=n[t](e),o.c()),xa(o,1),o.m(i.parentNode,i))},i(e){r||(xa(o),r=!0)},o(e){va(o),r=!1},d(e){a[t].d(e),e&&Sn(i)}}}function ob(e){let t,o,i,r,n=e[10]&&rb(e);return i=new vd({props:{scrollAutoCancel:e[9],elasticity:e[0],$$slots:{default:[nb]},$$scope:{ctx:e}}}),{c(){t=kn("div"),n&&n.c(),o=Mn(),Ia(i.$$.fragment),An(t,"class","PinturaShapePresetsFlat")},m(e,a){wn(e,t,a),n&&n.m(t,null),bn(t,o),Aa(i,t,null),r=!0},p(e,r){e[10]?n?(n.p(e,r),1024&r&&xa(n,1)):(n=rb(e),n.c(),xa(n,1),n.m(t,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba());const a={};512&r&&(a.scrollAutoCancel=e[9]),1&r&&(a.elasticity=e[0]),536871070&r&&(a.$$scope={dirty:r,ctx:e}),i.$set(a)},i(e){r||(xa(n),xa(i.$$.fragment,e),r=!0)},o(e){va(n),va(i.$$.fragment,e),r=!1},d(e){e&&Sn(t),n&&n.d(),La(i)}}}function ib(e){let t,o,i,r,n;o=new vd({props:{elasticity:e[0],class:"PinturaShapePresetsGroups",$$slots:{default:[ub]},$$scope:{ctx:e}}});const a=[{class:"PinturaControlPanels"},{panelClass:"PinturaControlPanel"},{panels:e[11]},e[12]];let s={$$slots:{default:[pb,({panel:e,panelIsActive:t})=>({26:e,27:t}),({panel:e,panelIsActive:t})=>(e?67108864:0)|(t?134217728:0)]},$$scope:{ctx:e}};for(let e=0;e{r=null})),ba()),e[28].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=cb(e),n.c(),n.m(o.parentNode,o))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function ub(e){let t,o,i,r=e[10]&&ab(e);const n=[{class:"PinturaControlList"},{tabs:e[5]},e[12],{layout:"compact"}];let a={$$slots:{default:[db,({tab:e})=>({28:e}),({tab:e})=>e?268435456:0]},$$scope:{ctx:e}};for(let e=0;e{r=null})),ba());const a=4128&i?Ra(n,[n[0],32&i&&{tabs:e[5]},4096&i&&Pa(e[12]),n[3]]):{};805306368&i&&(a.$$scope={dirty:i,ctx:e}),o.$set(a)},i(e){i||(xa(r),xa(o.$$.fragment,e),i=!0)},o(e){va(r),va(o.$$.fragment,e),i=!1},d(e){r&&r.d(e),e&&Sn(t),La(o,e)}}}function hb(e){let t,o;return t=new _d({props:{items:e[13][e[26]].items,disabled:e[13][e[26]].disabled,onclickitem:e[1],ongrabitem:e[2],ondragitem:e[3],ondropitem:e[4]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};67117056&o&&(i.items=e[13][e[26]].items),67117056&o&&(i.disabled=e[13][e[26]].disabled),2&o&&(i.onclickitem=e[1]),4&o&&(i.ongrabitem=e[2]),8&o&&(i.ondragitem=e[3]),16&o&&(i.ondropitem=e[4]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function pb(e){let t,o;return t=new vd({props:{scroll:e[27]?{scrollOffset:0,animate:!1}:void 0,scrollAutoCancel:e[9],elasticity:e[0],$$slots:{default:[hb]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};134217728&o&&(i.scroll=e[27]?{scrollOffset:0,animate:!1}:void 0),512&o&&(i.scrollAutoCancel=e[9]),1&o&&(i.elasticity=e[0]),603987998&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function mb(e){let t,o,i,r;const n=[tb,eb],a=[];function s(e,t){return e[9]?0:e[10]?1:-1}return~(o=s(e))&&(i=a[o]=n[o](e)),{c(){t=kn("div"),i&&i.c(),An(t,"class","PinturaShapePresetsPalette")},m(e,i){wn(e,t,i),~o&&a[o].m(t,null),r=!0},p(e,[r]){let l=o;o=s(e),o===l?~o&&a[o].p(e,r):(i&&(ya(),va(a[l],1,1,(()=>{a[l]=null})),ba()),~o?(i=a[o],i?i.p(e,r):(i=a[o]=n[o](e),i.c()),xa(i,1),i.m(t,null)):i=null)},i(e){r||(xa(i),r=!0)},o(e){va(i),r=!1},d(e){e&&Sn(t),~o&&a[o].d()}}}function gb(e,t,o){let i,r,n,s,l,c,d,u,h,{locale:p}=t,{presets:m}=t,{scrollElasticity:g}=t,{enableSelectImage:$=!0}=t,{willRenderPresetToolbar:f=G}=t,{onaddpreset:y=a}=t,{ongrabpreset:b}=t,{ondragpreset:x}=t,{ondroppreset:v}=t;const w="presets-"+L(),S=(e,t="")=>Qy(e)?e:Lo(e)?_o(e,t):`${t}`,k=e=>V(Nt(e)),C=["src","alt","thumb","shape","id","mount","disabled"],T=e=>e.map((e=>(e=>Fo(e)&&R(e[0])&&Fo(e[1]))(e)?{...e[2],id:`${w}-${e[0].toLowerCase()}`,label:e[0],items:T(e[1])}:(e=>{let t,o,i,r,n,a,s,l=e;return R(e)?Lo(e)?(t=e,n=e,r=S(t,n)):(t=e,n=k(t),r=S(t,n)):(t=e.src,n=e.alt||(R(t)?k(t):R(e.thumb)?k(e.thumb):void 0),r=S(e.thumb||t,n),o=e.shape,a=e.mount,s=e.disabled,i=Object.keys(e).reduce(((t,o)=>(C.includes(o)||(t[o]=e[o]),t)),{})),{id:l,src:t,thumb:r,shape:o,shapeProps:i,alt:n,title:n,mount:a,disabled:s}})(e)));return e.$$set=e=>{"locale"in e&&o(14,p=e.locale),"presets"in e&&o(15,m=e.presets),"scrollElasticity"in e&&o(0,g=e.scrollElasticity),"enableSelectImage"in e&&o(16,$=e.enableSelectImage),"willRenderPresetToolbar"in e&&o(17,f=e.willRenderPresetToolbar),"onaddpreset"in e&&o(1,y=e.onaddpreset),"ongrabpreset"in e&&o(2,b=e.ongrabpreset),"ondragpreset"in e&&o(3,x=e.ondragpreset),"ondroppreset"in e&&o(4,v=e.ondroppreset)},e.$$.update=()=>{32768&e.$$.dirty&&o(7,i=T(m)),128&e.$$.dirty&&o(9,r=i.length),640&e.$$.dirty&&o(8,n=r&&i.some((e=>!!e.items))),384&e.$$.dirty&&o(5,s=n&&i),384&e.$$.dirty&&o(13,l=n&&i.reduce(((e,t)=>(e[t.id]=t,e)),{})),96&e.$$.dirty&&o(6,c=c||s&&(s.find((e=>!e.disabled))||{}).id),64&e.$$.dirty&&o(12,d={name:w,selected:c}),32&e.$$.dirty&&o(11,u=s&&s.map((e=>e.id))),212994&e.$$.dirty&&o(10,h=p&&f([$&&["Button","browse",{label:p.shapeLabelButtonSelectSticker,icon:p.shapeIconButtonSelectSticker,onclick:()=>{zp().then((e=>{e&&y(e)}))}}]]))},[g,y,b,x,v,s,c,i,n,r,h,u,d,l,p,m,$,f,({detail:e})=>o(6,c=e)]}class $b extends Fa{constructor(e){super(),za(this,e,gb,mb,Qr,{locale:14,presets:15,scrollElasticity:0,enableSelectImage:16,willRenderPresetToolbar:17,onaddpreset:1,ongrabpreset:2,ondragpreset:3,ondroppreset:4})}}function fb(e){let t,o,i,r;return t=new up({props:{items:e[29]}}),i=new Jy({props:{locale:e[4],shape:e[31]||e[49],onchange:e[86],controls:e[9],scrollEnable:!1,hideTitles:!0,willRenderControls:e[163]}}),{c(){Ia(t.$$.fragment),o=Mn(),Ia(i.$$.fragment)},m(e,n){Aa(t,e,n),wn(e,o,n),Aa(i,e,n),r=!0},p(e,o){const r={};536870912&o[0]&&(r.items=e[29]),t.$set(r);const n={};16&o[0]&&(n.locale=e[4]),262145&o[1]&&(n.shape=e[31]||e[49]),512&o[0]&&(n.controls=e[9]),i.$set(n)},i(e){r||(xa(t.$$.fragment,e),xa(i.$$.fragment,e),r=!0)},o(e){va(t.$$.fragment,e),va(i.$$.fragment,e),r=!1},d(e){La(t,e),e&&Sn(o),La(i,e)}}}function yb(e){let t,o,i;return o=new B$({props:{$$slots:{default:[fb]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"slot","header")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};536871440&t[0]|262145&t[1]|262144&t[6]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function bb(e){let t,o;const i=[{locale:e[4]},{ui:e[69]},{shapes:e[5]},{selection:e[58]},{uid:e[19]},{parentRect:e[37]},{rootRect:e[55]},{utilRect:e[39]},{offset:e[50]},{disabled:e[38]},{contextRotation:e[22]},{contextFlipX:e[23]},{contextFlipY:e[24]},{contextZoom:e[36].scale},{active:e[35]},{opacity:e[56]},{hoverColor:e[57]},{caretColor:e[57]},{gridColor:[1,1,1,.125]},{snapColor:e[57]},{eraseRadius:e[47]},{selectRadius:e[6]},{enableButtonFlipVertical:e[10]},{mapEditorPointToImagePoint:e[20]},{mapImagePointToEditorPoint:e[21]},{enableTapToAddText:e[13]},{textInputMode:e[8]},{snapThreshold:e[15]},{snapPointer:!e[48]},{enableSnapToContext:e[16]},{gridSize:e[14]},{willStartInteraction:e[96]},{oninteractionstart:e[80]},{oninteractionupdate:e[81]},{oninteractionrelease:e[82]},{oninteractionend:e[84]},{oninteractioncancel:e[83]},{onleavecanvas:e[88]},{onhovercanvas:e[87]},{onhovershape:e[90]},{ontapcanvas:e[89]},{onaddshape:e[155]},{onselectshape:e[156]},{onblurshape:e[157]},{ontapshape:e[158]},{onupdateshape:e[159]},{onremoveshape:e[160]},e[42]];let r={};for(let e=0;e{s=null})),ba()),(!i||32768&n[1]&&o!==(o="cursor:"+e[46]))&&An(t,"style",o)},i(e){i||(xa(s),i=!0)},o(e){va(s),i=!1},d(o){o&&Sn(t),s&&s.d(),e[162](null),r=!1,Kr(n)}}}function vb(e){let t,o;return t=new $b({props:{locale:e[4],presets:e[18],enableSelectImage:e[11],willRenderPresetToolbar:e[43],onaddpreset:e[94],ongrabpreset:e[91],ondragpreset:e[92],ondroppreset:e[93],scrollElasticity:e[44]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),262144&o[0]&&(i.presets=e[18]),2048&o[0]&&(i.enableSelectImage=e[11]),4096&o[1]&&(i.willRenderPresetToolbar=e[43]),8192&o[1]&&(i.scrollElasticity=e[44]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function wb(e){let t,o,i,r="stack"===e[7]&&Sb(e),n=(e[53]&&e[34]||"row"===e[7])&&Tb(e);return{c(){r&&r.c(),t=Mn(),n&&n.c(),o=Rn()},m(e,a){r&&r.m(e,a),wn(e,t,a),n&&n.m(e,a),wn(e,o,a),i=!0},p(e,i){"stack"===e[7]?r?(r.p(e,i),128&i[0]&&xa(r,1)):(r=Sb(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[53]&&e[34]||"row"===e[7]?n?(n.p(e,i),128&i[0]|4194312&i[1]&&xa(n,1)):(n=Tb(e),n.c(),xa(n,1),n.m(o.parentNode,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function Sb(e){let t,o,i,r;const n=[Cb,kb],a=[];function s(e,t){return e[45]?0:1}return o=s(e),i=a[o]=n[o](e),{c(){t=kn("div"),i.c(),An(t,"class","PinturaControlPanels")},m(e,i){wn(e,t,i),a[o].m(t,null),r=!0},p(e,r){let l=o;o=s(e),o===l?a[o].p(e,r):(ya(),va(a[l],1,1,(()=>{a[l]=null})),ba(),i=a[o],i?i.p(e,r):(i=a[o]=n[o](e),i.c()),xa(i,1),i.m(t,null))},i(e){r||(xa(i),r=!0)},o(e){va(i),r=!1},d(e){e&&Sn(t),a[o].d()}}}function kb(e){let t,o,i;return o=new Jy({props:{locale:e[4],shape:e[31]||e[49],onchange:e[86],controls:e[9],scrollElasticity:e[44],willRenderControls:e[17]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaControlPanel")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};16&t[0]&&(i.locale=e[4]),262145&t[1]&&(i.shape=e[31]||e[49]),512&t[0]&&(i.controls=e[9]),8192&t[1]&&(i.scrollElasticity=e[44]),131072&t[0]&&(i.willRenderControls=e[17]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Cb(e){let t,o,i;return o=new $b({props:{locale:e[4],presets:e[18],enableSelectImage:e[11],willRenderPresetToolbar:e[43],onaddpreset:e[94],ongrabpreset:e[91],ondragpreset:e[92],ondroppreset:e[93],scrollElasticity:e[44]}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"class","PinturaControlPanel")},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,t){const i={};16&t[0]&&(i.locale=e[4]),262144&t[0]&&(i.presets=e[18]),2048&t[0]&&(i.enableSelectImage=e[11]),4096&t[1]&&(i.willRenderPresetToolbar=e[43]),8192&t[1]&&(i.scrollElasticity=e[44]),o.$set(i)},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Tb(e){let t,o;return t=new vd({props:{class:"PinturaControlListScroller",elasticity:e[44],$$slots:{default:[Lb]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8192&o[1]&&(i.elasticity=e[44]),131729&o[0]|262155&o[1]|262144&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Mb(e){let t,o;return t=new Wu({props:{locale:e[4],class:"PinturaControlList",optionClass:"PinturaControlListOption",layout:"row",options:e[32],selectedIndex:e[32].findIndex(e[152]),onchange:e[79],$$slots:{option:[Ib,({option:e})=>({203:e}),({option:e})=>[0,0,0,0,0,0,e?131072:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),2&o[1]&&(i.options=e[32]),1&o[0]|2&o[1]&&(i.selectedIndex=e[32].findIndex(e[152])),16&o[0]|393216&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Rb(e){let t,o;return t=new td({props:{$$slots:{default:[Pb]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]|393216&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Pb(e){let t,o=(P(e[203].icon)?e[203].icon(e[4]):e[203].icon)+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){16&i[0]|131072&i[6]&&o!==(o=(P(e[203].icon)?e[203].icon(e[4]):e[203].icon)+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function Eb(e){let t,o,i=(P(e[203].label)?e[203].label(e[4]):e[203].label)+"";return{c(){t=kn("span"),o=Tn(i)},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){16&t[0]|131072&t[6]&&i!==(i=(P(e[203].label)?e[203].label(e[4]):e[203].label)+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Ib(e){let t,o,i,r=e[203].icon&&Rb(e),n=!e[203].hideLabel&&Eb(e);return{c(){t=kn("div"),r&&r.c(),o=Mn(),n&&n.c(),An(t,"slot","option")},m(e,a){wn(e,t,a),r&&r.m(t,null),bn(t,o),n&&n.m(t,null),i=!0},p(e,i){e[203].icon?r?(r.p(e,i),131072&i[6]&&xa(r,1)):(r=Rb(e),r.c(),xa(r,1),r.m(t,o)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),e[203].hideLabel?n&&(n.d(1),n=null):n?n.p(e,i):(n=Eb(e),n.c(),n.m(t,null))},i(e){i||(xa(r),i=!0)},o(e){va(r),i=!1},d(e){e&&Sn(t),r&&r.d(),n&&n.d()}}}function Ab(e){let t,o;return t=new Jy({props:{locale:e[4],shape:e[31]||e[49],onchange:e[86],controls:e[9],scrollEnable:!1,hideTitles:!0,willRenderControls:e[153]}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),262145&o[1]&&(i.shape=e[31]||e[49]),512&o[0]&&(i.controls=e[9]),131072&o[0]&&(i.willRenderControls=e[153]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Lb(e){let t,o,i,r=e[34]&&Mb(e),n="row"===e[7]&&Ab(e);return{c(){r&&r.c(),t=Mn(),n&&n.c(),o=Rn()},m(e,a){r&&r.m(e,a),wn(e,t,a),n&&n.m(e,a),wn(e,o,a),i=!0},p(e,i){e[34]?r?(r.p(e,i),8&i[1]&&xa(r,1)):(r=Mb(e),r.c(),xa(r,1),r.m(t.parentNode,t)):r&&(ya(),va(r,1,1,(()=>{r=null})),ba()),"row"===e[7]?n?(n.p(e,i),128&i[0]&&xa(n,1)):(n=Ab(e),n.c(),xa(n,1),n.m(o.parentNode,o)):n&&(ya(),va(n,1,1,(()=>{n=null})),ba())},i(e){i||(xa(r),xa(n),i=!0)},o(e){va(r),va(n),i=!1},d(e){r&&r.d(e),e&&Sn(t),n&&n.d(e),e&&Sn(o)}}}function zb(e){let t,o;return t=new vd({props:{class:"PinturaControlListScroller",elasticity:e[44],$$slots:{default:[Bb]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8192&o[1]&&(i.elasticity=e[44]),67108880&o[0]|8388608&o[1]|262144&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Fb(e){let t,o;return t=new td({props:{$$slots:{default:[Db]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]|393216&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Db(e){let t,o=(P(e[203].icon)?e[203].icon(e[4]):e[203].icon)+"";return{c(){t=Cn("g")},m(e,i){wn(e,t,i),t.innerHTML=o},p(e,i){16&i[0]|131072&i[6]&&o!==(o=(P(e[203].icon)?e[203].icon(e[4]):e[203].icon)+"")&&(t.innerHTML=o)},d(e){e&&Sn(t)}}}function Ob(e){let t,o,i,r,n,a=(P(e[203].label)?e[203].label(e[4]):e[203].label)+"",s=e[203].icon&&Fb(e);return{c(){t=kn("div"),s&&s.c(),o=Mn(),i=kn("span"),r=Tn(a),An(t,"slot","option")},m(e,a){wn(e,t,a),s&&s.m(t,null),bn(t,o),bn(t,i),bn(i,r),n=!0},p(e,i){e[203].icon?s?(s.p(e,i),131072&i[6]&&xa(s,1)):(s=Fb(e),s.c(),xa(s,1),s.m(t,o)):s&&(ya(),va(s,1,1,(()=>{s=null})),ba()),(!n||16&i[0]|131072&i[6])&&a!==(a=(P(e[203].label)?e[203].label(e[4]):e[203].label)+"")&&Fn(r,a)},i(e){n||(xa(s),n=!0)},o(e){va(s),n=!1},d(e){e&&Sn(t),s&&s.d()}}}function Bb(e){let t,o;return t=new Wu({props:{locale:e[4],class:"PinturaControlList",optionClass:"PinturaControlListOption",layout:"row",options:e[54],selectedIndex:e[54].findIndex(e[154]),onchange:e[78],$$slots:{option:[Ob,({option:e})=>({203:e}),({option:e})=>[0,0,0,0,0,0,e?131072:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),8388608&o[1]&&(i.options=e[54]),67108864&o[0]|8388608&o[1]&&(i.selectedIndex=e[54].findIndex(e[154])),16&o[0]|393216&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Wb(e){let t,o,i,r,n;const a=[wb,vb],s=[];function l(e,t){return e[52]?0:e[45]?1:-1}~(o=l(e))&&(i=s[o]=a[o](e));let c=e[33]&&zb(e);return{c(){t=kn("div"),i&&i.c(),r=Mn(),c&&c.c(),An(t,"slot","footer"),An(t,"style",e[40])},m(e,i){wn(e,t,i),~o&&s[o].m(t,null),bn(t,r),c&&c.m(t,null),n=!0},p(e,d){let u=o;o=l(e),o===u?~o&&s[o].p(e,d):(i&&(ya(),va(s[u],1,1,(()=>{s[u]=null})),ba()),~o?(i=s[o],i?i.p(e,d):(i=s[o]=a[o](e),i.c()),xa(i,1),i.m(t,r)):i=null),e[33]?c?(c.p(e,d),4&d[1]&&xa(c,1)):(c=zb(e),c.c(),xa(c,1),c.m(t,null)):c&&(ya(),va(c,1,1,(()=>{c=null})),ba()),(!n||512&d[1])&&An(t,"style",e[40])},i(e){n||(xa(i),xa(c),n=!0)},o(e){va(i),va(c),n=!1},d(e){e&&Sn(t),~o&&s[o].d(),c&&c.d()}}}function _b(e){let t,o;return t=new J$({props:{hasHeader:e[41],$$slots:{footer:[Wb],main:[xb],header:[yb]},$$scope:{ctx:e}}}),t.$on("measure",e[164]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};1024&o[1]&&(i.hasHeader=e[41]),2113929201&o[0]|134216703&o[1]|262144&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Vb(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,P,E,I,A,L,z,F,D,O,B,W,_,V,N,H,j,U,Z,X,Y,q,K,J,Q,ee,te,oe,ie,re,ne,ae,se,le,ce,de,he,pe,me,ge,$e,fe,ye=Gr,be=()=>(ye(),ye=en(Pe,(e=>o(35,U=e))),Pe),xe=Gr,ve=()=>(xe(),xe=en(Fe,(e=>o(142,q=e))),Fe),we=Gr,Se=()=>(we(),we=en(mt,(e=>o(37,ie=e))),mt),ke=Gr,Ce=()=>(ke(),ke=en(Ae,(e=>o(149,pe=e))),Ae),Te=Gr,Me=()=>(Te(),Te=en(Ie,(e=>o(56,$e=e))),Ie);e.$$.on_destroy.push((()=>ye())),e.$$.on_destroy.push((()=>xe())),e.$$.on_destroy.push((()=>we())),e.$$.on_destroy.push((()=>ke())),e.$$.on_destroy.push((()=>Te()));let{isActive:Pe}=t;be();let{isActiveFraction:Ie}=t;Me();let{isVisible:Ae}=t;Ce();let{stores:Le}=t,{locale:ze={}}=t,{shapes:Fe}=t;ve();let{toolbar:De=[]}=t,{toolShapes:Oe={}}=t,{toolActive:Be}=t,{toolSelectRadius:We}=t,{toolRetainStyles:_e=!1}=t,{toolbarLayout:Ve="stack"}=t,{textInputMode:Ne}=t,{shapeControls:He={}}=t,{enableButtonFlipVertical:je=!1}=t,{enablePresetSelectImage:Ue=!0}=t,{enablePresetDropImage:Ge=!0}=t,{enableSelectToolToAddShape:Ze=!1}=t,{enableAutoSelectMoveTool:Xe=["line","arrow","path","rectangle","ellipse","text"]}=t,{enableTapToAddText:Ye=!1}=t,{enableMoveTool:qe=!1}=t,{enableViewTool:Ke=!1}=t,{enableToolShareStyles:Je=!0}=t,{gridSize:Qe=0}=t,{snapThreshold:et=0}=t,{enableSnapToContext:tt=!0}=t,{willRenderHeaderTools:ot=G}=t,{willRenderPresetToolbar:it}=t,{willRenderShapeStyleControls:rt}=t,{willStartInteraction:nt}=t,{shapePresets:st=[]}=t,{utilKey:lt}=t,{mapScreenPointToImagePoint:ct}=t,{mapImagePointToScreenPoint:dt}=t,{imageRotation:ut=0}=t,{imageFlipX:ht=!1}=t,{imageFlipY:pt=!1}=t,{parentRect:mt}=t;Se();let{hooks:gt={}}=t;const $t=Jn("selection");on(e,$t,(e=>o(148,ce=e)));const ft=Jn("isAnimated");on(e,ft,(e=>o(139,Z=e)));const bt=Jn("elasticityMultiplier");on(e,bt,(e=>o(143,K=e)));const xt=Jn("ui");on(e,xt,(e=>o(174,de=e)));const vt=Jn("keysPressed");let wt;on(e,vt,(e=>o(146,se=e)));const{env:St,history:kt,rootRect:Ct,rootColorSecondary:Tt,enablePanInput:Mt,enablePanInputStatus:Rt,enableZoomInput:Pt,stageRect:Et,utilRectPadded:It,scrollElasticity:At,imageOverlayMarkup:Lt,imagePreviewModifiers:zt,imageCropRect:Ft,shapePreprocessor:Dt,stageScalar:Ot,imageSelectionRect:Bt,imageTransformsInterpolated:Wt,imageSelectionPan:_t,imageSize:Vt,allowPan:Nt,allowZoom:Ht,allowZoomControls:jt,allowPlayPause:Ut}=Le;on(e,St,(e=>o(140,X=e))),on(e,Ct,(e=>o(55,ge=e))),on(e,Tt,(e=>o(57,fe=e))),on(e,Rt,(e=>o(38,ne=e))),on(e,Et,(e=>o(144,J=e))),on(e,It,(e=>o(39,he=e))),on(e,zt,(e=>o(150,me=e))),on(e,Ft,(e=>o(173,re=e))),on(e,Dt,(e=>o(147,le=e))),on(e,Ot,(e=>o(171,te=e))),on(e,Bt,(e=>o(172,oe=e))),on(e,Wt,(e=>o(36,Q=e))),on(e,_t,(e=>o(170,ee=e))),on(e,Vt,(e=>o(145,ae=e)));let Gt=0,Zt={};const Xt=e=>{const[t,o]=wt[e];let i,r,n="relative"===o.position;const a=n?"0%":0,s=n?"0%":0;Mi(t)||ki(t)?(r=n?"20%":.2*ie.width,i=fi(t),i.x=a,i.y=s,fr(i,{width:r,height:r},ie)):Ri(t)?(r=n?"10%":.1*ie.width,i=fi(t),i.x=a,i.y=s,fr(i,{rx:r,ry:r},ie)):Pi(t)&&(r=n?"10%":.1*ie.width,i=fi(t),i.x1=a,i.y1=s,i.x2=a,i.y2=s),i&&Promise.resolve().then((()=>{lo(ao(i,void 0,r))}))},Yt=e=>ct(fy(e,ge));let qt,Kt,Jt={};let Qt;const eo=e=>{if(!(Ei(e)&&zo(e,"pathClose")))return;const t=[...e.strokeColor];t[3]=1,qt.updateMarkupShape(e,{pathClose:!1,strokeColor:t},!1),qt.removeMarkupShapeProps(e,["backgroundColor"],!1),qt.confirmMarkupItemDraft(),qt.selectShape(e)};let to;const oo=(e,t)=>{if(Ao(e))return e;if(e.endsWith("%")){return parseFloat(e)/100*t.width}};let io=void 0,ro=void 0,no=void 0;const ao=(e,t,o)=>{let i=!1;t||(i=!0,t=D?ct(at(J)):at(re)),t.x-=ie.x||0,t.y-=ie.y||0,(ht||pt)&&(e.flipX=ht,e.flipY=pt);const r=qt.getShapesNearPosition(q,t);if(i&&r.length){const e=.1*Math.min(re.width,re.height);t.x+=Math.round(-e+Math.random()*e*2),t.y+=Math.round(-e+Math.random()*e*2)}if(0!==ut&&(e.rotation=ht&&pt?-ut:ht||pt?ut:-ut),zo(e,"width")&&zo(e,"height")){const{width:o,height:i}=$r(e,["width","height"],ie);fr(e,{x:t.x-.5*o,y:t.y-.5*i},ie)}else if(Ri(e))fr(e,{x:t.x,y:t.y},ie);else if(Pi(e)){const{x1:i,y1:r,x2:n,y2:a}=$r(e,["x1","y1","x2","y2"],ie),s=Re(ue(i,r),ue(n,a)),l=R(o)?ar(o,ie.width):s;fr(e,{x1:t.x-l,y1:t.y+l,x2:t.x+l,y2:t.y-l},ie)}else if(Ei(e)){const{points:o}=$r(e,["points"],ie),i=Ee(o);fr(e,{points:o.map((e=>({x:e.x+t.x-i.x,y:e.y+t.y-i.y})))},ie)}return e},so=(e,t)=>{const o=ao(vi(e,re),t);return e.shape&&(zo(e.shape,"x")&&(o.x=e.shape.x),zo(e.shape,"y")&&(o.y=e.shape.y)),lo(o)},lo=e=>{const{beforeAddShape:t=(()=>!0)}=gt;if(t(e))return qt.addShape(e),qt.selectShape(e),O("addshape",e),kt.write(),e};let co=!1;const uo=()=>{kt.write()};let ho;const po=Jn("redrawTrigger");on(e,po,(e=>o(141,Y=e)));const mo=[],go=ec(Z?20:0);on(e,go,(e=>o(138,j=e)));return e.$$set=e=>{"isActive"in e&&be(o(1,Pe=e.isActive)),"isActiveFraction"in e&&Me(o(2,Ie=e.isActiveFraction)),"isVisible"in e&&Ce(o(3,Ae=e.isVisible)),"stores"in e&&o(101,Le=e.stores),"locale"in e&&o(4,ze=e.locale),"shapes"in e&&ve(o(5,Fe=e.shapes)),"toolbar"in e&&o(102,De=e.toolbar),"toolShapes"in e&&o(103,Oe=e.toolShapes),"toolActive"in e&&o(0,Be=e.toolActive),"toolSelectRadius"in e&&o(6,We=e.toolSelectRadius),"toolRetainStyles"in e&&o(104,_e=e.toolRetainStyles),"toolbarLayout"in e&&o(7,Ve=e.toolbarLayout),"textInputMode"in e&&o(8,Ne=e.textInputMode),"shapeControls"in e&&o(9,He=e.shapeControls),"enableButtonFlipVertical"in e&&o(10,je=e.enableButtonFlipVertical),"enablePresetSelectImage"in e&&o(11,Ue=e.enablePresetSelectImage),"enablePresetDropImage"in e&&o(12,Ge=e.enablePresetDropImage),"enableSelectToolToAddShape"in e&&o(105,Ze=e.enableSelectToolToAddShape),"enableAutoSelectMoveTool"in e&&o(106,Xe=e.enableAutoSelectMoveTool),"enableTapToAddText"in e&&o(13,Ye=e.enableTapToAddText),"enableMoveTool"in e&&o(107,qe=e.enableMoveTool),"enableViewTool"in e&&o(108,Ke=e.enableViewTool),"enableToolShareStyles"in e&&o(109,Je=e.enableToolShareStyles),"gridSize"in e&&o(14,Qe=e.gridSize),"snapThreshold"in e&&o(15,et=e.snapThreshold),"enableSnapToContext"in e&&o(16,tt=e.enableSnapToContext),"willRenderHeaderTools"in e&&o(110,ot=e.willRenderHeaderTools),"willRenderPresetToolbar"in e&&o(111,it=e.willRenderPresetToolbar),"willRenderShapeStyleControls"in e&&o(17,rt=e.willRenderShapeStyleControls),"willStartInteraction"in e&&o(112,nt=e.willStartInteraction),"shapePresets"in e&&o(18,st=e.shapePresets),"utilKey"in e&&o(19,lt=e.utilKey),"mapScreenPointToImagePoint"in e&&o(20,ct=e.mapScreenPointToImagePoint),"mapImagePointToScreenPoint"in e&&o(21,dt=e.mapImagePointToScreenPoint),"imageRotation"in e&&o(22,ut=e.imageRotation),"imageFlipX"in e&&o(23,ht=e.imageFlipX),"imageFlipY"in e&&o(24,pt=e.imageFlipY),"parentRect"in e&&Se(o(25,mt=e.parentRect)),"hooks"in e&&o(113,gt=e.hooks)},e.$$.update=()=>{var t,ee,te,oe;if(4194304&e.$$.dirty[4]&&o(123,i=se.includes(18)),2098176&e.$$.dirty[3]&&(wt&&Oe===wt||o(114,wt=Oe)),16&e.$$.dirty[1]&&Nt.set(U),16&e.$$.dirty[1]&&Ht.set(U),16&e.$$.dirty[1]&&jt.set(U),512&e.$$.dirty[3]&&o(33,r=Array.isArray(De)&&De.length>1&&Array.isArray(De[0][1])),4&e.$$.dirty[1]|512&e.$$.dirty[3]&&o(54,n=r?De.map(((e,t)=>[t,e[0]])):[]),67108864&e.$$.dirty[0]|4&e.$$.dirty[1]|512&e.$$.dirty[3]&&o(137,a=r?De[Gt][1]:De),262144&e.$$.dirty[0]|311296&e.$$.dirty[3]|8192&e.$$.dirty[4]&&o(32,s=((e,{willRenderPresetToolbar:t,shapePresets:o,enableViewTool:i,enableMoveTool:n})=>{let a=0!==o.length||t?e:e.filter((e=>"preset"!==e[0]));return r&&(a=[["move",e=>e.shapeLabelToolMove,{icon:e=>e.shapeIconToolMove}],["view",e=>e.shapeLabelToolView,{icon:e=>e.shapeIconToolView}],...a]),a=n?a:a.filter((e=>"move"!==e[0])),i?a:a.filter((e=>"view"!==e[0]))})(a,{willRenderPresetToolbar:it,shapePresets:st,enableMoveTool:qe,enableViewTool:Ke})),2&e.$$.dirty[1]&&o(135,d=!!s.length),1&e.$$.dirty[0]|2&e.$$.dirty[1]|2048&e.$$.dirty[4]&&d&&void 0===Be&&o(0,Be=s[0][0]),67108865&e.$$.dirty[0]|4&e.$$.dirty[1]|4194304&e.$$.dirty[3]|8192&e.$$.dirty[4]&&r&&o(115,Zt={...Zt,[Gt]:a.map((([e])=>e)).includes(Be)?Be:Zt[Gt]||a[0][0]}),512&e.$$.dirty[0]&&o(134,l=!!Object.keys(He).length),2&e.$$.dirty[1]&&o(34,c=s.length>1),12&e.$$.dirty[1]&&o(53,u=c||r),1&e.$$.dirty[0]&&o(136,h=void 0!==Be),7168&e.$$.dirty[4]&&o(52,p=(!h||d)&&l),268435456&e.$$.dirty[0]&&o(30,O=ho&&(t=ho,(e,o)=>{t.dispatchEvent(vp(e,o))})),1073741825&e.$$.dirty[0]|16&e.$$.dirty[1]&&U&&O&&O("selectcontrol",Be),524288&e.$$.dirty[0]|16&e.$$.dirty[1]|67108864&e.$$.dirty[4]&&(U?un(zt,me[lt]={maskMarkupOpacity:.85},me):delete me[lt]),1&e.$$.dirty[0]|2097152&e.$$.dirty[3]&&o(133,m=Be&&wt[Be]?wt[Be][1]:void 0),512&e.$$.dirty[4]&&o(124,g=m&&m.isSelection?"selection":"shapes"),1073741824&e.$$.dirty[3]|1&e.$$.dirty[4]&&(e=>{if(!qt)return;const t=qt.getShapeDraft($t);t&&(e&&(Kt=t.drawMode),qt.updateShapeDraft({drawMode:e?"subtract":Kt},$t))})("selection"===g&&i),134217729&e.$$.dirty[0]&&Be&&qt){const e=qt.getMarkupItemDraft();e&&eo(e)}if(1&e.$$.dirty[0]&&Be&&qt&&"move"!==Be&&qt.blurShapes(),16&e.$$.dirty[1]|33554432&e.$$.dirty[4]&&o(51,$=pe&&U),256&e.$$.dirty[1]|1048576&e.$$.dirty[4]&&o(50,f=he&&ue(J.x-he.x,J.y-he.y)),512&e.$$.dirty[0]&&o(132,y=Object.keys(He)),16&e.$$.dirty[1]|262144&e.$$.dirty[4]&&o(120,b=U&&q.filter(Li)[0]),16&e.$$.dirty[1]|262144&e.$$.dirty[4]&&o(129,x=U&&q.find((e=>zi(e)))),16&e.$$.dirty[1]|262144&e.$$.dirty[4]&&o(49,v=U&&q.find((e=>Fi(e)))),1&e.$$.dirty[0]|16&e.$$.dirty[1]|2097152&e.$$.dirty[3]&&o(126,w=U&&wt[Be]?rr(fi({...wt[Be][0],...de[lt]?de[lt][Be]:{}})):{}),2097152&e.$$.dirty[3]&&wt&&o(116,Jt={}),1&e.$$.dirty[0]|8454144&e.$$.dirty[3]|260&e.$$.dirty[4]&&o(125,S=w&&Object.keys(w).reduce(((e,t)=>{const o="disableStyle"===t,i="settings"===t,r=!!y.find((e=>e.split("_").includes(t)));if(!o&&!i&&!r)return e;if(void 0===w[t])return e;if(!0===w.disableStyle)return e;if(w.disableStyle&&w.disableStyle.includes(t))return e;if("strokeWidth"===t&&void 0===Jt[t]&&zo(w,"points"))return e[t]=w[t],e;const{share:n=!0}=w.settings&&w.settings[t]||{},a=Je&&n?Jt:Jt[Be]||{};return e[t]=zo(a,t)?a[t]:w[t],e}),{})),e.$$.dirty[4],524289&e.$$.dirty[0]|2048&e.$$.dirty[3]|2&e.$$.dirty[4]&&(_e?((e,t,o)=>{const i=de[e],r=i?i[t]:{};xt.set({...de,[e]:{...i,[t]:{...r,...o}}})})(lt,Be,S):(ee=lt,xt.set({[ee]:{}}))),16&e.$$.dirty[1]|134217728&e.$$.dirty[3]|16777218&e.$$.dirty[4]&&o(31,k=ce&&U?b||S:void 0),1&e.$$.dirty[1]|8388608&e.$$.dirty[4]&&k&&k.lineEnd&&!le&&console.warn("Set shapePreprocessor property to draw lineStart and lineEnd styles.\nhttps://pqina.nl/pintura/docs/v8/api/exports/#createshapepreprocessor"),1&e.$$.dirty[0]|4&e.$$.dirty[4]&&o(48,C=zo(w,"eraseRadius")||zo(w,"points")&&!zo(w,"pathClose")||"move"===Be||"view"===Be),64&e.$$.dirty[1]|4&e.$$.dirty[4]&&o(47,T=w&&void 0!==w.eraseRadius?oo(w.eraseRadius,ie):void 0),16&e.$$.dirty[1]|4194304&e.$$.dirty[4]&&o(130,M=U&&se.includes(32)),1&e.$$.dirty[0]|16&e.$$.dirty[1]&&o(131,P=U&&"view"===Be),192&e.$$.dirty[4]&&o(128,E=P||M),48&e.$$.dirty[4]&&o(127,I=!!E&&(!!x||Gd(document.activeElement))),16&e.$$.dirty[1]|24&e.$$.dirty[4]&&Mt.set(!U||E&&!I),16&e.$$.dirty[1]|8&e.$$.dirty[4]&&Pt.set(!U||!I),64&e.$$.dirty[1]|6&e.$$.dirty[4]&&o(121,A=w.cursorStyle?(({cursorStyle:e,cursorSize:t},o,i)=>{let r;const n=o[t];if(void 0===n?r=oo(t,i):Ao(n)?r=n:R(n)&&(r=dr(t,o[t],i),"strokeWidth"===t&&(r*=.5)),!(r<=0||void 0===r))return{size:r,style:e}})(w,{...w,...S},ie):void 0),67108864&e.$$.dirty[3]|2097152&e.$$.dirty[4]&&o(122,L=no&&(oe=ae,(te=no).x>=0&&te.y>=0&&te.x<=oe.width&&te.y<=oe.height)),524288&e.$$.dirty[0]|160&e.$$.dirty[1]|1929379840&e.$$.dirty[3]|1&e.$$.dirty[4])if(L&&!io&&A&&!ne){const e=A.size*Q.scale,t={id:"cursor-"+lt,x:ro.x,y:ro.y,strokeWidth:.5,strokeColor:[0,0,0]};"ellipse"===A.style&&(t.rx=e,t.ry=e);const o={strokeWidth:2.5,strokeColor:[1,1,1],opacity:.75},r=[{...t,...o},t];if("selection"===g&&i){const t=e,i=ro.x+t,n=ro.y+t+4,a={id:"cursor-"+lt,strokeWidth:.75,strokeColor:[0,0,0],points:[{x:i,y:n},{x:i+4,y:n}]};r.push({...a,...o,strokeWidth:2,points:[{x:i-.5,y:n},{x:i+4.5,y:n}]},a)}(e=>{Lt.update((t=>[...t.filter((e=>e.id!=="cursor-"+lt)),...e]))})(r)}else Lt.update((e=>e.filter((e=>e.id!=="cursor-"+lt))));1&e.$$.dirty[0]|128&e.$$.dirty[1]|956301312&e.$$.dirty[3]&&o(46,z=L?((e,t,o,i,r,n)=>{if(i)return r?"grabbing":"grab";if(e&&!t)return"none";if(!t)return"move"===n?"default":"crosshair";let a=t||o;return Li(a)?zi(a)?"modal"===Ne?"default":"text":Yi(a)?"move":"default":"default"})(A,io,b,ne,false,Be):"default"),264193&e.$$.dirty[0]|262144&e.$$.dirty[3]&&o(45,F="preset"===Be&&(st.length>0||Ue||it)),64&e.$$.dirty[1]&&(D=!zo(ie,"x")&&!zo(ie,"y")),524288&e.$$.dirty[4]&&o(44,B=K*At),262144&e.$$.dirty[3]|196608&e.$$.dirty[4]&&o(43,W=Y&&it?e=>Fp((()=>it(e,so,{...X},(()=>po.set({}))))):G),1048576&e.$$.dirty[3]&&o(42,_=Object.keys(gt).reduce(((e,t)=>("beforeAddShape"===t||void 0===gt[t]||(e[t]=gt[t]),e)),{})),16&e.$$.dirty[1]&&(e=>{q&&Fe.update((t=>t.map((t=>(t._prerender=!!e&&zi(t),t)))))})(U),131072&e.$$.dirty[3]|196608&e.$$.dirty[4]&&o(29,V=Y&&ot([],X,(()=>po.set({})))),536871424&e.$$.dirty[0]&&o(41,N=!!V.length||!!Object.keys(He).some((e=>mo.includes(e)))),16&e.$$.dirty[1]|32768&e.$$.dirty[4]&&Z&&go.set(U?0:20),16384&e.$$.dirty[4]&&o(40,H=j?`transform: translateY(${j}px)`:void 0)},Ut.set(!1),[Be,Pe,Ie,Ae,ze,Fe,We,Ve,Ne,He,je,Ue,Ge,Ye,Qe,et,tt,rt,st,lt,ct,dt,ut,ht,pt,mt,Gt,qt,ho,V,O,k,s,r,c,U,Q,ie,ne,he,H,N,_,W,B,F,z,T,C,v,f,$,p,u,n,ge,$e,fe,$t,ft,bt,xt,vt,St,Ct,Tt,Rt,Et,It,Lt,zt,Ft,Dt,Ot,Bt,Wt,_t,Vt,({index:e},t)=>{o(26,Gt=e),o(0,Be=Zt[e])},({value:e},t)=>{o(0,Be=e),(Ze||/enter/i.test(t.key))&&Xt(e)},e=>{if("eraser"===Be)Qt=qt.eraseShape();else if(Be&&wt[Be]){const[e,t={}]=wt[Be],{drawMode:o}=k;"selection"===g&&"new"===o&&$t.set([]);let r={};"selection"===g&&(O("selectiondown",[...ce]),i&&(Kt=e.drawMode,r.drawMode="subtract")),Qt=qt.createShape({...e,...S,...r},t)}else Qt=void 0;return!!Qt&&(Qt.start(e),!0)},e=>!!Qt&&(Qt.update(e),!0),e=>!!Qt&&(Qt.release(e),!0),e=>!!Qt&&(Qt.cancel(e),Qt=void 0,!0),e=>{if(!Qt)return!1;if(Qt.end(e),Qt=void 0,"selection"===g){if(e.detail.isTap){const[e]=wt[Be];e.bitmap||$t.set([])}O("selectionup",[...ce])}const t=qt.getMarkupItemDraft(),i=qe&&(!0===Xe||Array.isArray(Xe)&&Xe.includes(Be));return t&&!t.isEditing||!i||o(0,Be="move"),!0},e=>{const{key:t}=e,o=qt.getMarkupItemDraft();/escape/i.test(t)&&o&&(e.preventDefault(),e.stopPropagation(),qt.discardMarkupItemDraft(),Qt=void 0),/enter/i.test(t)&&o&&(e.preventDefault(),e.stopPropagation(),eo(o),Qt=void 0)},function(e){Object.keys(e).forEach((t=>{const{retain:i=!0,share:r=!0}=w.settings&&w.settings[t]||{};i&&(Je&&r?o(116,Jt[t]=e[t],Jt):(Jt[Be]||o(116,Jt[Be]={},Jt),o(116,Jt[Be][t]=e[t],Jt)))})),O("selectstyle",e),b&&(qt.updateMarkupShape(b,e),clearTimeout(to),to=setTimeout((()=>{uo()}),200))},(e,t,i)=>{o(118,ro=t),o(119,no=i)},()=>{o(119,no=void 0),o(118,ro=void 0)},e=>{O("markuptap",e)},e=>o(117,io=e),()=>{co=!1},(e,t)=>{if(co)return;const{beforeAddShape:o=(()=>!0)}=gt,i=Yt(t),r=qt.getMarkupItemDraft(),n=yt(re,{x:i.x+(ie.x||0),y:i.y+(ie.y||0)});if(r&&!n&&qt.discardMarkupItemDraft(),n){if(!r){const r=vi(e,re),n=ao(r,i);return o(n)?(_i(n),void qt.addShape(n)):(co=!0,void t.preventDefault())}Mi(r)&&(i.x-=.5*r.width,i.y-=.5*r.height),e.shape&&(zo(e.shape,"x")&&(i.x=e.shape.x),zo(e.shape,"y")&&(i.y=e.shape.y)),qt.updateMarkupShape(r,i)}},(e,t)=>{if(co)return;const o=Yt(t);if(!yt(re,{x:o.x+(ie.x||0),y:o.y+(ie.y||0)}))return void qt.discardMarkupItemDraft();const i=qt.confirmMarkupItemDraft();qt.selectShape(i),O("addshape",i),kt.write()},e=>so(e),e=>{return t=e.detail.resources,o=Yt(e.detail.event),t.forEach((e=>so(e,o)));var t,o},e=>{if(!nt)return!0;const t=rectClone(oe);return rectScale(t,1/te),rectTranslate(t,ee),rectScale(t,Q.scale),nt(e,{...t,x:t.x+J.x,y:t.y+J.y})},uo,po,mo,go,Le,De,Oe,_e,Ze,Xe,qe,Ke,Je,ot,it,nt,gt,wt,Zt,Jt,io,ro,no,b,A,L,i,g,S,w,I,E,x,M,P,y,m,l,d,h,a,j,Z,X,Y,q,K,J,ae,se,le,ce,pe,me,function(t){Qn.call(this,e,t)},e=>e[0]===Be,(e,t,o)=>{const i=e.filter((([,e])=>!mo.includes(e)));return rt?rt(i,t,o):i},e=>e[0]===Gt,e=>{Promise.resolve().then((()=>{O("addshape",e),uo()}))},e=>{O("selectshape",e)},e=>{Promise.resolve().then((()=>{O("blurshape",e)}))},e=>{O("tapshape",e)},e=>{O("updateshape",e),uo()},e=>{O("removeshape",e),uo()},function(e){ta[e?"unshift":"push"]((()=>{qt=e,o(27,qt)}))},function(e){ta[e?"unshift":"push"]((()=>{ho=e,o(28,ho)}))},e=>e.filter((([,e])=>mo.includes(e))),function(t){Qn.call(this,e,t)}]}class Nb extends Fa{constructor(e){super(),za(this,e,Vb,_b,Qr,{isActive:1,isActiveFraction:2,isVisible:3,stores:101,locale:4,shapes:5,toolbar:102,toolShapes:103,toolActive:0,toolSelectRadius:6,toolRetainStyles:104,toolbarLayout:7,textInputMode:8,shapeControls:9,enableButtonFlipVertical:10,enablePresetSelectImage:11,enablePresetDropImage:12,enableSelectToolToAddShape:105,enableAutoSelectMoveTool:106,enableTapToAddText:13,enableMoveTool:107,enableViewTool:108,enableToolShareStyles:109,gridSize:14,snapThreshold:15,enableSnapToContext:16,willRenderHeaderTools:110,willRenderPresetToolbar:111,willRenderShapeStyleControls:17,willStartInteraction:112,shapePresets:18,utilKey:19,mapScreenPointToImagePoint:20,mapImagePointToScreenPoint:21,imageRotation:22,imageFlipX:23,imageFlipY:24,parentRect:25,hooks:113},null,[-1,-1,-1,-1,-1,-1,-1])}get isActive(){return this.$$.ctx[1]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[2]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[101]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),pa()}get shapes(){return this.$$.ctx[5]}set shapes(e){this.$$set({shapes:e}),pa()}get toolbar(){return this.$$.ctx[102]}set toolbar(e){this.$$set({toolbar:e}),pa()}get toolShapes(){return this.$$.ctx[103]}set toolShapes(e){this.$$set({toolShapes:e}),pa()}get toolActive(){return this.$$.ctx[0]}set toolActive(e){this.$$set({toolActive:e}),pa()}get toolSelectRadius(){return this.$$.ctx[6]}set toolSelectRadius(e){this.$$set({toolSelectRadius:e}),pa()}get toolRetainStyles(){return this.$$.ctx[104]}set toolRetainStyles(e){this.$$set({toolRetainStyles:e}),pa()}get toolbarLayout(){return this.$$.ctx[7]}set toolbarLayout(e){this.$$set({toolbarLayout:e}),pa()}get textInputMode(){return this.$$.ctx[8]}set textInputMode(e){this.$$set({textInputMode:e}),pa()}get shapeControls(){return this.$$.ctx[9]}set shapeControls(e){this.$$set({shapeControls:e}),pa()}get enableButtonFlipVertical(){return this.$$.ctx[10]}set enableButtonFlipVertical(e){this.$$set({enableButtonFlipVertical:e}),pa()}get enablePresetSelectImage(){return this.$$.ctx[11]}set enablePresetSelectImage(e){this.$$set({enablePresetSelectImage:e}),pa()}get enablePresetDropImage(){return this.$$.ctx[12]}set enablePresetDropImage(e){this.$$set({enablePresetDropImage:e}),pa()}get enableSelectToolToAddShape(){return this.$$.ctx[105]}set enableSelectToolToAddShape(e){this.$$set({enableSelectToolToAddShape:e}),pa()}get enableAutoSelectMoveTool(){return this.$$.ctx[106]}set enableAutoSelectMoveTool(e){this.$$set({enableAutoSelectMoveTool:e}),pa()}get enableTapToAddText(){return this.$$.ctx[13]}set enableTapToAddText(e){this.$$set({enableTapToAddText:e}),pa()}get enableMoveTool(){return this.$$.ctx[107]}set enableMoveTool(e){this.$$set({enableMoveTool:e}),pa()}get enableViewTool(){return this.$$.ctx[108]}set enableViewTool(e){this.$$set({enableViewTool:e}),pa()}get enableToolShareStyles(){return this.$$.ctx[109]}set enableToolShareStyles(e){this.$$set({enableToolShareStyles:e}),pa()}get gridSize(){return this.$$.ctx[14]}set gridSize(e){this.$$set({gridSize:e}),pa()}get snapThreshold(){return this.$$.ctx[15]}set snapThreshold(e){this.$$set({snapThreshold:e}),pa()}get enableSnapToContext(){return this.$$.ctx[16]}set enableSnapToContext(e){this.$$set({enableSnapToContext:e}),pa()}get willRenderHeaderTools(){return this.$$.ctx[110]}set willRenderHeaderTools(e){this.$$set({willRenderHeaderTools:e}),pa()}get willRenderPresetToolbar(){return this.$$.ctx[111]}set willRenderPresetToolbar(e){this.$$set({willRenderPresetToolbar:e}),pa()}get willRenderShapeStyleControls(){return this.$$.ctx[17]}set willRenderShapeStyleControls(e){this.$$set({willRenderShapeStyleControls:e}),pa()}get willStartInteraction(){return this.$$.ctx[112]}set willStartInteraction(e){this.$$set({willStartInteraction:e}),pa()}get shapePresets(){return this.$$.ctx[18]}set shapePresets(e){this.$$set({shapePresets:e}),pa()}get utilKey(){return this.$$.ctx[19]}set utilKey(e){this.$$set({utilKey:e}),pa()}get mapScreenPointToImagePoint(){return this.$$.ctx[20]}set mapScreenPointToImagePoint(e){this.$$set({mapScreenPointToImagePoint:e}),pa()}get mapImagePointToScreenPoint(){return this.$$.ctx[21]}set mapImagePointToScreenPoint(e){this.$$set({mapImagePointToScreenPoint:e}),pa()}get imageRotation(){return this.$$.ctx[22]}set imageRotation(e){this.$$set({imageRotation:e}),pa()}get imageFlipX(){return this.$$.ctx[23]}set imageFlipX(e){this.$$set({imageFlipX:e}),pa()}get imageFlipY(){return this.$$.ctx[24]}set imageFlipY(e){this.$$set({imageFlipY:e}),pa()}get parentRect(){return this.$$.ctx[25]}set parentRect(e){this.$$set({parentRect:e}),pa()}get hooks(){return this.$$.ctx[113]}set hooks(e){this.$$set({hooks:e}),pa()}}var Hb=(e,t,o,i,r,n,a,s,l)=>{const c=pe(e),d=.5*o.width,u=.5*o.height,h=.5*t.width,p=.5*t.height,m=r.x+i.x,g=r.y+i.y;s&&(c.x=o.width-c.x),l&&(c.y=o.height-c.y);const $=Math.cos(n),f=Math.sin(n);c.x-=d,c.y-=u;const y=c.x*$-c.y*f,b=c.x*f+c.y*$;c.x=d+y,c.y=u+b,c.x*=a,c.y*=a,c.x+=h,c.y+=p,c.x+=m,c.y+=g,c.x-=d*a,c.y-=u*a;const x=(r.x-m)*a,v=(r.y-g)*a,w=x*$-v*f,S=x*f+v*$;return c.x+=w,c.y+=S,c},jb=(e,t,o,i,r,n,a,s,l)=>{const c=pe(e),d=Ne(o),u=Ne(t),h=ue(r.x+i.x,r.y+i.y),p=Math.cos(n),m=Math.sin(n);c.x-=u.x,c.y-=u.y;const g=(r.x-h.x)*a,$=(r.y-h.y)*a,f=g*p-$*m,y=g*m+$*p;c.x-=f,c.y-=y,c.x-=h.x,c.y-=h.y,c.x/=a,c.y/=a;const b=c.x*p+c.y*m,x=c.x*m-c.y*p;return c.x=b,c.y=-x,c.x+=d.x,c.y+=d.y,s&&(c.x=o.width-c.x),l&&(c.y=o.height-c.y),c},Ub=e=>"boolean"==typeof e;function Gb(e){let t,o,i;function r(t){e[58](t)}let n={utilKey:"annotate",stores:e[4],locale:e[5],isActive:e[1],isActiveFraction:e[2],isVisible:e[3],mapScreenPointToImagePoint:e[43],mapImagePointToScreenPoint:e[42],imageRotation:e[44],imageFlipX:e[41],imageFlipY:e[40],shapes:e[46],toolbar:e[20]||e[6],toolShapes:e[21]||e[7],toolRetainStyles:e[8],enableSelectToolToAddShape:e[29],enableTapToAddText:e[30],enableViewTool:e[28],enableMoveTool:e[32],enableAutoSelectMoveTool:e[31],snapThreshold:e[15],gridSize:Ao(e[17])?e[17]:e[14],enableSnapToContext:Ub(e[18])?e[18]:e[16],enableToolShareStyles:e[12],shapeControls:e[22]||e[9],shapePresets:e[26],enableButtonFlipVertical:e[23],parentRect:e[47],enablePresetDropImage:e[25],enablePresetSelectImage:e[24],toolSelectRadius:e[10],textInputMode:e[11],willStartInteraction:e[13],willRenderPresetToolbar:e[27]||e[19],hooks:{willRenderShapeControls:e[33],willRenderShapeTextControls:e[34],beforeAddShape:e[35],beforeRemoveShape:e[36],beforeDeselectShape:e[37],beforeSelectShape:e[38],beforeUpdateShape:e[39]}};return void 0!==e[0]&&(n.toolActive=e[0]),t=new Nb({props:n}),ta.push((()=>Ea(t,"toolActive",r))),t.$on("measure",e[59]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};16&i[0]&&(r.stores=e[4]),32&i[0]&&(r.locale=e[5]),2&i[0]&&(r.isActive=e[1]),4&i[0]&&(r.isActiveFraction=e[2]),8&i[0]&&(r.isVisible=e[3]),4096&i[1]&&(r.mapScreenPointToImagePoint=e[43]),2048&i[1]&&(r.mapImagePointToScreenPoint=e[42]),8192&i[1]&&(r.imageRotation=e[44]),1024&i[1]&&(r.imageFlipX=e[41]),512&i[1]&&(r.imageFlipY=e[40]),1048640&i[0]&&(r.toolbar=e[20]||e[6]),2097280&i[0]&&(r.toolShapes=e[21]||e[7]),256&i[0]&&(r.toolRetainStyles=e[8]),536870912&i[0]&&(r.enableSelectToolToAddShape=e[29]),1073741824&i[0]&&(r.enableTapToAddText=e[30]),268435456&i[0]&&(r.enableViewTool=e[28]),2&i[1]&&(r.enableMoveTool=e[32]),1&i[1]&&(r.enableAutoSelectMoveTool=e[31]),32768&i[0]&&(r.snapThreshold=e[15]),147456&i[0]&&(r.gridSize=Ao(e[17])?e[17]:e[14]),327680&i[0]&&(r.enableSnapToContext=Ub(e[18])?e[18]:e[16]),4096&i[0]&&(r.enableToolShareStyles=e[12]),4194816&i[0]&&(r.shapeControls=e[22]||e[9]),67108864&i[0]&&(r.shapePresets=e[26]),8388608&i[0]&&(r.enableButtonFlipVertical=e[23]),33554432&i[0]&&(r.enablePresetDropImage=e[25]),16777216&i[0]&&(r.enablePresetSelectImage=e[24]),1024&i[0]&&(r.toolSelectRadius=e[10]),2048&i[0]&&(r.textInputMode=e[11]),8192&i[0]&&(r.willStartInteraction=e[13]),134742016&i[0]&&(r.willRenderPresetToolbar=e[27]||e[19]),508&i[1]&&(r.hooks={willRenderShapeControls:e[33],willRenderShapeTextControls:e[34],beforeAddShape:e[35],beforeRemoveShape:e[36],beforeDeselectShape:e[37],beforeSelectShape:e[38],beforeUpdateShape:e[39]}),!o&&1&i[0]&&(o=!0,r.toolActive=e[0],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function Zb(e,t,o){let i,r,n,a,s,l,c,d,u;let{isActive:h}=t,{isActiveFraction:p}=t,{isVisible:m}=t,{stores:g}=t,{locale:$={}}=t,{markupEditorToolbar:f}=t,{markupEditorToolStyles:y}=t,{markupEditorToolRetainStyles:b}=t,{markupEditorShapeStyleControls:x}=t,{markupEditorToolSelectRadius:v}=t,{markupEditorTextInputMode:w}=t,{markupEditorToolShareStyles:S}=t,{markupEditorWillStartInteraction:k}=t,{markupEditorGridSize:C=0}=t,{markupEditorSnapThreshold:T=0}=t,{markupEditorSnapToContext:M=!1}=t,{annotateGridSize:R}=t,{annotateSnapToContext:P}=t,{willRenderShapePresetToolbar:E}=t,{annotateTools:I}=t,{annotateToolShapes:A}=t,{annotateShapeControls:L}=t,{annotateActiveTool:z}=t,{annotateEnableButtonFlipVertical:F=!1}=t,{annotateEnableSelectImagePreset:D=!1}=t,{annotateEnableDropImagePreset:O=!0}=t,{annotatePresets:B=[]}=t,{annotateWillRenderShapePresetToolbar:W}=t,{enableViewTool:_}=t,{enableSelectToolToAddShape:V}=t,{enableTapToAddText:N}=t,{enableAutoSelectMoveTool:H}=t,{enableMoveTool:j}=t,{willRenderShapeControls:U}=t,{willRenderShapeTextControls:G}=t,{beforeAddShape:Z}=t,{beforeRemoveShape:X}=t,{beforeDeselectShape:Y}=t,{beforeSelectShape:q}=t,{beforeUpdateShape:K}=t;const{rootRect:J,imageAnnotation:Q,imageSize:ee,imageRotation:te,imageFlipX:oe,imageFlipY:ie,imageTransforms:re,imageTransformsInterpolated:ne}=g;return on(e,J,(e=>o(57,d=e))),on(e,ee,(e=>o(56,c=e))),on(e,te,(e=>o(44,u=e))),on(e,oe,(e=>o(41,a=e))),on(e,ie,(e=>o(40,n=e))),on(e,re,(e=>o(55,l=e))),on(e,ne,(e=>o(54,s=e))),e.$$set=e=>{"isActive"in e&&o(1,h=e.isActive),"isActiveFraction"in e&&o(2,p=e.isActiveFraction),"isVisible"in e&&o(3,m=e.isVisible),"stores"in e&&o(4,g=e.stores),"locale"in e&&o(5,$=e.locale),"markupEditorToolbar"in e&&o(6,f=e.markupEditorToolbar),"markupEditorToolStyles"in e&&o(7,y=e.markupEditorToolStyles),"markupEditorToolRetainStyles"in e&&o(8,b=e.markupEditorToolRetainStyles),"markupEditorShapeStyleControls"in e&&o(9,x=e.markupEditorShapeStyleControls),"markupEditorToolSelectRadius"in e&&o(10,v=e.markupEditorToolSelectRadius),"markupEditorTextInputMode"in e&&o(11,w=e.markupEditorTextInputMode),"markupEditorToolShareStyles"in e&&o(12,S=e.markupEditorToolShareStyles),"markupEditorWillStartInteraction"in e&&o(13,k=e.markupEditorWillStartInteraction),"markupEditorGridSize"in e&&o(14,C=e.markupEditorGridSize),"markupEditorSnapThreshold"in e&&o(15,T=e.markupEditorSnapThreshold),"markupEditorSnapToContext"in e&&o(16,M=e.markupEditorSnapToContext),"annotateGridSize"in e&&o(17,R=e.annotateGridSize),"annotateSnapToContext"in e&&o(18,P=e.annotateSnapToContext),"willRenderShapePresetToolbar"in e&&o(19,E=e.willRenderShapePresetToolbar),"annotateTools"in e&&o(20,I=e.annotateTools),"annotateToolShapes"in e&&o(21,A=e.annotateToolShapes),"annotateShapeControls"in e&&o(22,L=e.annotateShapeControls),"annotateActiveTool"in e&&o(0,z=e.annotateActiveTool),"annotateEnableButtonFlipVertical"in e&&o(23,F=e.annotateEnableButtonFlipVertical),"annotateEnableSelectImagePreset"in e&&o(24,D=e.annotateEnableSelectImagePreset),"annotateEnableDropImagePreset"in e&&o(25,O=e.annotateEnableDropImagePreset),"annotatePresets"in e&&o(26,B=e.annotatePresets),"annotateWillRenderShapePresetToolbar"in e&&o(27,W=e.annotateWillRenderShapePresetToolbar),"enableViewTool"in e&&o(28,_=e.enableViewTool),"enableSelectToolToAddShape"in e&&o(29,V=e.enableSelectToolToAddShape),"enableTapToAddText"in e&&o(30,N=e.enableTapToAddText),"enableAutoSelectMoveTool"in e&&o(31,H=e.enableAutoSelectMoveTool),"enableMoveTool"in e&&o(32,j=e.enableMoveTool),"willRenderShapeControls"in e&&o(33,U=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(34,G=e.willRenderShapeTextControls),"beforeAddShape"in e&&o(35,Z=e.beforeAddShape),"beforeRemoveShape"in e&&o(36,X=e.beforeRemoveShape),"beforeDeselectShape"in e&&o(37,Y=e.beforeDeselectShape),"beforeSelectShape"in e&&o(38,q=e.beforeSelectShape),"beforeUpdateShape"in e&&o(39,K=e.beforeUpdateShape)},e.$$.update=()=>{125830656&e.$$.dirty[1]&&o(43,i=e=>jb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n)),125830656&e.$$.dirty[1]&&o(42,r=e=>Hb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n))},[z,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,R,P,E,I,A,L,F,D,O,B,W,_,V,N,H,j,U,G,Z,X,Y,q,K,n,a,r,i,u,J,Q,ee,te,oe,ie,re,ne,"annotate",s,l,c,d,function(e){z=e,o(0,z)},function(t){Qn.call(this,e,t)}]}var Xb={util:["annotate",class extends Fa{constructor(e){super(),za(this,e,Zb,Gb,Qr,{name:53,isActive:1,isActiveFraction:2,isVisible:3,stores:4,locale:5,markupEditorToolbar:6,markupEditorToolStyles:7,markupEditorToolRetainStyles:8,markupEditorShapeStyleControls:9,markupEditorToolSelectRadius:10,markupEditorTextInputMode:11,markupEditorToolShareStyles:12,markupEditorWillStartInteraction:13,markupEditorGridSize:14,markupEditorSnapThreshold:15,markupEditorSnapToContext:16,annotateGridSize:17,annotateSnapToContext:18,willRenderShapePresetToolbar:19,annotateTools:20,annotateToolShapes:21,annotateShapeControls:22,annotateActiveTool:0,annotateEnableButtonFlipVertical:23,annotateEnableSelectImagePreset:24,annotateEnableDropImagePreset:25,annotatePresets:26,annotateWillRenderShapePresetToolbar:27,enableViewTool:28,enableSelectToolToAddShape:29,enableTapToAddText:30,enableAutoSelectMoveTool:31,enableMoveTool:32,willRenderShapeControls:33,willRenderShapeTextControls:34,beforeAddShape:35,beforeRemoveShape:36,beforeDeselectShape:37,beforeSelectShape:38,beforeUpdateShape:39},null,[-1,-1])}get name(){return this.$$.ctx[53]}get isActive(){return this.$$.ctx[1]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[2]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[4]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[5]}set locale(e){this.$$set({locale:e}),pa()}get markupEditorToolbar(){return this.$$.ctx[6]}set markupEditorToolbar(e){this.$$set({markupEditorToolbar:e}),pa()}get markupEditorToolStyles(){return this.$$.ctx[7]}set markupEditorToolStyles(e){this.$$set({markupEditorToolStyles:e}),pa()}get markupEditorToolRetainStyles(){return this.$$.ctx[8]}set markupEditorToolRetainStyles(e){this.$$set({markupEditorToolRetainStyles:e}),pa()}get markupEditorShapeStyleControls(){return this.$$.ctx[9]}set markupEditorShapeStyleControls(e){this.$$set({markupEditorShapeStyleControls:e}),pa()}get markupEditorToolSelectRadius(){return this.$$.ctx[10]}set markupEditorToolSelectRadius(e){this.$$set({markupEditorToolSelectRadius:e}),pa()}get markupEditorTextInputMode(){return this.$$.ctx[11]}set markupEditorTextInputMode(e){this.$$set({markupEditorTextInputMode:e}),pa()}get markupEditorToolShareStyles(){return this.$$.ctx[12]}set markupEditorToolShareStyles(e){this.$$set({markupEditorToolShareStyles:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[13]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}get markupEditorGridSize(){return this.$$.ctx[14]}set markupEditorGridSize(e){this.$$set({markupEditorGridSize:e}),pa()}get markupEditorSnapThreshold(){return this.$$.ctx[15]}set markupEditorSnapThreshold(e){this.$$set({markupEditorSnapThreshold:e}),pa()}get markupEditorSnapToContext(){return this.$$.ctx[16]}set markupEditorSnapToContext(e){this.$$set({markupEditorSnapToContext:e}),pa()}get annotateGridSize(){return this.$$.ctx[17]}set annotateGridSize(e){this.$$set({annotateGridSize:e}),pa()}get annotateSnapToContext(){return this.$$.ctx[18]}set annotateSnapToContext(e){this.$$set({annotateSnapToContext:e}),pa()}get willRenderShapePresetToolbar(){return this.$$.ctx[19]}set willRenderShapePresetToolbar(e){this.$$set({willRenderShapePresetToolbar:e}),pa()}get annotateTools(){return this.$$.ctx[20]}set annotateTools(e){this.$$set({annotateTools:e}),pa()}get annotateToolShapes(){return this.$$.ctx[21]}set annotateToolShapes(e){this.$$set({annotateToolShapes:e}),pa()}get annotateShapeControls(){return this.$$.ctx[22]}set annotateShapeControls(e){this.$$set({annotateShapeControls:e}),pa()}get annotateActiveTool(){return this.$$.ctx[0]}set annotateActiveTool(e){this.$$set({annotateActiveTool:e}),pa()}get annotateEnableButtonFlipVertical(){return this.$$.ctx[23]}set annotateEnableButtonFlipVertical(e){this.$$set({annotateEnableButtonFlipVertical:e}),pa()}get annotateEnableSelectImagePreset(){return this.$$.ctx[24]}set annotateEnableSelectImagePreset(e){this.$$set({annotateEnableSelectImagePreset:e}),pa()}get annotateEnableDropImagePreset(){return this.$$.ctx[25]}set annotateEnableDropImagePreset(e){this.$$set({annotateEnableDropImagePreset:e}),pa()}get annotatePresets(){return this.$$.ctx[26]}set annotatePresets(e){this.$$set({annotatePresets:e}),pa()}get annotateWillRenderShapePresetToolbar(){return this.$$.ctx[27]}set annotateWillRenderShapePresetToolbar(e){this.$$set({annotateWillRenderShapePresetToolbar:e}),pa()}get enableViewTool(){return this.$$.ctx[28]}set enableViewTool(e){this.$$set({enableViewTool:e}),pa()}get enableSelectToolToAddShape(){return this.$$.ctx[29]}set enableSelectToolToAddShape(e){this.$$set({enableSelectToolToAddShape:e}),pa()}get enableTapToAddText(){return this.$$.ctx[30]}set enableTapToAddText(e){this.$$set({enableTapToAddText:e}),pa()}get enableAutoSelectMoveTool(){return this.$$.ctx[31]}set enableAutoSelectMoveTool(e){this.$$set({enableAutoSelectMoveTool:e}),pa()}get enableMoveTool(){return this.$$.ctx[32]}set enableMoveTool(e){this.$$set({enableMoveTool:e}),pa()}get willRenderShapeControls(){return this.$$.ctx[33]}set willRenderShapeControls(e){this.$$set({willRenderShapeControls:e}),pa()}get willRenderShapeTextControls(){return this.$$.ctx[34]}set willRenderShapeTextControls(e){this.$$set({willRenderShapeTextControls:e}),pa()}get beforeAddShape(){return this.$$.ctx[35]}set beforeAddShape(e){this.$$set({beforeAddShape:e}),pa()}get beforeRemoveShape(){return this.$$.ctx[36]}set beforeRemoveShape(e){this.$$set({beforeRemoveShape:e}),pa()}get beforeDeselectShape(){return this.$$.ctx[37]}set beforeDeselectShape(e){this.$$set({beforeDeselectShape:e}),pa()}get beforeSelectShape(){return this.$$.ctx[38]}set beforeSelectShape(e){this.$$set({beforeSelectShape:e}),pa()}get beforeUpdateShape(){return this.$$.ctx[39]}set beforeUpdateShape(e){this.$$set({beforeUpdateShape:e}),pa()}}]};function Yb(e){let t,o,i;function r(t){e[50](t)}let n={stores:e[4],locale:e[5],isActive:e[1],isActiveFraction:e[2],isVisible:e[3],mapScreenPointToImagePoint:e[41],mapImagePointToScreenPoint:e[40],utilKey:"decorate",shapes:e[43],toolbar:e[19]||e[6],toolShapes:e[20]||e[7],toolRetainStyles:e[8],shapeControls:e[21]||e[9],shapePresets:e[25],enableSelectToolToAddShape:e[27],enableTapToAddText:e[28],enableViewTool:e[29],enableMoveTool:e[30],enableAutoSelectMoveTool:e[31],snapThreshold:e[15],gridSize:Ao(e[17])?e[17]:e[14],enableSnapToContext:Ub(e[18])?e[18]:e[16],enableToolShareStyles:e[12],enablePresetSelectImage:e[23],enablePresetDropImage:e[24],enableButtonFlipVertical:e[22],parentRect:e[42],toolSelectRadius:e[10],textInputMode:e[11],willStartInteraction:e[39],willRenderPresetToolbar:e[26]||e[13],hooks:{willRenderShapeControls:e[32],willRenderShapeTextControls:e[33],beforeAddShape:e[34],beforeRemoveShape:e[35],beforeDeselectShape:e[36],beforeSelectShape:e[37],beforeUpdateShape:e[38]}};return void 0!==e[0]&&(n.toolActive=e[0]),t=new Nb({props:n}),ta.push((()=>Ea(t,"toolActive",r))),t.$on("measure",e[51]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};16&i[0]&&(r.stores=e[4]),32&i[0]&&(r.locale=e[5]),2&i[0]&&(r.isActive=e[1]),4&i[0]&&(r.isActiveFraction=e[2]),8&i[0]&&(r.isVisible=e[3]),1024&i[1]&&(r.mapScreenPointToImagePoint=e[41]),512&i[1]&&(r.mapImagePointToScreenPoint=e[40]),524352&i[0]&&(r.toolbar=e[19]||e[6]),1048704&i[0]&&(r.toolShapes=e[20]||e[7]),256&i[0]&&(r.toolRetainStyles=e[8]),2097664&i[0]&&(r.shapeControls=e[21]||e[9]),33554432&i[0]&&(r.shapePresets=e[25]),134217728&i[0]&&(r.enableSelectToolToAddShape=e[27]),268435456&i[0]&&(r.enableTapToAddText=e[28]),536870912&i[0]&&(r.enableViewTool=e[29]),1073741824&i[0]&&(r.enableMoveTool=e[30]),1&i[1]&&(r.enableAutoSelectMoveTool=e[31]),32768&i[0]&&(r.snapThreshold=e[15]),147456&i[0]&&(r.gridSize=Ao(e[17])?e[17]:e[14]),327680&i[0]&&(r.enableSnapToContext=Ub(e[18])?e[18]:e[16]),4096&i[0]&&(r.enableToolShareStyles=e[12]),8388608&i[0]&&(r.enablePresetSelectImage=e[23]),16777216&i[0]&&(r.enablePresetDropImage=e[24]),4194304&i[0]&&(r.enableButtonFlipVertical=e[22]),1024&i[0]&&(r.toolSelectRadius=e[10]),2048&i[0]&&(r.textInputMode=e[11]),256&i[1]&&(r.willStartInteraction=e[39]),67117056&i[0]&&(r.willRenderPresetToolbar=e[26]||e[13]),254&i[1]&&(r.hooks={willRenderShapeControls:e[32],willRenderShapeTextControls:e[33],beforeAddShape:e[34],beforeRemoveShape:e[35],beforeDeselectShape:e[36],beforeSelectShape:e[37],beforeUpdateShape:e[38]}),!o&&1&i[0]&&(o=!0,r.toolActive=e[0],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function qb(e,t,o){let i,r,n,a,s;let{isActive:l}=t,{isActiveFraction:c}=t,{isVisible:d}=t,{stores:u}=t,{locale:h={}}=t,{markupEditorToolbar:p}=t,{markupEditorToolStyles:m}=t,{markupEditorToolRetainStyles:g}=t,{markupEditorShapeStyleControls:$}=t,{markupEditorToolSelectRadius:f}=t,{markupEditorTextInputMode:y}=t,{markupEditorToolShareStyles:b}=t,{willRenderShapePresetToolbar:x}=t,{markupEditorGridSize:v}=t,{markupEditorSnapThreshold:w}=t,{markupEditorSnapToContext:S=!0}=t,{decorateGridSize:k}=t,{decorateSnapToContext:C}=t,{decorateTools:T}=t,{decorateToolShapes:M}=t,{decorateShapeControls:R}=t,{decorateActiveTool:P}=t,{decorateEnableButtonFlipVertical:E=!1}=t,{decorateEnableSelectImagePreset:I=!1}=t,{decorateEnableDropImagePreset:A=!0}=t,{decoratePresets:L=[]}=t,{decorateWillRenderShapePresetToolbar:z}=t,{enableSelectToolToAddShape:F}=t,{enableTapToAddText:D}=t,{enableViewTool:O}=t,{enableMoveTool:B}=t,{enableAutoSelectMoveTool:W}=t,{willRenderShapeControls:_}=t,{willRenderShapeTextControls:V}=t,{beforeAddShape:N}=t,{beforeRemoveShape:H}=t,{beforeDeselectShape:j}=t,{beforeSelectShape:U}=t,{beforeUpdateShape:G}=t,{markupEditorWillStartInteraction:Z}=t;const{imageCropRect:X,imageDecoration:Y,imageSelectionRectPresentation:q,imageTransformsInterpolated:K}=u;return on(e,q,(e=>o(48,a=e))),on(e,K,(e=>o(49,s=e))),e.$$set=e=>{"isActive"in e&&o(1,l=e.isActive),"isActiveFraction"in e&&o(2,c=e.isActiveFraction),"isVisible"in e&&o(3,d=e.isVisible),"stores"in e&&o(4,u=e.stores),"locale"in e&&o(5,h=e.locale),"markupEditorToolbar"in e&&o(6,p=e.markupEditorToolbar),"markupEditorToolStyles"in e&&o(7,m=e.markupEditorToolStyles),"markupEditorToolRetainStyles"in e&&o(8,g=e.markupEditorToolRetainStyles),"markupEditorShapeStyleControls"in e&&o(9,$=e.markupEditorShapeStyleControls),"markupEditorToolSelectRadius"in e&&o(10,f=e.markupEditorToolSelectRadius),"markupEditorTextInputMode"in e&&o(11,y=e.markupEditorTextInputMode),"markupEditorToolShareStyles"in e&&o(12,b=e.markupEditorToolShareStyles),"willRenderShapePresetToolbar"in e&&o(13,x=e.willRenderShapePresetToolbar),"markupEditorGridSize"in e&&o(14,v=e.markupEditorGridSize),"markupEditorSnapThreshold"in e&&o(15,w=e.markupEditorSnapThreshold),"markupEditorSnapToContext"in e&&o(16,S=e.markupEditorSnapToContext),"decorateGridSize"in e&&o(17,k=e.decorateGridSize),"decorateSnapToContext"in e&&o(18,C=e.decorateSnapToContext),"decorateTools"in e&&o(19,T=e.decorateTools),"decorateToolShapes"in e&&o(20,M=e.decorateToolShapes),"decorateShapeControls"in e&&o(21,R=e.decorateShapeControls),"decorateActiveTool"in e&&o(0,P=e.decorateActiveTool),"decorateEnableButtonFlipVertical"in e&&o(22,E=e.decorateEnableButtonFlipVertical),"decorateEnableSelectImagePreset"in e&&o(23,I=e.decorateEnableSelectImagePreset),"decorateEnableDropImagePreset"in e&&o(24,A=e.decorateEnableDropImagePreset),"decoratePresets"in e&&o(25,L=e.decoratePresets),"decorateWillRenderShapePresetToolbar"in e&&o(26,z=e.decorateWillRenderShapePresetToolbar),"enableSelectToolToAddShape"in e&&o(27,F=e.enableSelectToolToAddShape),"enableTapToAddText"in e&&o(28,D=e.enableTapToAddText),"enableViewTool"in e&&o(29,O=e.enableViewTool),"enableMoveTool"in e&&o(30,B=e.enableMoveTool),"enableAutoSelectMoveTool"in e&&o(31,W=e.enableAutoSelectMoveTool),"willRenderShapeControls"in e&&o(32,_=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(33,V=e.willRenderShapeTextControls),"beforeAddShape"in e&&o(34,N=e.beforeAddShape),"beforeRemoveShape"in e&&o(35,H=e.beforeRemoveShape),"beforeDeselectShape"in e&&o(36,j=e.beforeDeselectShape),"beforeSelectShape"in e&&o(37,U=e.beforeSelectShape),"beforeUpdateShape"in e&&o(38,G=e.beforeUpdateShape),"markupEditorWillStartInteraction"in e&&o(39,Z=e.markupEditorWillStartInteraction)},e.$$.update=()=>{262144&e.$$.dirty[1]&&o(47,i=s?s.scale:1),196608&e.$$.dirty[1]&&o(41,r=e=>{const t=pe(e);return t.x-=a.x,t.y-=a.y,t.x/=i,t.y/=i,t}),196608&e.$$.dirty[1]&&o(40,n=e=>{const t=pe(e);return t.x*=i,t.y*=i,t.x+=a.x,t.y+=a.y,t})},[P,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,R,E,I,A,L,z,F,D,O,B,W,_,V,N,H,j,U,G,Z,n,r,X,Y,q,K,"decorate",i,a,s,function(e){P=e,o(0,P)},function(t){Qn.call(this,e,t)}]}var Kb={util:["decorate",class extends Fa{constructor(e){super(),za(this,e,qb,Yb,Qr,{name:46,isActive:1,isActiveFraction:2,isVisible:3,stores:4,locale:5,markupEditorToolbar:6,markupEditorToolStyles:7,markupEditorToolRetainStyles:8,markupEditorShapeStyleControls:9,markupEditorToolSelectRadius:10,markupEditorTextInputMode:11,markupEditorToolShareStyles:12,willRenderShapePresetToolbar:13,markupEditorGridSize:14,markupEditorSnapThreshold:15,markupEditorSnapToContext:16,decorateGridSize:17,decorateSnapToContext:18,decorateTools:19,decorateToolShapes:20,decorateShapeControls:21,decorateActiveTool:0,decorateEnableButtonFlipVertical:22,decorateEnableSelectImagePreset:23,decorateEnableDropImagePreset:24,decoratePresets:25,decorateWillRenderShapePresetToolbar:26,enableSelectToolToAddShape:27,enableTapToAddText:28,enableViewTool:29,enableMoveTool:30,enableAutoSelectMoveTool:31,willRenderShapeControls:32,willRenderShapeTextControls:33,beforeAddShape:34,beforeRemoveShape:35,beforeDeselectShape:36,beforeSelectShape:37,beforeUpdateShape:38,markupEditorWillStartInteraction:39},null,[-1,-1])}get name(){return this.$$.ctx[46]}get isActive(){return this.$$.ctx[1]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[2]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[4]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[5]}set locale(e){this.$$set({locale:e}),pa()}get markupEditorToolbar(){return this.$$.ctx[6]}set markupEditorToolbar(e){this.$$set({markupEditorToolbar:e}),pa()}get markupEditorToolStyles(){return this.$$.ctx[7]}set markupEditorToolStyles(e){this.$$set({markupEditorToolStyles:e}),pa()}get markupEditorToolRetainStyles(){return this.$$.ctx[8]}set markupEditorToolRetainStyles(e){this.$$set({markupEditorToolRetainStyles:e}),pa()}get markupEditorShapeStyleControls(){return this.$$.ctx[9]}set markupEditorShapeStyleControls(e){this.$$set({markupEditorShapeStyleControls:e}),pa()}get markupEditorToolSelectRadius(){return this.$$.ctx[10]}set markupEditorToolSelectRadius(e){this.$$set({markupEditorToolSelectRadius:e}),pa()}get markupEditorTextInputMode(){return this.$$.ctx[11]}set markupEditorTextInputMode(e){this.$$set({markupEditorTextInputMode:e}),pa()}get markupEditorToolShareStyles(){return this.$$.ctx[12]}set markupEditorToolShareStyles(e){this.$$set({markupEditorToolShareStyles:e}),pa()}get willRenderShapePresetToolbar(){return this.$$.ctx[13]}set willRenderShapePresetToolbar(e){this.$$set({willRenderShapePresetToolbar:e}),pa()}get markupEditorGridSize(){return this.$$.ctx[14]}set markupEditorGridSize(e){this.$$set({markupEditorGridSize:e}),pa()}get markupEditorSnapThreshold(){return this.$$.ctx[15]}set markupEditorSnapThreshold(e){this.$$set({markupEditorSnapThreshold:e}),pa()}get markupEditorSnapToContext(){return this.$$.ctx[16]}set markupEditorSnapToContext(e){this.$$set({markupEditorSnapToContext:e}),pa()}get decorateGridSize(){return this.$$.ctx[17]}set decorateGridSize(e){this.$$set({decorateGridSize:e}),pa()}get decorateSnapToContext(){return this.$$.ctx[18]}set decorateSnapToContext(e){this.$$set({decorateSnapToContext:e}),pa()}get decorateTools(){return this.$$.ctx[19]}set decorateTools(e){this.$$set({decorateTools:e}),pa()}get decorateToolShapes(){return this.$$.ctx[20]}set decorateToolShapes(e){this.$$set({decorateToolShapes:e}),pa()}get decorateShapeControls(){return this.$$.ctx[21]}set decorateShapeControls(e){this.$$set({decorateShapeControls:e}),pa()}get decorateActiveTool(){return this.$$.ctx[0]}set decorateActiveTool(e){this.$$set({decorateActiveTool:e}),pa()}get decorateEnableButtonFlipVertical(){return this.$$.ctx[22]}set decorateEnableButtonFlipVertical(e){this.$$set({decorateEnableButtonFlipVertical:e}),pa()}get decorateEnableSelectImagePreset(){return this.$$.ctx[23]}set decorateEnableSelectImagePreset(e){this.$$set({decorateEnableSelectImagePreset:e}),pa()}get decorateEnableDropImagePreset(){return this.$$.ctx[24]}set decorateEnableDropImagePreset(e){this.$$set({decorateEnableDropImagePreset:e}),pa()}get decoratePresets(){return this.$$.ctx[25]}set decoratePresets(e){this.$$set({decoratePresets:e}),pa()}get decorateWillRenderShapePresetToolbar(){return this.$$.ctx[26]}set decorateWillRenderShapePresetToolbar(e){this.$$set({decorateWillRenderShapePresetToolbar:e}),pa()}get enableSelectToolToAddShape(){return this.$$.ctx[27]}set enableSelectToolToAddShape(e){this.$$set({enableSelectToolToAddShape:e}),pa()}get enableTapToAddText(){return this.$$.ctx[28]}set enableTapToAddText(e){this.$$set({enableTapToAddText:e}),pa()}get enableViewTool(){return this.$$.ctx[29]}set enableViewTool(e){this.$$set({enableViewTool:e}),pa()}get enableMoveTool(){return this.$$.ctx[30]}set enableMoveTool(e){this.$$set({enableMoveTool:e}),pa()}get enableAutoSelectMoveTool(){return this.$$.ctx[31]}set enableAutoSelectMoveTool(e){this.$$set({enableAutoSelectMoveTool:e}),pa()}get willRenderShapeControls(){return this.$$.ctx[32]}set willRenderShapeControls(e){this.$$set({willRenderShapeControls:e}),pa()}get willRenderShapeTextControls(){return this.$$.ctx[33]}set willRenderShapeTextControls(e){this.$$set({willRenderShapeTextControls:e}),pa()}get beforeAddShape(){return this.$$.ctx[34]}set beforeAddShape(e){this.$$set({beforeAddShape:e}),pa()}get beforeRemoveShape(){return this.$$.ctx[35]}set beforeRemoveShape(e){this.$$set({beforeRemoveShape:e}),pa()}get beforeDeselectShape(){return this.$$.ctx[36]}set beforeDeselectShape(e){this.$$set({beforeDeselectShape:e}),pa()}get beforeSelectShape(){return this.$$.ctx[37]}set beforeSelectShape(e){this.$$set({beforeSelectShape:e}),pa()}get beforeUpdateShape(){return this.$$.ctx[38]}set beforeUpdateShape(e){this.$$set({beforeUpdateShape:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[39]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}}]};function Jb(e){let t,o;return t=new Nb({props:{stores:e[3],locale:e[4],isActive:e[0],isActiveFraction:e[1],isVisible:e[2],mapScreenPointToImagePoint:e[25],mapImagePointToScreenPoint:e[24],utilKey:"sticker",shapePresets:e[5],shapes:e[6]?e[34]:e[35],toolActive:"preset",imageFlipX:!!e[6]&&e[23],imageFlipY:!!e[6]&&e[22],imageRotation:e[6]?e[30]:0,parentRect:e[6]?e[36]:e[32],snapThreshold:e[28],gridSize:e[27],enableSnapToContext:e[26],enablePresetDropImage:e[7],enablePresetSelectImage:e[29],enableButtonFlipVertical:e[10]||e[8],toolSelectRadius:e[14],willStartInteraction:e[21],willRenderPresetToolbar:e[11]||e[9]||e[15],hooks:{willRenderShapeControls:e[12],willRenderShapeTextControls:e[13],beforeAddShape:e[16],beforeRemoveShape:e[17],beforeDeselectShape:e[18],beforeSelectShape:e[19],beforeUpdateShape:e[20]}}}),t.$on("measure",e[59]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};8&o[0]&&(i.stores=e[3]),16&o[0]&&(i.locale=e[4]),1&o[0]&&(i.isActive=e[0]),2&o[0]&&(i.isActiveFraction=e[1]),4&o[0]&&(i.isVisible=e[2]),33554432&o[0]&&(i.mapScreenPointToImagePoint=e[25]),16777216&o[0]&&(i.mapImagePointToScreenPoint=e[24]),32&o[0]&&(i.shapePresets=e[5]),64&o[0]&&(i.shapes=e[6]?e[34]:e[35]),8388672&o[0]&&(i.imageFlipX=!!e[6]&&e[23]),4194368&o[0]&&(i.imageFlipY=!!e[6]&&e[22]),1073741888&o[0]&&(i.imageRotation=e[6]?e[30]:0),64&o[0]&&(i.parentRect=e[6]?e[36]:e[32]),268435456&o[0]&&(i.snapThreshold=e[28]),134217728&o[0]&&(i.gridSize=e[27]),67108864&o[0]&&(i.enableSnapToContext=e[26]),128&o[0]&&(i.enablePresetDropImage=e[7]),536870912&o[0]&&(i.enablePresetSelectImage=e[29]),1280&o[0]&&(i.enableButtonFlipVertical=e[10]||e[8]),16384&o[0]&&(i.toolSelectRadius=e[14]),2097152&o[0]&&(i.willStartInteraction=e[21]),35328&o[0]&&(i.willRenderPresetToolbar=e[11]||e[9]||e[15]),2043904&o[0]&&(i.hooks={willRenderShapeControls:e[12],willRenderShapeTextControls:e[13],beforeAddShape:e[16],beforeRemoveShape:e[17],beforeDeselectShape:e[18],beforeSelectShape:e[19],beforeUpdateShape:e[20]}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Qb(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f;let{isActive:y}=t,{isActiveFraction:b}=t,{isVisible:x}=t,{stores:v}=t,{locale:w={}}=t,{stickers:S=[]}=t,{stickerForceEnable:k=!1}=t,{stickerStickToImage:C=!1}=t,{stickerEnableSelectImagePreset:T=!0}=t,{stickerEnableDropImagePreset:M=!0}=t,{stickerEnableButtonFlipVertical:R=!1}=t,{stickerWillRenderShapePresetToolbar:P}=t,{stickerEnableSelectImage:E=!0}=t,{stickersEnableButtonFlipVertical:I=!1}=t,{stickersWillRenderShapePresetToolbar:A}=t,{markupEditorGridSize:L=0}=t,{markupEditorSnapThreshold:z=0}=t,{markupEditorSnapToContext:F=!1}=t,{annotateGridSize:D}=t,{annotateSnapToContext:O}=t,{decorateGridSize:B}=t,{decorateSnapToContext:W}=t,{willRenderShapeControls:_}=t,{willRenderShapeTextControls:V}=t,{markupEditorToolSelectRadius:N}=t,{willRenderShapePresetToolbar:H}=t,{beforeAddShape:j}=t,{beforeRemoveShape:U}=t,{beforeDeselectShape:G}=t,{beforeSelectShape:Z}=t,{beforeUpdateShape:X}=t,{markupEditorWillStartInteraction:Y}=t;const{rootRect:q,imageCropRect:K,imageSelectionRectPresentation:J,imageAnnotation:Q,imageDecoration:ee,imageSize:te,imageTransforms:oe,imageTransformsInterpolated:ie,imageRotation:re,imageFlipX:ne,imageFlipY:ae}=v;return on(e,q,(e=>o(58,$=e))),on(e,J,(e=>o(54,d=e))),on(e,te,(e=>o(57,g=e))),on(e,oe,(e=>o(56,m=e))),on(e,ie,(e=>o(55,p=e))),on(e,re,(e=>o(30,f=e))),on(e,ne,(e=>o(23,h=e))),on(e,ae,(e=>o(22,u=e))),e.$$set=e=>{"isActive"in e&&o(0,y=e.isActive),"isActiveFraction"in e&&o(1,b=e.isActiveFraction),"isVisible"in e&&o(2,x=e.isVisible),"stores"in e&&o(3,v=e.stores),"locale"in e&&o(4,w=e.locale),"stickers"in e&&o(5,S=e.stickers),"stickerForceEnable"in e&&o(43,k=e.stickerForceEnable),"stickerStickToImage"in e&&o(6,C=e.stickerStickToImage),"stickerEnableSelectImagePreset"in e&&o(44,T=e.stickerEnableSelectImagePreset),"stickerEnableDropImagePreset"in e&&o(7,M=e.stickerEnableDropImagePreset),"stickerEnableButtonFlipVertical"in e&&o(8,R=e.stickerEnableButtonFlipVertical),"stickerWillRenderShapePresetToolbar"in e&&o(9,P=e.stickerWillRenderShapePresetToolbar),"stickerEnableSelectImage"in e&&o(45,E=e.stickerEnableSelectImage),"stickersEnableButtonFlipVertical"in e&&o(10,I=e.stickersEnableButtonFlipVertical),"stickersWillRenderShapePresetToolbar"in e&&o(11,A=e.stickersWillRenderShapePresetToolbar),"markupEditorGridSize"in e&&o(46,L=e.markupEditorGridSize),"markupEditorSnapThreshold"in e&&o(47,z=e.markupEditorSnapThreshold),"markupEditorSnapToContext"in e&&o(48,F=e.markupEditorSnapToContext),"annotateGridSize"in e&&o(49,D=e.annotateGridSize),"annotateSnapToContext"in e&&o(50,O=e.annotateSnapToContext),"decorateGridSize"in e&&o(51,B=e.decorateGridSize),"decorateSnapToContext"in e&&o(52,W=e.decorateSnapToContext),"willRenderShapeControls"in e&&o(12,_=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(13,V=e.willRenderShapeTextControls),"markupEditorToolSelectRadius"in e&&o(14,N=e.markupEditorToolSelectRadius),"willRenderShapePresetToolbar"in e&&o(15,H=e.willRenderShapePresetToolbar),"beforeAddShape"in e&&o(16,j=e.beforeAddShape),"beforeRemoveShape"in e&&o(17,U=e.beforeRemoveShape),"beforeDeselectShape"in e&&o(18,G=e.beforeDeselectShape),"beforeSelectShape"in e&&o(19,Z=e.beforeSelectShape),"beforeUpdateShape"in e&&o(20,X=e.beforeUpdateShape),"markupEditorWillStartInteraction"in e&&o(21,Y=e.markupEditorWillStartInteraction)},e.$$.update=()=>{16777216&e.$$.dirty[1]&&o(53,i=p?p.scale:1),24576&e.$$.dirty[1]&&o(29,r=!1!==T&&E),65536&e.$$.dirty[1]&&o(28,n=z),64&e.$$.dirty[0]|1343488&e.$$.dirty[1]&&o(27,a=C?Ao(D)?D:L:Ao(B)?B:L),64&e.$$.dirty[0]|2752512&e.$$.dirty[1]&&o(26,s=C?Ub(O)?O:F:Ub(W)?W:F),12582976&e.$$.dirty[0]|264241152&e.$$.dirty[1]&&o(25,l=C?e=>jb(e,$,g,p.origin,p.translation,m.rotation.z,p.scale,h,u):e=>{const t=pe(e);return t.x-=d.x,t.y-=d.y,t.x/=i,t.y/=i,t}),12582976&e.$$.dirty[0]|264241152&e.$$.dirty[1]&&o(24,c=C?e=>Hb(e,$,g,p.origin,p.translation,m.rotation.z,p.scale,h,u):e=>{const t=pe(e);return t.x*=i,t.y*=i,t.x+=d.x,t.y+=d.y,t})},[y,b,x,v,w,S,C,M,R,P,I,A,_,V,N,H,j,U,G,Z,X,Y,u,h,c,l,s,a,n,r,f,q,K,J,Q,ee,te,oe,ie,re,ne,ae,"sticker",k,T,E,L,z,F,D,O,B,W,i,d,p,m,g,$,function(t){Qn.call(this,e,t)}]}var ex={util:["sticker",class extends Fa{constructor(e){super(),za(this,e,Qb,Jb,Qr,{name:42,isActive:0,isActiveFraction:1,isVisible:2,stores:3,locale:4,stickers:5,stickerForceEnable:43,stickerStickToImage:6,stickerEnableSelectImagePreset:44,stickerEnableDropImagePreset:7,stickerEnableButtonFlipVertical:8,stickerWillRenderShapePresetToolbar:9,stickerEnableSelectImage:45,stickersEnableButtonFlipVertical:10,stickersWillRenderShapePresetToolbar:11,markupEditorGridSize:46,markupEditorSnapThreshold:47,markupEditorSnapToContext:48,annotateGridSize:49,annotateSnapToContext:50,decorateGridSize:51,decorateSnapToContext:52,willRenderShapeControls:12,willRenderShapeTextControls:13,markupEditorToolSelectRadius:14,willRenderShapePresetToolbar:15,beforeAddShape:16,beforeRemoveShape:17,beforeDeselectShape:18,beforeSelectShape:19,beforeUpdateShape:20,markupEditorWillStartInteraction:21},null,[-1,-1])}get name(){return this.$$.ctx[42]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[1]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[2]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[3]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),pa()}get stickers(){return this.$$.ctx[5]}set stickers(e){this.$$set({stickers:e}),pa()}get stickerForceEnable(){return this.$$.ctx[43]}set stickerForceEnable(e){this.$$set({stickerForceEnable:e}),pa()}get stickerStickToImage(){return this.$$.ctx[6]}set stickerStickToImage(e){this.$$set({stickerStickToImage:e}),pa()}get stickerEnableSelectImagePreset(){return this.$$.ctx[44]}set stickerEnableSelectImagePreset(e){this.$$set({stickerEnableSelectImagePreset:e}),pa()}get stickerEnableDropImagePreset(){return this.$$.ctx[7]}set stickerEnableDropImagePreset(e){this.$$set({stickerEnableDropImagePreset:e}),pa()}get stickerEnableButtonFlipVertical(){return this.$$.ctx[8]}set stickerEnableButtonFlipVertical(e){this.$$set({stickerEnableButtonFlipVertical:e}),pa()}get stickerWillRenderShapePresetToolbar(){return this.$$.ctx[9]}set stickerWillRenderShapePresetToolbar(e){this.$$set({stickerWillRenderShapePresetToolbar:e}),pa()}get stickerEnableSelectImage(){return this.$$.ctx[45]}set stickerEnableSelectImage(e){this.$$set({stickerEnableSelectImage:e}),pa()}get stickersEnableButtonFlipVertical(){return this.$$.ctx[10]}set stickersEnableButtonFlipVertical(e){this.$$set({stickersEnableButtonFlipVertical:e}),pa()}get stickersWillRenderShapePresetToolbar(){return this.$$.ctx[11]}set stickersWillRenderShapePresetToolbar(e){this.$$set({stickersWillRenderShapePresetToolbar:e}),pa()}get markupEditorGridSize(){return this.$$.ctx[46]}set markupEditorGridSize(e){this.$$set({markupEditorGridSize:e}),pa()}get markupEditorSnapThreshold(){return this.$$.ctx[47]}set markupEditorSnapThreshold(e){this.$$set({markupEditorSnapThreshold:e}),pa()}get markupEditorSnapToContext(){return this.$$.ctx[48]}set markupEditorSnapToContext(e){this.$$set({markupEditorSnapToContext:e}),pa()}get annotateGridSize(){return this.$$.ctx[49]}set annotateGridSize(e){this.$$set({annotateGridSize:e}),pa()}get annotateSnapToContext(){return this.$$.ctx[50]}set annotateSnapToContext(e){this.$$set({annotateSnapToContext:e}),pa()}get decorateGridSize(){return this.$$.ctx[51]}set decorateGridSize(e){this.$$set({decorateGridSize:e}),pa()}get decorateSnapToContext(){return this.$$.ctx[52]}set decorateSnapToContext(e){this.$$set({decorateSnapToContext:e}),pa()}get willRenderShapeControls(){return this.$$.ctx[12]}set willRenderShapeControls(e){this.$$set({willRenderShapeControls:e}),pa()}get willRenderShapeTextControls(){return this.$$.ctx[13]}set willRenderShapeTextControls(e){this.$$set({willRenderShapeTextControls:e}),pa()}get markupEditorToolSelectRadius(){return this.$$.ctx[14]}set markupEditorToolSelectRadius(e){this.$$set({markupEditorToolSelectRadius:e}),pa()}get willRenderShapePresetToolbar(){return this.$$.ctx[15]}set willRenderShapePresetToolbar(e){this.$$set({willRenderShapePresetToolbar:e}),pa()}get beforeAddShape(){return this.$$.ctx[16]}set beforeAddShape(e){this.$$set({beforeAddShape:e}),pa()}get beforeRemoveShape(){return this.$$.ctx[17]}set beforeRemoveShape(e){this.$$set({beforeRemoveShape:e}),pa()}get beforeDeselectShape(){return this.$$.ctx[18]}set beforeDeselectShape(e){this.$$set({beforeDeselectShape:e}),pa()}get beforeSelectShape(){return this.$$.ctx[19]}set beforeSelectShape(e){this.$$set({beforeSelectShape:e}),pa()}get beforeUpdateShape(){return this.$$.ctx[20]}set beforeUpdateShape(e){this.$$set({beforeUpdateShape:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[21]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}},({stickers:e,stickerEnableSelectImage:t,stickerEnableSelectImagePreset:o,stickerEnableDropImagePreset:i,stickerForceEnable:r})=>e&&e.length||t||o||i||r]};function tx(e){let t,o,i,r,n,a=(e[14](e[34].value)||"")+"",s=(P(e[34].label)?e[34].label(e[1]):e[34].label)+"";return{c(){t=kn("div"),o=new Bn(!1),i=Mn(),r=kn("span"),n=Tn(s),o.a=i,An(t,"slot","option")},m(e,s){wn(e,t,s),o.m(a,t),bn(t,i),bn(t,r),bn(r,n)},p(e,t){8&t[1]&&a!==(a=(e[14](e[34].value)||"")+"")&&o.p(a),2&t[0]|8&t[1]&&s!==(s=(P(e[34].label)?e[34].label(e[1]):e[34].label)+"")&&Fn(n,s)},d(e){e&&Sn(t)}}}function ox(e){let t,o;return t=new Wu({props:{locale:e[1],class:"PinturaControlList",layout:"row",options:e[2],selectedIndex:e[6],onchange:e[12],$$slots:{option:[tx,({option:e})=>({34:e}),({option:e})=>[0,e?8:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};2&o[0]&&(i.locale=e[1]),4&o[0]&&(i.options=e[2]),64&o[0]&&(i.selectedIndex=e[6]),2&o[0]|24&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function ix(e){let t,o,i,r,n;return o=new Jy({props:{locale:e[1],class:"PinturaControlPanels",shape:e[4],onchange:e[13],controls:e[3],scrollElasticity:e[7]}}),r=new vd({props:{elasticity:e[10],$$slots:{default:[ox]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),i=Mn(),Ia(r.$$.fragment),An(t,"slot","footer"),An(t,"style",e[5])},m(e,a){wn(e,t,a),Aa(o,t,null),bn(t,i),Aa(r,t,null),n=!0},p(e,i){const a={};2&i[0]&&(a.locale=e[1]),16&i[0]&&(a.shape=e[4]),8&i[0]&&(a.controls=e[3]),128&i[0]&&(a.scrollElasticity=e[7]),o.$set(a);const s={};70&i[0]|16&i[1]&&(s.$$scope={dirty:i,ctx:e}),r.$set(s),(!n||32&i[0])&&An(t,"style",e[5])},i(e){n||(xa(o.$$.fragment,e),xa(r.$$.fragment,e),n=!0)},o(e){va(o.$$.fragment,e),va(r.$$.fragment,e),n=!1},d(e){e&&Sn(t),La(o),La(r)}}}function rx(e){let t,o;return t=new J$({props:{$$slots:{footer:[ix]},$$scope:{ctx:e}}}),t.$on("measure",e[23]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};254&o[0]|16&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function nx(e,t,o){let i,r,n,a,s,l,c,d,u=Gr,h=()=>(u(),u=en(p,(e=>o(20,s=e))),p);e.$$.on_destroy.push((()=>u()));let{isActive:p}=t;h();let{stores:m}=t,{locale:g={}}=t,{frameStyles:$={}}=t,{frameOptions:f=[]}=t,{markupEditorShapeStyleControls:y}=t;const b=Jn("elasticityMultiplier");on(e,b,(e=>o(22,d=e)));const{history:x,animation:v,scrollElasticity:w,imageFrame:S,allowPan:k,allowZoom:C,allowZoomControls:T,allowPlayPause:M}=m;on(e,v,(e=>o(21,l=e))),on(e,S,(e=>o(4,c=e)));let R={};let P;const E=ec(l?20:0);return on(e,E,(e=>o(19,a=e))),e.$$set=e=>{"isActive"in e&&h(o(0,p=e.isActive)),"stores"in e&&o(17,m=e.stores),"locale"in e&&o(1,g=e.locale),"frameStyles"in e&&o(18,$=e.frameStyles),"frameOptions"in e&&o(2,f=e.frameOptions),"markupEditorShapeStyleControls"in e&&o(3,y=e.markupEditorShapeStyleControls)},e.$$.update=()=>{1048576&e.$$.dirty[0]&&k.set(s),1048576&e.$$.dirty[0]&&C.set(s),1048576&e.$$.dirty[0]&&T.set(s),1048576&e.$$.dirty[0]&&s&&M.set(!0),4194304&e.$$.dirty[0]&&o(7,i=d*w),20&e.$$.dirty[0]&&o(6,r=c?f.findIndex((([e])=>e===c.id)):0),3145728&e.$$.dirty[0]&&l&&E.set(s?0:20),524288&e.$$.dirty[0]&&o(5,n=a?`transform: translateY(${a}px)`:void 0)},[p,g,f,y,c,n,r,i,b,v,w,S,({value:e})=>{const t=$[e];if(!t||!t.shape)return S.set(void 0),void x.write();const{shape:o}=t,i={id:e,...fi(o),...Object.keys(R).reduce(((e,t)=>o[t]?(e[t]=R[t],e):e),{})};S.set(i),x.write()},function(e){zo(e,"frameColor")&&(R.frameColor=e.frameColor),c&&(fr(c,e),S.set(c),clearTimeout(P),P=setTimeout((()=>{x.write()}),200))},e=>{const t=$[e];var o;if(t&&t.thumb)return o=t.thumb,/div/i.test(o)||Qy(o)?o:/rect|path|circle|line|/i.test(o)?``:``},E,"frame",m,$,a,s,l,d,function(t){Qn.call(this,e,t)}]}var ax={util:["frame",class extends Fa{constructor(e){super(),za(this,e,nx,rx,Qr,{name:16,isActive:0,stores:17,locale:1,frameStyles:18,frameOptions:2,markupEditorShapeStyleControls:3},null,[-1,-1])}get name(){return this.$$.ctx[16]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get stores(){return this.$$.ctx[17]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[1]}set locale(e){this.$$set({locale:e}),pa()}get frameStyles(){return this.$$.ctx[18]}set frameStyles(e){this.$$set({frameStyles:e}),pa()}get frameOptions(){return this.$$.ctx[2]}set frameOptions(e){this.$$set({frameOptions:e}),pa()}get markupEditorShapeStyleControls(){return this.$$.ctx[3]}set markupEditorShapeStyleControls(e){this.$$set({markupEditorShapeStyleControls:e}),pa()}},({src:e})=>e&&!kp(e)]};function sx(e){let t,o,i,r,n,a,s,l;return{c(){t=kn("div"),o=kn("input"),r=Mn(),n=kn("label"),a=Tn(e[1]),An(o,"id",e[0]),An(o,"type","number"),An(o,"min","1"),An(o,"inputmode","numeric"),An(o,"pattern","[0-9]*"),An(o,"data-state",e[3]),An(o,"autocomplete","off"),An(o,"placeholder",e[4]),o.value=i=void 0===e[5]?"":e[7](e[5]+""),An(n,"for",e[0]),An(n,"title",e[2]),An(n,"aria-label",e[2]),An(t,"class","PinturaInputDimension")},m(i,c){wn(i,t,c),bn(t,o),bn(t,r),bn(t,n),bn(n,a),s||(l=Pn(o,"input",e[8]),s=!0)},p(e,[t]){1&t&&An(o,"id",e[0]),8&t&&An(o,"data-state",e[3]),16&t&&An(o,"placeholder",e[4]),160&t&&i!==(i=void 0===e[5]?"":e[7](e[5]+""))&&o.value!==i&&(o.value=i),2&t&&Fn(a,e[1]),1&t&&An(n,"for",e[0]),4&t&&An(n,"title",e[2]),4&t&&An(n,"aria-label",e[2])},i:Gr,o:Gr,d(e){e&&Sn(t),s=!1,l()}}}function lx(e,t,o){let{id:i}=t,{label:r}=t,{title:n}=t,{state:a}=t,{placeholder:s}=t,{value:l}=t,{onchange:c}=t,{format:d=(e=>e.replace(/\D/g,""))}=t;return e.$$set=e=>{"id"in e&&o(0,i=e.id),"label"in e&&o(1,r=e.label),"title"in e&&o(2,n=e.title),"state"in e&&o(3,a=e.state),"placeholder"in e&&o(4,s=e.placeholder),"value"in e&&o(5,l=e.value),"onchange"in e&&o(6,c=e.onchange),"format"in e&&o(7,d=e.format)},[i,r,n,a,s,l,c,d,e=>c(d(e.currentTarget.value))]}class cx extends Fa{constructor(e){super(),za(this,e,lx,sx,Qr,{id:0,label:1,title:2,state:3,placeholder:4,value:5,onchange:6,format:7})}}function dx(e){let t;return{c(){t=Cn("g")},m(o,i){wn(o,t,i),t.innerHTML=e[2]},p(e,o){4&o&&(t.innerHTML=e[2])},d(e){e&&Sn(t)}}}function ux(e){let t,o,i,r,n,a,s,l;return n=new td({props:{$$slots:{default:[dx]},$$scope:{ctx:e}}}),{c(){t=kn("div"),o=kn("input"),i=Mn(),r=kn("label"),Ia(n.$$.fragment),An(o,"id",e[0]),An(o,"class","implicit"),An(o,"type","checkbox"),o.checked=e[1],An(r,"for",e[0]),An(r,"title",e[3])},m(c,d){wn(c,t,d),bn(t,o),bn(t,i),bn(t,r),Aa(n,r,null),a=!0,s||(l=Pn(o,"change",e[5]),s=!0)},p(e,[t]){(!a||1&t)&&An(o,"id",e[0]),(!a||2&t)&&(o.checked=e[1]);const i={};68&t&&(i.$$scope={dirty:t,ctx:e}),n.$set(i),(!a||1&t)&&An(r,"for",e[0]),(!a||8&t)&&An(r,"title",e[3])},i(e){a||(xa(n.$$.fragment,e),a=!0)},o(e){va(n.$$.fragment,e),a=!1},d(e){e&&Sn(t),La(n),s=!1,l()}}}function hx(e,t,o){let{id:i}=t,{locked:r}=t,{icon:n}=t,{title:a}=t,{onchange:s}=t;return e.$$set=e=>{"id"in e&&o(0,i=e.id),"locked"in e&&o(1,r=e.locked),"icon"in e&&o(2,n=e.icon),"title"in e&&o(3,a=e.title),"onchange"in e&&o(4,s=e.onchange)},[i,r,n,a,s,e=>s(e.currentTarget.checked)]}class px extends Fa{constructor(e){super(),za(this,e,hx,ux,Qr,{id:0,locked:1,icon:2,title:3,onchange:4})}}function mx(e){let t;return{c(){t=Tn("Save")},m(e,o){wn(e,t,o)},d(e){e&&Sn(t)}}}function gx(e){let t,o,i,r,n,a,s,l,c,d,u,h,p,m=e[1].resizeLabelFormCaption+"";return l=new up({props:{items:e[4]}}),d=new cd({props:{type:"submit",class:"implicit",$$slots:{default:[mx]},$$scope:{ctx:e}}}),{c(){t=kn("form"),o=kn("div"),i=kn("fieldset"),r=kn("legend"),n=Tn(m),a=Mn(),s=kn("div"),Ia(l.$$.fragment),c=Mn(),Ia(d.$$.fragment),An(r,"class","implicit"),An(s,"class","PinturaFieldsetInner"),An(o,"class","PinturaFormInner"),An(t,"slot","footer"),An(t,"style",e[3])},m(m,g){wn(m,t,g),bn(t,o),bn(o,i),bn(i,r),bn(r,n),bn(i,a),bn(i,s),Aa(l,s,null),e[65](s),bn(o,c),Aa(d,o,null),u=!0,h||(p=[Pn(s,"focusin",e[15]),Pn(s,"focusout",e[16]),Pn(t,"submit",En(e[17]))],h=!0)},p(e,o){(!u||2&o[0])&&m!==(m=e[1].resizeLabelFormCaption+"")&&Fn(n,m);const i={};16&o[0]&&(i.items=e[4]),l.$set(i);const r={};16&o[3]&&(r.$$scope={dirty:o,ctx:e}),d.$set(r),(!u||8&o[0])&&An(t,"style",e[3])},i(e){u||(xa(l.$$.fragment,e),xa(d.$$.fragment,e),u=!0)},o(e){va(l.$$.fragment,e),va(d.$$.fragment,e),u=!1},d(o){o&&Sn(t),La(l),e[65](null),La(d),h=!1,Kr(p)}}}function $x(e){let t,o;return t=new J$({props:{$$slots:{footer:[gx]},$$scope:{ctx:e}}}),t.$on("measure",e[66]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};30&o[0]|16&o[3]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function fx(e,t,o){let i,r,n,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,P,E,I,A,z,F=Gr,D=()=>(F(),F=en(B,(e=>o(49,p=e))),B);e.$$.on_destroy.push((()=>F()));const O=(e,t=0,o=9999)=>{if(R(e)&&!(e=e.replace(/\D/g,"")).length)return;const i=Math.round(e);return Number.isNaN(i)?void 0:ns(i,t,o)};let{isActive:B}=t;D();let{stores:W}=t,{locale:_={}}=t,{resizeMinSize:V=We(1,1)}=t,{resizeMaxSize:N=We(9999,9999)}=t,{resizeAspectRatioLocked:H=!1}=t,{resizeEnableButtonLockAspectRatio:j=!0}=t,{resizeSizePresetOptions:Z}=t,{resizeWidthPresetOptions:X}=t,{resizeHeightPresetOptions:Y}=t,{resizeWillRenderFooter:q=G}=t;const K=ec(0,{stiffness:.15,damping:.3});on(e,K,(e=>o(54,y=e)));const{animation:J,imageSize:Q,imageCropRect:ee,imageCropRectAspectRatio:te,imageCropAspectRatio:oe,imageOutputSize:ie,imageSelectionZoom:re,imageSelectionPan:ne,history:ae,env:se,allowPan:le,allowZoom:ce,allowZoomControls:ue,allowPlayPause:he}=W;on(e,J,(e=>o(50,m=e))),on(e,Q,(e=>o(73,I=e))),on(e,ee,(e=>o(52,$=e))),on(e,te,(e=>o(53,f=e))),on(e,oe,(e=>o(72,T=e))),on(e,ie,(e=>o(61,C=e))),on(e,re,(e=>o(74,A=e))),on(e,ne,(e=>o(75,z=e))),on(e,se,(e=>o(51,g=e)));const pe=L();let me,ge,$e,fe,ye,be,xe=de();const ve=(e,t,o,i,r)=>null!=e&&o!==t?e>=i[t]&&e<=r[t]?"valid":"invalid":"undetermined",we=(e,t,o)=>Math.round(null!=e?e/t:o.height),Se=()=>{H&&ge&&$e&&("width"===fe?o(39,$e=Math.round(ge/f)):"height"===fe?o(38,ge=Math.round($e*f)):("width"===ye?o(39,$e=Math.round(ge/f)):"height"===ye&&o(38,ge=Math.round($e*f)),ke()))},ke=e=>{let t=O(ge),i=O($e),r=t,n=i,a=r&&n,s=e||f;if(!r&&!n)return;r&&!n?n=Math.round(r/s):n&&!r&&(r=Math.round(n*s)),s=e||a?U(r,n):f;let l=We(r,n);je(N,l)||(l=xt(N,s)),je(l,V)||(l=bt(V,s)),o(38,ge=null!=t?Math.round(l.width):void 0),o(39,$e=null!=i?Math.round(l.height):void 0)},Ce=()=>{ke();const{width:e,height:t}=C||{};e===ge&&t===$e||(ge||$e?(ge&&$e&&un(oe,T=ge/$e,T),un(ie,C=We(ge,$e),C)):(un(oe,T=I.width/I.height,T),un(oe,T=void 0,T),un(ie,C=void 0,C)),ae.write())},Te=ie.subscribe((e=>{if(!e)return o(38,ge=void 0),void o(39,$e=void 0);o(38,ge=e.width),o(39,$e=e.height),ke()})),Me=oe.subscribe((e=>{(ge||$e)&&e&&(ge&&$e&&U(ge,$e)!==e?(o(39,$e=ge/e),ke(e)):ke())})),Re=e=>R(e[0])?(e[1]=e[1].map(Re),e):Ao(e)?[e,""+e]:e,Pe=e=>{if(R(e[0]))return e[1]=e[1].map(Pe),e;let[t,o]=e;if(Ao(t)&&Ao(o)){const[e,i]=[t,o];o=`${e} × ${i}`,t=[e,i]}return[t,o]},Ee=Ba();on(e,Ee,(e=>o(60,k=e)));const Ie=Ba();on(e,Ie,(e=>o(64,E=e)));const Ae=Ba();on(e,Ae,(e=>o(58,w=e)));const Le=Ba();on(e,Le,(e=>o(63,P=e)));const ze=Ba();on(e,ze,(e=>o(56,x=e)));const Fe=Ba();on(e,Fe,(e=>o(62,M=e)));const De=Wa([ie,Ie],(([e,t],o)=>{if(!t)return o(-1);const i=t.findIndex((([t])=>{if(!t&&!e)return!0;if(!t)return!1;const[o,i]=t;return e.width===o&&e.height===i}));o(i<0?0:i)}));on(e,De,(e=>o(59,S=e)));const Be=Wa([ie,Le],(([e,t],o)=>{if(!t)return o(-1);const i=t.findIndex((([t])=>!t&&!e||!!t&&e.width===t));o(i<0?0:i)}));on(e,Be,(e=>o(57,v=e)));const _e=Wa([ie,Fe],(([e,t],o)=>{if(!t)return o(-1);const i=t.findIndex((([t])=>!t&&!e||!!t&&e.height===t));o(i<0?0:i)}));on(e,_e,(e=>o(55,b=e)));let Ve=void 0,Ne=void 0;const He=Jn("redrawTrigger"),Ue=ec(m?20:0);return on(e,Ue,(e=>o(48,h=e))),Yn((()=>{Te(),Me()})),e.$$set=e=>{"isActive"in e&&D(o(0,B=e.isActive)),"stores"in e&&o(30,W=e.stores),"locale"in e&&o(1,_=e.locale),"resizeMinSize"in e&&o(31,V=e.resizeMinSize),"resizeMaxSize"in e&&o(32,N=e.resizeMaxSize),"resizeAspectRatioLocked"in e&&o(28,H=e.resizeAspectRatioLocked),"resizeEnableButtonLockAspectRatio"in e&&o(33,j=e.resizeEnableButtonLockAspectRatio),"resizeSizePresetOptions"in e&&o(34,Z=e.resizeSizePresetOptions),"resizeWidthPresetOptions"in e&&o(35,X=e.resizeWidthPresetOptions),"resizeHeightPresetOptions"in e&&o(36,Y=e.resizeHeightPresetOptions),"resizeWillRenderFooter"in e&&o(37,q=e.resizeWillRenderFooter)},e.$$.update=()=>{var t;262144&e.$$.dirty[1]&&le.set(!p),262144&e.$$.dirty[1]&&ce.set(!p),262144&e.$$.dirty[1]&&ue.set(!p),262144&e.$$.dirty[1]&&p&&he.set(!0),536870920&e.$$.dirty[1]&&Z&&(un(Ee,k=Z.map(Pe),k),un(Ie,E=cu(k),E)),536870912&e.$$.dirty[1]&&o(47,a=!!k),268435456&e.$$.dirty[1]|4&e.$$.dirty[2]&&o(46,i=S>-1&&E[S][1]),134217744&e.$$.dirty[1]&&X&&(un(Ae,w=X.map(Re),w),un(Le,P=cu(w),P)),134283264&e.$$.dirty[1]&&o(44,s=!a&&w),67108864&e.$$.dirty[1]|2&e.$$.dirty[2]&&o(45,r=v>-1&&P[v][1]),33554464&e.$$.dirty[1]&&Y&&(un(ze,x=Y.map(Re),x),un(Fe,M=cu(x),M)),33619968&e.$$.dirty[1]&&o(43,l=!a&&x),16777216&e.$$.dirty[1]|1&e.$$.dirty[2]&&o(42,n=b>-1&&M[b][1]),77824&e.$$.dirty[1]&&o(41,c=!a&&!s&&!l),268435458&e.$$.dirty[0]|1072824263&e.$$.dirty[1]&&o(4,d=He&&Fp((()=>{return q([a&&["Dropdown","size-presets",{label:i,options:k,onchange:e=>{return(t=e.value)&&!Ve&&(Ve={...$},Ne=T),t?(un(oe,T=U(t[0],t[1]),T),un(ie,C=Oe(t),C)):(un(ee,$=Ve,$),un(oe,T=Ne,T),un(ie,C=void 0,C),Ve=void 0,Ne=void 0),void ae.write();var t},selectedIndex:S}],s&&["Dropdown","width-presets",{label:r,options:w,onchange:e=>{o(38,ge=e.value),Ce()},selectedIndex:v}],s&&l&&["span","times",{class:"PinturaResizeLabel",innerHTML:"×"}],l&&["Dropdown","height-presets",{label:n,options:x,onchange:e=>{o(39,$e=e.value),Ce()},selectedIndex:b}],c&&[cx,"width-input",{id:"width-"+pe,title:_.resizeTitleInputWidth,label:_.resizeLabelInputWidth,placeholder:(e=O($e),t=f,d=$,Math.round(null!=e?e*t:d.width)),value:ge,state:ve(O(ge),"width",fe,V,N),onchange:e=>{o(38,ge=e),Se()}}],c&&j&&[px,"aspect-ratio-lock",{id:"aspect-ratio-lock-"+pe,title:_.resizeTitleButtonMaintainAspectRatio,icon:R(_.resizeIconButtonMaintainAspectRatio)?_.resizeIconButtonMaintainAspectRatio:_.resizeIconButtonMaintainAspectRatio(H,y),locked:H,onchange:e=>{o(28,H=e),Se()}}],c&&[cx,"height-input",{id:"height-"+pe,title:_.resizeTitleInputHeight,label:_.resizeLabelInputHeight,placeholder:we(O(ge),f,$),value:$e,state:ve(O($e),"height",fe,V,N),onchange:e=>{o(39,$e=e),Se()}}]].filter(Boolean),{...g},(()=>He.set({})));var e,t,d})).filter(Boolean)),268435456&e.$$.dirty[0]&&K.set(H?1:0),512&e.$$.dirty[1]&&fe&&(ye=fe),262144&e.$$.dirty[1]&&p&&(xe=z,be=A),1074003968&e.$$.dirty[1]&&(p?(t=C,un(ne,z=de(),z),un(re,A=t&&$?t.width/$.width||t.height/$.height:1,A)):(un(ne,z=xe,z),un(re,A=be,A))),786432&e.$$.dirty[1]&&m&&Ue.set(p?0:20),131072&e.$$.dirty[1]&&o(3,u=h?`transform: translateY(${h}px)`:void 0)},[B,_,me,u,d,K,J,Q,ee,te,oe,ie,re,ne,se,e=>{const t=e.target.id;/width/.test(t)?o(40,fe="width"):/height/.test(t)?o(40,fe="height"):/aspectRatio/i.test(t)?o(40,fe="lock"):o(40,fe=void 0)},e=>{me.contains(e.relatedTarget)||Ce(),o(40,fe=void 0)},Ce,Ee,Ie,Ae,Le,ze,Fe,De,Be,_e,Ue,H,"resize",W,V,N,j,Z,X,Y,q,ge,$e,fe,c,n,l,s,r,i,a,h,p,m,g,$,f,y,b,x,v,w,S,k,C,M,P,E,function(e){ta[e?"unshift":"push"]((()=>{me=e,o(2,me)}))},function(t){Qn.call(this,e,t)}]}var yx={util:["resize",class extends Fa{constructor(e){super(),za(this,e,fx,$x,Qr,{name:29,isActive:0,stores:30,locale:1,resizeMinSize:31,resizeMaxSize:32,resizeAspectRatioLocked:28,resizeEnableButtonLockAspectRatio:33,resizeSizePresetOptions:34,resizeWidthPresetOptions:35,resizeHeightPresetOptions:36,resizeWillRenderFooter:37},null,[-1,-1,-1,-1])}get name(){return this.$$.ctx[29]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get stores(){return this.$$.ctx[30]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[1]}set locale(e){this.$$set({locale:e}),pa()}get resizeMinSize(){return this.$$.ctx[31]}set resizeMinSize(e){this.$$set({resizeMinSize:e}),pa()}get resizeMaxSize(){return this.$$.ctx[32]}set resizeMaxSize(e){this.$$set({resizeMaxSize:e}),pa()}get resizeAspectRatioLocked(){return this.$$.ctx[28]}set resizeAspectRatioLocked(e){this.$$set({resizeAspectRatioLocked:e}),pa()}get resizeEnableButtonLockAspectRatio(){return this.$$.ctx[33]}set resizeEnableButtonLockAspectRatio(e){this.$$set({resizeEnableButtonLockAspectRatio:e}),pa()}get resizeSizePresetOptions(){return this.$$.ctx[34]}set resizeSizePresetOptions(e){this.$$set({resizeSizePresetOptions:e}),pa()}get resizeWidthPresetOptions(){return this.$$.ctx[35]}set resizeWidthPresetOptions(e){this.$$set({resizeWidthPresetOptions:e}),pa()}get resizeHeightPresetOptions(){return this.$$.ctx[36]}set resizeHeightPresetOptions(e){this.$$set({resizeHeightPresetOptions:e}),pa()}get resizeWillRenderFooter(){return this.$$.ctx[37]}set resizeWillRenderFooter(e){this.$$set({resizeWillRenderFooter:e}),pa()}},({src:e})=>e&&!kp(e)]};function bx(e){let t,o;return t=new Nb({props:{stores:e[3],locale:e[4],isActive:e[0],isActiveFraction:e[1],isVisible:e[2],mapScreenPointToImagePoint:e[9],mapImagePointToScreenPoint:e[8],utilKey:"redact",imageRotation:e[10],imageFlipX:e[7],imageFlipY:e[6],shapes:e[11],toolbar:["rect"],toolShapes:{rectangle:[{x:0,y:0,width:0,height:0}]},toolActive:"rectangle",parentRect:e[13],enablePresetDropImage:!1,enablePresetSelectImage:!1,willStartInteraction:e[5],hooks:{willRenderShapeControls:e[24]}}}),t.$on("measure",e[25]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,[o]){const i={};8&o&&(i.stores=e[3]),16&o&&(i.locale=e[4]),1&o&&(i.isActive=e[0]),2&o&&(i.isActiveFraction=e[1]),4&o&&(i.isVisible=e[2]),512&o&&(i.mapScreenPointToImagePoint=e[9]),256&o&&(i.mapImagePointToScreenPoint=e[8]),1024&o&&(i.imageRotation=e[10]),128&o&&(i.imageFlipX=e[7]),64&o&&(i.imageFlipY=e[6]),32&o&&(i.willStartInteraction=e[5]),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function xx(e,t,o){let i,r,n,a,s,l,c,d,u;let{isActive:h}=t,{isActiveFraction:p}=t,{isVisible:m}=t,{stores:g}=t,{locale:$={}}=t,{markupEditorWillStartInteraction:f}=t;const{imageRedaction:y,rootRect:b,imageSize:x,imageRotation:v,imageFlipX:w,imageFlipY:S,imageTransforms:k,imageTransformsInterpolated:C}=g;on(e,b,(e=>o(23,d=e))),on(e,x,(e=>o(22,c=e))),on(e,v,(e=>o(10,u=e))),on(e,w,(e=>o(7,a=e))),on(e,S,(e=>o(6,n=e))),on(e,k,(e=>o(21,l=e))),on(e,C,(e=>o(20,s=e)));return e.$$set=e=>{"isActive"in e&&o(0,h=e.isActive),"isActiveFraction"in e&&o(1,p=e.isActiveFraction),"isVisible"in e&&o(2,m=e.isVisible),"stores"in e&&o(3,g=e.stores),"locale"in e&&o(4,$=e.locale),"markupEditorWillStartInteraction"in e&&o(5,f=e.markupEditorWillStartInteraction)},e.$$.update=()=>{15728832&e.$$.dirty&&o(9,i=e=>jb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n)),15728832&e.$$.dirty&&o(8,r=e=>Hb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n))},[h,p,m,g,$,f,n,a,r,i,u,y,b,x,v,w,S,k,C,"redact",s,l,c,d,e=>{const t=zm(e[0]);return Dm("to-front",t),e},function(t){Qn.call(this,e,t)}]}var vx={util:["redact",class extends Fa{constructor(e){super(),za(this,e,xx,bx,Qr,{name:19,isActive:0,isActiveFraction:1,isVisible:2,stores:3,locale:4,markupEditorWillStartInteraction:5})}get name(){return this.$$.ctx[19]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[1]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[2]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[3]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[5]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}},({src:e})=>e&&!kp(e)]};function wx(e){let t,o,i=(P(e[32].label)?e[32].label(e[1]):e[32].label)+"";return{c(){t=kn("span"),o=Tn(i)},m(e,i){wn(e,t,i),bn(t,o)},p(e,t){2&t[0]|2&t[1]&&i!==(i=(P(e[32].label)?e[32].label(e[1]):e[32].label)+"")&&Fn(o,i)},d(e){e&&Sn(t)}}}function Sx(e){let t,o,i,r=(e[11](e[32].value)||"")+"",n=e[32].label&&wx(e);return{c(){t=kn("div"),o=new Bn(!1),i=Mn(),n&&n.c(),o.a=i,An(t,"slot","option")},m(e,a){wn(e,t,a),o.m(r,t),bn(t,i),n&&n.m(t,null)},p(e,i){2&i[1]&&r!==(r=(e[11](e[32].value)||"")+"")&&o.p(r),e[32].label?n?n.p(e,i):(n=wx(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&Sn(t),n&&n.d()}}}function kx(e){let t,o;return t=new Wu({props:{locale:e[1],class:"PinturaControlList",layout:"row",options:e[2],selectedIndex:e[4],onchange:e[10],$$slots:{option:[Sx,({option:e})=>({32:e}),({option:e})=>[0,e?2:0]]},$$scope:{ctx:e}}}),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};2&o[0]&&(i.locale=e[1]),4&o[0]&&(i.options=e[2]),16&o[0]&&(i.selectedIndex=e[4]),2&o[0]|6&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Cx(e){let t,o,i;return o=new vd({props:{elasticity:e[5],$$slots:{default:[kx]},$$scope:{ctx:e}}}),{c(){t=kn("div"),Ia(o.$$.fragment),An(t,"slot","footer"),An(t,"style",e[3])},m(e,r){wn(e,t,r),Aa(o,t,null),i=!0},p(e,r){const n={};32&r[0]&&(n.elasticity=e[5]),22&r[0]|4&r[1]&&(n.$$scope={dirty:r,ctx:e}),o.$set(n),(!i||8&r[0])&&An(t,"style",e[3])},i(e){i||(xa(o.$$.fragment,e),i=!0)},o(e){va(o.$$.fragment,e),i=!1},d(e){e&&Sn(t),La(o)}}}function Tx(e){let t,o;return t=new J$({props:{$$slots:{footer:[Cx]},$$scope:{ctx:e}}}),t.$on("measure",e[22]),{c(){Ia(t.$$.fragment)},m(e,i){Aa(t,e,i),o=!0},p(e,o){const i={};62&o[0]|4&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(xa(t.$$.fragment,e),o=!0)},o(e){va(t.$$.fragment,e),o=!1},d(e){La(t,e)}}}function Mx(e,t,o){let i,r,n,a,s,l,c,d,u,h,p=Gr,m=()=>(p(),p=en(g,(e=>o(17,l=e))),g);e.$$.on_destroy.push((()=>p()));let{isActive:g}=t;m();let{stores:$}=t,{locale:f={}}=t,{fillOptions:y=[]}=t;const b=e=>e.map((e=>(e=>Fo(e)&&R(e[0])&&Fo(e[1]))(e)?[e[0],b(e[1]),e[2]]:(e=>[Array.isArray(e)&&3===e.length?[...e,1]:e,void 0,{disabled:!1}])(e))),x=Jn("elasticityMultiplier");on(e,x,(e=>o(21,h=e)));const{history:v,animation:w,scrollElasticity:S,imageBackgroundColor:k,imageBackgroundImage:C,allowPan:T,allowZoom:M,allowZoomControls:P,allowPlayPause:E}=$;on(e,w,(e=>o(18,c=e))),on(e,k,(e=>o(20,u=e))),on(e,C,(e=>o(19,d=e)));const I=ec(c?20:0);return on(e,I,(e=>o(16,s=e))),e.$$set=e=>{"isActive"in e&&m(o(0,g=e.isActive)),"stores"in e&&o(14,$=e.stores),"locale"in e&&o(1,f=e.locale),"fillOptions"in e&&o(15,y=e.fillOptions)},e.$$.update=()=>{32768&e.$$.dirty[0]&&o(2,i=b(y)),131072&e.$$.dirty[0]&&T.set(l),131072&e.$$.dirty[0]&&M.set(l),131072&e.$$.dirty[0]&&P.set(l),131072&e.$$.dirty[0]&&l&&E.set(!0),2097152&e.$$.dirty[0]&&o(5,r=h*S),1572868&e.$$.dirty[0]&&o(4,n=i.findIndex((([e])=>d?e===d:Array.isArray(e)?ds(e,u):void 0))||0),393216&e.$$.dirty[0]&&c&&I.set(l?0:20),65536&e.$$.dirty[0]&&o(3,a=s?`transform: translateY(${s}px)`:void 0)},[g,f,i,a,n,r,x,w,k,C,({value:e})=>{R(e)&&(un(k,u=void 0,u),un(C,d=e,d)),Fo(e)&&(un(k,u=e,u),un(C,d=void 0,d)),v.write()},e=>{if(R(e))return`
`;if(Fo(e)){const[t,o,i,r]=e.map(((e,t)=>t<3?Math.round(255*e):e));return`
`}return"
"},I,"fill",$,y,s,l,c,d,u,h,function(t){Qn.call(this,e,t)}]}var Rx={util:["fill",class extends Fa{constructor(e){super(),za(this,e,Mx,Tx,Qr,{name:13,isActive:0,stores:14,locale:1,fillOptions:15},null,[-1,-1])}get name(){return this.$$.ctx[13]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),pa()}get stores(){return this.$$.ctx[14]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[1]}set locale(e){this.$$set({locale:e}),pa()}get fillOptions(){return this.$$.ctx[15]}set fillOptions(e){this.$$set({fillOptions:e}),pa()}},({src:e,fillOptions:t})=>e&&!kp(e)&&t&&t.length]};function Px(e){let t,o,i;function r(t){e[41](t)}let n={utilKey:"retouch",stores:e[4],locale:e[5],isActive:e[1],isActiveFraction:e[2],isVisible:e[3],mapScreenPointToImagePoint:e[26],mapImagePointToScreenPoint:e[25],imageRotation:e[27],imageFlipX:e[24],imageFlipY:e[23],toolbar:e[6],toolbarLayout:"stack",shapes:e[29],toolShapes:e[7],enableViewTool:e[14],enableMoveTool:e[13],enableToolShareStyles:!1,shapeControls:e[8],enablePresetSelectImage:!1,enablePresetDropImage:!1,parentRect:e[30],willStartInteraction:e[12],willRenderHeaderTools:e[10]||e[17],willRenderShapeStyleControls:e[9],hooks:{willRenderShapeControls:e[11]||e[15],willRenderShapeTextControls:e[16],beforeAddShape:e[18],beforeRemoveShape:e[19],beforeDeselectShape:e[20],beforeSelectShape:e[21],beforeUpdateShape:e[22]}};return void 0!==e[0]&&(n.toolActive=e[0]),t=new Nb({props:n}),ta.push((()=>Ea(t,"toolActive",r))),t.$on("measure",e[42]),{c(){Ia(t.$$.fragment)},m(e,o){Aa(t,e,o),i=!0},p(e,i){const r={};16&i[0]&&(r.stores=e[4]),32&i[0]&&(r.locale=e[5]),2&i[0]&&(r.isActive=e[1]),4&i[0]&&(r.isActiveFraction=e[2]),8&i[0]&&(r.isVisible=e[3]),67108864&i[0]&&(r.mapScreenPointToImagePoint=e[26]),33554432&i[0]&&(r.mapImagePointToScreenPoint=e[25]),134217728&i[0]&&(r.imageRotation=e[27]),16777216&i[0]&&(r.imageFlipX=e[24]),8388608&i[0]&&(r.imageFlipY=e[23]),64&i[0]&&(r.toolbar=e[6]),128&i[0]&&(r.toolShapes=e[7]),16384&i[0]&&(r.enableViewTool=e[14]),8192&i[0]&&(r.enableMoveTool=e[13]),256&i[0]&&(r.shapeControls=e[8]),4096&i[0]&&(r.willStartInteraction=e[12]),132096&i[0]&&(r.willRenderHeaderTools=e[10]||e[17]),512&i[0]&&(r.willRenderShapeStyleControls=e[9]),8226816&i[0]&&(r.hooks={willRenderShapeControls:e[11]||e[15],willRenderShapeTextControls:e[16],beforeAddShape:e[18],beforeRemoveShape:e[19],beforeDeselectShape:e[20],beforeSelectShape:e[21],beforeUpdateShape:e[22]}),!o&&1&i[0]&&(o=!0,r.toolActive=e[0],ca((()=>o=!1))),t.$set(r)},i(e){i||(xa(t.$$.fragment,e),i=!0)},o(e){va(t.$$.fragment,e),i=!1},d(e){La(t,e)}}}function Ex(e,t,o){let i,r,n,a,s,l,c,d,u;let{isActive:h}=t,{isActiveFraction:p}=t,{isVisible:m}=t,{stores:g}=t,{locale:$={}}=t,{retouchTools:f}=t,{retouchToolShapes:y}=t,{retouchShapeControls:b}=t,{retouchActiveTool:x}=t,{retouchWillRenderShapeStyleControls:v}=t,{retouchWillRenderHeaderTools:w}=t,{retouchWillRenderShapeControls:S}=t,{markupEditorWillStartInteraction:k}=t,{retouchEnableMoveTool:C}=t,{retouchEnableViewTool:T}=t,{willRenderShapeControls:M}=t,{willRenderShapeTextControls:R}=t,{willRenderHeaderTools:P}=t,{beforeAddShape:E}=t,{beforeRemoveShape:I}=t,{beforeDeselectShape:A}=t,{beforeSelectShape:L}=t,{beforeUpdateShape:z}=t;const{rootRect:F,imageManipulation:D,imageSize:O,imageRotation:B,imageFlipX:W,imageFlipY:_,imageTransforms:V,imageTransformsInterpolated:N}=g;return on(e,F,(e=>o(40,d=e))),on(e,O,(e=>o(39,c=e))),on(e,B,(e=>o(27,u=e))),on(e,W,(e=>o(24,a=e))),on(e,_,(e=>o(23,n=e))),on(e,V,(e=>o(38,l=e))),on(e,N,(e=>o(37,s=e))),e.$$set=e=>{"isActive"in e&&o(1,h=e.isActive),"isActiveFraction"in e&&o(2,p=e.isActiveFraction),"isVisible"in e&&o(3,m=e.isVisible),"stores"in e&&o(4,g=e.stores),"locale"in e&&o(5,$=e.locale),"retouchTools"in e&&o(6,f=e.retouchTools),"retouchToolShapes"in e&&o(7,y=e.retouchToolShapes),"retouchShapeControls"in e&&o(8,b=e.retouchShapeControls),"retouchActiveTool"in e&&o(0,x=e.retouchActiveTool),"retouchWillRenderShapeStyleControls"in e&&o(9,v=e.retouchWillRenderShapeStyleControls),"retouchWillRenderHeaderTools"in e&&o(10,w=e.retouchWillRenderHeaderTools),"retouchWillRenderShapeControls"in e&&o(11,S=e.retouchWillRenderShapeControls),"markupEditorWillStartInteraction"in e&&o(12,k=e.markupEditorWillStartInteraction),"retouchEnableMoveTool"in e&&o(13,C=e.retouchEnableMoveTool),"retouchEnableViewTool"in e&&o(14,T=e.retouchEnableViewTool),"willRenderShapeControls"in e&&o(15,M=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(16,R=e.willRenderShapeTextControls),"willRenderHeaderTools"in e&&o(17,P=e.willRenderHeaderTools),"beforeAddShape"in e&&o(18,E=e.beforeAddShape),"beforeRemoveShape"in e&&o(19,I=e.beforeRemoveShape),"beforeDeselectShape"in e&&o(20,A=e.beforeDeselectShape),"beforeSelectShape"in e&&o(21,L=e.beforeSelectShape),"beforeUpdateShape"in e&&o(22,z=e.beforeUpdateShape)},e.$$.update=()=>{25165824&e.$$.dirty[0]|960&e.$$.dirty[1]&&o(26,i=e=>jb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n)),25165824&e.$$.dirty[0]|960&e.$$.dirty[1]&&o(25,r=e=>Hb(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,n))},[x,h,p,m,g,$,f,y,b,v,w,S,k,C,T,M,R,P,E,I,A,L,z,n,a,r,i,u,F,D,O,B,W,_,V,N,"retouch",s,l,c,d,function(e){x=e,o(0,x)},function(t){Qn.call(this,e,t)}]}var Ix={util:["retouch",class extends Fa{constructor(e){super(),za(this,e,Ex,Px,Qr,{name:36,isActive:1,isActiveFraction:2,isVisible:3,stores:4,locale:5,retouchTools:6,retouchToolShapes:7,retouchShapeControls:8,retouchActiveTool:0,retouchWillRenderShapeStyleControls:9,retouchWillRenderHeaderTools:10,retouchWillRenderShapeControls:11,markupEditorWillStartInteraction:12,retouchEnableMoveTool:13,retouchEnableViewTool:14,willRenderShapeControls:15,willRenderShapeTextControls:16,willRenderHeaderTools:17,beforeAddShape:18,beforeRemoveShape:19,beforeDeselectShape:20,beforeSelectShape:21,beforeUpdateShape:22},null,[-1,-1])}get name(){return this.$$.ctx[36]}get isActive(){return this.$$.ctx[1]}set isActive(e){this.$$set({isActive:e}),pa()}get isActiveFraction(){return this.$$.ctx[2]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),pa()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),pa()}get stores(){return this.$$.ctx[4]}set stores(e){this.$$set({stores:e}),pa()}get locale(){return this.$$.ctx[5]}set locale(e){this.$$set({locale:e}),pa()}get retouchTools(){return this.$$.ctx[6]}set retouchTools(e){this.$$set({retouchTools:e}),pa()}get retouchToolShapes(){return this.$$.ctx[7]}set retouchToolShapes(e){this.$$set({retouchToolShapes:e}),pa()}get retouchShapeControls(){return this.$$.ctx[8]}set retouchShapeControls(e){this.$$set({retouchShapeControls:e}),pa()}get retouchActiveTool(){return this.$$.ctx[0]}set retouchActiveTool(e){this.$$set({retouchActiveTool:e}),pa()}get retouchWillRenderShapeStyleControls(){return this.$$.ctx[9]}set retouchWillRenderShapeStyleControls(e){this.$$set({retouchWillRenderShapeStyleControls:e}),pa()}get retouchWillRenderHeaderTools(){return this.$$.ctx[10]}set retouchWillRenderHeaderTools(e){this.$$set({retouchWillRenderHeaderTools:e}),pa()}get retouchWillRenderShapeControls(){return this.$$.ctx[11]}set retouchWillRenderShapeControls(e){this.$$set({retouchWillRenderShapeControls:e}),pa()}get markupEditorWillStartInteraction(){return this.$$.ctx[12]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),pa()}get retouchEnableMoveTool(){return this.$$.ctx[13]}set retouchEnableMoveTool(e){this.$$set({retouchEnableMoveTool:e}),pa()}get retouchEnableViewTool(){return this.$$.ctx[14]}set retouchEnableViewTool(e){this.$$set({retouchEnableViewTool:e}),pa()}get willRenderShapeControls(){return this.$$.ctx[15]}set willRenderShapeControls(e){this.$$set({willRenderShapeControls:e}),pa()}get willRenderShapeTextControls(){return this.$$.ctx[16]}set willRenderShapeTextControls(e){this.$$set({willRenderShapeTextControls:e}),pa()}get willRenderHeaderTools(){return this.$$.ctx[17]}set willRenderHeaderTools(e){this.$$set({willRenderHeaderTools:e}),pa()}get beforeAddShape(){return this.$$.ctx[18]}set beforeAddShape(e){this.$$set({beforeAddShape:e}),pa()}get beforeRemoveShape(){return this.$$.ctx[19]}set beforeRemoveShape(e){this.$$set({beforeRemoveShape:e}),pa()}get beforeDeselectShape(){return this.$$.ctx[20]}set beforeDeselectShape(e){this.$$set({beforeDeselectShape:e}),pa()}get beforeSelectShape(){return this.$$.ctx[21]}set beforeSelectShape(e){this.$$set({beforeSelectShape:e}),pa()}get beforeUpdateShape(){return this.$$.ctx[22]}set beforeUpdateShape(e){this.$$set({beforeUpdateShape:e}),pa()}},({src:e})=>e&&!kp(e)]};const Ax='',Lx='';var zx={labelReset:"Reset",labelDefault:"Default",labelAuto:"Auto",labelNone:"None",labelEdit:"Edit",labelClose:"Close",labelSupportError:e=>e.join(", ")+" not supported on this browser",labelColor:"Color",labelWidth:"Width",labelSize:"Size",labelOffset:"Offset",labelAmount:"Amount",labelInset:"Inset",labelRadius:"Radius",labelColorPalette:"Color palette",labelSizeExtraSmall:"Extra small",labelSizeSmall:"Small",labelSizeMediumSmall:"Medium small",labelSizeMedium:"Medium",labelSizeMediumLarge:"Medium large",labelSizeLarge:"Large",labelSizeExtraLarge:"Extra large",labelButtonCancel:"Cancel",labelButtonUndo:"Undo",labelButtonRedo:"Redo",labelButtonRevert:"Revert",labelButtonExport:"Done",labelZoomIn:"Zoom in",labelZoomOut:"Zoom out",labelZoomFit:"Fit to view",labelZoomActual:"Actual size",iconZoomIn:'',iconZoomOut:'',iconSupportError:'',iconButtonClose:Ax,iconButtonRevert:'',iconButtonUndo:'',iconButtonRedo:'',iconButtonExport:'',statusLabelButtonClose:"Close",statusIconButtonClose:Ax,statusLabelLoadImage:e=>e&&e.task?e.error?"IMAGE_TOO_SMALL"===e.error.code?"Minimum image size is {minWidth} × {minHeight}":"Error loading image":"blob-to-bitmap"===e.task?"Preparing image…":"Loading image…":"Waiting for image",statusLabelProcessImage:e=>{if(e&&e.task)return"store"===e.task?e.error?"Error uploading image":"Uploading image…":e.error?"Error processing image":"Processing image…"}};const Fx={shapeLabelButtonSelectSticker:"Select image",shapeIconButtonSelectSticker:'',shapeIconButtonFlipHorizontal:'',shapeIconButtonFlipVertical:'',shapeIconButtonRemove:'',shapeIconButtonDuplicate:'',shapeIconButtonMoveToFront:'',shapeIconButtonTextLayoutAutoWidth:""+Lx,shapeIconButtonTextLayoutAutoHeight:''+Lx,shapeIconButtonTextLayoutFixedSize:''+Lx,shapeTitleButtonTextLayoutAutoWidth:"Auto width",shapeTitleButtonTextLayoutAutoHeight:"Auto height",shapeTitleButtonTextLayoutFixedSize:"Fixed size",shapeTitleButtonFlipHorizontal:"Flip Horizontal",shapeTitleButtonFlipVertical:"Flip Vertical",shapeTitleButtonRemove:"Remove",shapeTitleButtonDuplicate:"Duplicate",shapeTitleButtonMoveToFront:"Move to front",shapeLabelInputText:"Edit text",shapeIconInputCancel:'',shapeIconInputConfirm:'',shapeLabelInputCancel:"Cancel",shapeLabelInputConfirm:"Confirm",shapeLabelStrokeNone:"No outline",shapeLabelFontStyleNormal:"Normal",shapeLabelFontStyleBold:"Bold",shapeLabelFontStyleItalic:"Italic",shapeLabelFontStyleItalicBold:"Bold Italic",shapeTitleBackgroundColor:"Fill color",shapeTitleCornerRadius:"Corner radius",shapeTitleFontFamily:"Font",shapeTitleFontSize:"Font size",shapeTitleFontStyle:"Font style",shapeTitleLineHeight:"Line height",shapeTitleLineStart:"Start",shapeTitleLineEnd:"End",shapeTitleStrokeWidth:"Line width",shapeTitleStrokeColor:"Line color",shapeTitleLineDecorationBar:"Bar",shapeTitleLineDecorationCircle:"Circle",shapeTitleLineDecorationSquare:"Square",shapeTitleLineDecorationArrow:"Arrow",shapeTitleLineDecorationCircleSolid:"Circle solid",shapeTitleLineDecorationSquareSolid:"Square solid",shapeTitleLineDecorationArrowSolid:"Arrow solid",shapeIconLineDecorationBar:'',shapeIconLineDecorationCircle:'',shapeIconLineDecorationSquare:'',shapeIconLineDecorationArrow:'',shapeIconLineDecorationCircleSolid:'',shapeIconLineDecorationSquareSolid:'',shapeIconLineDecorationArrowSolid:'',shapeTitleColorTransparent:"Transparent",shapeTitleColorWhite:"White",shapeTitleColorSilver:"Silver",shapeTitleColorGray:"Gray",shapeTitleColorBlack:"Black",shapeTitleColorNavy:"Navy",shapeTitleColorBlue:"Blue",shapeTitleColorAqua:"Aqua",shapeTitleColorTeal:"Teal",shapeTitleColorOlive:"Olive",shapeTitleColorGreen:"Green",shapeTitleColorYellow:"Yellow",shapeTitleColorOrange:"Orange",shapeTitleColorRed:"Red",shapeTitleColorMaroon:"Maroon",shapeTitleColorFuchsia:"Fuchsia",shapeTitleColorPurple:"Purple",shapeTitleTextOutline:"Text outline",shapeTitleTextOutlineWidth:"Width",shapeTitleTextShadow:"Text shadow",shapeTitleTextShadowBlur:"Blur",shapeTitleTextColor:"Font color",shapeTitleTextAlign:"Text align",shapeTitleTextAlignLeft:"Left align text",shapeTitleTextAlignCenter:"Center align text",shapeTitleTextAlignRight:"Right align text",shapeIconTextAlignLeft:'',shapeIconTextAlignCenter:'',shapeIconTextAlignRight:'',shapeLabelToolMove:"Move",shapeLabelToolView:"View",shapeLabelToolSharpie:"Sharpie",shapeLabelToolEraser:"Eraser",shapeLabelToolPath:"Path",shapeLabelToolRectangle:"Rectangle",shapeLabelToolEllipse:"Ellipse",shapeLabelToolArrow:"Arrow",shapeLabelToolLine:"Line",shapeLabelToolText:"Text",shapeLabelToolPreset:"Stickers",shapeIconToolView:'',shapeIconToolMove:'',shapeIconToolSharpie:'',shapeIconToolEraser:'',shapeIconToolPath:'',shapeIconToolRectangle:'',shapeIconToolEllipse:'',shapeIconToolArrow:'',shapeIconToolLine:'',shapeIconToolText:'',shapeIconToolPreset:'',shapeTitleSelectionMode:"Selection mode",shapeTitleBrushSize:"Brush size",shapeLabelSelectionModeNew:"New",shapeLabelSelectionModeAdd:"Add",shapeLabelSelectionModeSubtract:"Remove",shapeLabelToolSelectionBrush:"Brush",shapeLabelToolSelectionLassoo:"Lassoo",shapeLabelToolSelectionRectangle:"Rectangle marquee",shapeLabelToolSelectionEllipse:"Ellipse marquee",shapeIconSelectionModeNew:'',shapeIconSelectionModeAdd:'',shapeIconSelectionModeSubtract:'',shapeIconToolSelectionBrush:'',shapeIconToolSelectionLassoo:'',shapeIconToolSelectionRectangle:'',shapeIconToolSelectionEllipse:''};var Dx={cropLabel:"Crop",cropIcon:'',cropIconButtonRecenter:'',cropIconButtonRotateLeft:'',cropIconButtonRotateRight:'',cropIconButtonFlipVertical:'',cropIconButtonFlipHorizontal:'',cropIconSelectPreset:(e,t)=>{const[o,i,r]=t?[t<1?1:.3,1===t?.85:.5,t>1?1:.3]:[.2,.3,.4];return`\n \n \n \n `},cropIconCropBoundary:(e,t)=>{const[o,i,r,n]=t?[.3,1,0,0]:[0,0,.3,1];return`\n \n \n \n \n `},cropLabelButtonRecenter:"Recenter",cropLabelButtonRotateLeft:"Rotate left",cropLabelButtonRotateRight:"Rotate right",cropLabelButtonFlipHorizontal:"Flip horizontal",cropLabelButtonFlipVertical:"Flip vertical",cropLabelSelectPreset:"Crop shape",cropLabelCropBoundary:"Crop boundary",cropLabelCropBoundaryEdge:"Edge of image",cropLabelCropBoundaryNone:"None",cropLabelTabRotation:"Rotation",cropLabelTabZoom:"Scale"},Ox={fillLabel:"Fill",fillIcon:'\n \n \n \n \n \n \n \n '},Bx={frameLabel:"Frame",frameIcon:'\n \n \n ',frameLabelMatSharp:"Mat",frameLabelMatRound:"Bevel",frameLabelLineSingle:"Line",frameLabelLineMultiple:"Zebra",frameLabelEdgeSeparate:"Inset",frameLabelEdgeOverlap:"Plus",frameLabelEdgeCross:"Lumber",frameLabelCornerHooks:"Hook",frameLabelPolaroid:"Polaroid"},Wx={redactLabel:"Redact",redactIcon:''},_x={retouchLabel:"Retouch",retouchIcon:'\n \n '},Vx=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e);Object.keys(o).forEach((i=>{o[i].get?Object.defineProperty(t,i,{get:()=>e[i],set:t=>e[i]=t}):t[i]=e[i]}))},Nx=e=>{const t={},{sub:o,pub:i}=Xo();u()&&null!==document.doctype||console.warn("Browser is in quirks mode, add to page to fix render issues");const r=Ss();Vx(r,t);const n=((e,t)=>{const o={},i=new xm({target:e,props:{stores:t,pluginComponents:Array.from(Mm)}});let r=!1;const n=()=>{r||(u()&&window.removeEventListener("pagehide",n),i&&(r=!0,i.$destroy()))};km||(km=new Set(Xc(xm).filter((e=>!wm.includes(e))))),km.forEach((e=>{Object.defineProperty(o,e,{get:()=>i[e],set:Sm.includes(e)?t=>{i[e]={...i[e],...t}}:t=>i[e]=t})})),Object.defineProperty(o,"previewImageData",{get:()=>i.imagePreviewCurrent}),Cm.forEach((e=>{const t=Tm[e],r=t[0];Object.defineProperty(o,e,{get:()=>i.pluginInterface[r][e],set:o=>{const r=t.reduce(((t,r)=>(t[r]={...i.pluginOptions[r],[e]:o},t)),{});i.pluginOptions={...i.pluginOptions,...r}}})})),Object.defineProperty(o,"element",{get:()=>i.root,set:()=>{}});const a=i.history;return qa(o,{on:(e,t)=>{if(r)return()=>{};if(/undo|redo|revert|writehistory/.test(e))return a.on(e,t);const o=[i.sub(e,t),i.$on(e,(e=>t(e instanceof CustomEvent&&!e.detail?void 0:e)))].filter(Boolean);return()=>o.forEach((e=>e()))},updateImagePreview:e=>{i.imagePreviewSrc=e},close:()=>!r&&i.pub("close"),destroy:n}),Object.defineProperty(o,"history",{get:()=>({undo:()=>a.undo(),redo:()=>a.redo(),revert:()=>a.revert(),get:()=>a.get(),getCollapsed:()=>a.get().splice(0,a.index+1),set:e=>a.set(e),write:e=>a.write(e),get length(){return a.length()},get index(){return a.index},set index(e){a.index=e}})}),u()&&window.addEventListener("pagehide",n),o})(e,r.stores);Vx(n,t);const s=["loadImage","processImage","abortProcessImage","abortLoadImage"].map((e=>n.on(e,(t=>{const o=r[e](t&&t.detail);o instanceof Promise&&o.catch(a)})))),l=(e,t)=>{const i=o(e,t),a=r.on(e,t),s=n.on(e,t);return()=>{i(),a(),s()}};t.handleEvent=a;const c=Pm.map((e=>l(e,(o=>t.handleEvent(e,o)))));return qa(t,{on:l,updateImage:e=>new Promise(((o,i)=>{const n=t.history.get(),a=t.history.index,s=t.imageState;r.loadImage(e).then((e=>{t.history.set(n),t.history.index=a,t.imageState=s,o(e)})).catch(i)})),close:()=>{i("close")},destroy:()=>{[...s,...c].forEach((e=>e())),n.destroy(),r.destroy(),i("destroy")}}),setTimeout((()=>i("init",t)),0),t};const Hx="pintura-editor";var jx=()=>new Promise((e=>{if(!Ux)return e([]);var t;t=Hx,document.createElement(t).constructor===HTMLElement&&customElements.define(Hx,Ux),customElements.whenDefined(Hx).then((()=>e(document.querySelectorAll(Hx))))}));const Ux=u()&&class extends HTMLElement{constructor(){super(),this._editor=void 0,this._unsubs=void 0}static get observedAttributes(){return["src"]}attributeChangedCallback(e,t,o){this[e]=o}connectedCallback(){this._editor=Nx(this),Vx(this._editor,this),this._editor.src=this.getAttribute("src"),this._unsubs=Em(this._editor,this)}disconnectedCallback(){this._editor.destroy(),this._unsubs.forEach((e=>e()))}},Gx="pintura-editor";var Zx=(e,t={})=>{const o=R(e)?document.querySelector(e):e;if(!Wt(o))return;t.class=t.class?"pintura-editor "+t.class:Gx;const i=Nx(o);return Object.assign(i,t)};const{document:Xx,window:Yx}=ka;function qx(e){let t,o,i,r;return la(e[27]),{c(){t=Mn(),o=kn("div"),An(o,"class",e[4]),An(o,"style",e[5])},m(n,a){wn(n,t,a),wn(n,o,a),e[28](o),i||(r=[Pn(Yx,"keydown",e[10]),Pn(Yx,"orientationchange",e[11]),Pn(Yx,"resize",e[27]),Pn(Xx.body,"focusin",(function(){Jr(!e[1]&&e[7])&&(!e[1]&&e[7]).apply(this,arguments)})),Pn(Xx.body,"focusout",(function(){Jr(e[2]&&e[8])&&(e[2]&&e[8]).apply(this,arguments)})),Pn(o,"wheel",e[9],{passive:!1})],i=!0)},p(t,i){e=t,16&i[0]&&An(o,"class",e[4]),32&i[0]&&An(o,"style",e[5])},i:Gr,o:Gr,d(n){n&&Sn(t),n&&Sn(o),e[28](null),i=!1,Kr(r)}}}function Kx(e,t,o){let i,r,n,a,s,l,c,d;const h=qn();let{root:p}=t,{preventZoomViewport:m=!0}=t,{preventScrollBodyIfNeeded:$=!0}=t,{preventFooterOverlapIfNeeded:f=!0}=t,{class:y}=t,b=!0,x=!1,v=!1,w=u()&&document.documentElement,S=u()&&document.body,k=u()&&document.head;const C=ec(0,{precision:.001,damping:.5});on(e,C,(e=>o(26,d=e)));const T=C.subscribe((e=>{v&&e>=1?(o(19,v=!1),o(1,b=!1),h("show")):x&&e<=0&&(o(18,x=!1),o(1,b=!0),h("hide"))}));let M=!1,R=void 0,P=void 0,E=void 0;const I=()=>document.querySelector("meta[name=viewport]"),A=()=>Array.from(document.querySelectorAll("meta[name=theme-color]"));let L;const z=(e,t)=>{const o=()=>{e()?t():requestAnimationFrame(o)};requestAnimationFrame(o)};let F,D,O=0,B=void 0;const W=()=>{D||(D=g("div",{style:"position:fixed;height:100vh;top:0"}),S.append(D))};Zn((()=>{f&&$o()&&W()})),Xn((()=>{D&&(o(21,B=D.offsetHeight),D.remove(),D=void 0)}));let _=void 0;const V=()=>w.style.setProperty("--pintura-document-height",window.innerHeight+"px");return Yn((()=>{w.classList.remove("PinturaModalBodyLock"),T()})),e.$$set=e=>{"root"in e&&o(0,p=e.root),"preventZoomViewport"in e&&o(12,m=e.preventZoomViewport),"preventScrollBodyIfNeeded"in e&&o(13,$=e.preventScrollBodyIfNeeded),"preventFooterOverlapIfNeeded"in e&&o(14,f=e.preventFooterOverlapIfNeeded),"class"in e&&o(15,y=e.class)},e.$$.update=()=>{67895298&e.$$.dirty[0]&&o(25,i=v||x?d:b?0:1),4096&e.$$.dirty[0]&&(r="width=device-width,height=device-height,initial-scale=1"+(m?",maximum-scale=1,user-scalable=0":"")),786434&e.$$.dirty[0]&&o(22,n=!v&&!b&&!x),12&e.$$.dirty[0]&&(M||o(20,F=O)),2097160&e.$$.dirty[0]&&o(24,a=Ao(B)?"--viewport-pad-footer:"+(B>O?0:1):""),51380224&e.$$.dirty[0]&&o(5,s=`opacity:${i};height:${F}px;--editor-modal:1;${a}`),32768&e.$$.dirty[0]&&o(4,l=Mc(["pintura-editor","PinturaModal",y])),8192&e.$$.dirty[0]&&o(23,c=$&&$o()&&/15_/.test(navigator.userAgent)),12582912&e.$$.dirty[0]&&c&&(e=>{e?(_=window.scrollY,w.classList.add("PinturaDocumentLock"),V(),window.addEventListener("resize",V)):(window.removeEventListener("resize",V),w.classList.remove("PinturaDocumentLock"),Ao(_)&&window.scrollTo(0,_),_=void 0)})(n)},[p,b,M,O,l,s,C,e=>{Gd(e.target)&&(o(2,M=!0),L=O)},e=>{if(Gd(e.target))if(clearTimeout(undefined),L===O)o(2,M=!1);else{const e=O;z((()=>O!==e),(()=>o(2,M=!1)))}},e=>{e.target&&/PinturaStage/.test(e.target.className)&&e.preventDefault()},e=>{const{key:t}=e;if(!/escape/i.test(t))return;const o=e.target;if(o&&/input|textarea/i.test(o.nodeName))return;const i=document.querySelectorAll(".PinturaModal");i[i.length-1]===p&&h("close")},W,m,$,f,y,()=>{if(v||!b)return;o(19,v=!0);const e=I()||g("meta",{name:"viewport"});R=!R&&e.getAttribute("content"),e.setAttribute("content",r+(/cover/.test(R)?",viewport-fit=cover":"")),e.parentNode||k.append(e);const t=getComputedStyle(p).getPropertyValue("--color-background"),i=A();if(i.length)P=i.map((e=>e.getAttribute("content")));else{const e=g("meta",{name:"theme-color"});k.append(e),i.push(e)}i.forEach((e=>e.setAttribute("content",`rgb(${t})`))),clearTimeout(E),E=setTimeout((()=>C.set(1)),250)},()=>{if(x||b)return;clearTimeout(E),o(18,x=!0);const e=I();R?e.setAttribute("content",R):e.remove();const t=A();P?t.forEach(((e,t)=>{e.setAttribute("content",P[t])})):t.forEach((e=>e.remove())),C.set(0)},x,v,F,B,n,c,a,i,d,function(){o(3,O=Yx.innerHeight)},function(e){ta[e?"unshift":"push"]((()=>{p=e,o(0,p)}))}]}class Jx extends Fa{constructor(e){super(),za(this,e,Kx,qx,Qr,{root:0,preventZoomViewport:12,preventScrollBodyIfNeeded:13,preventFooterOverlapIfNeeded:14,class:15,show:16,hide:17},null,[-1,-1])}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),pa()}get preventZoomViewport(){return this.$$.ctx[12]}set preventZoomViewport(e){this.$$set({preventZoomViewport:e}),pa()}get preventScrollBodyIfNeeded(){return this.$$.ctx[13]}set preventScrollBodyIfNeeded(e){this.$$set({preventScrollBodyIfNeeded:e}),pa()}get preventFooterOverlapIfNeeded(){return this.$$.ctx[14]}set preventFooterOverlapIfNeeded(e){this.$$set({preventFooterOverlapIfNeeded:e}),pa()}get class(){return this.$$.ctx[15]}set class(e){this.$$set({class:e}),pa()}get show(){return this.$$.ctx[16]}get hide(){return this.$$.ctx[17]}}const Qx=(e,t,o,i)=>{const r=ue(t.x-e.x,t.y-e.y),n=fe(r),a=5*o;let s;s=i?.5*a:Math.ceil(.5*(a-1));const l=ke(pe(n),s);return{anchor:pe(e),offset:l,normal:n,solid:i,size:a,sizeHalf:s}},ev=({anchor:e,solid:t,normal:o,offset:i,size:r,sizeHalf:n,strokeWidth:a,strokeColor:s,strokeJoin:l,strokeCap:c,bitmap:d},u)=>{const h=e.x,p=e.y,m=ke(pe(o),r),g=ue(h+m.x,p+m.y);if(ke(m,.55),t){ve(u,i);const e=ke(pe(o),.5*n);return[{points:[ue(h-e.x,p-e.y),ue(g.x-m.y,g.y+m.x),ue(g.x+m.y,g.y-m.x)],pathClose:!0,backgroundColor:s}]}{const e=ke((e=>{const t=e.x;return e.x=-e.y,e.y=t,e})(pe(o)),.5),t=ue(h-e.x,p-e.y),i=ue(h+e.x,p+e.y);return[{points:[ue(g.x+m.y,g.y-m.x),t,ue(h,p),i,ue(g.x-m.y,g.y+m.x)],pathClose:!1,strokeWidth:a,strokeColor:s,strokeJoin:l,strokeCap:c,bitmap:d}]}},tv=({anchor:e,solid:t,offset:o,normal:i,sizeHalf:r,strokeWidth:n,strokeColor:a},s)=>(ve(s,o),t&&ve(s,me(pe(i))),[{x:e.x,y:e.y,rx:r,ry:r,backgroundColor:t?a:void 0,strokeWidth:t?void 0:n,strokeColor:t?void 0:a}]),ov=({anchor:e,offset:t,strokeWidth:o,strokeColor:i,strokeJoin:r,strokeCap:n,bitmap:a})=>[{points:[ue(e.x-t.y,e.y+t.x),ue(e.x+t.y,e.y-t.x)],strokeWidth:o,strokeColor:i,strokeJoin:r,strokeCap:n,bitmap:a}],iv=({anchor:e,solid:t,offset:o,normal:i,sizeHalf:r,strokeWidth:n,strokeColor:a},s)=>{return ve(s,o),[{x:e.x-r,y:e.y-r,width:2*r,height:2*r,rotation:(l=i,Math.atan2(l.y,l.x)),backgroundColor:t?a:void 0,strokeWidth:t?void 0:n,strokeColor:t?void 0:a}];var l},rv=(e={})=>t=>{if(!t.lineStart&&!t.lineEnd)return;const o=[],{lineStart:i,lineEnd:r,strokeWidth:n,strokeColor:a,strokeJoin:s,strokeCap:l,bitmap:c}=t,d=ue(t.x1,t.y1),u=ue(t.x2,t.y2),h=[d,u];if(i){const[t,r]=i.split("-"),h=e[t];if(h){const e=Qx(d,u,n,!!r);o.push(...h({...e,strokeColor:a,strokeWidth:n,strokeJoin:s,strokeCap:l,bitmap:c},d))}}if(r){const[t,i]=r.split("-"),h=e[t];if(h){const e=Qx(u,d,n,!!i);o.push(...h({...e,strokeColor:a,strokeWidth:n,strokeJoin:s,strokeCap:l,bitmap:c},u))}}return[{points:h,strokeWidth:n,strokeColor:a,strokeJoin:s,strokeCap:l,bitmap:c},...o]},nv=()=>({arrow:ev,circle:tv,square:iv,bar:ov}),av=(e,t)=>{const o=parseFloat(e)*t;return R(e)?o+"%":o},sv=(e,t)=>R(e)?ar(e,t):e,lv=e=>[{...e,frameStyle:"line",frameInset:0,frameOffset:0,frameSize:e.frameSize?av(e.frameSize,2):"2.5%",frameRadius:e.frameRound?av(e.frameSize,2):0}],cv=({width:e,height:t,frameImage:o,frameSize:i="15%",frameOutset:r=0,frameSlices:n={x1:.15,y1:.15,x2:.85,y2:.85}},{isPreview:a})=>{if(!o)return[];const s=Math.sqrt(e*t),l=sv(i,s),c=a?l:Math.round(l),d=c,u=sv(r,s),h=2*u,{x1:p,x2:m,y1:g,y2:$}=n,f={x0:0,y0:0,x1:c,y1:d,x2:e-c,y2:t-d,x3:e,y3:t,cw:c,ch:d,ew:e-c-c,eh:t-d-d},y=a?1:0,b=2*y,x=u>0,v={expandsCanvas:x,width:f.cw,height:f.ch,backgroundImage:o};return[{expandsCanvas:x,x:f.x1-y-u,y:f.y0-u,width:f.ew+b+h,height:f.ch,backgroundCorners:[{x:p,y:0},{x:m,y:0},{x:m,y:g},{x:p,y:g}],backgroundImage:o},{expandsCanvas:x,x:f.x1-y-u,y:f.y2+u,width:f.ew+b+h,height:f.ch,backgroundCorners:[{x:p,y:$},{x:m,y:$},{x:m,y:1},{x:p,y:1}],backgroundImage:o},{expandsCanvas:x,x:f.x0-u,y:f.y1-y-u,width:f.cw,height:f.eh+b+h,backgroundCorners:[{x:0,y:g},{x:p,y:g},{x:p,y:$},{x:0,y:$}],backgroundImage:o},{expandsCanvas:x,x:f.x2+u,y:f.y1-y-u,width:f.cw,height:f.eh+b+h,backgroundCorners:[{x:m,y:g},{x:1,y:g},{x:1,y:$},{x:m,y:$}],backgroundImage:o},{...v,x:f.x0-u,y:f.y0-u,backgroundCorners:[{x:0,y:0},{x:p,y:0},{x:p,y:g},{x:0,y:g}]},{...v,x:f.x2+u,y:f.y0-u,backgroundCorners:[{x:m,y:0},{x:1,y:0},{x:1,y:g},{x:m,y:g}]},{...v,x:f.x2+u,y:f.y2+u,backgroundCorners:[{x:m,y:$},{x:1,y:$},{x:1,y:1},{x:m,y:1}]},{...v,x:f.x0-u,y:f.y2+u,backgroundCorners:[{x:0,y:$},{x:p,y:$},{x:p,y:1},{x:0,y:1}]}]},dv=({x:e,y:t,width:o,height:i,frameInset:r="3.5%",frameSize:n=".25%",frameColor:a=[1,1,1],frameOffset:s="5%",frameAmount:l=1,frameRadius:c=0,expandsCanvas:d=!1},{isPreview:u})=>{const h=Math.sqrt(o*i);let p=sv(n,h);const m=sv(r,h),g=sv(s,h);let $=0;u||(p=Math.max(1,Math.round(p)),$=p%2==0?0:.5);const f=sv(av(c,l),h);return new Array(l).fill(void 0).map(((r,n)=>{const s=g*n;let l=e+m+s,c=t+m+s,h=e+o-m-s,y=t+i-m-s;u||(l=Math.round(l),c=Math.round(c),h=Math.round(h),y=Math.round(y));return{x:l+$,y:c+$,width:h-l,height:y-c,cornerRadius:f>0?f-s:0,strokeWidth:p,strokeColor:a,expandsCanvas:d}}))},uv=({x:e,y:t,width:o,height:i,frameSize:r=".25%",frameOffset:n=0,frameInset:a="2.5%",frameColor:s=[1,1,1]},{isPreview:l})=>{const c=Math.sqrt(o*i);let d=sv(r,c),u=sv(a,c),h=sv(n,c),p=0;l||(d=Math.max(1,Math.round(d)),u=Math.round(u),h=Math.round(h),p=d%2==0?0:.5);const m=h-u,g=e+u+p,$=t+u+p,f=e+o-u-p,y=t+i-u-p;return[{points:[ue(g+m,$),ue(f-m,$)]},{points:[ue(f,$+m),ue(f,y-m)]},{points:[ue(f-m,y),ue(g+m,y)]},{points:[ue(g,y-m),ue(g,$+m)]}].map((e=>(e.strokeWidth=d,e.strokeColor=s,e)))},hv=({x:e,y:t,width:o,height:i,frameSize:r=".25%",frameInset:n="2.5%",frameLength:a="2.5%",frameColor:s=[1,1,1]},{isPreview:l})=>{const c=Math.sqrt(o*i);let d=sv(r,c),u=sv(n,c),h=sv(a,c),p=0;l||(d=Math.max(1,Math.round(d)),u=Math.round(u),h=Math.round(h),p=d%2==0?0:.5);const m=e+u+p,g=t+u+p,$=e+o-u-p,f=t+i-u-p;return[{points:[ue(m,g+h),ue(m,g),ue(m+h,g)]},{points:[ue($-h,g),ue($,g),ue($,g+h)]},{points:[ue($,f-h),ue($,f),ue($-h,f)]},{points:[ue(m+h,f),ue(m,f),ue(m,f-h)]}].map((e=>(e.strokeWidth=d,e.strokeColor=s,e)))},pv=({x:e,y:t,width:o,height:i,frameColor:r=[1,1,1]},{isPreview:n})=>{const a=Math.sqrt(o*i),s=.1*a;let l=.2*a,c=0;const d=.5*s;return n?c=1:l=Math.ceil(l),r.length=3,[{id:"border",x:e-d+c,y:t-d+c,width:o+s-2*c,height:i+l-2*c,frameStyle:"line",frameInset:0,frameOffset:0,frameSize:s,frameColor:r,expandsCanvas:!0},{id:"chin",x:e-d,y:i-c,width:o+s,height:l,backgroundColor:r,expandsCanvas:!0}].filter(Boolean)},mv=(e={})=>(t,o)=>{if(!zo(t,"frameStyle"))return;const i=t.frameStyle,r=e[i];if(!r)return;const{frameStyle:n,...a}=t;return r(a,o)},gv=()=>({solid:lv,hook:hv,line:dv,edge:uv,polaroid:pv,nine:cv}),$v=e=>{const t=(o,i={isPreview:!0})=>{const r=e.map((e=>{const r=e(o,i);if(r)return r.map((e=>t(e,i)))})).filter(Boolean).flat();return r.length?r.flat().map(((e,t)=>(e.id=o.id+"_"+t,e))):o};return t};"undefined"!=typeof window&&(e=>{if(!e)return;const[t,o,i,r]=[[108,111,99,97,116,105,111,110],[82,101,103,69,120,112],[116,101,115,116],[112,113,105,110,97,92,46,110,108]].map((e=>e.map((e=>String.fromCharCode(e))).join("")));e._clpdx4s=new e[o](r)[i](e[t])})(window);const fv=il,yv=nl,bv=(e,...t)=>(o,i)=>{var r;r=e,(Array.isArray(r)||P(r))&&(t=[e,...t]);const n=C(e)?e:{};t=Array.isArray(t)?t.reduce(((e,t)=>[...e,...Array.isArray(t)?[...t]:[t]]),[]):t;for(let e=0;e({read:c,apply:k}),vv=(e={})=>{const{blurAmount:t,dataSizeScalar:o,scrambleAmount:i,backgroundColor:r}=e;return(e,n)=>(async(e,t={})=>{if(!e)return;const{width:o,height:i}=e,{dataSize:r=96,dataSizeScalar:n=1,scrambleAmount:a=4,blurAmount:s=6,outputFormat:l="canvas",backgroundColor:c=[0,0,0]}=t,d=Math.round(r*n),u=Math.min(d/o,d/i),h=Math.floor(o*u),p=Math.floor(i*u),m=g("canvas",{width:h,height:p}),$=m.getContext("2d",{willReadFrequently:!0});if(c.length=3,$.fillStyle=Ho(c),$.fillRect(0,0,h,p),y(e)){const t=g("canvas",{width:o,height:i});t.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),$.drawImage(t,0,0,h,p),f(t)}else $.drawImage(e,0,0,h,p);const b=$.getImageData(0,0,h,p),x=[];if(a>0&&x.push([Zl,{amount:a}]),s>0)for(let e=0;e`(err, imageData) => {\n(${t[o][0].toString()})(Object.assign({ imageData: imageData }, filterInstructions[${o}]), \n${t[o+1]?e(t,o+1):"done"})\n}`,t=`function (options, done) {\nconst filterInstructions = options.filterInstructions;\nconst imageData = options.imageData;\n(${e(x,0)})(null, imageData)\n}`,o=await F(t,[{imageData:b,filterInstructions:x.map((e=>e[1]))}],[b.data.buffer]);v=ko(o)}else v=b;return"canvas"===l?($.putImageData(v,0,0),m):v})(e,{blurAmount:t,scrambleAmount:i,backgroundColor:r,...n,dataSizeScalar:o||n.dataSizeScalar})},wv=Ss,Sv=Hg,kv=Vg,Cv=F$,Tv={markupEditorToolbar:Hg(),markupEditorToolStyles:Vg(),markupEditorShapeStyleControls:F$()},Mv=Rm,Rv=Xf,Pv=ty,Ev=ly,Iv=Xb,Av=Kb,Lv=ex,zv=ax,Fv=vx,Dv=yx,Ov=Rx,Bv=Ix,Wv=mg,_v=Qm,Vv=kg,Nv=zx,Hv=Fx,jv=Dx,Uv=Ox,Gv={filterLabel:"Filter",filterIcon:'',filterLabelChrome:"Chrome",filterLabelFade:"Fade",filterLabelCold:"Cold",filterLabelWarm:"Warm",filterLabelPastel:"Pastel",filterLabelMonoDefault:"Mono",filterLabelMonoNoir:"Noir",filterLabelMonoWash:"Wash",filterLabelMonoStark:"Stark",filterLabelSepiaDefault:"Sepia",filterLabelSepiaBlues:"Blues",filterLabelSepiaRust:"Rust",filterLabelSepiaColor:"Color"},Zv={finetuneLabel:"Finetune",finetuneIcon:'',finetuneLabelBrightness:"Brightness",finetuneLabelContrast:"Contrast",finetuneLabelSaturation:"Saturation",finetuneLabelExposure:"Exposure",finetuneLabelTemperature:"Temperature",finetuneLabelGamma:"Gamma",finetuneLabelClarity:"Clarity",finetuneLabelVignette:"Vignette"},Xv={resizeLabel:"Resize",resizeIcon:'',resizeLabelFormCaption:"Image output size",resizeLabelInputWidth:"w",resizeTitleInputWidth:"Width",resizeLabelInputHeight:"h",resizeTitleInputHeight:"Height",resizeTitleButtonMaintainAspectRatio:"Maintain aspectratio",resizeIconButtonMaintainAspectRatio:(e,t)=>``},Yv={decorateLabel:"Decorate",decorateIcon:''},qv={annotateLabel:"Annotate",annotateIcon:''},Kv={stickerLabel:"Sticker",stickerIcon:''},Jv=Bx,Qv=Wx,ew=_x,tw=(e,t,o={})=>(R(t)?Array.from(document.querySelectorAll(t)):t).filter(Boolean).map((t=>e(t,M(o)))),ow=Zx,iw=(e={},t)=>{const{sub:o,pub:i}=Xo(),r={},n=((e={},t)=>new Jx({target:t||document.body,props:{class:e.class,preventZoomViewport:e.preventZoomViewport,preventScrollBodyIfNeeded:e.preventScrollBodyIfNeeded,preventFooterOverlapIfNeeded:e.preventFooterOverlapIfNeeded}}))(e,t),s=()=>{n.hide&&n.hide()},l=()=>{n.show&&n.show()},c=Nx(n.root);Vx(c,r),r.handleEvent=a,c.handleEvent=(e,t)=>{if("init"===e)return r.handleEvent(e,r);r.handleEvent(e,t)},c.on("close",(async()=>{const{willClose:t}=e;if(!t)return s();await t()&&s()}));const d=(e,t)=>/show|hide/.test(e)?o(e,t):c.on(e,t),u=["show","hide"].map((e=>d(e,(t=>r.handleEvent(e,t))))),h=()=>{u.forEach((e=>e())),s(),n.$destroy(),c.destroy()};return qa(r,{on:d,destroy:h,hide:s,show:l}),Object.defineProperty(r,"modal",{get:()=>n.root,set:()=>{}}),n.$on("close",c.close),n.$on("show",(()=>i("show"))),n.$on("hide",(()=>{i("hide"),!1!==e.enableAutoDestroy&&h()})),!1!==e.enableAutoHide&&c.on("process",s),c.on("loadstart",l),!1!==e.enableButtonClose&&(e.enableButtonClose=!0),delete e.class,Object.assign(r,e),r},rw=(e,t)=>Zx(e,{...t,layout:"overlay"}),nw=$v,aw=(e=[])=>$v([mv(gv()),rv(nv()),...e]),sw=(e={})=>{let t,o=void 0;Array.isArray(e.imageReader)||(o=e.imageReader,delete e.imageReader),Array.isArray(e.imageWriter)?t=yv():(t=P(e.imageWriter)?e.imageWriter:yv(e.imageWriter),delete e.imageWriter);let i=void 0;return P(e.imageScrambler)||(i=e.imageScrambler,delete e.imageScrambler),{imageReader:fv(o),imageWriter:t,imageOrienter:xv(),imageScrambler:vv(i)}},lw=(e,t={})=>{const o=sw(t),i="function"==typeof t.shapePreprocessor?t.shapePreprocessor:aw(t.shapePreprocessor);return delete t.shapePreprocessor,t=_a([{...o,shapePreprocessor:i,stickerStickToImage:!0},t]),ks(e,t)},cw=(e={})=>{Rm(Rv,Pv,Ev,Iv,Av,Lv,zv,Fv,Dv,Ov);const t=sw(e),o={...Nv,...Hv,...jv,...Uv,...Gv,...Zv,...Jv,...Qv,...Xv,...Yv,...qv,...Kv,...e.locale};delete e.locale;const i="function"==typeof e.shapePreprocessor?e.shapePreprocessor:aw(e.shapePreprocessor);if(delete e.shapePreprocessor,e.markupEditorShapeStyleControls){Object.entries(e.markupEditorShapeStyleControls).every((([e,t])=>/Options$/.test(e)||!Array.isArray(t)))&&(e.markupEditorShapeStyleControls=Cv({...e.markupEditorShapeStyleControls}))}return _a([{...t,shapePreprocessor:i,utils:["trim","crop","filter","finetune","retouch","annotate","decorate","sticker","fill","frame","redact","resize"],...Wv,..._v,...Vv,...Tv,stickerStickToImage:!0,locale:o},e])},dw=async(e={})=>{const t=await jx();return t.forEach((t=>Object.assign(t,M(e)))),t},uw=(e,t)=>ow(e,cw(t)),hw=(e,t,o,i)=>new Promise((async(r,n)=>{const{format:a="canvas",backgroundColor:s=[0,0,0],foregroundColor:l=[1,1,1],scope:c="mask",padding:d=0,maxSize:u=t,targetSize:h,forceSquareCanvas:p=!1,precision:m=7}=i||{},{flipX:$,flipY:f,rotation:y}=o,b=Math.min(1,2048/t.width),x=Ve({...t},b),v=He({...t},y),w=He({...x},y),S={x:.5*(x.width-w.width),y:.5*(x.height-w.height),...w},k=void 0===l||0===l[3],C=k?[1,1,1]:l,T={imageAnnotation:e.map((e=>((e,t,o)=>{const i={...e};return vr(i,t),i.width||i.rx?i.backgroundColor=o:i.points&&!i.pathClose?(i.strokeJoin="round",i.strokeCap="round",i.strokeColor=o):i.points&&(i.backgroundColor=o,i.strokeColor=[0,0,0,0]),i})(e,b,C))),imageBackgroundColor:"image"===c?[0,0,0]:void 0,imageCropLimitToImage:!1,imageCrop:S,imageFlipX:$,imageFlipY:f,imageRotation:y,imageWriter:{format:"canvas"}},{dest:M}=await lw(g("canvas",x),{...T}),R=M.getContext("2d",{desynchronized:!0,willReadFrequently:!0});let P,E;{const e=Number.MAX_SAFE_INTEGER,{width:t,height:o}=M,i=R.getImageData(0,0,t,o).data;let r,n,a=Math.max(1,parseInt(m,10)),s=t-a,l=o-a,[c,d,h,p]=[e,-e,-e,e];for(r=0;r<=l;r+=a)for(n=0;n<=s;n+=a){i[4*(n+r*t)+3]<=32||(nd&&(d=n),rh&&(h=r))}const g=et([c-m,d+m,h+m,p-m]),$=at(g),f=Math.min(g.width,u.width),y=Math.min(g.height,u.height);P=nt($.x-.5*f,$.y-.5*y,f,y)}lt(P,1/b,de());let I=d,A=d;if("mask"===c){const e=De(P);if(e.width+=2*I,e.height+=2*A,p){const t=Math.max(e.width,e.height);I+=.5*(t-e.width),A+=.5*(t-e.height),e.width=t,e.height=t}let t=1;h&&(t=Math.min(h.width/e.width,h.height/e.height,1)),Ve(e,t);const o=g("canvas",e),i=o.getContext("2d");i.fillStyle=Ho(s),i.fillRect(0,0,o.width,o.height),k&&(i.globalCompositeOperation="destination-out"),i.scale(t,t),i.drawImage(M,-P.x+I,-P.y+A,v.width,v.height),E=o}else E=M;const L=Qe(t);L.x+=.5*(v.width-t.width),L.y+=.5*(v.height-t.height);const[z]=$t(L,y),F=at({...P}),D=ue(F.x-z.x,F.y-z.y);P.x=Math.cos(y)*D.x+Math.sin(y)*D.y-.5*P.width,P.y=Math.cos(y)*D.y-Math.sin(y)*D.x-.5*P.height;const O={...P};if(O.x=P.x,O.y=P.y,$&&f?(O.flipX=!0,O.flipY=!0,O.rotation=-y):$?(O.flipX=!0,O.rotation=y):f?(O.flipY=!0,O.rotation=y):O.rotation=-y,$||f){const e={x:O.x+.5*O.width,y:O.y+.5*O.height};$&&(e.x=Math.abs(t.width-e.x),O.x=e.x-.5*O.width),f&&(e.y=Math.abs(t.height-e.y),O.y=e.y-.5*O.height)}if(I||A){const e=I/(P.width+2*I),t=A/(P.height+2*A);O.backgroundCorners=[{x:e,y:t},{x:1-e,y:t},{x:1-e,y:1-t},{x:e,y:1-t}],P.x-=I,P.y-=A,P.width+=2*I,P.height+=2*A}const B={canvas:E,rect:P,shape:O};"blob"!==a?r({...B,blob:void 0}):E.toBlob((e=>r({...B,blob:e})))}));e.appendDefaultEditor=uw,e.appendDefaultEditors=(e,t)=>tw(uw,e,t),e.appendEditor=ow,e.appendEditors=(e,t)=>tw(ow,e,t),e.appendNode=(e,t)=>{if(Am(t))return t.push(e);t[3]=[...zm(t),e]},e.blobToFile=j,e.canvasToBlob=O,e.colorStringToColorArray=Bh,e.createDefaultColorOptions=jg,e.createDefaultFontFamilyOptions=Kg,e.createDefaultFontScaleOptions=Zg,e.createDefaultFontSizeOptions=Ug,e.createDefaultFontStyleOptions=Qg,e.createDefaultFrameStyles=gv,e.createDefaultImageOrienter=xv,e.createDefaultImageReader=fv,e.createDefaultImageScrambler=vv,e.createDefaultImageWriter=yv,e.createDefaultLineEndStyleOptions=qg,e.createDefaultLineEndStyles=nv,e.createDefaultLineHeightOptions=Gg,e.createDefaultLineHeightScaleOptions=Xg,e.createDefaultMediaWriter=bv,e.createDefaultShapePreprocessor=aw,e.createDefaultStrokeScaleOptions=Yg,e.createDefaultStrokeWidthOptions=()=>[1,2,3,4,6,8,12,16,20,24,32,48,64],e.createDefaultTextAlignOptions=Jg,e.createEditor=wv,e.createFrameStyleProcessor=mv,e.createLineEndProcessor=rv,e.createMarkupEditorBackgroundColorControl=m$,e.createMarkupEditorBrushSizeControl=Bg,e.createMarkupEditorColorControl=p$,e.createMarkupEditorColorOptions=e$,e.createMarkupEditorFontColorControl=v$,e.createMarkupEditorFontFamilyControl=u$,e.createMarkupEditorFontFamilyOptions=r$,e.createMarkupEditorFontScaleOptions=t$,e.createMarkupEditorFontSizeControl=C$,e.createMarkupEditorFontSizeOptions=e=>e.map(Pg),e.createMarkupEditorFontStyleControl=w$,e.createMarkupEditorFontStyleOptions=n$,e.createMarkupEditorLineEndStyleControl=x$,e.createMarkupEditorLineEndStyleOptions=a$,e.createMarkupEditorLineHeightControl=T$,e.createMarkupEditorLineHeightOptions=e=>e.map(Pg),e.createMarkupEditorLineHeightScaleOptions=o$,e.createMarkupEditorLineStartStyleControl=b$,e.createMarkupEditorOptionControl=f$,e.createMarkupEditorOptionsControl=(e,t={})=>["Dropdown",{...t,options:e}],e.createMarkupEditorSelectionModeControl=Og,e.createMarkupEditorSelectionToolStyles=(e,t)=>{const{tools:o=Dg}=t||{};return o.reduce(((t,o)=>{const[i,r]=Fg[o],n=_g(i,{...r,action:e},{position:"absolute",isSelection:!0});return Object.assign(t,{[`selection-${o}-${e}`]:n})}),{})},e.createMarkupEditorSelectionTools=(e,t)=>{const{tools:o=Dg,hideLabel:i=!0}=t||{};return o.map((t=>[`selection-${t}-${e}`,Rg(t,"shapeLabelToolSelection"),{hideLabel:i,icon:Rg(t,"shapeIconToolSelection")}]))},e.createMarkupEditorShapeStyleControls=Cv,e.createMarkupEditorStrokeColorControl=g$,e.createMarkupEditorStrokeScaleOptions=i$,e.createMarkupEditorStrokeWidthControl=$$,e.createMarkupEditorStrokeWidthOptions=e=>e.map(Pg),e.createMarkupEditorTextAlignControl=M$,e.createMarkupEditorToolStyle=_g,e.createMarkupEditorToolStyles=kv,e.createMarkupEditorToolbar=Sv,e.createNode=function(e,t,o,i){return Array.isArray(o)&&(i=o,o={}),[e,t,o||{},i||[]]},e.createRetouchShape=async(e,t,o,i,r,n)=>{const{retouches:a=[],maxSize:s=t,targetSize:l,padding:c=0,mimeType:d,foregroundColor:u,maskFormat:h="blob",imageFormat:p="blob",forceSquareCanvas:m=!1,didCreateDraft:g=(()=>{})}=n||{},$=[...i],f=[...a],y=new AbortController,{blob:b,canvas:x,rect:v,shape:w}=await hw($,t,o,{scope:"mask",format:h,padding:c,maxSize:s,targetSize:l,forceSquareCanvas:m,foregroundColor:u}),S=((e,t={})=>({id:e,...t,selectionStyle:"hook",disableStyle:["backgroundColor","cornerRadius","opacity","strokeWidth","strokeColor"],disableFlip:!0,disableReorder:!0,disableMove:!0,disableRotate:!0,disableDuplicate:!0,disableSelect:!0}))(L(),{...w});var k;k=S,Object.assign(k,{status:"loading",cornerRadius:15,strokeWidth:1.5,strokeColor:[0,0,0,.25],backgroundColor:[0,0,0,.1],selectionOpacity:0}),g(S,{selection:$});let C={};(d||l||"canvas"===p)&&(C={imageWriter:{}},d&&(C.imageWriter.mimeType=d),l&&(C.imageWriter.targetSize=l),p&&(C.imageWriter.format=p));const{flipX:T,flipY:M,rotation:R}=o,{dest:P}=await lw(e,{imageFlipX:T,imageFlipY:M,imageRotation:R,imageCrop:v,imageManipulation:f,imageCropLimitToImage:!1,...C});let E;try{await r(P,b||x,{shape:S,controller:y}),E="ok"}catch{E="error"}return(e=>(Object.assign(e,{selectionOpacity:1,cornerRadius:0,strokeWidth:0,strokeColor:[0,0,0,0],backgroundColor:[0,0,0,0]}),"error"!==e.status&&delete e.status,e))({...S,status:E,disableSelect:!1})},e.createShapePreprocessor=nw,e.defineCustomElements=dw,e.defineDefaultCustomElements=e=>dw(cw(e)),e.degToRad=Cl,e.dispatchEditorEvents=Em,e.effectBrightness=ag,e.effectClarity=hg,e.effectContrast=sg,e.effectExposure=cg,e.effectGamma=dg,e.effectSaturation=lg,e.effectTemperature=pg,e.effectVignette=ug,e.filterChrome=_m,e.filterCold=Hm,e.filterFade=Vm,e.filterInvert=()=>[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],e.filterMonoDefault=jm,e.filterMonoNoir=Um,e.filterMonoStark=Zm,e.filterMonoWash=Gm,e.filterPastel=Wm,e.filterSepiaBlues=Ym,e.filterSepiaColor=Km,e.filterSepiaDefault=Xm,e.filterSepiaRust=qm,e.filterWarm=Nm,e.findNode=Om,e.frameEdgeCross=xg,e.frameEdgeOverlap=vg,e.frameEdgeSeparate=bg,e.frameHook=wg,e.frameLineMultiple=yg,e.frameLineSingle=fg,e.framePolaroid=Sg,e.frameSolidRound=$g,e.frameSolidSharp=gg,e.getEditorDefaults=cw,e.getEditorProps=()=>(()=>{const e=xs.map(vs),t=Xa.map((([e])=>e)).filter((e=>!bs.includes(e)));return e.concat(t)})().concat((km=new Set(Xc(xm).filter((e=>!wm.includes(e)))),[...km,...Cm])),e.getShapeById=(e,t)=>e.find((e=>e.id===t)),e.getUniqueId=L,e.imageStateToCanvas=(e,t,o)=>{const{targetCanvas:i,targetSize:r,disableDraw:n=!1,shapePreprocessor:a}=o||{},s=i||document.createElement("canvas"),{crop:l,colorMatrix:c,convolutionMatrix:d}=t,u=Qt(e),h={width:u?e.videoWidth:e.width,height:u?e.videoHeight:e.height},{upscale:p=!1,fit:m="contain",width:$,height:f}=r||{};let y=1;"contain"===m?y=Math.min(($||Number.MAX_SAFE_INTEGER)/l.width,(f||Number.MAX_SAFE_INTEGER)/l.height):"cover"===m&&(y=Math.max(($||l.width)/l.width,(f||l.height)/l.height)),p||(y=Math.min(y,1));const b=Math.floor(l.width*y),x=Math.floor(l.height*y),v=u?Gl(b):b,w=u?Gl(x):x,S=Ul(s,{alpha:!0});S.resize(v,w,1);const k=S.textureCreate();let C;S.setCanvasColor([0,0,0,0]),S.drawToCanvas(),S.disableMask(),S.disablePreviewStencil();{const e=Object.values(c||{}).filter(Boolean);e.length&&(C=jr(e))}const T={x:0,y:0,width:v,height:w},{origin:M,translation:R,rotation:P,scale:E}=al(T,T,h,l,{x:0,y:0,width:v,height:w},y,{x:0,y:0},1,t.rotation,t.flipX,t.flipY),I=[h,M.x,M.y,R.x,R.y,P.x,P.y,P.z,E,C,1,d&&d.clarity,Ao(t.gamma)?t.gamma:1,t.vignette||0,[1,0,1,0,1,w,1,v],void 0,void 0,void 0,void 0,!1];let A=!1;const L=t.decoration.length||t.annotation.length,z=L&&S.textureCreate(),F=()=>{S.textureUpdate(k,e,{filterParam:S.textureFilterLinear,wrapParam:S.textureClamp})},D=()=>{F(),S.drawImage(k,...I),L&&A&&S.drawRect(T,0,!1,!1,[0,0,0,0],void 0,z)};return F(),!n&&D(),{canvas:s,prepare:async()=>{if(!L)return;const{dest:e}=await ks(g("canvas",h),{shapePreprocessor:a,imageReader:[[async(e,t,o)=>{const{src:i}=e,r=parseInt(i.width,10),n=parseInt(i.height,10),a=await O(i);return{...e,dest:a,size:{width:r,height:n}}},"read-canvas"]],imageWriter:nl({format:"canvas"}),imageState:{...t,redaction:[],frame:void 0,gamma:void 0,convolutionMatrix:void 0,colorMatrix:void 0,backgroundColor:[0,0,0,0],backgroundImage:void 0,trim:void 0,vignette:void 0,volume:void 0}});S.textureUpdate(z,e,{filterParam:S.textureFilterLinear,wrapParam:S.textureClamp}),A=!0,!n&&D()},redraw:D,destroy:()=>{S.release()}}},e.insertNodeAfter=(e,t,o)=>Fm(e,t,o,(e=>e+1)),e.insertNodeBefore=(e,t,o)=>Fm(e,t,o),e.isSupported=()=>(null===ng&&(ng=u()&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"File"in window&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window),ng),e.legacyDataToImageState=(e,t,o={})=>{const i={};if(!((e={})=>{if("markup"in e||"color"in e||"filter"in e)return!0;const{crop:t}=e;return!(!t||!("flip"in t||"center"in t||"aspectRatio"in t||"rotation"in t))})(o))return o;if(o.crop&&Object.assign(i,rg(t,o.crop)),o.markup){const e=Array.isArray(o.markup)?o.markup:Object.values(o.markup);i.decoration=e.map((e=>((e,t,o)=>{const i=Object.keys(o).reduce(((t,i)=>{let r=o[i];return i=eg[i]||i,/px$/.test(r)?r=tg(r):/^(?:x|y|left|right|top|bottom|width|height|fontSize|borderWidth|strokeWidth)$/.test(i)&&"number"==typeof r&&("strokeWidth"!==i&&"borderWidth"!==i&&"fontSize"!==i||(r=Math.min(e.width,e.height)*r+"px"),r=tg(r)),/color/i.test(i)&&r&&(r=Bh(r)),null===r&&(r=void 0),t[i]=r,t}),{});if("line"===t&&(i.lineDecoration.length>=1&&(i.lineEnd="arrow"),2===i.lineDecoration.length&&(i.lineStart="arrow"),i.x1=i.x,i.y1=i.y,i.x2=og(i.x,i.width),i.y2=og(i.y,i.height),delete i.x,delete i.y,delete i.width,delete i.height,delete i.lineDecoration,delete i.lineStyle),"text"===t){if(!Ao(i.y)){const t=Math.min(e.width,e.height);i.y=t*(parseFloat(i.y)/100)}i.y=i.y-i.fontSize,delete i.width,delete i.height,delete i.borderStyle,i.lineHeight=i.lineHeight||"120%"}if("ellipse"===t){let t,o;if(/%$/.test(i.width)){t=parseFloat(i.width)/100,o=parseFloat(i.height)/100;const r=t*e.width,n=o*e.height;t=r/e.width*100,o=n/e.height*100}else t=i.width,o=i.height;i.rx=.5*t,i.ry=.5*o,/%$/.test(i.width)&&(i.rx+="%",i.ry+="%"),i.x=og(i.x,i.rx),i.y=og(i.y,i.ry),delete i.width,delete i.height,delete i.borderStyle}if("rect"===t&&delete i.borderStyle,"path"===t){let e,t=[];for(const o of i.points)e?Me(e,o)<1e-9||(t.push(o),e=o,e=o):(t.push(o),e=o);i.points=t.map((e=>({x:tg(e.x),y:tg(e.y)})))}return i})(i.crop||t,e[0],e[1])))}if(o.color||o.colors){const e=o.color||o.colors;Object.keys(e).filter((t=>e[t])).map((t=>[t,Array.isArray(e[t].matrix)?e[t].matrix:Object.values(e[t].matrix)])).forEach((([e,t])=>{i.colorMatrix||(i.colorMatrix={}),i.colorMatrix[e]=t}))}if(o.filter||o.filters){const t=o.filters||o.filter;i.colorMatrix||(i.colorMatrix={});const r=e?e.filterFunctions:Jm;i.colorMatrix.filter="string"==typeof t&&r[t]?r[t]():t.matrix}const r=o.size?o.size:!!o.resize&&o.resize.size;return r&&r.width&&r.height&&(i.targetSize={width:r.width,height:r.height}),i},e.locale_en_gb=Nv,e.markup_editor_defaults=Tv,e.markup_editor_locale_en_gb=Hv,e.naturalAspectRatioToNumber=e=>{if(void 0===e||Ao(e))return e;if(!R(e))return!1;const t=e;if(!t.length)return;const[o,i]=t.split(/\/|:/g).map((e=>parseFloat(e.replace(/,/,".")))).filter(Boolean);return!!o&&(i?Math.abs(o/i):o)},e.openDefaultEditor=(e,t)=>iw(cw(e),t),e.openEditor=iw,e.overlayDefaultEditor=(e,t)=>rw(e,cw(t)),e.overlayEditor=rw,e.plugin_annotate=Iv,e.plugin_annotate_locale_en_gb=qv,e.plugin_crop=Rv,e.plugin_crop_locale_en_gb=jv,e.plugin_decorate=Av,e.plugin_decorate_locale_en_gb=Yv,e.plugin_fill=Ov,e.plugin_fill_locale_en_gb=Uv,e.plugin_filter=Pv,e.plugin_filter_defaults=_v,e.plugin_filter_locale_en_gb=Gv,e.plugin_finetune=Ev,e.plugin_finetune_defaults=Wv,e.plugin_finetune_locale_en_gb=Zv,e.plugin_frame=zv,e.plugin_frame_defaults=Vv,e.plugin_frame_locale_en_gb=Jv,e.plugin_redact=Fv,e.plugin_redact_locale_en_gb=Qv,e.plugin_resize=Dv,e.plugin_resize_locale_en_gb=Xv,e.plugin_retouch=Bv,e.plugin_retouch_locale_en_gb=ew,e.plugin_sticker=Lv,e.plugin_sticker_locale_en_gb=Kv,e.processDefaultImage=lw,e.processImage=ks,e.removeNode=Dm,e.selectionToMask=hw,e.setPlugins=Mv,e.shapeGetCenter=wr,e.shapeGetLength=e=>{if(e.x1)return Re(ue(e.x1,e.y1),ue(e.x2,e.y2))},e.shapeGetLevel=(e,t)=>{let o=!1;t.flipX&&e.flipX?o=!0:!t.flipX&&e.flipX?o=!1:t.flipX&&!e.flipX&&(o=!0);let i=!1;t.flipY&&e.flipY?i=!0:!t.flipY&&e.flipY?i=!1:t.flipY&&!e.flipY&&(i=!0);let r=-t.rotation;return!o&&!i||o&&i||(r=-r),{flipX:o,flipY:i,rotation:r}},e.supportsWebGL=Rp,e.updateNode=(e,t)=>{const[,,o]=e;Object.assign(o,t)},e.updateShapeById=(e,t,o)=>e.map((e=>e.id!==t?e:o(e))),Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/src/components/@pqina/pintura/pintura.css b/src/components/@pqina/pintura/pintura.css new file mode 100644 index 0000000..e20083e --- /dev/null +++ b/src/components/@pqina/pintura/pintura.css @@ -0,0 +1,10 @@ +/*! + * Pintura v8.71.2 - Test version + * (c) 2018-2024 PQINA Inc. - All Rights Reserved + * License: https://pqina.nl/pintura/license/ + * + * This version of Pintura is for testing purposes only. + * Visit https://pqina.nl/pintura/ to obtain a commercial license. + */ +/* eslint-disable */ +.PinturaUtilPanel[data-util=retouch] .PinturaControlListScroller+.PinturaControlListScroller{margin-top:1em}.PinturaUtilPanel[data-util=redact] .PinturaUtilFooter{padding:0}.PinturaUtilPanel[data-util=redact] .PinturaUtilFooter>div{height:1px}.pintura-editor,pintura-editor{--color-primary:#ffd843;--color-primary-dark:#ffc343;--color-primary-text:#000;--color-secondary:#03a9f4;--color-secondary-dark:#046bbf;--color-focus:4,107,191;--color-focus-100:rgba(var(--color-focus),1);--color-focus-50:rgba(var(--color-focus),0.5);--color-focus-25:rgba(var(--color-focus),0.25);--color-error:255,87,34;--color-error-100:rgb(var(--color-error));--color-error-75:rgba(var(--color-error),0.75);--color-error-50:rgba(var(--color-error),0.5);--color-error-25:rgba(var(--color-error),0.25);--color-error-10:rgba(var(--color-error),0.1);--color-foreground:0,0,0;--color-background:255,255,255;--color-preview-outline:var(--color-foreground);--color-transition-duration:250ms;--button-cursor:pointer;--font-size:16px;--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--backdrop-filter-bright:brightness(110%) saturate(180%) blur(10px);--backdrop-filter-dark:brightness(90%) saturate(180%) blur(10px);--border-radius-round:9999em;--border-radius:0.625em;--filter-disabled:grayscale(95%) opacity(40%);--editor-inset-top:0px;--editor-inset-bottom:0px;--safe-area-inset-top:0px;--safe-area-inset-bottom:0px;--pattern-transparent:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h4v4H0zm4 4h4v4H4z' fill='%23E5E5E5'/%3E%3C/svg%3E");--grid-color-even:rgba(var(--color-foreground),0.1);--grid-color-odd:rgba(var(--color-background),0.1);--grid-size:24}.pintura-editor,.pintura-editor-panel,pintura-editor{--color-foreground-100:rgba(var(--color-foreground),1);--color-foreground-95:rgba(var(--color-foreground),0.95);--color-foreground-90:rgba(var(--color-foreground),0.9);--color-foreground-80:rgba(var(--color-foreground),0.8);--color-foreground-70:rgba(var(--color-foreground),0.7);--color-foreground-60:rgba(var(--color-foreground),0.6);--color-foreground-50:rgba(var(--color-foreground),0.5);--color-foreground-40:rgba(var(--color-foreground),0.4);--color-foreground-30:rgba(var(--color-foreground),0.3);--color-foreground-20:rgba(var(--color-foreground),0.25);--color-foreground-15:rgba(var(--color-foreground),0.2);--color-foreground-10:rgba(var(--color-foreground),0.15);--color-foreground-5:rgba(var(--color-foreground),0.075);--color-foreground-3:rgba(var(--color-foreground),0.05);--color-foreground-1:rgba(var(--color-foreground),0.02);--color-foreground-0:rgba(var(--color-foreground),0);--color-background-100:rgba(var(--color-background),1);--color-background-95:rgba(var(--color-background),0.95);--color-background-90:rgba(var(--color-background),0.9);--color-background-80:rgba(var(--color-background),0.8);--color-background-70:rgba(var(--color-background),0.7);--color-background-60:rgba(var(--color-background),0.6);--color-background-50:rgba(var(--color-background),0.5);--color-background-40:rgba(var(--color-background),0.4);--color-background-30:rgba(var(--color-background),0.3);--color-background-20:rgba(var(--color-background),0.2);--color-background-15:rgba(var(--color-background),0.15);--color-background-10:rgba(var(--color-background),0.1);--color-background-5:rgba(var(--color-background),0.05);--color-background-3:rgba(var(--color-background),0.03);--color-background-1:rgba(var(--color-background),0.01);--color-background-0:rgba(var(--color-background),0)}.pintura-editor,.PinturaRootWrapper,pintura-editor{display:block}.PinturaRootWrapper{height:100%}.PinturaScrollableContent{overflow:hidden;max-height:80vh;overflow-y:auto;scrollbar-color:var(--color-foreground-30) transparent;scrollbar-width:thin}.PinturaScrollableContent::-webkit-scrollbar{width:1em;cursor:pointer}.PinturaScrollableContent::-webkit-scrollbar-track{background:none}.PinturaScrollableContent::-webkit-scrollbar-thumb{cursor:pointer;background-clip:padding-box;background-color:var(--color-foreground-30);border-radius:9999em;border:.3125em solid transparent}.PinturaRoot[data-env~=is-animated]{--transition-duration-multiplier:1}.PinturaRoot[data-env~=is-transparent]{background:none}.PinturaRoot{--nav-group-margin:0.5em;--editor-calculated-inset-top:calc(var(--safe-area-inset-top) + var(--editor-inset-top));--editor-calculated-inset-bottom:calc(var(--safe-area-inset-bottom) + var(--editor-inset-bottom));--transition-duration-10:calc(var(--transition-duration-multiplier, 0) * 0.1s);--transition-duration-25:calc(var(--transition-duration-multiplier, 0) * 0.25s);--transition-duration-50:calc(var(--transition-duration-multiplier, 0) * 0.5s);box-sizing:border-box;width:var(--editor-width,100%);height:var(--editor-height,100%);padding-top:var(--editor-calculated-inset-top);padding-bottom:var(--editor-calculated-inset-bottom);max-width:var(--editor-max-width,var(--editor-max-width-default,none));max-height:var(--editor-max-height,var(--editor-max-height-default,none));position:relative;overflow:hidden;contain:strict;display:grid;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal;font-size:var(--font-size);font-family:var(--font-family);font-weight:450;touch-action:manipulation;text-align:left;text-transform:none;text-rendering:optimizeLegibility;direction:ltr;color:var(--color-foreground-90);background-color:var(--color-background-100);outline-color:rgba(var(--color-preview-outline),1);transition:background-color 1ms,outline-color 1ms,color var(--transition-duration-10) ease-in-out,dir 1ms}.PinturaRoot[dir=rtl] button{direction:rtl}.PinturaRoot .PinturaUtilMain{cursor:var(--cursor)}.PinturaRoot *{box-sizing:content-box;word-wrap:normal}.PinturaRoot button,.PinturaRoot fieldset,.PinturaRoot input,.PinturaRoot legend{padding:0;margin:0;border:none;background:transparent;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;width:auto;text-decoration:none}.PinturaRoot button[disabled]{pointer-events:none}.PinturaRoot canvas{display:block}.PinturaRoot svg{display:inline-block;width:auto;height:auto;max-width:none}.PinturaRoot p{margin:0}.PinturaRoot li,.PinturaRoot ul{list-style:none;margin:0;padding:0}.PinturaRoot a{color:inherit;text-decoration:none}.PinturaRoot .implicit{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0,0 0,0 0);clip-path:polygon(0 0,0 0,0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.PinturaRoot .PinturaFixedWidthCharacters{font-variant:tabular-nums}.PinturaRoot .PinturaStage{display:flex;align-self:stretch;flex:1;pointer-events:none}.PinturaRoot .PinturaStage[tabindex="-1"]{outline:none}.PinturaRoot .PinturaRootPortal,.PinturaRoot>.PinturaCanvas{position:absolute;left:0;top:0}.PinturaRoot>.PinturaCanvas{width:100%;height:100%;pointer-events:none;z-index:0}.PinturaRoot>.PinturaCanvas canvas{position:absolute;width:100%;height:100%}.PinturaRoot>.PinturaCanvas:after{content:"";position:absolute;left:0;top:0;bottom:0;right:0;background-repeat:no-repeat}.PinturaRoot>.PinturaStatus{position:absolute;z-index:99999;left:0;top:0;width:100%;height:100%;display:flex;justify-content:center;align-items:flex-start;background-color:var(--color-background-90)}.PinturaRoot>.PinturaStatus>p{position:absolute;top:50%;left:50%;display:inline-flex;white-space:nowrap;align-items:center;transition:opacity var(--transition-duration-50) ease-out}.PinturaRoot .PinturaStatusMessage{position:absolute;font-size:.875em}.PinturaRoot .PinturaStatusAside{position:absolute;left:0}.PinturaRoot .PinturaStatusAside svg{width:1.25em;height:1.25em}.PinturaRoot .PinturaStatusAside .PinturaProgressIndicator{margin-left:.5em}.PinturaRoot .PinturaStatusAside .PinturaButton{outline:transparent;margin-left:.75em;font-size:.875em;border-radius:var(--border-radius-round);background-color:var(--color-foreground-5);padding:.25em;transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out;-webkit-backdrop-filter:var(--backdrop-filter-dark);backdrop-filter:var(--backdrop-filter-dark)}.PinturaRoot .PinturaStatusAside .PinturaButton:not([disabled])[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaRoot .PinturaStatusAside .PinturaButton:not([disabled]):hover{background-color:var(--color-foreground-10)}.PinturaRoot .PinturaStatusIcon svg{font-size:.875em;margin-top:.25em;margin-left:.5em}.PinturaRoot>.PinturaNav{position:relative;z-index:3}.PinturaRoot>.PinturaNav:empty{display:none!important}.PinturaRoot>.PinturaNav .PinturaButton{outline:transparent;transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out}.PinturaRoot>.PinturaNav .PinturaButton svg{width:1em;transition:opacity var(--transition-duration-10) ease-out}.PinturaRoot>.PinturaNav .PinturaButton>span{justify-content:center}.PinturaRoot>.PinturaNav .PinturaButtonIconOnly .PinturaButtonInner,.PinturaRoot>.PinturaNav .PinturaDropdownIconOnly .PinturaButtonInner{width:1.75em}.PinturaRoot>.PinturaNav .PinturaButton .PinturaButtonInner{height:1.75em}.PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonIconOnly):not(.PinturaDropdownIconOnly){padding-left:.75em;padding-right:.75em}.PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonIconOnly):not(.PinturaDropdownIconOnly) .PinturaButtonLabel{font-size:.75em;line-height:2}.PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonIconOnly):not(.PinturaDropdownIconOnly):not(.PinturaDropdownButton){box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaRoot>.PinturaNav .PinturaButton:only-of-type{border-radius:var(--border-radius-round)}.PinturaRoot>.PinturaNav .PinturaButton:only-of-type+*{margin-left:.5em}.PinturaRoot>.PinturaNav .PinturaButton[disabled] .PinturaButtonLabel,.PinturaRoot>.PinturaNav .PinturaButton[disabled] svg{opacity:.25}.PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonExport):not([disabled])[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonExport):not([disabled]):hover{background-color:var(--color-foreground-10)}.PinturaRoot .PinturaButtonExport{color:var(--color-primary-text);background-color:var(--color-primary)}.PinturaRoot .PinturaButtonExport:hover{background-color:var(--color-primary-dark)}.PinturaRoot .PinturaButtonExport[data-focus-visible]{color:var(--color-primary-text);background-color:var(--color-primary);box-shadow:inset 0 0 0 1px var(--color-foreground-5),0 0 0 3px var(--color-focus-50);background-color:var(--color-primary-dark)}.PinturaRoot .PinturaButtonExport:not(.PinturaButtonIconOnly){flex:1;padding:0 .75em}.PinturaRoot>.PinturaNavMain{display:flex;overflow:hidden}.PinturaRoot>.PinturaNavMain [aria-selected=true] button{-webkit-backdrop-filter:var(--backdrop-filter-dark);backdrop-filter:var(--backdrop-filter-dark);background-color:var(--color-foreground-10)}.PinturaRoot>.PinturaNavMain button svg{align-self:center;width:1.5em}.PinturaRoot>.PinturaNavMain button span,.PinturaRoot>.PinturaNavMain button svg{pointer-events:none}.PinturaRoot>.PinturaNavMain button svg+span{margin-top:.75em}.PinturaRoot>.PinturaNavMain button span{font-size:.875em;display:block;width:calc(100% - 1em);overflow:hidden;text-overflow:ellipsis;width:inherit;max-width:calc(100% - 1em)}.PinturaRoot>.PinturaNavMain button{box-shadow:inset 0 0 0 1px var(--color-foreground-5);transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out,box-shadow var(--transition-duration-10) ease-out}.PinturaRoot>.PinturaNavMain button:hover{box-shadow:inset 0 0 0 1px var(--color-foreground-10)}.PinturaRoot>.PinturaNavMain button[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaRoot>.PinturaNavTools{max-width:100%;box-sizing:border-box;pointer-events:none}.PinturaRoot>.PinturaNavTools:empty{display:none}.PinturaRoot>.PinturaNavTools,.PinturaRoot>.PinturaNavTools .PinturaNavGroup,.PinturaRoot>.PinturaNavTools .PinturaNavSet{display:flex;align-items:center;justify-content:center}.PinturaRoot>.PinturaNavTools .PinturaButton,.PinturaRoot>.PinturaNavTools .PinturaNavSet{pointer-events:all}.PinturaRoot>.PinturaNavTools .PinturaButton[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaRoot .PinturaNavGroup{margin:0 var(--nav-group-margin)}.PinturaRoot .PinturaNavGroup>*{border-radius:var(--border-radius-round)}.PinturaRoot .PinturaNavGroup>*+*{margin-left:.5em}.PinturaRoot .PinturaNavGroup:first-of-type{margin-right:auto;margin-left:0}.PinturaRoot .PinturaNavGroup:last-of-type{margin-left:auto;margin-right:0}.PinturaRoot .PinturaNavSet{box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaRoot .PinturaNavSet>:not(:only-child){border:1px solid var(--color-foreground-3);border-top:0;border-bottom:0}.PinturaRoot .PinturaNavSet>:first-child:not(:only-child){border-left:0}.PinturaRoot .PinturaNavSet>:last-child:not(:only-child){border-right:0}.PinturaRoot .PinturaNavSet>*+*{margin-left:-1px}.PinturaRoot .PinturaNavSet>.PinturaButton:hover,.PinturaRoot .PinturaNavSet>.PinturaButton[data-focus-visible]{position:relative;z-index:1}.PinturaRoot .PinturaNavSet>:only-child{border-radius:var(--border-radius-round)}.PinturaRoot .PinturaNavSet>:first-child:not(:only-child) .PinturaButtonInner{padding:0 .125em 0 .25em}.PinturaRoot .PinturaNavSet>:first-child:not(:only-child){border-top-left-radius:var(--border-radius-round);border-bottom-left-radius:var(--border-radius-round)}.PinturaRoot .PinturaNavSet>:last-child:not(:only-child) .PinturaButtonInner{padding:0 .25em 0 .125em}.PinturaRoot .PinturaNavSet>:last-child:not(:only-child){border-top-right-radius:var(--border-radius-round);border-bottom-right-radius:var(--border-radius-round)}.PinturaRoot[data-env~=overlay] .PinturaNavSet{background-color:var(--color-background-50);-webkit-backdrop-filter:var(--backdrop-filter-bright);backdrop-filter:var(--backdrop-filter-bright);box-shadow:inset 0 0 0 1px var(--color-background-15),0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.PinturaRoot[data-env~=overlay] .PinturaNavSet .PinturaButton:not(.PinturaButtonExport):not([disabled]):hover,.PinturaRoot[data-env~=overlay] .PinturaNavSet>*{border-color:var(--color-background-15)}.PinturaRoot[data-env~=overlay] .PinturaNavGroup>.PinturaButton{box-shadow:0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.PinturaRoot[data-env~=overlay] .PinturaNavGroup .PinturaButtonExport{box-shadow:inset 0 0 .125em rgba(0,0,0,.25),0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.PinturaRoot .PinturaNavGroupFloat{position:absolute;left:0;right:0;pointer-events:none}.PinturaRoot .PinturaNavGroupFloat>*{pointer-events:all}.PinturaRoot .PinturaUtilFooter .PinturaScrollable>div{padding-left:1em;padding-right:1em}.PinturaRoot>.PinturaMain{max-width:100vw}.PinturaRoot:not([data-env~=has-toolbar]) .PinturaUtilHeader{padding-top:0;padding-bottom:1em;margin-bottom:-1em}.PinturaRoot[data-env~=landscape]{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;grid-template-columns:auto}.PinturaRoot[data-env~=landscape]>.PinturaNavTools{grid-row:1;grid-column:1;padding:1em 1em 0;z-index:3}.PinturaRoot[data-env~=landscape]>.PinturaNavMain{align-items:center;justify-content:flex-end;position:absolute;left:1em;top:calc(1em + var(--editor-calculated-inset-top));bottom:calc(1em + var(--editor-calculated-inset-bottom))}.PinturaRoot[data-env~=landscape]>.PinturaNavMain .PinturaTabList{flex-direction:column}.PinturaRoot[data-env~=landscape]>.PinturaNavMain .PinturaTabList li{display:flex}.PinturaRoot[data-env~=landscape]>.PinturaNavMain .PinturaTabList li+li{margin:.5em 0 0}.PinturaRoot[data-env~=landscape]>.PinturaNavMain button{flex:1;width:4em;height:4em;border-radius:var(--border-radius);justify-content:center}.PinturaRoot[data-env~=landscape]>.PinturaNavMain button span{font-size:.6875em;margin-top:.5em}.PinturaRoot[data-env~=landscape]>.PinturaNavMain button svg{width:1em;margin-top:.25em}.PinturaRoot[data-env~=landscape][data-env~=has-toolbar]>.PinturaNavMain{top:calc(4em + var(--editor-calculated-inset-top));bottom:calc(4em + var(--editor-calculated-inset-bottom))}.PinturaRoot[data-env~=landscape][data-env~=has-limited-space]>.PinturaNavMain{align-items:flex-start;bottom:calc(1em + var(--editor-calculated-inset-bottom))}.PinturaRoot[data-env~=landscape]>.PinturaMain{grid-row:2;grid-column:1}.PinturaRoot[data-env~=landscape][data-env~=has-toolbar-preference-bottom]{grid-template-rows:auto -webkit-min-content;grid-template-rows:auto min-content}.PinturaRoot[data-env~=landscape][data-env~=has-toolbar-preference-bottom]>.PinturaNavTools{grid-row:2;padding-top:0;padding-bottom:1em}.PinturaRoot[data-env~=landscape][data-env~=has-toolbar-preference-bottom]>.PinturaMain{grid-row:1}.PinturaRoot[data-env~=landscape][data-env~=has-navigation]{grid-template-columns:6em auto}.PinturaRoot[data-env~=landscape][data-env~=has-navigation]:not([data-env~=narrow]) .PinturaNavGroupFloat{margin:0 0 0 7em}.PinturaRoot[data-env~=landscape][data-env~=has-navigation]>.PinturaNavTools{grid-column:1/span 2}.PinturaRoot[data-env~=landscape][data-env~=has-navigation]>.PinturaMain{grid-column:2}.PinturaRoot[data-env~=landscape][data-env~=has-navigation]:not([data-env~=has-navigation-preference-right]) .PinturaUtilMain{padding-left:0}.PinturaRoot[data-env~=landscape][data-env~=has-navigation]:not([data-env~=has-navigation-preference-right]) .PinturaUtilFooter{padding-right:1em}.PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right]{grid-template-columns:auto 6em}.PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right]:not([data-env~=narrow]) .PinturaNavGroupFloat{margin:0 7em 0 0}.PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right]>.PinturaNavMain{right:1em;left:auto}.PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right]>.PinturaMain{grid-column:1}.PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right] .PinturaUtilMain{padding-right:0}.PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right] .PinturaUtilFooter{padding-left:1em}.PinturaRoot[data-env~=portrait]{grid-template-rows:-webkit-min-content auto -webkit-min-content;grid-template-rows:min-content auto min-content;grid-template-columns:auto}.PinturaRoot[data-env~=portrait]>*{grid-column:1}.PinturaRoot[data-env~=portrait]>.PinturaNavTools{grid-row:1;padding:.75em .75em 0}.PinturaRoot[data-env~=portrait]>.PinturaNavMain{grid-row:3;margin-bottom:.75em;justify-content:center}.PinturaRoot[data-env~=portrait]>.PinturaNavMain .PinturaTabList{padding:0 .875em}.PinturaRoot[data-env~=portrait]>.PinturaNavMain li+li{margin-left:.5em}.PinturaRoot[data-env~=portrait]>.PinturaNavMain[data-state~=overflows]{overflow:visible}.PinturaRoot[data-env~=portrait]>.PinturaNavMain button{flex:1;width:4em;height:4em;border-radius:var(--border-radius);justify-content:center}.PinturaRoot[data-env~=portrait]>.PinturaNavMain button span{font-size:.6875em;margin-top:.5em}.PinturaRoot[data-env~=portrait]>.PinturaNavMain button svg{width:1em;margin-top:.25em}.PinturaRoot[data-env~=portrait]>.PinturaMain{grid-row:2;grid-column:1}.PinturaRoot[data-env~=portrait][data-env~=has-toolbar-preference-bottom]{grid-template-rows:auto -webkit-min-content -webkit-min-content;grid-template-rows:auto min-content min-content}.PinturaRoot[data-env~=portrait][data-env~=has-toolbar-preference-bottom]>.PinturaNavTools{grid-row:3;padding:0 .75em .75em}.PinturaRoot[data-env~=portrait][data-env~=has-toolbar-preference-bottom]>.PinturaNavMain{grid-row:2}.PinturaRoot[data-env~=portrait][data-env~=has-toolbar-preference-bottom]>.PinturaMain{grid-row:1}.PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top]{grid-template-rows:-webkit-min-content -webkit-min-content auto;grid-template-rows:min-content min-content auto}.PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top]>.PinturaMain{grid-row:3}.PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top]>.PinturaNavMain{grid-row:2;margin-top:.75em;margin-bottom:0}.PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top][data-env~=has-toolbar-preference-bottom]{grid-template-rows:-webkit-min-content auto -webkit-min-content;grid-template-rows:min-content auto min-content}.PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top][data-env~=has-toolbar-preference-bottom]>.PinturaNavMain{grid-row:1}.PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top][data-env~=has-toolbar-preference-bottom]>.PinturaMain{grid-row:2}.PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top][data-env~=has-toolbar-preference-bottom]>.PinturaNavTools{grid-row:3}.PinturaRoot[data-env~=landscape][data-env~=is-compact]>.PinturaNavMain button{flex:1;flex-direction:row;width:auto;height:auto;border-radius:var(--border-radius);justify-content:flex-start;align-items:center;padding:.625em 0;width:6em}.PinturaRoot[data-env~=landscape][data-env~=is-compact]>.PinturaNavMain button span{font-size:.6875em;margin:0 .625em 0 0;line-height:1.2;text-align:left}.PinturaRoot[data-env~=landscape][data-env~=is-compact]>.PinturaNavMain button svg{margin:0 .5em 0 .625em;min-width:1em}.PinturaRoot[data-env~=landscape][data-env~=is-compact][data-env~=has-navigation]{grid-template-columns:8em auto}.PinturaRoot[data-env~=landscape][data-env~=is-compact][data-env~=has-navigation][data-env~=has-navigation-preference-right]{grid-template-columns:auto 8em}.PinturaRoot[data-env~=landscape][data-env~=is-compact][dir=rtl]>.PinturaNavMain button{padding-left:.625em}.PinturaRoot[data-env~=landscape][data-env~=is-compact][dir=rtl]>.PinturaNavMain svg{margin-left:0}.PinturaRoot[data-env~=narrow] .PinturaNavGroupFloat{position:static;margin:0}.PinturaRoot[data-env~=portrait][data-env~=is-compact]>.PinturaNavMain button{padding:0;font-size:.625em;width:4em;height:4em;justify-content:center;border-radius:9999em}.PinturaRoot[data-env~=portrait][data-env~=is-compact]>.PinturaNavMain button span{visibility:hidden;font-size:0;margin:0}.PinturaRoot[data-env~=portrait][data-env~=is-compact]>.PinturaNavMain button svg{margin-top:0;width:1.6em}.PinturaRoot[data-env~=portrait][data-env~=is-compact]>.PinturaNavMain button svg [stroke-width]{stroke-width:.15em}.PinturaRoot[data-env~=portrait][data-env~=narrow]{--nav-group-margin:0.25em;grid-template-rows:-webkit-min-content auto -webkit-min-content;grid-template-rows:min-content auto min-content;grid-template-columns:auto}.PinturaRoot[data-env~=portrait][data-env~=narrow]>*{grid-column:1}.PinturaRoot[data-env~=portrait][data-env~=narrow] .PinturaUtilFooter .PinturaControlList .PinturaControlListOption span,.PinturaRoot[data-env~=portrait][data-env~=narrow] .PinturaUtilFooter .PinturaControlList [role=tab] span{font-size:.6875em}.PinturaRoot[data-env~=portrait][data-env~=narrow] .PinturaToolbar .PinturaToolbarInner>*{margin:0 .25em}.PinturaRoot[data-env~=portrait][data-env~=narrow][data-env~=has-toolbar-preference-bottom]{grid-template-rows:auto -webkit-min-content -webkit-min-content;grid-template-rows:auto min-content min-content}.PinturaRoot[data-env~=overlay]{grid-template-rows:auto!important;grid-template-columns:auto!important}.PinturaRoot[data-env~=overlay] .PinturaNav{z-index:3}.PinturaRoot[data-env~=overlay] .PinturaMain{grid-row:1;grid-column:1}.PinturaRoot[data-env~=overlay] .PinturaUtilMain{position:absolute;left:0;top:0;right:0;bottom:0;padding:0;z-index:-1}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter,.PinturaRoot[data-env~=overlay] .PinturaUtilHeader{position:absolute;left:0;right:0}.PinturaRoot[data-env~=overlay] .PinturaUtilHeader{top:0}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter{bottom:0}.PinturaRoot[data-env~=overlay] .PinturaNavMain{position:absolute;right:0;top:0;bottom:0;background:none}.PinturaRoot[data-env~=overlay] .PinturaNavTools{position:absolute;left:0;top:0;right:0}.PinturaRoot[data-env~=overlay][data-env~=has-controlgroups-preference-top] .PinturaUtilFooter{top:0;bottom:auto}.PinturaRoot[data-env~=overlay][data-env~=has-toolbar-preference-bottom] .PinturaNavTools{top:auto;bottom:0}.PinturaRoot[data-env~=has-swipe-navigation] .PinturaUtilMain{padding-left:2em;padding-right:2em}.PinturaRoot[data-env~=has-swipe-navigation][data-env~=landscape] .PinturaUtilMain[data-env~=has-navigation]{padding-left:0;padding-right:2em}.PinturaRoot[data-env~=has-swipe-navigation][data-env~=landscape] .PinturaUtilMain[data-env~=has-navigation][data-env~=has-navigation-preference-right]{padding-left:2em;padding-right:0}.PinturaRoot[data-env*=is-disabled],.PinturaRoot[data-env*=is-disabled] *{pointer-events:none!important}.PinturaRoot[data-env*=is-disabled]{--color-primary:#b4b4b4;--color-primary-dark:#a0a0a0;--color-primary-text:#000;--color-secondary:#969696;--color-secondary-dark:#646464}.PinturaRoot[data-env*=is-disabled] .PinturaCanvas,.PinturaRoot[data-env*=is-disabled] .PinturaColorPickerButton{filter:grayscale(100%)}.PinturaRoot .PinturaEditorOverlay{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3;background:var(--color-background-50);pointer-events:none}@media not all and (-webkit-min-device-pixel-ratio:0), not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none){.PinturaNav{will-change:transform}}}.PinturaUtilPanel[data-util=frame] .PinturaShapeStyleEditor{min-height:3.375em}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption{margin:1em 1em 0 0;padding:.125em;border:1px dashed var(--color-foreground-15);color:var(--color-foreground-70)}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption span{color:var(--color-foreground-90)}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption label{font-size:.75em}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption img,.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption svg{position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.PinturaUtilPanel[data-util=frame] [data-selected=true]{border-color:var(--color-primary);color:var(--color-primary)}.PinturaUtilPanel[data-util=frame] [data-selected=true] span{color:var(--color-foreground-90)}.PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .5em}.PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOptionGroupLabel{width:1px;height:1px;position:absolute;font-size:0}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOptionGroup{display:flex;flex-direction:column-reverse}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption{cursor:var(--button-cursor);margin-bottom:1em}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption span{display:block;text-align:center;padding:0 1.5em;font-size:.625em;font-weight:400}.PinturaUtilPanel[data-util=frame] [data-focus-visible]+label>.PinturaRadioGroupOption span{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);border-radius:.25em}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption{position:relative;width:3em;height:4em}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption div{position:absolute;outline-color:currentColor;border-color:currentColor;cursor:var(--button-cursor)}.PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption div[slot]{overflow:hidden;left:-1px;top:-1px;bottom:-1px;right:-1px;display:flex;align-items:center;justify-content:center}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] .PinturaUtilFooter>div{padding:0}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption{width:2.25em;height:3em}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption span{font-size:.5em}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .25em}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.PinturaUtilPanel[data-util=filter] .PinturaUtilFooter{padding-left:0!important;padding-right:0!important}.PinturaUtilPanel[data-util=filter] .PinturaScrollable{width:40em}.PinturaUtilPanel[data-util=filter] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .5em}.PinturaUtilPanel[data-util=filter] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.PinturaUtilPanel[data-util=filter] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptionGroupLabel{width:1px;height:1px;position:absolute;font-size:0;pointer-events:none}.PinturaUtilPanel[data-util=filter] .PinturaFilterPreview{border-radius:0;transition:border-radius 1ms}.PinturaUtilPanel[data-util=filter] .PinturaFilterOption{border-radius:0}.PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptions .PinturaRadioGroupOption:first-of-type .PinturaFilterPreview{border-top-left-radius:var(--border-radius);border-bottom-left-radius:var(--border-radius)}.PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptions .PinturaRadioGroupOption:first-of-type .PinturaFilterOption{border-bottom-left-radius:var(--border-radius)}.PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptions .PinturaRadioGroupOption:last-of-type .PinturaFilterPreview{border-top-right-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptions .PinturaRadioGroupOption:last-of-type .PinturaFilterOption{border-bottom-right-radius:var(--border-radius)}.PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptionGroup{display:flex;flex-direction:column-reverse}.PinturaUtilPanel[data-util=filter] .PinturaFilterOption{cursor:var(--button-cursor);margin-bottom:1em}.PinturaUtilPanel[data-util=filter] .PinturaFilterOption span{display:block;text-align:center;padding:0 .3125em;line-height:1.75;max-width:100%;font-size:.625em;font-weight:400;margin-left:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.PinturaUtilPanel[data-util=filter] .PinturaFilterPreview:before{transition:background-color var(--transition-duration-10),color var(--transition-duration-10)}.PinturaUtilPanel[data-util=filter] [data-selected=true] .PinturaFilterOption .PinturaFilterPreview{position:relative;z-index:1}.PinturaUtilPanel[data-util=filter] [data-selected=true] .PinturaFilterOption .PinturaFilterPreview:before{content:"";position:absolute;width:100%;height:100%;opacity:.35;border-radius:inherit;background-color:var(--color-primary)}.PinturaUtilPanel[data-util=filter] [data-focus-visible]+label>.PinturaFilterOption span{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);border-radius:.25em}.PinturaUtilPanel[data-util=filter] .PinturaFilterOption,.PinturaUtilPanel[data-util=filter] .PinturaFilterPreview{width:3.75em;height:4.5em}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=filter] .PinturaUtilFooter>div{padding:0}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=filter] .PinturaFilterOption,.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=filter] .PinturaFilterPreview{width:2.875em;height:3.5em}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=filter] .PinturaFilterOption span{font-size:.5em}.PinturaUtilPanel[data-util=crop] .PinturaStage{touch-action:none}.PinturaUtilPanel[data-util=crop],.PinturaUtilPanel[data-util=crop] .PinturaStage,.PinturaUtilPanel[data-util=crop] .PinturaUtilMain{pointer-events:all}.PinturaUtilPanel[data-util=crop] .PinturaImageInfo{position:absolute;right:1em;bottom:1em}.PinturaUtilPanel[data-util=crop] .PinturaButtonCenter{--size:3em;position:absolute;left:0;top:0;width:var(--size);height:var(--size);z-index:1;line-height:0;margin-top:calc(var(--size) * (-.5));margin-left:calc(var(--size) * (-.5));overflow:hidden;border-radius:50%;color:#000;background:hsla(0,0%,100%,.8);-webkit-backdrop-filter:var(--backdrop-filter-bright);backdrop-filter:var(--backdrop-filter-bright);outline:none}.PinturaUtilPanel[data-util=crop] .PinturaButtonCenter[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaRoot[data-env~=short] .PinturaUtilPanel[data-util=crop] .PinturaUtilFooter{padding-bottom:.5em}.PinturaRoot[data-env~=overlay] .PinturaUtilPanel[data-util=crop] .PinturaUtilFooter,.PinturaRoot[data-env~=overlay] .PinturaUtilPanel[data-util=crop] .PinturaUtilFooter>[slot]:empty{pointer-events:none}.PinturaUtilPanel[data-util=resize] form{display:flex;justify-content:center;padding:0 1em}.PinturaUtilPanel[data-util=resize] .PinturaFormInner{position:relative;display:flex;justify-content:center;align-items:center}.PinturaUtilPanel[data-util=resize] .PinturaFormInner>button{position:absolute;left:100%;margin-left:1em}.PinturaUtilPanel[data-util=resize] .PinturaFieldsetInner{display:inline-flex;align-items:center;justify-content:center}.PinturaUtilPanel[data-util=resize] .PinturaFieldsetInner>*{margin:.25em}.PinturaUtilPanel[data-util=resize] .PinturaResizeLabel{font-size:.75em}.PinturaUtilPanel[data-util=resize] .PinturaDropdownButton{margin-left:.5em;margin-right:.5em;background-color:var(--color-foreground-5);border-radius:var(--border-radius-round);box-shadow:inset 0 0 0 1px var(--color-foreground-5);transition:background-color var(--transition-duration-10)}.PinturaUtilPanel[data-util=resize] .PinturaDropdownButton:hover{background-color:var(--color-foreground-10)}.PinturaUtilPanel[data-util=resize] .PinturaDropdownButton .PinturaButtonLabel{display:block;line-height:2.65;padding:0 1em;font-variant-numeric:tabular-nums;font-size:.75em;font-weight:400}.PinturaUtilPanel[data-util=resize] .PinturaDropdownButton .PinturaButtonLabel:after{content:"▼";font-size:.6875em;margin-left:.75em;position:relative;top:-.125em;margin-right:-.25em;pointer-events:none}.PinturaUtilPanel[data-util=resize] input[type=checkbox]+label{padding:0 .125em;margin:0 -.25em;outline:transparent;display:block;cursor:pointer}.PinturaUtilPanel[data-util=resize] input[type=checkbox][data-focus-visible]+label{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaInputDimension{display:inline-flex;align-items:center;position:relative}.PinturaInputDimension label{position:absolute;right:.625em;font-size:.75em;text-transform:uppercase;pointer-events:none;color:var(--color-foreground-80);z-index:1}.PinturaInputDimension button,.PinturaInputDimension input,.PinturaInputDimension label{font-size:.75em;font-weight:400}.PinturaInputDimension button,.PinturaInputDimension input{-webkit-appearance:none;appearance:none;-moz-appearance:textfield;box-sizing:border-box;font-variant-numeric:tabular-nums;padding:.625em 0 .625em .625em;width:100%;max-width:7em;outline:transparent;border-radius:var(--border-radius);box-shadow:none;border:1px solid var(--color-foreground-80);transition:background-color var(--transition-duration-10) ease-in-out,color var(--transition-duration-10) ease-in-out,border-color var(--transition-duration-10) ease-in-out}.PinturaInputDimension button::-moz-selection, .PinturaInputDimension input::-moz-selection{background-color:var(--color-foreground-20)}.PinturaInputDimension button::selection,.PinturaInputDimension input::selection{background-color:var(--color-foreground-20)}.PinturaInputDimension button:hover,.PinturaInputDimension input:hover{background-color:var(--color-foreground-10)}.PinturaInputDimension button:focus,.PinturaInputDimension input:focus{border-color:var(--color-focus-100)}.PinturaInputDimension input{background-color:var(--color-foreground-5)}.PinturaInputDimension input:-moz-placeholder-shown+label{color:var(--color-foreground-20)}.PinturaInputDimension input:-ms-input-placeholder+label{color:var(--color-foreground-20)}.PinturaInputDimension input:placeholder-shown+label{color:var(--color-foreground-20)}.PinturaInputDimension input::-moz-placeholder{color:var(--color-foreground-30)}.PinturaInputDimension input:-ms-input-placeholder{color:var(--color-foreground-30)}.PinturaInputDimension input::placeholder{color:var(--color-foreground-30)}.PinturaInputDimension input[data-state=invalid]{border-color:var(--color-error-75);box-shadow:inset 0 0 .25em var(--color-error-25),0 0 .25em var(--color-error-50)}.PinturaInputDimension button{width:10em;min-height:2.65em}.PinturaInputDimension input::-webkit-inner-spin-button,.PinturaInputDimension input::-webkit-outer-spin-button{-webkit-appearance:none}.PinturaInputDimension input::-ms-clear{display:none}.PinturaRoot[dir=rtl] .PinturaInputDimension label{left:.625em;right:auto}.PinturaRoot[dir=rtl] .PinturaInputDimension input{padding-right:.625em;padding-left:0;text-align:right}.PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .25em}.PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.PinturaUtilPanel[data-util=fill] .PinturaRadioGroupOption{position:relative;width:3em;height:4em}.PinturaUtilPanel[data-util=fill] .PinturaFillTile{position:absolute;width:100%;height:100%}.PinturaUtilPanel[data-util=fill] .PinturaFillTile[data-transparent=true]{background-color:#fff;background-image:var(--pattern-transparent);border-radius:calc(var(--border-radius) + 1px)}.PinturaUtilPanel[data-util=fill] .PinturaFillTile div,.PinturaUtilPanel[data-util=fill] .PinturaFillTile img{cursor:var(--button-cursor);position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:var(--border-radius)}.PinturaUtilPanel[data-util=fill] .PinturaFillTile:after{content:"";z-index:3;position:absolute;left:0;top:0;width:100%;height:100%;box-shadow:inset 0 0 0 1px var(--color-foreground-5);border-radius:var(--border-radius);pointer-events:none}.PinturaUtilPanel[data-util=fill] .PinturaRadioGroupOption[data-selected=true] .PinturaFillTile:after{box-shadow:inset 0 0 0 1px var(--color-foreground-5),inset 0 0 0 4px var(--color-primary),inset 0 0 0 5px var(--color-foreground-5)}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] .PinturaUtilFooter>div{padding:0}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] .PinturaRadioGroupOption{width:2.25em;height:3em}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] .PinturaRadioGroupOption span{font-size:.5em}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .175em}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.PinturaModal{--safe-area-inset-top:env(safe-area-inset-top);--safe-area-inset-bottom:env(safe-area-inset-bottom);--editor-modal-border-radius:0;--editor-modal-overlay-opacity:0.95;--editor-modal-shadow:0 1em 2em -1em rgba(0,0,0,0.25),0 1.5em 1.5em -2em rgba(0,0,0,0.5);--editor-modal-outline:inset 0 0 0 1px var(--color-foreground-3);position:fixed;left:0;top:0;width:100%;height:100vh;z-index:2147483646;display:flex;justify-content:center;align-items:center;background-color:rgba(var(--color-background),var(--editor-modal-overlay-opacity,var(--editor-modal-overlay-opacity-default,.95)))}.PinturaModal>.PinturaRoot[data-env~=is-centered]{box-shadow:var(--editor-modal-shadow);border-radius:var(--editor-modal-border-radius)}.PinturaModal>.PinturaRoot[data-env~=is-centered]:after{position:absolute;left:0;top:0;bottom:0;right:0;pointer-events:none;border-radius:inherit;content:"";box-shadow:var(--editor-modal-outline);z-index:2147483646}.PinturaModal[style*="--viewport-pad-footer:1"]{box-sizing:border-box;padding-bottom:env(safe-area-inset-bottom)}.PinturaModal+.PinturaModal{--editor-modal-overlay-opacity-default:0.75}@media(min-width:600px) and (min-height:600px){.PinturaModal+.PinturaModal .PinturaRoot{--editor-max-width-default:calc(100vw - 8em);--editor-max-height-default:calc(100vh - 8em)}}.PinturaDocumentLock,.PinturaDocumentLock body{height:calc(var(--pintura-document-height) - 1px);overflow-y:hidden;box-sizing:border-box}.PinturaDocumentLock body{position:relative}.PinturaDocumentLock .PinturaModal{height:100%!important}.PinturaScrollable{--scrollable-feather-start-opacity:0;--scrollable-feather-end-opacity:0;--scrollable-feather-size:2em;contain:paint;overflow:hidden}.PinturaScrollable:focus{outline:transparent}.PinturaScrollable>div{position:relative;display:inline-flex;vertical-align:top}.PinturaScrollable{touch-action:none}.PinturaScrollable[data-direction=x]{max-width:100%;--mask-angle:90deg}.PinturaScrollable[data-direction=y]{max-height:100%;--mask-angle:180deg}.PinturaScrollable[data-state~=overflows]{-webkit-mask:linear-gradient(var(--mask-angle),rgba(0,0,0,var(--scrollable-feather-start-opacity)),#000 var(--scrollable-feather-size),#000 calc(100% - var(--scrollable-feather-size)),rgba(0,0,0,var(--scrollable-feather-end-opacity)));mask:linear-gradient(var(--mask-angle),rgba(0,0,0,var(--scrollable-feather-start-opacity)),#000 var(--scrollable-feather-size),#000 calc(100% - var(--scrollable-feather-size)),rgba(0,0,0,var(--scrollable-feather-end-opacity)))}.PinturaScrollable[data-state~=scrolling]>div *{pointer-events:none}.PinturaTabList{display:flex;justify-content:center}.PinturaTabList button{display:flex;align-items:center;flex-direction:column;outline:transparent;cursor:var(--button-cursor);-webkit-tap-highlight-color:transparent}.PinturaTabList button>*{transition:filter var(--transition-duration-10) ease-out}.PinturaTabList button[disabled]>*{filter:var(--filter-disabled)}.PinturaTabPanels{flex:1;display:grid;grid-template-columns:1fr}.PinturaTabPanel{position:relative;grid-row-start:1;grid-column-start:1;min-width:0}.PinturaTabPanel:not([hidden]){z-index:2;outline:transparent}.PinturaTabPanel[hidden]{display:block!important;z-index:1;pointer-events:none}.PinturaTabPanel[data-inert=true]{visibility:hidden}@supports not (aspect-ratio:1){.PinturaTabPanel{overflow-x:hidden}}.PinturaUtilPanel{position:relative;z-index:1;height:100%;display:flex;flex:1;flex-direction:column;contain:layout size;box-sizing:border-box}.PinturaUtilPanel,.PinturaUtilPanel>*{padding-top:.5em;padding-bottom:.5em}.PinturaButton{white-space:nowrap;flex-shrink:0;-webkit-tap-highlight-color:transparent;cursor:var(--button-cursor)}.PinturaButton>span{display:inline-flex;align-items:center;vertical-align:top;min-height:1em}.PinturaButton svg+.PinturaButtonLabel{margin-left:.5em}.PinturaButton[disabled]{cursor:default;filter:var(--filter-disabled)}.PinturaButtonInner{text-decoration:inherit}.PinturaButton:not(.PinturaButtonIconOnly) svg:first-of-type{margin-left:-.25em}.PinturaRoot[dir=rtl] .PinturaButton:not(.PinturaButtonIconOnly) svg:first-of-type{margin-right:-.25em}.PinturaRoot[dir=rtl] .PinturaButton svg+.PinturaButtonLabel{margin-left:0;margin-right:1em}.PinturaProgressIndicator{position:relative;display:block;width:1.25em;height:1.25em}.PinturaProgressIndicator svg{pointer-events:none;vertical-align:top}.PinturaProgressIndicator .PinturaProgressIndicatorFill{stroke-dashoffset:0}.PinturaProgressIndicator[data-status=busy] svg{-webkit-animation:image_editor_spin 1s linear infinite;animation:image_editor_spin 1s linear infinite}.PinturaProgressIndicator[data-status=busy] .PinturaProgressIndicatorFill{stroke-dashoffset:-26.5;stroke-dasharray:26.5 53;transition:stroke-dashoffset .5s linear,stroke-dasharray .5s linear}@-webkit-keyframes image_editor_spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes image_editor_spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media only screen and (-webkit-min-device-pixel-ratio:3){.PinturaRoot[data-env~=is-ios] .PinturaProgressIndicator svg{transform-origin:49% 49%}}.PinturaInputForm{opacity:0;cursor:auto;z-index:2147483647;--width:30em}.PinturaInputForm:not([data-stick=true]){position:absolute;bottom:7.5em;width:var(--width);left:calc(50% - var(--width) / 2);box-shadow:0 .25em .5em -.5em rgba(0,0,0,.75),inset 0 0 0 1px var(--color-foreground-5);border-radius:var(--border-radius);background-color:var(--color-background-95)}@media(max-width:34em){.PinturaInputForm:not([data-stick=true]){left:2em;right:2em;width:auto}}.PinturaInputForm[data-stick=true]{transition:opacity .15s ease .25s;position:absolute;left:0;right:0;outline:1px solid var(--color-foreground-15);background-color:var(--color-background-100)}.PinturaInputForm[data-stick=true]>.PinturaInputFormInner{background-color:var(--color-foreground-3)}.PinturaInputFormInner>.PinturaButton{color:var(--color-foreground-100);border-radius:9999em;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaInputFormInner>.PinturaButton:first-of-type{left:1em}.PinturaInputFormInner>.PinturaButton:last-of-type{right:1rem;color:var(--color-primary-text);background:var(--color-primary);box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaInputFormInner>.PinturaButton:not(.PinturaButtonIconOnly) .PinturaButtonInner{padding:0 .875em}.PinturaInputFormInner>.PinturaButton .PinturaButtonIcon{width:.875em;height:.875em}.PinturaInputFormInner>.PinturaButton.PinturaButtonIconOnly{width:1.875em;height:1.875em}.PinturaInputFormInner>.PinturaButton .PinturaButtonLabel{font-size:.75em}.PinturaInputFormInner>.PinturaButton .PinturaButtonInner{line-height:2;display:flex;justify-content:center}.PinturaInputFormInner{padding-top:1em;padding-bottom:3.5em}.PinturaInputFormInner>.PinturaButton{position:absolute;bottom:1em}.PinturaInputFormFields textarea:only-child{height:5em;-webkit-mask:linear-gradient(0deg,transparent,#000 1em);mask:linear-gradient(0deg,transparent,#000 1em)}.PinturaInputFormFields textarea:only-child::-webkit-scrollbar{width:1em;cursor:pointer}.PinturaInputFormFields textarea:only-child::-webkit-scrollbar-track{background:none}.PinturaInputFormFields textarea:only-child::-webkit-scrollbar-thumb{cursor:pointer;background-clip:padding-box;background-color:var(--color-foreground-70);border-radius:9999em;border:.25em solid transparent}.PinturaInputFormFields input:only-child,.PinturaInputFormFields textarea:only-child{width:100%;padding:0 1em .5em;display:block;background:transparent}.PinturaInputForm input,.PinturaInputForm textarea{box-sizing:border-box;resize:none;border:none;font-size:.875em;outline:transparent;color:var(--color-foreground-100)}.PinturaInputForm input{background-color:var(--color-background-100)}.PinturaModalBodyLock .PinturaInputForm{margin-top:-50px}.PinturaInputForm[data-layout=row]{--width:30em;width:var(--width);max-width:calc(100% - 2em);border-radius:9999em}.PinturaInputForm[data-layout=row] .PinturaInputFormFields{flex:1}.PinturaInputForm[data-layout=row] .PinturaInputFormInner{display:flex;padding:.5em}.PinturaInputForm[data-layout=row] .PinturaInputFormInner input{padding:0 .5em;line-height:1.75;font-size:.8125em;flex:1}.PinturaInputForm[data-layout=row] .PinturaInputFormInner .PinturaButton:first-child{margin-right:0}.PinturaInputForm[data-layout=row] .PinturaInputFormInner .PinturaButton{position:static}.PinturaInputForm[data-layout=row] .PinturaInputFormInner .PinturaButtonIconOnly{width:1.5em;height:1.5em}.PinturaInputForm[data-layout=row] .PinturaInputFormInner .PinturaButtonLabel{font-size:.625em}.PinturaUtilMain{padding-left:1em;padding-right:1em;min-height:1px;touch-action:none}.PinturaUtilMain,.PinturaUtilMain>[slot]{flex:1;display:flex;flex-direction:column}.PinturaUtilMain>[slot]{align-items:center}.PinturaUtilFooter>[slot]:empty{min-height:1em}.PinturaUtilFooter>[slot]{display:flex;flex-direction:column;align-items:center;justify-content:stretch;pointer-events:all}.PinturaUtilFooter .PinturaControlPanel .PinturaImageButtonList,.PinturaUtilFooter .PinturaShapeStyleList{min-height:3.5em;align-items:flex-start}.PinturaUtilFooter .PinturaControlList [role=tab][aria-selected=true] button{background-color:var(--color-foreground-10);box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaUtilFooter .PinturaControlList .PinturaControlListOption label,.PinturaUtilFooter .PinturaControlList [role=tab] button{flex-direction:row;line-height:1;padding:0 .75em;min-height:1.75em;white-space:nowrap;border-radius:var(--border-radius-round);transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out,filter var(--transition-duration-25) ease-out;box-shadow:inset 0 0 0 1px var(--color-foreground-0);cursor:var(--button-cursor)}.PinturaUtilFooter .PinturaControlList .PinturaControlListOption label span,.PinturaUtilFooter .PinturaControlList [role=tab] button span{font-size:.75em;font-weight:400}.PinturaUtilFooter .PinturaControlList .PinturaControlListOption label svg,.PinturaUtilFooter .PinturaControlList [role=tab] button svg{width:.875em;font-size:.875em}.PinturaUtilFooter .PinturaControlList .PinturaControlListOption label svg:only-child,.PinturaUtilFooter .PinturaControlList [role=tab] button svg:only-child{margin-left:-.25em;margin-right:-.25em}.PinturaUtilFooter .PinturaControlList .PinturaControlListOption label svg:not(:only-child),.PinturaUtilFooter .PinturaControlList [role=tab] button svg:not(:only-child){margin-left:-.25em;margin-right:.375em}.PinturaUtilFooter .PinturaControlList .PinturaControlListOption label:hover,.PinturaUtilFooter .PinturaControlList [role=tab] button:hover{box-shadow:inset 0 0 0 1px var(--color-foreground-10)}.PinturaUtilFooter .PinturaControlList .PinturaControlListOption label[data-focus-visible],.PinturaUtilFooter .PinturaControlList [role=tab] button[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaUtilFooter .PinturaControlListOption [slot],.PinturaUtilFooter .PinturaControlListOption label{display:flex;flex-direction:row;align-items:center}.PinturaUtilFooter .PinturaControlListOption[data-selected=true] label{background-color:var(--color-foreground-10);box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaUtilFooter .PinturaControlListOption input[data-focus-visible]+label{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaUtilFooter .PinturaControlListOption input[disabled]+label{filter:var(--filter-disabled)}.PinturaUtilFooter .PinturaControlList .PinturaControlListOption+.PinturaControlListOption,.PinturaUtilFooter .PinturaControlList>li+li{margin-left:.5em}.PinturaUtilFooter .PinturaControlPanels{display:grid;grid-template-columns:1fr;width:40em;max-width:100%;margin:0 auto;flex:auto}.PinturaUtilFooter .PinturaControlPanel{grid-row-start:1;grid-column-start:1;max-width:100%;overflow:hidden;visibility:visible;opacity:1}.PinturaUtilFooter .PinturaControlPanel[hidden]{display:block!important;visibility:hidden;transition-delay:0s;pointer-events:none;opacity:0}.PinturaUtilFooter .PinturaControlList[data-layout=compact]>*+*{margin-left:-1px}.PinturaUtilFooter .PinturaControlList[data-layout=compact]>[role=tab] button{padding-left:.625em;padding-right:.625em;border-radius:0;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaUtilFooter .PinturaControlList[data-layout=compact]>[role=tab]:only-child button{border-radius:var(--border-radius-round)}.PinturaUtilFooter .PinturaControlList[data-layout=compact]>[role=tab]:first-child:not(:only-child) button{padding-left:.75em;border-top-left-radius:var(--border-radius-round);border-bottom-left-radius:var(--border-radius-round)}.PinturaUtilFooter .PinturaControlList[data-layout=compact]>[role=tab]:last-child:not(:only-child) button{padding-right:.75em;border-top-right-radius:var(--border-radius-round);border-bottom-right-radius:var(--border-radius-round)}@supports not (aspect-ratio:1){.PinturaControlPanel{overflow-x:hidden}}.PinturaRoot[data-env~=is-animated] .PinturaUtilFooter .PinturaControlPanel{transition:opacity var(--transition-duration-25) ease-in-out,visibility var(--transition-duration-25) linear;transition-delay:.1s}.PinturaRoot[data-env~=has-controlgroups-preference-top] .PinturaUtilHeader{order:1}.PinturaRoot[data-env~=has-controlgroups-preference-top] .PinturaUtilFooter{order:2}.PinturaRoot[data-env~=has-controlgroups-preference-top] .PinturaUtilMain{order:3}.PinturaRoot[data-env~=has-controltabs-preference-bottom] .PinturaUtilFooter .PinturaControlPanels{order:-1}.PinturaRoot[data-env~=has-controltabs-preference-bottom] .PinturaUtilFooter .PinturaRangeInput .PinturaRangeInputReset{top:0;bottom:auto}.PinturaRoot[data-env~=has-controltabs-preference-bottom] .PinturaUtilFooter .PinturaControlPanel .PinturaShapePresetsGrouped{padding-bottom:.75em}.PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaControlPanels{order:1}.PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaRangeInput .PinturaRangeInputReset{top:auto;bottom:0}.PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaControlPanel .PinturaShapePresetsGrouped{padding-top:.75em}.PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaControlPanel .PinturaImageButtonList,.PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaShapeStyleList{align-items:flex-end}.PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaShapeStyleLabel{order:1}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter{margin:.75em 0}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlPanels{max-width:24em}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList{margin-top:1em}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList>li+li{margin-left:0}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li[role=tab] span{font-size:.75em}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li[role=tab] button{border-radius:0;background-color:var(--color-background-50);-webkit-backdrop-filter:var(--backdrop-filter-bright);backdrop-filter:var(--backdrop-filter-bright);box-shadow:inset 0 0 0 1px var(--color-background-15),0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li[role=tab]:first-child button{padding-left:.875em;border-top-left-radius:var(--border-radius-round);border-bottom-left-radius:var(--border-radius-round)}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li[role=tab]:last-child button{padding-right:.875em;border-top-right-radius:var(--border-radius-round);border-bottom-right-radius:var(--border-radius-round)}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li:not([aria-selected=true]) span{color:var(--color-foreground-40)}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlPanels{background-color:var(--color-background-50);-webkit-backdrop-filter:var(--backdrop-filter-bright);backdrop-filter:var(--backdrop-filter-bright);border-radius:var(--border-radius-round);box-shadow:inset 0 0 0 1px var(--color-background-15),0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaRangeInput{height:1.5em;margin-top:0}.PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaRangeInputReset{opacity:0}.PinturaRoot[dir=rtl] .PinturaUtilFooter .PinturaControlListOption [slot],.PinturaRoot[dir=rtl] .PinturaUtilFooter .PinturaControlListOption label{flex-direction:row-reverse}.PinturaRoot[dir=rtl] .PinturaUtilFooter .PinturaControlList .PinturaControlListOption label svg:not(:only-child),.PinturaRoot[dir=rtl] .PinturaUtilFooter .PinturaControlList [role=tab] button svg:not(:only-child){margin-right:-.25em;margin-left:.375em}.PinturaRangeInput{position:relative;display:flex;flex-direction:column;align-items:center;margin:auto;height:3.5em;max-width:24em;width:calc(100% - 2em);touch-action:none;--range-input-feather-left:2em;--range-input-feather-right:2em;--range-input-mask-from:0%;--range-input-mask-to:100%;--range-input-mask-color:rgba(0,0,0,0.25);--range-input-line-color:var(--color-foreground-15);outline:transparent}.PinturaRangeInput[data-focus-visible]:after{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);content:"";position:absolute;left:0;right:0;top:calc(50% - 1em);height:2em;border-radius:.25em}.PinturaRangeInputInner{position:relative;overflow:hidden;height:100%;width:100%;contain:strict;-webkit-mask:linear-gradient(90deg,transparent 0,#000 var(--range-input-feather-left),#000 calc(50% - 3em),transparent 50%,#000 calc(50% + 3em),#000 calc(100% - var(--range-input-feather-right)),transparent);mask:linear-gradient(90deg,transparent 0,#000 var(--range-input-feather-left),#000 calc(50% - 3em),transparent 50%,#000 calc(50% + 3em),#000 calc(100% - var(--range-input-feather-right)),transparent)}.PinturaRangeInputMeter{height:100%}.PinturaRangeInput .PinturaRangeInputMeter svg{display:block;pointer-events:none;fill:currentColor}.PinturaRangeInput>.PinturaRangeInputValue{position:absolute;z-index:1;pointer-events:none;top:calc(50% - .6875em);left:calc(50% - 1.75em);width:3.5em;height:1.5em;overflow:hidden;contain:strict;text-align:center;font-size:.75em;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";font-family:Tahoma,Geneva,Verdana,sans-serif}.PinturaRangeInput>.PinturaRangeInputReset{position:absolute;left:calc(50% - 1.0625em);top:0;margin-top:.125em;padding:0;z-index:1;width:2em;overflow:hidden;color:transparent!important;transition:opacity var(--transition-duration-25);opacity:.35;outline:transparent;cursor:var(--button-cursor)}.PinturaRangeInput>.PinturaRangeInputReset:hover{opacity:.5}.PinturaRangeInput>.PinturaRangeInputReset[data-focus-visible]{opacity:1}.PinturaRangeInput>.PinturaRangeInputReset[data-focus-visible]:before{content:"";pointer-events:none;position:absolute;left:calc(50% - .5em);top:calc(50% - .5em);height:1em;width:1em;z-index:2;border-radius:.25em;background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaRangeInput>.PinturaRangeInputReset[disabled]{opacity:.15}.PinturaRangeInput>.PinturaRangeInputReset:after{content:"";position:absolute;left:50%;top:20%;width:1px;height:60%;background:var(--color-foreground-100)}.PinturaRangeInputInner[data-value-limited] svg{-webkit-mask:linear-gradient(90deg,var(--range-input-mask-color) var(--range-mask-from),#000 var(--range-mask-from),#000 var(--range-mask-to),var(--range-input-mask-color) var(--range-mask-to));mask:linear-gradient(90deg,var(--range-input-mask-color) var(--range-mask-from),#000 var(--range-mask-from),#000 var(--range-mask-to),var(--range-input-mask-color) var(--range-mask-to))}.PinturaRangeInputInner[data-value-limited] svg rect{x:var(--range-mask-from);width:calc(var(--range-mask-to) - var(--range-mask-from));fill:var(--range-input-line-color)}.PinturaRadioGroup .PinturaRadioGroupOptions{display:flex;flex-direction:column}.PinturaRadioGroup .PinturaRadioGroupOptionGroup+.PinturaRadioGroupOptionGroup{margin-top:.5em}.PinturaRadioGroup .PinturaRadioGroupOption[data-hidden=true]{display:none}.PinturaRadioGroup[data-layout=row] .PinturaRadioGroupOptions{flex-direction:row}.PinturaRadioGroup label{-webkit-tap-highlight-color:transparent}.PinturaImageInfo{pointer-events:none}.PinturaImageInfo p{width:8em;height:1.25em;contain:strict;overflow:hidden;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";font-family:Tahoma,Geneva,Verdana,sans-serif;text-align:right;line-height:1;font-size:.75em}.PinturaPresetListFilter .PinturaRadioGroupOptions{justify-content:space-evenly;padding:.625em 0 .3125em}.PinturaPresetListFilter .PinturaRadioGroupOptions label{display:block;cursor:pointer}.PinturaPresetListFilter+.PinturaOptionsList{border-top-left-radius:0;border-top-right-radius:0}.PinturaToolbar{display:flex;justify-content:center;margin-left:1em;margin-right:1em}.PinturaToolbar .PinturaToolbarInner{display:inline-flex}.PinturaToolbar[data-layout=compact] .PinturaToolbarContentWide,.PinturaToolbar[data-overflow=overflow] .PinturaToolbarContentOptional{display:none}.PinturaToolbar .PinturaButton{border-radius:var(--border-radius-round);outline:transparent;padding:.3125em .75em;transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out,box-shadow var(--transition-duration-10) ease-out;line-height:1.1}.PinturaToolbar .PinturaButton:hover{box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaToolbar .PinturaButton[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaToolbar .PinturaButton .PinturaButtonIcon{width:1em}.PinturaToolbar .PinturaButtonLabel{font-size:.75em}.PinturaToolbar .PinturaPanel{z-index:3}.PinturaToolbar .PinturaToolbarInner>*{margin:0 .5em}.PinturaShapeStyleEditor{position:relative;display:grid;grid-template-columns:1fr}.PinturaShapeStyleEditor>div{grid-row-start:1;grid-column-start:1;max-width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center}.PinturaShapeStyleEditorOverflow>div{overflow:visible;justify-content:flex-start}.PinturaShapeStyleEditorOverflow .PinturaShapeStyleList{min-height:auto;margin-left:1em}.PinturaShapeStyleEditorOverflow .PinturaShapeStyle{--control-height:1.75em}.PinturaShapeStyles{position:relative}.PinturaShapeStyles:not([data-state~=overflows]){display:flex;justify-content:center}.PinturaShapeStyleList{display:flex}.PinturaShapeStyleList .PinturaButton,.PinturaShapeStyleList .PinturaInput{outline:transparent}.PinturaShapeStyleList .PinturaInput{padding:0 0 0 .625em;font-size:.75em;line-height:2.25}.PinturaShapeStyleList .PinturaShapeStyleLabel{line-height:1.75;font-size:.625em;font-weight:300;padding:0 .75em;text-transform:lowercase;pointer-events:none;text-align:center;color:var(--color-foreground-50);white-space:nowrap}.PinturaShapeStyleList .PinturaShapeStyle{border-radius:var(--border-radius-round)}.PinturaShapeStyleList .PinturaShapeStyle+.PinturaShapeStyle{margin-left:1em}.PinturaShapeStyle{display:flex;flex-direction:column;align-items:stretch;--control-height:1.5em}.PinturaShapeStyle .PinturaPanelButton{border-radius:inherit}.PinturaShapeStyle>.PinturaButton:hover,.PinturaShapeStyle>.PinturaButton[data-focus-visible]{position:relative;z-index:1}.PinturaShapeStyle .PinturaColorPickerButton .PinturaButtonLabel{display:block;border-radius:inherit}.PinturaShapeStyle .PinturaColorPickerButton{display:flex;justify-content:center}.PinturaShapeStyle .PinturaColorPreview{border-radius:inherit;width:1.5em;height:1.5em;background-color:#fff;background-size:4px}.PinturaShapeStyle .PinturaColorPreview span{border-radius:inherit;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaShapeStyle [data-focus-visible] .PinturaColorPreview span:before{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);content:"";z-index:1}.PinturaShapeStyle>.PinturaColorPickerButtonStroke .PinturaColorPreview{-webkit-mask:radial-gradient(circle,transparent 5.5px,#000 6px);mask:radial-gradient(circle,transparent 5.5px,#000 6px);-webkit-mask-size:cover;mask-size:cover}.PinturaShapeStyle>.PinturaColorPickerButtonStroke .PinturaColorPreview span:after{position:absolute;left:6px;top:6px;right:6px;bottom:6px;border-radius:inherit;box-shadow:0 0 0 1px var(--color-foreground-5);content:""}.PinturaShapeStyle>.PinturaSliderButton .PinturaButtonLabel,.PinturaShapeStyle>.PinturaSliderButton .PinturaButtonLabelPrefix{display:block;line-height:2.25;font-size:.6875em}.PinturaShapeStyle>.PinturaSliderButton .PinturaButtonLabelPrefix{color:var(--color-foreground-40);padding-left:.625em;margin-right:-.25em}.PinturaShapeStyle>.PinturaSliderButton .PinturaButtonLabel{padding:0 1em}.PinturaShapeStyle>.PinturaDropdownButton .PinturaButtonLabel,.PinturaShapeStyle>.PinturaRadioGroup .PinturaButtonLabel,.PinturaShapeStyle>.PinturaRadioGroupOption label{display:block;line-height:2.25;padding:0 1em;font-size:.6875em}.PinturaShapeStyle .PinturaButton:not(.PinturaColorPickerButton)[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaShapeStyle .PinturaInputField{padding:0 .75em;width:3em;height:2em;line-height:2em;box-shadow:inset 0 0 0 1px var(--color-foreground-5);border-radius:var(--border-radius)}.PinturaShapeStyle .PinturaPromptInputGroup{position:relative;display:flex;align-items:flex-start}.PinturaShapeStyle .PinturaPromptInputGroup .PinturaInput{width:18em;padding:0}.PinturaShapeStyle .PinturaPromptInputGroup .PinturaInput input{padding-right:2em}.PinturaShapeStyle .PinturaPromptInputGroup>.PinturaButton:not(.PinturaButtonIconOnly){display:block;line-height:2.125;margin-left:.5em;padding:0 1em;font-size:.6875em;box-shadow:inset 0 0 0 1px var(--color-foreground-5);background-color:var(--color-foreground-10);border-radius:var(--border-radius)}.PinturaShapeStyle .PinturaPromptInputGroup .PinturaButtonIconOnly{display:flex;justify-content:center;align-items:center;width:1.75em;height:1.75em;padding:0;box-shadow:inset 0 0 0 1px var(--color-foreground-5);border-radius:var(--border-radius)}.PinturaShapeStyle .PinturaPromptInputGroup .PinturaButtonIconOnly svg{width:.875em}.PinturaShapeStyle .PinturaPromptInputGroup .PinturaProgressIndicator{position:absolute;width:.875em;height:.875em;pointer-events:none}.PinturaShapeStyle .PinturaPromptInputGroup .PinturaProgressIndicator svg{width:.875em}.PinturaShapeStyle .PinturaPromptInputWrapper{position:relative;display:flex;align-items:center}.PinturaShapeStyle .PinturaPromptInputWrapper .PinturaProgressIndicator{right:.3125em}.PinturaShapeStyle .PinturaGenerateMoreButtonWrapper{position:relative;display:flex;align-items:center;justify-content:center;margin-top:.3125em;margin-left:.75em}.PinturaShapeStyle .PinturaPromptOptions{margin-left:.5em;display:flex;align-items:center}.PinturaShapeStyle .PinturaPromptOption{position:relative;padding:0;margin-left:.5em;border-radius:.5em}.PinturaShapeStyle .PinturaPromptOption:after,.PinturaShapeStyle .PinturaPromptOption img{border-radius:.5em;pointer-events:none}.PinturaShapeStyle .PinturaPromptOption:after{content:"";position:absolute;z-index:1;left:0;top:0;right:0;bottom:0;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaShapeStyle .PinturaPromptOption img{display:block;width:2.5em;height:2.5em;-o-object-fit:cover;object-fit:cover}.PinturaShapeStyle>.PinturaDropdownButton{box-shadow:inset 0 0 0 1px var(--color-foreground-5);transition:background-color var(--transition-duration-10)}.PinturaShapeStyle>.PinturaDropdownButton:hover{background-color:var(--color-foreground-10)}.PinturaShapeStyle>.PinturaDropdownButton .PinturaButtonLabel:after,.PinturaShapeStyle>.PinturaDropdownButton .PinturaComboBox:after{content:"▼";font-size:.6875em;margin-left:.75em;position:relative;top:-.125em;margin-right:-.25em;pointer-events:none}.PinturaShapeStyle>.PinturaDropdownButton .PinturaComboBox:after{top:0;margin-left:.375em;font-size:.47265625em}.PinturaShapeStyle .PinturaComboBox{padding-right:.75em}.PinturaShapeStyle .PinturaComboBox .PinturaInput{padding-left:0}.PinturaShapeStyle .PinturaComboBox .PinturaInput input{box-shadow:none}.PinturaShapeStyle .PinturaComboBox .PinturaInputField{padding-right:.375em}.PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions{flex-direction:row}.PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions label{cursor:var(--button-cursor);display:flex;height:var(--control-height);align-items:center;padding:0 .25em;box-shadow:inset 0 0 0 1px var(--color-foreground-5);transition:background-color var(--transition-duration-10)}.PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions label:hover{background-color:var(--color-foreground-20)}.PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions svg{width:1.125em;height:1.125em}.PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions .PinturaRadioGroupOption:first-of-type label{padding-left:.5em;border-top-left-radius:var(--border-radius-round);border-bottom-left-radius:var(--border-radius-round)}.PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions .PinturaRadioGroupOption:last-of-type label{padding-right:.5em;border-top-right-radius:var(--border-radius-round);border-bottom-right-radius:var(--border-radius-round)}.PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions [data-selected=true] label{background-color:var(--color-foreground-10)}.PinturaRoot[dir=rtl] .PinturaShapeStyle>.PinturaDropdownButton .PinturaButtonLabel:after,.PinturaRoot[dir=rtl] .PinturaShapeStyle>.PinturaDropdownButton .PinturaComboBox:after{margin-right:.75em;margin-left:-.25em}.PinturaRectManipulator{--size:1.25em;position:absolute;left:0;top:0;outline:none;touch-action:none;transform:translate3d(calc(var(--tx) * 1px),calc(var(--ty) * 1px),0) scale(var(--sx),var(--sy))}.PinturaRectManipulator:not([data-shape=edge]){width:var(--size);height:var(--size);z-index:2}.PinturaRectManipulator:not([data-shape=edge]):after{position:absolute;left:-.5em;right:-.5em;top:-.5em;bottom:-.5em;border-radius:inherit;content:""}.PinturaRectManipulator:not([data-shape=edge])[data-focus-visible]:after{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaRectManipulator[data-shape~=circle]{margin-left:calc(var(--size) * (-.5));margin-top:calc(var(--size) * (-.5));line-height:var(--size);border-radius:50%;background-color:var(--color-foreground-100);box-shadow:0 0 2px var(--color-background-50)}.PinturaRectManipulator[data-shape=hook]{border:3px solid var(--color-foreground-100)}.PinturaRectManipulator[data-shape=hook][data-direction*=t]{margin-top:-3px;border-bottom:0}.PinturaRectManipulator[data-shape=hook][data-direction*=r]{border-left:0;margin-left:calc(var(--size) * (-1))}.PinturaRectManipulator[data-shape=hook][data-direction*=b]{margin-top:calc(var(--size) * (-1));border-top:0}.PinturaRectManipulator[data-shape=hook][data-direction*=l]{border-right:0;margin-left:-3px}.PinturaRectManipulator[data-shape~=edge]{height:1px;width:1px;z-index:1}.PinturaRectManipulator[data-shape~=edge][data-focus-visible]{background-color:var(--color-focus-50)}.PinturaRectManipulator[data-direction=b],.PinturaRectManipulator[data-direction=t]{cursor:ns-resize;height:var(--size);margin-top:calc(var(--size) * (-.5));transform-origin:0 center}.PinturaRectManipulator[data-direction=l],.PinturaRectManipulator[data-direction=r]{cursor:ew-resize;width:var(--size);margin-left:calc(var(--size) * (-.5));transform-origin:center 0}.PinturaRectManipulator[data-direction=bl],.PinturaRectManipulator[data-direction=tr]{cursor:nesw-resize}.PinturaRectManipulator[data-direction=br],.PinturaRectManipulator[data-direction=tl]{cursor:nwse-resize}.PinturaRoot[data-env~=pointer-coarse] .PinturaRectManipulator[data-shape=edge]:active{background-color:var(--color-foreground-5)}.PinturaRoot[data-env~=pointer-coarse] .PinturaRectManipulator:not([data-shape=edge]):after{left:-1em;right:-1em;top:-1em;bottom:-1em}.PinturaRoot[data-env~=pointer-coarse] .PinturaRectManipulator:not([data-shape=edge]):active:after{background-color:var(--color-foreground-5)}.PinturaRoot[data-env*=chrome-] .PinturaRectManipulator{transform:translate3d(calc(var(--tx) * 1px),calc(var(--ty) * 1px),0)}.PinturaRoot[data-env*=chrome-] .PinturaRectManipulator[data-direction=b],.PinturaRoot[data-env*=chrome-] .PinturaRectManipulator[data-direction=t]{width:calc(var(--sx) * 1px)}.PinturaRoot[data-env*=chrome-] .PinturaRectManipulator[data-direction=l],.PinturaRoot[data-env*=chrome-] .PinturaRectManipulator[data-direction=r]{height:calc(var(--sy) * 1px)}.PinturaImageButtonList,.PinturaImageButtonList>li{display:flex;align-items:center}.PinturaImageButtonList>li{--thumb-size:1.75em;--thumb-radius:0.3125em;--thumb-margin:0.3125em;justify-content:center;position:relative}.PinturaImageButtonList>li+li{margin-left:.5em}.PinturaRoot .PinturaImageButton{--thumb-size:1.75em;--thumb-radius:0.3125em;--thumb-margin:0.3125em;padding:var(--thumb-margin);border-radius:var(--border-radius);box-shadow:inset 0 0 0 1px var(--color-foreground-5);cursor:var(--button-cursor);outline:transparent}.PinturaRoot .PinturaImageButton>*{pointer-events:none}.PinturaRoot .PinturaImageButton{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:filter var(--transition-duration-25) ease-out}.PinturaRoot .PinturaImageButton[disabled]{filter:var(--filter-disabled)}.PinturaRoot .PinturaImageButton:hover{background-color:var(--color-foreground-10)}.PinturaRoot .PinturaImageButton text{font-family:monospace}.PinturaRoot .PinturaImageButton img,.PinturaRoot .PinturaImageButton svg{display:block;width:var(--thumb-size);height:var(--thumb-size);min-width:auto;max-width:none;-o-object-fit:cover;object-fit:cover;border-radius:var(--thumb-radius)}.PinturaRoot .PinturaImageButton[data-loader]:after,.PinturaRoot .PinturaImageButton[data-loader]:before{display:block;width:var(--thumb-size);height:var(--thumb-size);line-height:var(--thumb-size);border-radius:var(--thumb-radius)}.PinturaRoot .PinturaImageButton[data-error] img{display:none}.PinturaRoot .PinturaImageButton[data-error]:after{content:"⚠";box-shadow:inset 0 0 0 1px var(--color-error-75);background-color:var(--color-error-10);color:var(--color-error-75)}.PinturaRoot .PinturaImageButton[data-loader]{position:relative}.PinturaRoot .PinturaImageButton[data-loader]:before{content:"";position:absolute;left:var(--thumb-margin);top:var(--thumb-margin);-webkit-animation:pintura-img-loading calc(var(--transition-duration-multiplier, 0) * 1s) infinite alternate ease-in-out;animation:pintura-img-loading calc(var(--transition-duration-multiplier, 0) * 1s) infinite alternate ease-in-out;background-color:var(--color-foreground-10);transition:transform calc(var(--transition-duration-multiplier, 0) * .5s) ease-in;z-index:-1}.PinturaRoot .PinturaImageButton[data-loader] img{opacity:0;transition:opacity calc(var(--transition-duration-multiplier, 0) * .35s) ease-out}.PinturaRoot .PinturaImageButton[data-loader][data-load] img{opacity:1}.PinturaRoot .PinturaImageButton[data-loader][data-error]:before,.PinturaRoot .PinturaImageButton[data-loader][data-load]:before{-webkit-animation-play-state:paused;animation-play-state:paused;transform:scale(.5)}@-webkit-keyframes pintura-img-loading{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}@keyframes pintura-img-loading{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.PinturaShorthandControl{flex-direction:row;padding-left:.25em;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.PinturaShorthandControl>.PinturaSliderButton+.PinturaSliderButton{border-left:1px solid var(--color-foreground-5);border-radius:0}.PinturaShorthandControl .PinturaSliderButton .PinturaButtonLabel{padding:0 .5em}.PinturaShorthandControl .PinturaColorPreview{width:1em;height:1em;margin-right:.25em;margin-top:.25em}.PinturaPanel.PinturaSliderPanel{border-radius:var(--border-radius-round)}.PinturaPercentageLabel{font-variant-numeric:tabular-nums;min-width:3em;text-align:center}.PinturaSliderPanel .PinturaSlider{width:10em;--knob-size:0.75em;--knob-margin-left:0.3125em;--knob-margin-right:0.3125em}.PinturaSliderPanel .PinturaSliderTrack{background-color:var(--color-foreground-10)}.PinturaSliderPanel .PinturaSliderKnob{background-color:var(--color-foreground-100);box-shadow:0 .125em .25em rgba(0,0,0,.35),0 -.125em .25em rgba(0,0,0,.1)}.PinturaInput{display:flex;flex-direction:row}.PinturaInput input[disabled]{filter:var(--filter-disabled)}.PinturaInputField{flex:1;outline:transparent}.PinturaInputField[type=number]{-moz-appearance:textfield}.PinturaInputField[type=number]::-webkit-inner-spin-button,.PinturaInputField[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.PinturaInputSpinners{display:flex;flex-direction:column;justify-content:space-evenly;align-items:center}.PinturaInputSpinners button{line-height:1!important;width:2em;font-size:.5em!important;outline:transparent}.PinturaShapePresetsPalette{text-align:center;width:40em;max-width:100%;overflow:hidden}.PinturaShapePresetsPalette .PinturaShapePresetSelect{vertical-align:top;display:inline-block}.PinturaShapePresetsPalette .PinturaScrollable:not([data-state~=overflows]){display:flex;justify-content:center}.PinturaShapePresetsPalette .PinturaButton+.PinturaButton{margin-left:.5em}.PinturaShapePresetsPalette .PinturaButton{flex-direction:row;line-height:1.1;padding:.3125em .75em;border-radius:var(--border-radius-round);box-shadow:inset 0 0 0 1px var(--color-foreground-5);cursor:var(--button-cursor);transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out,box-shadow var(--transition-duration-10) ease-out;outline:none}.PinturaShapePresetsPalette .PinturaButton .PinturaButtonIcon{width:1em}.PinturaShapePresetsPalette .PinturaButton .PinturaButtonLabel{font-size:.75em}.PinturaShapePresetsPalette .PinturaButton:hover{box-shadow:inset 0 0 0 1px var(--color-foreground-10)}.PinturaShapePresetsPalette .PinturaButton[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaShapePresetsPalette .PinturaShapePresetsFlat>*+*,.PinturaShapePresetsPalette .PinturaShapePresetsGroups>*+*,.PinturaShapePresetsPalette .PinturaShapePresetsGroups>div>*+*{margin-left:.5em}.PinturaShapePresetsGroups{display:flex}.PinturaShapePresetsGrouped{display:flex;flex-direction:column;align-items:center}.PinturaShapePresetsGrouped [role=tab]{white-space:nowrap}.PinturaShapePresetsFlat{display:flex;align-items:center;justify-content:center}.PinturaShapePresetsFlat>.PinturaButton{margin-left:1em}.PinturaShapeList{pointer-events:none;opacity:0;transition:opacity var(--transition-duration-10) ease-in-out;position:absolute;top:1em;left:1em;width:-webkit-max-content;width:-moz-max-content;width:max-content;z-index:1;border-radius:var(--border-radius);color:var(--color-foreground-100);background:var(--color-background-70);box-shadow:0 0 0 1px var(--color-foreground-5)}.PinturaShapeList li+li{margin-top:-.3125em}.PinturaShapeList[data-visible=true]{opacity:1}.PinturaShapeList .PinturaColorPreview{width:.75em;height:.75em;margin-right:.25em;border-radius:.25em}.PinturaShapeList .PinturaShapeListItem{display:flex;align-items:center;padding:.25em .5em;outline:none}.PinturaShapeList .PinturaShapeListItem>span{font-size:.75em;line-height:1.75;padding:0 .325em;margin-left:-.325em}.PinturaShapeList .PinturaShapeListItem[data-focus-visible]>span{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaShapeList[data-visible=true] .PinturaShapeListItem{pointer-events:all}.PinturaShapeEditor{height:100%;width:100%;outline:none;touch-action:none}.PinturaShapeControls{position:absolute!important;left:0;top:0;z-index:3;pointer-events:none;display:flex;align-items:center}.PinturaShapeControlsGroup{pointer-events:all;color:#eee;background:#222;box-shadow:0 .125em .25em rgba(0,0,0,.25);border-radius:.25em}.PinturaShapeControlsGroup,.PinturaShapeControlsGroup .PinturaShapeControlsGroupToggle{display:inline-flex;min-height:1.75em}.PinturaShapeControlsGroup+.PinturaShapeControlsGroup{margin-left:.5em}.PinturaShapeControlsGroup .PinturaShapeControlsGroupToggle{position:relative}.PinturaShapeControlsGroup .PinturaButton{outline:transparent}.PinturaShapeControlsGroup .PinturaButton[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaShapeControlsGroup .PinturaButton[disabled]>span{opacity:.5;pointer-events:all;cursor:not-allowed}.PinturaShapeControlsGroup>.PinturaButton{display:block;font-weight:700;transition:background-color var(--transition-duration-10);outline:transparent}.PinturaShapeControlsGroup>.PinturaButton:hover{background-color:hsla(0,0%,100%,.15)}.PinturaShapeControlsGroup>.PinturaButton .PinturaButtonLabel{display:block;font-size:.6875em;padding:0 .75em;line-height:1.7em}.PinturaShapeControlsGroup .PinturaButtonIconOnly{width:1.75em;transition:background-color var(--transition-duration-10)}.PinturaShapeControlsGroup .PinturaButtonIconOnly:hover{background-color:hsla(0,0%,100%,.15)}.PinturaShapeControlsGroup>button:first-of-type{border-radius:.25em 0 0 .25em}.PinturaShapeControlsGroup>button:last-of-type{border-radius:0 .25em .25em 0}.PinturaShapeControlsGroup>button:only-of-type{border-radius:.25em}.PinturaShapeControlsGroup>*+*{border-left:1px solid rgba(0,0,0,.5)}.PinturaShapeControlsGroup svg{pointer-events:none}.PinturaInlineInput{position:absolute;left:0;top:0;margin:0;padding:0;transform-origin:center;display:flex}.PinturaInlineInput:before{content:"";width:0;height:var(--line-height)}.PinturaContentEditable{margin:0;padding:0;width:calc(100% / var(--font-scalar));height:calc((100% / var(--font-scalar)) - var(--bottom-inset, 0));overflow:hidden;outline:none;vertical-align:top}.PinturaOptionsList,.PinturaOptionsListWrapper{border-radius:inherit}.PinturaOptionsList .PinturaListOption{transition:background-color var(--transition-duration-10);border-radius:inherit}.PinturaOptionsList .PinturaListOption label{display:block;margin:0;border-radius:inherit;white-space:nowrap}.PinturaOptionsList .PinturaListOption svg{margin-right:.25em;margin-left:-.5em;min-width:1.5em}.PinturaOptionsList .PinturaListOption svg:only-child{margin-left:0;margin-right:0}.PinturaOptionsList .PinturaListOption [slot]{display:flex;align-items:center;padding:.325em .75em}.PinturaOptionsList .PinturaDropdownOptionLabel{font-size:.75em;line-height:1.75;padding:0 .325em;margin-left:-.325em;display:inline-flex;flex-direction:column}.PinturaOptionsList .PinturaDropdownOptionSublabel{font-size:.75em;opacity:.5;margin-top:-.5em}.PinturaOptionsList .PinturaListOptionGroup>span{display:block;padding:.75em 1em;text-transform:uppercase;font-size:.75em;color:var(--color-foreground-50)}.PinturaOptionsList [data-disabled=true]{color:var(--color-foreground-50)}.PinturaOptionsList [data-selected=false]:not([data-disabled=true]):hover{background-color:var(--color-foreground-10)}.PinturaOptionsList [data-selected=true]{color:var(--color-foreground-100);background-color:var(--color-foreground-20)}.PinturaOptionsList [data-focus-visible]+label .PinturaDropdownOptionLabel{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);border-radius:.25em}.PinturaListOption label{margin:0}.PinturaRoot[dir=rtl] .PinturaDropdownOptionLabel{margin-right:-.325em;align-items:flex-end}.PinturaRoot[dir=rtl] .PinturaListOption svg{margin-left:-.5em;margin-right:auto}.PinturaRoot[dir=rtl] .PinturaListOption svg+span{margin-left:.25em}.PinturaRoot[dir=rtl] .PinturaListOption [slot]{justify-content:flex-end}.PinturaColorPickerPanel{padding:.5em;max-width:14em;overflow:visible;touch-action:none}.PinturaColorPickerPanel .PinturaColorPickerButton{outline:transparent}.PinturaColorPickerPanel .PinturaColorPickerButton[data-focus-visible]{box-shadow:inset 0 0 0 1px var(--color-foreground-70)}.PinturaColorPickerPanel .PinturaColorPreview{width:1.25em;height:1.25em;border-radius:.25em}.PinturaColorPickerPanel .PinturaColorPreview span{border-radius:.2em;box-shadow:inset 0 0 0 1px var(--color-foreground-20)}.PinturaColorPickerPanel .PinturaColorPresets legend{color:var(--color-foreground-50);margin:0 0 .25em .3125em;font-size:.75em}.PinturaColorPickerPanel .PinturaColorPresets:only-child legend{display:none}.PinturaColorPickerPanel .PinturaColorPresetsGrid .PinturaRadioGroupOptions{display:flex;flex-direction:row;flex-wrap:wrap}.PinturaColorPickerPanel .PinturaColorPresetsGrid .PinturaListOption{display:block;padding:.25em}.PinturaColorPickerPanel .PinturaColorPresetsGrid .PinturaListOption label,.PinturaColorPickerPanel .PinturaColorPresetsGrid .PinturaListOption label span{display:block;cursor:var(--button-cursor)}.PinturaColorPickerPanel .PinturaColorPresetsGrid input[data-focus-visible]+label .PinturaColorPreview:after{position:absolute;left:-.3125em;right:-.3125em;top:-.3125em;bottom:-.3125em;border-radius:inherit;pointer-events:none;content:"";background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaColorPickerPanel .PinturaSlider{margin-left:-.325em;margin-right:-.325em}.PinturaColorPickerPanel .PinturaSlider>.PinturaSliderControl{position:relative;z-index:2}.PinturaColorPickerPanel .PinturaPicker{width:100%}.PinturaColorPickerPanel .PinturaPicker+.PinturaColorPresets{margin-top:.5em}.PinturaColorPickerPanel .PinturaPicker .PinturaPickerKnob,.PinturaColorPickerPanel .PinturaPicker .PinturaSliderKnob{border-radius:9999em;box-shadow:inset 0 .06125em .06125em rgba(0,0,0,.1),0 0 0 .06125em #fff,0 .1875em .25em rgba(0,0,0,.35),0 -.125em .25em rgba(0,0,0,.1)}.PinturaColorPickerPanel .PinturaPicker .PinturaPickerKnob{pointer-events:none;position:absolute;z-index:1;left:0;top:0;margin-left:-.625em;margin-top:-.625em;width:1.25em;height:1.25em;visibility:visible;outline:none}.PinturaColorPickerPanel .PinturaPicker .PinturaPickerKnob[data-focus-visible]:after{position:absolute;left:-.3125em;right:-.3125em;top:-.3125em;bottom:-.3125em;border-radius:inherit;pointer-events:none;content:"";background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaColorPickerPanel .PinturaPicker .PinturaPickerKnobController{position:absolute;left:0;top:0;right:0;bottom:0;visibility:hidden}.PinturaColorPickerPanel .PinturaPicker .PinturaSaturationPicker{position:relative;border-radius:var(--border-radius) var(--border-radius) 0 0;margin:-.5em -.5em .5em;height:7em;background-image:linear-gradient(180deg,transparent,#000),linear-gradient(90deg,#fff,transparent)}.PinturaColorPickerPanel .PinturaPicker .PinturaHuePicker .PinturaSliderTrack{background-image:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.PinturaColorPickerPanel .PinturaPicker .PinturaSliderTrack{box-shadow:inset 0 0 1px var(--color-foreground-50)}.PinturaColorPickerPanel .PinturaPicker .PinturaOpacityPicker .PinturaSliderKnob:before,.PinturaColorPickerPanel .PinturaPicker .PinturaOpacityPicker .PinturaSliderTrack:before{position:absolute;content:"";display:block;left:0;top:0;width:100%;height:100%;z-index:-1;border-radius:inherit;background-color:#fff;background-image:var(--pattern-transparent)}.PinturaColorPickerPanel .PinturaPicker .PinturaOpacityPicker .PinturaSliderKnob:before{background-position:calc(var(--slider-position) * -2px) 0}.PinturaColorPickerPanel .PinturaPicker .PinturaOpacityPicker{margin-top:.5em}.PinturaColorPickerPanel .PinturaPicker .PinturaColorPickerInput{color:var(--color-foreground-80);margin:.75em 0 .25em .3125em;width:calc(100% - .625em);line-height:1.75;text-indent:.5em;font-size:.875em;border-radius:.25em;border:1px solid var(--color-foreground-20);font-variant:tabular-nums;text-transform:uppercase}.PinturaColorPickerPanel .PinturaPicker .PinturaColorPickerInput:focus{outline:transparent;border-color:var(--color-focus-100)}.PinturaPanel{--color-inset:hsla(0,0%,100%,0.1);--color-fill:var(--color-foreground-5);top:0;left:0;z-index:2147483647;width:-webkit-max-content;width:-moz-max-content;width:max-content;cursor:auto;outline:transparent;box-shadow:inset 0 0 0 1px var(--color-inset),0 .125em .25em rgba(0,0,0,.25),0 .125em .75em rgba(0,0,0,.15),0 .125em .125em rgba(0,0,0,.1);border-radius:var(--border-radius)}.PinturaPanel,.PinturaPanelTip{position:absolute;color:var(--color-foreground-90);background-color:var(--color-background-100);background-image:linear-gradient(var(--color-fill),var(--color-fill));background-blend-mode:screen}.PinturaPanelTip{--tip-mask:transparent calc(50% - 1.5px),#000 calc(50% - 1.5px);width:.5em;height:.5em;margin-left:-.25em;margin-top:-.25em;z-index:-1;box-shadow:inset -1px -1px 0 0 var(--color-inset);-webkit-mask:linear-gradient(to bottom right,var(--tip-mask));mask:linear-gradient(to bottom right,var(--tip-mask))}.PinturaPanelTip[style*="top:0"]{box-shadow:inset 1px 1px 0 0 var(--color-inset);-webkit-mask:linear-gradient(to top left,var(--tip-mask));mask:linear-gradient(to top left,var(--tip-mask))}.PinturaColorPreview{--color:transparent;color:var(--color);position:relative;pointer-events:none;background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h4v4H0zm4 4h4v4H4z' fill='%23E5E5E5'/%3E%3C/svg%3E")}.PinturaColorPreview span{position:absolute;left:0;top:0;right:0;bottom:0;background-color:var(--color);border-radius:inherit}.PinturaContentEditable{white-space:pre-line!important;word-break:break-word!important;display:inline-block!important;-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.PinturaContentEditable[data-wrap-content=nowrap]{white-space:nowrap!important;word-break:normal!important}.PinturaContentEditable{background:transparent!important;margin:0!important;border-radius:0!important;max-width:none!important;min-width:auto!important;box-shadow:none!important}.PinturaSlider{position:relative;--track-offset-x:0.5em;--track-offset-y:0.5em;--track-size:1.5em;--knob-size:1em;--knob-margin-top:0em;--knob-margin-right:0em;--knob-margin-bottom:0em;--knob-margin-left:0em;display:flex;align-items:center;touch-action:none}.PinturaSlider[data-direction=y]{flex-direction:column}.PinturaSlider .PinturaSliderControl{position:relative;flex:1}.PinturaSlider>button{position:relative;z-index:1;width:var(--track-size);height:var(--track-size);overflow:hidden;cursor:pointer;flex-shrink:none}.PinturaSlider>button svg{width:1.25em;height:1.25em;margin:.125em;stroke-width:.125em;stroke:var(--color-foreground-50)}.PinturaSlider>button:first-of-type{order:2;padding-right:.125em;margin-left:-.325em}.PinturaSlider>button:last-of-type{order:1;padding-left:.125em;margin-right:-.325em}.PinturaSlider>.PinturaSliderControl{order:2}.PinturaSlider .PinturaSliderKnob{left:0;top:50%;border-radius:9999em;visibility:visible;width:var(--knob-size);height:var(--knob-size);margin-left:calc(var(--knob-size) * -.5);margin-top:calc(var(--knob-size) * -.5)}.PinturaSlider .PinturaSliderKnob,.PinturaSlider .PinturaSliderKnobController,.PinturaSlider .PinturaSliderTrack{pointer-events:none;position:absolute}.PinturaSlider .PinturaSliderTrack{top:var(--track-offset-y);bottom:var(--track-offset-y);left:var(--track-offset-x);right:var(--track-offset-x)}.PinturaSlider .PinturaSliderKnobController{visibility:hidden;top:calc(var(--track-offset-y) + var(--knob-margin-top));bottom:calc(var(--track-offset-y) + var(--knob-margin-bottom));left:calc(var(--track-offset-x) + var(--knob-margin-left));right:calc(var(--track-offset-x) + var(--knob-margin-right))}.PinturaSlider .PinturaSliderTrack{border-radius:9999em}.PinturaSlider[data-direction=x] input[type=range]{height:var(--track-size);margin-left:var(--track-offset-x);width:calc(100% - (var(--track-offset-x) * 2))}.PinturaSlider[data-direction=y] input[type=range]{width:var(--track-size);margin-top:var(--track-offset-y);height:calc(100% - (var(--track-offset-y) * 2))}.PinturaSlider input[type=range]{-webkit-appearance:none;display:block}.PinturaSlider input[type=range]::-webkit-slider-runnable-track{background:transparent}.PinturaSlider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;line-height:0;margin:0;padding:0;border:none}.PinturaSlider input[type=range]::-moz-range-thumb{line-height:0;margin:0;padding:0;border:none;visibility:hidden}.PinturaSlider input[type=range]::-ms-thumb{line-height:0;margin:0;padding:0;border:none}.PinturaSlider input[type=range]::-ms-ticks-before,.PinturaSlider input[type=range]::-ms-tooltip{display:none}.PinturaSlider input[type=range]::-ms-ticks-after{display:none}.PinturaSlider input[type=range]::-ms-track{color:transparent;border:none;background:transparent}.PinturaSlider input[type=range]::-ms-fill-lower,.PinturaSlider input[type=range]::-ms-fill-upper{background:transparent}.PinturaSlider input[type=range]:focus{outline:transparent}.PinturaSlider input[type=range][data-focus-visible]~.PinturaSliderKnobController .PinturaSliderKnob:after{position:absolute;left:-.3125em;right:-.3125em;top:-.3125em;bottom:-.3125em;border-radius:inherit;content:"";background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);pointer-events:none}.PinturaShapeManipulator{position:absolute;left:0;top:0;outline:none;touch-action:none;transform:translate3d(calc(var(--tx) * 1px),calc(var(--ty) * 1px),0) rotate(var(--r)) scale(var(--sx),var(--sy));--size:0.75em}.PinturaShapeManipulator:not([data-control=edge]){margin-left:calc(var(--size) * (-.5));margin-top:calc(var(--size) * (-.5));line-height:var(--size);width:var(--size);height:var(--size);border-radius:9999em}.PinturaShapeManipulator:not([data-control=edge]):after{position:absolute;left:-.5em;right:-.5em;top:-.5em;bottom:-.5em;content:""}.PinturaShapeManipulator:not([data-control=edge])[data-focus-visible]:after{border-radius:inherit;background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.PinturaShapeManipulator[data-control=point]{background:linear-gradient(90deg,var(--color-secondary-dark),var(--color-secondary));box-shadow:0 0 0 2px #fff,0 0 4px #000;z-index:3}.PinturaShapeManipulator[data-control=edge]{margin-top:calc(var(--size) * (-.5));height:var(--size);width:1px;z-index:1;transform-origin:0 calc(var(--size) * .5)}.PinturaShapeManipulator[data-control=edge][data-focus-visible]{background-color:var(--color-focus-50)}.PinturaShapeManipulator[data-control=rotate]{border-radius:9999em;background:linear-gradient(90deg,#fff,#ddd);box-shadow:0 0 0 2px var(--color-secondary-dark),0 0 4px #000;z-index:2;cursor:-webkit-grab;cursor:grab}.PinturaRoot[data-env*=chrome-] .PinturaShapeManipulator[data-control=edge]{width:calc(var(--sx) * 1px);transform:translate3d(calc(var(--tx) * 1px),calc(var(--ty) * 1px),0) rotate(var(--r))} \ No newline at end of file diff --git a/src/components/@pqina/pintura/pintura.d.ts b/src/components/@pqina/pintura/pintura.d.ts new file mode 100644 index 0000000..d494093 --- /dev/null +++ b/src/components/@pqina/pintura/pintura.d.ts @@ -0,0 +1,1670 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +export type ProgressCallback = (event: ProgressEvent) => void; + +export type Percentage = string; + +export interface PinturaMetadata { + [key: string]: any; +} + +// prettier-ignore +/** + * A matrix of 20 digits based on the SVG filter + * + * @example + * ``` + * R G B A W + * R | 1 0 0 0 0 + * G | 0 1 0 0 0 + * B | 0 0 1 0 0 + * A | 0 0 0 1 0 + * ``` + * @link Utility to generate a color matrix: https://fecolormatrix.com + * @link More information on color matrices: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feColorMatrix + */ +export type ColorMatrix = [ + number, number, number, number, number, + number, number, number, number, number, + number, number, number, number, number, + number, number, number, number, number +]; + +// prettier-ignore +/** + * A matrix of 9 digits based on the SVG filter + * + * @example + * ``` + * 1 0 0 + * 0 1 0 + * 0 0 1 + * ``` + * @link More information on convolution matrices: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feConvolveMatrix + */ +export type ConvolutionMatrix = [ + number, number, number, + number, number, number, + number, number, number +]; + +export type Color = number[]; + +export type TextAlign = 'left' | 'center' | 'right'; + +export type TextLayout = 'auto-width' | 'auto-height' | 'fixed-size'; + +export type SizeCategory = + | 'extraSmall' + | 'small' + | 'mediumSmall' + | 'medium' + | 'mediumLarge' + | 'large' + | 'extraLarge'; + +export type LineEndStyle = + | 'bar' + | 'arrow' + | 'arrowSolid' + | 'circle' + | 'circleSolid' + | 'square' + | 'squareSolid'; + +export interface ColorPalette { + transparent?: Color; + white?: Color; + silver?: Color; + gray?: Color; + black?: Color; + navy?: Color; + blue?: Color; + aqua?: Color; + teal?: Color; + olive?: Color; + green?: Color; + yellow?: Color; + orange?: Color; + red?: Color; + maroon?: Color; + fuchsia?: Color; + purple?: Color; +} + +export type SizeCategories = Record; + +export interface LocaleCollection { + [shapeProperty: string]: string; +} + +export type LocaleString = string | ((locale: LocaleCollection) => string); + +export interface Vector { + x: number; + y: number; +} + +export interface Size { + width: number; + height: number; +} + +export interface Rect { + x: number; + y: number; + width: number; + height: number; +} + +export interface ShapeToolOptions { + position?: string; + inputMode?: string; + isSelection?: boolean; +} + +export interface ShapeRectangle { + x?: number | Percentage; + y?: number | Percentage; + width?: number | Percentage; + height?: number | Percentage; +} + +export interface Shape { + x?: number | Percentage; + y?: number | Percentage; + width?: number | Percentage; + height?: number | Percentage; + left?: number | Percentage; + top?: number | Percentage; + right?: number | Percentage; + bottom?: number | Percentage; + rx?: number | Percentage; + ry?: number | Percentage; + x1?: number | Percentage; + y1?: number | Percentage; + x2?: number | Percentage; + y2?: number | Percentage; + strokeColor?: Color; + strokeWidth?: number | Percentage; + cornerRadius?: number | Percentage; + fontSize?: number | Percentage; + fontFamily?: string; + lineHeight?: number | Percentage; + textAlign?: undefined | 'left' | 'center' | 'right'; + letterSpacing?: number | Percentage; + text?: string; + textShadow?: [number | Percentage, number | Percentage, number | Percentage, Color]; + textShadowX?: number | Percentage; + textShadowY?: number | Percentage; + textShadowBlur?: number | Percentage; + textShadowColor?: Color; + textOutline?: [number | Percentage, Color]; + textOutlineWidth?: number | Percentage; + textOutlineColor?: Color; + format?: 'text' | 'html'; + aspectRatio?: number; + rotation?: number; + points?: Vector[]; + bitmap?: boolean; + strokeCap?: 'miter' | 'bevel' | 'round' /** only works when `bitmap` is set to `true` */; + strokeJoin?: 'miter' | 'bevel' | 'round' /** only works when `bitmap` is set to `true` */; + strokeDash?: (number | Percentage)[]; + cursorStyle?: undefined | 'ellipse'; + cursorSize?: + | number + | string /** a fixed size, or reference to other shape property, for example `'strokeWidth'` */; + color?: Color; + backgroundColor?: Color; + backgroundImage?: string | HTMLCanvasElement | File | Blob | HTMLImageElement; + backgroundSize?: string | Size | undefined; + backgroundRepeat?: 'repeat' | 'no-repeat' | undefined; + backgroundPosition?: Vector | undefined; + selectionStyle?: 'auto' | 'hook' /** hook only renders selection corners */; + feather?: number | Percentage /** only works with rectangles, feathers edges of shape */; + eraseRadius?: number; + alwaysOnTop?: boolean; + lineStart?: + | undefined + | 'bar' + | 'arrow' + | 'arrow-solid' + | 'square' + | 'square-solid' + | 'circle' + | 'circle-solid'; + lineEnd?: + | undefined + | 'bar' + | 'arrow' + | 'arrow-solid' + | 'square' + | 'square-solid' + | 'circle' + | 'circle-solid'; + status?: 'loading' | 'error'; + isSelected?: boolean; + isEditing?: boolean; + disableStyle?: boolean | string[]; + disableErase?: boolean; + disableSelect?: boolean; + disableRemove?: boolean; + disableDuplicate?: boolean; + disableReorder?: boolean; + disableFlip?: boolean; + disableInput?: boolean | ((text: string) => string); + disableManipulate?: boolean; + disableMove?: boolean; + disableResize?: boolean; + disableRotate?: boolean; + disableTextLayout?: boolean | TextLayout[]; + disableNewline?: boolean; + + // private + readonly _context?: Rect | Size; + readonly _isDraft?: boolean; + readonly _isComplete?: boolean; + readonly _isError?: boolean; + readonly _isFormatted?: boolean; +} + +export type SvelteComponent = any; +export type SvelteComponentProps = any; + +export type ShapeControl = [ + // Component to use + SvelteComponent, + + // Component properties to map + { + title?: LocaleString; + label?: LocaleString; + options?: SvelteComponentProps; + optionIconStyle?: LocaleString; + optionLabelStyle?: LocaleString; + } +]; + +export type ShapeColorOption = [Color, string] | [Color, string, any]; +export type ShapeSizeOption = [number | Percentage, string] | [number | Percentage, string, any]; + +export type ShapeLineEndOption = [LineEndStyle, string] | [LineEndStyle, string, any]; +export type ShapeFontFamilyOption = [string, string] | [string, string, any]; +export type ShapeFontStyleOption = [string, string] | [string, string, any]; + +export interface ShapeControlOptions { + // shortcuts to set style options + colorOptions?: false | ShapeColorOption[]; + lineEndStyleOptions?: false | ShapeLineEndOption[]; + fontFamilyOptions?: false | ShapeFontFamilyOption[]; + fontStyleOptions?: false | ShapeFontStyleOption[]; + textAlignOptions?: false | [TextAlign, string][]; + strokeWidthOptions?: false | ShapeSizeOption[] | number[]; + fontSizeOptions?: false | ShapeSizeOption[] | number[]; + lineHeightOptions?: false | ShapeSizeOption[] | number[]; + // shortcut to set style controls + [styleProperty: string]: ShapeControl | any; +} + +export interface ShapeControlConfiguration { + // A mapping of a shapeProperty to a Component + [shapeProperty: string]: ShapeControl; +} + +export type StickerSource = string; // emoji or URL + +export interface StickerTemplate { + thumb?: StickerSource; + src?: StickerSource; + width?: number; + height?: number; + alt?: string; + disabled?: boolean; + shape?: Shape; + mount?: ( + element: HTMLElement, + sticker: StickerTemplate + ) => { update?: (sticker: StickerTemplate) => void; destroy?: () => void }; +} + +export type Sticker = StickerSource | StickerTemplate; + +export interface StickerGroupOptions { + icon?: string; + hideLabel?: boolean; + disabled?: boolean; +} + +export type StickerGroup = [string, Sticker[]] | [string, Sticker[], StickerGroupOptions]; + +export type ImageSource = File | Blob | string | HTMLImageElement | HTMLCanvasElement; + +export interface Store { + subscribe: (value: (value: any) => void) => () => void; + set?: (value: any) => void; + update?: (fn: (value: any) => any) => void; +} + +export interface StoreCollection { + [shapeProperty: string]: Store; +} + +export type Filter = () => ColorMatrix; + +export interface Frame { + shape: any; + thumb: string; // HTML or SVG +} + +export interface Effect { + base: number; + min: number; + max: number; + getLabel?: (value: number) => number; + getStore: (stores: StoreCollection) => Store; + getValue: (store: Store) => number; + setValue: (store: Store, value: number) => void; +} + +export interface PinturaEditorHistoryAPI { + undo: () => number; + redo: () => number; + revert: () => void; + write: (imageState?: PinturaImageState) => void; + get: () => PinturaImageState[]; + getCollapsed: () => PinturaImageState[]; + set: (imageStates: PinturaImageState[]) => void; + readonly length: number; + readonly index: number; +} + +export interface PinturaEditorMethods { + on: (event: string, cb: (detail?: any) => void) => void; + loadImage: ( + src: ImageSource, + options?: PinturaEditorOptions + ) => Promise; + editImage: ( + src: ImageSource, + options?: PinturaEditorOptions + ) => Promise; + processImage: ( + src?: ImageSource, + options?: PinturaEditorOptions + ) => Promise; + abortLoadImage: () => void; + abortProcessImage: () => void; + updateImage: (src: ImageSource) => Promise; + updateImagePreview: (src: ImageSource) => void; + removeImage: () => void; + close: () => void; + destroy: () => void; + + showTextInput: ( + confirm: (value: string) => void, + cancel: () => void, + options: { + text?: string; + placeholder?: string; + autoClose?: boolean; + align?: 'top' | 'bottom' | 'center'; + justify?: 'left' | 'right' | 'center'; + buttonConfirm?: { + label: string; + hideLabel?: boolean; + icon?: string; + }; + buttonCancel?: { + label: string; + hideLabel?: boolean; + icon?: string; + }; + } + ) => void; + hideTextInput: () => void; + + readonly history: PinturaEditorHistoryAPI; + + /** (video only) starts playing a video */ + play: () => void; + + /** (video only) pauses a playing video */ + pause: () => void; + + /** (video only) toggle between play and pause mode */ + togglePlayPause: () => void; + + /** (video only) returns `true' if the video is paused */ + isPaused: () => void; + + /** (video only) mutes audio */ + mute: () => void; + + /** (video only) restores audio */ + unmute: () => void; + + /** (video only) toggles mute state */ + toggleMute: () => void; + + /** (video only) returns the video duration in seconds */ + getDuration: () => number; + + /** (video only) returns the current position in seconds */ + getCurrentTime: () => number; + + /** (video only) sets the current position in seconds */ + setCurrentTime: (seconds: number) => void; +} + +export type CropOption = [number | undefined, string]; + +export type SizeOption = [[number, number], string]; + +export type CropPresetOption = CropOption | SizeOption; + +export type OptionGroup = [string, any[]] | [string, any[], any]; + +export interface TrimPluginOptions { + trimEnableSplit?: boolean; + trimEnableFramePreview?: boolean; + trimEnableMediaClipper?: boolean; + trimEnablePlayPauseButton?: boolean; + trimEnableMuteButton?: boolean; +} + +export interface CropPluginOptions { + cropAutoCenterImageSelectionTimeout?: undefined | number; + cropWillRenderImageSelectionGuides?: + | undefined + | (( + interaction: string, + interactionFraction: number + ) => { rows: number; cols: number; opacity: number }); + cropEnableButtonFlipHorizontal?: boolean; + cropEnableButtonFlipVertical?: boolean; + cropEnableButtonRotateLeft?: boolean; + cropEnableButtonRotateRight?: boolean; + cropEnableButtonToggleCropLimit?: boolean; + cropEnableCenterImageSelection?: boolean; + cropEnableImageSelection?: boolean; + cropEnableInfoIndicator?: boolean; + cropEnableLimitWheelInputToCropSelection?: boolean; + + /** + * Range in radians, defaults to Math.PI / 4 + */ + cropEnableRotationInput?: boolean; + cropRotationRange?: number; + cropActiveTransformTool?: 'zoom' | 'rotation'; + cropEnableSelectPreset?: boolean; + cropEnableZoomInput?: boolean; + cropEnableZoomMatchImageAspectRatio?: boolean; + cropEnableZoomTowardsWheelPosition?: boolean; + cropEnableZoomAutoHide?: boolean; + cropImageSelectionCornerStyle?: undefined | 'hook' | 'round' | 'invisible'; + cropSelectPresetOptions?: OptionGroup[] | CropPresetOption[]; + cropSelectPresetFilter?: 'landscape' | 'portrait' | false; + cropEnableRotateMatchImageAspectRatio?: 'never' | 'custom' | 'always'; + cropWillRenderTools?: (nodes: PinturaNode[], env: any, redraw: () => void) => PinturaNode[]; + cropInteractionFocus?: 'image' | 'selection'; + cropMinimizeToolbar?: 'never' | 'auto' | 'always'; +} + +export interface ShapeToolButtonOptions { + icon?: string; +} + +export type ShapeTool = [string, LocaleString] | [string, LocaleString, ShapeToolButtonOptions]; + +export interface PinturaMarkupEditorProperties { + markupEditorToolbar?: [string, LocaleString, any][]; + markupEditorToolStyles?: MarkupEditorToolStyleDefaults; + markupEditorToolRetainStyles?: boolean; + markupEditorShapeStyleControls?: + | MarkupEditorShapeStyleControlDefaults + | MarkupEditorShapeStyleControlOptions; + markupEditorToolSelectRadius?: number; + + /** + * Set to `'modal'` to show a text input popup, set to `'inline'` to enable inline text editing. + */ + markupEditorTextInputMode?: 'modal' | 'inline'; + + /** + * Enable to automatically add a shape when a tool is selected + */ + enableSelectToolToAddShape?: boolean; + + /** + * Enable to tap canvas to add text box instead of dragging + */ + enableTapToAddText?: boolean; + + /** + * Enable to show the move/arrow, used to select and manipulate shapes + */ + enableMoveTool?: boolean; + + /** + * Enable to show the hand/view tool, used to pan the canvas + */ + enableViewTool?: boolean; + + /** + * Wether to automatically select move tool when enabled, set to `true` to select for all tools, set to `false` to don't select, set to array of tool names to enable for specific tools only. + */ + enableAutoSelectMoveTool?: boolean | string[]; + + /** + * @deprecated Use `enablePanInput` instead + */ + markupEditorInteractionMode?: 'auto' | 'pan'; + + /** + * @deprecated Use `zoomLevel` instead + */ + markupEditorZoomLevel?: number | undefined | null; + + /** + * @deprecated Use `zoomPresetOptions` instead + */ + markupEditorZoomLevels?: number[]; + + /** + * @deprecated Use `zoomAdjustStep` instead + */ + markupEditorZoomAdjustStep?: number; + + /** + * @deprecated Use `zoomAdjustFactor` instead + */ + markupEditorZoomAdjustFactor?: number; + + /** + * @deprecated Use `zoomAdjustWheelFactor` instead + */ + markupEditorZoomAdjustWheelFactor?: number; + + markupEditorWillStartInteraction?: (point: Vector, image: Rect) => boolean; + + /** Distance from snap edge to start snapping, defaults to `0` */ + markupEditorSnapThreshold?: number; + + /** Should we snap to parent context edges and center, defaults to `true`, only active if snap threshold is above `0` */ + markupEditorSnapToContext?: boolean; + + /** Grid cell size, defaults to `0` */ + markupEditorGridSize?: number; +} + +export interface AnnotatePluginOptions extends PinturaMarkupEditorProperties { + annotateTools?: [string, LocaleString, any][] | [string, [string, LocaleString, any][]][]; + annotateToolShapes?: MarkupEditorToolStyleDefaults; + annotateShapeControls?: MarkupEditorShapeStyleControlDefaults; + annotateActiveTool?: string; + annotateEnableButtonFlipVertical?: boolean; + annotatePresets?: Sticker[] | StickerGroup[]; + annotateEnableDropImagePreset?: boolean; + annotateEnableSelectImagePreset?: boolean; + annotateGridSize?: number; + annotateSnapToContext?: boolean; +} + +export interface DecoratePluginOptions extends PinturaMarkupEditorProperties { + decorateTools?: [string, LocaleString, any][] | [string, [string, LocaleString, any][]][]; + decorateToolShapes?: MarkupEditorToolStyleDefaults; + decorateShapeControls?: MarkupEditorShapeStyleControlDefaults; + decorateActiveTool?: string; + decorateEnableButtonFlipVertical?: boolean; + decoratePresets?: Sticker[] | StickerGroup[]; + decorateEnableDropImagePreset?: boolean; + decorateEnableSelectImagePreset?: boolean; + decorateGridSize?: number; + decorateSnapToContext?: boolean; +} + +export interface FilterPluginOptions { + filterFunctions?: { [key: string]: Filter }; + filterOptions?: any; +} + +export interface FinetunePluginOptions { + finetuneControlConfiguration?: { [key: string]: Effect }; + finetuneOptions?: [string | undefined, LocaleString][]; +} + +export interface ResizePluginOptions { + resizeMaxSize?: Size; + resizeMinSize?: Size; + resizeSizePresetOptions?: OptionGroup[] | SizeOption[]; + resizeWidthPresetOptions?: OptionGroup[] | SizeOption[]; + resizeHeightPresetOptions?: OptionGroup[] | SizeOption[]; + resizeWillRenderFooter?: (nodes: PinturaNode[], env: any, redraw: () => void) => PinturaNode[]; +} + +export interface FramePluginOptions { + frameStyles?: { + [key: string]: { + shape: { + frameStyle: string; + [key: string]: any; + }; + thumb: string; + }; + }; + frameOptions?: [string | undefined, LocaleString][]; +} + +export interface FillPluginOptions { + fillOptions?: [string | undefined, LocaleString][]; +} + +export interface RetouchPluginOptions { + retouchTools?: [string, LocaleString, any][] | [string, [string, LocaleString, any][]][]; + retouchToolShapes?: MarkupEditorToolStyleDefaults; + retouchShapeControls?: MarkupEditorShapeStyleControlDefaults; + retouchWillRenderShapeControls?: (nodes: PinturaNode[], shapeId: string) => PinturaNode[]; + retouchEnableViewTool?: boolean; + retouchEnableMoveTool?: boolean; +} + +export interface StickerPluginOptions { + stickers?: Sticker[] | StickerGroup[]; + stickerForceEnable?: boolean; + stickerStickToImage?: boolean; + stickerEnableDropImagePreset?: boolean; + stickerEnableSelectImagePreset?: boolean; + stickerEnableButtonFlipVertical?: boolean; + stickerWillRenderShapePresetToolbar?: ( + nodes: PinturaNode[], + addPreset: (sticker: Sticker) => void, + env: any, + redraw: () => void + ) => PinturaNode[]; + + /** + * @deprecated Use `stickerEnableSelectImagePreset` instead + */ + stickerEnableSelectImage?: boolean; + + /** + * @deprecated Use `stickerEnableButtonFlipVerticalt instead + */ + stickersEnableButtonFlipVertical?: boolean; + + /** + * @deprecated Use `stickerWillRenderShapePresetToolbar` instead + */ + stickersWillRenderShapePresetToolbar?: ( + nodes: PinturaNode[], + addPreset: (sticker: Sticker) => void, + env: any, + redraw: () => void + ) => PinturaNode[]; +} + +export interface PinturaImageState { + annotation?: Shape[]; + backgroundColor?: Color; + backgroundImage?: string | undefined; + colorMatrix?: ColorMatrix | undefined; + convolutionMatrix?: ConvolutionMatrix | undefined; + crop?: Rect; + cropAspectRatio?: number | undefined; + cropLimitToImage?: boolean; + cropMaxSize?: Size; + cropMinSize?: Size; + decoration?: Shape[]; + duration?: number; + flipX?: boolean; + flipY?: boolean; + frame?: string | undefined; + gamma?: number | undefined; + metadata?: PinturaMetadata | undefined; + redaction?: ShapeRectangle[]; + manipulation?: ShapeRectangle[]; + rotation?: number; + targetSize?: Size | undefined; + trim?: [number, number][] | undefined; + vignette?: number | undefined; + volume?: number | undefined; + minDuration?: number; + maxDuration?: number; +} + +export interface PinturaImageOptions extends PinturaImageState { + readonly size: Size; + readonly aspectRatio: number; + readonly cropSize: Size; + readonly cropRectAspectRatio: number; + readonly file: File; + readonly loadState: any; + readonly processState: any; + readonly rotationRange: [number, number]; + state?: any; +} + +export interface PinturaEditorImageOptionsReadonly { + readonly imageSize: Size; + readonly imageAspectRatio: number; + readonly imageCropSize: Size; + readonly imageCropRectAspectRatio: number; + readonly imageFile: File; + readonly imageLoadState: any; + readonly imageProcessState: any; + readonly imageRotationRange: [number, number]; +} + +export interface PinturaEditorImageOptions { + imageBackgroundColor?: Color; + imageBackgroundImage?: ImageSource; + imageColorMatrix?: ColorMatrix; + imageConvolutionMatrix?: ConvolutionMatrix; + imageCrop?: Rect; + imageCropAspectRatio?: number | undefined; + imageCropLimitToImage?: boolean; + imageCropMaxSize?: Size; + imageCropMinSize?: Size; + imageMinDuration?: number; + imageMaxDuration?: number; + imageRedaction?: ShapeRectangle[]; + imageManipulation?: ShapeRectangle[]; + imageAnnotation?: Shape[]; + imageDecoration?: Shape[]; + imageFlipX?: boolean; + imageFlipY?: boolean; + imageGamma?: number; + imageNoise?: number; + imageRotation?: number; + imageVignette?: number; + imageTargetSize?: Size; + imageTrim?: [number, number][]; + imageVolume?: number; + imageFrame?: + | string + | { + [key: string]: any; + frameStyle: string; + }; + imageMetadata?: PinturaMetadata; + imageState?: PinturaImageState; +} + +export interface PinturaEditorOptionsReadonly { + readonly element?: HTMLElement; + readonly stores?: any[]; + readonly images?: any; +} + +export interface PinturaNodeOptions { + [key: string]: any; +} + +export type PinturaComponent = 'Button' | 'Dropdown'; + +export type PinturaNodeType = string | SvelteComponent | PinturaComponent; + +// ignore for TypeScript 3.x +// @ts-ignore +export type PinturaNode = + | [PinturaNodeType, string] + | [PinturaNodeType, string, PinturaNodeOptions] + | [PinturaNodeType, string, PinturaNode[]] + | [PinturaNodeType, string, PinturaNodeOptions, PinturaNode[]]; + +export type PinturaEditorStatus = + | string + | [string] + | [string, number] + | [string, false] + | undefined; + +export interface PinturaEditorBaseOptions { + id?: string; + class?: string; + animations?: boolean; + src?: ImageSource; + util?: string; + utils?: string[]; + disabled?: boolean; + status?: PinturaEditorStatus; + elasticityMultiplier?: number; + layoutDirectionPreference?: 'auto' | 'horizontal' | 'vertical'; + layoutVerticalUtilsPreference?: 'left' | 'right'; + layoutHorizontalUtilsPreference?: 'bottom' | 'top'; + layoutVerticalControlGroupsPreference?: 'bottom' | 'top'; + layoutVerticalControlTabsPreference?: 'bottom' | 'top'; + layoutVerticalToolbarPreference?: 'bottom' | 'top'; + imageSourceToImageData?: (src: any) => Promise; + previewImageData?: ImageBitmap | ImageData | HTMLCanvasElement; + previewImageDataMaxSize?: Size; + previewUpscale?: boolean; + previewPad?: boolean; + previewMaskOpacity?: number; + shapePreprocessor?: any; + enableTransparencyGrid?: boolean; + enableCanvasAlpha?: boolean; + enableButtonClose?: boolean; + enableButtonExport?: boolean; + enableButtonResetHistory?: boolean; + enableButtonRevert?: boolean; + enableNavigateHistory?: boolean; + enableToolbar?: boolean; + enableUtils?: boolean; + enableDropImage?: boolean; + enablePasteImage?: boolean; + enableBrowseImage?: boolean; + willSetMediaInitialTimeOffset?: (duration: number, trim: [number, number][]) => number; + muteAudio?: boolean; + + /** + * Switch text direction to right-to-left instead of the default left-to-right + */ + textDirection?: 'rtl' | 'ltr'; + + /** + * Enable to toggle zooming the canvas with multi-touch input and mouse wheel + */ + enableZoom?: boolean; + + /** + * Enable to show zoom controls + */ + enableZoomControls?: boolean; + + /** + * Enable to toggle panning the canvas, pan with two fingers or by holding spacebar + */ + enablePan?: boolean; + + /** + * Set to false to disable limiting pan input to the centered image bounds + */ + enablePanLimit?: boolean; + + /** + * Gutter scalar to add around the pan limit bounds, value between 0 and 1, 0 no gutter, 1 gutter size of centered image + */ + panLimitGutterScalar?: number; + + /** + * Set current zoom level or set undefined to fit to view, set null to let editor handle zoom level + */ + zoomLevel?: number | undefined | null; + zoomPresetOptions?: number[]; + zoomAdjustStep?: number; + zoomAdjustFactor?: number; + zoomAdjustWheelFactor?: number; + + /** + * Set to `true` to enable pan mode programatically + */ + enablePanInput?: boolean; + + /** + * Enable zoom input mode + */ + enableZoomInput?: boolean; + + handleEvent?: (type: string, detail: any) => void; + + willRequest?: ( + url: string, + requestInfo: { resourceType: string } + ) => void | false | RequestInit; + willClose?: () => Promise; + willRevert?: () => Promise; + willProcessImage?: () => Promise; + willRenderCanvas?: ( + shapes: { + decorationShapes: Shape[]; + annotationShapes: Shape[]; + interfaceShapes: Shape[]; + frameShapes: Shape; + }, + state: { + annotationShapesDirty: boolean; + backgroundColor: number[]; + blendShapesDirty: boolean; + decorationShapesDirty: boolean; + foregroundColor: number[]; + frameShapesDirty: boolean; + images: { + backgroundColor: number[]; + colorMatrix: number[]; + convolutionMatrix: number[]; + data: ImageBitmap | ImageData; + gamma: number; + opacity: number; + origin: Vector; + resize: number; + rotation: { x: number; y: number; z: number }; + scale: number; + size: Size; + translation: Vector; + vignette: number; + }; + isInteracting: boolean; + isInteractingFraction: number; + lineColor: number[]; + opacity: number; + rootRect: Rect; + rotation: { x: number; y: number; z: number }; + scale: number; + selectionRect: Rect; + size: Size; + stageRect: Rect; + utilVisibility: { + annotate: number; + crop: number; + decorate: number; + filter: number; + finetune: number; + frame: number; + redact: number; + resize: number; + }; + } + ) => { + decorationShapes: Shape[]; + annotationShapes: Shape[]; + interfaceShapes: Shape[]; + }; + willSetHistoryInitialState?: (initialState: any) => any; + willRenderToolbar?: (nodes: PinturaNode[], env: any, redraw: () => void) => PinturaNode[]; + beforeSelectShape?: (current: Shape | undefined, target: Shape) => boolean; + beforeDeselectShape?: (current: Shape, target: Shape | undefined) => boolean; + beforeAddShape?: (shape: Shape) => boolean; + beforeRemoveShape?: (shape: Shape) => boolean; + beforeUpdateShape?: (shape: Shape, props: any, context: Rect) => Shape; + willRenderShapeControls?: (nodes: PinturaNode[], shapeId: string) => PinturaNode[]; + willRenderShapeTextControls?: (nodes: PinturaNode[], shapeId: string) => PinturaNode[]; + willRenderShapePresetToolbar?: ( + nodes: PinturaNode[], + addPreset: (sticker: Sticker) => void, + env: any, + redraw: () => void + ) => PinturaNode[]; + + /** + * @deprecated Use `willRequest` instead + */ + willRequestResource?: (url: string) => boolean; +} + +export interface PinturaEditorOptions + extends PinturaEditorBaseOptions, + PinturaEditorImageOptions, + AnnotatePluginOptions, + CropPluginOptions, + DecoratePluginOptions, + FilterPluginOptions, + FinetunePluginOptions, + StickerPluginOptions, + RetouchPluginOptions, + FillPluginOptions, + ResizePluginOptions, + TrimPluginOptions { + locale: any; + imageReader: any; + imageWriter?: any; + imageOrienter?: any; + imageScrambler?: any; + imageRedactionRendering?: 'pixelated' | 'auto'; +} + +export interface PinturaEditorDefaultOptions + extends PinturaEditorBaseOptions, + PinturaEditorImageOptions, + AnnotatePluginOptions, + CropPluginOptions, + DecoratePluginOptions, + FilterPluginOptions, + FinetunePluginOptions, + StickerPluginOptions, + RetouchPluginOptions, + ResizePluginOptions, + FillPluginOptions { + locale?: any; + imageReader?: any; + imageWriter?: any; + imageOrienter?: any; +} + +export interface PinturaEditorHeadlessOptions extends PinturaEditorImageOptions { + imageReader?: any; + imageWriter?: any; + imageScrambler?: any; + shapePreprocessor?: any; +} + +export interface PinturaEditor + extends PinturaEditorMethods, + PinturaEditorOptions, + PinturaEditorOptionsReadonly, + PinturaEditorImageOptionsReadonly {} + +export interface PinturaEditorModalOptions { + preventZoomViewport?: boolean; + preventScrollBodyIfNeeded?: boolean; + preventFooterOverlapIfNeeded?: boolean; + enableAutoHide?: boolean; + enableAutoDestroy?: boolean; + readonly modal?: HTMLElement; +} + +export interface PinturaEditorModal extends PinturaEditor, PinturaEditorModalOptions { + show: () => void; + hide: () => void; +} + +export interface PinturaReadState { + index: number; + task: string; + taskLengthComputable: boolean; + taskProgress: number; + timeStamp: number; + error?: unknown; +} + +export interface PinturaWriteState { + index: number; + task: string; + taskLengthComputable: boolean; + taskProgress: number; + timeStamp: number; + error?: unknown; +} + +// Default image reader and writer +export interface PinturaDefaultImageReaderResult { + readonly src: ImageSource; + readonly dest: File; + readonly size: Size; + readonly duration: number; +} + +export interface PinturaDefaultImageWriterResult { + readonly src: ImageSource; + readonly dest: File; + readonly imageState: PinturaImageState; + readonly store: any; +} + +export interface PinturaDefaultImageWriterStoreState { + readonly src: ImageSource; + readonly dest: File; + readonly imageState: PinturaImageState; +} + +export interface PinturaTargetSize { + width?: number; + height?: number; + fit?: 'contain' | 'cover' | 'force'; + upscale?: boolean; +} + +export interface PinturaDefaultImageReaderOptions { + orientImage?: boolean; + outputProps?: string[]; + request?: { + headers?: { [key: string]: string }; + credentials?: string; + }; + preprocessImageFile?: (file: File, options: any, onprogress: ProgressCallback) => Promise; +} + +export type PinturaStoreField = [string, string] | [string, Blob | File, string]; + +export interface PinturaDefaultImageWriterOptions { + canvasMemoryLimit?: number; + orientImage?: boolean; + copyImageHead?: boolean; + mimeType?: string; + quality?: number; + format?: 'file' | 'imageData' | 'canvas'; + renameFile?: (file: File) => string; + targetSize?: PinturaTargetSize; + imageDataResizer?: (imageData: ImageData, width: number, height: number) => Promise; + store?: + | string + | { + url: string; + dataset?: (state: PinturaDefaultImageWriterStoreState) => PinturaStoreField[]; + credentials?: string; + headers?: { [key: string]: string }; + } + | (( + state: PinturaDefaultImageWriterStoreState, + options: any, + onprogress: ProgressCallback + ) => Promise); + outputProps?: string[]; + preprocessImageSource?: ( + imageSource: Blob | File, + options: any, + onprogress: ProgressCallback + ) => Promise; + preprocessImageState?: ( + imageState: PinturaImageState, + options: any, + onprogress: ProgressCallback + ) => Promise; + postprocessImageData?: ( + imageData: any, + options: any, + onprogress: ProgressCallback + ) => Promise; + + postprocessImageBlob?: ( + output: { + blob: Blob; + imageData: ImageData; + src: File; + }, + options: any, + onprogress: ProgressCallback + ) => Promise; +} + +export interface PinturaDefaultImageScramblerOptions { + dataSizeScalar?: number; + scrambleAmount?: number; + backgroundColor?: number[]; + blurAmount?: number; +} + +export interface PinturaImageOrienter { + read: (file: Blob | File, onprogress?: ProgressCallback) => Promise; + apply: (imageData: ImageData, orientation: number) => ImageData; +} + +// exports +export const setPlugins: (...plugins: any[]) => void; + +export const getEditorDefaults: ( + options?: PinturaEditorDefaultOptions +) => PinturaEditorDefaultOptions; + +export const appendEditor: ( + target: HTMLElement | string, + options?: PinturaEditorOptions +) => PinturaEditor; + +export const appendDefaultEditor: ( + target: HTMLElement | string, + options?: PinturaEditorDefaultOptions +) => PinturaEditor; + +export const appendEditors: ( + target: HTMLElement | string, + options?: PinturaEditorOptions +) => PinturaEditor[]; + +export const appendDefaultEditors: ( + target: HTMLElement | string, + options?: PinturaEditorDefaultOptions +) => PinturaEditor[]; + +export const overlayEditor: ( + target: HTMLElement | string, + options?: PinturaEditorOptions +) => PinturaEditor; + +export const overlayDefaultEditor: ( + target: HTMLElement | string, + options?: PinturaEditorDefaultOptions +) => PinturaEditor; + +export const openEditor: (options: PinturaEditorOptions) => PinturaEditorModal; + +export const openDefaultEditor: (options: PinturaEditorDefaultOptions) => PinturaEditorModal; + +export const defineCustomElements: (options?: PinturaEditorOptions) => Promise; + +export const defineDefaultCustomElements: ( + options?: PinturaEditorDefaultOptions +) => Promise; + +export const processImage: ( + src: ImageSource, + options: PinturaEditorHeadlessOptions +) => Promise; + +export const processDefaultImage: ( + src: ImageSource, + options: PinturaEditorHeadlessOptions +) => Promise; + +export const createDefaultImageReader: (options?: PinturaDefaultImageReaderOptions) => any[]; + +export const createDefaultImageWriter: (options?: PinturaDefaultImageWriterOptions) => any[]; + +type WriterFunction = ( + src: File, + imageState: PinturaImageState, + genericOptions: any +) => unknown[] | undefined; + +export const createDefaultMediaWriter: ( + options?: any, + ...writers: WriterFunction[] | any[][] +) => any; + +export const createDefaultImageOrienter: () => PinturaImageOrienter; + +export const createDefaultImageScrambler: ( + options?: PinturaDefaultImageScramblerOptions +) => (imageData: ImageData | ImageBitmap) => HTMLCanvasElement; + +export const createDefaultShapePreprocessor: () => any; + +export const createDefaultFrameStyles: () => { + [key: string]: (shape: Shape, options?: { isPreview: boolean }) => Shape[]; +}; + +export const createDefaultLineEndStyles: () => { + [key: string]: (shape: Shape, options?: { isPreview: boolean }) => Shape[]; +}; + +export const createFrameStyleProcessor: (styles: any) => any; + +export const createLineEndProcessor: (styles: any) => any; + +export const imageStateToCanvas: ( + src: HTMLCanvasElement | HTMLVideoElement | HTMLImageElement, + imageState: PinturaImageState, + options: { + targetCanvas?: HTMLCanvasElement; + targetSize?: PinturaTargetSize; + disableDraw?: boolean; + } +) => { + canvas: HTMLCanvasElement; + redraw: () => void; +}; + +// node tree helpers +export function createNode( + name: PinturaNodeType, + id: string, + props: PinturaNodeOptions | undefined, + children: PinturaNode[] +): PinturaNode; + +export function createNode(name: PinturaNodeType, id: string): PinturaNode; + +export function createNode(name: PinturaNodeType, id: string, children: PinturaNode[]): PinturaNode; + +export function createNode( + name: PinturaNodeType, + id: string, + props: PinturaNodeOptions +): PinturaNode; + +export function findNode( + id: string, + haystack: PinturaNode | PinturaNode[] +): undefined | PinturaNode; +export function updateNode(node: PinturaNode, props: { [key: string]: unknown }): void; +export function appendNode(node: PinturaNode, haystack: PinturaNode | PinturaNode[]): void; +export function removeNode(id: string): PinturaNode[]; +export function insertNodeBefore( + node: PinturaNode, + targetId: string, + haystack: PinturaNode | PinturaNode[] +): void; +export function insertNodeAfter( + node: PinturaNode, + targetId: string, + haystack: PinturaNode | PinturaNode[] +): void; + +type SelectionDrawMode = 'add' | 'subtract' | 'new'; + +interface SelectionShape { + drawMode?: SelectionDrawMode; +} + +interface SelectionRectangle extends SelectionShape { + x: number | Percentage; + y: number | Percentage; + width: number | Percentage; + height: number | Percentage; +} + +interface SelectionPath extends SelectionShape { + points: Vector[]; + pathClose: false; +} + +interface SelectionLassoo extends SelectionShape { + points: Vector[]; + pathClose: true; +} + +interface SelectionEllipse extends SelectionShape { + x: number | Percentage; + y: number | Percentage; + rx: number | Percentage; + ry: number | Percentage; +} + +type SelectionShapes = SelectionRectangle | SelectionPath | SelectionEllipse; + +// utils +export const selectionToMask: ( + selection: SelectionShapes[], + contextSize: Size, + contextState: { rotation: number; flipX: boolean; flipY: boolean } | PinturaImageState, + options?: { + format?: 'canvas' | 'blob'; + backgroundColor?: number[]; + foregroundColor?: number[] | undefined; + scope?: 'mask' | 'image'; + padding?: number /** defaults to 0 */; + maxSize?: Size /** defaults to imageSize */; + targetSize?: Size; + precision?: number /** defaults to 7, lower is more precise but slower */; + } +) => Promise<{ rect: Rect; canvas: HTMLCanvasElement; blob: Blob | undefined }>; + +export const createRetouchShape: ( + imageFile: Blob | File, + imageSize: Size, + imageState: PinturaImageState, + selection: any, + inpaint: ( + imageOuptut: Blob | HTMLCanvasElement, + maskOuptut: Blob | HTMLCanvasElement, + options: { shape: Shape; controller: AbortController } + ) => Promise, + options?: { + retouches?: Shape[] /** current retouch shapes */; + maxSize?: Size /** limit mask to this size */; + padding?: number /** extra padding around mask area, defaults to 15 */; + didCreateDraft?: ( + shape: Shape, + options?: { selection: any } + ) => undefined /** hook for ui updates */; + + // resize mask to this size if is bigger + targetSize?: Size; + + // image format (png or empty for use input) + mimeType?: string; + + // called before creating mask rect + beforeCreateMaskCanvas: (mask: Rect) => Rect; + + // background and foreground color of mask, defaults to false + alphaMask: boolean; + + // mask format, defaults to blob + maskFormat?: 'blob' | 'canvas'; + + // image format, defaults to blob + imageFormat?: 'blob' | 'canvas'; + } +) => Shape; + +export const getUniqueId: () => string; +export const supportsWebGL: () => boolean; +export const degToRad: (deg: number) => number; +export const naturalAspectRatioToNumber: ( + aspectRatio: string | number | undefined +) => number | false | undefined; +export const colorStringToColorArray: (Color: string) => Color; +export const legacyDataToImageState: ( + editor: any, + imageSize: Size, + data: any +) => PinturaImageOptions; +export const dispatchEditorEvents: ( + editor: PinturaEditor, + element: HTMLElement, + options?: { prefix?: string } +) => any[]; +export const blobToFile: (blob: Blob | File, filename: string, mimetype?: string) => File; +export const isSupported: () => boolean; + +// shape helpers +export const shapeGetLevel: ( + shapeState: { flipX: undefined | boolean; flipY: undefined | boolean; rotation: number }, + imageState: { flipX: boolean; flipY: boolean; rotation: number } +) => { flipX: boolean; flipY: boolean; rotation: number }; +export const shapeGetLength: (shape: Shape) => undefined | number; +export const shapeGetCenter: (shape: Shape) => Vector; + +export const getShapeById: (shapeArray: Shape[], shapeId: string) => Shape | undefined; +export const updateShapeById: ( + shapeArray: Shape[], + shapeId: string, + updater: (shape: Shape) => Shape +) => Shape[]; + +// locale +export const locale_en_gb: LocaleCollection; + +// +// markup editor +// +export interface MarkupEditorToolStyleDefaults { + sharpie: [Shape, ShapeToolOptions]; + line: [Shape, ShapeToolOptions]; + arrow: [Shape, ShapeToolOptions]; + rectangle: [Shape, ShapeToolOptions]; + ellipse: [Shape, ShapeToolOptions]; + text: [Shape, ShapeToolOptions]; + [custom: string]: [Shape, ShapeToolOptions]; +} + +export interface MarkupEditorShapeControlOptions { + component?: any; + options?: any; + items?: any; +} + +export interface MarkupEditorShapeStyleControlOptions { + [key: string]: MarkupEditorShapeControlOptions; +} + +export interface MarkupEditorShapeStyleControlDefaults { + backgroundColor: undefined | ShapeControl; + strokeColor: undefined | ShapeControl; + strokeWidth: undefined | ShapeControl; + lineStart: undefined | ShapeControl; + lineEnd: undefined | ShapeControl; + color: undefined | ShapeControl; + fontFamily: undefined | ShapeControl; + fontStyle_fontWeight: undefined | ShapeControl; + fontSize: undefined | ShapeControl; + textAlign: undefined | ShapeControl; + lineHeight: undefined | ShapeControl; + + // custom + [key: string]: + | undefined + | ShapeControl + | { + component?: any; + options?: any; + item?: any; + }; +} + +export type ToolbarItem = + | string + | [string, { disabled?: boolean; icon: string }] + | [string, LocaleString, { disabled?: boolean; icon: string }]; + +/** + * Create tools available in the markup editor + */ +export const createMarkupEditorToolbar: (tools?: ToolbarItem[]) => [string, LocaleString, any][]; + +/** + * Create default shape styles for each tool, optionally add custom shape styles + */ +export const createMarkupEditorToolStyles: (toolStyles?: { + [key: string]: [Shape, ShapeToolOptions]; +}) => MarkupEditorToolStyleDefaults; + +/** + * Create a custom tool style based on one of the existing types + */ +export const createMarkupEditorToolStyle: ( + type: 'path' | 'rectangle' | 'ellipse' | 'line' | 'text', + shape?: Shape, + options?: ShapeToolOptions +) => [Shape, ShapeToolOptions]; + +/** + * Create default shape style controls + */ +export const createMarkupEditorShapeStyleControls: ( + shapeControlOptions?: ShapeControlOptions +) => MarkupEditorShapeStyleControlDefaults; + +export const createDefaultColorOptions: () => ColorPalette; +export const createDefaultFontSizeOptions: () => number[]; +export const createDefaultFontScaleOptions: () => SizeCategories; +export const createDefaultLineHeightOptions: () => number[]; +export const createDefaultLineHeightScaleOptions: () => SizeCategories; +export const createDefaultStrokeWidthOptions: () => number[]; +export const createDefaultStrokeScaleOptions: () => SizeCategories; +export const createDefaultLineEndStyleOptions: () => LineEndStyle[]; +export const createDefaultFontFamilyOptions: () => [string, string][]; +export const createDefaultFontStyleOptions: () => [string, string][]; +export const createDefaultTextAlignOptions: () => TextAlign[]; + +export const createMarkupEditorColorOptions: (colors: ColorPalette) => ShapeColorOption[]; +export const createMarkupEditorFontSizeOptions: (sizes: number[]) => ShapeSizeOption[]; +export const createMarkupEditorFontScaleOptions: (sizes: SizeCategories) => ShapeSizeOption[]; +export const createMarkupEditorLineHeightOptions: (sizes: number[]) => ShapeSizeOption[]; +export const createMarkupEditorLineHeightScaleOptions: (sizes: SizeCategories) => ShapeSizeOption[]; +export const createMarkupEditorStrokeWidthOptions: (widths: number[]) => ShapeSizeOption[]; +export const createMarkupEditorStrokeScaleOptions: (sizes: SizeCategories) => ShapeSizeOption[]; +export const createMarkupEditorFontFamilyOptions: ( + families: [string, string][] +) => ShapeFontFamilyOption[]; +export const createMarkupEditorFontStyleOptions: ( + styles: [string, string][] +) => ShapeFontStyleOption[]; +export const createMarkupEditorLineEndStyleOptions: ( + styles: LineEndStyle[] +) => [LineEndStyle, string][]; + +export const createMarkupEditorBackgroundColorControl: ( + colors: ShapeColorOption[], + options?: { + enablePicker?: boolean; + enableOpacity?: boolean; + enableInput?: boolean; + enablePresets?: boolean; + } +) => ShapeControl; +export const createMarkupEditorStrokeColorControl: ( + colors: ShapeColorOption[], + options?: { + defaultStrokeWidth: number | string; + enablePicker?: boolean; + enableOpacity?: boolean; + enableInput?: boolean; + enablePresets?: boolean; + } +) => ShapeControl; +export const createMarkupEditorStrokeWidthControl: (widths: ShapeSizeOption[]) => ShapeControl; +export const createMarkupEditorLineStartStyleControl: ( + styles: [LineEndStyle, string][] +) => ShapeControl; +export const createMarkupEditorLineEndStyleControl: ( + styles: [LineEndStyle, string][] +) => ShapeControl; +export const createMarkupEditorFontColorControl: ( + colors: ShapeColorOption[], + options?: { + enablePicker?: boolean; + enableOpacity?: boolean; + enableInput?: boolean; + enablePresets?: boolean; + } +) => ShapeControl; +export const createMarkupEditorFontFamilyControl: ( + fontFamilies: [string, string][], + options?: { + defaultKey: string | undefined; + } +) => ShapeControl; +export const createMarkupEditorFontStyleControl: (fontStyles: [string, string][]) => ShapeControl; +export const createMarkupEditorFontSizeControl: ( + sizes: ShapeSizeOption[], + options?: { + defaultKey?: string; + defaultValue?: string | number; + enableInput?: boolean; + } +) => ShapeControl; +export const createMarkupEditorTextAlignControl: (textAlignments: TextAlign[]) => ShapeControl; +export const createMarkupEditorLineHeightControl: ( + lineHeights: [number, string][], + options?: { + defaultKey?: string; + defaultValue?: string | number; + enableInput?: boolean; + } +) => ShapeControl; + +export const createMarkupEditorOptionsControl: (items: unknown[], options: any) => ShapeControl; + +export const markup_editor_defaults: { + markupEditorToolbar: [string, LocaleString, any][]; + markupEditorToolStyles: MarkupEditorToolStyleDefaults; + markupEditorShapeStyleControls: MarkupEditorShapeStyleControlDefaults; +}; + +export const createMarkupEditorBrushSizeControl: (items: unknown[]) => ShapeControl; + +export const createMarkupEditorSelectionModeControl: (options?: { + hideLabel: boolean; +}) => ShapeControl; + +export const createMarkupEditorSelectionToolStyles: ( + action: string, + options?: { tools: string[] } +) => any; + +export const createMarkupEditorSelectionTools: ( + action: string, + options?: { tools: string[] } +) => any; + +export const markup_editor_locale_en_gb: LocaleCollection; + +// +// plugins +// +export interface PinturaUtilPlugin { + util: [string, any]; +} + +export const plugin_annotate: PinturaUtilPlugin; +export const plugin_crop: PinturaUtilPlugin; +export const plugin_decorate: PinturaUtilPlugin; +export const plugin_filter: PinturaUtilPlugin; +export const plugin_finetune: PinturaUtilPlugin; +export const plugin_resize: PinturaUtilPlugin; +export const plugin_sticker: PinturaUtilPlugin; +export const plugin_redact: PinturaUtilPlugin; +export const plugin_frame: PinturaUtilPlugin; +export const plugin_fill: PinturaUtilPlugin; +export const plugin_retouch: PinturaUtilPlugin; + +export const plugin_annotate_locale_en_gb: LocaleCollection; +export const plugin_crop_locale_en_gb: LocaleCollection; +export const plugin_decorate_locale_en_gb: LocaleCollection; +export const plugin_filter_locale_en_gb: LocaleCollection; +export const plugin_finetune_locale_en_gb: LocaleCollection; +export const plugin_resize_locale_en_gb: LocaleCollection; +export const plugin_sticker_locale_en_gb: LocaleCollection; +export const plugin_redact_locale_en_gb: LocaleCollection; +export const plugin_frame_locale_en_gb: LocaleCollection; +export const plugin_fill_locale_en_gb: LocaleCollection; +export const plugin_retouch_locale_en_gb: LocaleCollection; + +export const plugin_frame_defaults: FramePluginOptions; +export const plugin_filter_defaults: FilterPluginOptions; +export const plugin_finetune_defaults: FinetunePluginOptions; + +export const effectBrightness: Effect; +export const effectContrast: Effect; +export const effectSaturation: Effect; +export const effectExposure: Effect; +export const effectGamma: Effect; +export const effectVignette: Effect; +export const effectClarity: Effect; +export const effectTemperature: Effect; + +export const filterPastel: Filter; +export const filterChrome: Filter; +export const filterFade: Filter; +export const filterWarm: Filter; +export const filterCold: Filter; +export const filterInvert: Filter; +export const filterMonoDefault: Filter; +export const filterMonoNoir: Filter; +export const filterMonoWash: Filter; +export const filterMonoStark: Filter; +export const filterSepiaDefault: Filter; +export const filterSepiaBlues: Filter; +export const filterSepiaRust: Filter; +export const filterSepiaColor: Filter; + +export const frameSolidSharp: Frame; +export const frameSolidRound: Frame; +export const frameLineSingle: Frame; +export const frameLineMultiple: Frame; +export const frameEdgeSeparate: Frame; +export const frameEdgeCross: Frame; +export const frameEdgeOverlap: Frame; +export const frameHook: Frame; +export const framePolaroid: Frame; diff --git a/src/components/@pqina/pintura/pintura.js b/src/components/@pqina/pintura/pintura.js new file mode 100644 index 0000000..8d8528b --- /dev/null +++ b/src/components/@pqina/pintura/pintura.js @@ -0,0 +1,31046 @@ +/*! + * Pintura v8.71.2 - Test version + * (c) 2018-2024 PQINA Inc. - All Rights Reserved + * License: https://pqina.nl/pintura/license/ + * + * Visit https://pqina.nl/pintura/ to obtain a commercial license. + */ +/* eslint-disable */ + +const e = [{ + value: 65504, + name: "jfif" +}, { + value: 65498, + name: "sos" +}, { + value: 65505, + subvalue: 17784, + name: "exif" +}, { + value: 65505, + subvalue: 26740, + name: "xmp" +}, { + value: 65506, + subvalue: 19792, + name: "mpf" +}]; +var t = t => { + if (65496 !== t.getUint16(0)) return; + const o = t.byteLength; + let i, r = 2, + n = void 0; + for (; r < o && 255 === t.getUint8(r);) { + i = t.getUint16(r); + const o = e.find((e => e.value === i && (!e.subvalue || e.subvalue === t.getUint16(r + 2 + 2)))); + if (o) { + const { + name: e + } = o; + n || (n = {}), n[e] || (n[e] = { + offset: r, + size: t.getUint16(r + 2) + }) + } + if (65498 === i) break; + r += 2 + t.getUint16(r + 2) + } + return n +}; +var o = (e, o, i) => { + if (!e) return; + const r = new DataView(e), + n = t(r); + if (!n || !n.exif) return; + const a = ((e, t) => { + if (65505 !== e.getUint16(t)) return; + const o = e.getUint16(t + 2); + if (t += 4, 1165519206 !== e.getUint32(t)) return; + t += 6; + const i = e.getUint16(t); + if (18761 !== i && 19789 !== i) return; + const r = 18761 === i; + if (t += 2, 42 !== e.getUint16(t, r)) return; + t += e.getUint32(t + 2, r); + const n = i => { + const n = []; + let a = t; + const s = Math.min(e.byteLength, t + o - 16); + for (; a < s; a += 12) { + const t = a; + e.getUint16(t, r) === i && n.push(t) + } + return n + }; + return { + read: t => { + const o = n(t); + if (o.length) return e.getUint16(o[0] + 8, r) + }, + write: (t, o) => { + const i = n(t); + return !!i.length && (i.forEach((t => e.setUint16(t + 8, o, r))), !0) + } + } + })(r, n.exif.offset); + return a ? void 0 === i ? a.read(o) : a.write(o, i) : void 0 +}; +var i = e => window.__pqina_webapi__ ? window.__pqina_webapi__[e] : window[e], + r = (...e) => {}; +const n = { + ArrayBuffer: "readAsArrayBuffer" +}; +var a = async (e, t = [0, e.size], o) => await ((e, t = r, o = {}) => new Promise(((r, a) => { + const { + dataFormat: s = n.ArrayBuffer + } = o, l = new(i("FileReader")); + l.onload = () => r(l.result), l.onerror = () => a(l.error), l.onprogress = t, l[s](e) +})))(e.slice(...t), o), s = async (e, t) => { + const i = await a(e, [0, 262144], t); + return o(i, 274) || 1 +}; +let l = null; +var c = () => (null === l && (l = "undefined" != typeof window && void 0 !== window.document), l); +let d = null; +var u = () => new Promise((e => { + if (null === d) { + const t = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k="; + let o = c() ? new Image : {}; + return o.onload = () => { + d = 1 === o.naturalWidth, o = void 0, e(d) + }, void(o.src = t) + } + return e(d) + })), + h = e => e.getContext("2d").getImageData(0, 0, e.width, e.height), + p = (e, t, o = []) => { + if (e === 'pre' || e === "div") { + t = { + innerHTML: "", + style: "", + class: "" + } + } + const i = document.createElement(e), + r = Object.getOwnPropertyDescriptors(i.__proto__); + for (const e in t) "style" === e ? i.style.cssText = t[e] : r[e] && r[e].set || /textContent|innerHTML/.test(e) || "function" == typeof t[e] ? i[e] = t[e] : i.setAttribute(e, t[e]); + return o.forEach((e => i.appendChild(e))), i + }; +const m = { + 1: () => [1, 0, 0, 1, 0, 0], + 2: e => [-1, 0, 0, 1, e, 0], + 3: (e, t) => [-1, 0, 0, -1, e, t], + 4: (e, t) => [1, 0, 0, -1, 0, t], + 5: () => [0, 1, 1, 0, 0, 0], + 6: (e, t) => [0, 1, -1, 0, t, 0], + 7: (e, t) => [0, -1, -1, 0, t, e], + 8: e => [0, -1, 1, 0, 0, e] +}; +var g = e => { + e.width = 1, e.height = 1; + const t = e.getContext("2d"); + t && t.clearRect(0, 0, 1, 1) + }, + $ = e => "data" in e, + f = e => c() ? RegExp(e).test(window.navigator.userAgent) : void 0; +let y = null; +var b = () => (null === y && (y = f(/Android/)), y), + x = (e, t) => { + const o = p("canvas", { + width: e.width, + height: e.height + }); + + return o.getContext("2d", t).drawImage(e, 0, 0), o + }, + v = async (e, t = 1) => { + const o = await u(), + [i, r] = o || t < 5 ? [e.width, e.height] : [e.height, e.width], + n = p("canvas", { + width: i, + height: r + }), + a = n.getContext("2d", { + willReadFrequently: !0 + }); + + if ($(e) && !o && t > 1) { + const t = p("canvas", { + width: e.width, + height: e.height + }); + t.getContext("2d", { + willReadFrequently: !0 + }).putImageData(e, 0, 0), e = t + } + + if (!o && t > 1 && a.transform.apply(a, ((e, t, o = -1) => (-1 === o && (o = 1), m[o](e, t)))(e.width, e.height, t)), $(e)) { + if (a.putImageData(e, 0, 0), b()) return x(n) + } else a.drawImage(e, 0, 0); + return e instanceof HTMLCanvasElement && g(e), n + }, w = async (e, t = 1) => 1 === t || await u() ? e : h(await v(e, t)), S = e => "object" == typeof e; +const k = e => e instanceof HTMLElement ? e : S(e) ? C(e) : e, + C = e => { + let t; + return Array.isArray(e) ? (t = [], e.forEach(((e, o) => { + t[o] = k(e) + }))) : (t = {}, Object.keys(e).forEach((o => { + const i = e[o]; + t[o] = k(i) + }))), t + }; +var T = e => "string" == typeof e, + M = e => "function" == typeof e, + R = (e, t) => new Promise(((o, i) => { + const r = () => o(((e, { + width: t, + height: o, + canvasMemoryLimit: i, + contextOptions: r + }) => { + let n = t || e.naturalWidth, + a = o || e.naturalHeight; + n || a || (n = 300, a = 150); + const s = n * a; + if (i && s > i) { + const e = Math.sqrt(i) / Math.sqrt(s); + n = Math.floor(n * e), a = Math.floor(a * e) + } + const l = p("canvas"); + + return l.width = n, l.height = a, l.getContext("2d", r).drawImage(e, 0, 0, n, a), l + })(e, t)); + e.complete && e.width ? r() : (e.onload = r, e.onerror = () => i(new Error("Failed to load image"))) + })), + P = () => "createImageBitmap" in window, + E = e => /svg/.test(e.type), + I = () => Math.random().toString(36).substring(2, 9); +const A = new Map; +var L = (e, t, o) => new Promise(((i, r) => { + const n = e.toString(); + let a = A.get(n); + if (!a) { + const t = (e => `function () {self.onmessage = function (message) {(${e.toString()}).apply(null, message.data.content.concat([function (err, response) {\n response = response || {};\n const transfer = 'data' in response ? [response.data.buffer] : 'width' in response ? [response] : [];\n return self.postMessage({ id: message.data.id, content: response, error: err }, transfer);\n}]))}}`)(e), + o = URL.createObjectURL((e => new Blob(["(", "function" == typeof e ? e.toString() : e, ")()"], { + type: "application/javascript" + }))(t)), + i = new Map, + r = new Worker(o); + a = { + url: o, + worker: r, + messages: i, + terminationTimeout: void 0, + terminate: () => { + clearTimeout(a.terminationTimeout), a.worker.terminate(), URL.revokeObjectURL(o), A.delete(n) + } + }, r.onmessage = function(e) { + const { + id: t, + content: o, + error: r + } = e.data; + if (clearTimeout(a.terminationTimeout), a.terminationTimeout = setTimeout((() => { + i.size > 0 || a.terminate() + }), 500), !i.has(t)) return; + const n = i.get(t); + i.delete(t), null != r ? n.reject(r) : n.resolve(o) + }, A.set(n, a) + } + const s = I(); + a.messages.set(s, { + resolve: i, + reject: r + }), a.worker.postMessage({ + id: s, + content: t + }, o) + })), + z = async (e, t) => { + const o = async () => { + const o = await (async (e, t) => { + const o = p("img", { + src: URL.createObjectURL(e) + }), + i = await R(o, t); + return URL.revokeObjectURL(o.src), i + })(e, { + canvasMemoryLimit: t, + contextOptions: { + willReadFrequently: !0 + } + }), + i = h(o); + return g(o), i + }; + if (b()) return await o(); + let i; + if (P() && !E(e) && "OffscreenCanvas" in window) try { + i = await L(((e, t, o) => { + createImageBitmap(e).then((e => { + let i = e.width, + r = e.height; + const n = i * r; + if (t && n > t) { + const e = Math.sqrt(t) / Math.sqrt(n); + i = Math.floor(i * e), r = Math.floor(r * e) + } + const a = new OffscreenCanvas(i, r), + s = a.getContext("2d", { + willReadFrequently: !0 + }); + + + s.drawImage(e, 0, 0, i, r); + const l = s.getImageData(0, 0, a.width, a.height); + o(null, l) + })).catch((e => { + o(e) + })) + }), [e, t]) + } catch (e) {} + return i && i.width ? i : await o() + }, F = (e, t, o) => new Promise(((i, r) => { + try { + e.toBlob((e => { + if (!e) return r(new Error("Failed to create blob")); + i(e) + }), t, o) + } catch (e) { + r(e) + } + })), O = async (e, t, o) => { + const i = await v(e), + r = await F(i, t, o); + return g(i), r + }; +const D = { + matroska: "mkv" +}; +var B = e => { + const t = (e.match(/\/([a-z0-9]+)/) || [])[1]; + if (/^x/.test(t)) { + const [, t = ""] = e.split("/x-"); + return D[t] + } + return t + }, + W = e => e.substr(0, e.lastIndexOf(".")) || e; +const V = /avif|bmp|gif|jpg|jpeg|jpe|jif|jfif|png|svg|tiff|webp/; +var _ = e => { + return e && (t = (o = e, o.split(".").pop()).toLowerCase(), V.test(t) ? "image/" + (/jfif|jif|jpe|jpg/.test(t) ? "jpeg" : "svg" === t ? "svg+xml" : t) : ""); + var t, o + }, + N = (e, t, o) => { + const r = (new Date).getTime(), + n = e.type.length && !/null|text/.test(e.type), + a = n ? e.type : o, + s = ((e, t) => { + const o = _(e); + if (o === t) return e; + const i = B(t) || o; + return `${W(e)}.${i}` + })(t, a); + try { + return new(i("File"))([e], s, { + lastModified: r, + type: n ? e.type : a + }) + } catch (t) { + const o = n ? e.slice() : e.slice(0, e.size, a); + return o.lastModified = r, o.name = s, o + } + }, + H = (e, t) => e / t, + j = e => e; +const U = Math.PI, + G = Math.PI / 2, + Z = G / 2; +var X = e => { + const t = Math.abs(e) % Math.PI; + return t > Z && t < Math.PI - Z +}; +const Y = { + Top: "t", + Right: "r", + Bottom: "b", + Left: "l", + TopLeft: "tl", + TopRight: "tr", + BottomRight: "br", + BottomLeft: "bl" + }, + { + Top: q, + Right: K, + Bottom: J, + Left: Q, + TopLeft: ee, + TopRight: te, + BottomRight: oe, + BottomLeft: ie + } = Y; +var re = { + [q]: [.5, 0], + [K]: [1, .5], + [J]: [.5, 1], + [Q]: [0, .5], + [ee]: [0, 0], + [te]: [1, 0], + [oe]: [1, 1], + [ie]: [0, 1] + }, + ne = (e, t = 12) => parseFloat(e.toFixed(t)); +const ae = (e, t, o) => o + (e - o) * t, + se = e => ({ + x: e.x + .5 * e.width, + y: e.y + .5 * e.height, + rx: .5 * e.width, + ry: .5 * e.height + }), + le = () => ce(0, 0), + ce = (e, t) => ({ + x: e, + y: t + }), + de = e => ce(e.pageX, e.pageY), + ue = e => ce(e.x, e.y), + he = e => (e.x = -e.x, e.y = -e.y, e), + pe = (e, t, o = le()) => { + const i = Math.cos(t), + r = Math.sin(t), + n = e.x - o.x, + a = e.y - o.y; + return e.x = o.x + i * n - r * a, e.y = o.y + r * n + i * a, e + }, + me = e => Math.sqrt(e.x * e.x + e.y * e.y), + ge = e => { + const t = Math.sqrt(e.x * e.x + e.y * e.y); + return 0 === t ? le() : (e.x /= t, e.y /= t, e) + }, + $e = (e, t) => Math.atan2(t.y - e.y, t.x - e.x), + fe = (e, t) => e.x === t.x && e.y === t.y, + ye = (e, t) => (e.x = t(e.x), e.y = t(e.y), e), + be = (e, t) => (e.x += t.x, e.y += t.y, e), + xe = (e, t) => (e.x -= t.x, e.y -= t.y, e), + ve = (e, t) => (e.x /= t, e.y /= t, e), + we = (e, t) => (e.x *= t, e.y *= t, e), + Se = (e, t) => e.x * t.x + e.y * t.y, + ke = (e, t) => e.x * t.y - e.y * t.x, + Ce = (e, t = le()) => { + const o = e.x - t.x, + i = e.y - t.y; + return o * o + i * i + }, + Te = (e, t = le()) => Math.sqrt(Ce(e, t)), + Me = (e, t, o) => (e.x = ae(e.x, t, o.x), e.y = ae(e.y, t, o.y), e), + Re = e => { + let t = 0, + o = 0; + return e.forEach((e => { + t += e.x, o += e.y + })), ce(t / e.length, o / e.length) + }, + Pe = (e, t, o, i, r) => (e.forEach((e => { + e.x = t ? i - (e.x - i) : e.x, e.y = o ? r - (e.y - r) : e.y + })), e), + Ee = (e, t, o, i) => { + const r = Math.sin(t), + n = Math.cos(t); + return e.forEach((e => { + e.x -= o, e.y -= i; + const t = e.x * n - e.y * r, + a = e.x * r + e.y * n; + e.x = o + t, e.y = i + a + })), e + }, + Ie = (e, t) => ({ + width: e, + height: t + }), + Ae = e => Ie(e.width, e.height), + Le = e => Ie(e.width, e.height), + ze = e => Ie(e.width, e.height), + Fe = e => Ie(e[0], e[1]), + Oe = e => { + return /img/i.test(e.nodeName) ? Ie((t = e).naturalWidth, t.naturalHeight) : Le(e); + var t + }, + De = (e, t) => Ie(e, t), + Be = (e, t, o = j) => o(e.width) === o(t.width) && o(e.height) === o(t.height), + We = (e, t) => (e.width *= t, e.height *= t, e), + Ve = e => ce(.5 * e.width, .5 * e.height), + _e = (e, t) => { + const o = Math.abs(t), + i = Math.abs(Math.cos(o)), + r = Math.abs(Math.sin(o)), + n = i * e.width + r * e.height, + a = r * e.width + i * e.height; + return e.width = n, e.height = a, e + }, + Ne = (e, t) => e.width >= t.width && e.height >= t.height, + He = (e, t) => (e.width = t(e.width), e.height = t(e.height), e), + je = (e, t) => ({ + start: e, + end: t + }), + Ue = e => je(ue(e.start), ue(e.end)), + Ge = (e, t) => { + if (0 === t) return e; + const o = ce(e.start.x - e.end.x, e.start.y - e.end.y), + i = ge(o), + r = we(i, t); + return e.start.x += r.x, e.start.y += r.y, e.end.x -= r.x, e.end.y -= r.y, e + }, + Ze = [ce(-1, -1), ce(-1, 1), ce(1, 1), ce(1, -1)], + Xe = (e, t, o, i) => ({ + x: e, + y: t, + width: o, + height: i + }), + Ye = e => Xe(e.x, e.y, e.width, e.height), + qe = () => Xe(0, 0, 0, 0), + Ke = e => Xe(0, 0, e.width, e.height), + Je = e => Xe(e[3], e[0], e[1] - e[3], e[2] - e[0]), + Qe = e => Xe(e.x || 0, e.y || 0, e.width || 0, e.height || 0), + et = e => { + let t = e[0].x, + o = e[0].x, + i = e[0].y, + r = e[0].y; + return e.forEach((e => { + t = Math.min(t, e.x), o = Math.max(o, e.x), i = Math.min(i, e.y), r = Math.max(r, e.y) + })), Xe(t, i, o - t, r - i) + }, + tt = e => it(e.x - e.rx, e.y - e.ry, 2 * e.rx, 2 * e.ry), + ot = (e, t) => Xe(e.x - .5 * t.width, e.y - .5 * t.height, t.width, t.height), + it = (e, t, o, i) => Xe(e, t, o, i), + rt = e => ce(e.x + .5 * e.width, e.y + .5 * e.height), + nt = (e, t) => (e.x += t.x, e.y += t.y, e), + at = (e, t, o) => (o = o || rt(e), e.x = t * (e.x - o.x) + o.x, e.y = t * (e.y - o.y) + o.y, e.width = t * e.width, e.height = t * e.height, e), + st = (e, t, o, i) => { + const r = (i.x - e.x) / e.width, + n = (i.y - e.y) / e.height; + let a = Math.max(t.width, e.width), + s = Math.max(t.height, e.height); + return a = Math.min(o.width, a), s = Math.min(o.height, s), e.x = i.x - r * a, e.y = i.y - n * s, e.width = a, e.height = s, e + }, + lt = (e, t) => { + const [o, i] = re[t], r = o * e.width, n = i * e.height; + return ce(e.x + r, e.y + n) + }, + ct = (e, t) => (e.x *= t, e.y *= t, e.width *= t, e.height *= t, e), + dt = (e, t, o = j) => o(e.x) === o(t.x) && o(e.y) === o(t.y) && o(e.width) === o(t.width) && o(e.height) === o(t.height), + ut = e => H(e.width, e.height), + ht = (e, t, o, i, r) => (e.x = t, e.y = o, e.width = i, e.height = r, e), + pt = (e, t) => (e.x = t.x, e.y = t.y, e.width = t.width, e.height = t.height, e), + mt = (e, t, o) => (o || (o = rt(e)), xt(e).map((e => pe(e, t, o)))), + gt = (e, t) => Xe(.5 * e.width - .5 * t.width, .5 * e.height - .5 * t.height, t.width, t.height), + $t = (e, t) => !(t.x < e.x) && (!(t.y < e.y) && (!(t.x > e.x + e.width) && !(t.y > e.y + e.height))), + ft = (e, t, o = le()) => { + if (0 === e.width || 0 === e.height) return qe(); + const i = ut(e); + t || (t = i); + let r = e.width, + n = e.height; + return t > i ? r = n * t : n = r / t, Xe(o.x + .5 * (e.width - r), o.y + .5 * (e.height - n), r, n) + }, + yt = (e, t = ut(e), o = le()) => { + if (0 === e.width || 0 === e.height) return qe(); + let i = e.width, + r = i / t; + return r > e.height && (r = e.height, i = r * t), Xe(o.x + .5 * (e.width - i), o.y + .5 * (e.height - r), i, r) + }, + bt = e => [Math.min(e.y, e.y + e.height), Math.max(e.x, e.x + e.width), Math.max(e.y, e.y + e.height), Math.min(e.x, e.x + e.width)], + xt = e => [ce(e.x, e.y), ce(e.x + e.width, e.y), ce(e.x + e.width, e.y + e.height), ce(e.x, e.y + e.height)], + vt = (e, t) => { + if (e) return e.x = t(e.x), e.y = t(e.y), e.width = t(e.width), e.height = t(e.height), e + }, + wt = (e, t, o = rt(e)) => xt(e).map(((e, i) => { + const r = Ze[i]; + return ce(ae(e.x, 1 + r.x * t.x, o.x), ae(e.y, 1 + r.y * t.y, o.y)) + })), + St = e => (e.x = 0, e.y = 0, e), + kt = e => { + const t = e[0], + o = e[e.length - 1]; + e = fe(t, o) ? e : [...e, t]; + const i = t.x, + r = t.y; + let n, a, s, l = 0, + c = 0, + d = 0, + u = 0; + const h = e.length; + for (; c < h; c++) n = e[c], a = e[c + 1 > h - 1 ? 0 : c + 1], s = (n.y - r) * (a.x - i) - (a.y - r) * (n.x - i), l += s, d += (n.x + a.x - 2 * i) * s, u += (n.y + a.y - 2 * r) * s; + return s = 3 * l, ce(i + d / s, r + u / s) + }, + Ct = (e, t) => Tt(e.start, e.end, t.start, t.end), + Tt = (e, t, o, i) => { + const r = (i.y - o.y) * (t.x - e.x) - (i.x - o.x) * (t.y - e.y); + if (0 === r) return; + const n = ((i.x - o.x) * (e.y - o.y) - (i.y - o.y) * (e.x - o.x)) / r, + a = ((t.x - e.x) * (e.y - o.y) - (t.y - e.y) * (e.x - o.x)) / r; + return n < 0 || n > 1 || a < 0 || a > 1 ? void 0 : ce(e.x + n * (t.x - e.x), e.y + n * (t.y - e.y)) + }, + Mt = (e, t, { + ignoreIdenticalLines: o = !1, + breakOnIntersection: i = !1 + } = {}) => { + const r = t.length, + n = []; + for (let a = 0; a < r - 1; a++) { + if (o && (fe(e.start, t[a]) || fe(e.start, t[a + 1]) || fe(e.end, t[a]) || fe(e.end, t[a + 1]))) continue; + const r = Tt(e.start, e.end, t[a], t[a + 1]); + if (r) { + if (i) return [r]; + n.push(r) + } + } + return n.length ? n : void 0 + }, + Rt = (e, t) => { + let o = 0, + i = 0, + r = !1; + const n = t.length; + for (o = 0, i = n - 1; o < n; i = o++) t[o].y > e.y != t[i].y > e.y && e.x < (t[i].x - t[o].x) * (e.y - t[o].y) / (t[i].y - t[o].y) + t[o].x && (r = !r); + return r + }, + Pt = e => { + const t = []; + for (let o = 0; o < e.length; o++) { + let i = o + 1; + i === e.length && (i = 0), t.push(je(ue(e[o]), ue(e[i]))) + } + return t + }, + Et = (e, t = 0) => Pt(e).map((e => Ge(e, t))), + It = (e, t, o, i = 0, r = !1, n = !1, a = 12) => { + const s = []; + for (let i = 0; i < a; i++) s.push(ce(e.x + t * Math.cos(i * (2 * Math.PI) / a), e.y + o * Math.sin(i * (2 * Math.PI) / a))); + return (r || n) && Pe(s, r, n, e.x, e.y), i && Ee(s, i, e.x, e.y), s + }, + At = (e, t, o, i) => { + const r = ce(e.x - o.x, e.y - o.y), + n = ce(i.x - o.x, i.y - o.y), + a = Se(n, n); + let s = Se(r, n) / a; + s = s < 0 ? 0 : s, s = s > 1 ? 1 : s; + const l = ce(n.x * s + o.x - e.x, n.y * s + o.y - e.y); + return Se(l, l) <= t * t + }, + Lt = (e, t, o) => { + const i = o.length; + for (let r = 0; r < i - 1; r++) + if (At(e, t, o[r], o[r + 1])) return !0; + return !1 + }, + zt = (e, t, o) => !!Rt(e, o) || (!!Lt(e, t, o) || At(e, t, o[0], o[o.length - 1])), + Ft = (e, t, o, i, r) => zt(e, t, mt(o, i, r || rt(o))); +var Ot = (e, t) => { + const o = Ke(e), + i = rt(o), + r = mt(o, t, i); + return St(et(r)) + }, + Dt = (e, t) => e instanceof HTMLElement && (!t || new RegExp(`^${t}$`, "i").test(e.nodeName)), + Bt = e => e instanceof File, + Wt = async (e, t, o) => { + const i = await F(e, t, o); + return N(i, "canvas") + }, Vt = e => e.split("/").pop().split(/\?|\#/).shift(); +const _t = c() && !!Node.prototype.replaceChildren ? (e, t) => e.replaceChildren(t) : (e, t) => { + for (; e.lastChild;) e.removeChild(e.lastChild); + void 0 !== t && e.append(t) + }, + Nt = c() && p("div", { + class: "PinturaMeasure", + style: "position:absolute;left:0;top:0;width:99999px;height:0;pointer-events:none;contain:strict;margin:0;padding:0;" + }); +let Ht; +var jt = e => (_t(Nt, e), Nt.parentNode || document.body.append(Nt), clearTimeout(Ht), Ht = setTimeout((() => { + Nt.remove() +}), 500), e); +let Ut = null; +var Gt = () => (null === Ut && (Ut = c() && /^((?!chrome|android).)*(safari|iphone|ipad)/i.test(navigator.userAgent)), Ut), + Zt = e => new Promise(((t, o) => { + let i = !1; + !e.parentNode && Gt() && (i = !0, e.style.cssText = "position:absolute;visibility:hidden;pointer-events:none;left:0;top:0;width:0;height:0;", jt(e)); + const r = () => { + const o = e.naturalWidth, + r = e.naturalHeight; + o && r && (i && e.remove(), clearInterval(n), t({ + width: o, + height: r + })) + }; + e.onerror = e => { + clearInterval(n), o(e) + }; + const n = setInterval(r, 1); + r() + })), + Xt = e => new Promise(((t, o) => { + const i = () => { + t({ + width: e.videoWidth, + height: e.videoHeight + }) + }; + if (e.readyState >= 1) return i(); + e.onloadedmetadata = i, e.onerror = () => o(e.error) + })), + Yt = e => /^image/.test(e.type), + qt = e => new Promise((t => { + const o = T(e) ? e : URL.createObjectURL(e), + i = () => { + const e = new Image; + e.src = o, t(e) + }; + if (e instanceof Blob && Yt(e)) return i(); + const r = document.createElement("video"); + r.preload = "metadata", r.onloadedmetadata = () => t(r), r.onerror = i, r.src = o + })), + Kt = e => "VIDEO" === e.nodeName, + Jt = async e => { + let t, o; + t = e.src ? e : await qt(e); + try { + o = Kt(t) ? await Xt(t) : await Zt(t) + } finally { + Bt(e) && URL.revokeObjectURL(t.src) + } + return o + }; +var Qt = async e => { + const t = await Jt(e), + o = await (e => new Promise(((t, o) => { + if (e.complete) return t(e); + e.onload = () => t(e), e.onerror = () => o(new Error("Failed to load image")) + })))(e), + i = p("canvas", t); + i.getContext("2d", { + willReadFrequently: !0 + }).drawImage(o, 0, 0); + const r = await F(i); + return N(r, Vt(o.src)) +}, eo = (e = 0, t = !0) => new(i("ProgressEvent"))("progress", { + loaded: 100 * e, + total: 100, + lengthComputable: t +}), to = (e, t, o = (e => e)) => e.getAllResponseHeaders().indexOf(t) >= 0 ? o(e.getResponseHeader(t)) : void 0, oo = e => { + if (!e) return null; + const t = e.split(/filename=|filename\*=.+''/).splice(1).map((e => e.trim().replace(/^["']|[;"']{0,2}$/g, ""))).filter((e => e.length)); + return t.length ? decodeURI(t[t.length - 1]) : null +}; +const io = "URL_REQUEST"; +class ro extends Error { + constructor(e, t, o) { + super(e), this.name = "EditorError", this.code = t, this.metadata = o + } +} +var no = (e, t) => { + const { + headers: o = {}, + credentials: i + } = t || {}; + Object.entries(o).forEach((([t, o]) => e.setRequestHeader(t, o))), i && (e.withCredentials = "omit" !== i) + }, + ao = (e, t, o) => /^data:/.test(e) ? (async (e, t = "data-uri", o = r) => { + o(eo(0)); + const i = await fetch(e); + o(eo(.33)); + const n = await i.blob(); + let a; + Yt(n) || (a = "image/" + (e.includes(",/9j/") ? "jpeg" : "png")), o(eo(.66)); + const s = N(n, t, a); + return o(eo(1)), s + })(e, void 0, t) : ((e, t, o) => new Promise(((i, r) => { + const n = () => r(new ro("Error fetching image", io, a)), + a = new XMLHttpRequest; + a.onprogress = t, a.onerror = n, a.onload = () => { + if (!a.response || a.status >= 300 || a.status < 200) return n(); + const t = to(a, "Content-Type"), + o = to(a, "Content-Disposition", oo) || Vt(e); + i(N(a.response, o, t || _(o))) + }; + const { + willRequest: s + } = o; + Promise.resolve(s && s(e, { + resourceType: "image" + })).then((t => { + if (!1 === t) return r("Image load rejected"); + a.open("GET", e), no(a, t), a.responseType = "blob", a.send() + })).catch(console.error) + })))(e, t, o), + so = e => e instanceof Blob && !(e instanceof File), + lo = e => "close" in e, + co = async (e, t, o) => { + if (Bt(e) || so(e)) return e; + if (T(e)) return await ao(e, t, o); + if (Dt(e, "canvas")) return await Wt(e); + if (Dt(e, "img")) return await Qt(e); + if ($(e) || lo(e)) return await Wt(await v(e)); + throw new ro("Invalid image source", "invalid-image-source") + }; +let uo = null; +var ho = () => (null === uo && (uo = c() && /^mac/i.test(navigator.platform)), uo); +let po = null; +var mo = () => (null === po && (po = c() && (f(/iPhone|iPad|iPod/) || ho() && navigator.maxTouchPoints >= 1)), po), + go = async (e, t = 1) => await u() || mo() || t < 5 ? e : De(e.height, e.width), $o = e => /jpeg/.test(e.type), fo = e => { + return "object" != typeof(t = e) || t.constructor != Object ? e : JSON.stringify(e); + var t + }, yo = (e, t = 0, o) => (0 === t || (e.translate(o.x, o.y), e.rotate(t), e.translate(-o.x, -o.y)), e), bo = (e, t, o) => (e.scale(t, o), e), xo = async (e, t = {}) => { + const { + flipX: o, + flipY: i, + rotation: r, + crop: n + } = t, a = Le(e), s = o || i, l = !!r, c = n && (n.x || n.y || n.width || n.height), d = c && dt(n, Ke(a)), u = c && !d; + if (!s && !l && !u) return e; + let h, m = p("canvas", { + width: e.width, + height: e.height + }); + if (m.getContext("2d", { + willReadFrequently: !0 + }).putImageData(e, 0, 0), s) { + const e = p("canvas", { + width: m.width, + height: m.height + }).getContext("2d", { + willReadFrequently: !0 + }); + bo(e, o ? -1 : 1, i ? -1 : 1), e.drawImage(m, o ? -m.width : 0, i ? -m.height : 0), e.restore(), g(m), m = e.canvas + } + if (l) { + const e = He(ze(et(mt(Qe(m), r))), Math.floor), + t = p("canvas", { + width: n.width, + height: n.height + }).getContext("2d", { + willReadFrequently: !0 + }); + ((e, t, o) => { + e.translate(t, o) + })(t, -n.x, -n.y), yo(t, r, Ve(e)), t.drawImage(m, .5 * (e.width - m.width), .5 * (e.height - m.height)), t.restore(), g(m), m = t.canvas + } else if (u) { + return h = m.getContext("2d", { + willReadFrequently: !0 + }).getImageData(n.x, n.y, n.width, n.height), g(m), h + } + return h = m.getContext("2d", { + willReadFrequently: !0 + }).getImageData(0, 0, m.width, m.height), g(m), h + }, vo = (e, t) => { + const { + imageData: o, + width: i, + height: r + } = e, n = o.width, a = o.height, s = Math.round(i), l = Math.round(r), c = o.data, d = new Uint8ClampedArray(s * l * 4), u = n / s, h = a / l, p = Math.ceil(.5 * u), m = Math.ceil(.5 * h); + for (let e = 0; e < l; e++) + for (let t = 0; t < s; t++) { + const o = 4 * (t + e * s); + let i = 0, + r = 0, + a = 0, + l = 0, + g = 0, + $ = 0, + f = 0; + const y = (e + .5) * h; + for (let o = Math.floor(e * h); o < (e + 1) * h; o++) { + const e = Math.abs(y - (o + .5)) / m, + s = (t + .5) * u, + d = e * e; + for (let e = Math.floor(t * u); e < (t + 1) * u; e++) { + let t = Math.abs(s - (e + .5)) / p; + const u = Math.sqrt(d + t * t); + if (u < -1 || u > 1) continue; + if (i = 2 * u * u * u - 3 * u * u + 1, i <= 0) continue; + t = 4 * (e + o * n); + const h = c[t + 3]; + f += i * h, a += i, h < 255 && (i = i * h / 250), l += i * c[t], g += i * c[t + 1], $ += i * c[t + 2], r += i + } + } + d[o] = l / r, d[o + 1] = g / r, d[o + 2] = $ / r, d[o + 3] = f / a + } + t(null, { + data: d, + width: s, + height: l + }) + }, wo = e => { + if (e instanceof ImageData) return e; + let t; + try { + t = new ImageData(e.width, e.height) + } catch (o) { + t = p("canvas").getContext("2d").createImageData(e.width, e.height) + } + return t.data.set(e.data), t + }, So = async (e, t = {}, o) => { + const { + width: i, + height: r, + fit: n, + upscale: a + } = t; + if (!i && !r) return e; + let s = i, + l = r; + if (i ? r || (l = i) : s = r, "force" !== n) { + const t = s / e.width, + o = l / e.height; + let i = 1; + if ("cover" === n ? i = Math.max(t, o) : "contain" === n && (i = Math.min(t, o)), i > 1 && !1 === a) return e; + s = Math.round(e.width * i), l = Math.round(e.height * i) + } + return s = Math.max(s, 1), l = Math.max(l, 1), e.width === s && e.height === l ? e : o ? o(e, s, l) : (e = await L(vo, [{ + imageData: e, + width: s, + height: l + }], [e.data.buffer]), wo(e)) + }, ko = (e, t) => { + const { + imageData: o, + matrix: i + } = e; + if (!i) return t(null, o); + const r = new Uint8ClampedArray(o.width * o.height * 4), + n = o.data, + a = n.length, + s = i[0], + l = i[1], + c = i[2], + d = i[3], + u = i[4], + h = i[5], + p = i[6], + m = i[7], + g = i[8], + $ = i[9], + f = i[10], + y = i[11], + b = i[12], + x = i[13], + v = i[14], + w = i[15], + S = i[16], + k = i[17], + C = i[18], + T = i[19]; + let M = 0, + R = 0, + P = 0, + E = 0, + I = 0, + A = 0, + L = 0, + z = 0, + F = 0, + O = 0, + D = 0, + B = 0; + for (; M < a; M += 4) R = n[M] / 255, P = n[M + 1] / 255, E = n[M + 2] / 255, I = n[M + 3] / 255, A = R * s + P * l + E * c + I * d + u, L = R * h + P * p + E * m + I * g + $, z = R * f + P * y + E * b + I * x + v, F = R * w + P * S + E * k + I * C + T, O = Math.max(0, A * F) + (1 - F), D = Math.max(0, L * F) + (1 - F), B = Math.max(0, z * F) + (1 - F), r[M] = 255 * Math.max(0, Math.min(1, O)), r[M + 1] = 255 * Math.max(0, Math.min(1, D)), r[M + 2] = 255 * Math.max(0, Math.min(1, B)), r[M + 3] = 255 * I; + t(null, { + data: r, + width: o.width, + height: o.height + }) + }, Co = (e, t) => { + const { + imageData: o, + matrix: i + } = e; + if (!i) return t(null, o); + let r = i.reduce(((e, t) => e + t)); + r = r <= 0 ? 1 : r; + const n = o.width, + a = o.height, + s = o.data; + let l = 0, + c = 0, + d = 0; + const u = Math.round(Math.sqrt(i.length)), + h = Math.floor(u / 2); + let p = 0, + m = 0, + g = 0, + $ = 0, + f = 0, + y = 0, + b = 0, + x = 0, + v = 0, + w = 0; + const S = new Uint8ClampedArray(n * a * 4); + for (d = 0; d < a; d++) + for (c = 0; c < n; c++) { + for (p = 0, m = 0, g = 0, $ = 0, y = 0; y < u; y++) + for (f = 0; f < u; f++) b = d + y - h, x = c + f - h, b < 0 && (b = a - 1), b >= a && (b = 0), x < 0 && (x = n - 1), x >= n && (x = 0), v = 4 * (b * n + x), w = i[y * u + f], p += s[v] * w, m += s[v + 1] * w, g += s[v + 2] * w, $ += s[v + 3] * w; + S[l] = p / r, S[l + 1] = m / r, S[l + 2] = g / r, S[l + 3] = $ / r, l += 4 + } + t(null, { + data: S, + width: n, + height: a + }) + }, To = (e, t) => { + let { + imageData: o, + strength: i + } = e; + if (!i) return t(null, o); + const r = new Uint8ClampedArray(o.width * o.height * 4), + n = o.width, + a = o.height, + s = o.data, + l = (e, t) => (c = e - w, d = t - S, Math.sqrt(c * c + d * d)); + let c, d, u, h, p, m, g, $, f, y, b, x = 0, + v = 0, + w = .5 * n, + S = .5 * a, + k = l(0, 0); + for (i > 0 ? (u = 0, h = 0, p = 0) : (i = Math.abs(i), u = 1, h = 1, p = 1), v = 0; v < a; v++) + for (x = 0; x < n; x++) C = 4 * (x + v * n), T = s, M = r, R = l(x, v) * i / k, m = T[C] / 255, g = T[C + 1] / 255, $ = T[C + 2] / 255, f = T[C + 3] / 255, y = 1 - R, b = y * f + R, M[C] = (y * f * m + R * u) / b * 255, M[C + 1] = (y * f * g + R * h) / b * 255, M[C + 2] = (y * f * $ + R * p) / b * 255, M[C + 3] = 255 * b; + var C, T, M, R; + t(null, { + data: r, + width: o.width, + height: o.height + }) + }, Mo = (e, t) => { + const { + imageData: o, + level: i, + monochrome: r = !1 + } = e; + if (!i) return t(null, o); + const n = new Uint8ClampedArray(o.width * o.height * 4), + a = o.data, + s = a.length; + let l, c, d, u = 0; + const h = () => 255 * (2 * Math.random() - 1) * i, + p = r ? () => { + const e = h(); + return [e, e, e] + } : () => [h(), h(), h()]; + for (; u < s; u += 4)[l, c, d] = p(), n[u] = a[u] + l, n[u + 1] = a[u + 1] + c, n[u + 2] = a[u + 2] + d, n[u + 3] = a[u + 3]; + t(null, { + data: n, + width: o.width, + height: o.height + }) + }, Ro = (e, t) => { + const { + imageData: o, + level: i + } = e; + if (!i) return t(null, o); + const r = new Uint8ClampedArray(o.width * o.height * 4), + n = o.data, + a = n.length; + let s, l, c, d = 0; + for (; d < a; d += 4) s = n[d] / 255, l = n[d + 1] / 255, c = n[d + 2] / 255, r[d] = 255 * Math.pow(s, i), r[d + 1] = 255 * Math.pow(l, i), r[d + 2] = 255 * Math.pow(c, i), r[d + 3] = n[d + 3]; + t(null, { + data: r, + width: o.width, + height: o.height + }) + }, Po = async (e, t = {}) => { + const { + colorMatrix: o, + convolutionMatrix: i, + gamma: r, + noise: n, + vignette: a + } = t, s = []; + if (i && s.push([Co, { + matrix: i.clarity + }]), r > 0 && s.push([Ro, { + level: 1 / r + }]), o && !(e => { + const t = e.length; + let o; + const i = t >= 20 ? 6 : t >= 16 ? 5 : 3; + for (let r = 0; r < t; r++) { + if (o = e[r], 1 === o && r % i != 0) return !1; + if (0 !== o && 1 !== o) return !1 + } + return !0 + })(o) && s.push([ko, { + matrix: o + }]), (n > 0 || n < 0) && s.push([Mo, { + level: n + }]), (a > 0 || a < 0) && s.push([To, { + strength: a + }]), !s.length) return e; + const l = (e, t) => `(err, imageData) => {\n (${e[t][0].toString()})(Object.assign({ imageData: imageData }, filterInstructions[${t}]), \n ${e[t+1]?l(e,t+1):"done"})\n }`, + c = `function (options, done) {\n const filterInstructions = options.filterInstructions;\n const imageData = options.imageData;\n (${l(s,0)})(null, imageData)\n }`; + return e = await L(c, [{ + imageData: e, + filterInstructions: s.map((e => e[1])) + }], [e.data.buffer]), wo(e) + }, Eo = e => "number" == typeof e, Io = e => T(e) && null !== e.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g), Ao = (e, t) => e.hasOwnProperty(t), Lo = e => Array.isArray(e); +let zo = 64, + Fo = 102, + Oo = 112, + Do = !1; +var Bo = (e, t) => (!Do && c() && (/^win/i.test(navigator.platform) && (Fo = 103), (mo() || ho()) && (zo = 63.5, Fo = 110, Oo = 123), Do = !0), `${e}`), + Wo = e => e instanceof Blob, + Vo = (e, t) => e / t * 100 + "%", + _o = e => `rgba(${Math.round(255*e[0])}, ${Math.round(255*e[1])}, ${Math.round(255*e[2])}, ${Eo(e[3])?e[3]:1})`, + No = e => Object.values(e).join("_"); +const Ho = async (e, t = 0) => { + const o = p("canvas", { + width: 80, + height: 80 + }).getContext("2d"); + return await ((e = 0) => new Promise((t => { + setTimeout(t, e) + })))(t), o.drawImage(e, 0, 0, 80, 80), !((e => !new Uint32Array(e.getImageData(0, 0, e.canvas.width, e.canvas.height).data.buffer).some((e => 0 !== e)))(o) && t <= 256) || await Ho(e, t + 16) +}, jo = new Map; +var Uo = e => new Promise(((t, o) => { + const i = new FileReader; + i.onerror = () => o(i.error), i.onload = () => t(i.result), i.readAsDataURL(e) + })), + Go = () => { + let e = []; + return { + sub: (t, o) => (e.push({ + event: t, + callback: o + }), () => e = e.filter((e => e.event !== t || e.callback !== o))), + pub: (t, o) => { + e.filter((e => e.event === t)).forEach((e => e.callback(o))) + } + } + }; +let Zo = null; +var Xo = () => (null === Zo && (Zo = f(/Firefox/)), Zo); +const Yo = 32, + qo = ({ + color: e = [0, 0, 0], + fontSize: t = 16, + fontFamily: o = "sans-serif", + fontVariant: i = "normal", + fontWeight: r = "normal", + fontStyle: n = "normal", + textAlign: a = "left", + letterSpacing: s = "normal", + lineHeight: l = 20 + }, c = 1) => `font-size:${t*c}px;font-style:${n};font-weight:${r};font-family:${o};font-variant:${i};line-height:${l*c}px;text-align:${a};letter-spacing:${Eo(s)?s+"px":"normal"};color:${_o(e)};`, + Ko = (e, t, o = 1) => { + const { + width: i, + height: r, + disableNewline: n + } = t, a = !i, s = !1 === n ? ((e = "") => e.split("\n").length)(e) : void 0, l = a ? "normal" : "break-word", c = a && !s ? "nowrap" : "pre-line"; + return `max-width:none;min-width:auto;width:${a?"auto":i*o+"px"};height:${r?r*o+"px":"auto"};margin-top:0;margin-bottom:0;padding-top:${(({fontSize:e=16,lineHeight:t=20}={})=>.5*Math.max(0,e-t))(t)*o}px;word-break:${l};word-wrap:normal;white-space:${c};` + }, + Jo = new Map, + Qo = e => { + const t = []; + for (const o of Array.from(e.childNodes)) o.nodeType === Node.TEXT_NODE ? t.push(ti(o)) : t.push(...Qo(o)); + return t + }, + ei = "pointer-events:none;visibility:hidden;position:absolute;left:0;top:0;", + ti = e => { + const t = e.nodeValue; + if (!t) return []; + const o = t.length, + i = document.createRange(); + i.selectNodeContents(e); + const r = []; + for (let n = 0; n < o; n++) { + i.setStart(e, 0), i.setEnd(e, n + 1); + const o = i.getClientRects().length - 1, + a = t.charAt(n); + r[o] ? r[o] += a : r.push(a) + } + const n = i.getClientRects(); + return r.map(((e, t) => ({ + rect: n[t], + text: e + }))) + }, + oi = new Map, + ii = (e = "", t) => { + const { + width: o = 0, + height: i = 0 + } = t; + if (o && i) return De(o, i); + let { + fontSize: r = 16, + fontFamily: n, + lineHeight: a = 20, + fontWeight: s, + fontStyle: l, + fontVariant: c, + letterSpacing: d + } = t; + const u = No({ + text: e, + fontFamily: n, + fontWeight: s, + fontStyle: l, + fontVariant: c, + fontSize: r, + letterSpacing: d, + lineHeight: a, + width: o + }); + let h = oi.get(u); + if (h) return h; + let m = 1; + r > 1e3 && Xo() && (m = r / 1e3, r = 1e3, a /= m); + const g = jt(p("pre", { + contenteditable: "true", + spellcheck: "false", + style: `${ei}${qo({...t,fontSize:r,lineHeight:a})};${Ko(e,t)}"`, + innerHTML: e + })).getBoundingClientRect(); + return h = Le(g), h.height += Math.max(0, r - a), h = He(h, (e => e * m)), o && (h.width = o), oi.set(u, h), h + }, + ri = new Map, + ni = (e, t) => new Promise(((o, i) => { + let r = ri.get(e); + void 0 === r && (r = ((e, t) => { + const { + sub: o, + pub: i + } = Go(); + let r, n; + return Promise.resolve(t && t(e, { + resourceType: "stylesheet" + })).then((t => { + if (!1 === t) return n = "requestPrevented", i("error", n); + const { + headers: o, + credentials: a + } = t || {}; + fetch(e, { + headers: o, + credentials: a + }).then((e => e.text())).then((e => { + r = e, i("load", r) + })).catch((e => { + n = e, i("error", n) + })) + })), { + sub: (e, t) => "load" === e && r ? t(r) : "error" === e && n ? t(n) : void o(e, t) + } + })(e, t), ri.set(e, r)), r.sub("load", o), r.sub("error", i) + })), + ai = async (e, t) => { + let o; + try { + o = await ni(e, t) + } catch (e) { + return [] + } + const i = p("style", { + innerHTML: o, + id: I() + }); + document.head.append(i); + const r = Array.from(document.styleSheets).find((e => e.ownerNode.id === i.id)); + return i.remove(), Array.from(r.cssRules) + }, si = new Map, li = async (e, t) => { + if (si.has(e.href)) return si.get(e.href); + let o; + try { + o = Array.from(e.cssRules); + for (const e of (e => e.filter((e => e instanceof CSSImportRule)))(o)) { + const i = e.href; + if (si.has(i)) { + const e = si.get(i); + o = [...o, ...e]; + continue + } + const r = await ai(i, t); + si.set(i, r), o = [...o, ...r] + } + } catch (i) { + const r = e.href; + o = await ai(r, t), si.set(r, o) + } + return (e => e.filter((e => e instanceof CSSFontFaceRule)))(o) + }, ci = (e, t) => e.style.getPropertyValue(t), di = (e, t) => { + if (!e.style) return !1; + return ci(e, "font-family").replace(/^"|"$/g, "") == t + }, ui = async (e, t) => { + const o = ((e, t) => { + const o = []; + for (const i of e) di(i, t) && o.push(i); + return o + })(await (async e => { + const t = Array.from(document.styleSheets).map((t => li(t, e))), + o = await Promise.all(t), + i = []; + return o.forEach((e => i.push(...e))), i + })(t), e); + return o.length ? o.map((e => { + const t = e.parentStyleSheet.href && new URL(e.parentStyleSheet.href), + o = t ? t.origin + (e => e.pathname.split("/").slice(0, -1).join("/"))(t) + "/" : "", + i = e.style.getPropertyValue("src").match(/url\("?(.*?)"?\)/)[1], + r = Array.from(e.style).filter((e => "src" != e)).reduce(((t, o) => t += o + ":" + ci(e, o) + ";"), ""); + return [/^http/.test(i) ? i : o + i, r] + })) : [] + }, hi = new Map, pi = new Map; +var mi = async (e = "", t) => { + if (!e.length) return; + let { + color: o, + imageWidth: i = 300, + imageHeight: r = 150, + paddingTop: n = 0, + paddingRight: a = Yo, + paddingBottom: s = 0, + paddingLeft: l = Yo, + fontFamily: c, + fontSize: d, + pixelRatio: u = 1, + willRequest: h, + outline: p, + blur: m + } = t, g = 1, $ = ""; + d > 1e3 && Xo() && (g = d / 1e3, $ = `transform-origin:0 0;transform:scale(${g})`); + const f = u / g, + y = (i + l + a) * u, + b = (r + s + n) * u, + x = await (async (e, t) => { + if (hi.get(e)) return; + let o = pi.get(e); + if (!o) { + const r = await ui(e, t); + if (!r.length) return void hi.set(e, !0); + const n = []; + for (const [e, t] of r) { + const o = await fetch(e).then((e => e.blob())), + r = !(i = o.type) || /woff2/.test(i) ? "woff2" : /woff/.test(i) ? "woff" : /ttf|truetype/.test(i) ? "truetype" : /otf|opentype/.test(i) ? "opentype" : /svg/.test(i) ? "svg" : "woff2", + a = await Uo(o); + n.push(`@font-face { src:url(${a}) format('${r}');${t};font-display:block; }`) + } + o = n.join(""), pi.set(e, o) + } + var i; + return o + })(c, h); + const v = e.replace(/%/g, "%25").replace(/#/g, "%23").replace(/ /g, " ").replace(/&(?!#\d{4};|[a-z]+;)/gi, "&").replace(/
|\n/g, "
"), + w = `top:${n*f}px;right:${a*f}px;bottom:${s*f}px;left:${l*f}px`; + let S = o, + k = "", + C = ""; + if (p || m) { + const e = _o(o); + p && (S = [0, 0, 0, 0], k = `-webkit-text-stroke: ${2*p*f}px ${e}`), m && (Gt() ? C = `filter:blur(${m*f*.4}px)` : (S = [0, 0, 0, 0], C = `text-shadow: 0 0 ${m*f}px ${e}`)) + } + return ((e, { + safariCacheKey: t = "*" + } = {}) => new Promise(((o, i) => { + const r = new Image; + r.onerror = () => i(new Error("Failed to load SVG")), r.onload = () => { + if (!Gt() || !e.includes("@font-face") || jo.has(t)) return o(r); + Ho(r).then((() => { + jo.set(t, !0), o(r) + })) + }, r.src = "data:image/svg+xml," + e + })))(`
${x?``:""}
${v}
`, { + safariCacheKey: c + }) +}; +const gi = e => { + const t = { + ...e + }; + return C(t) + }, + $i = (e, t = {}) => { + const o = ut(e); + let i, r; + const n = t.width || t.rx, + a = t.height || t.ry; + if (n && a) return Ae(t); + if (n || a) { + i = parseFloat(n || Number.MAX_SAFE_INTEGER), r = parseFloat(a || Number.MAX_SAFE_INTEGER); + const e = Math.min(i, r); + T(n) || T(a) ? (i = e + "%", r = e * o + "%") : (i = e, r = e) + } else { + const e = 10; + i = e + "%", r = e * o + "%" + } + return { + [(t.width ? "width" : t.rx ? "rx" : void 0) || "width"]: i, + [(t.width ? "height" : t.rx ? "ry" : void 0) || "height"]: r + } + }, + fi = (e, t = {}) => { + return { + width: void 0, + height: void 0, + ...t, + aspectRatio: 1, + backgroundImage: (o = Bo(e), "data:image/svg+xml," + o.replace("<", "%3C").replace(">", "%3E")) + }; + var o + }, + yi = (e, t = {}) => ({ + backgroundColor: [0, 0, 0, 0], + ...Ti(t) ? {} : { + width: void 0, + height: void 0, + aspectRatio: void 0 + }, + ...t, + backgroundImage: T(e) ? e : Wo(e) ? URL.createObjectURL(e) : e + }), + bi = (e, t) => { + let o; + if (T(e) || Wo(e)) { + const i = { + ...$i(t), + backgroundSize: "contain" + }; + o = Io(e) ? fi(e, i) : yi(e, i) + } else if (e.src) { + const i = $i(t, e.shape || e), + r = { + ...e.shape, + ...i + }; + if (e.width && e.height && !Ao(r, "aspectRatio")) { + const e = pr(i, "width", t), + o = pr(i, "height", t); + r.aspectRatio = H(e, o) + } + r.backgroundSize || e.shape || e.width && e.height || (r.backgroundSize = "contain"), o = Io(e.src) ? fi(e.src, r) : yi(e.src, r) + } else e.shape && (o = gi(e.shape)); + return Ao(o, "backgroundImage") && (Ao(o, "backgroundColor") || (o.backgroundColor = [0, 0, 0, 0]), Ao(o, "disableStyle") || (o.disableStyle = ["cornerRadius", "backgroundColor", "strokeColor", "strokeWidth"])), t ? ur(o, t) : o + }, + xi = e => ce(e.x1, e.y1), + vi = e => ce(e.x2, e.y2), + wi = e => Ao(e, "text"), + Si = e => wi(e) && !(Oi(e) || Ao(e, "width")), + ki = e => wi(e) && (Oi(e) || Ao(e, "width")), + Ci = e => !wi(e) && Di(e), + Ti = e => Ao(e, "rx"), + Mi = e => Ao(e, "x1"), + Ri = e => Ao(e, "points"), + Pi = e => wi(e) && e.isEditing, + Ei = e => !Ao(e, "opacity") || e.opacity > 0, + Ii = e => e.isSelected, + Ai = e => e.isEditing, + Li = e => e._isDraft, + zi = e => Ao(e, "width") && Ao(e, "height"), + Fi = e => { + const t = Ao(e, "right"), + o = Ao(e, "bottom"); + return t || o + }, + Oi = e => (Ao(e, "x") || Ao(e, "left")) && Ao(e, "right") || (Ao(e, "y") || Ao(e, "top")) && Ao(e, "bottom"), + Di = e => zi(e) || Oi(e), + Bi = e => (e._isDraft = !0, e), + Wi = e => (e._isDraft = !1, e), + Vi = (e, t) => !0 !== e.disableStyle && (!Lo(e.disableStyle) || !t || !e.disableStyle.includes(t)), + _i = e => !0 !== e.disableSelect, + Ni = e => !0 !== e.disableRemove, + Hi = e => !e.disableFlip && (!Li(e) && !Fi(e) && (e => Ao(e, "backgroundImage") || Ao(e, "text"))(e)), + ji = (e, t) => !!wi(e) && (!0 !== e.disableInput && (M(e.disableInput) ? e.disableInput(null != t ? t : e.text) : t || !0)), + Ui = (e, t) => !0 !== e.disableTextLayout && (!Lo(e.disableTextLayout) || !t || !e.disableTextLayout.includes(t)), + Gi = e => !0 !== e.disableManipulate && !Li(e) && !Fi(e), + Zi = e => Gi(e) && !0 !== e.disableMove, + Xi = e => (delete e.left, delete e.right, delete e.top, delete e.bottom, e), + Yi = e => (delete e.rotation, e), + qi = e => (e.strokeWidth = e.strokeWidth || 1, e.strokeColor = e.strokeColor || [0, 0, 0], e), + Ki = e => (e.backgroundColor = e.backgroundColor ? e.backgroundColor : e.strokeWidth || e.backgroundImage ? void 0 : [0, 0, 0], e), + Ji = e => { + let t = e.text; + t = t.replace(/&(#[0-9]+|[a-z]+);/gi, ((e, t) => `___${t}___`)), t = t.replace(/&/, "&"), e.text = t.replace(/___(#[0-9]+|[a-z]+)___/gi, ((e, t) => `&${t};`)) + }, + Qi = e => { + if (e.fontSize = e.fontSize || "4%", e.fontFamily = e.fontFamily || "sans-serif", e.fontWeight = e.fontWeight || "normal", e.fontStyle = e.fontStyle || "normal", e.fontVariant = e.fontVariant || "normal", e.lineHeight = e.lineHeight || "120%", e.color = e.color || [0, 0, 0], e.format = "html" === e.format ? "html" : "text", e.textShadow) { + const [t, o, i, r] = e.textShadow; + e.textShadowX = t, e.textShadowY = o, e.textShadowBlur = i, e.textShadowColor = r, delete e.textShadow + } + if (e.textOutline) { + const [t, o] = e.textOutline; + e.textOutlineWidth = t, e.textOutlineColor = o, delete e.textOutline + } + return "html" === e.format ? Ji(e) : (e => { + Ji(e); + let t = e.text; + t = t.replace(//g, "<"), e.text = t + })(e), Si(e) ? er(e) : tr(e) + }, + er = e => (!1 !== e.disableNewline && (delete e.textAlign, e.text = e.text.replace(/\n/g, " ")), Xi(e)), + tr = e => (e.textAlign = e.textAlign || "left", e), + or = e => ((e => { + T(e.id) || (e.id = I()), Ao(e, "rotation") || (e.rotation = 0), Ao(e, "opacity") || (e.opacity = 1), Ao(e, "disableErase") || (e.disableErase = !0) + })(e), wi(e) ? Qi(e) : Ci(e) ? (e => { + e.cornerRadius = e.cornerRadius || 0, e.strokeWidth = e.strokeWidth || 0, e.strokeColor = e.strokeColor || [0, 0, 0], Ki(e) + })(e) : Ri(e) ? (e => { + qi(e), Yi(e), Ao(e, "pathClose") || (e.disableResize = !0, Ao(e, "disableMove") || (e.disableMove = !0)), Xi(e) + })(e) : Mi(e) ? (e => { + qi(e), e.lineStart = e.lineStart || void 0, e.lineEnd = e.lineEnd || void 0, Yi(e), Xi(e) + })(e) : Ti(e) && (e => { + e.strokeWidth = e.strokeWidth || 0, e.strokeColor = e.strokeColor || [0, 0, 0], Ki(e) + })(e), e), + ir = e => wi(e) ? "text" : Ci(e) ? "rectangle" : Ri(e) ? "path" : Mi(e) ? "line" : Ti(e) ? "ellipse" : void 0, + rr = (e, t) => parseFloat(e) / 100 * t, + nr = new RegExp(/^x|left|right|^width|rx|fontSize|eraseRadius|feather|cornerRadius|strokeWidth|strokeDash/, "i"), + ar = new RegExp(/^y|top|bottom|^height|ry/, "i"), + sr = (e, t, { + width: o, + height: i + }) => { + if (Array.isArray(t)) return t.map((t => (S(t) && dr(t, { + width: o, + height: i + }), T(t) && (t = sr(e, t, { + width: o, + height: i + })), t))); + if ("string" != typeof t) return t; + if (!t.endsWith("%")) return t; + const r = parseFloat(t) / 100; + return nr.test(e) ? ne(o * r, 6) : ar.test(e) ? ne(i * r, 6) : t + }, + lr = sr, + cr = ["lineHeight", "textOutlineWidth", "textShadowX", "textShadowY", "textShadowBlur"], + dr = (e, t) => { + Object.entries(e).map((([o, i]) => { + e[o] = sr(o, i, t) + })), e.text && cr.filter((t => T(e[t]))).forEach((t => { + var o, i; + e[t] = (o = e[t], i = e.fontSize, Math.round(i * (parseFloat(o) / 100))) + })) + }, + ur = (e, t) => (dr(e, t), yr(e, t), e), + hr = (e, t) => { + let o; + return /^x|width|rx|fontSize|strokeWidth|cornerRadius/.test(e) ? o = t.width : /^y|height|ry/.test(e) && (o = t.height), o + }, + pr = (e, t, o) => Array.isArray(e[t]) ? e[t].map((e => Object.entries(e).reduce(((e, [t, i]) => (e[t] = T(i) ? rr(i, hr(t, o)) : i, e)), {}))) : T(e[t]) ? rr(e[t], hr(t, o)) : e[t], + mr = (e, t, o) => t.reduce(((t, i) => { + const r = pr(e, i, o); + return t[i] = r, t + }), {}), + gr = (e, t, o) => (Object.keys(t).forEach((i => ((e, t, o, i) => { + if (!T(e[t])) return e[t] = o, e; + const r = hr(t, i); + return e[t] = void 0 === r ? o : Vo(o, r), e + })(e, i, t[i], o))), e), + $r = (e, t) => { + const o = e.filter((e => e.x < 0 || e.y < 0 || e.x1 < 0 || e.y1 < 0)).reduce(((e, t) => { + const [o, i, r, n] = (e => { + const t = qe(), + o = e.strokeWidth || 0; + if (Ci(e)) t.x = e.x - .5 * o, t.y = e.y - .5 * o, t.width = e.width + o, t.height = e.height + o; + else if (Mi(e)) { + const { + x1: i, + y1: r, + x2: n, + y2: a + } = e, s = Math.abs(Math.min(i, n)), l = Math.abs(Math.max(i, n)), c = Math.abs(Math.min(r, a)), d = Math.abs(Math.min(r, a)); + t.x = s + .5 * o, t.y = l + .5 * o, t.width = l - s + o, t.height = d - c + o + } else Ti(e) && (t.x = e.x - e.rx + .5 * o, t.y = e.y - e.ry + .5 * o, t.width = 2 * e.rx + o, t.height = 2 * e.ry + o); + return t && Ao(e, "rotation") && mt(t, e.rotation), bt(t) + })(t); + return e.top = Math.min(o, e.top), e.left = Math.min(n, e.left), e.bottom = Math.max(r, e.bottom), e.right = Math.max(i, e.right), e + }), { + top: 0, + right: 0, + bottom: 0, + left: 0 + }); + return o.right > 0 && (o.right -= t.width), o.bottom > 0 && (o.bottom -= t.height), o + }, + fr = (e, t, o) => { + const i = gi(e); + ur(i, t); + const r = o(i); + return Array.isArray(r) ? r : [r] + }, + yr = (e, t) => { + if (Ao(e, "left") && (e.x = e.left), Ao(e, "right") && !T(e.right)) { + const o = t.width - e.right; + Ao(e, "left") ? (e.x = e.left, e.width = Math.max(0, o - e.left)) : Ao(e, "width") && (e.x = o - e.width) + } + if (Ao(e, "top") && (e.y = e.top), Ao(e, "bottom") && !T(e.bottom)) { + const o = t.height - e.bottom; + Ao(e, "top") ? (e.y = e.top, e.height = Math.max(0, o - e.top)) : Ao(e, "height") && (e.y = o - e.height) + } + return e + }, + br = (e, t) => (Ri(e) && e.points.filter((e => Eo(e.x))).forEach((e => { + e.x *= t, e.y *= t + })), Mi(e) && Eo(e.x1) && (e.x1 *= t, e.y1 *= t, e.x2 *= t, e.y2 *= t), Eo(e.x) && Eo(e.y) && (e.x *= t, e.y *= t), Eo(e.width) && Eo(e.height) && (e.width *= t, e.height *= t), Eo(e.rx) && Eo(e.ry) && (e.rx *= t, e.ry *= t), (e => Eo(e.strokeWidth) && e.strokeWidth > 0)(e) && (e.strokeWidth *= t), wi(e) && (e._scale = t, Eo(e.fontSize) && (e.fontSize *= t), Eo(e.lineHeight) && (e.lineHeight *= t), Eo(e.width) && !Eo(e.height) && (e.width *= t)), Ao(e, "cornerRadius") && Eo(e.cornerRadius) && (e.cornerRadius *= t), e), + xr = e => { + if (e.x1) return Te(ce(e.x1, e.y1), ce(e.x2, e.y2)) + }, + vr = e => { + if (Ci(e)) return ce(e.x + .5 * e.width, e.y + .5 * e.height); + if (Ti(e)) return ce(e.x, e.y); + if (e.text) { + if (ki(e)) { + const t = e.height || ii(e.text, e).height; + return ce(e.x + .5 * e.width, e.y + .5 * t) + } + const t = ii(e.text, e); + return ce(e.x + .5 * t.width, e.y + .5 * t.height) + } + return Ri(e) ? Re(e.points) : Mi(e) ? Re([xi(e), vi(e)]) : void 0 + }, + wr = (e, t) => { + let o = !1; + t.flipX && e.flipX ? o = !0 : !t.flipX && e.flipX ? o = !1 : t.flipX && !e.flipX && (o = !0); + let i = !1; + t.flipY && e.flipY ? i = !0 : !t.flipY && e.flipY ? i = !1 : t.flipY && !e.flipY && (i = !0); + let r = -t.rotation; + return !o && !i || o && i || (r = -r), { + flipX: o, + flipY: i, + rotation: r + } + }; +var Sr = e => /canvas/i.test(e.nodeName), + kr = (e, t) => new Promise(((o, i) => { + let r = e, + n = !1; + const a = () => { + n || (n = !0, M(t) && Promise.resolve().then((() => t(De(r.naturalWidth, r.naturalHeight))))) + }; + if (r.src || (r = new Image, T(e) && new URL(e, location.href).origin !== location.origin && (r.crossOrigin = "anonymous"), r.src = T(e) ? e : URL.createObjectURL(e)), r.complete) return a(), o(r); + M(t) && Zt(r).then(a).catch(i), r.onload = () => { + a(), o(r) + }, r.onerror = () => i(new Error("Failed to load image")) + })); +const Cr = new Map([]), + Tr = (e, t = {}) => new Promise(((o, i) => { + const { + onMetadata: n = r, + onLoad: a = o, + onError: s = i, + onComplete: l = r + } = t; + let c = Cr.get(e); + if (c || (c = { + loading: !1, + complete: !1, + error: !1, + image: void 0, + size: void 0, + bus: Go() + }, Cr.set(e, c)), c.bus.sub("meta", n), c.bus.sub("load", a), c.bus.sub("error", s), c.bus.sub("complete", l), Sr(e)) { + const t = e, + o = t.cloneNode(); + c.complete = !0, c.image = o, c.size = Oe(t) + } + if (c.complete) return c.bus.pub("meta", { + size: c.size + }), c.error ? c.bus.pub("error", c.error) : c.bus.pub("load", c.image), c.bus.pub("complete"), void(c.bus = Go()); + c.loading || (c.loading = !0, kr(e, (e => { + c.size = e, c.bus.pub("meta", { + size: e + }) + })).then((e => { + c.image = e, c.bus.pub("load", e) + })).catch((e => { + c.error = e, c.bus.pub("error", e) + })).finally((() => { + c.complete = !0, c.loading = !1, c.bus.pub("complete"), c.bus = Go() + }))) + })), + Mr = (e, t, o, i) => e.drawImage(t, o.x, o.x, o.width, o.height, i.x, i.y, i.width, i.height); +var Rr = async (e, t, o, i, r = Mr, n) => { + e.save(), e.clip(), await r(e, t, o, i, n), e.restore() +}; +const Pr = (e, t, o, i, r) => { + const n = Ye(e); + if (i) { + const e = vt(et(i), ne); + return e.x *= o.width, e.width *= o.width, e.y *= o.height, e.height *= o.height, { + srcRect: e, + destRect: n + } + } + const a = it(0, 0, o.width, o.height); + if ("contain" === t) { + const t = yt(e, ut(a)); + n.width = t.width, n.height = t.height, r ? (n.x += r.x, n.y += r.y) : (n.x += t.x, n.y += t.y) + } else if ("cover" === t) { + const e = ft(n, a.width / a.height); + n.width = e.width, n.height = e.height, r ? (n.x += r.x, n.y += r.y) : (n.x += e.x, n.y += e.y) + } else t ? (n.width = t.width, n.height = t.height, r && (n.x += r.x, n.y += r.y)) : r && (n.width = o.width, n.height = o.height, n.x += r.x, n.y += r.y); + return { + srcRect: a, + destRect: n + } + }, + Er = (e, t) => (t.cornerRadius > 0 ? ((e, t, o, i, r, n) => { + i < 2 * n && (n = i / 2), r < 2 * n && (n = r / 2), e.beginPath(), e.moveTo(t + n, o), e.arcTo(t + i, o, t + i, o + r, n), e.arcTo(t + i, o + r, t, o + r, n), e.arcTo(t, o + r, t, o, n), e.arcTo(t, o, t + i, o, n), e.closePath() + })(e, t.x, t.y, t.width, t.height, t.cornerRadius) : e.rect(t.x, t.y, t.width, t.height), e), + Ir = (e, t) => (t.backgroundColor && e.fill(), e), + Ar = (e, t) => (t.strokeWidth && e.stroke(), e); +var Lr = async (e, t, o = {}) => { + const { + drawImage: i + } = o; + if (e.lineWidth = t.strokeWidth ? t.strokeWidth : 1, e.strokeStyle = t.strokeColor ? _o(t.strokeColor) : "none", e.fillStyle = t.backgroundColor ? _o(t.backgroundColor) : "none", e.globalAlpha = t.opacity, t.backgroundImage) { + let o; + if (o = Sr(t.backgroundImage) ? t.backgroundImage : await Tr(t.backgroundImage), Er(e, t), Ir(e, t), "repeat" === t.backgroundRepeat) { + const r = t.backgroundPosition || { + x: 0, + y: 0 + }, + { + srcRect: n, + destRect: a + } = Pr(t, t.backgroundSize || Oe(o), Oe(o), t.backgroundCorners, { + x: 0, + y: 0 + }), + s = document.createElement("canvas"); + s.width = a.width, s.height = a.height; + const l = s.getContext("2d", { + willReadFrequently: !1, + desynchronized: !0 + }); + await i(l, o, n, { + ...a, + x: 0, + y: 0 + }); + const c = e.createPattern(s, "repeat"); + e.fillStyle = c, e.save(), e.beginPath(), e.rect(t.x + r.x, t.y + r.y, t.width - r.x, t.height - r.y), e.clip(), e.translate(a.x + r.x, a.y + r.y), e.fill(), g(s), e.restore() + } else { + const { + srcRect: r, + destRect: n + } = Pr(t, t.backgroundSize, Oe(o), t.backgroundCorners, t.backgroundPosition); + await Rr(e, o, r, n, i, { + feather: t.feather + }) + } + return e.beginPath(), Er(e, t), Ar(e, t), [] + } + return Er(e, t), Ir(e, t), Ar(e, t), [] +}, zr = async (e, t, o = {}) => new Promise((async (i, r) => { + const { + drawImage: n + } = o; + if (e.lineWidth = t.strokeWidth || 1, e.strokeStyle = t.strokeColor ? _o(t.strokeColor) : "none", e.fillStyle = t.backgroundColor ? _o(t.backgroundColor) : "none", e.globalAlpha = t.opacity, e.ellipse(t.x, t.y, t.rx, t.ry, 0, 0, 2 * Math.PI), t.backgroundColor && e.fill(), t.backgroundImage) { + let o; + try { + o = await Tr(t.backgroundImage) + } catch (e) { + r(e) + } + const a = it(t.x - t.rx, t.y - t.ry, 2 * t.rx, 2 * t.ry), + { + srcRect: s, + destRect: l + } = Pr(a, t.backgroundSize, Oe(o), t.backgroundCorners, t.backgroundPosition); + await Rr(e, o, s, l, n), t.strokeWidth && e.stroke(), i([]) + } else t.strokeWidth && e.stroke(), i([]) +})), Fr = async (e, t, o) => { + const i = t.width && t.height ? Le(t) : ii(t.text, t), + r = { + x: t.x, + y: t.y, + width: i.width, + height: i.height + }; + if (Lr(e, { + ...t, + ...r, + options: o + }), !t.text.length) return []; + const { + textOutlineWidth: n = 0, + textShadowX: a = 0, + textShadowY: s = 0, + textShadowBlur: l = 0, + textShadowColor: c, + outline: d, + blur: u, + ...h + } = t; + return t.height && (e.rect(r.x - n + Math.min(a, 0), r.y - n + Math.min(s, 0), r.width + n + n + Math.abs(a) + l, r.height + n + Math.abs(s) + l), e.save(), e.clip()), (a || s || l) && (e.save(), e.translate(a, s), await Or(e, r, t, { + ...o, + paddingLeft: Yo + l, + paddingRight: Yo + l, + paddingTop: l, + paddingBottom: l, + shapeExtendedProps: { + color: c, + blur: l + } + }), e.restore()), n && await Or(e, r, t, { + ...o, + paddingLeft: Yo + n, + paddingRight: Yo + n, + paddingTop: n, + paddingBottom: n, + shapeExtendedProps: { + color: t.textOutlineColor, + outline: n + } + }), t.height && e.restore(), await Or(e, r, h, { + ...o, + paddingLeft: Yo, + paddingRight: Yo, + paddingTop: 0, + paddingBottom: 0 + }), [] +}; +const Or = async (e, t, o, i) => { + const { + willRequest: r, + shapeExtendedProps: n, + paddingLeft: a, + paddingRight: s, + paddingTop: l, + paddingBottom: c + } = i, d = await mi(o.text, { + ...o, + ...n, + ...t, + paddingLeft: a, + paddingRight: s, + paddingTop: l, + paddingBottom: c, + imageWidth: t.width, + imageHeight: t.height, + willRequest: r + }); + e.drawImage(d, o.x - a, o.y - l, d.width, d.height) +}; +var Dr = async (e, t) => new Promise((async o => { + e.lineWidth = t.strokeWidth || 1, e.strokeStyle = t.strokeColor ? _o(t.strokeColor) : "none", e.globalAlpha = t.opacity; + let i = xi(t), + r = vi(t); + e.moveTo(i.x, i.y), e.lineTo(r.x, r.y), t.strokeWidth && e.stroke(), o([]) +})), Br = async (e, t) => new Promise(((o, i) => { + if (t.bitmap && 1 === t.points.length) return void zr(e, { + x: t.points[0].x, + y: t.points[0].y, + rx: .5 * t.strokeWidth, + ry: .5 * t.strokeWidth, + backgroundColor: t.strokeColor + }).then((() => o([]))); + e.lineWidth = t.strokeWidth || 1, e.strokeStyle = t.strokeColor ? _o(t.strokeColor) : "none", e.fillStyle = t.backgroundColor ? _o(t.backgroundColor) : "none", e.globalAlpha = t.opacity; + const { + points: r + } = t; + e.lineCap = t.strokeCap, e.lineJoin = t.strokeJoin, e.setLineDash(t.strokeDash || []), t.pathClose && e.beginPath(), e.moveTo(r[0].x, r[0].y); + const n = r.length; + for (let t = 1; t < n; t++) e.lineTo(r[t].x, r[t].y); + t.pathClose && e.closePath(), t.strokeWidth && e.stroke(), t.backgroundColor && e.fill(), o([]) +})), Wr = (e, t, o, i) => t || o ? (e.translate(i.x, i.y), e.scale(t ? -1 : 1, o ? -1 : 1), e.translate(-i.x, -i.y), e) : e; +const Vr = async (e, t, o) => { + e.globalCompositeOperation = "subtract" === t.drawMode ? "destination-out" : "source-over"; + const i = vr(t); + let r; + if (yo(e, t.rotation, i), Wr(e, t.flipX, t.flipY, i), Ci(t) ? r = Lr : Ti(t) ? r = zr : Mi(t) ? r = Dr : Ri(t) ? r = Br : wi(t) && (r = Fr), r) { + const i = await r(e, t, o); + if (!i.length) return []; + return [t, ...await _r(e, i, o)] + } + return [] +}; +var _r = async (e, t, o) => { + let i = []; + for (const r of t) e.save(), e.beginPath(), i = [...i, ...await Vr(e, r, o)], e.restore(); + return i +}, Nr = async (e, t = {}) => { + const { + shapes: o = [], + contextBounds: i = e, + transform: n = r, + drawImage: a, + willRequest: s, + canvasMemoryLimit: l, + computeShape: c = j, + preprocessShape: d = j + } = t; + if (!o.length) return e; + const u = p("canvas"); + u.width = i.width, u.height = i.height; + const h = u.getContext("2d", { + willReadFrequently: !0 + }); + h.putImageData(e, i.x || 0, i.y || 0); + const m = o.map(gi).map(c).map(d).flat(); + n(h), await _r(h, m, { + drawImage: a, + canvasMemoryLimit: l, + willRequest: s + }); + const $ = h.getImageData(0, 0, u.width, u.height); + return g(u), $ +}, Hr = async (e, t = {}) => { + const { + backgroundColor: o, + backgroundImage: i + } = t, r = !(!o || o && 0 === o[3]); + if (!i && !r) return e; + const n = p("canvas"); + n.width = e.width, n.height = e.height; + const a = n.getContext("2d", { + willReadFrequently: !0 + }); + if (a.putImageData(e, 0, 0), a.globalCompositeOperation = "destination-over", r && (a.fillStyle = _o(o), a.fillRect(0, 0, n.width, n.height)), i) { + let t; + t = Sr(i) ? i : await Tr(i); + const { + srcRect: o, + destRect: r + } = Pr({ + x: 0, + y: 0, + width: e.width, + height: e.height + }, "cover", { + width: t.width, + height: t.height + }); + a.drawImage(t, o.x, o.y, o.width, o.height, r.x, r.y, r.width, r.height) + } + const s = a.getImageData(0, 0, n.width, n.height); + return g(n), s +}, jr = e => e.length ? e.reduce(((e, t) => ((e, t) => { + const o = new Array(20); + return o[0] = e[0] * t[0] + e[1] * t[5] + e[2] * t[10] + e[3] * t[15], o[1] = e[0] * t[1] + e[1] * t[6] + e[2] * t[11] + e[3] * t[16], o[2] = e[0] * t[2] + e[1] * t[7] + e[2] * t[12] + e[3] * t[17], o[3] = e[0] * t[3] + e[1] * t[8] + e[2] * t[13] + e[3] * t[18], o[4] = e[0] * t[4] + e[1] * t[9] + e[2] * t[14] + e[3] * t[19] + e[4], o[5] = e[5] * t[0] + e[6] * t[5] + e[7] * t[10] + e[8] * t[15], o[6] = e[5] * t[1] + e[6] * t[6] + e[7] * t[11] + e[8] * t[16], o[7] = e[5] * t[2] + e[6] * t[7] + e[7] * t[12] + e[8] * t[17], o[8] = e[5] * t[3] + e[6] * t[8] + e[7] * t[13] + e[8] * t[18], o[9] = e[5] * t[4] + e[6] * t[9] + e[7] * t[14] + e[8] * t[19] + e[9], o[10] = e[10] * t[0] + e[11] * t[5] + e[12] * t[10] + e[13] * t[15], o[11] = e[10] * t[1] + e[11] * t[6] + e[12] * t[11] + e[13] * t[16], o[12] = e[10] * t[2] + e[11] * t[7] + e[12] * t[12] + e[13] * t[17], o[13] = e[10] * t[3] + e[11] * t[8] + e[12] * t[13] + e[13] * t[18], o[14] = e[10] * t[4] + e[11] * t[9] + e[12] * t[14] + e[13] * t[19] + e[14], o[15] = e[15] * t[0] + e[16] * t[5] + e[17] * t[10] + e[18] * t[15], o[16] = e[15] * t[1] + e[16] * t[6] + e[17] * t[11] + e[18] * t[16], o[17] = e[15] * t[2] + e[16] * t[7] + e[17] * t[12] + e[18] * t[17], o[18] = e[15] * t[3] + e[16] * t[8] + e[17] * t[13] + e[18] * t[18], o[19] = e[15] * t[4] + e[16] * t[9] + e[17] * t[14] + e[18] * t[19] + e[19], o +})([...e], t)), e.shift()) : [], Ur = (e, t) => { + const o = e.width * e.height, + i = t.reduce(((e, t) => (t.width > e.width && t.height > e.height && (e.width = t.width, e.height = t.height), e)), { + width: 0, + height: 0 + }), + r = i.width * i.height; + return ((e, t = 2) => Math.round(e * t) / t)(Math.max(.5, .5 + (1 - r / o) / 2), 5) +}; + +function Gr() {} +const Zr = e => e; + +function Xr(e, t) { + for (const o in t) e[o] = t[o]; + return e +} + +function Yr(e) { + return e() +} + +function qr() { + return Object.create(null) +} + +function Kr(e) { + e.forEach(Yr) +} + +function Jr(e) { + return "function" == typeof e +} + +function Qr(e, t) { + return e != e ? t == t : e !== t || e && "object" == typeof e || "function" == typeof e +} + +function en(e, ...t) { + if (null == e) return Gr; + const o = e.subscribe(...t); + return o.unsubscribe ? () => o.unsubscribe() : o +} + +function tn(e) { + let t; + return en(e, (e => t = e))(), t +} + +function on(e, t, o) { + e.$$.on_destroy.push(en(t, o)) +} + +function rn(e, t, o, i) { + if (e) { + const r = nn(e, t, o, i); + return e[0](r) + } +} + +function nn(e, t, o, i) { + return e[1] && i ? Xr(o.ctx.slice(), e[1](i(t))) : o.ctx +} + +function an(e, t, o, i) { + if (e[2] && i) { + const r = e[2](i(o)); + if (void 0 === t.dirty) return r; + if ("object" == typeof r) { + const e = [], + o = Math.max(t.dirty.length, r.length); + for (let i = 0; i < o; i += 1) e[i] = t.dirty[i] | r[i]; + return e + } + return t.dirty | r + } + return t.dirty +} + +function sn(e, t, o, i, r, n) { + if (r) { + const a = nn(t, o, i, n); + e.p(a, r) + } +} + +function ln(e) { + if (e.ctx.length > 32) { + const t = [], + o = e.ctx.length / 32; + for (let e = 0; e < o; e++) t[e] = -1; + return t + } + return -1 +} + +function cn(e) { + const t = {}; + for (const o in e) "$" !== o[0] && (t[o] = e[o]); + return t +} + +function dn(e, t) { + const o = {}; + t = new Set(t); + for (const i in e) t.has(i) || "$" === i[0] || (o[i] = e[i]); + return o +} + +function un(e, t, o) { + return e.set(o), t +} + +function hn(e) { + return e && Jr(e.destroy) ? e.destroy : Gr +} +const pn = "undefined" != typeof window; +let mn = pn ? () => window.performance.now() : () => Date.now(), + gn = pn ? e => requestAnimationFrame(e) : Gr; +const $n = new Set; + +function fn(e) { + $n.forEach((t => { + t.c(e) || ($n.delete(t), t.f()) + })), 0 !== $n.size && gn(fn) +} + +function yn(e) { + let t; + return 0 === $n.size && gn(fn), { + promise: new Promise((o => { + $n.add(t = { + c: e, + f: o + }) + })), + abort() { + $n.delete(t) + } + } +} + +function bn(e, t) { + e.appendChild(t) +} + +function xn(e) { + if (!e) return document; + const t = e.getRootNode ? e.getRootNode() : e.ownerDocument; + return t && t.host ? t : e.ownerDocument +} + +function vn(e) { + const t = kn("style"); + return function(e, t) { + bn(e.head || e, t), t.sheet + }(xn(e), t), t.sheet +} + +function wn(e, t, o) { + e.insertBefore(t, o || null) +} + +function Sn(e) { + e.parentNode.removeChild(e) +} + +function kn(e) { + return document.createElement(e) +} + +function Cn(e) { + return document.createElementNS("http://www.w3.org/2000/svg", e) +} + +function Tn(e) { + return document.createTextNode(e) +} + +function Mn() { + return Tn(" ") +} + +function Rn() { + return Tn("") +} + +function Pn(e, t, o, i) { + return e.addEventListener(t, o, i), () => e.removeEventListener(t, o, i) +} + +function En(e) { + return function(t) { + return t.preventDefault(), e.call(this, t) + } +} + +function In(e) { + return function(t) { + return t.stopPropagation(), e.call(this, t) + } +} + +function An(e, t, o) { + null == o ? e.removeAttribute(t) : e.getAttribute(t) !== o && e.setAttribute(t, o) +} + +function Ln(e, t) { + const o = Object.getOwnPropertyDescriptors(e.__proto__); + for (const i in t) null == t[i] ? e.removeAttribute(i) : "style" === i ? e.style.cssText = t[i] : "__value" === i ? e.value = e[i] = t[i] : o[i] && o[i].set ? e[i] = t[i] : An(e, i, t[i]) +} + +function zn(e, t) { + Object.keys(t).forEach((o => { + ! function(e, t, o) { + t in e ? e[t] = "boolean" == typeof e[t] && "" === o || o : An(e, t, o) + }(e, o, t[o]) + })) +} + +function Fn(e, t) { + t = "" + t, e.wholeText !== t && (e.data = t) +} + +function On(e, t) { + e.value = null == t ? "" : t +} + +function Dn(e, t, { + bubbles: o = !1, + cancelable: i = !1 +} = {}) { + const r = document.createEvent("CustomEvent"); + return r.initCustomEvent(e, o, i, t), r +} +class Bn { + constructor(e = !1) { + this.is_svg = !1, this.is_svg = e, this.e = this.n = null + } + c(e) { + this.h(e) + } + m(e, t, o = null) { + this.e || (this.is_svg ? this.e = Cn(t.nodeName) : this.e = kn(t.nodeName), this.t = t, this.c(e)), this.i(o) + } + h(e) { + this.e.innerHTML = e, this.n = Array.from(this.e.childNodes) + } + i(e) { + for (let t = 0; t < this.n.length; t += 1) wn(this.t, this.n[t], e) + } + p(e) { + this.d(), this.h(e), this.i(this.a) + } + d() { + this.n.forEach(Sn) + } +} + +function Wn(e, t) { + return new e(t) +} +const Vn = new Map; +let _n, Nn = 0; + +function Hn(e, t, o, i, r, n, a, s = 0) { + const l = 16.666 / i; + let c = "{\n"; + for (let e = 0; e <= 1; e += l) { + const i = t + (o - t) * n(e); + c += 100 * e + `%{${a(i,1-i)}}\n` + } + const d = c + `100% {${a(o,1-o)}}\n}`, + u = `__svelte_${function(e){let t=5381,o=e.length;for(;o--;)t=(t<<5)-t^e.charCodeAt(o);return t>>>0}(d)}_${s}`, + h = xn(e), + { + stylesheet: p, + rules: m + } = Vn.get(h) || function(e, t) { + const o = { + stylesheet: vn(t), + rules: {} + }; + return Vn.set(e, o), o + }(h, e); + m[u] || (m[u] = !0, p.insertRule(`@keyframes ${u} ${d}`, p.cssRules.length)); + const g = e.style.animation || ""; + return e.style.animation = `${g?g+", ":""}${u} ${i}ms linear ${r}ms 1 both`, Nn += 1, u +} + +function jn(e, t) { + const o = (e.style.animation || "").split(", "), + i = o.filter(t ? e => e.indexOf(t) < 0 : e => -1 === e.indexOf("__svelte")), + r = o.length - i.length; + r && (e.style.animation = i.join(", "), Nn -= r, Nn || gn((() => { + Nn || (Vn.forEach((e => { + const { + ownerNode: t + } = e.stylesheet; + t && Sn(t) + })), Vn.clear()) + }))) +} + +function Un(e) { + _n = e +} + +function Gn() { + if (!_n) throw new Error("Function called outside component initialization"); + return _n +} + +function Zn(e) { + Gn().$$.on_mount.push(e) +} + +function Xn(e) { + Gn().$$.after_update.push(e) +} + +function Yn(e) { + Gn().$$.on_destroy.push(e) +} + +function qn() { + const e = Gn(); + return (t, o, { + cancelable: i = !1 + } = {}) => { + const r = e.$$.callbacks[t]; + if (r) { + const n = Dn(t, o, { + cancelable: i + }); + return r.slice().forEach((t => { + t.call(e, n) + })), !n.defaultPrevented + } + return !0 + } +} + +function Kn(e, t) { + return Gn().$$.context.set(e, t), t +} + +function Jn(e) { + return Gn().$$.context.get(e) +} + +function Qn(e, t) { + const o = e.$$.callbacks[t.type]; + o && o.slice().forEach((e => e.call(this, t))) +} +const ea = [], + ta = [], + oa = [], + ia = [], + ra = Promise.resolve(); +let na = !1; + +function aa() { + na || (na = !0, ra.then(pa)) +} + +function sa() { + return aa(), ra +} + +function la(e) { + oa.push(e) +} + +function ca(e) { + ia.push(e) +} +const da = new Set; +let ua, ha = 0; + +function pa() { + const e = _n; + do { + for (; ha < ea.length;) { + const e = ea[ha]; + ha++, Un(e), ma(e.$$) + } + for (Un(null), ea.length = 0, ha = 0; ta.length;) ta.pop()(); + for (let e = 0; e < oa.length; e += 1) { + const t = oa[e]; + da.has(t) || (da.add(t), t()) + } + oa.length = 0 + } while (ea.length); + for (; ia.length;) ia.pop()(); + na = !1, da.clear(), Un(e) +} + +function ma(e) { + if (null !== e.fragment) { + e.update(), Kr(e.before_update); + const t = e.dirty; + e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(la) + } +} + +function ga(e, t, o) { + e.dispatchEvent(Dn(`${t?"intro":"outro"}${o}`)) +} +const $a = new Set; +let fa; + +function ya() { + fa = { + r: 0, + c: [], + p: fa + } +} + +function ba() { + fa.r || Kr(fa.c), fa = fa.p +} + +function xa(e, t) { + e && e.i && ($a.delete(e), e.i(t)) +} + +function va(e, t, o, i) { + if (e && e.o) { + if ($a.has(e)) return; + $a.add(e), fa.c.push((() => { + $a.delete(e), i && (o && e.d(1), i()) + })), e.o(t) + } else i && i() +} +const wa = { + duration: 0 +}; + +function Sa(e, t, o, i) { + let r = t(e, o), + n = i ? 0 : 1, + a = null, + s = null, + l = null; + + function c() { + l && jn(e, l) + } + + function d(e, t) { + const o = e.b - n; + return t *= Math.abs(o), { + a: n, + b: e.b, + d: o, + duration: t, + start: e.start, + end: e.start + t, + group: e.group + } + } + + function u(t) { + const { + delay: o = 0, + duration: i = 300, + easing: u = Zr, + tick: h = Gr, + css: p + } = r || wa, m = { + start: mn() + o, + b: t + }; + t || (m.group = fa, fa.r += 1), a || s ? s = m : (p && (c(), l = Hn(e, n, t, i, o, u, p)), t && h(0, 1), a = d(m, i), la((() => ga(e, t, "start"))), yn((t => { + if (s && t > s.start && (a = d(s, i), s = null, ga(e, a.b, "start"), p && (c(), l = Hn(e, n, a.b, a.duration, 0, u, r.css))), a) + if (t >= a.end) h(n = a.b, 1 - n), ga(e, a.b, "end"), s || (a.b ? c() : --a.group.r || Kr(a.group.c)), a = null; + else if (t >= a.start) { + const e = t - a.start; + n = a.a + a.d * u(e / a.duration), h(n, 1 - n) + } + return !(!a && !s) + }))) + } + return { + run(e) { + Jr(r) ? (ua || (ua = Promise.resolve(), ua.then((() => { + ua = null + }))), ua).then((() => { + r = r(), u(e) + })) : u(e) + }, + end() { + c(), a = s = null + } + } +} +const ka = "undefined" != typeof window ? window : "undefined" != typeof globalThis ? globalThis : global; + +function Ca(e, t) { + e.d(1), t.delete(e.key) +} + +function Ta(e, t) { + va(e, 1, 1, (() => { + t.delete(e.key) + })) +} + +function Ma(e, t, o, i, r, n, a, s, l, c, d, u) { + let h = e.length, + p = n.length, + m = h; + const g = {}; + for (; m--;) g[e[m].key] = m; + const $ = [], + f = new Map, + y = new Map; + for (m = p; m--;) { + const e = u(r, n, m), + s = o(e); + let l = a.get(s); + l ? i && l.p(e, t) : (l = c(s, e), l.c()), f.set(s, $[m] = l), s in g && y.set(s, Math.abs(m - g[s])) + } + const b = new Set, + x = new Set; + + function v(e) { + xa(e, 1), e.m(s, d), a.set(e.key, e), d = e.first, p-- + } + for (; h && p;) { + const t = $[p - 1], + o = e[h - 1], + i = t.key, + r = o.key; + t === o ? (d = t.first, h--, p--) : f.has(r) ? !a.has(i) || b.has(i) ? v(t) : x.has(r) ? h-- : y.get(i) > y.get(r) ? (x.add(i), v(t)) : (b.add(r), h--) : (l(o, a), h--) + } + for (; h--;) { + const t = e[h]; + f.has(t.key) || l(t, a) + } + for (; p;) v($[p - 1]); + return $ +} + +function Ra(e, t) { + const o = {}, + i = {}, + r = { + $$scope: 1 + }; + let n = e.length; + for (; n--;) { + const a = e[n], + s = t[n]; + if (s) { + for (const e in a) e in s || (i[e] = 1); + for (const e in s) r[e] || (o[e] = s[e], r[e] = 1); + e[n] = s + } else + for (const e in a) r[e] = 1 + } + for (const e in i) e in o || (o[e] = void 0); + return o +} + +function Pa(e) { + return "object" == typeof e && null !== e ? e : {} +} + +function Ea(e, t, o) { + const i = e.$$.props[t]; + void 0 !== i && (e.$$.bound[i] = o, o(e.$$.ctx[i])) +} + +function Ia(e) { + e && e.c() +} + +function Aa(e, t, o, i) { + const { + fragment: r, + after_update: n + } = e.$$; + r && r.m(t, o), i || la((() => { + const t = e.$$.on_mount.map(Yr).filter(Jr); + e.$$.on_destroy ? e.$$.on_destroy.push(...t) : Kr(t), e.$$.on_mount = [] + })), n.forEach(la) +} + +function La(e, t) { + const o = e.$$; + null !== o.fragment && (Kr(o.on_destroy), o.fragment && o.fragment.d(t), o.on_destroy = o.fragment = null, o.ctx = []) +} + +function za(e, t, o, i, r, n, a, s = [-1]) { + const l = _n; + Un(e); + const c = e.$$ = { + fragment: null, + ctx: [], + props: n, + update: Gr, + not_equal: r, + bound: qr(), + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(t.context || (l ? l.$$.context : [])), + callbacks: qr(), + dirty: s, + skip_bound: !1, + root: t.target || l.$$.root + }; + a && a(c.root); + let d = !1; + if (c.ctx = o ? o(e, t.props || {}, ((t, o, ...i) => { + const n = i.length ? i[0] : o; + return c.ctx && r(c.ctx[t], c.ctx[t] = n) && (!c.skip_bound && c.bound[t] && c.bound[t](n), d && function(e, t) { + -1 === e.$$.dirty[0] && (ea.push(e), aa(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31 + }(e, t)), o + })) : [], c.update(), d = !0, Kr(c.before_update), c.fragment = !!i && i(c.ctx), t.target) { + if (t.hydrate) { + const e = function(e) { + return Array.from(e.childNodes) + }(t.target); + c.fragment && c.fragment.l(e), e.forEach(Sn) + } else c.fragment && c.fragment.c(); + t.intro && xa(e.$$.fragment), Aa(e, t.target, t.anchor, t.customElement), pa() + } + Un(l) +} +class Fa { + $destroy() { + La(this, 1), this.$destroy = Gr + } + $on(e, t) { + if (!Jr(t)) return Gr; + const o = this.$$.callbacks[e] || (this.$$.callbacks[e] = []); + return o.push(t), () => { + const e = o.indexOf(t); - 1 !== e && o.splice(e, 1) + } + } + $set(e) { + var t; + this.$$set && (t = e, 0 !== Object.keys(t).length) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1) + } +} +const Oa = []; + +function Da(e, t) { + return { + subscribe: Ba(e, t).subscribe + } +} + +function Ba(e, t = Gr) { + let o; + const i = new Set; + + function r(t) { + if (Qr(e, t) && (e = t, o)) { + const t = !Oa.length; + for (const t of i) t[1](), Oa.push(t, e); + if (t) { + for (let e = 0; e < Oa.length; e += 2) Oa[e][0](Oa[e + 1]); + Oa.length = 0 + } + } + } + return { + set: r, + update: function(t) { + r(t(e)) + }, + subscribe: function(n, a = Gr) { + const s = [n, a]; + return i.add(s), 1 === i.size && (o = t(r) || Gr), n(e), () => { + i.delete(s), 0 === i.size && (o(), o = null) + } + } + } +} + +function Wa(e, t, o) { + const i = !Array.isArray(e), + r = i ? [e] : e, + n = t.length < 2; + return Da(o, (e => { + let o = !1; + const a = []; + let s = 0, + l = Gr; + const c = () => { + if (s) return; + l(); + const o = t(i ? a[0] : a, e); + n ? e(o) : l = Jr(o) ? o : Gr + }, + d = r.map(((e, t) => en(e, (e => { + a[t] = e, s &= ~(1 << t), o && c() + }), (() => { + s |= 1 << t + })))); + return o = !0, c(), + function() { + Kr(d), l() + } + })) +} +var Va = e => e.reduce(((e, t) => Object.assign(e, t)), {}); +const _a = e => ({ + updateValue: e + }), + Na = e => ({ + defaultValue: e + }), + Ha = e => ({ + store: e + }), + ja = e => ({ + store: (t, o) => Wa(...e(o)) + }), + Ua = e => ({ + store: (t, o) => { + const [i, r, n = (() => !1)] = e(o); + let a, s = !0; + return Wa(i, ((e, t) => { + r(e, (e => { + !s && n(a, e) || (a = e, s = !1, t(e)) + })) + })) + } + }), + Ga = e => ({ + store: (t, o) => { + const [i, r = {}, n] = e(o); + let a = []; + const s = {}, + l = e => i(e, s), + c = e => { + (a.length || e.length) && (a = e, d()) + }, + d = () => { + const e = a.map(l); + n && e.sort(n), a = [...e], h(e) + }; + Object.entries(r).map((([e, t]) => t.subscribe((t => { + s[e] = t, t && d() + })))); + const { + subscribe: u, + set: h + } = Ba(t || []); + return { + set: c, + update: e => c(e(a)), + subscribe: u + } + } + }); +var Za = e => { + const t = {}, + o = {}; + return e.forEach((([e, ...i]) => { + const n = Va(i), + a = t[e] = ((e, t, o) => { + const { + store: i = (e => Ba(e)), + defaultValue: n = r, + updateValue: a + } = o, s = i(n(), t, e), { + subscribe: l, + update: c = r + } = s; + let d; + const u = e => { + let t = !0; + d && d(), d = l((o => { + if (t) return t = !1; + e(o), d(), d = void 0 + })) + }, + h = a ? a(e) : j; + return s.set = e => c((t => h(e, t, u))), s.defaultValue = n, s + })(o, t, n), + s = { + get: () => tn(a), + set: a.set + }; + Object.defineProperty(o, e, s) + })), { + stores: t, + accessors: o + } +}; +var Xa = [ + ["src", Ha((() => { + let e; + const { + subscribe: t, + set: o + } = Ba(), i = t => { + e !== t && (e = t, o(e)) + }; + return { + set: i, + subscribe: t, + update: t => i(t(e)) + } + }))], + ["imageReader"], + ["imageWriter"], + ["imageScrambler"], + ["imageRedactionRendering", Na((() => "pixelated"))], + ["images", Na((() => []))], + ["shapePreprocessor"], + ["willRequestResource"], + ["willRequest"] + ], + Ya = e => e.charAt(0).toUpperCase() + e.slice(1), + qa = (e, t) => { + Object.keys(t).forEach((o => { + const i = M(t[o]) ? { + value: t[o], + writable: !1 + } : t[o]; + Object.defineProperty(e, o, i) + })) + }; +const Ka = (e, t) => { + let o, i, r, n, a, s, l, c, d, u; + const h = t.length; + for (o = 0; o < h; o++) + if (i = t[o], r = t[o + 1 > h - 1 ? 0 : o + 1], n = i.x - e.x, a = i.y - e.y, s = r.x - e.x, l = r.y - e.y, c = n - s, d = a - l, u = c * a - d * n, u < -1e-5) return !1; + return !0 +}; +var Ja = (e, t) => { + const o = Pt(t), + i = le(); + xt(e).forEach((e => { + be(e, i), Ka(e, t) || o.forEach((t => { + const o = Math.atan2(t.start.y - t.end.y, t.start.x - t.end.x), + r = 1e4 * Math.sin(Math.PI - o), + n = 1e4 * Math.cos(Math.PI - o), + a = ce(e.x + r, e.y + n), + s = Ge(Ue(t), 1e4), + l = Ct(je(e, a), s); + l && be(i, xe(ue(l), e)) + })) + })); + const r = Ye(e); + be(r, i); + return !!xt(r).every((e => Ka(e, t))) && (pt(e, r), !0) + }, + Qa = (e, t) => { + const o = xt(e), + i = Et(t, 5), + r = rt(e), + n = []; + o.forEach((e => { + const t = ((e, t) => { + if (0 === t) return e; + const o = ce(e.start.x - e.end.x, e.start.y - e.end.y), + i = ge(o), + r = we(i, t); + return e.end.x += r.x, e.end.y += r.y, e + })(je(ue(r), ue(e)), 1e6); + let o = !1; + i.map(Ue).forEach((e => { + const i = Ct(t, e); + i && !o && (n.push(i), o = !0) + })) + })); + const a = Te(n[0], n[2]) < Te(n[1], n[3]) ? [n[0], n[2]] : [n[1], n[3]], + s = et(a); + return s.width < e.width && (pt(e, s), !0) + }, + es = (e, t, o = { + x: 0, + y: 0 + }) => { + const i = Ke(e), + r = rt(i), + n = wt(i, o, r).map((e => pe(e, t, r))), + a = et(n); + return n.map((e => xe(e, a))) + }, + ts = (e, t = 0, o = ut(e)) => { + let i, r; + if (0 !== t) { + const n = Math.atan2(1, o), + a = Math.sign(t) * t, + s = a % Math.PI, + l = a % G; + let c; + c = s > Z && s < G + Z ? l > Z ? a : G - l : l > Z ? G - l : a; + const d = Math.min(Math.abs(e.height / Math.sin(n + c)), Math.abs(e.width / Math.cos(n - c))); + i = Math.cos(n) * d, r = i / o + } else i = e.width, r = i / o, r > e.height && (r = e.height, i = r * o); + return De(i, r) + }, + os = (e, t, o, i, r, n, a, s) => { + const l = Ae(a), + c = Ae(s), + d = ne(Math.max(t.width / c.width, t.height / c.height)), + u = ne(Math.min(t.width / l.width, t.height / l.height)), + h = Ye(t); + if (u < 1 || d > 1) { + const o = rt(e), + i = rt(t), + r = u < 1 ? u : d, + n = (i.x + o.x) / 2, + a = (i.y + o.y) / 2, + s = h.width / r, + l = h.height / r; + ht(h, n - .5 * s, a - .5 * l, s, l) + } + return n ? (((e, t, o = 0, i = le(), r) => { + if (Eo(o) && 0 !== o || i.x || i.y) { + const r = ut(e), + n = es(t, o, i), + a = ts(t, o, r); + if (!(e.width < a.width && e.height < a.height)) { + const t = .5 * e.width - .5 * a.width, + o = .5 * e.height - .5 * a.height; + e.width > a.width && (e.width = a.width, e.x += t), e.height > a.height && (e.height = a.height, e.y += o) + } + Ja(e, n), Qa(e, n) && Ja(e, n) + } else { + const o = ut(e); + e.width = Math.min(e.width, t.width), e.height = Math.min(e.height, t.height), e.x = Math.max(e.x, 0), e.x + e.width > t.width && (e.x -= e.x + e.width - t.width), e.y = Math.max(e.y, 0), e.y + e.height > t.height && (e.y -= e.y + e.height - t.height); + const i = rt(e), + n = yt(e, o); + n.width = Math.max(r.width, n.width), n.height = Math.max(r.height, n.height), n.x = i.x - .5 * n.width, n.y = i.y - .5 * n.height, pt(e, n) + } + })(h, o, i, r, l), { + crop: h + }) : { + crop: h + } + }, + is = (e, t, o) => { + const i = Ke(e), + r = rt(i), + n = mt(i, o, r), + a = rt(St(et(n))), + s = rt(t), + l = pe(s, -o, a), + c = xe(l, a), + d = ye(be(r, c), ne); + return it(d.x - .5 * t.width, d.y - .5 * t.height, t.width, t.height) + }, + rs = (e, t, o) => Math.max(t, Math.min(e, o)); +const ns = ["cropLimitToImage", "cropMinSize", "cropMaxSize", "cropAspectRatio", "flipX", "flipY", "rotation", "crop", "colorMatrix", "convolutionMatrix", "gamma", "vignette", "manipulation", "redaction", "annotation", "decoration", "selection", "frame", "backgroundColor", "backgroundImage", "targetSize", "metadata", "trim", "volume", "minDuration", "maxDuration"], + as = e => Lo(e) ? e.map(as) : so(e) || Bt(e) ? e : S(e) ? { + ...e + } : e, + ss = e => e.map((e => Object.entries(e).reduce(((e, [t, o]) => (t.startsWith("_") || (e[t] = o), e)), {}))); +const ls = (e, t) => e === t; +var cs = (e, t, o = ls) => { + if (e.length !== t.length) return !1; + for (let i = 0; i < e.length; i++) + if (!o(e[i], t[i])) return !1; + return !0 +}; +const ds = (e, t, o) => { + const i = ye(rt(e), (e => ne(e, 8))), + r = Ke(t), + n = rt(r), + a = mt(r, o, n), + s = ye(Ve(et(a)), (e => ne(e, 8))), + l = Math.abs(s.x - i.x), + c = Math.abs(s.y - i.y); + return l < 1 && c < 1 + }, + us = (e, t, o, i, r) => { + if (!r) return [-1 / 0, 1 / 0]; + const n = Math.max(o.width / i.width, o.height / i.height), + a = De(i.width * n, i.height * n), + s = (l = a, Math.sqrt(l.width * l.width + l.height * l.height)); + var l; + if (s < Math.min(e.width, e.height)) return [-1 / 0, 1 / 0]; + const c = t ? e.height : e.width, + d = t ? e.width : e.height, + u = Math.acos(a.height / s), + h = u - Math.acos(d / s), + p = Math.asin(c / s) - u; + if (Number.isNaN(h) && Number.isNaN(p)) return [-1 / 0, 1 / 0]; + const m = Number.isNaN(h) ? p : Number.isNaN(p) ? h : Math.min(h, p); + return [-m, m] + }, + hs = (e, t) => { + const { + context: o, + props: i + } = t; + return e._isFormatted || ((e = or(e))._isFormatted = !0, Object.assign(e, i)), e._isDraft || !Oi(e) || e._context && dt(o, e._context) || (yr(e, o), e._context = { + ...o + }), e + }, + ps = (e, t) => (e._isFormatted || (e.disableMove = !0, e.disableSelect = !0, e.disableResize = !0, e.disableRotate = !0), hs(e, t)); +var ms = [ + ["file"], + ["size"], + ["loadState"], + ["processState"], + ["aspectRatio", ja((({ + size: e + }) => [e, e => e ? ut(e) : void 0]))], + ["perspectiveX", Na((() => 0))], + ["perspectiveY", Na((() => 0))], + ["perspective", ja((({ + perspectiveX: e, + perspectiveY: t + }) => [ + [e, t], ([e, t]) => ({ + x: e, + y: t + }) + ]))], + ["rotation", Na((() => 0)), _a((e => (t, o, i) => { + if (t === o) return t; + const { + loadState: r, + size: n, + rotationRange: a, + cropMinSize: s, + cropMaxSize: l, + crop: c, + perspective: d, + cropLimitToImage: u, + cropOrigin: h + } = e; + if (!c || !r || !r.beforeComplete) return t; + const p = u && ((e, t, o) => { + const i = ts(t, o, ut(e)); + return Be(He(i, Math.round), He(Ae(e), Math.round)) + })(c, n, o), + m = u && ds(c, n, o), + g = ((e, t, o, i, r, n, a, s, l, c) => { + const d = Ae(l), + u = Ae(c); + a && (u.width = Math.min(c.width, r.width), u.height = Math.min(c.height, r.height)); + let h = !1; + const p = (t, o) => { + const l = is(r, i, t), + c = Ke(r), + m = rt(c), + g = wt(c, n, m), + $ = xe(ue(m), kt(g)), + f = pe(rt(l), o, m), + y = xe(ue(m), f); + g.forEach((e => pe(e, o, m))); + const b = et(g), + x = kt(g), + v = be(xe(xe(x, y), b), $), + w = it(v.x - .5 * l.width, v.y - .5 * l.height, l.width, l.height); + if (s && at(w, s.width / w.width), a) { + const e = es(r, o, n); + Qa(w, e) + } + const S = ne(Math.min(w.width / d.width, w.height / d.height), 8), + k = ne(Math.max(w.width / u.width, w.height / u.height), 8); + return (S < 1 || k > 1) && ne(Math.abs(o - t)) === ne(Math.PI / 2) && !h ? (h = !0, p(e, e + Math.sign(o - t) * Math.PI)) : { + rotation: o, + crop: vt(w, (e => ne(e, 8))) + } + }, + m = Math.sign(t) * Math.round(Math.abs(t) / G) * G, + g = rs(t, m + o[0], m + o[1]); + return p(e, g) + })(o, t, a, c, n, d, u, h, s, l); + if (p && m) { + const e = ts(n, t, ut(g.crop)); + g.crop.x += .5 * g.crop.width, g.crop.y += .5 * g.crop.height, g.crop.x -= .5 * e.width, g.crop.y -= .5 * e.height, g.crop.width = e.width, g.crop.height = e.height + } + return i((() => { + e.crop = vt(g.crop, (e => ne(e, 8))) + })), g.rotation + }))], + ["flipX", Na((() => !1))], + ["flipY", Na((() => !1))], + ["flip", ja((({ + flipX: e, + flipY: t + }) => [ + [e, t], ([e, t]) => ({ + x: e, + y: t + }) + ]))], + ["isRotatedSideways", Ua((({ + rotation: e + }) => [ + [e], ([e], t) => t(X(e)), (e, t) => e !== t + ]))], + ["crop", _a((e => (t, o = t) => { + const { + loadState: i, + size: r, + cropMinSize: n, + cropMaxSize: a, + cropLimitToImage: s, + cropAspectRatio: l, + rotation: c, + perspective: d + } = e; + if (!t && !o || !i || !i.beforeComplete) return t; + t || (t = Ke(ts(r, c, l || ut(r)))); + const u = os(o, t, r, c, d, s, n, a), + h = vt(u.crop, (e => ne(e, 8))); + return dt(o, h) ? o : h + }))], + ["cropAspectRatio", _a((e => (t, o) => { + const { + loadState: i, + crop: r, + size: n, + rotation: a, + cropLimitToImage: s + } = e, l = (e => { + if (e) { + if (/:/.test(e)) { + const [t, o] = e.split(":"); + return t / o + } + return parseFloat(e) + } + })(t); + if (!l) return; + if (!r || !i || !i.beforeComplete) return l; + const c = o ? Math.abs(t - o) : 1; + if (ds(r, n, a) && s && c >= .1) { + const o = ((e, t) => { + const o = e.width, + i = e.height; + return X(t) && (e.width = i, e.height = o), e + })(Ae(n), a); + e.crop = vt(yt(Ke(o), t), ne) + } else { + const t = { + width: r.height * l, + height: r.height + }, + o = .5 * (r.width - t.width), + i = .5 * (r.height - t.height); + e.crop = vt(it(r.x + o, r.y + i, t.width, t.height), ne) + } + return l + }))], + ["cropOrigin"], + ["cropMinSize", Na((() => ({ + width: 1, + height: 1 + })))], + ["cropMaxSize", Na((() => ({ + width: 32768, + height: 32768 + })))], + ["cropLimitToImage", Na((() => !0)), _a((e => (t, o, i) => { + const { + crop: r + } = e; + return r ? (!o && t && i((() => e.crop = Ye(e.crop))), t) : t + }))], + ["cropSize", Ua((({ + crop: e + }) => [ + [e], ([e], t) => { + e && t(De(e.width, e.height)) + }, (e, t) => Be(e, t) + ]))], + ["cropRectAspectRatio", ja((({ + cropSize: e + }) => [ + [e], ([e], t) => { + e && t(ne(ut(e), 5)) + } + ]))], + ["cropRange", Ua((({ + size: e, + rotation: t, + cropRectAspectRatio: o, + cropMinSize: i, + cropMaxSize: r, + cropLimitToImage: n + }) => [ + [e, t, o, i, r, n], ([e, t, o, i, r, n], a) => { + if (!e) return; + a(((e, t, o, i, r, n) => { + const a = Ae(i), + s = Ae(r); + return n ? [a, He(ts(e, t, o), Math.round)] : [a, s] + })(e, t, o, i, r, n)) + }, (e, t) => cs(e, t) + ]))], + ["rotationRange", Ua((({ + size: e, + isRotatedSideways: t, + cropMinSize: o, + cropSize: i, + cropLimitToImage: r + }) => [ + [e, t, o, i, r], ([e, t, o, i, r], n) => { + if (!e || !i) return; + n(us(e, t, o, i, r)) + }, (e, t) => cs(e, t) + ]))], + ["backgroundColor", _a((() => e => ((e = [0, 0, 0, 0], t = 1) => 4 === e.length ? e : [...e, t])(e)))], + ["backgroundImage"], + ["targetSize"], + ["colorMatrix"], + ["convolutionMatrix"], + ["gamma"], + ["noise"], + ["vignette"], + ["duration"], + ["minDuration", Na((() => 1 / 24))], + ["maxDuration", Na((() => 1 / 0))], + ["trim"], + ["volume", Na((() => 1))], + ["redaction", Ga((({ + size: e + }) => [hs, { + context: e + }]))], + ["manipulation", Ga((({ + size: e + }) => [hs, { + context: e + }]))], + ["annotation", Ga((({ + size: e + }) => [hs, { + context: e + }]))], + ["decoration", Ga((({ + crop: e + }) => [hs, { + context: e + }]))], + ["selection", Ga((({ + size: e + }) => [ps, { + context: e + }]))], + ["frame", _a((() => e => { + if (!e) return; + const t = { + frameStyle: void 0, + x: 0, + y: 0, + width: "100%", + height: "100%", + disableStyle: ["backgroundColor", "strokeColor", "strokeWidth"] + }; + return T(e) ? t.frameStyle = e : Object.assign(t, e), t + }))], + ["metadata"], + ["state", Ha(((e, t, o) => { + const i = ns.map((e => t[e])); + let r = !1; + const n = Ba({}), + { + subscribe: a + } = Wa([...i, n], ((e, t) => { + if (r) return; + const o = ns.reduce(((t, o, i) => (t[o] = as(e[i]), t)), {}); + o.crop && vt(o.crop, Math.round), o.manipulation = o.manipulation && ss(o.manipulation), o.redaction = o.redaction && ss(o.redaction), o.annotation = o.annotation && ss(o.annotation), o.decoration = o.decoration && ss(o.decoration), o.selection = o.selection && ss(o.selection), t(o) + })), + s = e => { + e && (r = !0, o.cropOrigin = void 0, ns.filter((t => Ao(e, t))).forEach((t => { + const i = e[t]; + o[t] = null === i ? void 0 : as(i) + })), r = !1, n.set({})) + }; + return { + set: s, + update: e => s(e(null)), + subscribe: a + } + }))] + ], + gs = async (e, t, o = {}, i) => { + const { + ontaskstart: n, + ontaskprogress: a, + ontaskend: s, + token: l + } = i; + let c = !1; + const d = { + cancel: r + }; + l.cancel = () => { + c = !0, d.cancel() + }; + for (const [i, r] of t.entries()) { + if (c) return; + const [t, l] = r; + n(i, l); + try { + e = await t(e, { + ...o, + taskCancelToken: d + }, (e => a(i, l, e))) + } catch (e) { + throw c = !0, e + } + s(i, l) + } + return e + }; +const $s = ["loadstart", "loadabort", "loaderror", "loadprogress", "load", "processstart", "processabort", "processerror", "processprogress", "process"], + fs = ["flip", "cropOrigin", "isRotatedSideways", "perspective", "perspectiveX", "perspectiveY", "cropRange"], + ys = ["images"], + bs = ms.map((([e]) => e)).filter((e => !fs.includes(e))), + xs = e => "image" + Ya(e), + vs = e => Ao(e, "crop"); +var ws = () => { + const { + stores: e, + accessors: t + } = Za(Xa), { + sub: o, + pub: i + } = Go(), n = () => t.images ? t.images[0] : {}; + let a = {}; + const s = {}; + bs.forEach((e => { + Object.defineProperty(t, xs(e), { + get: () => { + const t = n(); + if (t) return t.accessors[e] + }, + set: t => { + a[xs(e)] = t, s[xs(e)] = t; + const o = n(); + o && (o.accessors[e] = t) + } + }) + })); + const l = () => t.images && t.images[0], + c = e.src.subscribe((e => { + if (!e) return t.images = []; + t.imageReader && (t.images.length && (a = {}), u(e)) + })), + d = e.imageReader.subscribe((e => { + e && (t.images.length || t.src && u(t.src)) + })), + u = e => { + Promise.resolve().then((() => p(e, a))).catch((() => {})) + }; + let h; + const p = (e, o = {}) => new Promise(((n, c) => { + let d = l(); + const u = !(!1 === o.cropLimitToImage || !1 === o.imageCropLimitToImage || !1 === s.imageCropLmitedToImage), + p = o.cropMinSize || o.imageCropMinSize || s.imageCropMinSize, + m = u ? p : d && d.accessors.cropMinSize, + $ = o.minDuration || o.imageMinDuration; + d && g(), d = (({ + minSize: e = { + width: 1, + height: 1 + }, + minDuration: t = 0 + } = {}) => { + const { + stores: o, + accessors: i + } = Za(ms), { + pub: n, + sub: a + } = Go(), s = (e, t) => { + const o = () => i[e] || {}, + r = t => { + i[e] = { + ...o(), + ...t, + timeStamp: Date.now() + } + }, + a = () => o().error, + s = e => { + a() || (r({ + error: e + }), n(t + "error", { + ...o() + })) + }; + return { + start() { + n(t + "start") + }, + onabort() { + r({ + abort: !0 + }), n(t + "abort", { + ...o() + }) + }, + ontaskstart(e, i) { + a() || (r({ + index: e, + task: i, + taskProgress: void 0, + taskLengthComputable: void 0 + }), n(t + "taskstart", { + ...o() + })) + }, + ontaskprogress(e, i, s) { + a() || (r({ + index: e, + task: i, + taskProgress: s.loaded / s.total, + taskLengthComputable: s.lengthComputable + }), n(t + "taskprogress", { + ...o() + }), n(t + "progress", { + ...o() + })) + }, + ontaskend(e, i) { + a() || (r({ + index: e, + task: i + }), n(t + "taskend", { + ...o() + })) + }, + ontaskerror(e) { + s(e) + }, + error(e) { + s(e) + }, + beforeComplete(e) { + a() || (r({ + beforeComplete: !0 + }), n("before" + t, e)) + }, + complete(e) { + a() || (r({ + complete: !0 + }), n(t, e)) + } + } + }; + return qa(i, { + read: (o, { + reader: n + }, a = {}) => { + if (!n) return; + Object.assign(i, { + file: void 0, + size: void 0, + loadState: void 0 + }); + let l = { + cancel: r + }, + c = !1; + const d = s("loadState", "load"), + u = { + token: l, + ...d + }, + h = { + src: o, + size: void 0, + dest: void 0, + duration: void 0 + }; + return Promise.resolve().then((async () => { + try { + if (d.start(), c) return d.onabort(); + const o = await gs(h, n, a, u); + if (c) return d.onabort(); + const { + size: r, + duration: s, + dest: p + } = o || {}; + if (!r || !r.width || !r.height) throw new ro("Image size missing", "IMAGE_SIZE_MISSING", o); + if (s > 0 && s < t) throw new ro("Video too short", "VIDEO_TOO_SHORT", { + ...o, + minDuration: t + }); + if (r.width < e.width || r.height < e.height) throw new ro("Image too small", "IMAGE_TOO_SMALL", { + ...o, + minWidth: e.width, + minHeight: e.height + }); + Object.assign(i, { + file: p, + size: r, + duration: s + }), d.beforeComplete(o), d.complete(o) + } catch (e) { + d.error(e) + } finally { + l = void 0 + } + })), () => { + c = !0, l && l.cancel(), d.onabort() + } + }, + write: (e, t) => { + if (!i.loadState.complete) return; + i.processState = void 0; + const o = s("processState", "process"), + n = { + src: i.file, + imageState: i.state, + dest: void 0 + }; + if (M(e) && (e = e(i.file, i.state)), !e) return o.start(), void o.complete(n); + let a = { + cancel: r + }, + l = !1; + const c = t, + d = { + token: a, + ...o + }; + + return Promise.resolve().then((async () => { + try { + if (o.start(), l) return o.onabort(); + // e = e.filter((item) => { + // return item[1] !== "image-data-decorate" + // }) + // e = e.map((item) => { + + // if (item[1] === "read-exif-orientation-tag") return [ + // () => true, + // item[1] + // ] + // return item + // }) + + const t = await gs(n, e, c, d); + if (l) return o.onabort(); + + o.complete(t) + } catch (e) { + o.error(e) + } finally { + a = void 0 + } + })), () => { + l = !0, a && a.cancel() + } + }, + on: a + }), { + accessors: i, + stores: o + } + })({ + minSize: m, + minDuration: $ + }), $s.map((e => { + return d.accessors.on(e, (t = e, e => i(t, e))); + var t + })); + const f = () => { + a = {}, y.forEach((e => e())) + }, + y = []; + y.push(d.accessors.on("loaderror", (e => { + f(), c(e) + }))), y.push(d.accessors.on("loadabort", (() => { + f(), c({ + name: "AbortError" + }) + }))), y.push(d.accessors.on("load", (e => { + h = void 0, f(), n(e) + }))), y.push(d.accessors.on("beforeload", (() => ((e, o) => { + if (vs(o)) return void(t.imageState = o); + if (!o.imageCrop) { + const t = e.accessors.size, + i = o.imageRotation || 0, + r = _e(Ae(t), i), + n = Ke(r); + n.width = ne(Math.abs(n.width), 6), n.height = ne(Math.abs(n.height), 6); + const a = o.imageCropAspectRatio || (o.imageCropLimitToImage ? ut(t) : ut(n)); + let s; + o.imageCropLimitToImage ? s = yt(n, a) : (s = ft(n, a), s.x = (t.width - s.width) / 2, s.y = (t.height - s.height) / 2), o.imageCrop = s + } + if (e.accessors.duration && !o.imageTrim && o.imageMaxDuration) { + const { + duration: t + } = e.accessors; + o.imageTrim = [ + [0, Math.min(o.imageMaxDuration / t, 1)] + ] + } + const i = ["imageCropLimitToImage", "imageCrop", "imageCropAspectRatio", "imageRotation"]; + i.filter((e => Ao(o, e))).forEach((e => { + t[e] = o[e], delete o[e] + })); + const r = Object.keys(o).filter((e => !i.includes(e))).reduce(((e, t) => (e[t] = o[t], e)), {}); + Object.assign(t, r) + })(d, o)))), t.images = [d], o.imageReader && (t.imageReader = o.imageReader), o.imageWriter && (t.imageWriter = o.imageWriter), h = d.accessors.read(e, { + reader: t.imageReader + }, { + willRequest: t.willRequest + }) + })); + let m; + const g = () => { + const e = l(); + e && (h && h(), e.accessors.loadState = void 0, t.images = []) + }; + return Object.defineProperty(t, "stores", { + get: () => e + }), qa(t, { + on: o, + loadImage: p, + abortLoadImage: () => { + h && h(), t.images = [] + }, + editImage: (e, o) => new Promise(((i, r) => { + p(e, o).then((() => { + const { + images: e + } = t, o = e[0], n = () => { + a(), s() + }, a = o.accessors.on("processerror", (e => { + n(), r(e) + })), s = o.accessors.on("process", (e => { + n(), i(e) + })) + })).catch(r) + })), + removeImage: g, + processImage: (e, o) => new Promise(((i, r) => { + try { + const n = [], + a = () => { + m = void 0, n.forEach((e => e())) + }; + (async () => { + if ((e => T(e) || Wo(e) || Dt(e))(e)) try { + await p(e, o) + } catch (e) { + r(e) + } else e && (vs(e) ? t.imageState = e : Object.assign(t, e)); + const s = l(); + if (!s) return r("no image"); + n.push(s.accessors.on("processerror", (e => { + a(), r(e) + }))), n.push(s.accessors.on("processabort", (() => { + a(), r({ + name: "AbortError" + }) + }))), n.push(s.accessors.on("process", (e => { + a(), i(e) + }))), m = s.accessors.write(t.imageWriter, { + redactionRenderStyle: t.imageRedactionRendering, + shapePreprocessor: t.shapePreprocessor || j, + imageScrambler: t.imageScrambler, + willRequest: t.willRequest, + willRequestResource: t.willRequestResource + }) + })() + } catch (e) { + r(e) + } + })), + abortProcessImage: () => { + const e = l(); + e && (m && m(), e.accessors.processState = void 0) + }, + destroy: () => { + c && c(), d && d() + } + }), t +}; +const Ss = (e, t) => { + const { + processImage: o + } = ws(); + return o(e, t) +}; +var ks = () => Gt() ? mo() ? /15_|16_/.test(navigator.userAgent) ? 14745600 : 16777216 : /15_/.test(navigator.userAgent) ? 16777216 : 1 / 0 : 1 / 0, + Cs = (e, t) => Object.keys(e).filter((e => !t.includes(e))).reduce(((t, o) => (t[o] = e[o], t)), {}), + Ts = e => new Promise((t => { + if (e.duration === 1 / 0) return e.ontimeupdate = () => { + e.ontimeupdate = void 0, t(e) + }, void(e.currentTime = Number.MAX_SAFE_INTEGER); + t(e) + })); +const Ms = ({ + imageDataResizer: e, + canvasMemoryLimit: t +} = {}) => async (o, i, r, n, a) => { + r.width = Math.max(r.width, 1), r.height = Math.max(r.height, 1), n.width = Math.max(n.width, 1), n.height = Math.max(n.height, 1); + const { + dest: s + } = await Ss(i, { + imageReader: ol(), + imageWriter: rl({ + format: "canvas", + targetSize: { + ...n, + upscale: !0 + }, + imageDataResizer: e, + canvasMemoryLimit: t + }), + imageCrop: r + }), { + feather: l = 0 + } = a || {}; + if (l > 0) { + const e = p("canvas"); + e.width = s.width, e.height = s.height; + const t = e.getContext("2d", { + willReadFrequently: !0 + }), + o = 1 / l; + let i = 0; + for (i = 0; i < l; i++) { + const e = i * o; + t.strokeStyle = `rgba(0,0,0,${e*e})`, t.strokeRect(i + .5, i + .5, s.width - 2 * i - 1, s.height - 2 * i - 1) + } + t.fillStyle = "#000", t.fillRect(i, i, s.width + .5 - 2 * i, s.height + .5 - 2 * i); + const r = s.getContext("2d"); + r.globalCompositeOperation = "destination-in", r.drawImage(e, 0, 0), g(e) + } + o.drawImage(s, n.x, n.y, n.width, n.height), g(s) +}, Rs = (e, t = ((...e) => e), o) => async (i, r, n) => { + n(eo(0, !1)); + let a = !1; + const s = await e(...t(i, r, (e => { + a = !0, n(e) + }))); + return o && o(i, s), a || n(eo(1, !1)), i +}, Ps = ({ + willRequest: e, + srcProp: t = "src", + destProp: o = "dest" +} = {}) => [Rs(co, ((o, i, r) => [o[t], r, { + ...i, + willRequest: e +}]), ((e, t) => e[o] = t)), "any-to-file"], Es = ({ + srcProp: e = "dest", + destProp: t = "dest" +} = {}) => [Rs((async e => { + if (/octet-stream/.test(e.type)) { + console.warn(`Pintura: File has unknown mime type "${e.type}", make sure your server sets the correct Content-Type header.`); + let t = "image"; + const o = await qt(e); + /video/i.test(o.nodeName) && (t = "video"); + const i = { + type: t + "/unknown" + }; + return Bt(e) ? new File([e], e.name, { + ...i, + lastModified: e.lastModified + }) : new Blob([e], i) + } + return e +}), (t => [t[e]]), ((e, o) => e[t] = o)), "any-to-file"], Is = ({ + srcProp: e = "src", + destProp: t = "size" +} = {}) => [Rs(Jt, (t => [t[e]]), ((e, o) => e[t] = o)), "read-image-size"], As = async e => { + const t = await qt(e); + if (Kt(t)) return await (e => new Promise(((t, o) => { + const i = () => { + Ts(e).then((() => { + t(e.duration) + })) + }; + if (e.readyState >= 1) return i(); + e.onloadedmetadata = i, e.onerror = () => o(e.error) + })))(t) +}, Ls = ({ + srcProp: e = "src", + destProp: t = "duration" +} = {}) => [Rs(As, (t => [t[e]]), ((e, o) => e[t] = o)), "read-media-duration"], zs = ({ + srcSize: e = "size", + srcOrientation: t = "orientation", + destSize: o = "size" +} = {}) => [Rs(go, (o => [o[e], o[t]]), ((e, t) => e[o] = t)), "image-size-match-orientation"], Fs = ({ + srcProp: e = "src", + destProp: t = "head" +} = {}) => [Rs(((e, t) => $o(e) ? a(e, t) : void 0), (t => [t[e], + [0, 262144], onprogress +]), ((e, o) => e[t] = o)), "read-image-head"], Os = ({ + srcProp: e = "head", + destProp: t = "orientation" +} = {}) => [Rs(o, (t => [t[e], 274]), ((e, o = 1) => e[t] = o)), "read-exif-orientation-tag"], Ds = ({ + srcProp: e = "head" +} = {}) => [Rs(o, (t => [t[e], 274, 1])), "clear-exif-orientation-tag"], Bs = ({ + srcImageSize: e = "size", + srcCanvasSize: t = "imageData", + srcImageState: o = "imageState", + destImageSize: i = "size", + destScalar: r = "scalar" +} = {}) => [Rs(((e, t) => [Math.min(t.width / e.width, t.height / e.height), Le(t)]), (i => [i[e], i[t], i[o]]), ((e, [t, o]) => { + e[r] = t, e[i] = o +})), "calculate-canvas-scalar"], Ws = ({ + srcProp: e = "src", + destProp: t = "imageData", + canvasMemoryLimit: o +} = {}) => [Rs(z, (t => [t[e], o]), ((e, o) => e[t] = o)), "blob-to-image-data"], Vs = ({ + srcImageData: e = "imageData", + srcOrientation: t = "orientation" +} = {}) => [Rs(w, (o => [o[e], o[t]]), ((e, t) => e.imageData = t)), "image-data-match-orientation"], _s = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState" +} = {}) => [Rs(Hr, (o => [o[e], { + backgroundColor: o[t].backgroundColor, + backgroundImage: o[t].backgroundImage +}]), ((e, t) => e.imageData = t)), "image-data-fill"], Ns = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destScalar: o = "scalar" +} = {}) => [Rs(xo, (i => { + const r = i[o]; + let { + crop: n + } = i[t]; + return n && 1 !== r && (n = at(Ye(n), r, le())), [i[e], { + crop: n, + rotation: i[t].rotation, + flipX: i[t].flipX, + flipY: i[t].flipY + }] +}), ((e, t) => e.imageData = t)), "image-data-crop"], Hs = ({ + targetSize: e = { + width: void 0, + height: void 0, + fit: void 0, + upscale: void 0 + }, + imageDataResizer: t, + srcProp: o = "imageData", + srcImageState: i = "imageState", + destImageScaledSize: r = "imageScaledSize" +}) => [Rs(So, (r => { + const n = Math.min(e.width || Number.MAX_SAFE_INTEGER, r[i].targetSize && r[i].targetSize.width || Number.MAX_SAFE_INTEGER), + a = Math.min(e.height || Number.MAX_SAFE_INTEGER, r[i].targetSize && r[i].targetSize.height || Number.MAX_SAFE_INTEGER); + return [r[o], { + width: n, + height: a, + fit: e.fit || "contain", + upscale: (s = r[i], !!(s.targetSize && s.targetSize.width || s.targetSize && s.targetSize.height) || (e.upscale || !1)) + }, t]; + var s +}), ((e, t) => { + Be(e.imageData, t) || (e[r] = Le(t)), e.imageData = t +})), "image-data-resize"], js = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destImageData: o = "imageData" +} = {}) => [Rs(Po, (o => { + const { + colorMatrix: i + } = o[t], r = i && Object.keys(i).map((e => i[e])).filter(Boolean); + return [o[e], { + colorMatrix: r && jr(r), + convolutionMatrix: o[t].convolutionMatrix, + gamma: o[t].gamma, + noise: o[t].noise, + vignette: o[t].vignette + }] +}), ((e, t) => e[o] = t)), "image-data-filter"], Us = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destImageData: o = "imageData", + destScalar: i = "scalar" +} = {}) => [Rs((async (e, t, o, i, r, n) => { + if (!t || !i.length) return e; + let a; + try { + const r = { + dataSizeScalar: Ur(e, i) + }; + o && o[3] > 0 && (r.backgroundColor = [...o]), a = await t(e, r) + } catch (e) {} + const s = p("canvas"); + s.width = e.width, s.height = e.height; + const l = s.getContext("2d", { + willReadFrequently: !0 + }); + if (l.putImageData(e, 0, 0), "auto" === n) { + const t = Math.sqrt(e.width * e.height); + l.filter = `blur(${Math.round(t/100)}px)` + } + const c = new Path2D; + i.forEach((e => { + const t = it(e.x, e.y, e.width, e.height); + ct(t, r); + const o = mt(Ye(t), e.rotation), + i = new Path2D; + o.forEach(((e, t) => { + if (0 === t) return i.moveTo(e.x, e.y); + i.lineTo(e.x, e.y) + })), c.addPath(i) + })), l.clip(c, "nonzero"), l.imageSmoothingEnabled = !1, l.drawImage(a, 0, 0, s.width, s.height), g(a); + const d = l.getImageData(0, 0, s.width, s.height); + return g(s), d +}), ((o, { + imageScrambler: r, + redactionRenderStyle: n +}) => [o[e], r, o[t].backgroundColor, o[t].redaction, o[i], n]), ((e, t) => e[o] = t)), "image-data-redact"], Gs = ({ + srcImageData: e = "imageData", + srcSize: t = "size", + srcImageState: o = "imageState", + srcShapes: i = "annotation", + destImageData: r = "imageData", + destImageScaledSize: n = "imageScaledSize", + destScalar: a = "scalar", + imageDataResizer: s, + canvasMemoryLimit: l +} = {}) => [Rs(Nr, ((r, { + shapePreprocessor: c, + willRequestResource: d, + willRequest: u +}) => { + const h = r[o][i]; + if (!h.length) return [r[e]]; + const p = r[a], + { + crop: m + } = r[o], + g = r[t]; + let $ = p; + const f = r[n]; + f && ($ = Math.min(f.width / m.width, f.height / m.height)); + const y = { + width: g.width / p, + height: g.height / p + }; + return [r[e], { + shapes: h, + computeShape: e => (e = ur(e, y), e = Cs(e, ["left", "right", "top", "bottom"]), e = br(e, $)), + transform: e => { + const i = r[t], + { + rotation: s = 0, + flipX: l, + flipY: c, + cropLimitToImage: d + } = r[o], + u = r[a], + { + crop: h = Ke(i) + } = r[o], + p = r[n], + m = p ? Math.min(p.width / h.width, p.height / h.height) : 1, + g = { + width: i.width / u * m, + height: i.height / u * m + }, + $ = Ot(g, s), + f = $.width, + y = $.height, + b = .5 * g.width - .5 * f, + x = .5 * g.height - .5 * y, + v = Ve(g); + e.translate(-b, -x), e.translate(-h.x * m, -h.y * m), e.translate(v.x, v.y), e.rotate(s), e.translate(-v.x, -v.y), e.scale(l ? -1 : 1, c ? -1 : 1), e.translate(l ? -g.width : 0, c ? -g.height : 0), d && (e.rect(0, 0, g.width, g.height), e.clip()) + }, + drawImage: Ms({ + imageDataResizer: s, + canvasMemoryLimit: l + }), + preprocessShape: e => c(e, { + isPreview: !1, + ...r[o] + }), + canvasMemoryLimit: l, + willRequest: u || d + }] +}), ((e, t) => e[r] = t)), "image-data-annotate"], Zs = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destImageData: o = "imageData", + destImageScaledSize: i = "imageScaledSize", + imageDataResizer: r, + canvasMemoryLimit: n, + destScalar: a = "scalar" +} = {}) => [Rs(Nr, ((o, { + shapePreprocessor: s, + willRequestResource: l, + willRequest: c +}) => { + let { + decoration: d + } = o[t]; + if ("undefined" != typeof window && (e => { + if (e && e._clpdx4s) return; + const [i] = [ + [85, 110, 108, 105, 99, 101, 110, 115, 101, 100, 32, 80, 105, 110, 116, 117, 114, 97, 32, 105, 110, 115, 116, 97, 110, 99, 101, 32] + ].map((e => e.map((e => String.fromCharCode(e))).join(""))), { + width: r, + height: n + } = o[t].crop, a = n / 15; + d = [...d, { + x: .5 * -a, + y: .5 * -a, + width: 1.5 * r, + height: 1.25 * n, + text: Array(50).fill(i).join(""), + fontWeight: 900, + lineHeight: a, + fontSize: a, + color: [1, 1, 1, .05] + }] + })(window), !d.length) return [o[e]]; + let u = o[a]; + const { + crop: h + } = o[t], p = o[i]; + if (p) { + const e = Math.min(p.width / h.width, p.height / h.height); + u = e + } + return [o[e], { + shapes: d, + drawImage: Ms({ + imageDataResizer: r, + canvasMemoryLimit: n + }), + computeShape: e => (e = ur(e, h), e = Cs(e, ["left", "right", "top", "bottom"]), e = br(e, u)), + preprocessShape: e => s(e, { + isPreview: !1, + ...o[t] + }), + canvasMemoryLimit: n, + willRequest: c || l + }] + // Changed to return null for return image unlincesed text +}), (() => null)), "image-data-decorate"], Xs = ({ + srcImageData: e = "imageData", + srcImageState: t = "imageState", + destImageData: o = "imageData", + destImageScaledSize: i = "imageScaledSize", + imageDataResizer: r, + canvasMemoryLimit: n, + destScalar: a = "scalar" +} = {}) => [Rs(Nr, ((o, { + shapePreprocessor: s, + willRequestResource: l, + willRequest: c +}) => { + const d = o[t].frame; + if (!d) return [o[e]]; + const u = o[a]; + let { + crop: h + } = o[t]; + h && 1 !== u && (h = at(Ye(h), u, le())); + const p = { + ...h + }, + m = $r(fr(d, p, s), p); + p.x = Math.abs(m.left), p.y = Math.abs(m.top), p.width += Math.abs(m.left) + Math.abs(m.right), p.height += Math.abs(m.top) + Math.abs(m.bottom); + const g = o[i], + $ = g ? Math.min(g.width / h.width, g.height / h.height) : 1; + return ct(p, $), p.x = Math.floor(p.x), p.y = Math.floor(p.y), p.width = Math.floor(p.width), p.height = Math.floor(p.height), [o[e], { + shapes: [d], + contextBounds: p, + computeShape: t => ur(t, o[e]), + transform: e => { + e.translate(p.x, p.y) + }, + drawImage: Ms({ + imageDataResizer: r, + canvasMemoryLimit: n + }), + preprocessShape: e => s(e, { + isPreview: !1, + ...o[t] + }), + canvasMemoryLimit: n, + willRequest: c || l + }] +}), ((e, t) => e[o] = t)), "image-data-frame"], Ys = ({ + mimeType: e, + quality: t, + srcImageData: o = "imageData", + srcFile: i = "src", + destBlob: r = "blob" +} = {}) => [Rs(O, (r => [r[o], e || _(r[i].name) || r[i].type, t]), ((e, t) => e[r] = t)), "image-data-to-blob"], qs = ({ + srcImageData: e = "imageData", + srcOrientation: t = "orientation", + destCanvas: o = "dest" +} = {}) => [Rs(v, (o => [o[e], o[t]]), ((e, t) => e[o] = t)), "image-data-to-canvas"], Ks = async (e, o) => { + if (!$o(e) || !o) return e; + const i = new DataView(o), + r = t(i); + if (!r || !r.exif) return e; + const n = ["exif", "mpf", "xmp"].reduce(((e, t) => r[t] ? Math.max(e, r[t].offset + r[t].size) : e), 0); + return ((e, t, o = [0, e.size]) => t ? new Blob([t, e.slice(...o)], { + type: e.type + }) : e)(e, o.slice(0, n + 2), [20]) +}, Js = (e = "blob", t = "head", o = "blob") => [Rs(Ks, (o => [o[e], o[t]]), ((e, t) => e[o] = t)), "blob-write-image-head"], Qs = ({ + renameFile: e, + srcBlob: t = "blob", + srcFile: o = "src", + destFile: i = "dest", + defaultFilename: r +} = {}) => [Rs(N, (i => [i[t], e ? e(i[o]) : i[o].name || `${r}.${B(i[t].type)}`]), ((e, t) => e[i] = t)), "blob-to-file"], el = ({ + url: e = "./", + dataset: t = (e => [ + ["dest", e.dest, e.dest.name], + ["imageState", e.imageState] + ]), + destStore: o = "store", + credentials: i, + headers: n = {} +}) => [Rs((async (t, o) => await ((e, t, o) => new Promise(((i, n) => { + const { + token: a = {}, + beforeSend: s = r, + onprogress: l = r + } = o; + a.cancel = () => c.abort(); + const c = new XMLHttpRequest; + c.upload.onprogress = l, c.onload = () => c.status >= 200 && c.status < 300 ? i(c) : n(c), c.onerror = () => n(c), c.ontimeout = () => n(c), c.open("POST", encodeURI(e)), s(c), c.send(t instanceof FormData ? t : t.reduce(((e, t) => (e.append(...t.map(fo)), e)), new FormData)) +})))(e, t, { + onprogress: o, + beforeSend: e => no(e, { + headers: n, + credentials: i + }) +})), ((e, o, i) => [t(e), i]), ((e, t) => e[o] = t)), "store"], tl = e => [Rs((t => e && e.length ? (Object.keys(t).forEach((o => { + e.includes(o) || delete t[o] +})), t) : t)), "prop-filter"], ol = (e = {}) => { + const { + orientImage: t = !0, + outputProps: o = ["src", "dest", "size", "duration"], + preprocessImageFile: i, + request: r = {} + } = e; + return [Ps({ + willRequest: () => r + }), Es(), i && [Rs(i, ((e, t, o) => [e.dest, t, o]), ((e, t) => e.dest = t)), "preprocess-image-file"], Is({ + srcProp: "dest" + }), Ls({ + srcProp: "dest" + }), t && Fs({ + srcProp: "dest" + }), t && Os(), t && zs(), tl(o)].filter(Boolean) +}, il = e => e && (T(e) ? el({ + url: e +}) : M(e) ? [e, "store"] : el(e)), rl = (e = {}) => (t, o, i = {}) => { + if (!Yt(t)) return; + let { + canvasMemoryLimit: r = ks(), + orientImage: n = !0, + copyImageHead: a = !0, + mimeType: s, + quality: l, + renameFile: c, + targetSize: d, + imageDataResizer: u, + store: h, + format: p = "file", + outputProps: m = ["src", "dest", "imageState", "store"], + preprocessImageSource: g, + preprocessImageState: $, + postprocessImageData: f, + postprocessImageBlob: y + } = { + ...e, + ...i + }; + return "blob" === p && (p = "file"), [g && [Rs(g, ((e, t, o) => [e.src, t, o, e.imageState]), ((e, t) => e.src = t)), "preprocess-image-source"], (n || a) && Fs(), n && Os(), Is(), $ && [Rs($, ((e, t, o, i) => [e.imageState, t, o, { + size: e.size, + orientation: e.orientation + }]), ((e, t) => e.imageState = t)), "preprocess-image-state"], Ws({ + canvasMemoryLimit: r + }), n && zs(), n && Vs(), Bs(), Us(), Ns(), Hs({ + imageDataResizer: u, + targetSize: d + }), Gs({ + imageDataResizer: u, + canvasMemoryLimit: r, + srcShapes: "manipulation" + }), js(), _s(), Gs({ + imageDataResizer: u, + canvasMemoryLimit: r, + srcShapes: "annotation" + }), Zs({ + imageDataResizer: u, + canvasMemoryLimit: r + }), Xs({ + imageDataResizer: u, + canvasMemoryLimit: r + }), f && [Rs(f, ((e, t, o) => [e.imageData, t, o]), ((e, t) => e.imageData = t)), "postprocess-image-data"], "file" === p ? Ys({ + mimeType: s, + quality: l + }) : "canvas" === p ? qs() : [e => (e.dest = e.imageData, e)], "file" === p && n && Ds(), "file" === p && a && Js(), y && [Rs(y, (({ + blob: e, + imageData: t, + src: o + }, i, r) => [{ + blob: e, + imageData: t, + src: o + }, i, r]), ((e, t) => e.blob = t)), "postprocess-image-file"], "file" === p && Qs({ + defaultFilename: "image", + renameFile: c + }), "file" === p ? il(h) : M(h) && [h, "store"], tl(m)].filter(Boolean) +}; +var nl = (e, t, o, i, r, n, a, s, l, c, d) => { + if (!(e && t && o && i && s)) return; + s *= n; + const u = St(Ye(t)), + h = rt(u), + p = rt(e), + m = Ke(o), + g = rt(m), + $ = is(o, i, l), + f = rt($), + y = xe(ue(g), f), + b = xe(ue(p), h); + y.x += b.x, y.y += b.y; + const x = he(ue(y)); + x.x += b.x, x.y += b.y; + const v = rt(nt(nt(Ye(r), a), e)), + w = xe(v, p); + return be(y, w), { + origin: x, + translation: y, + rotation: { + x: d ? Math.PI : 0, + y: c ? Math.PI : 0, + z: l + }, + scale: s + } +}; +let al = null; +var sl = () => { + if (null === al) + if ("WebGL2RenderingContext" in window) { + let e; + try { + e = p("canvas"), al = !!e.getContext("webgl2") + } catch (e) { + al = !1 + } + e && g(e), e = void 0 + } else al = !1; + return al + }, + ll = e => 0 == (e & e - 1), + cl = (e, t = {}, o = "", i = "") => Object.keys(t).filter((e => !S(t[e]))).reduce(((e, r) => e.replace(new RegExp(o + r + i), t[r])), e); +const dl = { + head: "#version 300 es\n\nin vec4 aPosition;uniform mat4 uMatrix;", + text: "\nin vec2 aTexCoord;out vec2 vTexCoord;", + matrix: "\ngl_Position=uMatrix*vec4(aPosition.x,aPosition.y,0,1);" + }, + ul = { + head: "#version 300 es\nprecision highp float;\n\nout vec4 fragColor;", + mask: "\nuniform float uMaskFeather[8];uniform float uMaskBounds[4];uniform float uMaskOpacity;float mask(float x,float y,float bounds[4],float opacity){return 1.0-(1.0-(smoothstep(bounds[3],bounds[3]+1.0,x)*(1.0-smoothstep(bounds[1]-1.0,bounds[1],x))*(1.0-step(bounds[0],y))*step(bounds[2],y)))*(1.0-opacity);}", + init: "\nfloat a=1.0;vec4 fillColor=uColor;vec4 textureColor=texture(uTexture,vTexCoord);textureColor*=(1.0-step(uRepeat.y,vTexCoord.y))*step(0.0,vTexCoord.y)*(1.0-step(uRepeat.x,vTexCoord.x))*step(0.0,vTexCoord.x);", + colorize: "\nif(uTextureColor.a!=0.0&&textureColor.a>0.0){vec3 colorFlattened=textureColor.rgb/textureColor.a;if(colorFlattened.r>=.9999&&colorFlattened.g==0.0&&colorFlattened.b>=.9999){textureColor.rgb=uTextureColor.rgb*textureColor.a;}textureColor*=uTextureColor.a;}", + maskapply: "\nfloat m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);", + maskfeatherapply: "\nfloat leftFeatherOpacity=step(uMaskFeather[1],gl_FragCoord.x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],gl_FragCoord.x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],gl_FragCoord.x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],gl_FragCoord.x));a*=leftFeatherOpacity*rightFeatherOpacity;", + rectaa: "\nvec2 scaledPoint=vec2(vRectCoord.x*uSize.x,vRectCoord.y*uSize.y);a*=smoothstep(0.0,uEdgeFeather,uSize.x-scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,uSize.y-scaledPoint.y);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.y);", + cornerradius: "\nvec2 s=(uSize-2.0)*.5;vec2 r=(vRectCoord*uSize)-1.0;vec2 p=r-s;float cornerRadius=uCornerRadius[0];bool left=r.x { + const i = e.createShader(o), + r = ((e, t, o) => (t = cl(t, o === e.VERTEX_SHADER ? dl : ul, "##").trim(), sl() ? t : (t = (t = t.replace(/#version.+/gm, "").trim()).replace(/^\/\/\#/gm, "#"), o === e.VERTEX_SHADER && (t = t.replace(/in /gm, "attribute ").replace(/out /g, "varying ")), o === e.FRAGMENT_SHADER && (t = t.replace(/in /gm, "varying ").replace(/out.*?;/gm, "").replace(/texture\(/g, "texture2D(").replace(/fragColor/g, "gl_FragColor")), "" + t)))(e, t, o); + return e.shaderSource(i, r), e.compileShader(i), e.getShaderParameter(i, e.COMPILE_STATUS) || console.error(e.getShaderInfoLog(i)), i + }, + pl = (e, t, o, i, r) => { + const n = hl(e, t, e.VERTEX_SHADER), + a = hl(e, o, e.FRAGMENT_SHADER), + s = e.createProgram(); + e.attachShader(s, n), e.attachShader(s, a), e.linkProgram(s); + const l = {}; + return i.forEach((t => { + l[t] = e.getAttribLocation(s, t) + })), r.forEach((t => { + l[t] = e.getUniformLocation(s, t) + })), { + program: s, + locations: l, + destroy() { + e.detachShader(s, n), e.detachShader(s, a), e.deleteShader(n), e.deleteShader(a), e.deleteProgram(s) + } + } + }, + ml = e => "VIDEO" !== e.nodeName && (!!sl() || ll(e.width) && ll(e.height)), + gl = (e, t, o, i) => (e.bindTexture(e.TEXTURE_2D, t), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, o), ((e, t, o) => { + e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, ml(t) ? e.LINEAR_MIPMAP_LINEAR : e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, o.filterParam), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, o.wrapParam), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, o.wrapParam), ml(t) && e.generateMipmap(e.TEXTURE_2D) + })(e, o, i), e.bindTexture(e.TEXTURE_2D, null), t), + $l = (e, t = 1) => e ? [e[0], e[1], e[2], Eo(e[3]) ? t * e[3] : t] : [0, 0, 0, 0], + fl = () => { + const e = new Float32Array(16); + return e[0] = 1, e[5] = 1, e[10] = 1, e[15] = 1, e + }, + yl = (e, t, o, i, r, n, a) => { + const s = 1 / (t - o), + l = 1 / (i - r), + c = 1 / (n - a); + e[0] = -2 * s, e[1] = 0, e[2] = 0, e[3] = 0, e[4] = 0, e[5] = -2 * l, e[6] = 0, e[7] = 0, e[8] = 0, e[9] = 0, e[10] = 2 * c, e[11] = 0, e[12] = (t + o) * s, e[13] = (r + i) * l, e[14] = (a + n) * c, e[15] = 1 + }, + bl = (e, t, o, i) => { + e[12] = e[0] * t + e[4] * o + e[8] * i + e[12], e[13] = e[1] * t + e[5] * o + e[9] * i + e[13], e[14] = e[2] * t + e[6] * o + e[10] * i + e[14], e[15] = e[3] * t + e[7] * o + e[11] * i + e[15] + }, + xl = (e, t) => { + e[0] *= t, e[1] *= t, e[2] *= t, e[3] *= t, e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t, e[8] *= t, e[9] *= t, e[10] *= t, e[11] *= t + }, + vl = (e, t) => { + const o = Math.sin(t), + i = Math.cos(t), + r = e[4], + n = e[5], + a = e[6], + s = e[7], + l = e[8], + c = e[9], + d = e[10], + u = e[11]; + e[4] = r * i + l * o, e[5] = n * i + c * o, e[6] = a * i + d * o, e[7] = s * i + u * o, e[8] = l * i - r * o, e[9] = c * i - n * o, e[10] = d * i - a * o, e[11] = u * i - s * o + }, + wl = (e, t) => { + const o = Math.sin(t), + i = Math.cos(t), + r = e[0], + n = e[1], + a = e[2], + s = e[3], + l = e[8], + c = e[9], + d = e[10], + u = e[11]; + e[0] = r * i - l * o, e[1] = n * i - c * o, e[2] = a * i - d * o, e[3] = s * i - u * o, e[8] = r * o + l * i, e[9] = n * o + c * i, e[10] = a * o + d * i, e[11] = s * o + u * i + }, + Sl = (e, t) => { + const o = Math.sin(t), + i = Math.cos(t), + r = e[0], + n = e[1], + a = e[2], + s = e[3], + l = e[4], + c = e[5], + d = e[6], + u = e[7]; + e[0] = r * i + l * o, e[1] = n * i + c * o, e[2] = a * i + d * o, e[3] = s * i + u * o, e[4] = l * i - r * o, e[5] = c * i - n * o, e[6] = d * i - a * o, e[7] = u * i - s * o + }; +var kl = e => e * Math.PI / 180, + Cl = (e, t) => sl() ? e.getContext("webgl2", t) : e.getContext("webgl", t) || e.getContext("experimental-webgl", t); +const Tl = (e, t) => { + const o = e.length; + return t >= o ? e[t % o] : t < 0 ? e[t % o + o] : e[t] + }, + Ml = (e, t, o, i) => { + const r = ce(o.x - t.x, o.y - t.y), + n = ce(i.x - o.x, i.y - o.y), + a = ce(t.x - i.x, t.y - i.y), + s = ce(e.x - t.x, e.y - t.y), + l = ce(e.x - o.x, e.y - o.y), + c = ce(e.x - i.x, e.y - i.y), + d = ke(r, s), + u = ke(n, l), + h = ke(a, c); + return d <= 0 && u <= 0 && h <= 0 + }, + Rl = e => { + if (e.length < 3) return []; + if ((e => { + const t = e.length; + for (let o = 0; o < t; o++) { + const t = je(e[o], Tl(e, o + 1)); + if (Mt(t, e, { + ignoreIdenticalLines: !0, + breakOnIntersection: !0 + })) return !0 + } + return !1 + })(e)) return []; + (e => { + let t, o, i, r, n, a = 0; + const s = e.length; + for (t = 0; t < s; t++) o = e[t], i = e[(t + 1) % s], r = i.x - o.x, n = (i.y + o.y) / 2, a += r * n; + return a + })(e) < 0 && e.reverse(); + const t = e.length, + o = [...Array(t).keys()], + i = []; + let r, n, a, s, l, c, d, u, h, p, m, g, $ = 128; + for (; o.length > 3;) { + if ($ <= 0) return []; + for ($--, r = 0; r < o.length; r++) + if (a = o[r], s = Tl(o, r - 1), l = Tl(o, r + 1), c = e[a], d = e[s], u = e[l], h = ce(d.x - c.x, d.y - c.y), p = ce(u.x - c.x, u.y - c.y), !(ke(h, p) < 0)) { + for (m = !0, n = 0; n < t; n++) + if (n !== a && n !== s && n !== l && (g = e[n], Ml(g, d, c, u))) { + m = !1; + break + } if (m) { + i.push([d, c, u]), o.splice(r, 1); + break + } + } + } + return i.push([e[o[0]], e[o[1]], e[o[2]]]), i + }, + Pl = (e, t, o, i, r) => { + const n = ge(ce(i.x - o.x, i.y - o.y)), + a = ge(ce(r.x - i.x, r.y - i.y)), + s = ge(ce(n.x + a.x, n.y + a.y)), + l = ce(-s.y, s.x), + c = ce(-n.y, n.x), + d = Math.min(1 / Se(l, c), 5); + e[t] = i.x, e[t + 1] = i.y, e[t + 2] = l.x * d, e[t + 3] = l.y * d, e[t + 4] = -1, e[t + 5] = i.x, e[t + 6] = i.y, e[t + 7] = l.x * d, e[t + 8] = l.y * d, e[t + 9] = 1 + }, + El = e => { + const t = new Float32Array(8); + return t[0] = e[3].x, t[1] = e[3].y, t[2] = e[0].x, t[3] = e[0].y, t[4] = e[2].x, t[5] = e[2].y, t[6] = e[1].x, t[7] = e[1].y, t + }, + Il = (e, t = 0, o, i) => { + const r = xt(e), + n = e.x + .5 * e.width, + a = e.y + .5 * e.height; + return (o || i) && Pe(r, o, i, n, a), 0 !== t && Ee(r, t, n, a), r + }, + Al = (e, t, o, i, r) => { + const n = Math.min(20, Math.max(4, Math.round(i / 2))); + let a = 0, + s = 0, + l = 0, + c = 0, + d = 0; + for (; d < n; d++) a = d / n, s = r * G + a * G, l = i * Math.cos(s), c = i * Math.sin(s), e.push(ce(t + l, o + c)) + }; +let Ll = null; +var zl = () => { + if (null !== Ll) return Ll; + let e = p("canvas"); + const t = Cl(e); + return Ll = t ? t.getParameter(t.MAX_TEXTURE_SIZE) : void 0, g(e), e = void 0, Ll + }, + Fl = () => c() && !!window.chrome; +const Ol = new Float32Array([0, 1, 0, 0, 1, 1, 1, 0]), + Dl = new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]), + Bl = c() && Xo(), + Wl = [0, 0, 0, 0, 1, 0, 0, 0, 0], + Vl = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], + _l = [0, 0, 0, 0], + Nl = [0, 0, 0, 0], + Hl = (e, t, o, i, r) => { + if (!o || !i) return Ol; + let n = i.x / o.width, + a = i.y / o.height, + s = e / o.width / r, + l = t / o.height / r; + s -= n, l -= a; + return new Float32Array([-n, l, -n, -a, s, l, s, -a]) + }; +var jl = (e, t = {}) => { + const { + alpha: o = !1 + } = t, i = { + width: 0, + height: 0 + }, r = { + width: 0, + height: 0 + }, n = zl() || 1024; + let a, s, l; + const c = fl(), + d = fl(); + let u, h, p, m, $, f, y, b, x, v = 0, + w = 0, + S = 0, + k = 1; + const C = new Map([]), + T = () => { + P.stencilOp(P.KEEP, P.KEEP, P.KEEP), P.stencilFunc(P.ALWAYS, 1, 255), P.stencilMask(255) + }, + M = kl(30), + R = Math.tan(M / 2), + P = Cl(e, { + alpha: o, + antialias: !1, + premultipliedAlpha: !0, + stencil: !0 + }); + if (!P) return; + P.getExtension("OES_standard_derivatives"), P.disable(P.DEPTH_TEST), P.enable(P.STENCIL_TEST), P.enable(P.BLEND), P.blendFunc(P.ONE, P.ONE_MINUS_SRC_ALPHA), P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !(!o && Xo())), T(); + const E = P.createTexture(); + P.bindTexture(P.TEXTURE_2D, E), P.texImage2D(P.TEXTURE_2D, 0, P.RGBA, 1, 1, 0, P.RGBA, P.UNSIGNED_BYTE, new Uint8Array(_l)), C.set(0, E); + const I = P.createTexture(); + C.set(2, I); + const A = P.createFramebuffer(), + L = P.createTexture(); + C.set(1, L); + const z = P.createFramebuffer(), + F = pl(P, "\n##head\n##text\nvoid main(){vTexCoord=aTexCoord;gl_Position=uMatrix*aPosition;}", "\n##head\nin vec2 vTexCoord;uniform sampler2D uTexture;uniform sampler2D uTextureOverlay;uniform sampler2D uTextureBlend;uniform vec2 uTextureSize;uniform float uOpacity;uniform int uAntialias;uniform vec4 uOverlayColor;uniform mat4 uColorMatrix;uniform vec4 uColorOffset;uniform float uClarityKernel[9];uniform float uClarityKernelWeight;uniform float uColorGamma;uniform float uColorVignette;uniform float uMaskClip;uniform float uMaskOpacity;uniform float uMaskBounds[4];uniform float uMaskCornerRadius[4];uniform float uMaskFeather[8];vec4 applyGamma(vec4 c,float g){c.r=pow(c.r,g);c.g=pow(c.g,g);c.b=pow(c.b,g);return c;}vec4 applyColorMatrix(vec4 c,mat4 m,vec4 o){return(c*m)+(o*c.a);}vec4 applyConvolutionMatrix(vec4 c,float k0,float k1,float k2,float k3,float k4,float k5,float k6,float k7,float k8,float w){vec2 pixel=vec2(1)/uTextureSize;vec4 colorSum=texture(uTexture,vTexCoord-pixel)*k0+texture(uTexture,vTexCoord+pixel*vec2(0.0,-1.0))*k1+texture(uTexture,vTexCoord+pixel*vec2(1.0,-1.0))*k2+texture(uTexture,vTexCoord+pixel*vec2(-1.0,0.0))*k3+texture(uTexture,vTexCoord)*k4+texture(uTexture,vTexCoord+pixel*vec2(1.0,0.0))*k5+texture(uTexture,vTexCoord+pixel*vec2(-1.0,1.0))*k6+texture(uTexture,vTexCoord+pixel*vec2(0.0,1.0))*k7+texture(uTexture,vTexCoord+pixel)*k8;vec4 color=vec4(clamp((colorSum/w),0.0,1.0).rgb,c.a);return color;}vec4 applyVignette(vec4 c,vec2 pos,vec2 center,float v){float d=distance(pos,center)/length(center);float f=1.0-(d*abs(v));if(v>0.0){c.rgb*=f;}else if(v<0.0){c.rgb+=(1.0-f)*(1.0-c.rgb);}return c;}vec4 blendPremultipliedAlpha(vec4 back,vec4 front){return front+(back*(1.0-front.a));}void main(){float x=gl_FragCoord.x;float y=gl_FragCoord.y;float a=1.0;float maskTop=uMaskBounds[0];float maskRight=uMaskBounds[1];float maskBottom=uMaskBounds[2];float maskLeft=uMaskBounds[3];float leftFeatherOpacity=step(uMaskFeather[1],x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],x));a*=leftFeatherOpacity*rightFeatherOpacity;float overlayColorAlpha=(smoothstep(maskLeft,maskLeft+1.0,x)*(1.0-smoothstep(maskRight-1.0,maskRight,x))*(1.0-step(maskTop,y))*step(maskBottom,y));if(uOverlayColor.a==0.0){a*=overlayColorAlpha;}vec2 offset=vec2(maskLeft,maskBottom);vec2 size=vec2(maskRight-maskLeft,maskTop-maskBottom)*.5;vec2 center=offset.xy+size.xy;int pixelX=int(step(center.x,x));int pixelY=int(step(y,center.y));float cornerRadius=0.0;if(pixelX==0&&pixelY==0)cornerRadius=uMaskCornerRadius[0];if(pixelX==1&&pixelY==0)cornerRadius=uMaskCornerRadius[1];if(pixelX==0&&pixelY==1)cornerRadius=uMaskCornerRadius[2];if(pixelX==1&&pixelY==1)cornerRadius=uMaskCornerRadius[3];float cornerOffset=sign(cornerRadius)*length(max(abs(gl_FragCoord.xy-size-offset)-size+cornerRadius,0.0))-cornerRadius;float cornerOpacity=1.0-smoothstep(0.0,1.0,cornerOffset);a*=cornerOpacity;if(uAntialias==1){vec2 scaledPoint=vec2(vTexCoord.x*uTextureSize.x,vTexCoord.y*uTextureSize.y);a*=smoothstep(0.0,1.0,uTextureSize.x-scaledPoint.x);a*=smoothstep(0.0,1.0,uTextureSize.y-scaledPoint.y);a*=smoothstep(0.0,1.0,scaledPoint.x);a*=smoothstep(0.0,1.0,scaledPoint.y);}vec4 color=texture(uTexture,vTexCoord);if(uClarityKernelWeight!=-1.0){color=applyConvolutionMatrix(color,uClarityKernel[0],uClarityKernel[1],uClarityKernel[2],uClarityKernel[3],uClarityKernel[4],uClarityKernel[5],uClarityKernel[6],uClarityKernel[7],uClarityKernel[8],uClarityKernelWeight);}color=blendPremultipliedAlpha(color,texture(uTextureBlend,vTexCoord));color=applyGamma(color,uColorGamma);color=applyColorMatrix(color,uColorMatrix,uColorOffset);color*=a;if(uColorVignette!=0.0){vec2 pos=gl_FragCoord.xy-offset;color=applyVignette(color,pos,center-offset,uColorVignette);}color=blendPremultipliedAlpha(color,texture(uTextureOverlay,vTexCoord));if(overlayColorAlpha<=0.0){color*=1.0-uOverlayColor.a;}color*=uOpacity;fragColor=color;}", ["aPosition", "aTexCoord"], ["uMatrix", "uTexture", "uTextureBlend", "uTextureOverlay", "uTextureSize", "uColorGamma", "uColorVignette", "uColorOffset", "uColorMatrix", "uClarityKernel", "uClarityKernelWeight", "uOpacity", "uMaskOpacity", "uMaskBounds", "uMaskCornerRadius", "uMaskFeather", "uOverlayColor", "uAntialias"]), + O = P.createBuffer(), + D = P.createBuffer(); + P.bindBuffer(P.ARRAY_BUFFER, D), P.bufferData(P.ARRAY_BUFFER, Ol, P.STATIC_DRAW); + const B = P.createBuffer(); + P.bindBuffer(P.ARRAY_BUFFER, B), P.bufferData(P.ARRAY_BUFFER, Dl, P.STATIC_DRAW); + const W = pl(P, "#version 300 es\n\nin vec4 aPosition;in vec2 aNormal;in float aMiter;out vec2 vNormal;out float vMiter;out float vWidth;uniform float uWidth;uniform float uSharpness;uniform mat4 uMatrix;void main(){vMiter=aMiter;vNormal=aNormal;vWidth=(uWidth*.5)+uSharpness;gl_Position=uMatrix*vec4(aPosition.x+(aNormal.x*vWidth*aMiter),aPosition.y+(aNormal.y*vWidth*aMiter),0,1);}", "\n##head\n##mask\nin vec2 vNormal;in float vMiter;in float vWidth;uniform float uWidth;uniform vec4 uColor;uniform vec4 uCanvasColor;void main(){vec4 fillColor=uColor;float m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);if(m<=0.0)discard;fillColor.a*=clamp(smoothstep(vWidth-.5,vWidth-1.0,abs(vMiter)*vWidth),0.0,1.0);fillColor.rgb*=fillColor.a;fillColor.rgb*=m;fillColor.rgb+=(1.0-m)*(uCanvasColor.rgb*fillColor.a);fragColor=fillColor;}", ["aPosition", "aNormal", "aMiter"], ["uColor", "uCanvasColor", "uMatrix", "uWidth", "uSharpness", "uMaskBounds", "uMaskOpacity"]), + V = P.createBuffer(); + Fl() && (P.bindBuffer(P.ARRAY_BUFFER, V), P.bufferData(P.ARRAY_BUFFER, 1, P.DYNAMIC_DRAW)); + const _ = (e, t, o, i = !1) => { + const { + program: r, + locations: n + } = W; + P.useProgram(r), P.enableVertexAttribArray(n.aPosition), P.enableVertexAttribArray(n.aNormal), P.enableVertexAttribArray(n.aMiter); + const a = ((e, t) => { + let o, i, r, n = 0; + const a = e.length, + s = new Float32Array(10 * (t ? a + 1 : a)), + l = e[0], + c = e[a - 1]; + for (n = 0; n < a; n++) o = e[n - 1], i = e[n], r = e[n + 1], o || (o = t ? c : ce(i.x + (i.x - r.x), i.y + (i.y - r.y))), r || (r = t ? l : ce(i.x + (i.x - o.x), i.y + (i.y - o.y))), Pl(s, 10 * n, o, i, r); + return t && Pl(s, 10 * a, c, l, e[1]), s + })(e, i), + s = 5 * Float32Array.BYTES_PER_ELEMENT, + c = 2 * Float32Array.BYTES_PER_ELEMENT, + d = 4 * Float32Array.BYTES_PER_ELEMENT; + P.uniform1f(n.uWidth, t), P.uniform1f(n.uSharpness, l), P.uniform4fv(n.uColor, o), P.uniformMatrix4fv(n.uMatrix, !1, u), P.uniform4f(n.uCanvasColor, v, w, S, k), P.uniform1fv(n.uMaskBounds, y), P.uniform1f(n.uMaskOpacity, f), P.bindBuffer(P.ARRAY_BUFFER, V), P.bufferData(P.ARRAY_BUFFER, a, P.STATIC_DRAW), P.vertexAttribPointer(n.aPosition, 2, P.FLOAT, !1, s, 0), P.vertexAttribPointer(n.aNormal, 2, P.FLOAT, !1, s, c), P.vertexAttribPointer(n.aMiter, 1, P.FLOAT, !1, s, d), P.drawArrays(P.TRIANGLE_STRIP, 0, a.length / 5), P.disableVertexAttribArray(n.aPosition), P.disableVertexAttribArray(n.aNormal), P.disableVertexAttribArray(n.aMiter) + }, + N = pl(P, "\n##head\nvoid main(){\n##matrix\n}", "\n##head\n##mask\nuniform vec4 uColor;uniform vec4 uCanvasColor;void main(){vec4 fillColor=uColor;\n##maskapply\nfillColor.rgb*=fillColor.a;fillColor.rgb*=m;fillColor.rgb+=(1.0-m)*(uCanvasColor.rgb*fillColor.a);fragColor=fillColor;}", ["aPosition"], ["uColor", "uCanvasColor", "uMatrix", "uMaskBounds", "uMaskOpacity"]), + j = P.createBuffer(), + U = pl(P, "\n##head\n##text\nin vec2 aRectCoord;out vec2 vRectCoord;void main(){vTexCoord=aTexCoord;vRectCoord=aRectCoord;\n##matrix\n}", "\n##head\n##mask\nin vec2 vTexCoord;in vec2 vRectCoord;uniform sampler2D uTexture;uniform vec4 uTextureColor;uniform float uTextureOpacity;uniform vec2 uRepeat;uniform vec4 uColor;uniform float uCornerRadius[4];uniform vec2 uSize;uniform vec2 uPosition;uniform vec4 uCanvasColor;uniform int uInverted;uniform float uEdgeFeather;void main(){\n##init\n##colorize\n##rectaa\n##cornerradius\n##maskfeatherapply\nif(uInverted==1)a=1.0-a;\n##maskapply\n##fragcolor\n}", ["aPosition", "aTexCoord", "aRectCoord"], ["uTexture", "uColor", "uMatrix", "uCanvasColor", "uTextureColor", "uTextureOpacity", "uRepeat", "uPosition", "uSize", "uMaskBounds", "uMaskOpacity", "uMaskFeather", "uCornerRadius", "uInverted", "uEdgeFeather"]), + G = P.createBuffer(), + Z = P.createBuffer(), + X = P.createBuffer(), + Y = pl(P, "\n##head\n##text\nout vec2 vTexCoordDouble;void main(){vTexCoordDouble=vec2(aTexCoord.x*2.0-1.0,aTexCoord.y*2.0-1.0);vTexCoord=aTexCoord;\n##matrix\n}", "\n##head\n##mask\nin vec2 vTexCoord;in vec2 vTexCoordDouble;uniform sampler2D uTexture;uniform float uTextureOpacity;uniform vec2 uRepeat;uniform vec2 uRadius;uniform vec4 uColor;uniform int uInverted;uniform vec4 uCanvasColor;void main(){\n##init\nfloat ar=uRadius.x/uRadius.y;vec2 rAA=vec2(uRadius.x-1.0,uRadius.y-(1.0/ar));vec2 scaledPointSq=vec2((vTexCoordDouble.x*uRadius.x)*(vTexCoordDouble.x*uRadius.x),(vTexCoordDouble.y*uRadius.y)*(vTexCoordDouble.y*uRadius.y));float p=(scaledPointSq.x/(uRadius.x*uRadius.x))+(scaledPointSq.y/(uRadius.y*uRadius.y));float pAA=(scaledPointSq.x/(rAA.x*rAA.x))+(scaledPointSq.y/(rAA.y*rAA.y));a=smoothstep(1.0,p/pAA,p);if(uInverted==1)a=1.0-a;\n##maskapply\n##fragcolor\n}", ["aPosition", "aTexCoord"], ["uTexture", "uTextureOpacity", "uRepeat", "uColor", "uCanvasColor", "uMatrix", "uRadius", "uInverted", "uMaskBounds", "uMaskOpacity"]), + q = P.createBuffer(), + K = P.createBuffer(), + J = new Map, + Q = { + 2: { + width: 0, + height: 0 + }, + 1: { + width: 0, + height: 0 + } + }, + ee = (e, t, o, r = 1) => { + const a = Math.min(Math.min(4096, n) / o.width, Math.min(4096, n) / o.height, r), + l = Math.floor(a * o.width), + c = Math.floor(a * o.height); + Be(o, Q[e]) ? P.bindFramebuffer(P.FRAMEBUFFER, t) : (P.bindTexture(P.TEXTURE_2D, C.get(e)), P.texImage2D(P.TEXTURE_2D, 0, P.RGBA, l, c, 0, P.RGBA, P.UNSIGNED_BYTE, null), P.texParameteri(P.TEXTURE_2D, P.TEXTURE_MIN_FILTER, P.LINEAR), P.texParameteri(P.TEXTURE_2D, P.TEXTURE_WRAP_S, P.CLAMP_TO_EDGE), P.texParameteri(P.TEXTURE_2D, P.TEXTURE_WRAP_T, P.CLAMP_TO_EDGE), P.bindFramebuffer(P.FRAMEBUFFER, t), P.framebufferTexture2D(P.FRAMEBUFFER, P.COLOR_ATTACHMENT0, P.TEXTURE_2D, C.get(e), 0), Q[e] = o); + const h = o.width * s, + p = o.height * s; + var m, g; + yl(d, 0, h, p, 0, -1, 1), bl(d, 0, p, 0), g = 1, (m = d)[0] *= g, m[1] *= g, m[2] *= g, m[3] *= g, ((e, t) => { + e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t + })(d, -1), u = d, P.viewport(0, 0, l, c), P.colorMask(!0, !0, !0, !0), P.clearColor(0, 0, 0, 0), P.clear(P.COLOR_BUFFER_BIT), x = [1, 0, 1, 0, 1, Math.max(i.width, o.width), 1, Math.max(i.width, o.width)] + }, + te = (e, t) => { + const { + forceRelease: o = !1 + } = t || {}, { + src: i + } = J.get(e); + i instanceof HTMLCanvasElement && (o || i.dataset.retain || g(i)), J.delete(e), P.deleteTexture(e) + }, + oe = e => J.get(e).isRotatedVideo; + return { + drawPath: (e, t = 0, o = !1, i = !1, r, n, a, l, c) => { + if (e.length < 2) return; + const d = e.map((e => ({ + x: e.x * s, + y: e.y * s + }))), + h = r * s; + if (h > 0 && _(d, h, $l(n, c), a), d.length < 3 || !l || 0 === l[3] || !a) return; + const p = Rl(d), + m = new Float32Array(6 * p.length); + p.forEach((([e, t, o], i) => { + const r = 6 * i; + m[r + 0] = e.x, m[r + 1] = e.y, m[r + 2] = t.x, m[r + 3] = t.y, m[r + 4] = o.x, m[r + 5] = o.y + })), ((e, t) => { + const { + program: o, + locations: i + } = N; + P.useProgram(o), P.enableVertexAttribArray(i.aPosition), P.uniform4fv(i.uColor, t), P.uniformMatrix4fv(i.uMatrix, !1, u), P.uniform1fv(i.uMaskBounds, y), P.uniform1f(i.uMaskOpacity, f), P.uniform4f(i.uCanvasColor, v, w, S, k), P.bindBuffer(P.ARRAY_BUFFER, j), P.bufferData(P.ARRAY_BUFFER, e, P.STATIC_DRAW), P.vertexAttribPointer(i.aPosition, 2, P.FLOAT, !1, 0, 0), P.drawArrays(P.TRIANGLES, 0, e.length / 2), P.disableVertexAttribArray(i.aPosition) + })(m, $l(l, c)) + }, + drawRect: (e, t = 0, o = !1, i = !1, r, n, a, l, c, d = !1, h, p, m, g, $, b = 1 / s, C, T) => { + const M = ct(Ye(e), s), + R = r.map((t => ((e, t) => Math.floor(rs(e, 0, Math.min(.5 * (t.width - 1), .5 * (t.height - 1)))))(t || 0, e))).map((e => e * s)); + if (n || a) { + const e = Ye(M); + e.x -= .5, e.y -= .5, e.width += 1, e.height += 1; + const r = Il(e, t, o, i), + p = El(r); + let m; + C && (m = $l(C), 0 === m[3] && (m[3] = .001)); + const I = l && d ? [e.width / l.width, e.height / l.height] : [1, 1]; + ((e, t, o, i, r, n = E, a, l = 1, c = _l, d = Ol, h = x, p = 1, m) => { + const { + program: g, + locations: $ + } = U; + P.useProgram(g), P.enableVertexAttribArray($.aPosition), P.enableVertexAttribArray($.aTexCoord), P.enableVertexAttribArray($.aRectCoord), P.uniform4fv($.uColor, r), P.uniform2fv($.uSize, [t, o]), P.uniform2fv($.uPosition, [e[2], e[3]]), P.uniform2fv($.uRepeat, a), P.uniform1i($.uInverted, m ? 1 : 0), P.uniform1fv($.uCornerRadius, i), P.uniform4f($.uCanvasColor, v, w, S, k), P.uniform1fv($.uMaskFeather, h.map(((e, t) => t % 2 == 0 ? e : e * s))), P.uniform1fv($.uMaskBounds, y), P.uniform1f($.uMaskOpacity, f), P.uniform1f($.uEdgeFeather, Math.max(0, p)), P.uniformMatrix4fv($.uMatrix, !1, u), P.uniform1i($.uTexture, 4), P.uniform4fv($.uTextureColor, c), P.uniform1f($.uTextureOpacity, l), P.activeTexture(P.TEXTURE0 + 4), P.bindTexture(P.TEXTURE_2D, n), P.bindBuffer(P.ARRAY_BUFFER, Z), P.bufferData(P.ARRAY_BUFFER, d, P.STATIC_DRAW), P.vertexAttribPointer($.aTexCoord, 2, P.FLOAT, !1, 0, 0), P.bindBuffer(P.ARRAY_BUFFER, X), P.bufferData(P.ARRAY_BUFFER, Ol, P.STATIC_DRAW), P.vertexAttribPointer($.aRectCoord, 2, P.FLOAT, !1, 0, 0), P.bindBuffer(P.ARRAY_BUFFER, G), P.bufferData(P.ARRAY_BUFFER, e, P.STATIC_DRAW), P.vertexAttribPointer($.aPosition, 2, P.FLOAT, !1, 0, 0), P.drawArrays(P.TRIANGLE_STRIP, 0, e.length / 2), P.disableVertexAttribArray($.aPosition), P.disableVertexAttribArray($.aTexCoord), P.disableVertexAttribArray($.aRectCoord) + })(p, e.width, e.height, R, $l(n, g), a, I, g, m, h ? new Float32Array(h) : Hl(e.width, e.height, l, c, s), $, b * s, T) + } + p && (p = Math.min(p, M.width, M.height), _(((e, t, o, i, r, n, a, s) => { + const l = []; + if (n.every((e => 0 === e))) l.push(ce(e, t), ce(e + o, t), ce(e + o, t + i), ce(e, t + i)); + else { + const [r, a, s, c] = n, d = e, u = e + o, h = t, p = t + i; + l.push(ce(d + r, h)), Al(l, u - a, h + a, a, -1), l.push(ce(u, h + a)), Al(l, u - c, p - c, c, 0), l.push(ce(u - c, p)), Al(l, d + s, p - s, s, 1), l.push(ce(d, p - s)), Al(l, d + r, h + r, r, 2) + } + return (a || s) && Pe(l, a, s, e + .5 * o, t + .5 * i), r && Ee(l, r, e + .5 * o, t + .5 * i), l + })(M.x, M.y, M.width, M.height, t, R, o, i), p * s, $l(m, g), !0)) + }, + drawEllipse: (e, t, o, i, r, n, a, l, c, d, h, p, m, g, $) => { + const b = ct(it(e.x - t, e.y - o, 2 * t, 2 * o), s); + if (a || l) { + const e = Ye(b); + e.x -= .5, e.y -= .5, e.width += 1, e.height += 1; + const t = Il(e, i, r, n); + ((e, t, o, i, r = E, n = Ol, a = 1, s = !1) => { + const { + program: l, + locations: c + } = Y; + P.useProgram(l), P.enableVertexAttribArray(c.aPosition), P.enableVertexAttribArray(c.aTexCoord), P.uniformMatrix4fv(c.uMatrix, !1, u), P.uniform2fv(c.uRadius, [.5 * t, .5 * o]), P.uniform1i(c.uInverted, s ? 1 : 0), P.uniform4fv(c.uColor, i), P.uniform4f(c.uCanvasColor, v, w, S, k), P.uniform2fv(c.uRepeat, [1, 1]), P.uniform1fv(c.uMaskBounds, y), P.uniform1f(c.uMaskOpacity, f), P.uniform1i(c.uTexture, 4), P.uniform1f(c.uTextureOpacity, a), P.activeTexture(P.TEXTURE0 + 4), P.bindTexture(P.TEXTURE_2D, r), P.bindBuffer(P.ARRAY_BUFFER, K), P.bufferData(P.ARRAY_BUFFER, n, P.STATIC_DRAW), P.vertexAttribPointer(c.aTexCoord, 2, P.FLOAT, !1, 0, 0), P.bindBuffer(P.ARRAY_BUFFER, q), P.bufferData(P.ARRAY_BUFFER, e, P.STATIC_DRAW), P.vertexAttribPointer(c.aPosition, 2, P.FLOAT, !1, 0, 0), P.drawArrays(P.TRIANGLE_STRIP, 0, e.length / 2), P.disableVertexAttribArray(c.aPosition), P.disableVertexAttribArray(c.aTexCoord) + })(El(t), e.width, e.height, $l(a, g), l, h ? new Float32Array(h) : Hl(e.width, e.height, c, d, s), g, $) + } + p && _(((e, t, o, i, r, n, a) => { + const s = .5 * Math.abs(o), + l = .5 * Math.abs(i), + c = Math.abs(o) + Math.abs(i), + d = Math.max(20, Math.round(c / 6)); + return It(ce(e + s, t + l), s, l, r, n, a, d) + })(b.x, b.y, b.width, b.height, i, r, n), p * s, $l(m, g), !0) + }, + drawImage: (e, t, o, r, n, l, c, d, u, h, p = Vl, m = 1, g, $ = 1, x = 0, v = b, w = Nl, S = _l, k = !1, T = !1, E = !0) => { + const I = t.width * s, + A = t.height * s, + L = -.5 * I, + z = .5 * A, + W = .5 * I, + V = -.5 * A, + _ = new Float32Array([L, V, 0, L, z, 0, W, V, 0, W, z, 0]); + P.bindBuffer(P.ARRAY_BUFFER, O), P.bufferData(P.ARRAY_BUFFER, _, P.STATIC_DRAW); + const N = t.height / 2 / R * (i.height / t.height) * -1; + n *= s, l *= s, o *= s, r *= s; + const { + program: H, + locations: j + } = F, U = fl(); + ((e, t, o, i, r) => { + const n = 1 / Math.tan(t / 2), + a = 1 / (i - r); + e[0] = n / o, e[1] = 0, e[2] = 0, e[3] = 0, e[4] = 0, e[5] = n, e[6] = 0, e[7] = 0, e[8] = 0, e[9] = 0, e[10] = (r + i) * a, e[11] = -1, e[12] = 0, e[13] = 0, e[14] = 2 * r * i * a, e[15] = 0 + })(U, M, a, 1, 2 * -N), bl(U, n, -l, N), bl(U, o, -r, 0), Sl(U, -u), xl(U, h), bl(U, -o, r, 0), wl(U, d), vl(U, c), P.useProgram(H), P.enableVertexAttribArray(j.aPosition), P.enableVertexAttribArray(j.aTexCoord), P.uniform1i(j.uTexture, 3), P.uniform2f(j.uTextureSize, t.width, t.height), P.activeTexture(P.TEXTURE0 + 3), P.bindTexture(P.TEXTURE_2D, e); + const G = T ? 1 : 0, + Z = C.get(G); + P.uniform1i(j.uTextureBlend, G), P.activeTexture(P.TEXTURE0 + G), P.bindTexture(P.TEXTURE_2D, Z); + const X = k ? 2 : 0, + Y = C.get(X); + P.uniform1i(j.uTextureOverlay, X), P.activeTexture(P.TEXTURE0 + X), P.bindTexture(P.TEXTURE_2D, Y), P.bindBuffer(P.ARRAY_BUFFER, O), P.vertexAttribPointer(j.aPosition, 3, P.FLOAT, !1, 0, 0); + const q = Bl && oe(e); + let K; + P.bindBuffer(P.ARRAY_BUFFER, q ? B : D), P.vertexAttribPointer(j.aTexCoord, 2, P.FLOAT, !1, 0, 0), P.uniformMatrix4fv(j.uMatrix, !1, U), P.uniform4fv(j.uOverlayColor, S), !g || cs(g, Wl) ? (g = Wl, K = -1) : (K = g.reduce(((e, t) => e + t), 0), K = K <= 0 ? 1 : K), P.uniform1fv(j.uClarityKernel, g), P.uniform1f(j.uClarityKernelWeight, K), P.uniform1f(j.uColorGamma, 1 / $), P.uniform1f(j.uColorVignette, x), P.uniform1i(j.uAntialias, E ? 1 : 0), P.uniform4f(j.uColorOffset, p[4], p[9], p[14], p[19]), P.uniformMatrix4fv(j.uColorMatrix, !1, [p[0], p[1], p[2], p[3], p[5], p[6], p[7], p[8], p[10], p[11], p[12], p[13], p[15], p[16], p[17], p[18]]), P.uniform1f(j.uOpacity, m), P.uniform1f(j.uMaskOpacity, f), P.uniform1fv(j.uMaskBounds, y), P.uniform1fv(j.uMaskCornerRadius, w.map((e => e * s))), P.uniform1fv(j.uMaskFeather, v.map(((e, t) => t % 2 == 0 ? e : e * s))), P.drawArrays(P.TRIANGLE_STRIP, 0, 4), P.disableVertexAttribArray(j.aPosition), P.disableVertexAttribArray(j.aTexCoord) + }, + textureFilterNearest: P.NEAREST, + textureFilterLinear: P.LINEAR, + textureClamp: P.CLAMP_TO_EDGE, + textureRepeat: P.REPEAT, + textureCreate: () => P.createTexture(), + textureUpdate: (e, t, o) => (J.set(e, { + src: t, + options: o, + isRotatedVideo: "VIDEO" === t.nodeName && (t.dataset && 90 == t.dataset.rotation || 270 == t.dataset.rotation) + }), gl(P, e, t, o)), + textureGetSize: e => { + const { + src: t, + options: o + } = J.get(e), i = Le(t); + return o.scalar ? He(i, (e => e / o.scalar)) : i + }, + textureDelete: te, + enablePreviewStencil: () => { + P.stencilOp(P.KEEP, P.KEEP, P.REPLACE), P.stencilFunc(P.ALWAYS, 1, 255), P.stencilMask(255) + }, + applyPreviewStencil: () => { + P.stencilFunc(P.EQUAL, 1, 255), P.stencilMask(0) + }, + disablePreviewStencil: T, + setCanvasColor(e) { + v = e[0], w = e[1], S = e[2], k = o ? e[3] : 1, P.clear(P.COLOR_BUFFER_BIT) + }, + resetCanvasMatrix: () => { + yl(c, 0, i.width, i.height, 0, -1, 1) + }, + updateCanvasMatrix(e, t, o, r, n) { + const a = e.width, + l = e.height, + d = i.width * (.5 / s), + u = i.height * (.5 / s), + h = { + x: d + (o.x + t.x), + y: u + (o.y + t.y) + }, + p = { + x: h.x - t.x, + y: h.y - t.y + }, + m = .5 * a, + g = .5 * l; + pe(p, n.z, h), Me(p, r, h); + bl(c, (p.x - m) * s, (p.y - g) * s, 0), bl(c, m * s, g * s, 0), Sl(c, n.z); + const $ = n.x > Math.PI / 2; + vl(c, $ ? Math.PI : 0); + const f = n.y > Math.PI / 2; + wl(c, f ? Math.PI : 0), xl(c, r), bl(c, -m * s, -g * s, 0) + }, + drawToCanvas() { + P.bindFramebuffer(P.FRAMEBUFFER, null), u = c, P.viewport(0, 0, P.drawingBufferWidth, P.drawingBufferHeight), P.colorMask(!0, !0, !0, !0), P.clearColor(v, w, S, k), P.clear(P.COLOR_BUFFER_BIT), x = [1, 0, 1, 0, 1, i.width, 1, i.width] + }, + drawToImageBlendBuffer(e, t) { + ee(1, z, e, t) + }, + drawToImageOverlayBuffer(e, t) { + ee(2, A, e, t) + }, + enableMask(e, t) { + const o = e.x * s, + r = e.y * s, + n = e.width * s, + a = e.height * s; + $ = o, p = $ + n, h = i.height - r, m = i.height - (r + a), f = 1 - t, y = [h, p, m, $] + }, + disableMask() { + $ = 0, p = i.width, h = i.height, m = 0, f = 1, y = [h, p, m, $] + }, + resize: (t, o, n) => { + s = n, l = 1 === s ? .75 : 1, r.width = t, r.height = o, i.width = t * s, i.height = o * s, a = H(i.width, i.height), e.width = i.width, e.height = i.height, yl(c, 0, i.width, i.height, 0, -1, 1), b = [1, 0, 1, 0, 1, r.width, 1, r.width] + }, + release() { + Array.from(J.keys()).forEach((e => te(e, { + forceRelease: !0 + }))), J.clear(), C.forEach((e => { + P.deleteTexture(e) + })), C.clear(), F.destroy(), W.destroy(), N.destroy(), U.destroy(), Y.destroy(), e.width = 1, e.height = 1, e = void 0 + } + } + }, + Ul = e => e % 2 == 0 ? e : e + 1; +var Gl = (e, t, o) => { + const { + targetCanvas: i, + targetSize: r, + disableDraw: n = !1, + shapePreprocessor: a + } = o || {}, s = i || document.createElement("canvas"), { + crop: l, + colorMatrix: c, + convolutionMatrix: d + } = t, u = Kt(e), h = { + width: u ? e.videoWidth : e.width, + height: u ? e.videoHeight : e.height + }, { + upscale: m = !1, + fit: g = "contain", + width: $, + height: f + } = r || {}; + let y = 1; + "contain" === g ? y = Math.min(($ || Number.MAX_SAFE_INTEGER) / l.width, (f || Number.MAX_SAFE_INTEGER) / l.height) : "cover" === g && (y = Math.max(($ || l.width) / l.width, (f || l.height) / l.height)), m || (y = Math.min(y, 1)); + const b = Math.floor(l.width * y), + x = Math.floor(l.height * y), + v = u ? Ul(b) : b, + w = u ? Ul(x) : x, + S = jl(s, { + alpha: !0 + }); + S.resize(v, w, 1); + const k = S.textureCreate(); + let C; + S.setCanvasColor([0, 0, 0, 0]), S.drawToCanvas(), S.disableMask(), S.disablePreviewStencil(); + { + const e = Object.values(c || {}).filter(Boolean); + e.length && (C = jr(e)) + } + const T = { + x: 0, + y: 0, + width: v, + height: w + }, + { + origin: M, + translation: R, + rotation: P, + scale: E + } = nl(T, T, h, l, { + x: 0, + y: 0, + width: v, + height: w + }, y, { + x: 0, + y: 0 + }, 1, t.rotation, t.flipX, t.flipY), + I = [h, M.x, M.y, R.x, R.y, P.x, P.y, P.z, E, C, 1, d && d.clarity, Eo(t.gamma) ? t.gamma : 1, t.vignette || 0, [1, 0, 1, 0, 1, w, 1, v], void 0, void 0, void 0, void 0, !1]; + let A = !1; + const L = t.decoration.length || t.annotation.length, + z = L && S.textureCreate(), + O = () => { + S.textureUpdate(k, e, { + filterParam: S.textureFilterLinear, + wrapParam: S.textureClamp + }) + }, + D = () => { + O(), S.drawImage(k, ...I), L && A && S.drawRect(T, 0, !1, !1, [0, 0, 0, 0], void 0, z) + }; + return O(), !n && D(), { + canvas: s, + prepare: async () => { + if (!L) return; + const { + dest: e + } = await Ss(p("canvas", h), { + shapePreprocessor: a, + imageReader: [ + [async (e, t, o) => { + const { + src: i + } = e, r = parseInt(i.width, 10), n = parseInt(i.height, 10), a = await F(i); + return { + ...e, + dest: a, + size: { + width: r, + height: n + } + } + }, "read-canvas"] + ], + imageWriter: rl({ + format: "canvas" + }), + imageState: { + ...t, + redaction: [], + frame: void 0, + gamma: void 0, + convolutionMatrix: void 0, + colorMatrix: void 0, + backgroundColor: [0, 0, 0, 0], + backgroundImage: void 0, + trim: void 0, + vignette: void 0, + volume: void 0 + } + }); + S.textureUpdate(z, e, { + filterParam: S.textureFilterLinear, + wrapParam: S.textureClamp + }), A = !0, !n && D() + }, + redraw: D, + destroy: () => { + S.release() + } + } + }, + Zl = (e, t) => { + const { + imageData: o, + amount: i = 1 + } = e, r = Math.round(2 * Math.max(1, i)), n = Math.round(.5 * r), a = o.width, s = o.height, l = new Uint8ClampedArray(a * s * 4), c = o.data; + let d, u, h, p, m, g = 0, + $ = 0, + f = 0; + const y = a * s * 4 - 4; + for (h = 0; h < s; h++) + for (d = crypto.getRandomValues(new Uint8ClampedArray(s)), u = 0; u < a; u++) p = d[h] / 255, $ = 0, f = 0, p < .5 && ($ = 4 * (-n + Math.round(Math.random() * r))), p > .5 && (f = (-n + Math.round(Math.random() * r)) * (4 * a)), m = Math.min(Math.max(0, g + $ + f), y), l[g] = c[m], l[g + 1] = c[m + 1], l[g + 2] = c[m + 2], l[g + 3] = c[m + 3], g += 4; + t(null, { + data: l, + width: o.width, + height: o.height + }) + }; +const Xl = [.0625, .125, .0625, .125, .25, .125, .0625, .125, .0625]; + +function Yl(e) { + return Math.sqrt(1 - --e * e) +} + +function ql(e) { + return "[object Date]" === Object.prototype.toString.call(e) +} + +function Kl(e, t) { + if (e === t || e != e) return () => e; + const o = typeof e; + if (o !== typeof t || Array.isArray(e) !== Array.isArray(t)) throw new Error("Cannot interpolate values of different type"); + if (Array.isArray(e)) { + const o = t.map(((t, o) => Kl(e[o], t))); + return e => o.map((t => t(e))) + } + if ("object" === o) { + if (!e || !t) throw new Error("Object cannot be null"); + if (ql(e) && ql(t)) { + e = e.getTime(); + const o = (t = t.getTime()) - e; + return t => new Date(e + t * o) + } + const o = Object.keys(t), + i = {}; + return o.forEach((o => { + i[o] = Kl(e[o], t[o]) + })), e => { + const t = {}; + return o.forEach((o => { + t[o] = i[o](e) + })), t + } + } + if ("number" === o) { + const o = t - e; + return t => e + t * o + } + throw new Error(`Cannot interpolate ${o} values`) +} + +function Jl(e, t = {}) { + const o = Ba(e); + let i, r = e; + + function n(n, a) { + if (null == e) return o.set(e = n), Promise.resolve(); + r = n; + let s = i, + l = !1, + { + delay: c = 0, + duration: d = 400, + easing: u = Zr, + interpolate: h = Kl + } = Xr(Xr({}, t), a); + if (0 === d) return s && (s.abort(), s = null), o.set(e = r), Promise.resolve(); + const p = mn() + c; + let m; + return i = yn((t => { + if (t < p) return !0; + l || (m = h(e, n), "function" == typeof d && (d = d(e, n)), l = !0), s && (s.abort(), s = null); + const i = t - p; + return i > d ? (o.set(e = n), !1) : (o.set(e = m(u(i / d))), !0) + })), i.promise + } + return { + set: n, + update: (t, o) => n(t(r, e), o), + subscribe: o.subscribe + } +} + +function Ql(e, t, o, i) { + if ("number" == typeof o) { + const r = i - o, + n = (o - t) / (e.dt || 1 / 60), + a = (n + (e.opts.stiffness * r - e.opts.damping * n) * e.inv_mass) * e.dt; + return Math.abs(a) < e.opts.precision && Math.abs(r) < e.opts.precision ? i : (e.settled = !1, o + a) + } + if (Lo(o)) return o.map(((r, n) => Ql(e, t[n], o[n], i[n]))); + if ("object" == typeof o) { + const r = {}; + for (const n in o) r[n] = Ql(e, t[n], o[n], i[n]); + return r + } + throw new Error(`Cannot spring ${typeof o} values`) +} + +function ec(e, t = {}) { + const o = Ba(e), + { + stiffness: i = .15, + damping: r = .8, + precision: n = .01 + } = t; + let a, s, l, c = e, + d = e, + u = 1, + h = 0, + p = !1; + + function m(t, i = {}) { + d = t; + const r = l = {}; + if (null == e || i.hard || g.stiffness >= 1 && g.damping >= 1) return p = !0, a = null, c = t, o.set(e = d), Promise.resolve(); + if (i.soft) { + const e = !0 === i.soft ? .5 : +i.soft; + h = 1 / (60 * e), u = 0 + } + if (!s) { + a = null, p = !1; + const t = { + inv_mass: void 0, + opts: g, + settled: !0, + dt: void 0 + }; + s = yn((i => { + if (null === a && (a = i), p) return p = !1, s = null, !1; + u = Math.min(u + h, 1), t.inv_mass = u, t.opts = g, t.settled = !0, t.dt = 60 * (i - a) / 1e3; + const r = Ql(t, c, e, d); + return a = i, c = e, o.set(e = r), t.settled && (s = null), !t.settled + })) + } + return new Promise((e => { + s.promise.then((() => { + r === l && e() + })) + })) + } + const g = { + set: m, + update: (t, o) => m(t(d, e), o), + subscribe: o.subscribe, + stiffness: i, + damping: r, + precision: n + }; + return g +} +var tc = Da(!1, (e => { + const t = window.matchMedia("(prefers-reduced-motion:reduce)"), + o = () => e(t.matches); + return o(), t.addListener(o), () => t.removeListener(o) + })), + oc = () => "ResizeObserver" in window; +const ic = qe(), + rc = (e, t, o, i, r) => { + e.rect || (e.rect = qe()); + const n = e.rect; + ht(ic, t, o, i, r), dt(n, ic) || (pt(n, ic), e.dispatchEvent(new CustomEvent("measure", { + detail: n + }))) + }, + nc = Math.round, + ac = e => { + const t = e.getBoundingClientRect(); + uc && rc(e, nc(t.x), nc(t.y), nc(t.width), nc(t.height)) + }, + sc = e => { + uc && rc(e, e.offsetLeft, e.offsetTop, e.offsetWidth, e.offsetHeight) + }, + lc = []; +let cc, dc, uc = void 0; + +function hc() { + lc.length ? (lc.forEach((e => e.measure(e))), uc = requestAnimationFrame(hc)) : uc = void 0 +} +let pc = new Map([]), + mc = 0, + gc = 0; +var $c = (e, t = {}) => { + const { + observePosition: o = !1, + observeViewRect: i = !1, + once: r = !1, + disabled: n = !1, + isMeasureRoot: a = !1 + } = t; + if (oc() && a && (dc || (dc = new ResizeObserver((e => { + e.forEach((e => { + pc.set(e.target, e.contentRect) + })); + const t = Array.from(pc.values()).some((({ + width: e, + height: t + }) => e > 0 && t > 0)); + t ? t && !1 === uc && hc() : (uc && cancelAnimationFrame(uc), uc = !1) + }))), dc.observe(e), mc++), !n) return !oc() || o || i ? (e.measure = i ? ac : sc, lc.push(e), void 0 === uc && (uc = requestAnimationFrame(hc)), e.measure(e), { + destroy() { + a && dc && (pc.delete(e), dc.unobserve(e), mc--, 0 === mc && (dc.disconnect(), dc = void 0)); + const t = lc.indexOf(e); + lc.splice(t, 1), delete e.measure + } + }) : (cc || (cc = new ResizeObserver((e => { + e.forEach((e => { + uc && sc(e.target) + })) + }))), cc.observe(e), sc(e), r ? cc.unobserve(e) : gc++, { + destroy() { + a && dc && (pc.delete(e), dc.unobserve(e), mc--, 0 === mc && (dc.disconnect(), dc = void 0)), r || (cc.unobserve(e), gc--, 0 === gc && (cc.disconnect(), cc = void 0)) + } + }) + }, + fc = e => { + let t = !1; + const o = { + pointerdown: () => { + t = !1 + }, + keydown: () => { + t = !0 + }, + keyup: () => { + t = !1 + }, + focus: e => { + t && (e.target.dataset.focusVisible = "") + }, + blur: e => { + delete e.target.dataset.focusVisible + } + }; + return Object.keys(o).forEach((t => e.addEventListener(t, o[t], !0))), { + destroy() { + Object.keys(o).forEach((t => e.removeEventListener(t, o[t], !0))) + } + } + }; +const yc = async e => new Promise((t => { + if ("file" === e.kind) return t(e.getAsFile()); + e.getAsString(t) +})); +var bc = (e, t = {}) => { + const o = e => { + e.preventDefault() + }, + i = async o => { + o.preventDefault(), o.stopPropagation(); + try { + const i = await (e => new Promise(((t, o) => { + const { + items: i + } = e.dataTransfer; + if (!i) return t([]); + Promise.all(Array.from(i).map(yc)).then((e => { + t(e.filter((e => Wo(e) && Yt(e) || /^http/.test(e)))) + })).catch(o) + })))(o); + e.dispatchEvent(new CustomEvent("dropfiles", { + detail: { + event: o, + resources: i + }, + ...t + })) + } catch (e) {} + }; + return e.addEventListener("drop", i), e.addEventListener("dragover", o), { + destroy() { + e.removeEventListener("drop", i), e.removeEventListener("dragover", o) + } + } +}; +let xc = null; +var vc = () => { + if (null === xc) + if (c()) { + const e = p("canvas"); + xc = !Cl(e, { + failIfMajorPerformanceCaveat: !0 + }), g(e) + } else xc = !1; + return xc + }, + wc = e => e instanceof WebGLTexture, + Sc = ([e, t, o, i]) => [i.x, i.y, e.x, e.y, o.x, o.y, t.x, t.y]; + +function kc(e) { + let t, o, i, r; + return { + c() { + t = kn("div"), o = kn("canvas"), An(t, "class", "PinturaCanvas") + }, + m(n, a) { + wn(n, t, a), bn(t, o), e[36](o), i || (r = [Pn(o, "measure", e[37]), hn($c.call(null, o))], i = !0) + }, + p: Gr, + i: Gr, + o: Gr, + d(o) { + o && Sn(t), e[36](null), i = !1, Kr(r) + } + } +} + +function Cc(e, t, o) { + let i, n, a, s, l, d, u; + const h = [0, 0, 0, 0], + m = le(), + f = c() && (e => { + const t = .5 * e, + o = p("canvas", { + "data-retain": !0, + width: e, + height: e + }), + i = o.getContext("2d"); + return i.fillStyle = "#f0f", i.fillRect(0, 0, t, t), i.fillRect(t, t, t, t), o + })(128), + y = qn(); + let b, { + isAnimated: x + } = t, + { + isTransparent: v + } = t, + { + maskRect: w + } = t, + { + maskOpacity: S = 1 + } = t, + { + maskFrameOpacity: k = .95 + } = t, + { + maskMarkupOpacity: C = 1 + } = t, + { + clipAnnotationsToImage: M = !0 + } = t, + { + pixelRatio: R = 1 + } = t, + { + textPixelRatio: P = R + } = t, + { + backgroundColor: E + } = t, + { + willRender: I = j + } = t, + { + didRender: A = j + } = t, + { + willRequest: L + } = t, + { + loadImageData: z = j + } = t, + { + enableGrid: F = !1 + } = t, + { + gridColors: O + } = t, + { + gridSize: D + } = t, + { + gridOpacity: B = 0 + } = t, + { + images: W = [] + } = t, + { + interfaceImages: V = [] + } = t, + { + selectionColor: _ + } = t, + N = null, + U = null, + G = null; + const Z = (e, t) => e.set(t, { + hard: !x + }), + X = { + precision: 1e-4 * .01 + }; + let Y = 0; + const q = Jl(void 0, { + duration: 0 + }); + on(e, q, (e => o(35, u = e))); + const K = ec(1, X); + on(e, K, (e => o(34, l = e))); + const J = ec(1, X); + on(e, J, (e => o(50, a = e))); + const Q = Ba(); + on(e, Q, (e => o(52, d = e))); + const ee = Ba(); + on(e, ee, (e => o(51, s = e))); + const te = {}, + oe = (e, t) => { + let o = te[e.id]; + const i = Math.min(1, 2048 / t.width); + let r = o ? o.element : p("canvas", { + width: t.width * i, + height: t.height * i, + "data-retain": !0 + }); + if (!o || ((e, t) => { + if (e.total !== t.length) return !0; + const o = e.last, + i = t[t.length - 1]; + return o.drawMode !== i.drawMode || !(!Ci(o) || Ci(i) && dt(o, i)) || !(!Ti(o) || Ti(i) && o.x === i.x && o.y === i.y && o.rx === i.rx && o.ry === i.ry) || !(!Ri(o) || Ri(i) && i.points.length === o.points.length) + })(o, e.actions)) { + r = r.cloneNode(), ((e, t, o) => { + const { + selectionColor: i = [1, 1, 1], + scalar: r = 1 + } = o || {}; + let n = !1; + for (const o of t) { + const t = "subtract" === o.drawMode; + if (t && !n) continue; + e.globalCompositeOperation = t ? "destination-out" : "source-over", e.save(), e.beginPath(); + const a = vr(o); + bo(e, r, r), yo(e, o.rotation, a), Wr(e, o.flipX, o.flipY, a), o.width ? Lr(e, { + ...o, + backgroundColor: i + }) : o.points ? Br(e, Object.assign({}, o, o.pathClose ? { + backgroundColor: i, + strokeColor: [0, 0, 0, 0] + } : { + strokeColor: i, + strokeJoin: "round", + strokeCap: "round" + })) : o.rx && zr(e, { + ...o, + backgroundColor: i, + strokeColor: [0, 0, 0, 0], + strokeJoin: "round", + strokeCap: "round" + }), e.restore(), n = !0 + } + })(r.getContext("2d"), e.actions, { + selectionColor: [1, 0, 1], + scalar: i + }); + const t = e.actions.length; + te[e.id] = { + total: t, + last: { + ...e.actions[t - 1] + }, + element: r + } + } + return { + x: 0, + y: 0, + ...t, + fillColor: e.color || [1, 1, 1], + backgroundImage: r + } + }; + let ie; + const re = () => { + cancelAnimationFrame(ie), ie = requestAnimationFrame((() => { + Ce = !0, Oe = 0, n() + })) + }, + ne = new Map([]), + ae = new Map([]), + se = (e, t) => ({ + filterParam: "pixelated" === e ? N.textureFilterNearest : N.textureFilterLinear, + wrapParam: "repeat" === t ? N.textureRepeat : N.textureClamp + }), + de = (e, t, o) => { + if (!ne.has(e)) { + ne.set(e, e); + const r = se(t, o); + if (!T(i = e) && (lo(i) || $(i) || Sr(i) || Kt(i))) { + const t = N.textureCreate(); + N.textureUpdate(t, e, r), ne.set(e, t) + } else z(e).then((t => { + if (!N || !t) return; + const o = N.textureCreate(); + N.textureUpdate(o, t, r), ne.set(e, o), re() + })).catch((t => { + ne.set(e, t) + })) + } + var i, r; + if (Kt(e) && ((r = e).currentTime > 0 && !r.paused && !r.ended && r.readyState > 2 || "true" === e.dataset.redraw)) { + const i = ne.get(e), + r = se(t, o); + return N.textureUpdate(i, e, r), e.dataset.redraw = !1, i + } + return ne.get(e) + }, + ue = (e, t = {}) => { + const o = t.id || e.id; + if (!e.text.length) return void ae.delete(o); + let { + text: i, + textAlign: r, + fontFamily: n, + fontSize: a = 16, + fontWeight: s, + fontVariant: l, + fontStyle: c, + letterSpacing: d, + lineHeight: u = a, + width: h, + height: m + } = e, { + outline: g = 0, + blur: $ = 0, + paddingTop: f = 0, + paddingRight: y = Yo, + paddingBottom: b = 0, + paddingLeft: x = Yo + } = t; + h = Eo(h) ? Math.floor(h) : h, m = Eo(m) ? Math.floor(m) : m; + const { + textSize: v, + signature: w + } = ((e = "", t) => { + let { + width: o = 0, + height: i = "auto", + fontSize: r, + fontFamily: n, + lineHeight: a, + fontWeight: s, + fontStyle: l, + fontVariant: c, + letterSpacing: d + } = t; + const u = No({ + text: e, + fontFamily: n, + fontWeight: s, + fontStyle: l, + fontVariant: c, + fontSize: r, + lineHeight: a, + letterSpacing: d, + width: o, + height: i + }); + let h = Jo.get(u); + if (h) return h; + let m = 1; + r > 1e3 && Xo() && (m = r / 1e3, r = 1e3, a *= m); + const g = jt(p("pre", { + contenteditable: "true", + spellcheck: "false", + style: `${ei}${qo({fontFamily:n,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:r,letterSpacing:d,lineHeight:a})};${Ko(e,t)}"`, + innerHTML: e + })), + $ = g.getBoundingClientRect(); + return h = { + signature: Qo(g).flat().map((e => e.text)).join("_;_"), + textSize: He(Le($), (e => Math.ceil(e * m))) + }, Jo.set(u, h), g.remove(), h + })(i, { + ...e, + width: h, + height: m + }), S = No({ + text: i, + textAlign: r, + fontFamily: n, + fontSize: a, + fontWeight: s, + fontVariant: l, + fontStyle: c, + lineHeight: u, + letterSpacing: d, + outline: g, + blur: $, + signature: w + }); + if (!ne.has(S)) { + ne.set(S, i); + const e = Math.ceil(v.width), + t = Math.ceil(v.height / u) * u; + if (0 === e || 0 === t) return; + const p = zl(), + w = Math.min(1, (p - (x + y) * P) / (e * P), (p - (f + b) * P) / (t * P)); + mi(i, { + fontSize: a, + fontFamily: n, + fontWeight: s, + fontVariant: l, + fontStyle: c, + letterSpacing: d, + textAlign: r, + lineHeight: u, + width: h, + height: m, + imageWidth: e, + imageHeight: t, + paddingLeft: x, + paddingTop: f, + paddingRight: y, + paddingBottom: b, + pixelRatio: P * w, + willRequest: L, + outline: g, + blur: $, + color: [1, 0, 1] + }).then((e => { + if (!N) return; + const t = N.textureCreate(); + N.textureUpdate(t, e, { + filterParam: N.textureFilterLinear, + wrapParam: N.textureClamp, + scalar: w + }), ne.set(S, t), ae.set(o, t), re() + })).catch(console.error) + } + const k = ne.get(S); + return wc(k) ? k : ae.get(o) + }, + he = new Map, + me = (e, t) => { + let o; + if (e.backgroundImage) o = de(e.backgroundImage, e.backgroundImageRendering, "repeat" === e.backgroundRepeat ? "repeat" : void 0); + else if (T(e.text)) { + if (e.width && e.width < 1 || e.height && e.height < 1) return; + o = ue(e, t) + } else e.bitmap && e.points && (o = (e => { + const { + id: t, + points: o, + strokeWidth: i, + strokeCap: r, + strokeJoin: n, + strokeColor: a + } = e; + let s = ne.get(t), + l = he.get(t); + const c = No({ + points: o.map((e => `${e.x},${e.y}`)).join(","), + strokeWidth: i, + strokeCap: r, + strokeJoin: n, + strokeColor: a + }); + if (l) { + const { + hash: e + } = l; + if (ne.has(t)) { + if (c === e) return ne.get(t) + } else l = void 0 + } + if (!l) { + const o = p("canvas", { + width: 1, + height: 1 + }); + l = { + canvas: o, + hash: void 0 + }, he.set(e.id, l), s = N.textureCreate(), N.textureUpdate(s, o, { + filterParam: N.textureFilterLinear, + wrapParam: N.textureClamp + }), ne.set(t, s) + } + const { + canvas: d + } = l, u = Math.ceil(e.strokeWidth), h = et(o), m = Math.floor(h.x) - .5 * u, g = Math.floor(h.y) - .5 * u, $ = Math.ceil(h.width + u), f = Math.ceil(h.height + u); + d.width = Math.max($, 1), d.height = Math.max(f, 1); + const y = d.getContext("2d"); + return y.clearRect(0, 0, d.width, d.height), $ >= 1 && f >= 1 && (y.translate(-m, -g), Br(y, e), y.resetTransform()), N.textureUpdate(s, d, { + filterParam: N.textureFilterLinear, + wrapParam: N.textureClamp + }), he.set(t, { + canvas: d, + hash: c + }), ne.get(t) + })(e)); + return o + }, + ge = ({ + texture: e, + size: t, + origin: o, + translation: i, + rotation: r, + scale: n, + colorMatrix: a, + opacity: s, + convolutionMatrix: l, + gamma: c, + vignette: d, + maskFeather: u, + maskCornerRadius: h, + overlayColor: p, + enableOverlay: m, + enableManipulation: g, + enableAntialiasing: $ + }) => { + let f = 0, + y = 0; + if (1 === R) { + const e = Math.abs(1 - n) < Number.EPSILON; + f = e && U % 2 != 0 ? .5 : 0, y = e && G % 2 != 0 ? .5 : 0 + } + return N.drawImage(e, t, o.x, o.y, i.x + f, i.y + y, r.x, r.y, r.z, n, a, rs(s, 0, 1), l, c, d, u, h, p, m, g, $), e + }, + $e = (e, t, o, i, r, n, a, s, l) => { + const c = { + ...t + }, + d = { + width: r.width / P * o, + height: r.height / P * o + }, + u = ce(0, 0), + h = { + width: d.width, + height: d.height + }; + return c.x -= l * o, c.y -= n * o, e.width ? (c.height = c.height ? c.height + n * o / i : d.height, c.width += (l + a) * o / i, "center" === e.textAlign ? u.x = .5 * (c.width - h.width / i) : "right" === e.textAlign && (u.x = c.width - h.width / i)) : (c.width = d.width, c.height = d.height), { + rect: c, + backgroundPosition: u, + backgroundSize: h + } + }, + fe = (e = [], t) => { + e.forEach((e => { + let o = me(e); + const i = "loading" === e.status || e.backgroundImage && o === e.backgroundImage; + i && re(); + const r = "error" === e.status || e.backgroundImage && o instanceof Error; + let n = wc(o) ? o : void 0; + const a = e._scale || 1, + s = e._translate || m, + l = e.strokeWidth && e.strokeWidth * a, + c = !!e.width, + d = !c && T(e.text) && n, + u = Lo(e.points), + h = Ti(e); + if (u) { + const i = e.points.map((e => ce(e.x * a + s.x, e.y * a + s.y))); + if (e.bitmap) { + o && t.push(o); + const r = et(i), + s = Math.ceil(e.strokeWidth * a); + N.drawRect({ + x: Math.floor(r.x) - .5 * s, + y: Math.floor(r.y) - .5 * s, + width: Math.ceil(r.width + s), + height: Math.ceil(r.height + s) + }, e.rotation, e.flipX, e.flipY, [0, 0, 0, 0], void 0, n, void 0, void 0, void 0, void 0, void 0, void 0, e.opacity, void 0, void 0, !1, !1) + } else N.drawPath(i, e.rotation, e.flipX, e.flipY, l, e.strokeColor, e.pathClose, e.backgroundColor, e.opacity) + } else if (h) { + let c = e.x, + d = e.y; + c *= a, d *= a, c += s.x, d += s.y; + const u = ce(c, d); + N.drawEllipse(u, e.rx * a, e.ry * a, e.rotation, e.flipX, e.flipY, e.backgroundColor, n, void 0, void 0, e.backgroundCorners && Sc(e.backgroundCorners), l, e.strokeColor, e.opacity, e.inverted), o && t.push(o), (i || r) && (e.backgroundColor || e.strokeColor && e.strokeWidth || N.drawEllipse(u, e.rx * a, e.ry * a, e.rotation, e.flipX, e.flipY, r ? [1, 0, 0, .25 * e.opacity] : [0, 0, 0, .25 * e.opacity]), r && Se(u), i && we(u)) + } else if (d || c) { + const c = n && N.textureGetSize(n); + let d, u, h, p = e.fillColor, + m = e.backgroundColor, + g = e.strokeColor, + $ = [e.cornerRadius, e.cornerRadius, e.cornerRadius, e.cornerRadius].map((e => e * a)); + d = e.width ? Qe(e) : { + x: e.x, + y: e.y, + ...c + }, a && s && (d.x *= a, d.y *= a, d.x += s.x, d.y += s.y, d.width *= a, d.height *= a), o && t.push(o); + const { + backgroundRepeat: f = "no-repeat" + } = e; + if (c) + if (e.backgroundImage && (e.backgroundSize || e.backgroundPosition || e.backgroundRepeat)) { + const t = H(c.width, c.height); + if ("repeat" === e.backgroundRepeat && (u = { + ...c + }, h = { + x: 0, + y: 0 + }), "contain" === e.backgroundSize) { + const o = yt(d, t, d); + u = ze(o), h = e.backgroundPosition ? e.backgroundPosition : ce(.5 * (d.width - u.width), .5 * (d.height - u.height)) + } else if ("cover" === e.backgroundSize) { + const o = ft(d, t, d); + u = ze(o), e.backgroundPosition ? h = e.backgroundPosition : (h = ce(o.x, o.y), h = ce(.5 * (d.width - u.width), .5 * (d.height - u.height))) + } else e.backgroundSize ? (u = e.backgroundSize, h = e.backgroundPosition || { + x: 0, + y: 0 + }) : e.backgroundPosition && (u = { + ...c + }, h = e.backgroundPosition) + } else if (e.text) { + const o = { + ...d + }; + if (e.backgroundColor || e.strokeColor) { + m = void 0, g = void 0; + const t = { + width: c.width / P * a, + height: c.height / P * a + }, + o = (e.width || t.width - 2 * Yo) * a, + i = (e.height || t.height) * a; + N.drawRect({ + ...d, + width: o, + height: i + }, e.rotation, e.flipX, e.flipY, $, e.backgroundColor, void 0, void 0, void 0, !1, void 0, l, e.strokeColor, e.opacity, void 0, void 0, void 0, e.inverted) + } + let i = 1; + e.fontSize > 1e3 && Xo() && (i = e.fontSize / 1e3), p = e.color || [0, 0, 0], e._prerender && (p[3] = 0); + const r = $e(e, o, a, i, c, 0, Yo, 0, Yo); + d = r.rect, h = r.backgroundPosition, u = r.backgroundSize; + const { + textShadowX: n, + textShadowY: s, + textShadowBlur: f + } = e; + if (n || s || f) { + const r = Math.ceil(.5 * f), + l = r, + c = Math.max(Yo, r), + u = r, + h = Math.max(Yo, r), + p = me(e, { + id: e.id + "shadow", + blur: f, + paddingTop: l, + paddingRight: c, + paddingBottom: u, + paddingLeft: h + }); + if (p && !e._prerender) { + t.push(p); + const r = N.textureGetSize(p), + { + rect: u, + backgroundPosition: m, + backgroundSize: g + } = $e(e, o, a, i, r, l, c, 0, h), + $ = rt(d), + f = rt(u); + f.x += n, f.y += s; + const y = pe(f, e.rotation, $), + b = { + x: y.x - .5 * u.width, + y: y.y - .5 * u.height, + width: u.width, + height: u.height + }; + e.height && (b.height -= s), N.drawRect(b, e.rotation, e.flipX, e.flipY, [0, 0, 0, 0], void 0, p, g, m, !1, void 0, void 0, void 0, e.opacity, void 0, 0, e.textShadowColor) + } + } + if (e.textOutlineWidth) { + const r = Math.ceil(.5 * e.textOutlineWidth), + n = r, + s = Yo + r, + l = r, + c = Yo + r, + d = me(e, { + id: e.id + "outline", + outline: e.textOutlineWidth, + paddingTop: n, + paddingRight: s, + paddingBottom: l, + paddingLeft: c + }); + if (d && !e._prerender) { + const r = N.textureGetSize(d); + t.push(d); + const { + rect: l, + backgroundPosition: u, + backgroundSize: h + } = $e(e, o, a, i, r, n, s, 0, c); + N.drawRect(l, e.rotation, e.flipX, e.flipY, [0, 0, 0, 0], void 0, d, h, u, !1, void 0, void 0, void 0, e.opacity, void 0, 0, e.textOutlineColor) + } + } + } + if (N.drawRect(d, e.rotation, e.flipX, e.flipY, $, m, n, u, h, "repeat" === f, e.backgroundCorners && Sc(e.backgroundCorners), l, g, e.opacity, void 0, e.feather, p, e.inverted), i || r) { + e.backgroundColor && 0 !== e.backgroundColor[3] || e.strokeColor && e.strokeWidth || N.drawRect(d, e.rotation, e.flipX, e.flipY, $, r ? [1, .2549, .2118, .25 * e.opacity] : [0, 0, 0, .25 * e.opacity]); + const t = rt(d); + r && Se(t), i && we(t) + } + } else o && t.push(o) + })) + }; + let ye = 0; + const be = [{ + x: -5, + y: -5 + }, { + x: 5, + y: 5 + }], + xe = [{ + x: 5, + y: -5 + }, { + x: -5, + y: 5 + }], + ve = It({ + x: 0, + y: 0 + }, 10, 10, 0, !1, !1, 16); + ve.length = 9; + const we = e => { + ye = Date.now() / 50, N.drawEllipse(e, 15, 15, 0, !1, !1, [0, 0, 0, .5]); + const t = Ee(ve.map((t => ({ + x: t.x + e.x, + y: t.y + e.y + }))), ye, e.x, e.y); + N.drawPath(t, 0, !1, !1, 2, [1, 1, 1]) + }, + Se = e => { + N.drawEllipse(e, 13, 13, 0, !1, !1, [1, .2549, .2118, .75]); + const t = be.map((t => ({ + x: t.x + e.x, + y: t.y + e.y + }))), + o = xe.map((t => ({ + x: t.x + e.x, + y: t.y + e.y + }))); + N.drawPath(t, 0, !1, !1, 3, [1, 1, 1]), N.drawPath(o, 0, !1, !1, 3, [1, 1, 1]) + }, + ke = (e, t, o, i, r, n) => N.drawRect(t, 0, !1, !1, h, h, e, i, o, !0, void 0, 0, void 0, n, void 0, void 0, r); + let Ce = !1, + Te = !0, + Me = !1; + const Re = [], + Pe = [], + Ie = [], + Ae = () => { + Ie.length = 0; + const e = W[0], + { + manipulationShapes: t, + manipulationShapesDirty: o, + annotationShapes: i, + annotationShapesDirty: r, + interfaceShapes: n, + decorationShapes: c, + frameShapes: p, + selectionShapes: m + } = I({ + opacity: e.opacity, + rotation: e.rotation, + scale: e.scale, + images: W, + size: De(U, G), + backgroundColor: [...u], + selectionRect: d + }), + g = [...u], + $ = d, + y = rs(l, 0, 1), + b = s, + x = Math.abs(e.rotation.x / Math.PI * 2 - 1), + S = Math.abs(e.rotation.y / Math.PI * 2 - 1), + k = x < .99 || S < .99, + T = { + ...e.size + }, + R = e.backgroundColor, + E = e.backgroundImage, + L = t.length > 0, + z = i.length > 0, + H = R[3] > 0, + j = !!M && C >= 1; + if (y < 1 && H) { + const e = g[0], + t = g[1], + o = g[2], + i = 1 - y, + r = R[0] * i, + n = R[1] * i, + a = R[2] * i, + s = 1 - i; + g[0] = r + e * s, g[1] = n + t * s, g[2] = a + o * s, g[3] = 1 + } + N.setCanvasColor(v ? h : g); + L && (o || Ce) ? (N.disableMask(), N.drawToImageBlendBuffer(T), Re.length = 0, fe(t, Re)) : L || (Re.length = 0), Ie.push(...Re), Te && (N.drawToImageOverlayBuffer(T, P), Te = !1); + if (k ? (z && (r || Ce) || !Me ? (N.disableMask(), N.drawToImageOverlayBuffer(T, P), Pe.length = 0, fe(i, Pe)) : z || (Pe.length = 0), Me = !0) : Me = !1, N.drawToCanvas(), N.enableMask($, y), F && D >= 1 && 2 === O.length && B && ((e, t, o, i, r) => { + const n = De(t, t), + a = de(f, "pixelated", "repeat"), + s = ce(-e.x % t, -e.y % t), + l = ce(s.x + .5 * n.width, s.y); + ke(a, e, s, n, o, r), ke(a, e, l, n, i, r) + })($, D, O[0], O[1], B), H && N.drawRect($, 0, !1, !1, h, R), E) { + N.enableMask($, 1); + const e = Math.max(w.width / E.width, w.height / E.height), + t = E.width * e, + o = E.height * e, + i = { + x: w.x + .5 * w.width - .5 * t, + y: w.y + .5 * w.height - .5 * o, + width: t, + height: o + }; + N.drawRect(i, 0, !1, !1, h, h, de(E, "linear")), N.enableMask($, y) + } + if (j && N.enablePreviewStencil(), Ie.push(...[...W].reverse().map((e => ge({ + ...e, + texture: de(e.data), + enableOverlay: k && z, + enableManipulation: L, + enableAntialiasing: !0, + mask: $, + maskOpacity: y, + overlayColor: b + })))), N.enableMask($, C), k || (j && N.applyPreviewStencil(), N.resetCanvasMatrix(), N.updateCanvasMatrix(T, e.origin, e.translation, e.scale, e.rotation), Pe.length = 0, fe(i, Pe), j && N.disablePreviewStencil()), Ie.push(...Pe), N.resetCanvasMatrix(), N.enableMask($, C), fe(c, Ie), p.length) { + N.enableMask($, 1); + const e = p.filter((e => !e.expandsCanvas)), + t = p.filter((e => e.expandsCanvas)); + e.length && fe(e, Ie), t.length && (N.enableMask({ + x: $.x + .5, + y: $.y + .5, + width: $.width - 1, + height: $.height - 1 + }, a), fe(t, Ie)) + } + if (_ && m.length && !k) { + N.resetCanvasMatrix(), N.updateCanvasMatrix(T, e.origin, e.translation, e.scale, e.rotation); + const t = [..._]; + t[3] = .5; + const o = [{ + id: "selection", + color: t, + actions: [...m] + }].map((e => oe(e, T))); + fe(o, Ie), N.resetCanvasMatrix() + } + N.disableMask(), fe(n, Ie), V.forEach((e => { + if (N.enableMask(e.mask, e.maskOpacity), e.backgroundColor) { + const t = E && ft({ + ...e.mask + }, E.width / E.height), + o = E && de(E, "linear"); + N.drawRect(e.mask, 0, !1, !1, e.maskCornerRadius, e.backgroundColor, o, t, t, void 0, void 0, void 0, void 0, e.opacity, e.maskFeather), o && Ie.push(o) + } + const t = ge({ + ...e, + texture: de(e.data), + enableAntialiasing: !1, + translation: { + x: e.translation.x + e.offset.x - .5 * U, + y: e.translation.y + e.offset.y - .5 * G + } + }); + Ie.push(t) + })), N.disableMask(), (e => { + ne.forEach(((t, o) => { + !e.find((e => e === t)) && wc(t) && (Array.from(ae.values()).includes(t) || (ne.delete(o), N.textureDelete(t))) + })) + })(Ie), A(), Ce = !1 + }; + let Fe, Oe = 0; + const Be = () => { + clearTimeout(Fe); + const e = Date.now(); + e - Oe < 48 ? Fe = setTimeout(Be, 48) : (Oe = e, Ae()) + }; + Xn((() => n())), Zn((() => o(30, N = jl(b, { + alpha: v + })))), Yn((() => { + N && (he.forEach((({ + canvas: e + }) => g(e))), he.clear(), N.release(), o(30, N = void 0), o(0, b = void 0)) + })); + return e.$$set = e => { + "isAnimated" in e && o(9, x = e.isAnimated), "isTransparent" in e && o(10, v = e.isTransparent), "maskRect" in e && o(11, w = e.maskRect), "maskOpacity" in e && o(12, S = e.maskOpacity), "maskFrameOpacity" in e && o(13, k = e.maskFrameOpacity), "maskMarkupOpacity" in e && o(14, C = e.maskMarkupOpacity), "clipAnnotationsToImage" in e && o(15, M = e.clipAnnotationsToImage), "pixelRatio" in e && o(16, R = e.pixelRatio), "textPixelRatio" in e && o(17, P = e.textPixelRatio), "backgroundColor" in e && o(18, E = e.backgroundColor), "willRender" in e && o(19, I = e.willRender), "didRender" in e && o(20, A = e.didRender), "willRequest" in e && o(21, L = e.willRequest), "loadImageData" in e && o(22, z = e.loadImageData), "enableGrid" in e && o(23, F = e.enableGrid), "gridColors" in e && o(24, O = e.gridColors), "gridSize" in e && o(25, D = e.gridSize), "gridOpacity" in e && o(26, B = e.gridOpacity), "images" in e && o(27, W = e.images), "interfaceImages" in e && o(28, V = e.interfaceImages), "selectionColor" in e && o(29, _ = e.selectionColor) + }, e.$$.update = () => { + if (1 & e.$$.dirty[0] && b) { + const e = getComputedStyle(b).getPropertyValue("--color-transition-duration"); + o(31, Y = (e => { + let t = parseFloat(e); + return /^[0-9]+s$/.test(e) ? 1e3 * t : t + })(e)) + } + 262656 & e.$$.dirty[0] | 1 & e.$$.dirty[1] && E && q.set(E, { + duration: x ? Y : 0 + }), 4096 & e.$$.dirty[0] && Z(K, Eo(S) ? S : 1), 8192 & e.$$.dirty[0] && Z(J, Eo(k) ? k : 1), 2048 & e.$$.dirty[0] && w && Q.set(w), 24 & e.$$.dirty[1] && u && ee.set([u[0], u[1], u[2], rs(l, 0, 1)]), 1207959558 & e.$$.dirty[0] && o(33, i = !!(N && U && G && W.length)), 1073807366 & e.$$.dirty[0] && U && G && N && (Oe = 0, N.resize(U, G, R)), 4 & e.$$.dirty[1] && o(32, n = i ? vc() ? Be : Ae : r), 6 & e.$$.dirty[1] && i && n && n() + }, [b, U, G, y, q, K, J, Q, ee, x, v, w, S, k, C, M, R, P, E, I, A, L, z, F, O, D, B, W, V, _, N, Y, n, i, l, u, function(e) { + ta[e ? "unshift" : "push"]((() => { + b = e, o(0, b) + })) + }, e => { + o(1, U = e.detail.width), o(2, G = e.detail.height), y("measure", { + width: U, + height: G + }) + }] +} +class Tc extends Fa { + constructor(e) { + super(), za(this, e, Cc, kc, Qr, { + isAnimated: 9, + isTransparent: 10, + maskRect: 11, + maskOpacity: 12, + maskFrameOpacity: 13, + maskMarkupOpacity: 14, + clipAnnotationsToImage: 15, + pixelRatio: 16, + textPixelRatio: 17, + backgroundColor: 18, + willRender: 19, + didRender: 20, + willRequest: 21, + loadImageData: 22, + enableGrid: 23, + gridColors: 24, + gridSize: 25, + gridOpacity: 26, + images: 27, + interfaceImages: 28, + selectionColor: 29 + }, null, [-1, -1, -1]) + } +} +var Mc = (e, t = Boolean, o = " ") => e.filter(t).join(o); + +function Rc(e, t, o) { + const i = e.slice(); + return i[17] = t[o], i +} +const Pc = e => ({ + tab: 4 & e + }), + Ec = e => ({ + tab: e[17] + }); + +function Ic(e) { + let t, o, i, r = [], + n = new Map, + a = e[2]; + const s = e => e[17].id; + for (let t = 0; t < a.length; t += 1) { + let o = Rc(e, a, t), + i = s(o); + n.set(i, r[t] = Ac(i, o)) + } + return { + c() { + t = kn("ul"); + for (let e = 0; e < r.length; e += 1) r[e].c(); + An(t, "class", o = Mc(["PinturaTabList", e[0]])), An(t, "role", "tablist"), An(t, "data-layout", e[1]) + }, + m(o, n) { + wn(o, t, n); + for (let e = 0; e < r.length; e += 1) r[e].m(t, null); + e[14](t), i = !0 + }, + p(e, l) { + 1124 & l && (a = e[2], ya(), r = Ma(r, l, s, 1, e, a, n, t, Ta, Ac, null, Rc), ba()), (!i || 1 & l && o !== (o = Mc(["PinturaTabList", e[0]]))) && An(t, "class", o), (!i || 2 & l) && An(t, "data-layout", e[1]) + }, + i(e) { + if (!i) { + for (let e = 0; e < a.length; e += 1) xa(r[e]); + i = !0 + } + }, + o(e) { + for (let e = 0; e < r.length; e += 1) va(r[e]); + i = !1 + }, + d(o) { + o && Sn(t); + for (let e = 0; e < r.length; e += 1) r[e].d(); + e[14](null) + } + } +} + +function Ac(e, t) { + let o, i, r, n, a, s, l, c, d, u; + const h = t[11].default, + p = rn(h, t, t[10], Ec); + + function m(...e) { + return t[12](t[17], ...e) + } + + function g(...e) { + return t[13](t[17], ...e) + } + return { + key: e, + first: null, + c() { + o = kn("li"), i = kn("button"), p && p.c(), n = Mn(), An(i, "type", "button"), i.disabled = r = t[17].disabled, An(o, "role", "tab"), An(o, "aria-controls", a = t[17].href.substr(1)), An(o, "id", s = t[17].tabId), An(o, "aria-selected", l = t[17].selected), this.first = o + }, + m(e, t) { + wn(e, o, t), bn(o, i), p && p.m(i, null), bn(o, n), c = !0, d || (u = [Pn(i, "keydown", m), Pn(i, "click", g)], d = !0) + }, + p(e, n) { + t = e, p && p.p && (!c || 1028 & n) && sn(p, h, t, t[10], c ? an(h, t[10], n, Pc) : ln(t[10]), Ec), (!c || 4 & n && r !== (r = t[17].disabled)) && (i.disabled = r), (!c || 4 & n && a !== (a = t[17].href.substr(1))) && An(o, "aria-controls", a), (!c || 4 & n && s !== (s = t[17].tabId)) && An(o, "id", s), (!c || 4 & n && l !== (l = t[17].selected)) && An(o, "aria-selected", l) + }, + i(e) { + c || (xa(p, e), c = !0) + }, + o(e) { + va(p, e), c = !1 + }, + d(e) { + e && Sn(o), p && p.d(e), d = !1, Kr(u) + } + } +} + +function Lc(e) { + let t, o, i = e[4] && Ic(e); + return { + c() { + i && i.c(), t = Rn() + }, + m(e, r) { + i && i.m(e, r), wn(e, t, r), o = !0 + }, + p(e, [o]) { + e[4] ? i ? (i.p(e, o), 16 & o && xa(i, 1)) : (i = Ic(e), i.c(), xa(i, 1), i.m(t.parentNode, t)) : i && (ya(), va(i, 1, 1, (() => { + i = null + })), ba()) + }, + i(e) { + o || (xa(i), o = !0) + }, + o(e) { + va(i), o = !1 + }, + d(e) { + i && i.d(e), e && Sn(t) + } + } +} + +function zc(e, t, o) { + let i, r, n, { + $$slots: a = {}, + $$scope: s + } = t, + { + class: l + } = t, + { + name: c + } = t, + { + selected: d + } = t, + { + tabs: u = [] + } = t, + { + layout: h + } = t; + const p = qn(), + m = e => { + const t = n.querySelectorAll('[role="tab"] button')[e]; + t && t.focus() + }, + g = (e, t) => { + e.preventDefault(), e.stopPropagation(), p("select", t) + }, + $ = ({ + key: e + }, t) => { + if (!/arrow/i.test(e)) return; + const o = u.findIndex((e => e.id === t)); + return /right|down/i.test(e) ? m(o < u.length - 1 ? o + 1 : 0) : /left|up/i.test(e) ? m(o > 0 ? o - 1 : u.length - 1) : void 0 + }; + return e.$$set = e => { + "class" in e && o(0, l = e.class), "name" in e && o(7, c = e.name), "selected" in e && o(8, d = e.selected), "tabs" in e && o(9, u = e.tabs), "layout" in e && o(1, h = e.layout), "$$scope" in e && o(10, s = e.$$scope) + }, e.$$.update = () => { + 896 & e.$$.dirty && o(2, i = u.map((e => { + const t = e.id === d; + return { + ...e, + tabId: `tab-${c}-${e.id}`, + href: `#panel-${c}-${e.id}`, + selected: t + } + }))), 4 & e.$$.dirty && o(4, r = i.length > 1) + }, [l, h, i, n, r, g, $, c, d, u, s, a, (e, t) => $(t, e.id), (e, t) => g(t, e.id), function(e) { + ta[e ? "unshift" : "push"]((() => { + n = e, o(3, n) + })) + }] +} +class Fc extends Fa { + constructor(e) { + super(), za(this, e, zc, Lc, Qr, { + class: 0, + name: 7, + selected: 8, + tabs: 9, + layout: 1 + }) + } +} +const Oc = e => ({ + panel: 16 & e + }), + Dc = e => ({ + panel: e[4][0].id, + panelIsActive: !0 + }); + +function Bc(e, t, o) { + const i = e.slice(); + return i[14] = t[o].id, i[15] = t[o].shouldDraw, i[16] = t[o].panelId, i[17] = t[o].tabindex, i[18] = t[o].labelledBy, i[19] = t[o].isActive, i[20] = t[o].hidden, i[3] = t[o].visible, i +} +const Wc = e => ({ + panel: 16 & e, + panelIsActive: 16 & e + }), + Vc = e => ({ + panel: e[14], + panelIsActive: e[19] + }); + +function _c(e) { + let t, o, i, r, n, a; + const s = e[11].default, + l = rn(s, e, e[10], Dc); + return { + c() { + t = kn("div"), o = kn("div"), l && l.c(), An(o, "class", i = Mc([e[1]])), An(t, "class", e[0]), An(t, "style", e[2]) + }, + m(i, s) { + wn(i, t, s), bn(t, o), l && l.m(o, null), r = !0, n || (a = [Pn(t, "measure", e[13]), hn($c.call(null, t))], n = !0) + }, + p(e, n) { + l && l.p && (!r || 1040 & n) && sn(l, s, e, e[10], r ? an(s, e[10], n, Oc) : ln(e[10]), Dc), (!r || 2 & n && i !== (i = Mc([e[1]]))) && An(o, "class", i), (!r || 1 & n) && An(t, "class", e[0]), (!r || 4 & n) && An(t, "style", e[2]) + }, + i(e) { + r || (xa(l, e), r = !0) + }, + o(e) { + va(l, e), r = !1 + }, + d(e) { + e && Sn(t), l && l.d(e), n = !1, Kr(a) + } + } +} + +function Nc(e) { + let t, o, i, r, n, a = [], + s = new Map, + l = e[4]; + const c = e => e[14]; + for (let t = 0; t < l.length; t += 1) { + let o = Bc(e, l, t), + i = c(o); + s.set(i, a[t] = jc(i, o)) + } + return { + c() { + t = kn("div"); + for (let e = 0; e < a.length; e += 1) a[e].c(); + An(t, "class", o = Mc(["PinturaTabPanels", e[0]])), An(t, "style", e[2]) + }, + m(o, s) { + wn(o, t, s); + for (let e = 0; e < a.length; e += 1) a[e].m(t, null); + i = !0, r || (n = [Pn(t, "measure", e[12]), hn($c.call(null, t, { + observePosition: !0 + }))], r = !0) + }, + p(e, r) { + 1042 & r && (l = e[4], ya(), a = Ma(a, r, c, 1, e, l, s, t, Ta, jc, null, Bc), ba()), (!i || 1 & r && o !== (o = Mc(["PinturaTabPanels", e[0]]))) && An(t, "class", o), (!i || 4 & r) && An(t, "style", e[2]) + }, + i(e) { + if (!i) { + for (let e = 0; e < l.length; e += 1) xa(a[e]); + i = !0 + } + }, + o(e) { + for (let e = 0; e < a.length; e += 1) va(a[e]); + i = !1 + }, + d(e) { + e && Sn(t); + for (let e = 0; e < a.length; e += 1) a[e].d(); + r = !1, Kr(n) + } + } +} + +function Hc(e) { + let t; + const o = e[11].default, + i = rn(o, e, e[10], Vc); + return { + c() { + i && i.c() + }, + m(e, o) { + i && i.m(e, o), t = !0 + }, + p(e, r) { + i && i.p && (!t || 1040 & r) && sn(i, o, e, e[10], t ? an(o, e[10], r, Wc) : ln(e[10]), Vc) + }, + i(e) { + t || (xa(i, e), t = !0) + }, + o(e) { + va(i, e), t = !1 + }, + d(e) { + i && i.d(e) + } + } +} + +function jc(e, t) { + let o, i, r, n, a, s, l, c, d, u = t[15] && Hc(t); + return { + key: e, + first: null, + c() { + o = kn("div"), u && u.c(), i = Mn(), An(o, "class", r = Mc(["PinturaTabPanel", t[1]])), o.hidden = n = t[20], An(o, "id", a = t[16]), An(o, "tabindex", s = t[17]), An(o, "aria-labelledby", l = t[18]), An(o, "data-inert", c = !t[3]), this.first = o + }, + m(e, t) { + wn(e, o, t), u && u.m(o, null), bn(o, i), d = !0 + }, + p(e, h) { + (t = e)[15] ? u ? (u.p(t, h), 16 & h && xa(u, 1)) : (u = Hc(t), u.c(), xa(u, 1), u.m(o, i)): u && (ya(), va(u, 1, 1, (() => { + u = null + })), ba()), (!d || 2 & h && r !== (r = Mc(["PinturaTabPanel", t[1]]))) && An(o, "class", r), (!d || 16 & h && n !== (n = t[20])) && (o.hidden = n), (!d || 16 & h && a !== (a = t[16])) && An(o, "id", a), (!d || 16 & h && s !== (s = t[17])) && An(o, "tabindex", s), (!d || 16 & h && l !== (l = t[18])) && An(o, "aria-labelledby", l), (!d || 16 & h && c !== (c = !t[3])) && An(o, "data-inert", c) + }, + i(e) { + d || (xa(u), d = !0) + }, + o(e) { + va(u), d = !1 + }, + d(e) { + e && Sn(o), u && u.d() + } + } +} + +function Uc(e) { + let t, o, i, r; + const n = [Nc, _c], + a = []; + + function s(e, t) { + return e[5] ? 0 : 1 + } + return t = s(e), o = a[t] = n[t](e), { + c() { + o.c(), i = Rn() + }, + m(e, o) { + a[t].m(e, o), wn(e, i, o), r = !0 + }, + p(e, [r]) { + let l = t; + t = s(e), t === l ? a[t].p(e, r) : (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba(), o = a[t], o ? o.p(e, r) : (o = a[t] = n[t](e), o.c()), xa(o, 1), o.m(i.parentNode, i)) + }, + i(e) { + r || (xa(o), r = !0) + }, + o(e) { + va(o), r = !1 + }, + d(e) { + a[t].d(e), e && Sn(i) + } + } +} + +function Gc(e, t, o) { + let i, r, { + $$slots: n = {}, + $$scope: a + } = t, + { + class: s + } = t, + { + name: l + } = t, + { + selected: c + } = t, + { + panelClass: d + } = t, + { + panels: u = [] + } = t, + { + visible: h + } = t, + { + style: p + } = t; + const m = {}; + return e.$$set = e => { + "class" in e && o(0, s = e.class), "name" in e && o(6, l = e.name), "selected" in e && o(7, c = e.selected), "panelClass" in e && o(1, d = e.panelClass), "panels" in e && o(8, u = e.panels), "visible" in e && o(3, h = e.visible), "style" in e && o(2, p = e.style), "$$scope" in e && o(10, a = e.$$scope) + }, e.$$.update = () => { + 968 & e.$$.dirty && o(4, i = u.map((e => { + const t = e === c; + t && o(9, m[e] = !0, m); + const i = h ? -1 !== h.indexOf(e) : t; + return { + id: e, + panelId: `panel-${l}-${e}`, + labelledBy: `tab-${l}-${e}`, + isActive: t, + hidden: !t, + visible: i, + tabindex: t ? 0 : -1, + shouldDraw: t || m[e] + } + }))), 16 & e.$$.dirty && o(5, r = i.length > 1) + }, [s, d, p, h, i, r, l, c, u, m, a, n, function(t) { + Qn.call(this, e, t) + }, function(t) { + Qn.call(this, e, t) + }] +} +class Zc extends Fa { + constructor(e) { + super(), za(this, e, Gc, Uc, Qr, { + class: 0, + name: 6, + selected: 7, + panelClass: 1, + panels: 8, + visible: 3, + style: 2 + }) + } +} +var Xc = e => { + const t = Object.getOwnPropertyDescriptors(e.prototype); + return Object.keys(t).filter((e => !!t[e].get)) +}; + +function Yc(e) { + let t, o, i, r; + const n = [e[4]]; + + function a(t) { + e[22](t) + } + var s = e[10]; + + function l(e) { + let t = {}; + for (let e = 0; e < n.length; e += 1) t = Xr(t, n[e]); + return void 0 !== e[2] && (t.name = e[2]), { + props: t + } + } + return s && (t = Wn(s, l(e)), ta.push((() => Ea(t, "name", a))), e[23](t), t.$on("measure", e[11])), { + c() { + t && Ia(t.$$.fragment), i = Rn() + }, + m(e, o) { + t && Aa(t, e, o), wn(e, i, o), r = !0 + }, + p(e, r) { + const c = 16 & r[0] ? Ra(n, [Pa(e[4])]) : {}; + if (!o && 4 & r[0] && (o = !0, c.name = e[2], ca((() => o = !1))), s !== (s = e[10])) { + if (t) { + ya(); + const e = t; + va(e.$$.fragment, 1, 0, (() => { + La(e, 1) + })), ba() + } + s ? (t = Wn(s, l(e)), ta.push((() => Ea(t, "name", a))), e[23](t), t.$on("measure", e[11]), Ia(t.$$.fragment), xa(t.$$.fragment, 1), Aa(t, i.parentNode, i)) : t = null + } else s && t.$set(c) + }, + i(e) { + r || (t && xa(t.$$.fragment, e), r = !0) + }, + o(e) { + t && va(t.$$.fragment, e), r = !1 + }, + d(o) { + e[23](null), o && Sn(i), t && La(t, o) + } + } +} + +function qc(e) { + let t, o, i, r = e[5] && Yc(e); + return { + c() { + t = kn("div"), r && r.c(), An(t, "data-util", e[2]), An(t, "class", o = Mc(["PinturaUtilPanel", e[1]])), An(t, "style", e[6]) + }, + m(o, n) { + wn(o, t, n), r && r.m(t, null), e[24](t), i = !0 + }, + p(e, n) { + e[5] ? r ? (r.p(e, n), 32 & n[0] && xa(r, 1)) : (r = Yc(e), r.c(), xa(r, 1), r.m(t, null)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), (!i || 4 & n[0]) && An(t, "data-util", e[2]), (!i || 2 & n[0] && o !== (o = Mc(["PinturaUtilPanel", e[1]]))) && An(t, "class", o), (!i || 64 & n[0]) && An(t, "style", e[6]) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(o) { + o && Sn(t), r && r.d(), e[24](null) + } + } +} + +function Kc(e, t, o) { + let i, r, n, a, s, l; + const c = qn(); + let { + isActive: d = !0 + } = t, { + stores: u + } = t, { + content: h + } = t, { + component: p + } = t, { + locale: m + } = t, { + class: g + } = t; + const $ = Jn("isAnimated"); + let f; + on(e, $, (e => o(21, l = e))); + const y = ec(0), + b = Wa(y, (e => rs(e, 0, 1))); + on(e, b, (e => o(20, s = e))); + let x = !d; + const v = Ba(d); + on(e, v, (e => o(25, a = e))); + const w = { + isActive: Wa(v, (async (e, t) => { + if (!e) return t(e); + await sa(), t(e) + })), + isActiveFraction: Wa(b, (e => e)), + isVisible: Wa(b, (e => e > 0)) + }, + S = h.view, + k = Xc(S), + C = Object.keys(h.props || {}).reduce(((e, t) => k.includes(t) ? (e[t] = h.props[t], e) : e), {}), + T = Object.keys(w).reduce(((e, t) => k.includes(t) ? (e[t] = w[t], e) : e), {}); + let M, R; + const P = e => { + o(17, f = { + ...e.detail + }), I && d && c("measure", { + ...f + }) + }; + Kn("measurable", $c); + const E = Gn().$$.context; + let I = !1; + return Zn((() => { + if (o(19, I = !0), n) return; + o(0, p = new S({ + target: R, + props: { + ...r + }, + context: E + })), o(2, M = p.name); + const e = p.$on("measure", P); + return () => { + e(), p.$destroy() + } + })), e.$$set = e => { + "isActive" in e && o(12, d = e.isActive), "stores" in e && o(13, u = e.stores), "content" in e && o(14, h = e.content), "component" in e && o(0, p = e.component), "locale" in e && o(15, m = e.locale), "class" in e && o(1, g = e.class) + }, e.$$.update = () => { + 135169 & e.$$.dirty[0] && f && d && p && c("measure", f), 2101248 & e.$$.dirty[0] && y.set(d ? 1 : 0, { + hard: !1 === l + }), 1310720 & e.$$.dirty[0] && (s <= 0 && !x ? o(18, x = !0) : s > 0 && x && o(18, x = !1)), 786432 & e.$$.dirty[0] && I && c(x ? "hide" : "show"), 1048576 & e.$$.dirty[0] && c("fade", s), 1048576 & e.$$.dirty[0] && o(6, i = s < 1 ? "opacity: " + s : void 0), 4096 & e.$$.dirty[0] && un(v, a = d, a), 40960 & e.$$.dirty[0] && o(4, r = { + ...C, + ...T, + stores: u, + locale: m + }) + }, o(5, n = !k.includes("external")), [p, g, M, R, r, n, i, $, b, v, S, P, d, u, h, m, y, f, x, I, s, l, function(e) { + M = e, o(2, M) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + p = e, o(0, p) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + R = e, o(3, R) + })) + }] +} +class Jc extends Fa { + constructor(e) { + super(), za(this, e, Kc, qc, Qr, { + isActive: 12, + stores: 13, + content: 14, + component: 0, + locale: 15, + class: 1, + opacity: 16 + }, null, [-1, -1]) + } + get opacity() { + return this.$$.ctx[16] + } +} + +function Qc(e) { + let t, o, i; + const r = e[5].default, + n = rn(r, e, e[4], null); + return { + c() { + t = Cn("svg"), n && n.c(), An(t, "class", e[3]), An(t, "style", e[2]), An(t, "width", e[0]), An(t, "height", e[1]), An(t, "viewBox", o = "0 0 " + e[0] + "\n " + e[1]), An(t, "xmlns", "http://www.w3.org/2000/svg"), An(t, "aria-hidden", "true"), An(t, "focusable", "false"), An(t, "stroke-linecap", "round"), An(t, "stroke-linejoin", "round") + }, + m(e, o) { + wn(e, t, o), n && n.m(t, null), i = !0 + }, + p(e, [a]) { + n && n.p && (!i || 16 & a) && sn(n, r, e, e[4], i ? an(r, e[4], a, null) : ln(e[4]), null), (!i || 8 & a) && An(t, "class", e[3]), (!i || 4 & a) && An(t, "style", e[2]), (!i || 1 & a) && An(t, "width", e[0]), (!i || 2 & a) && An(t, "height", e[1]), (!i || 3 & a && o !== (o = "0 0 " + e[0] + "\n " + e[1])) && An(t, "viewBox", o) + }, + i(e) { + i || (xa(n, e), i = !0) + }, + o(e) { + va(n, e), i = !1 + }, + d(e) { + e && Sn(t), n && n.d(e) + } + } +} + +function ed(e, t, o) { + let { + $$slots: i = {}, + $$scope: r + } = t, { + width: n = 24 + } = t, { + height: a = 24 + } = t, { + style: s + } = t, { + class: l + } = t; + return e.$$set = e => { + "width" in e && o(0, n = e.width), "height" in e && o(1, a = e.height), "style" in e && o(2, s = e.style), "class" in e && o(3, l = e.class), "$$scope" in e && o(4, r = e.$$scope) + }, [n, a, s, l, r, i] +} +class td extends Fa { + constructor(e) { + super(), za(this, e, ed, Qc, Qr, { + width: 0, + height: 1, + style: 2, + class: 3 + }) + } +} +var od = (e, t) => t === e.target || t.contains(e.target), + id = (e, t, o) => { + return (T(t) ? t : e) + (o ? ` (${i=o,i.map((e=>"CMD"===e?ho()?"⌘":"Ctrl":e)).join("+")})` : ""); + var i + }; + +function rd(e) { + let t, o; + return t = new td({ + props: { + class: "PinturaButtonIcon", + $$slots: { + default: [nd] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 536870920 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function nd(e) { + let t; + return { + c() { + t = Cn("g") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[3] + }, + p(e, o) { + 8 & o && (t.innerHTML = e[3]) + }, + d(e) { + e && Sn(t) + } + } +} + +function ad(e) { + let t; + return { + c() { + t = kn("span"), An(t, "class", e[11]) + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[0] + }, + p(e, o) { + 1 & o && (t.innerHTML = e[0]), 2048 & o && An(t, "class", e[11]) + }, + d(e) { + e && Sn(t) + } + } +} + +function sd(e) { + let t, o, i, r, n; + const a = e[27].default, + s = rn(a, e, e[29], null), + l = s || function(e) { + let t, o, i, r = e[3] && rd(e), + n = e[0] && ad(e); + return { + c() { + t = kn("span"), r && r.c(), o = Mn(), n && n.c(), An(t, "class", e[13]) + }, + m(e, a) { + wn(e, t, a), r && r.m(t, null), bn(t, o), n && n.m(t, null), i = !0 + }, + p(e, a) { + e[3] ? r ? (r.p(e, a), 8 & a && xa(r, 1)) : (r = rd(e), r.c(), xa(r, 1), r.m(t, o)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[0] ? n ? n.p(e, a) : (n = ad(e), n.c(), n.m(t, null)) : n && (n.d(1), n = null), (!i || 8192 & a) && An(t, "class", e[13]) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + e && Sn(t), r && r.d(), n && n.d() + } + } + }(e); + return { + c() { + t = kn("button"), l && l.c(), An(t, "type", e[6]), An(t, "style", e[4]), t.disabled = e[5], An(t, "class", e[12]), An(t, "title", o = id(e[0], e[1], e[2])) + }, + m(o, a) { + wn(o, t, a), l && l.m(t, null), e[28](t), i = !0, r || (n = [Pn(t, "keydown", (function() { + Jr(e[8]) && e[8].apply(this, arguments) + })), Pn(t, "click", (function() { + Jr(e[7]) && e[7].apply(this, arguments) + })), Pn(t, "pointerdown", (function() { + Jr(e[14]) && e[14].apply(this, arguments) + })), hn(e[9].call(null, t))], r = !0) + }, + p(r, [n]) { + e = r, s ? s.p && (!i || 536870912 & n) && sn(s, a, e, e[29], i ? an(a, e[29], n, null) : ln(e[29]), null) : l && l.p && (!i || 10249 & n) && l.p(e, i ? n : -1), (!i || 64 & n) && An(t, "type", e[6]), (!i || 16 & n) && An(t, "style", e[4]), (!i || 32 & n) && (t.disabled = e[5]), (!i || 4096 & n) && An(t, "class", e[12]), (!i || 7 & n && o !== (o = id(e[0], e[1], e[2]))) && An(t, "title", o) + }, + i(e) { + i || (xa(l, e), i = !0) + }, + o(e) { + va(l, e), i = !1 + }, + d(o) { + o && Sn(t), l && l.d(o), e[28](null), r = !1, Kr(n) + } + } +} + +function ld(e, t, o) { + let i, n, a, s, l, c, { + $$slots: d = {}, + $$scope: u + } = t, + { + class: h + } = t, + { + label: p + } = t, + { + title: m + } = t, + { + shortcut: g + } = t, + { + labelClass: $ + } = t, + { + innerClass: f + } = t, + { + hideLabel: y = !1 + } = t, + { + icon: b + } = t, + { + style: x + } = t, + { + disabled: v + } = t, + { + type: w = "button" + } = t, + { + onclick: S + } = t, + { + onkeydown: k + } = t, + { + onhold: C + } = t, + { + action: T = (() => {}) + } = t, + { + holdThreshold: M = 500 + } = t, + { + holdSpeedUpFactor: R = .5 + } = t, + { + holdSpeedMin: P = 20 + } = t; + const E = e => { + o(25, c = setTimeout((() => { + C(), E(Math.max(e * R, P)) + }), e)) + }; + let I; + return e.$$set = e => { + "class" in e && o(15, h = e.class), "label" in e && o(0, p = e.label), "title" in e && o(1, m = e.title), "shortcut" in e && o(2, g = e.shortcut), "labelClass" in e && o(16, $ = e.labelClass), "innerClass" in e && o(17, f = e.innerClass), "hideLabel" in e && o(18, y = e.hideLabel), "icon" in e && o(3, b = e.icon), "style" in e && o(4, x = e.style), "disabled" in e && o(5, v = e.disabled), "type" in e && o(6, w = e.type), "onclick" in e && o(7, S = e.onclick), "onkeydown" in e && o(8, k = e.onkeydown), "onhold" in e && o(19, C = e.onhold), "action" in e && o(9, T = e.action), "holdThreshold" in e && o(20, M = e.holdThreshold), "holdSpeedUpFactor" in e && o(21, R = e.holdSpeedUpFactor), "holdSpeedMin" in e && o(22, P = e.holdSpeedMin), "$$scope" in e && o(29, u = e.$$scope) + }, e.$$.update = () => { + 101187584 & e.$$.dirty && o(26, n = C ? () => { + c && (clearTimeout(c), o(25, c = void 0), document.documentElement.removeEventListener("pointerup", n)) + } : r), 68681728 & e.$$.dirty && o(14, i = C ? () => { + document.documentElement.addEventListener("pointerup", n), E(M) + } : r), 131072 & e.$$.dirty && o(13, a = Mc(["PinturaButtonInner", f])), 294912 & e.$$.dirty && o(12, s = Mc(["PinturaButton", y && "PinturaButtonIconOnly", h])), 327680 & e.$$.dirty && o(11, l = Mc([y ? "implicit" : "PinturaButtonLabel", $])) + }, [p, m, g, b, x, v, w, S, k, T, I, l, s, a, i, h, $, f, y, C, M, R, P, e => od(e, I), () => I, c, n, d, function(e) { + ta[e ? "unshift" : "push"]((() => { + I = e, o(10, I) + })) + }, u] +} +class cd extends Fa { + constructor(e) { + super(), za(this, e, ld, sd, Qr, { + class: 15, + label: 0, + title: 1, + shortcut: 2, + labelClass: 16, + innerClass: 17, + hideLabel: 18, + icon: 3, + style: 4, + disabled: 5, + type: 6, + onclick: 7, + onkeydown: 8, + onhold: 19, + action: 9, + holdThreshold: 20, + holdSpeedUpFactor: 21, + holdSpeedMin: 22, + isEventTarget: 23, + getElement: 24 + }) + } + get isEventTarget() { + return this.$$.ctx[23] + } + get getElement() { + return this.$$.ctx[24] + } +} +var dd = (e, t) => { + const o = e.findIndex(t); + if (o >= 0) return e.splice(o, 1) +}; +const ud = 80; +var hd = (e, t = {}) => { + const { + inertia: o = !1, + inertiaDurationMultiplier: i = ud, + shouldStartInteraction: r = (() => !0), + pinch: n = !1, + multiTouch: a, + getEventPosition: s = (e => ce(e.clientX, e.clientY)), + observeKeys: l = !1 + } = t; + + function c(t, o) { + e.dispatchEvent(new CustomEvent(t, { + detail: o + })) + } + + function d() { + w && w(), w = void 0 + } + const u = [], + h = e => 0 === e.timeStamp ? Date.now() : e.timeStamp, + p = () => { + const e = ue(u[0].position); + if (u[1]) { + const t = .5 * (u[1].position.x - e.x), + o = .5 * (u[1].position.y - e.y); + e.x += t, e.y += o + } + return e + }, + m = e => { + e.origin.x = e.position.x, e.origin.y = e.position.y, e.translation.x = 0, e.translation.y = 0 + }, + g = e => { + const t = (e => u.findIndex((t => t.event.pointerId === e.pointerId)))(e); + if (!(t < 0)) return u[t] + }, + $ = () => 1 === u.length, + f = () => 2 === u.length, + y = e => { + const t = Re(e.map((e => e.position))); + return { + center: t, + distance: ((e, t) => e.reduce(((e, o) => e + Te(t, o.position)), 0) / e.length)(e, t), + velocity: Re(e.map((e => e.velocity))), + translation: Re(e.map((e => e.translation))) + } + }; + let b, x, v, w, S, k, C, T, M = 0, + R = void 0; + e.addEventListener("pointerdown", L); + const P = ["Meta", "Control", "Alt", "Shift"]; + + function E(e) { + if (!P.includes(e.key)) return; + const { + metaKey: t, + ctrlKey: o, + altKey: i, + shiftKey: r + } = e; + A({ + metaKey: t, + ctrlKey: o, + altKey: i, + shiftKey: r + }) + } + let I = Date.now(); + const A = e => { + const t = ue(u[0].translation); + let o = C; + if (n && f()) { + o *= Te(u[0].position, u[1].position) / S, be(t, u[1].translation) + } + be(t, k); + const i = Date.now(); + i - I < 16 || (I = i, c("interactionupdate", { + position: p(), + translation: t, + scalar: n ? o : void 0, + isMultiTouching: f(), + ...e + })) + }; + + function L(t) { + if (!f() && !(e => Eo(e.button) && 0 !== e.button)(t) && r(t, e)) + if (d(), (e => { + const t = h(e), + o = { + timeStamp: t, + timeStampInitial: t, + position: s(e), + origin: s(e), + velocity: le(), + velocityHistory: [], + velocityAverage: le(), + translation: le(), + interactionState: void 0, + event: e + }; + u.push(o), o.interactionState = y(u) + })(t), l && (window.addEventListener("keydown", E), window.addEventListener("keyup", E)), $()) document.documentElement.addEventListener("pointermove", z), document.documentElement.addEventListener("pointerup", F), document.documentElement.addEventListener("pointercancel", F), document.addEventListener("visibilitychange", D), T = !1, C = 1, k = le(), S = void 0, c("interactionstart", { + origin: ue(g(t).origin) + }); + else if (n) T = !0, S = Te(u[0].position, u[1].position), k.x += u[0].translation.x, k.y += u[0].translation.y, m(u[0]); + else if (!1 === a) return u.length = 0, W(), c("interactioncancel") + } + + function z(e) { + e.preventDefault(), (e => { + const t = g(e); + if (!t) return; + const o = h(e), + i = s(e), + r = Math.max(1, o - t.timeStamp); + t.velocity.x = (i.x - t.position.x) / r, t.velocity.y = (i.y - t.position.y) / r, t.velocityHistory.push(ue(t.velocity)), t.velocityHistory = t.velocityHistory.slice(-3), t.velocityAverage = t.velocityHistory.reduce(((e, t, o, i) => (e.x += t.x / i.length, e.y += t.y / i.length, e)), le()), t.translation.x = i.x - t.origin.x, t.translation.y = i.y - t.origin.y, t.timeStamp = o, t.position.x = i.x, t.position.y = i.y, t.event = e + })(e); + const { + metaKey: t = !1, + ctrlKey: o = !1, + altKey: i = !1, + shiftKey: r = !1 + } = l ? e : {}; + A({ + metaKey: t, + ctrlKey: o, + altKey: i, + shiftKey: r + }) + } + + function F(e) { + if (!g(e)) return; + const t = p(), + r = (e => { + const t = dd(u, (t => t.event.pointerId === e.pointerId)); + if (t) return t[0] + })(e); + if (n && $()) { + const e = Te(u[0].position, r.position); + C *= e / S, k.x += u[0].translation.x + r.translation.x, k.y += u[0].translation.y + r.translation.y, m(u[0]) + } + let a = !1, + s = !1; + if (!T && r) { + const e = performance.now(), + t = e - r.timeStampInitial, + o = Ce(r.translation); + a = o < 64 && t < 300, s = !!(R && a && e - M < 700 && Ce(R, r.position) < 128), a && (R = ue(r.position), M = e) + } + if (u.length > 0) return; + W(); + const l = ue(r.translation), + d = ue(r.velocityAverage); + let h = !1; + c("interactionrelease", { + isTap: a, + isDoubleTap: s, + position: t, + translation: l, + scalar: C, + preventInertia: () => h = !0 + }); + const f = Te(d); + if (h || !o || f < .25) return B(l, { + isTap: a, + isDoubleTap: s + }); + x = ue(t), v = ue(l), b = Jl(ue(l), { + easing: Yl, + duration: f * i + }), b.set({ + x: l.x + 50 * d.x, + y: l.y + 50 * d.y + }).then((() => { + w && B(tn(b), { + isTap: a, + isDoubleTap: s + }) + })), w = b.subscribe(O) + } + + function O(e) { + e && c("interactionupdate", { + position: ce(x.x + (e.x - v.x), x.y + (e.y - v.y)), + translation: e, + scalar: n ? C : void 0 + }) + } + + function D(e) { + if ("visible" === document.visibilityState || !u.length) return; + const t = y(u); + d(), c("interactionend", { + ...t + }), u.length = 0, W() + } + + function B(e, t) { + d(), c("interactionend", { + ...t, + translation: e, + scalar: n ? C : void 0 + }) + } + + function W() { + l && window.removeEventListener("keydown", E), l && window.removeEventListener("keyup", E), document.documentElement.removeEventListener("pointermove", z), document.documentElement.removeEventListener("pointerup", F), document.documentElement.removeEventListener("pointercancel", F), document.addEventListener("visibilitychange", D) + } + return { + destroy() { + d(), e.removeEventListener("pointerdown", L) + } + } + }, + pd = (e, t = {}) => { + const { + direction: o, + shiftMultiplier: i = 10, + bubbles: r = !1, + preventDefault: n = !1, + stopKeydownPropagation: a = !0 + } = t, s = "horizontal" === o, l = "vertical" === o, c = t => { + const { + key: o + } = t, c = t.shiftKey, d = /up|down/i.test(o), u = /left|right/i.test(o); + if (!u && !d) return; + if (s && d) return; + if (l && u) return; + const h = c ? i : 1; + a && t.stopPropagation(), n && t.preventDefault(), e.dispatchEvent(new CustomEvent("nudge", { + bubbles: r, + detail: ce((/left/i.test(o) ? -1 : /right/i.test(o) ? 1 : 0) * h, (/up/i.test(o) ? -1 : /down/i.test(o) ? 1 : 0) * h) + })) + }; + return e.addEventListener("keydown", c), { + destroy() { + e.removeEventListener("keydown", c) + } + } + }; + +function md(e, t) { + return t ? t * Math.sign(e) * Math.log10(1 + Math.abs(e) / t) : e +} +const gd = (e, t, o) => { + if (!t || !o) return { + ...e + }; + const i = e.x + md(t.x - e.x, o), + r = e.x + e.width + md(t.x + t.width - (e.x + e.width), o), + n = e.y + md(t.y - e.y, o); + return { + x: i, + y: n, + width: r - i, + height: e.y + e.height + md(t.y + t.height - (e.y + e.height), o) - n + } + }, + $d = (e, t, o) => t && o ? ce(e.x + md(t.x - e.x, o), e.y + md(t.y - e.y, o)) : { + ...e + }; +var fd = (e, t) => { + if (e) return /em/.test(e) ? 16 * parseInt(e, 10) : /px/.test(e) ? parseInt(e, 10) : void 0 + }, + yd = e => { + let t = e.detail || 0; + const { + deltaX: o, + deltaY: i, + wheelDelta: r, + wheelDeltaX: n, + wheelDeltaY: a + } = e; + return Eo(n) && Math.abs(n) > Math.abs(a) ? t = n / -120 : Eo(o) && Math.abs(o) > Math.abs(i) ? t = o / 20 : (r || a) && (t = (r || a) / -120), t || (t = i / 20), (Xo() || Gt()) && (t *= 2), t + }; + +function bd(e) { + let t, o, i, r, n, a, s; + const l = e[36].default, + c = rn(l, e, e[35], null); + return { + c() { + t = kn("div"), o = kn("div"), c && c.c(), An(o, "style", e[5]), An(t, "class", i = Mc(["PinturaScrollable", e[0]])), An(t, "style", e[4]), An(t, "data-direction", e[1]), An(t, "data-state", e[6]) + }, + m(i, l) { + wn(i, t, l), bn(t, o), c && c.m(o, null), e[38](t), n = !0, a || (s = [Pn(o, "interactionstart", e[8]), Pn(o, "interactionupdate", e[10]), Pn(o, "interactionend", e[11]), Pn(o, "interactionrelease", e[9]), hn(hd.call(null, o, { + inertia: !0 + })), Pn(o, "measure", e[37]), hn($c.call(null, o)), Pn(t, "wheel", e[13], { + passive: !1 + }), Pn(t, "scroll", e[15]), Pn(t, "focusin", e[14]), Pn(t, "nudge", e[16]), Pn(t, "measure", e[12]), hn($c.call(null, t, { + observePosition: !0 + })), hn(r = pd.call(null, t, { + direction: "x" === e[1] ? "horizontal" : "vertical", + stopKeydownPropagation: !1 + }))], a = !0) + }, + p(e, a) { + c && c.p && (!n || 16 & a[1]) && sn(c, l, e, e[35], n ? an(l, e[35], a, null) : ln(e[35]), null), (!n || 32 & a[0]) && An(o, "style", e[5]), (!n || 1 & a[0] && i !== (i = Mc(["PinturaScrollable", e[0]]))) && An(t, "class", i), (!n || 16 & a[0]) && An(t, "style", e[4]), (!n || 2 & a[0]) && An(t, "data-direction", e[1]), (!n || 64 & a[0]) && An(t, "data-state", e[6]), r && Jr(r.update) && 2 & a[0] && r.update.call(null, { + direction: "x" === e[1] ? "horizontal" : "vertical", + stopKeydownPropagation: !1 + }) + }, + i(e) { + n || (xa(c, e), n = !0) + }, + o(e) { + va(c, e), n = !1 + }, + d(o) { + o && Sn(t), c && c.d(o), e[38](null), a = !1, Kr(s) + } + } +} + +function xd(e, t, o) { + let i, n, a, s, l, c, d, u, { + $$slots: h = {}, + $$scope: p + } = t; + const m = qn(); + let g, $, f, y, b = "idle", + x = ec(0); + on(e, x, (e => o(34, u = e))); + let v, { + class: w + } = t, + { + scrollBlockInteractionDist: S = 5 + } = t, + { + scrollStep: k = 10 + } = t, + { + scrollFocusMargin: C = 64 + } = t, + { + scrollDirection: T = "x" + } = t, + { + scrollAutoCancel: M = !1 + } = t, + { + elasticity: R = 0 + } = t, + { + onscroll: P = r + } = t, + { + maskFeatherSize: E + } = t, + { + maskFeatherStartOpacity: I + } = t, + { + maskFeatherEndOpacity: A + } = t, + { + scroll: L + } = t, + z = "", + F = !0; + const O = x.subscribe((e => { + const t = le(); + t[T] = e, P(t) + })), + D = e => Math.max(Math.min(0, e), f[i] - $[i]); + let B, W, V; + const _ = (e, t = {}) => { + const { + elastic: i = !1, + animate: r = !1, + preventScrollState: n = !1 + } = t; + Math.abs(e - g) > S && "idle" === b && !y && !n && o(27, b = "scrolling"); + const a = D(e), + s = i && R && !y ? a + md(e - a, R) : a; + let l = !0; + r ? l = !1 : F || (l = !y), F = !1, x.set(s, { + hard: l + }).then((e => { + y && (F = !0) + })) + }; + Yn((() => { + O() + })); + return e.$$set = e => { + "class" in e && o(0, w = e.class), "scrollBlockInteractionDist" in e && o(20, S = e.scrollBlockInteractionDist), "scrollStep" in e && o(21, k = e.scrollStep), "scrollFocusMargin" in e && o(22, C = e.scrollFocusMargin), "scrollDirection" in e && o(1, T = e.scrollDirection), "scrollAutoCancel" in e && o(23, M = e.scrollAutoCancel), "elasticity" in e && o(24, R = e.elasticity), "onscroll" in e && o(25, P = e.onscroll), "maskFeatherSize" in e && o(19, E = e.maskFeatherSize), "maskFeatherStartOpacity" in e && o(17, I = e.maskFeatherStartOpacity), "maskFeatherEndOpacity" in e && o(18, A = e.maskFeatherEndOpacity), "scroll" in e && o(26, L = e.scroll), "$$scope" in e && o(35, p = e.$$scope) + }, e.$$.update = () => { + if (2 & e.$$.dirty[0] && o(31, i = "x" === T ? "width" : "height"), 2 & e.$$.dirty[0] && o(29, n = T.toUpperCase()), 8 & e.$$.dirty[0] && o(33, a = v && getComputedStyle(v)), 8 & e.$$.dirty[0] | 4 & e.$$.dirty[1] && o(32, s = a && fd(a.getPropertyValue("--scrollable-feather-size"))), 268828676 & e.$$.dirty[0] | 11 & e.$$.dirty[1] && null != u && f && null != s && $) { + const e = -1 * u / s, + t = -(f[i] - $[i] - u) / s; + o(17, I = rs(1 - e, 0, 1)), o(18, A = rs(1 - t, 0, 1)), o(19, E = s), o(4, z = `--scrollable-feather-start-opacity: ${I};--scrollable-feather-end-opacity: ${A}`) + } + 67108872 & e.$$.dirty[0] && v && void 0 !== L && (Eo(L) ? _(L) : _(L.scrollOffset, L)), 268435460 & e.$$.dirty[0] | 1 & e.$$.dirty[1] && o(30, l = f && $ ? $[i] > f[i] : void 0), 1207959552 & e.$$.dirty[0] && o(6, c = Mc([b, l ? "overflows" : void 0])), 1610612736 & e.$$.dirty[0] | 8 & e.$$.dirty[1] && o(5, d = l ? `transform: translate${n}(${u}px)` : void 0) + }, [w, T, $, v, z, d, c, x, () => { + l && (W = !1, B = !0, V = ce(0, 0), y = !1, o(27, b = "idle"), g = tn(x)) + }, ({ + detail: e + }) => { + l && (y = !0, o(27, b = "idle")) + }, ({ + detail: e + }) => { + l && (W || B && (B = !1, Ce(e.translation) < .1) || (!M || "x" !== T || (e => { + const t = ye(ce(e.x - V.x, e.y - V.y), Math.abs); + V = ue(e); + const o = Ce(t), + i = t.x - t.y; + return !(o > 1 && i < -.5) + })(e.translation) ? _(g + e.translation[T], { + elastic: !0 + }) : W = !0)) + }, ({ + detail: e + }) => { + if (!l) return; + if (W) return; + const t = g + e.translation[T], + o = D(t); + F = !1, x.set(o).then((e => { + y && (F = !0) + })) + }, ({ + detail: e + }) => { + o(28, f = e), m("measure", { + x: e.x, + y: e.y, + width: e.width, + height: e.height + }) + }, e => { + if (!l) return; + e.preventDefault(), e.stopPropagation(); + const t = e.shiftKey, + o = yd(e) * (t ? -1 : 1), + i = tn(x); + _(i + o * k, { + animate: !0 + }) + }, e => { + if (!l) return; + if (!y) return; + let t = e.target; + e.target.classList.contains("implicit") && (t = t.parentNode); + const o = t["x" === T ? "offsetLeft" : "offsetTop"], + r = o + t["x" === T ? "offsetWidth" : "offsetHeight"], + n = tn(x), + a = C + E; + n + o < a ? _(-o + a) : n + r > f[i] - a && _(f[i] - r - a, { + animate: !0 + }) + }, () => { + o(3, v["x" === T ? "scrollLeft" : "scrollTop"] = 0, v) + }, ({ + detail: e + }) => { + if (v.querySelector("[data-focus-visible]")) return; + const t = -2 * e[T], + o = tn(x); + _(o + t * k, { + animate: !0, + preventScrollState: !0 + }) + }, I, A, E, S, k, C, M, R, P, L, b, f, n, l, i, s, a, u, p, h, e => o(2, $ = e.detail), function(e) { + ta[e ? "unshift" : "push"]((() => { + v = e, o(3, v) + })) + }] +} +class vd extends Fa { + constructor(e) { + super(), za(this, e, xd, bd, Qr, { + class: 0, + scrollBlockInteractionDist: 20, + scrollStep: 21, + scrollFocusMargin: 22, + scrollDirection: 1, + scrollAutoCancel: 23, + elasticity: 24, + onscroll: 25, + maskFeatherSize: 19, + maskFeatherStartOpacity: 17, + maskFeatherEndOpacity: 18, + scroll: 26 + }, null, [-1, -1]) + } +} + +function wd(e, { + delay: t = 0, + duration: o = 400, + easing: i = Zr +} = {}) { + const r = +getComputedStyle(e).opacity; + return { + delay: t, + duration: o, + easing: i, + css: e => "opacity: " + e * r + } +} + +function Sd(e) { + let t, o, i, r, n; + return { + c() { + t = kn("span"), An(t, "class", "PinturaStatusMessage") + }, + m(o, a) { + wn(o, t, a), t.innerHTML = e[0], i = !0, r || (n = [Pn(t, "measure", (function() { + Jr(e[1]) && e[1].apply(this, arguments) + })), hn($c.call(null, t))], r = !0) + }, + p(o, [r]) { + e = o, (!i || 1 & r) && (t.innerHTML = e[0]) + }, + i(e) { + i || (la((() => { + o || (o = Sa(t, wd, { + duration: 500 + }, !0)), o.run(1) + })), i = !0) + }, + o(e) { + o || (o = Sa(t, wd, { + duration: 500 + }, !1)), o.run(0), i = !1 + }, + d(e) { + e && Sn(t), e && o && o.end(), r = !1, Kr(n) + } + } +} + +function kd(e, t, o) { + let { + text: i + } = t, { + onmeasure: n = r + } = t; + return e.$$set = e => { + "text" in e && o(0, i = e.text), "onmeasure" in e && o(1, n = e.onmeasure) + }, [i, n] +} +class Cd extends Fa { + constructor(e) { + super(), za(this, e, kd, Sd, Qr, { + text: 0, + onmeasure: 1 + }) + } +} + +function Td(e) { + let t, o, i, r, n, a, s, l, c; + return { + c() { + t = kn("span"), o = Cn("svg"), i = Cn("g"), r = Cn("circle"), n = Cn("circle"), a = Mn(), s = kn("span"), l = Tn(e[3]), An(r, "class", "PinturaProgressIndicatorBar"), An(r, "r", "8.5"), An(r, "cx", "10"), An(r, "cy", "10"), An(r, "stroke-linecap", "round"), An(r, "opacity", ".25"), An(n, "class", "PinturaProgressIndicatorFill"), An(n, "r", "8.5"), An(n, "stroke-dasharray", e[2]), An(n, "cx", "10"), An(n, "cy", "10"), An(n, "transform", "rotate(-90) translate(-20)"), An(i, "fill", "none"), An(i, "stroke", "currentColor"), An(i, "stroke-width", "2.5"), An(i, "stroke-linecap", "round"), An(i, "opacity", e[1]), An(o, "width", "20"), An(o, "height", "20"), An(o, "viewBox", "0 0 20 20"), An(o, "xmlns", "http://www.w3.org/2000/svg"), An(o, "aria-hidden", "true"), An(o, "focusable", "false"), An(s, "class", "implicit"), An(t, "class", "PinturaProgressIndicator"), An(t, "data-status", e[0]), An(t, "style", c = "opacity:" + e[4]) + }, + m(e, c) { + wn(e, t, c), bn(t, o), bn(o, i), bn(i, r), bn(i, n), bn(t, a), bn(t, s), bn(s, l) + }, + p(e, [o]) { + 4 & o && An(n, "stroke-dasharray", e[2]), 2 & o && An(i, "opacity", e[1]), 8 & o && Fn(l, e[3]), 1 & o && An(t, "data-status", e[0]), 16 & o && c !== (c = "opacity:" + e[4]) && An(t, "style", c) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t) + } + } +} + +function Md(e, t, o) { + let i, r, n, a, s, l, c; + const d = qn(); + let { + progress: u + } = t, { + min: h = 0 + } = t, { + max: p = 100 + } = t, { + labelBusy: m = "Busy" + } = t, { + opacity: g + } = t; + const $ = ec(g, { + precision: .01 + }); + on(e, $, (e => o(4, c = e))); + const f = ec(0, { + precision: .01 + }), + y = ec(0, { + precision: .01 + }); + on(e, y, (e => o(13, s = e))); + const b = Wa([f], (e => rs(e, h, p))); + on(e, b, (e => o(14, l = e))); + const x = b.subscribe((e => { + 1 === u && Math.round(e) >= 100 && d("complete") + })); + return Zn((() => { + y.set(1) + })), Yn((() => { + x() + })), e.$$set = e => { + "progress" in e && o(8, u = e.progress), "min" in e && o(9, h = e.min), "max" in e && o(10, p = e.max), "labelBusy" in e && o(11, m = e.labelBusy), "opacity" in e && o(12, g = e.opacity) + }, e.$$.update = () => { + 4096 & e.$$.dirty && Eo(g) && $.set(g), 256 & e.$$.dirty && u && u !== 1 / 0 && f.set(100 * u), 18688 & e.$$.dirty && o(3, i = u === 1 / 0 ? m : Math.round(l) + "%"), 16640 & e.$$.dirty && o(2, r = u === 1 / 0 ? "26.5 53" : l / 100 * 53 + " 53"), 8192 & e.$$.dirty && o(1, n = s), 256 & e.$$.dirty && o(0, a = u === 1 / 0 ? "busy" : "loading") + }, [a, n, r, i, c, $, y, b, u, h, p, m, g, s, l] +} +class Rd extends Fa { + constructor(e) { + super(), za(this, e, Md, Td, Qr, { + progress: 8, + min: 9, + max: 10, + labelBusy: 11, + opacity: 12 + }) + } +} + +function Pd(e) { + let t, o, i; + const r = e[5].default, + n = rn(r, e, e[4], null); + return { + c() { + t = kn("span"), n && n.c(), An(t, "class", o = "PinturaStatusAside " + e[0]), An(t, "style", e[1]) + }, + m(e, o) { + wn(e, t, o), n && n.m(t, null), i = !0 + }, + p(e, [a]) { + n && n.p && (!i || 16 & a) && sn(n, r, e, e[4], i ? an(r, e[4], a, null) : ln(e[4]), null), (!i || 1 & a && o !== (o = "PinturaStatusAside " + e[0])) && An(t, "class", o), (!i || 2 & a) && An(t, "style", e[1]) + }, + i(e) { + i || (xa(n, e), i = !0) + }, + o(e) { + va(n, e), i = !1 + }, + d(e) { + e && Sn(t), n && n.d(e) + } + } +} + +function Ed(e, t, o) { + let i, { + $$slots: r = {}, + $$scope: n + } = t, + { + offset: a = 0 + } = t, + { + opacity: s = 0 + } = t, + { + class: l + } = t; + return e.$$set = e => { + "offset" in e && o(2, a = e.offset), "opacity" in e && o(3, s = e.opacity), "class" in e && o(0, l = e.class), "$$scope" in e && o(4, n = e.$$scope) + }, e.$$.update = () => { + 12 & e.$$.dirty && o(1, i = `transform:translateX(${a}px);opacity:${s}`) + }, [l, i, a, s, n, r] +} +class Id extends Fa { + constructor(e) { + super(), za(this, e, Ed, Pd, Qr, { + offset: 2, + opacity: 3, + class: 0 + }) + } +} +const { + document: Ad +} = ka; + +function Ld(e) { + let t, o, i, r; + return { + c() { + t = Mn(), o = kn("button"), An(o, "class", "PinturaImageButton"), An(o, "type", "button"), An(o, "title", e[1]), o.disabled = e[2] + }, + m(n, a) { + wn(n, t, a), wn(n, o, a), o.innerHTML = e[0], e[11](o), i || (r = [Pn(Ad.body, "load", e[5], !0), Pn(Ad.body, "error", e[6], !0), Pn(o, "pointerdown", e[4])], i = !0) + }, + p(e, [t]) { + 1 & t && (o.innerHTML = e[0]), 2 & t && An(o, "title", e[1]), 4 & t && (o.disabled = e[2]) + }, + i: Gr, + o: Gr, + d(n) { + n && Sn(t), n && Sn(o), e[11](null), i = !1, Kr(r) + } + } +} + +function zd(e, t, o) { + let i, { + html: n + } = t, + { + title: a + } = t, + { + onclick: s + } = t, + { + disabled: l = !1 + } = t, + { + ongrab: c = r + } = t, + { + ondrag: d = r + } = t, + { + ondrop: u = r + } = t; + const h = e => Ce(p, ce(e.pageX, e.pageY)) < 256; + let p; + const m = e => { + document.documentElement.removeEventListener("pointermove", g), document.documentElement.removeEventListener("pointerup", m); + const t = ce(e.pageX, e.pageY); + if (Ce(p, t) < 32) return s(e); + h(e) || u(e) + }, + g = e => { + h(e) || d(e) + }, + $ = e => i && i.contains(e) && "IMG" === e.nodeName; + return e.$$set = e => { + "html" in e && o(0, n = e.html), "title" in e && o(1, a = e.title), "onclick" in e && o(7, s = e.onclick), "disabled" in e && o(2, l = e.disabled), "ongrab" in e && o(8, c = e.ongrab), "ondrag" in e && o(9, d = e.ondrag), "ondrop" in e && o(10, u = e.ondrop) + }, e.$$.update = () => { + 8 & e.$$.dirty && i && i.querySelector("img") && o(3, i.dataset.loader = !0, i) + }, [n, a, l, i, e => { + p = ce(e.pageX, e.pageY), c(e), document.documentElement.addEventListener("pointermove", g), document.documentElement.addEventListener("pointerup", m) + }, ({ + target: e + }) => { + $(e) && o(3, i.dataset.load = !0, i) + }, ({ + target: e + }) => { + $(e) && o(3, i.dataset.error = !0, i) + }, s, c, d, u, function(e) { + ta[e ? "unshift" : "push"]((() => { + i = e, o(3, i) + })) + }] +} +class Fd extends Fa { + constructor(e) { + super(), za(this, e, zd, Ld, Qr, { + html: 0, + title: 1, + onclick: 7, + disabled: 2, + ongrab: 8, + ondrag: 9, + ondrop: 10 + }) + } +} + +function Od(e, t, o) { + const i = e.slice(); + return i[14] = t[o], i +} + +function Dd(e, t) { + let o, i, r, n, a, s, l; + + function c() { + return t[10](t[14]) + } + + function d(...e) { + return t[11](t[14], ...e) + } + + function u(...e) { + return t[12](t[14], ...e) + } + + function h(...e) { + return t[13](t[14], ...e) + } + return i = new Fd({ + props: { + onclick: c, + ongrab: d, + ondrag: u, + ondrop: h, + disabled: t[1] || t[14].disabled, + title: t[14].title, + html: t[14].thumb + } + }), { + key: e, + first: null, + c() { + o = kn("li"), Ia(i.$$.fragment), r = Mn(), An(o, "style", t[6]), this.first = o + }, + m(e, c) { + wn(e, o, c), Aa(i, o, null), bn(o, r), a = !0, s || (l = hn(n = t[8].call(null, o, t[14])), s = !0) + }, + p(e, r) { + t = e; + const s = {}; + 5 & r && (s.onclick = c), 9 & r && (s.ongrab = d), 17 & r && (s.ondrag = u), 33 & r && (s.ondrop = h), 3 & r && (s.disabled = t[1] || t[14].disabled), 1 & r && (s.title = t[14].title), 1 & r && (s.html = t[14].thumb), i.$set(s), (!a || 64 & r) && An(o, "style", t[6]), n && Jr(n.update) && 1 & r && n.update.call(null, t[14]) + }, + i(e) { + a || (xa(i.$$.fragment, e), a = !0) + }, + o(e) { + va(i.$$.fragment, e), a = !1 + }, + d(e) { + e && Sn(o), La(i), s = !1, l() + } + } +} + +function Bd(e) { + let t, o, i = [], + r = new Map, + n = e[0]; + const a = e => e[14].id; + for (let t = 0; t < n.length; t += 1) { + let o = Od(e, n, t), + s = a(o); + r.set(s, i[t] = Dd(s, o)) + } + return { + c() { + t = kn("ul"); + for (let e = 0; e < i.length; e += 1) i[e].c(); + An(t, "class", "PinturaImageButtonList") + }, + m(e, r) { + wn(e, t, r); + for (let e = 0; e < i.length; e += 1) i[e].m(t, null); + o = !0 + }, + p(e, [o]) { + 127 & o && (n = e[0], ya(), i = Ma(i, o, a, 1, e, n, r, t, Ta, Dd, null, Od), ba()) + }, + i(e) { + if (!o) { + for (let e = 0; e < n.length; e += 1) xa(i[e]); + o = !0 + } + }, + o(e) { + for (let e = 0; e < i.length; e += 1) va(i[e]); + o = !1 + }, + d(e) { + e && Sn(t); + for (let e = 0; e < i.length; e += 1) i[e].d() + } + } +} + +function Wd(e, t, o) { + let i, r, { + items: n + } = t, + { + disabled: a + } = t, + { + onclickitem: s + } = t, + { + ongrabitem: l + } = t, + { + ondragitem: c + } = t, + { + ondropitem: d + } = t; + const u = ec(0, { + stiffness: .25, + damping: .9 + }); + on(e, u, (e => o(9, r = e))); + Zn((() => u.set(1))); + return e.$$set = e => { + "items" in e && o(0, n = e.items), "disabled" in e && o(1, a = e.disabled), "onclickitem" in e && o(2, s = e.onclickitem), "ongrabitem" in e && o(3, l = e.ongrabitem), "ondragitem" in e && o(4, c = e.ondragitem), "ondropitem" in e && o(5, d = e.ondropitem) + }, e.$$.update = () => { + 512 & e.$$.dirty && o(6, i = "opacity:" + r) + }, [n, a, s, l, c, d, i, u, (e, t) => t.mount && t.mount(e.firstChild, t), r, e => s(e.id), (e, t) => l && l(e.id, t), (e, t) => c && c(e.id, t), (e, t) => d && d(e.id, t)] +} +class Vd extends Fa { + constructor(e) { + super(), za(this, e, Wd, Bd, Qr, { + items: 0, + disabled: 1, + onclickitem: 2, + ongrabitem: 3, + ondragitem: 4, + ondropitem: 5 + }) + } +} +var _d = () => c() && window.devicePixelRatio || 1; +let Nd = null; +var Hd = e => (null === Nd && (Nd = 1 === _d() ? Math.round : e => e), Nd(e)), + jd = (e, t = {}) => { + if (e) { + if (t.preventScroll && Gt()) { + const t = document.body.scrollTop; + return e.focus(), void(document.body.scrollTop = t) + } + e.focus(t) + } + }, + Ud = e => /date|email|number|search|text|url/.test(e.type), + Gd = e => (e => /textarea/i.test(e.nodeName))(e) || Ud(e) || e.isContentEditable; +const Zd = e => ({}), + Xd = e => ({}), + Yd = e => ({}), + qd = e => ({}); + +function Kd(e) { + let t, o; + const i = [e[7]]; + let r = { + $$slots: { + default: [Qd] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), e[44](t), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 128 & o[0] ? Ra(i, [Pa(e[7])]) : {}; + 131072 & o[1] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(o) { + e[44](null), La(t, o) + } + } +} + +function Jd(e) { + let t, o; + const i = [e[7]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), e[43](t), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 128 & o[0] ? Ra(i, [Pa(e[7])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(o) { + e[43](null), La(t, o) + } + } +} + +function Qd(e) { + let t; + const o = e[42].label, + i = rn(o, e, e[48], qd); + return { + c() { + i && i.c() + }, + m(e, o) { + i && i.m(e, o), t = !0 + }, + p(e, r) { + i && i.p && (!t || 131072 & r[1]) && sn(i, o, e, e[48], t ? an(o, e[48], r, Yd) : ln(e[48]), qd) + }, + i(e) { + t || (xa(i, e), t = !0) + }, + o(e) { + va(i, e), t = !1 + }, + d(e) { + i && i.d(e) + } + } +} + +function eu(e) { + let t, o, i, r, n, a, s; + const l = e[42].details, + c = rn(l, e, e[48], Xd); + return { + c() { + t = kn("div"), c && c.c(), o = Mn(), i = kn("span"), An(i, "class", "PinturaPanelTip"), An(i, "style", e[10]), An(t, "class", r = Mc(["PinturaPanel", "pintura-editor-panel", e[2]])), An(t, "tabindex", "-1"), An(t, "style", e[11]) + }, + m(r, l) { + wn(r, t, l), c && c.m(t, null), bn(t, o), bn(t, i), e[45](t), n = !0, a || (s = [Pn(t, "close", e[46]), Pn(t, "keydown", e[18]), Pn(t, "measure", e[47]), hn($c.call(null, t))], a = !0) + }, + p(e, o) { + c && c.p && (!n || 131072 & o[1]) && sn(c, l, e, e[48], n ? an(l, e[48], o, Zd) : ln(e[48]), Xd), (!n || 1024 & o[0]) && An(i, "style", e[10]), (!n || 4 & o[0] && r !== (r = Mc(["PinturaPanel", "pintura-editor-panel", e[2]]))) && An(t, "class", r), (!n || 2048 & o[0]) && An(t, "style", e[11]) + }, + i(e) { + n || (xa(c, e), n = !0) + }, + o(e) { + va(c, e), n = !1 + }, + d(o) { + o && Sn(t), c && c.d(o), e[45](null), a = !1, Kr(s) + } + } +} + +function tu(e) { + let t, o, i, r, n, a, s, l, c; + const d = [Jd, Kd], + u = []; + + function h(e, t) { + return e[1] ? 0 : 1 + } + o = h(e), i = u[o] = d[o](e); + let p = e[6] && eu(e); + return { + c() { + t = Mn(), i.c(), r = Mn(), p && p.c(), n = Mn(), a = Rn() + }, + m(i, d) { + wn(i, t, d), u[o].m(i, d), wn(i, r, d), p && p.m(i, d), wn(i, n, d), wn(i, a, d), s = !0, l || (c = [Pn(document.body, "pointerdown", (function() { + Jr(e[9]) && e[9].apply(this, arguments) + })), Pn(document.body, "pointerup", (function() { + Jr(e[8]) && e[8].apply(this, arguments) + }))], l = !0) + }, + p(t, a) { + let s = o; + o = h(e = t), o === s ? u[o].p(e, a) : (ya(), va(u[s], 1, 1, (() => { + u[s] = null + })), ba(), i = u[o], i ? i.p(e, a) : (i = u[o] = d[o](e), i.c()), xa(i, 1), i.m(r.parentNode, r)), e[6] ? p ? (p.p(e, a), 64 & a[0] && xa(p, 1)) : (p = eu(e), p.c(), xa(p, 1), p.m(n.parentNode, n)) : p && (ya(), va(p, 1, 1, (() => { + p = null + })), ba()) + }, + i(e) { + s || (xa(i), xa(p), xa(false), s = !0) + }, + o(e) { + va(i), va(p), va(false), s = !1 + }, + d(e) { + e && Sn(t), u[o].d(e), e && Sn(r), p && p.d(e), e && Sn(n), e && Sn(a), l = !1, Kr(c) + } + } +} + +function ou(e, t, o) { + let i, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, { + $$slots: w = {}, + $$scope: S + } = t, + { + buttonClass: k + } = t, + { + buttonLabel: C + } = t, + { + buttonLabelClass: T + } = t, + { + buttonHideLabel: M + } = t, + { + buttonIcon: R + } = t, + { + buttonTitle: P + } = t, + { + panelClass: E + } = t, + { + isActive: I = !1 + } = t, + { + onshow: A = (({ + panel: e + }) => jd(e, { + preventScroll: !0 + })) + } = t, + { + onhide: L = r + } = t; + const z = Jn("isAnimated"); + on(e, z, (e => o(41, v = e))); + const F = Jn("rootPortal"); + on(e, F, (e => o(36, $ = e))); + const O = Jn("rootRect"); + let D, B, W; + on(e, O, (e => o(40, x = e))); + const V = () => o(26, W = i && i.getBoundingClientRect()); + let _ = le(), + N = ec(0); + on(e, N, (e => o(38, y = e))); + let H = le(); + const j = Ba({ + x: 0, + y: 0 + }); + on(e, j, (e => o(37, f = e))); + const U = ec(-5, { + stiffness: .1, + damping: .35, + precision: .001 + }); + on(e, U, (e => o(39, b = e))); + const G = e => od(e, $) || B.isEventTarget(e); + let Z, X, Y = !1; + const q = e => { + Gd(e.target) || (I || V(), o(30, X = e), o(0, I = !I)) + }, + K = e => { + /down/i.test(e.key) && (o(0, I = !0), o(30, X = e)) + }; + Yn((() => { + if (!$) return; + if (!Z) return; + const e = Z; + sa().then((() => { + e.parentNode && e.remove() + })) + })); + return e.$$set = e => { + "buttonClass" in e && o(19, k = e.buttonClass), "buttonLabel" in e && o(1, C = e.buttonLabel), "buttonLabelClass" in e && o(20, T = e.buttonLabelClass), "buttonHideLabel" in e && o(21, M = e.buttonHideLabel), "buttonIcon" in e && o(22, R = e.buttonIcon), "buttonTitle" in e && o(23, P = e.buttonTitle), "panelClass" in e && o(2, E = e.panelClass), "isActive" in e && o(0, I = e.isActive), "onshow" in e && o(24, A = e.onshow), "onhide" in e && o(25, L = e.onhide), "$$scope" in e && o(48, S = e.$$scope) + }, e.$$.update = () => { + if (16 & e.$$.dirty[0] && (i = B && B.getElement()), 536870913 & e.$$.dirty[0] && o(8, m = I ? e => { + Y && (o(29, Y = !1), G(e) || o(0, I = !1)) + } : void 0), 1 & e.$$.dirty[0] | 1024 & e.$$.dirty[1] && N.set(I ? 1 : 0, { + hard: !1 === v + }), 1 & e.$$.dirty[0] | 1024 & e.$$.dirty[1] && U.set(I ? 0 : -5, { + hard: !1 === v + }), 256 & e.$$.dirty[1] && o(33, n = 1 - b / -5), 1 & e.$$.dirty[0] | 512 & e.$$.dirty[1] && x && I && V(), 67108873 & e.$$.dirty[0] | 512 & e.$$.dirty[1] && x && D && W && I) { + let e = W.x - x.x + .5 * W.width - .5 * D.width, + t = W.y - x.y + W.height; + const i = 12, + r = 12, + n = x.width - 12, + a = x.height - 12, + s = e, + l = t, + c = s + D.width, + d = l + D.height; + if (s < i && (o(28, H.x = s - i, H), e = i), c > n && (o(28, H.x = c - n, H), e = n - D.width), d > a) { + o(27, _.y = -1, _); + r < t - D.height - W.height ? (o(28, H.y = 0, H), t -= D.height + W.height) : (o(28, H.y = t - (d - a), H), t -= d - a) + } else o(27, _.y = 1, _); + un(j, f = ye(ce(e, t), Hd), f) + } + 128 & e.$$.dirty[1] && o(6, a = y > 0), 128 & e.$$.dirty[1] && o(35, s = y < 1), 134217728 & e.$$.dirty[0] | 320 & e.$$.dirty[1] && o(34, l = `translateX(${Math.round(f.x)+12*_.x}px) translateY(${Math.round(f.y)+12*_.y+_.y*b}px)`), 152 & e.$$.dirty[1] && o(11, c = s ? `opacity: ${y}; pointer-events: ${y<1?"none":"all"}; transform: ${l};` : "transform: " + l), 4 & e.$$.dirty[1] && o(31, d = .5 + .5 * n), 4 & e.$$.dirty[1] && o(32, u = n), 402653192 & e.$$.dirty[0] | 67 & e.$$.dirty[1] && o(10, h = f && D && `opacity:${u};transform:scaleX(${d})rotate(45deg);top:${_.y<0?H.y+D.height:0}px;left:${H.x+.5*D.width}px`), 1 & e.$$.dirty[0] && o(9, p = I ? e => { + G(e) || o(29, Y = !0) + } : void 0), 96 & e.$$.dirty[0] | 32 & e.$$.dirty[1] && a && $ && Z && Z.parentNode !== $ && $.append(Z), 1 & e.$$.dirty[0] && (I || o(30, X = void 0)), 1090519137 & e.$$.dirty[0] && I && a && Z && A({ + e: X, + panel: Z + }), 33554497 & e.$$.dirty[0] && a && !I && L(), 16252930 & e.$$.dirty[0] && o(7, g = { + label: C, + icon: R, + class: Mc(["PinturaPanelButton", k]), + onkeydown: K, + onclick: q, + hideLabel: M, + labelClass: T, + title: P + }) + }, [I, C, E, D, B, Z, a, g, m, p, h, c, z, F, O, N, j, U, e => { + /esc/i.test(e.key) && (o(0, I = !1), i.focus()) + }, k, T, M, R, P, A, L, W, _, H, Y, X, d, u, n, l, s, $, f, y, b, x, v, w, function(e) { + ta[e ? "unshift" : "push"]((() => { + B = e, o(4, B) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + B = e, o(4, B) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + Z = e, o(5, Z) + })) + }, e => { + e.stopPropagation(), o(0, I = !1) + }, e => o(3, D = Le(e.detail)), S] +} +class iu extends Fa { + constructor(e) { + super(), za(this, e, ou, tu, Qr, { + buttonClass: 19, + buttonLabel: 1, + buttonLabelClass: 20, + buttonHideLabel: 21, + buttonIcon: 22, + buttonTitle: 23, + panelClass: 2, + isActive: 0, + onshow: 24, + onhide: 25 + }, null, [-1, -1]) + } +} +var ru = { + Up: 38, + Down: 40, + Left: 37, + Right: 39 +}; + +function nu(e) { + let t, o, i, r, n, a, s, l; + const c = e[15].default, + d = rn(c, e, e[14], null); + return { + c() { + t = kn("li"), o = kn("input"), i = Mn(), r = kn("label"), d && d.c(), An(o, "type", "radio"), An(o, "class", "implicit"), An(o, "id", e[7]), An(o, "name", e[0]), o.value = e[3], o.disabled = e[6], o.hidden = e[5], o.checked = e[4], An(r, "for", e[7]), An(r, "title", e[2]), An(t, "class", n = Mc(["PinturaRadioGroupOption", e[1]])), An(t, "data-hidden", e[5]), An(t, "data-disabled", e[6]), An(t, "data-selected", e[4]) + }, + m(n, c) { + wn(n, t, c), bn(t, o), bn(t, i), bn(t, r), d && d.m(r, null), a = !0, s || (l = [Pn(o, "change", In(e[16])), Pn(o, "keydown", e[9]), Pn(o, "click", e[10])], s = !0) + }, + p(e, [i]) { + (!a || 128 & i) && An(o, "id", e[7]), (!a || 1 & i) && An(o, "name", e[0]), (!a || 8 & i) && (o.value = e[3]), (!a || 64 & i) && (o.disabled = e[6]), (!a || 32 & i) && (o.hidden = e[5]), (!a || 16 & i) && (o.checked = e[4]), d && d.p && (!a || 16384 & i) && sn(d, c, e, e[14], a ? an(c, e[14], i, null) : ln(e[14]), null), (!a || 128 & i) && An(r, "for", e[7]), (!a || 4 & i) && An(r, "title", e[2]), (!a || 2 & i && n !== (n = Mc(["PinturaRadioGroupOption", e[1]]))) && An(t, "class", n), (!a || 32 & i) && An(t, "data-hidden", e[5]), (!a || 64 & i) && An(t, "data-disabled", e[6]), (!a || 16 & i) && An(t, "data-selected", e[4]) + }, + i(e) { + a || (xa(d, e), a = !0) + }, + o(e) { + va(d, e), a = !1 + }, + d(e) { + e && Sn(t), d && d.d(e), s = !1, Kr(l) + } + } +} + +function au(e, t, o) { + let i, r, { + $$slots: n = {}, + $$scope: a + } = t, + { + name: s + } = t, + { + class: l + } = t, + { + label: c + } = t, + { + id: d + } = t, + { + value: u + } = t, + { + checked: h + } = t, + { + onkeydown: p + } = t, + { + onclick: m + } = t, + { + hidden: g = !1 + } = t, + { + disabled: $ = !1 + } = t; + const f = Object.values(ru), + y = Jn("keysPressed"); + on(e, y, (e => o(17, r = e))); + return e.$$set = e => { + "name" in e && o(0, s = e.name), "class" in e && o(1, l = e.class), "label" in e && o(2, c = e.label), "id" in e && o(11, d = e.id), "value" in e && o(3, u = e.value), "checked" in e && o(4, h = e.checked), "onkeydown" in e && o(12, p = e.onkeydown), "onclick" in e && o(13, m = e.onclick), "hidden" in e && o(5, g = e.hidden), "disabled" in e && o(6, $ = e.disabled), "$$scope" in e && o(14, a = e.$$scope) + }, e.$$.update = () => { + 2049 & e.$$.dirty && o(7, i = `${s}-${d}`) + }, [s, l, c, u, h, g, $, i, y, e => { + p(e) + }, e => { + r.some((e => f.includes(e))) || m(e) + }, d, p, m, a, n, function(t) { + Qn.call(this, e, t) + }] +} +class su extends Fa { + constructor(e) { + super(), za(this, e, au, nu, Qr, { + name: 0, + class: 1, + label: 2, + id: 11, + value: 3, + checked: 4, + onkeydown: 12, + onclick: 13, + hidden: 5, + disabled: 6 + }) + } +} +var lu = (e = []) => e.reduce(((e, t) => (Lo(t) ? Lo(t[1]) : !!t.options) ? e.concat(Lo(t) ? t[1] : t.options) : (e.push(t), e)), []); +const cu = (e, t, o) => { + let i; + return Lo(e) ? i = { + id: t, + value: e[0], + label: e[1], + ...e[2] || {} + } : (i = e, i.id = null != i.id ? i.id : t), o ? o(i) : i +}; +var du = (e, t, o) => M(e) ? e(t, o) : e; +const uu = (e, t) => e.map((([e, o, i]) => { + if (Lo(o)) return [du(e, t), uu(o, t)]; + { + const r = [e, du(o, t)]; + if (i) { + let e = { + ...i + }; + i.icon && (e.icon = du(i.icon, t)), r.push(e) + } + return r + } +})); +var hu = (e, t) => uu(e, t), + pu = (e, t) => Array.isArray(e) && Array.isArray(t) ? cs(e, t) : e === t; + +function mu(e, t, o) { + const i = e.slice(); + return i[27] = t[o], i +} +const gu = e => ({ + option: 1024 & e[0] + }), + $u = e => ({ + option: e[27] + }); + +function fu(e, t, o) { + const i = e.slice(); + return i[27] = t[o], i +} +const yu = e => ({ + option: 1024 & e[0] + }), + bu = e => ({ + option: e[27] + }), + xu = e => ({ + option: 1024 & e[0] + }), + vu = e => ({ + option: e[27] + }); + +function wu(e) { + let t, o, i, r, n, a = [], + s = new Map, + l = e[1] && Su(e), + c = e[10]; + const d = e => e[27].id; + for (let t = 0; t < c.length; t += 1) { + let o = mu(e, c, t), + i = d(o); + s.set(i, a[t] = Fu(i, o)) + } + return { + c() { + t = kn("fieldset"), l && l.c(), o = Mn(), i = kn("ul"); + for (let e = 0; e < a.length; e += 1) a[e].c(); + An(i, "class", "PinturaRadioGroupOptions"), An(t, "class", r = Mc(["PinturaRadioGroup", e[3]])), An(t, "data-layout", e[5]), An(t, "title", e[7]) + }, + m(e, r) { + wn(e, t, r), l && l.m(t, null), bn(t, o), bn(t, i); + for (let e = 0; e < a.length; e += 1) a[e].m(i, null); + n = !0 + }, + p(e, u) { + e[1] ? l ? l.p(e, u) : (l = Su(e), l.c(), l.m(t, o)) : l && (l.d(1), l = null), 8419153 & u[0] && (c = e[10], ya(), a = Ma(a, u, d, 1, e, c, s, i, Ta, Fu, null, mu), ba()), (!n || 8 & u[0] && r !== (r = Mc(["PinturaRadioGroup", e[3]]))) && An(t, "class", r), (!n || 32 & u[0]) && An(t, "data-layout", e[5]), (!n || 128 & u[0]) && An(t, "title", e[7]) + }, + i(e) { + if (!n) { + for (let e = 0; e < c.length; e += 1) xa(a[e]); + n = !0 + } + }, + o(e) { + for (let e = 0; e < a.length; e += 1) va(a[e]); + n = !1 + }, + d(e) { + e && Sn(t), l && l.d(); + for (let e = 0; e < a.length; e += 1) a[e].d() + } + } +} + +function Su(e) { + let t, o, i; + return { + c() { + t = kn("legend"), o = Tn(e[1]), An(t, "class", i = e[2] && "implicit") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, r) { + 2 & r[0] && Fn(o, e[1]), 4 & r[0] && i !== (i = e[2] && "implicit") && An(t, "class", i) + }, + d(e) { + e && Sn(t) + } + } +} + +function ku(e) { + let t, o; + return t = new su({ + props: { + name: e[4], + label: e[27].label, + id: e[27].id, + value: e[27].value, + disabled: e[27].disabled, + hidden: e[27].hidden, + class: e[8], + checked: e[12](e[27]) === e[0], + onkeydown: e[13](e[27]), + onclick: e[14](e[27]), + $$slots: { + default: [Pu] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.name = e[4]), 1024 & o[0] && (i.label = e[27].label), 1024 & o[0] && (i.id = e[27].id), 1024 & o[0] && (i.value = e[27].value), 1024 & o[0] && (i.disabled = e[27].disabled), 1024 & o[0] && (i.hidden = e[27].hidden), 256 & o[0] && (i.class = e[8]), 1025 & o[0] && (i.checked = e[12](e[27]) === e[0]), 1024 & o[0] && (i.onkeydown = e[13](e[27])), 1024 & o[0] && (i.onclick = e[14](e[27])), 8389696 & o[0] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Cu(e) { + let t, o, i, r, n, a, s = [], + l = new Map; + const c = e[22].group, + d = rn(c, e, e[23], vu), + u = d || function(e) { + let t, o, i = e[27].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", "PinturaRadioGroupOptionGroupLabel") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1024 & t[0] && i !== (i = e[27].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } + }(e); + let h = e[27].options; + const p = e => e[27].id; + for (let t = 0; t < h.length; t += 1) { + let o = fu(e, h, t), + i = p(o); + l.set(i, s[t] = zu(i, o)) + } + return { + c() { + t = kn("li"), u && u.c(), o = Mn(), i = kn("ul"); + for (let e = 0; e < s.length; e += 1) s[e].c(); + r = Mn(), An(i, "class", "PinturaRadioGroupOptions"), An(t, "class", n = Mc(["PinturaRadioGroupOptionGroup", e[9]])) + }, + m(e, n) { + wn(e, t, n), u && u.m(t, null), bn(t, o), bn(t, i); + for (let e = 0; e < s.length; e += 1) s[e].m(i, null); + bn(t, r), a = !0 + }, + p(e, o) { + d ? d.p && (!a || 8389632 & o[0]) && sn(d, c, e, e[23], a ? an(c, e[23], o, xu) : ln(e[23]), vu) : u && u.p && (!a || 1024 & o[0]) && u.p(e, a ? o : [-1, -1]), 8418641 & o[0] && (h = e[27].options, ya(), s = Ma(s, o, p, 1, e, h, l, i, Ta, zu, null, fu), ba()), (!a || 512 & o[0] && n !== (n = Mc(["PinturaRadioGroupOptionGroup", e[9]]))) && An(t, "class", n) + }, + i(e) { + if (!a) { + xa(u, e); + for (let e = 0; e < h.length; e += 1) xa(s[e]); + a = !0 + } + }, + o(e) { + va(u, e); + for (let e = 0; e < s.length; e += 1) va(s[e]); + a = !1 + }, + d(e) { + e && Sn(t), u && u.d(e); + for (let e = 0; e < s.length; e += 1) s[e].d() + } + } +} + +function Tu(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Mu] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8389632 & o[0] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Mu(e) { + let t, o = e[27].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 1024 & i[0] && o !== (o = e[27].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Ru(e) { + let t, o, i = e[27].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", e[6]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, r) { + 1024 & r[0] && i !== (i = e[27].label + "") && Fn(o, i), 64 & r[0] && An(t, "class", e[6]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Pu(e) { + let t; + const o = e[22].option, + i = rn(o, e, e[23], $u), + r = i || function(e) { + let t, o, i, r = e[27].icon && Tu(e), + n = !e[27].hideLabel && Ru(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Mn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[27].icon ? r ? (r.p(e, i), 1024 & i[0] && xa(r, 1)) : (r = Tu(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[27].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Ru(e), n.c(), n.m(o.parentNode, o)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } + }(e); + return { + c() { + r && r.c() + }, + m(e, o) { + r && r.m(e, o), t = !0 + }, + p(e, n) { + i ? i.p && (!t || 8389632 & n[0]) && sn(i, o, e, e[23], t ? an(o, e[23], n, gu) : ln(e[23]), $u) : r && r.p && (!t || 1088 & n[0]) && r.p(e, t ? n : [-1, -1]) + }, + i(e) { + t || (xa(r, e), t = !0) + }, + o(e) { + va(r, e), t = !1 + }, + d(e) { + r && r.d(e) + } + } +} + +function Eu(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Iu] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8389632 & o[0] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Iu(e) { + let t, o = e[27].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 1024 & i[0] && o !== (o = e[27].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Au(e) { + let t, o, i = e[27].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", e[6]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, r) { + 1024 & r[0] && i !== (i = e[27].label + "") && Fn(o, i), 64 & r[0] && An(t, "class", e[6]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Lu(e) { + let t; + const o = e[22].option, + i = rn(o, e, e[23], bu), + r = i || function(e) { + let t, o, i, r = e[27].icon && Eu(e), + n = !e[27].hideLabel && Au(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Mn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[27].icon ? r ? (r.p(e, i), 1024 & i[0] && xa(r, 1)) : (r = Eu(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[27].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Au(e), n.c(), n.m(o.parentNode, o)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } + }(e); + return { + c() { + r && r.c() + }, + m(e, o) { + r && r.m(e, o), t = !0 + }, + p(e, n) { + i ? i.p && (!t || 8389632 & n[0]) && sn(i, o, e, e[23], t ? an(o, e[23], n, yu) : ln(e[23]), bu) : r && r.p && (!t || 1088 & n[0]) && r.p(e, t ? n : [-1, -1]) + }, + i(e) { + t || (xa(r, e), t = !0) + }, + o(e) { + va(r, e), t = !1 + }, + d(e) { + r && r.d(e) + } + } +} + +function zu(e, t) { + let o, i, r; + return i = new su({ + props: { + name: t[4], + label: t[27].label, + id: t[27].id, + value: t[27].value, + disabled: t[27].disabled, + hidden: t[27].hidden, + class: t[8], + checked: t[12](t[27]) === t[0], + onkeydown: t[13](t[27]), + onclick: t[14](t[27]), + $$slots: { + default: [Lu] + }, + $$scope: { + ctx: t + } + } + }), { + key: e, + first: null, + c() { + o = Rn(), Ia(i.$$.fragment), this.first = o + }, + m(e, t) { + wn(e, o, t), Aa(i, e, t), r = !0 + }, + p(e, o) { + t = e; + const r = {}; + 16 & o[0] && (r.name = t[4]), 1024 & o[0] && (r.label = t[27].label), 1024 & o[0] && (r.id = t[27].id), 1024 & o[0] && (r.value = t[27].value), 1024 & o[0] && (r.disabled = t[27].disabled), 1024 & o[0] && (r.hidden = t[27].hidden), 256 & o[0] && (r.class = t[8]), 1025 & o[0] && (r.checked = t[12](t[27]) === t[0]), 1024 & o[0] && (r.onkeydown = t[13](t[27])), 1024 & o[0] && (r.onclick = t[14](t[27])), 8389696 & o[0] && (r.$$scope = { + dirty: o, + ctx: t + }), i.$set(r) + }, + i(e) { + r || (xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(o), La(i, e) + } + } +} + +function Fu(e, t) { + let o, i, r, n, a; + const s = [Cu, ku], + l = []; + + function c(e, t) { + return e[27].options ? 0 : 1 + } + return i = c(t), r = l[i] = s[i](t), { + key: e, + first: null, + c() { + o = Rn(), r.c(), n = Rn(), this.first = o + }, + m(e, t) { + wn(e, o, t), l[i].m(e, t), wn(e, n, t), a = !0 + }, + p(e, o) { + let a = i; + i = c(t = e), i === a ? l[i].p(t, o) : (ya(), va(l[a], 1, 1, (() => { + l[a] = null + })), ba(), r = l[i], r ? r.p(t, o) : (r = l[i] = s[i](t), r.c()), xa(r, 1), r.m(n.parentNode, n)) + }, + i(e) { + a || (xa(r), a = !0) + }, + o(e) { + va(r), a = !1 + }, + d(e) { + e && Sn(o), l[i].d(e), e && Sn(n) + } + } +} + +function Ou(e) { + let t, o, i, r = e[11].length && wu(e); + return { + c() { + r && r.c(), t = Mn(), o = Rn() + }, + m(e, n) { + r && r.m(e, n), wn(e, t, n), wn(e, o, n), i = !0 + }, + p(e, o) { + e[11].length ? r ? (r.p(e, o), 2048 & o[0] && xa(r, 1)) : (r = wu(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(false), i = !0) + }, + o(e) { + va(r), va(false), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), e && Sn(o) + } + } +} + +function Du(e, t, o) { + let i, r, n, { + $$slots: a = {}, + $$scope: s + } = t; + const l = qn(); + let { + label: c + } = t, { + hideLabel: d = !0 + } = t, { + class: u + } = t, { + name: h = "radio-group-" + I() + } = t, { + selectedIndex: p = -1 + } = t, { + options: m = [] + } = t, { + onchange: g + } = t, { + layout: $ + } = t, { + optionMapper: f + } = t, { + optionFilter: y + } = t, { + value: b + } = t, { + optionLabelClass: x + } = t, { + title: v + } = t, { + locale: w + } = t, { + optionClass: S + } = t, { + optionGroupClass: k + } = t; + const C = e => n.findIndex((t => t.id === e.id)), + T = (e, t) => { + o(0, p = C(e)); + const i = { + index: p, + ...e + }; + ((e, ...t) => { + e && e(...t) + })(g, i, t), l("change", i) + }; + return e.$$set = e => { + "label" in e && o(1, c = e.label), "hideLabel" in e && o(2, d = e.hideLabel), "class" in e && o(3, u = e.class), "name" in e && o(4, h = e.name), "selectedIndex" in e && o(0, p = e.selectedIndex), "options" in e && o(15, m = e.options), "onchange" in e && o(16, g = e.onchange), "layout" in e && o(5, $ = e.layout), "optionMapper" in e && o(17, f = e.optionMapper), "optionFilter" in e && o(18, y = e.optionFilter), "value" in e && o(19, b = e.value), "optionLabelClass" in e && o(6, x = e.optionLabelClass), "title" in e && o(7, v = e.title), "locale" in e && o(20, w = e.locale), "optionClass" in e && o(8, S = e.optionClass), "optionGroupClass" in e && o(9, k = e.optionGroupClass), "$$scope" in e && o(23, s = e.$$scope) + }, e.$$.update = () => { + 1343488 & e.$$.dirty[0] && o(11, i = hu(y ? m.filter(y) : m, w)), 133120 & e.$$.dirty[0] && o(10, r = ((e = [], t) => { + let o = 0; + return e.map((e => (o++, Lo(e) ? Lo(e[1]) ? { + id: o, + label: e[0], + options: e[1].map((e => cu(e, ++o, t))) + } : cu(e, o, t) : e.options ? { + id: e.id || o, + label: e.label, + options: e.options.map((e => cu(e, ++o, t))) + } : cu(e, o, t)))) + })(i, f)), 1024 & e.$$.dirty[0] && o(21, n = lu(r)), 2654209 & e.$$.dirty[0] && p < 0 && (o(0, p = n.findIndex((e => pu(e.value, b)))), p < 0 && o(0, p = (e => e.findIndex((e => void 0 === e[0])))(m))) + }, [p, c, d, u, h, $, x, v, S, k, r, i, C, e => t => { + var o; + (o = t.key, /enter| /i.test(o)) && T(e, t) + }, e => t => { + T(e, t) + }, m, g, f, y, b, w, n, a, s] +} +class Bu extends Fa { + constructor(e) { + super(), za(this, e, Du, Ou, Qr, { + label: 1, + hideLabel: 2, + class: 3, + name: 4, + selectedIndex: 0, + options: 15, + onchange: 16, + layout: 5, + optionMapper: 17, + optionFilter: 18, + value: 19, + optionLabelClass: 6, + title: 7, + locale: 20, + optionClass: 8, + optionGroupClass: 9 + }, null, [-1, -1]) + } +} + +function Wu(e) { + let t, o, i, r, n, a, s, l, c, d; + return { + c() { + t = kn("div"), o = kn("button"), i = Tn("▲"), n = Mn(), a = kn("button"), s = Tn("▼"), An(o, "type", "button"), An(o, "tabindex", "-1"), An(o, "aria-label", r = "increase " + e[7]), An(a, "type", "button"), An(a, "tabindex", "-1"), An(a, "aria-label", l = "decrease " + e[7]), An(t, "class", "PinturaInputSpinners") + }, + m(r, l) { + wn(r, t, l), bn(t, o), bn(o, i), bn(t, n), bn(t, a), bn(a, s), c || (d = [Pn(o, "click", e[17]), Pn(a, "click", e[18])], c = !0) + }, + p(e, t) { + 128 & t && r !== (r = "increase " + e[7]) && An(o, "aria-label", r), 128 & t && l !== (l = "decrease " + e[7]) && An(a, "aria-label", l) + }, + d(e) { + e && Sn(t), c = !1, Kr(d) + } + } +} + +function Vu(e) { + let t, o, i, r, n, a, s = "number" === e[1] && e[9] && Wu(e); + return { + c() { + t = kn("div"), o = kn("input"), r = Mn(), s && s.c(), An(o, "class", "PinturaInputField"), An(o, "title", e[7]), An(o, "type", e[1]), An(o, "min", e[4]), An(o, "max", e[5]), An(o, "step", e[6]), An(o, "inputmode", e[3]), o.value = i = e[14] ? e[13] : e[0], An(o, "style", e[11]), An(o, "placeholder", e[8]), An(o, "maxlength", e[12]), o.disabled = e[2], An(o, "spellcheck", "false"), An(o, "autocorrect", "off"), An(o, "autocapitalize", "off"), An(t, "class", "PinturaInput") + }, + m(i, l) { + wn(i, t, l), bn(t, o), e[26](o), bn(t, r), s && s.m(t, null), n || (a = [Pn(o, "input", e[16]), Pn(o, "blur", (function() { + Jr(e[14] && e[15]) && (e[14] && e[15]).apply(this, arguments) + })), Pn(o, "keydown", e[19]), Pn(o, "keyup", e[20])], n = !0) + }, + p(r, [n]) { + e = r, 128 & n && An(o, "title", e[7]), 2 & n && An(o, "type", e[1]), 16 & n && An(o, "min", e[4]), 32 & n && An(o, "max", e[5]), 64 & n && An(o, "step", e[6]), 8 & n && An(o, "inputmode", e[3]), 24577 & n && i !== (i = e[14] ? e[13] : e[0]) && o.value !== i && (o.value = i), 2048 & n && An(o, "style", e[11]), 256 & n && An(o, "placeholder", e[8]), 4096 & n && An(o, "maxlength", e[12]), 4 & n && (o.disabled = e[2]), "number" === e[1] && e[9] ? s ? s.p(e, n) : (s = Wu(e), s.c(), s.m(t, null)) : s && (s.d(1), s = null) + }, + i: Gr, + o: Gr, + d(o) { + o && Sn(t), e[26](null), s && s.d(), n = !1, Kr(a) + } + } +} + +function _u(e, t, o) { + let i, n, a, s, l, c, d, { + value: u + } = t, + { + type: h = "text" + } = t, + { + disabled: p = !1 + } = t, + { + inputmode: m + } = t, + { + min: g + } = t, + { + max: $ + } = t, + { + step: f + } = t, + { + onchange: y = r + } = t, + { + onkeydown: b = r + } = t, + { + title: x + } = t, + { + stepMultiplier: v = 10 + } = t, + { + placeholder: w + } = t, + { + enableSpinButtons: S = !0 + } = t; + const k = () => { + let e = c.value; + return "number" === h && (e = "numeric" === m ? parseInt(e, 10) : parseFloat(e), !Eo(e) || Number.isNaN(e) ? e = g || 0 : i && (e = rs(e, g, $))), e + }; + let C = u; + const T = () => { + const e = rs(k() + (d ? f * v : f), g, $); + e !== u && (o(24, C = e), o(0, u = e), y(u)) + }, + M = () => { + const e = rs(k() - (d ? f * v : f), g, $); + e !== u && (o(24, C = e), o(0, u = e), y(u)) + }; + return e.$$set = e => { + "value" in e && o(0, u = e.value), "type" in e && o(1, h = e.type), "disabled" in e && o(2, p = e.disabled), "inputmode" in e && o(3, m = e.inputmode), "min" in e && o(4, g = e.min), "max" in e && o(5, $ = e.max), "step" in e && o(6, f = e.step), "onchange" in e && o(21, y = e.onchange), "onkeydown" in e && o(22, b = e.onkeydown), "title" in e && o(7, x = e.title), "stepMultiplier" in e && o(23, v = e.stepMultiplier), "placeholder" in e && o(8, w = e.placeholder), "enableSpinButtons" in e && o(9, S = e.enableSpinButtons) + }, e.$$.update = () => { + 48 & e.$$.dirty && o(14, i = Eo(g) && Eo($)), 16778241 & e.$$.dirty && o(13, n = c === document.activeElement ? C : u), 32 & e.$$.dirty && o(25, a = $ ? ($ + "").length : void 0), 33554440 & e.$$.dirty && o(12, s = "numeric" === m && a ? a : void 0), 33554432 & e.$$.dirty && o(11, l = a ? `min-width:${a}em` : void 0) + }, [u, h, p, m, g, $, f, x, w, S, c, l, s, n, i, () => { + o(24, C = k()), y(u) + }, () => { + o(24, C = c.value), y(k()) + }, T, M, e => { + d = e.shiftKey, b(e); + const { + key: t + } = e; + /up|down/i.test(t) && (/up/i.test(t) && T(), /down/i.test(t) && M(), e.preventDefault(), e.stopPropagation()) + }, e => { + const { + key: t + } = e; + /up|down/i.test(t) && (e.preventDefault(), e.stopPropagation()) + }, y, b, v, C, a, function(e) { + ta[e ? "unshift" : "push"]((() => { + c = e, o(10, c) + })) + }] +} +class Nu extends Fa { + constructor(e) { + super(), za(this, e, _u, Vu, Qr, { + value: 0, + type: 1, + disabled: 2, + inputmode: 3, + min: 4, + max: 5, + step: 6, + onchange: 21, + onkeydown: 22, + title: 7, + stepMultiplier: 23, + placeholder: 8, + enableSpinButtons: 9 + }) + } +} +const Hu = e => ({}), + ju = e => ({}); + +function Uu(e) { + let t, o, i, r, n = (e[2] || e[21]) + "", + a = e[6] && Zu(e); + return { + c() { + a && a.c(), t = Mn(), o = kn("span"), An(o, "class", i = Mc(["PinturaButtonLabel", e[3], e[5] && "implicit"])) + }, + m(e, i) { + a && a.m(e, i), wn(e, t, i), wn(e, o, i), o.innerHTML = n, r = !0 + }, + p(e, s) { + e[6] ? a ? (a.p(e, s), 64 & s[0] && xa(a, 1)) : (a = Zu(e), a.c(), xa(a, 1), a.m(t.parentNode, t)) : a && (ya(), va(a, 1, 1, (() => { + a = null + })), ba()), (!r || 2097156 & s[0]) && n !== (n = (e[2] || e[21]) + "") && (o.innerHTML = n), (!r || 40 & s[0] && i !== (i = Mc(["PinturaButtonLabel", e[3], e[5] && "implicit"]))) && An(o, "class", i) + }, + i(e) { + r || (xa(a), r = !0) + }, + o(e) { + va(a), r = !1 + }, + d(e) { + a && a.d(e), e && Sn(t), e && Sn(o) + } + } +} + +function Gu(e) { + let t, o; + return t = new Nu({ + props: { + value: e[10], + onchange: e[17], + type: "number", + inputmode: "numeric", + min: e[8].reduce(rh, 1 / 0), + max: e[8].reduce(nh, -1 / 0), + enableSpinButtons: !1 + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o[0] && (i.value = e[10]), 131072 & o[0] && (i.onchange = e[17]), 256 & o[0] && (i.min = e[8].reduce(rh, 1 / 0)), 256 & o[0] && (i.max = e[8].reduce(nh, -1 / 0)), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Zu(e) { + let t, o; + return t = new td({ + props: { + class: "PinturaButtonIcon", + $$slots: { + default: [Xu] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 536870976 & o[0] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Xu(e) { + let t; + return { + c() { + t = Cn("g") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[6] + }, + p(e, o) { + 64 & o[0] && (t.innerHTML = e[6]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Yu(e) { + let t, o, i, r, n, a; + const s = [Gu, Uu], + l = []; + + function c(e, t) { + return e[18] ? 0 : 1 + } + return o = c(e), i = l[o] = s[o](e), { + c() { + t = kn("span"), i.c(), An(t, "slot", "label"), An(t, "title", r = du(e[1], e[16])), An(t, "class", n = Mc(["PinturaButtonInner", e[18] && "PinturaComboBox", e[4]])) + }, + m(e, i) { + wn(e, t, i), l[o].m(t, null), a = !0 + }, + p(e, d) { + let u = o; + o = c(e), o === u ? l[o].p(e, d) : (ya(), va(l[u], 1, 1, (() => { + l[u] = null + })), ba(), i = l[o], i ? i.p(e, d) : (i = l[o] = s[o](e), i.c()), xa(i, 1), i.m(t, null)), (!a || 65538 & d[0] && r !== (r = du(e[1], e[16]))) && An(t, "title", r), (!a || 262160 & d[0] && n !== (n = Mc(["PinturaButtonInner", e[18] && "PinturaComboBox", e[4]]))) && An(t, "class", n) + }, + i(e) { + a || (xa(i), a = !0) + }, + o(e) { + va(i), a = !1 + }, + d(e) { + e && Sn(t), l[o].d() + } + } +} + +function qu(e) { + let t, o, i = e[31].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "slot", "group") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1 & t[1] && i !== (i = e[31].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Ku(e) { + let t, o; + return t = new td({ + props: { + style: M(e[14]) ? e[14](e[31].value) : e[14], + $$slots: { + default: [Ju] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16384 & o[0] | 1 & o[1] && (i.style = M(e[14]) ? e[14](e[31].value) : e[14]), 536870912 & o[0] | 1 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ju(e) { + let t, o = e[31].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 1 & i[1] && o !== (o = e[31].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Qu(e) { + let t, o, i, r, n, a = e[31].label + "", + s = e[31].sublabel && eh(e); + return { + c() { + t = kn("span"), o = new Bn(!1), i = Mn(), s && s.c(), o.a = i, An(t, "style", r = M(e[15]) ? e[15](e[31].value) : e[15]), An(t, "class", n = Mc(["PinturaDropdownOptionLabel", e[11]])) + }, + m(e, r) { + wn(e, t, r), o.m(a, t), bn(t, i), s && s.m(t, null) + }, + p(e, i) { + 1 & i[1] && a !== (a = e[31].label + "") && o.p(a), e[31].sublabel ? s ? s.p(e, i) : (s = eh(e), s.c(), s.m(t, null)) : s && (s.d(1), s = null), 32768 & i[0] | 1 & i[1] && r !== (r = M(e[15]) ? e[15](e[31].value) : e[15]) && An(t, "style", r), 2048 & i[0] && n !== (n = Mc(["PinturaDropdownOptionLabel", e[11]])) && An(t, "class", n) + }, + d(e) { + e && Sn(t), s && s.d() + } + } +} + +function eh(e) { + let t, o = e[31].sublabel + ""; + return { + c() { + t = kn("span"), An(t, "class", "PinturaDropdownOptionSublabel") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 1 & i[1] && o !== (o = e[31].sublabel + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function th(e) { + let t, o, i, r = e[31].icon && Ku(e), + n = !e[31].hideLabel && Qu(e); + return { + c() { + t = kn("span"), r && r.c(), o = Mn(), n && n.c(), An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), r && r.m(t, null), bn(t, o), n && n.m(t, null), i = !0 + }, + p(e, i) { + e[31].icon ? r ? (r.p(e, i), 1 & i[1] && xa(r, 1)) : (r = Ku(e), r.c(), xa(r, 1), r.m(t, o)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[31].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Qu(e), n.c(), n.m(t, null)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + e && Sn(t), r && r.d(), n && n.d() + } + } +} + +function oh(e) { + let t, o, i, r, n, a; + const s = e[27].controls, + l = rn(s, e, e[29], ju); + return i = new Bu({ + props: { + class: "PinturaOptionsList PinturaScrollableContent", + name: e[7], + value: e[10], + selectedIndex: e[9], + optionFilter: e[12], + optionMapper: e[13], + optionLabelClass: Mc(["PinturaDropdownOptionLabel", e[11]]), + optionGroupClass: "PinturaListOptionGroup", + optionClass: "PinturaListOption", + options: e[19], + onchange: e[22], + $$slots: { + option: [th, ({ + option: e + }) => ({ + 31: e + }), ({ + option: e + }) => [0, e ? 1 : 0]], + group: [qu, ({ + option: e + }) => ({ + 31: e + }), ({ + option: e + }) => [0, e ? 1 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), l && l.c(), o = Mn(), Ia(i.$$.fragment), An(t, "slot", "details"), An(t, "class", "PinturaOptionsListWrapper") + }, + m(s, c) { + wn(s, t, c), l && l.m(t, null), bn(t, o), Aa(i, t, null), r = !0, n || (a = Pn(t, "keydown", e[24]), n = !0) + }, + p(e, t) { + l && l.p && (!r || 536870912 & t[0]) && sn(l, s, e, e[29], r ? an(s, e[29], t, Hu) : ln(e[29]), ju); + const o = {}; + 128 & t[0] && (o.name = e[7]), 1024 & t[0] && (o.value = e[10]), 512 & t[0] && (o.selectedIndex = e[9]), 4096 & t[0] && (o.optionFilter = e[12]), 8192 & t[0] && (o.optionMapper = e[13]), 2048 & t[0] && (o.optionLabelClass = Mc(["PinturaDropdownOptionLabel", e[11]])), 524288 & t[0] && (o.options = e[19]), 536922112 & t[0] | 1 & t[1] && (o.$$scope = { + dirty: t, + ctx: e + }), i.$set(o) + }, + i(e) { + r || (xa(l, e), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(l, e), va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), l && l.d(e), La(i), n = !1, a() + } + } +} + +function ih(e) { + let t, o, i; + + function r(t) { + e[28](t) + } + let n = { + onshow: e[23], + buttonClass: Mc(["PinturaDropdownButton", e[0], e[5] && "PinturaDropdownIconOnly"]), + $$slots: { + details: [oh], + label: [Yu] + }, + $$scope: { + ctx: e + } + }; + return void 0 !== e[20] && (n.isActive = e[20]), t = new iu({ + props: n + }), ta.push((() => Ea(t, "isActive", r))), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 33 & i[0] && (r.buttonClass = Mc(["PinturaDropdownButton", e[0], e[5] && "PinturaDropdownIconOnly"])), 540016638 & i[0] && (r.$$scope = { + dirty: i, + ctx: e + }), !o && 1048576 & i[0] && (o = !0, r.isActive = e[20], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} +const rh = (e, [t]) => t < e ? t : e, + nh = (e, [t]) => t > e ? t : e; + +function ah(e, t, o) { + let i, n, { + $$slots: a = {}, + $$scope: s + } = t, + { + class: l + } = t, + { + title: c + } = t, + { + label: d + } = t, + { + labelClass: u + } = t, + { + innerClass: h + } = t, + { + hideLabel: p = !1 + } = t, + { + icon: m + } = t, + { + name: g + } = t, + { + options: $ = [] + } = t, + { + selectedIndex: f = -1 + } = t, + { + value: y + } = t, + { + optionLabelClass: b + } = t, + { + optionFilter: x + } = t, + { + optionMapper: v + } = t, + { + optionIconStyle: w + } = t, + { + optionLabelStyle: S + } = t, + { + locale: k + } = t, + { + onchange: C = r + } = t, + { + onload: T = r + } = t, + { + ondestroy: M = r + } = t, + { + enableInput: R = !1 + } = t; + let P; + return Zn((() => T({ + options: $ + }))), Yn((() => M({ + options: $ + }))), e.$$set = e => { + "class" in e && o(0, l = e.class), "title" in e && o(1, c = e.title), "label" in e && o(2, d = e.label), "labelClass" in e && o(3, u = e.labelClass), "innerClass" in e && o(4, h = e.innerClass), "hideLabel" in e && o(5, p = e.hideLabel), "icon" in e && o(6, m = e.icon), "name" in e && o(7, g = e.name), "options" in e && o(8, $ = e.options), "selectedIndex" in e && o(9, f = e.selectedIndex), "value" in e && o(10, y = e.value), "optionLabelClass" in e && o(11, b = e.optionLabelClass), "optionFilter" in e && o(12, x = e.optionFilter), "optionMapper" in e && o(13, v = e.optionMapper), "optionIconStyle" in e && o(14, w = e.optionIconStyle), "optionLabelStyle" in e && o(15, S = e.optionLabelStyle), "locale" in e && o(16, k = e.locale), "onchange" in e && o(17, C = e.onchange), "onload" in e && o(25, T = e.onload), "ondestroy" in e && o(26, M = e.ondestroy), "enableInput" in e && o(18, R = e.enableInput), "$$scope" in e && o(29, s = e.$$scope) + }, e.$$.update = () => { + 65792 & e.$$.dirty[0] && o(19, i = k ? hu($, k) : $), 525312 & e.$$.dirty[0] && o(21, n = i.reduce(((e, t) => { + if (e) return e; + const o = Array.isArray(t) ? t : [t, t], + [i, r] = o; + return pu(i, y) ? r : void 0 + }), void 0) || (e => { + const t = e.find((e => void 0 === e[0])); + if (t) return t[1] + })(i) || y) + }, [l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, R, i, P, n, e => { + o(21, n = e.value), C(e), o(20, P = !1) + }, ({ + e: e, + panel: t + }) => { + if (e && e.key && /up|down/i.test(e.key)) return jd(t.querySelector("input:not([disabled])")); + jd(t.querySelector("fieldset")) + }, e => { + /tab/i.test(e.key) && e.preventDefault() + }, T, M, a, function(e) { + P = e, o(20, P) + }, s] +} +class sh extends Fa { + constructor(e) { + super(), za(this, e, ah, ih, Qr, { + class: 0, + title: 1, + label: 2, + labelClass: 3, + innerClass: 4, + hideLabel: 5, + icon: 6, + name: 7, + options: 8, + selectedIndex: 9, + value: 10, + optionLabelClass: 11, + optionFilter: 12, + optionMapper: 13, + optionIconStyle: 14, + optionLabelStyle: 15, + locale: 16, + onchange: 17, + onload: 25, + ondestroy: 26, + enableInput: 18 + }, null, [-1, -1]) + } +} + +function lh(e) { + let t; + return { + c() { + t = kn("div"), An(t, "slot", "details") + }, + m(o, i) { + wn(o, t, i), e[14](t) + }, + p: Gr, + d(o) { + o && Sn(t), e[14](null) + } + } +} + +function ch(e) { + let t, o, i; + + function r(t) { + e[15](t) + } + let n = { + buttonLabel: e[0], + buttonClass: e[1], + buttonIcon: e[2], + buttonHideLabel: e[3], + buttonTitle: e[4], + buttonLabelClass: e[5], + onshow: e[6], + onhide: e[7], + $$slots: { + details: [lh] + }, + $$scope: { + ctx: e + } + }; + return void 0 !== e[9] && (n.isActive = e[9]), t = new iu({ + props: n + }), ta.push((() => Ea(t, "isActive", r))), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, [i]) { + const r = {}; + 1 & i && (r.buttonLabel = e[0]), 2 & i && (r.buttonClass = e[1]), 4 & i && (r.buttonIcon = e[2]), 8 & i && (r.buttonHideLabel = e[3]), 16 & i && (r.buttonTitle = e[4]), 32 & i && (r.buttonLabelClass = e[5]), 64 & i && (r.onshow = e[6]), 128 & i && (r.onhide = e[7]), 65792 & i && (r.$$scope = { + dirty: i, + ctx: e + }), !o && 512 & i && (o = !0, r.isActive = e[9], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function dh(e, t, o) { + let { + buttonLabel: i + } = t, { + buttonClass: n + } = t, { + buttonIcon: a + } = t, { + buttonHideLabel: s + } = t, { + buttonTitle: l + } = t, { + buttonLabelClass: c + } = t, { + root: d + } = t, { + ondestroy: u = r + } = t, { + onshow: h = r + } = t, { + onhide: p = r + } = t; + let m, g = !1; + return Yn(u), e.$$set = e => { + "buttonLabel" in e && o(0, i = e.buttonLabel), "buttonClass" in e && o(1, n = e.buttonClass), "buttonIcon" in e && o(2, a = e.buttonIcon), "buttonHideLabel" in e && o(3, s = e.buttonHideLabel), "buttonTitle" in e && o(4, l = e.buttonTitle), "buttonLabelClass" in e && o(5, c = e.buttonLabelClass), "root" in e && o(10, d = e.root), "ondestroy" in e && o(11, u = e.ondestroy), "onshow" in e && o(6, h = e.onshow), "onhide" in e && o(7, p = e.onhide) + }, e.$$.update = () => { + 1280 & e.$$.dirty && m && d && m.firstChild !== d && (m.hasChildNodes() ? m.replaceChild(d, m.firstChild) : m.append(d)) + }, [i, n, a, s, l, c, h, p, m, g, d, u, () => o(9, g = !1), () => o(9, g = !0), function(e) { + ta[e ? "unshift" : "push"]((() => { + m = e, o(8, m) + })) + }, function(e) { + g = e, o(9, g) + }] +} +class uh extends Fa { + constructor(e) { + super(), za(this, e, dh, ch, Qr, { + buttonLabel: 0, + buttonClass: 1, + buttonIcon: 2, + buttonHideLabel: 3, + buttonTitle: 4, + buttonLabelClass: 5, + root: 10, + ondestroy: 11, + onshow: 6, + onhide: 7, + hide: 12, + show: 13 + }) + } + get hide() { + return this.$$.ctx[12] + } + get show() { + return this.$$.ctx[13] + } +} +var hh = (e, t, o) => (e - t) / (o - t); +const ph = e => ({}), + mh = e => ({}); + +function gh(e) { + let t, o, i, r, n, a, s, l; + return o = new td({ + props: { + $$slots: { + default: [$h] + }, + $$scope: { + ctx: e + } + } + }), n = new td({ + props: { + $$slots: { + default: [fh] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("button"), Ia(o.$$.fragment), i = Mn(), r = kn("button"), Ia(n.$$.fragment), An(t, "type", "button"), An(t, "aria-label", "Increase"), An(r, "type", "button"), An(r, "aria-label", "Decrease") + }, + m(c, d) { + wn(c, t, d), Aa(o, t, null), wn(c, i, d), wn(c, r, d), Aa(n, r, null), a = !0, s || (l = [Pn(t, "pointerdown", e[20](1)), Pn(r, "pointerdown", e[20](-1))], s = !0) + }, + p(e, t) { + const i = {}; + 128 & t[1] && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i); + const r = {}; + 128 & t[1] && (r.$$scope = { + dirty: t, + ctx: e + }), n.$set(r) + }, + i(e) { + a || (xa(o.$$.fragment, e), xa(n.$$.fragment, e), a = !0) + }, + o(e) { + va(o.$$.fragment, e), va(n.$$.fragment, e), a = !1 + }, + d(e) { + e && Sn(t), La(o), e && Sn(i), e && Sn(r), La(n), s = !1, Kr(l) + } + } +} + +function $h(e) { + let t; + return { + c() { + t = Cn("path"), An(t, "d", "M8 12 h8 M12 8 v8") + }, + m(e, o) { + wn(e, t, o) + }, + p: Gr, + d(e) { + e && Sn(t) + } + } +} + +function fh(e) { + let t; + return { + c() { + t = Cn("path"), An(t, "d", "M9 12 h6") + }, + m(e, o) { + wn(e, t, o) + }, + p: Gr, + d(e) { + e && Sn(t) + } + } +} + +function yh(e) { + let t, o, i, r, n, a, s, l, c, d, u, h, p, m, g, $, f; + const y = e[36].default, + b = rn(y, e, e[38], null), + x = e[36].knob, + v = rn(x, e, e[38], mh); + let w = e[9] && gh(e); + return { + c() { + t = kn("div"), o = kn("div"), i = kn("input"), n = Mn(), a = kn("div"), b && b.c(), l = Mn(), c = kn("div"), d = kn("div"), v && v.c(), p = Mn(), w && w.c(), An(i, "type", "range"), An(i, "id", e[3]), An(i, "min", e[0]), An(i, "max", e[1]), An(i, "step", e[2]), i.value = e[14], An(i, "style", r = e[10] ? "pointer-events:none" : ""), An(a, "class", s = Mc(["PinturaSliderTrack", e[5]])), An(a, "style", e[4]), An(d, "class", u = Mc(["PinturaSliderKnob", e[7]])), An(d, "style", e[6]), An(c, "class", "PinturaSliderKnobController"), An(c, "style", e[17]), An(o, "class", "PinturaSliderControl"), An(o, "style", h = "--slider-position:" + Math.round(e[15])), An(t, "class", m = Mc(["PinturaSlider", e[12]])), An(t, "data-direction", e[8]) + }, + m(r, s) { + wn(r, t, s), bn(t, o), bn(o, i), e[37](i), bn(o, n), bn(o, a), b && b.m(a, null), bn(o, l), bn(o, c), bn(c, d), v && v.m(d, null), bn(t, p), w && w.m(t, null), g = !0, $ || (f = [Pn(i, "input", e[18]), Pn(i, "nudge", e[19]), hn(pd.call(null, i)), Pn(o, "pointerdown", (function() { + Jr(e[11] && e[13]) && (e[11] && e[13]).apply(this, arguments) + }))], $ = !0) + }, + p(n, l) { + e = n, (!g || 8 & l[0]) && An(i, "id", e[3]), (!g || 1 & l[0]) && An(i, "min", e[0]), (!g || 2 & l[0]) && An(i, "max", e[1]), (!g || 4 & l[0]) && An(i, "step", e[2]), (!g || 16384 & l[0]) && (i.value = e[14]), (!g || 1024 & l[0] && r !== (r = e[10] ? "pointer-events:none" : "")) && An(i, "style", r), b && b.p && (!g || 128 & l[1]) && sn(b, y, e, e[38], g ? an(y, e[38], l, null) : ln(e[38]), null), (!g || 32 & l[0] && s !== (s = Mc(["PinturaSliderTrack", e[5]]))) && An(a, "class", s), (!g || 16 & l[0]) && An(a, "style", e[4]), v && v.p && (!g || 128 & l[1]) && sn(v, x, e, e[38], g ? an(x, e[38], l, ph) : ln(e[38]), mh), (!g || 128 & l[0] && u !== (u = Mc(["PinturaSliderKnob", e[7]]))) && An(d, "class", u), (!g || 64 & l[0]) && An(d, "style", e[6]), (!g || 131072 & l[0]) && An(c, "style", e[17]), (!g || 32768 & l[0] && h !== (h = "--slider-position:" + Math.round(e[15]))) && An(o, "style", h), e[9] ? w ? (w.p(e, l), 512 & l[0] && xa(w, 1)) : (w = gh(e), w.c(), xa(w, 1), w.m(t, null)) : w && (ya(), va(w, 1, 1, (() => { + w = null + })), ba()), (!g || 4096 & l[0] && m !== (m = Mc(["PinturaSlider", e[12]]))) && An(t, "class", m), (!g || 256 & l[0]) && An(t, "data-direction", e[8]) + }, + i(e) { + g || (xa(b, e), xa(v, e), xa(w), g = !0) + }, + o(e) { + va(b, e), va(v, e), va(w), g = !1 + }, + d(o) { + o && Sn(t), e[37](null), b && b.d(o), v && v.d(o), w && w.d(), $ = !1, Kr(f) + } + } +} + +function bh(e, t, o) { + let i, n, a, s, l, c, d, u, h, p, m, g, $, f, y, { + $$slots: b = {}, + $$scope: x + } = t, + { + min: v = 0 + } = t, + { + max: w = 100 + } = t, + { + step: S = 1 + } = t, + { + id: k + } = t, + { + value: C = 0 + } = t, + { + valueMin: M + } = t, + { + valueMax: R + } = t, + { + trackStyle: P + } = t, + { + trackClass: E + } = t, + { + knobStyle: I + } = t, + { + knobClass: A + } = t, + { + ongrab: L = r + } = t, + { + onchange: z = r + } = t, + { + onrelease: F = r + } = t, + { + onexceed: O = r + } = t, + { + direction: D = "x" + } = t, + { + getValue: B = j + } = t, + { + setValue: W = j + } = t, + { + enableSpinButtons: V = !0 + } = t, + { + enableForceUseKnob: _ = !1 + } = t, + { + enableStopPropagation: N = !0 + } = t, + { + enablePointerdownListener: H = !0 + } = t, + { + maxInteractionDistance: U = 6 + } = t, + { + class: G + } = t; + const Z = e => W(((e, t) => (t = 1 / t, Math.round(e * t) / t))(rs(e, v, w), S), C), + X = (e, t, i = {}) => { + const { + grabbed: r = !1, + released: a = !1 + } = i, s = Z(v + e / t * n), l = M || v, c = R || w; + o(21, C = T(s) ? s : rs(s, l, c)), y !== s && (y = s, !T(s) && (s < l || s > c) && O(C, s), C !== f && (f = C, r && L(C), z(C), a && F(C))) + }; + let Y; + const q = e => { + const t = e[u] - $; + X(g + t, m) + }, + K = e => { + m = void 0, document.documentElement.removeEventListener("pointermove", q), document.documentElement.removeEventListener("pointerup", K), z(C), F(C) + }, + J = () => { + o(21, C = Z(i + ee * S)), z(C) + }; + let Q, ee = 1, + te = !1; + const oe = e => { + clearTimeout(Q), te || J(), F(C), document.removeEventListener("pointerup", oe) + }; + return e.$$set = e => { + "min" in e && o(0, v = e.min), "max" in e && o(1, w = e.max), "step" in e && o(2, S = e.step), "id" in e && o(3, k = e.id), "value" in e && o(21, C = e.value), "valueMin" in e && o(22, M = e.valueMin), "valueMax" in e && o(23, R = e.valueMax), "trackStyle" in e && o(4, P = e.trackStyle), "trackClass" in e && o(5, E = e.trackClass), "knobStyle" in e && o(6, I = e.knobStyle), "knobClass" in e && o(7, A = e.knobClass), "ongrab" in e && o(24, L = e.ongrab), "onchange" in e && o(25, z = e.onchange), "onrelease" in e && o(26, F = e.onrelease), "onexceed" in e && o(27, O = e.onexceed), "direction" in e && o(8, D = e.direction), "getValue" in e && o(28, B = e.getValue), "setValue" in e && o(29, W = e.setValue), "enableSpinButtons" in e && o(9, V = e.enableSpinButtons), "enableForceUseKnob" in e && o(10, _ = e.enableForceUseKnob), "enableStopPropagation" in e && o(30, N = e.enableStopPropagation), "enablePointerdownListener" in e && o(11, H = e.enablePointerdownListener), "maxInteractionDistance" in e && o(31, U = e.maxInteractionDistance), "class" in e && o(12, G = e.class), "$$scope" in e && o(38, x = e.$$scope) + }, e.$$.update = () => { + 270532608 & e.$$.dirty[0] && o(14, i = void 0 !== C ? B(C) : 0), 3 & e.$$.dirty[0] && (n = w - v), 16387 & e.$$.dirty[0] && o(33, a = hh(i, v, w)), 4 & e.$$.dirty[1] && o(15, s = 100 * a), 256 & e.$$.dirty[0] && o(34, l = D.toUpperCase()), 256 & e.$$.dirty[0] && o(35, c = "x" === D ? "Width" : "Height"), 16 & e.$$.dirty[1] && (d = "offset" + c), e.$$.dirty[1], 8 & e.$$.dirty[1] && (u = "page" + l), 32768 & e.$$.dirty[0] | 8 & e.$$.dirty[1] && o(17, h = `transform: translate${l}(${s}%)`) + }, [v, w, S, k, P, E, I, A, D, V, _, H, G, e => { + let t = !1; + N && e.stopPropagation(), clearTimeout(Y); + const o = p.getBoundingClientRect(); + if (m = p[d], $ = e[u], g = $ - o[D], _) { + if (Math.abs(g - a * m) > U) return; + t = !0, e.stopPropagation() + } + return document.activeElement !== p && p.focus(), X(g, m, { + grabbed: !0 + }), document.documentElement.addEventListener("pointermove", q), document.documentElement.addEventListener("pointerup", K), t + }, i, s, p, h, e => { + m || (o(21, C = W(parseFloat(e.target.value))), C !== f && (f = C, z(C))) + }, e => { + const t = p[d]; + X(i / n * t + e.detail[D], t), clearTimeout(Y), Y = setTimeout((() => { + F(C) + }), 250) + }, e => t => { + clearTimeout(Y), ee = e, te = !1, Q = setInterval((() => { + te = !0, J() + }), 100), document.addEventListener("pointercancel", oe), document.addEventListener("pointerup", oe) + }, C, M, R, L, z, F, O, B, W, N, U, e => { + const t = p.getBoundingClientRect(), + o = e[u] - t[D], + i = p[d]; + return Math.abs(o - a * i) + }, a, l, c, b, function(e) { + ta[e ? "unshift" : "push"]((() => { + p = e, o(16, p) + })) + }, x] +} +class xh extends Fa { + constructor(e) { + super(), za(this, e, bh, yh, Qr, { + min: 0, + max: 1, + step: 2, + id: 3, + value: 21, + valueMin: 22, + valueMax: 23, + trackStyle: 4, + trackClass: 5, + knobStyle: 6, + knobClass: 7, + ongrab: 24, + onchange: 25, + onrelease: 26, + onexceed: 27, + direction: 8, + getValue: 28, + setValue: 29, + enableSpinButtons: 9, + enableForceUseKnob: 10, + enableStopPropagation: 30, + enablePointerdownListener: 11, + maxInteractionDistance: 31, + class: 12, + eventDistanceToKnob: 32, + handlePointerDown: 13 + }, null, [-1, -1]) + } + get eventDistanceToKnob() { + return this.$$.ctx[32] + } + get handlePointerDown() { + return this.$$.ctx[13] + } +} + +function vh(e) { + let t, o; + return t = new td({ + props: { + class: "PinturaButtonIcon", + $$slots: { + default: [wh] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1048580 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function wh(e) { + let t; + return { + c() { + t = Cn("g") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[2] + }, + p(e, o) { + 4 & o && (t.innerHTML = e[2]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Sh(e) { + let t, o, i = du(e[8], e[6]) + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", "PinturaButtonLabelPrefix") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 320 & t && i !== (i = du(e[8], e[6]) + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function kh(e) { + let t, o, i, r, n, a, s, l, c, d = e[2] && vh(e), + u = e[8] && Sh(e); + return { + c() { + t = kn("span"), d && d.c(), o = Mn(), u && u.c(), i = Mn(), r = kn("span"), n = Tn(e[9]), An(r, "class", a = Mc(["PinturaButtonLabel", e[3], e[5] && "implicit"])), An(t, "slot", "label"), An(t, "title", s = du(e[1], e[6])), An(t, "class", l = Mc(["PinturaButtonInner", e[4]])) + }, + m(e, a) { + wn(e, t, a), d && d.m(t, null), bn(t, o), u && u.m(t, null), bn(t, i), bn(t, r), bn(r, n), c = !0 + }, + p(e, h) { + e[2] ? d ? (d.p(e, h), 4 & h && xa(d, 1)) : (d = vh(e), d.c(), xa(d, 1), d.m(t, o)) : d && (ya(), va(d, 1, 1, (() => { + d = null + })), ba()), e[8] ? u ? u.p(e, h) : (u = Sh(e), u.c(), u.m(t, i)) : u && (u.d(1), u = null), (!c || 512 & h) && Fn(n, e[9]), (!c || 40 & h && a !== (a = Mc(["PinturaButtonLabel", e[3], e[5] && "implicit"]))) && An(r, "class", a), (!c || 66 & h && s !== (s = du(e[1], e[6]))) && An(t, "title", s), (!c || 16 & h && l !== (l = Mc(["PinturaButtonInner", e[4]]))) && An(t, "class", l) + }, + i(e) { + c || (xa(d), c = !0) + }, + o(e) { + va(d), c = !1 + }, + d(e) { + e && Sn(t), d && d.d(), u && u.d() + } + } +} + +function Ch(e) { + let t, o, i, r, n; + const a = [e[12], { + value: e[7] + }, { + onchange: e[11] + }]; + let s = {}; + for (let e = 0; e < a.length; e += 1) s = Xr(s, a[e]); + return o = new xh({ + props: s + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "details") + }, + m(a, s) { + wn(a, t, s), Aa(o, t, null), i = !0, r || (n = Pn(t, "keydown", e[10]), r = !0) + }, + p(e, t) { + const i = 6272 & t ? Ra(a, [4096 & t && Pa(e[12]), 128 & t && { + value: e[7] + }, 2048 & t && { + onchange: e[11] + }]) : {}; + o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o), r = !1, n() + } + } +} + +function Th(e) { + let t, o; + return t = new iu({ + props: { + panelClass: "PinturaSliderPanel", + buttonClass: Mc(["PinturaSliderButton", e[0], e[5] && "PinturaSliderIconOnly"]), + $$slots: { + details: [Ch], + label: [kh] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, [o]) { + const i = {}; + 33 & o && (i.buttonClass = Mc(["PinturaSliderButton", e[0], e[5] && "PinturaSliderIconOnly"])), 1053694 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Mh(e, t, o) { + const i = ["class", "title", "label", "icon", "labelClass", "innerClass", "hideLabel", "locale", "value", "onchange", "labelPrefix"]; + let n = dn(t, i), + { + class: a + } = t, + { + title: s + } = t, + { + label: l = Math.round + } = t, + { + icon: c + } = t, + { + labelClass: d + } = t, + { + innerClass: u + } = t, + { + hideLabel: h = !1 + } = t, + { + locale: p + } = t, + { + value: m + } = t, + { + onchange: g = r + } = t, + { + labelPrefix: $ + } = t; + const { + min: f, + max: y, + getValue: b = j + } = n; + let x; + const v = e => o(9, x = (e => M(l) ? l(b(e), f, y, e) : l)(e)); + return e.$$set = e => { + t = Xr(Xr({}, t), cn(e)), o(12, n = dn(t, i)), "class" in e && o(0, a = e.class), "title" in e && o(1, s = e.title), "label" in e && o(13, l = e.label), "icon" in e && o(2, c = e.icon), "labelClass" in e && o(3, d = e.labelClass), "innerClass" in e && o(4, u = e.innerClass), "hideLabel" in e && o(5, h = e.hideLabel), "locale" in e && o(6, p = e.locale), "value" in e && o(7, m = e.value), "onchange" in e && o(14, g = e.onchange), "labelPrefix" in e && o(8, $ = e.labelPrefix) + }, e.$$.update = () => { + 8320 & e.$$.dirty && v(m) + }, [a, s, c, d, u, h, p, m, $, x, e => { + /tab/i.test(e.key) && e.preventDefault() + }, e => { + v(e), g(e) + }, n, l, g] +} +class Rh extends Fa { + constructor(e) { + super(), za(this, e, Mh, Th, Qr, { + class: 0, + title: 1, + label: 13, + icon: 2, + labelClass: 3, + innerClass: 4, + hideLabel: 5, + locale: 6, + value: 7, + onchange: 14, + labelPrefix: 8 + }) + } +} + +function Ph(e) { + let t, o, i = du(e[0], e[1]) + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", e[3]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, r) { + 3 & r && i !== (i = du(e[0], e[1]) + "") && Fn(o, i), 8 & r && An(t, "class", e[3]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Eh(e) { + let t, o, i, r, n = e[0] && Ph(e); + return i = new dp({ + props: { + items: e[2] + } + }), { + c() { + t = kn("li"), n && n.c(), o = Mn(), Ia(i.$$.fragment), An(t, "class", "PinturaShapeStyle") + }, + m(e, a) { + wn(e, t, a), n && n.m(t, null), bn(t, o), Aa(i, t, null), r = !0 + }, + p(e, [r]) { + e[0] ? n ? n.p(e, r) : (n = Ph(e), n.c(), n.m(t, o)) : n && (n.d(1), n = null); + const a = {}; + 4 & r && (a.items = e[2]), i.$set(a) + }, + i(e) { + r || (xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), n && n.d(), La(i) + } + } +} + +function Ih(e, t, o) { + let i, { + title: r + } = t, + { + locale: n + } = t, + { + items: a + } = t, + { + hideTitle: s = !1 + } = t; + return e.$$set = e => { + "title" in e && o(0, r = e.title), "locale" in e && o(1, n = e.locale), "items" in e && o(2, a = e.items), "hideTitle" in e && o(4, s = e.hideTitle) + }, e.$$.update = () => { + 16 & e.$$.dirty && o(3, i = "PinturaShapeStyleLabel" + (s ? " implicit" : "")) + }, [r, n, a, i, s] +} +class Ah extends Fa { + constructor(e) { + super(), za(this, e, Ih, Eh, Qr, { + title: 0, + locale: 1, + items: 2, + hideTitle: 4 + }) + } +} +var Lh = (e, t, o) => { + let i, r, n; + const a = Math.floor(6 * e), + s = 6 * e - a, + l = o * (1 - t), + c = o * (1 - s * t), + d = o * (1 - (1 - s) * t); + switch (a % 6) { + case 0: + i = o, r = d, n = l; + break; + case 1: + i = c, r = o, n = l; + break; + case 2: + i = l, r = o, n = d; + break; + case 3: + i = l, r = c, n = o; + break; + case 4: + i = d, r = l, n = o; + break; + case 5: + i = o, r = l, n = c + } + return [i, r, n] +}; + +function zh(e) { + let t, o, i; + return { + c() { + t = kn("div"), o = kn("span"), An(t, "class", "PinturaColorPreview"), An(t, "title", e[0]), An(t, "style", i = "--color:" + e[1]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, [o]) { + 1 & o && An(t, "title", e[0]), 2 & o && i !== (i = "--color:" + e[1]) && An(t, "style", i) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t) + } + } +} + +function Fh(e, t, o) { + let i, { + color: r + } = t, + { + title: n + } = t; + return e.$$set = e => { + "color" in e && o(2, r = e.color), "title" in e && o(0, n = e.title) + }, e.$$.update = () => { + 4 & e.$$.dirty && o(1, i = r ? _o(r) : "transparent") + }, [n, i, r] +} +class Oh extends Fa { + constructor(e) { + super(), za(this, e, Fh, zh, Qr, { + color: 2, + title: 0 + }) + } +} +var Dh = e => (e = e.trim(), /^rgba/.test(e) ? e.substr(5).split(",").map(parseFloat).map(((e, t) => e / (3 === t ? 1 : 255))) : /^rgb/.test(e) ? e.substr(4).split(",").map(parseFloat).map((e => e / 255)) : /^#/.test(e) ? (e => { + const [, t, o, i, r] = e.split(""); + e = e.length >= 4 && e.length <= 5 ? `#${t}${t}${o}${o}${i}${i}${r?`${r}${r}`:""}` : e; + const [n, a, s, l, c] = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e) || []; + if (n) return [a, s, l, c].filter((e => void 0 !== e)).map((e => parseInt(e, 16) / 255)) +})(e) : /[0-9]{1,3}\s?,\s?[0-9]{1,3}\s?,\s?[0-9]{1,3}/.test(e) ? e.split(",").map((e => parseInt(e, 10))).map((e => e / 255)) : void 0); + +function Bh(e) { + let t, o; + return { + c() { + t = kn("span"), o = Tn(e[0]) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1 & t[0] && Fn(o, e[0]) + }, + d(e) { + e && Sn(t) + } + } +} + +function Wh(e) { + let t, o, i, r; + o = new Oh({ + props: { + color: e[4], + title: du(e[8], e[10]) + } + }); + let n = !e[9] && Bh(e); + return { + c() { + t = kn("span"), Ia(o.$$.fragment), i = Mn(), n && n.c(), An(t, "slot", "label"), An(t, "class", "PinturaButtonLabel") + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), n && n.m(t, null), r = !0 + }, + p(e, i) { + const r = {}; + 16 & i[0] && (r.color = e[4]), 1280 & i[0] && (r.title = du(e[8], e[10])), o.$set(r), e[9] ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Bh(e), n.c(), n.m(t, null)) + }, + i(e) { + r || (xa(o.$$.fragment, e), r = !0) + }, + o(e) { + va(o.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), La(o), n && n.d() + } + } +} + +function Vh(e) { + let t, o, i, r, n, a, s, l, c, d, u, h, p, m; + c = new xh({ + props: { + class: "PinturaHuePicker", + knobStyle: "background-color:" + e[20], + onchange: e[26], + value: e[15], + min: 0, + max: 1, + step: .01 + } + }); + let g = e[11] && _h(e), + $ = e[14] && Nh(e); + return { + c() { + t = kn("div"), o = kn("div"), i = kn("div"), r = kn("div"), l = Mn(), Ia(c.$$.fragment), d = Mn(), g && g.c(), u = Mn(), $ && $.c(), An(r, "role", "button"), An(r, "aria-label", "Saturation slider"), An(r, "class", "PinturaPickerKnob"), An(r, "tabindex", "0"), An(r, "style", n = `background-color:${e[19]};`), An(i, "class", "PinturaPickerKnobController"), An(i, "style", a = `transform:translate(${e[24]}%,${e[23]}%)`), An(o, "class", "PinturaSaturationPicker"), An(o, "style", s = "background-color: " + e[20]), An(t, "class", "PinturaPicker") + }, + m(n, a) { + wn(n, t, a), bn(t, o), bn(o, i), bn(i, r), e[37](o), bn(t, l), Aa(c, t, null), bn(t, d), g && g.m(t, null), bn(t, u), $ && $.m(t, null), h = !0, p || (m = [Pn(r, "nudge", e[29]), hn(pd.call(null, r, { + preventDefault: !0 + })), Pn(o, "pointerdown", e[28])], p = !0) + }, + p(e, l) { + (!h || 524288 & l[0] && n !== (n = `background-color:${e[19]};`)) && An(r, "style", n), (!h || 25165824 & l[0] && a !== (a = `transform:translate(${e[24]}%,${e[23]}%)`)) && An(i, "style", a), (!h || 1048576 & l[0] && s !== (s = "background-color: " + e[20])) && An(o, "style", s); + const d = {}; + 1048576 & l[0] && (d.knobStyle = "background-color:" + e[20]), 32768 & l[0] && (d.value = e[15]), c.$set(d), e[11] ? g ? (g.p(e, l), 2048 & l[0] && xa(g, 1)) : (g = _h(e), g.c(), xa(g, 1), g.m(t, u)) : g && (ya(), va(g, 1, 1, (() => { + g = null + })), ba()), e[14] ? $ ? $.p(e, l) : ($ = Nh(e), $.c(), $.m(t, null)) : $ && ($.d(1), $ = null) + }, + i(e) { + h || (xa(c.$$.fragment, e), xa(g), h = !0) + }, + o(e) { + va(c.$$.fragment, e), va(g), h = !1 + }, + d(o) { + o && Sn(t), e[37](null), La(c), g && g.d(), $ && $.d(), p = !1, Kr(m) + } + } +} + +function _h(e) { + let t, o; + return t = new xh({ + props: { + class: "PinturaOpacityPicker", + knobStyle: "background-color:" + e[17], + trackStyle: `background-image:linear-gradient(to right,${e[18]},${e[19]})`, + onchange: e[27], + value: e[16], + min: 0, + max: 1, + step: .01 + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 131072 & o[0] && (i.knobStyle = "background-color:" + e[17]), 786432 & o[0] && (i.trackStyle = `background-image:linear-gradient(to right,${e[18]},${e[19]})`), 65536 & o[0] && (i.value = e[16]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Nh(e) { + let t, o, i; + return { + c() { + t = kn("input"), An(t, "class", "PinturaColorPickerInput"), An(t, "type", "text"), t.value = e[22] + }, + m(r, n) { + wn(r, t, n), o || (i = Pn(t, "input", e[30]), o = !0) + }, + p(e, o) { + 4194304 & o[0] && t.value !== e[22] && (t.value = e[22]) + }, + d(e) { + e && Sn(t), o = !1, i() + } + } +} + +function Hh(e) { + let t, o; + return t = new Bu({ + props: { + label: du(e[10].labelColorPalette, e[10]), + class: Mc(["PinturaColorPresets", e[9] ? "PinturaColorPresetsGrid" : "PinturaColorPresetsList"]), + hideLabel: !1, + name: e[1], + value: e[4], + optionGroupClass: "PinturaListOptionGroup", + optionClass: "PinturaListOption", + options: e[2].map(e[38]), + selectedIndex: e[3], + optionMapper: e[7], + optionLabelClass: e[6], + onchange: e[39], + $$slots: { + option: [Gh, ({ + option: e + }) => ({ + 51: e + }), ({ + option: e + }) => [0, e ? 1048576 : 0]], + group: [jh, ({ + option: e + }) => ({ + 51: e + }), ({ + option: e + }) => [0, e ? 1048576 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o[0] && (i.label = du(e[10].labelColorPalette, e[10])), 512 & o[0] && (i.class = Mc(["PinturaColorPresets", e[9] ? "PinturaColorPresetsGrid" : "PinturaColorPresetsList"])), 2 & o[0] && (i.name = e[1]), 16 & o[0] && (i.value = e[4]), 1028 & o[0] && (i.options = e[2].map(e[38])), 8 & o[0] && (i.selectedIndex = e[3]), 128 & o[0] && (i.optionMapper = e[7]), 64 & o[0] && (i.optionLabelClass = e[6]), 512 & o[0] | 3145728 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function jh(e) { + let t, o, i = e[51].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "slot", "group") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1048576 & t[1] && i !== (i = e[51].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Uh(e) { + let t, o, i = e[51].label + ""; + return { + c() { + t = kn("span"), o = Tn(i), An(t, "class", "PinturaButtonLabel") + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1048576 & t[1] && i !== (i = e[51].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Gh(e) { + let t, o, i, r; + o = new Oh({ + props: { + title: e[51].label, + color: e[51].value + } + }); + let n = !e[9] && Uh(e); + return { + c() { + t = kn("span"), Ia(o.$$.fragment), i = Mn(), n && n.c(), An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), n && n.m(t, null), r = !0 + }, + p(e, i) { + const r = {}; + 1048576 & i[1] && (r.title = e[51].label), 1048576 & i[1] && (r.color = e[51].value), o.$set(r), e[9] ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Uh(e), n.c(), n.m(t, null)) + }, + i(e) { + r || (xa(o.$$.fragment, e), r = !0) + }, + o(e) { + va(o.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), La(o), n && n.d() + } + } +} + +function Zh(e) { + let t, o, i, r = e[13] && Vh(e), + n = e[12] && Hh(e); + return { + c() { + t = kn("div"), r && r.c(), o = Mn(), n && n.c(), An(t, "slot", "details"), An(t, "class", "PinturaColorPickerPanel") + }, + m(e, a) { + wn(e, t, a), r && r.m(t, null), bn(t, o), n && n.m(t, null), i = !0 + }, + p(e, i) { + e[13] ? r ? (r.p(e, i), 8192 & i[0] && xa(r, 1)) : (r = Vh(e), r.c(), xa(r, 1), r.m(t, o)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[12] ? n ? (n.p(e, i), 4096 & i[0] && xa(n, 1)) : (n = Hh(e), n.c(), xa(n, 1), n.m(t, null)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + e && Sn(t), r && r.d(), n && n.d() + } + } +} + +function Xh(e) { + let t, o; + return t = new iu({ + props: { + buttonClass: Mc(["PinturaColorPickerButton", e[5]]), + $$slots: { + details: [Zh], + label: [Wh] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 32 & o[0] && (i.buttonClass = Mc(["PinturaColorPickerButton", e[5]])), 33554399 & o[0] | 2097152 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Yh(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, { + label: f + } = t, + { + name: y + } = t, + { + options: b = [] + } = t, + { + selectedIndex: x = -1 + } = t, + { + value: v + } = t, + { + buttonClass: w + } = t, + { + optionLabelClass: S + } = t, + { + optionMapper: k + } = t, + { + onchange: C + } = t, + { + title: T + } = t, + { + hidePresetLabel: R = !0 + } = t, + { + locale: P + } = t, + { + enableOpacity: E = !0 + } = t, + { + enablePresets: I = !0 + } = t, + { + enablePicker: A = !0 + } = t, + { + enableInput: L = !1 + } = t; + const z = (e, t) => { + if (u = [e[0], e[1], e[2]], t) { + let t = ((e, t, o) => { + let i = Math.max(e, t, o), + r = i - Math.min(e, t, o), + n = r && (i == e ? (t - o) / r : i == t ? 2 + (o - e) / r : 4 + (e - t) / r); + return [60 * (n < 0 ? n + 6 : n) / 360, i && r / i, i] + })(...u); + o(15, s = t[0]), o(32, l = t[1]), o(33, c = t[2]), o(16, d = Eo(e[3]) ? e[3] : 1) + } + o(17, h = _o(e)), o(18, p = _o([...u, 0])), o(19, m = _o([...u, 1])), o(20, g = _o(Lh(s, 1, 1))) + }, + F = () => { + const e = [...Lh(s, l, c), d]; + z(e), C(e) + }, + O = e => { + const t = 3 === e.length ? [...e, 1] : e; + z(t, !0), C(t) + }, + D = (e, t) => { + const i = rs(e.x / t.width, 0, 1), + r = rs(e.y / t.height, 0, 1); + var n; + n = 1 - r, o(32, l = i), o(33, c = n), 0 === d && o(16, d = 1), F() + }; + let B, W, V, _; + const N = e => { + const t = xe(de(e), _); + D(be(ue(V), t), W) + }, + H = e => { + W = void 0, document.documentElement.removeEventListener("pointermove", N), document.documentElement.removeEventListener("pointerup", H) + }; + let j; + return e.$$set = e => { + "label" in e && o(0, f = e.label), "name" in e && o(1, y = e.name), "options" in e && o(2, b = e.options), "selectedIndex" in e && o(3, x = e.selectedIndex), "value" in e && o(4, v = e.value), "buttonClass" in e && o(5, w = e.buttonClass), "optionLabelClass" in e && o(6, S = e.optionLabelClass), "optionMapper" in e && o(7, k = e.optionMapper), "onchange" in e && o(31, C = e.onchange), "title" in e && o(8, T = e.title), "hidePresetLabel" in e && o(9, R = e.hidePresetLabel), "locale" in e && o(10, P = e.locale), "enableOpacity" in e && o(11, E = e.enableOpacity), "enablePresets" in e && o(12, I = e.enablePresets), "enablePicker" in e && o(13, A = e.enablePicker), "enableInput" in e && o(14, L = e.enableInput) + }, e.$$.update = () => { + 16 & e.$$.dirty[0] | 8 & e.$$.dirty[1] && (!v || $ && cs(v, $) || (o(34, $ = [...v]), z(v, !0))), 2 & e.$$.dirty[1] && o(24, i = 100 * l), 4 & e.$$.dirty[1] && o(23, r = 100 - 100 * c), 16 & e.$$.dirty[1] && o(36, n = !!j && (j.length >= 4 && j.length <= 5)), 18448 & e.$$.dirty[0] | 32 & e.$$.dirty[1] && o(22, a = L && v ? ((e, t, o) => { + let i = e.map((e => Math.round(255 * e).toString(16).toLowerCase().padStart(2, "0"))); + return (!t && i.length > 3 || "ff" === i[3]) && i.pop(), o && (i = i.map((e => e.substring(0, 1)))), "#" + i.join("") + })(v, E, n) : void 0) + }, [f, y, b, x, v, w, S, k, T, R, P, E, I, A, L, s, d, h, p, m, g, B, a, r, i, O, e => { + o(15, s = e), 0 === d && o(16, d = 1), F() + }, e => { + o(16, d = e), F() + }, e => { + e.stopPropagation(), W = De(B.offsetWidth, B.offsetHeight), V = (e => ce(e.offsetX, e.offsetY))(e), _ = de(e), D(V, W), document.documentElement.addEventListener("pointermove", N), document.documentElement.addEventListener("pointerup", H) + }, e => { + W = De(B.offsetWidth, B.offsetHeight); + const t = i / 100 * W.width, + o = r / 100 * W.height; + D({ + x: t + e.detail.x, + y: o + e.detail.y + }, W) + }, e => { + const { + value: t + } = e.target, i = t.length; + if (!t.startsWith("#") || i < 4 || 6 === i || 8 === i || i > 9) return; + if (!E && i > 7) return; + const r = Dh(t); + r && (o(35, j = t), z(r), C(r)) + }, C, l, c, $, j, n, function(e) { + ta[e ? "unshift" : "push"]((() => { + B = e, o(21, B) + })) + }, ([e, t]) => [e, M(t) ? t(P) : t], e => O(e.value)] +} +class qh extends Fa { + constructor(e) { + super(), za(this, e, Yh, Xh, Qr, { + label: 0, + name: 1, + options: 2, + selectedIndex: 3, + value: 4, + buttonClass: 5, + optionLabelClass: 6, + optionMapper: 7, + onchange: 31, + title: 8, + hidePresetLabel: 9, + locale: 10, + enableOpacity: 11, + enablePresets: 12, + enablePicker: 13, + enableInput: 14 + }, null, [-1, -1]) + } +} + +function Kh(e) { + let t, o, i; + return o = new dp({ + props: { + items: e[0] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaShorthandControl PinturaShapeStyle") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, [t]) { + const i = {}; + 1 & t && (i.items = e[0]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Jh(e, t, o) { + let i, r, { + value: n + } = t, + { + onchange: a + } = t, + { + controls: s = [] + } = t; + return e.$$set = e => { + o(6, t = Xr(Xr({}, t), cn(e))), "value" in e && o(1, n = e.value), "onchange" in e && o(2, a = e.onchange), "controls" in e && o(3, s = e.controls) + }, e.$$.update = () => { + o(4, i = (e => { + const { + controls: t, + ...o + } = e; + return o + })(t)), 30 & e.$$.dirty && o(0, r = s.map(((e, t) => { + const [o, r, s] = e; + return [o, r, { + ...i, + ...s, + value: n[t], + onchange: e => { + const o = [...n]; + o[t] = e, a(o) + } + }] + }))) + }, t = cn(t), [r, n, a, s, i] +} +class Qh extends Fa { + constructor(e) { + super(), za(this, e, Jh, Kh, Qr, { + value: 1, + onchange: 2, + controls: 3 + }) + } +} + +function ep(e, t, o) { + const i = e.slice(); + return i[9] = t[o][0], i[0] = t[o][1], i[10] = t[o][2], i[2] = t[o][3], i +} + +function tp(e) { + let t, o, i; + const r = [e[10]]; + var n = e[3][e[9]] || e[9]; + + function a(e) { + let t = {}; + for (let e = 0; e < r.length; e += 1) t = Xr(t, r[e]); + return { + props: t + } + } + return n && (t = Wn(n, a())), { + c() { + t && Ia(t.$$.fragment), o = Rn() + }, + m(e, r) { + t && Aa(t, e, r), wn(e, o, r), i = !0 + }, + p(e, i) { + const s = 4 & i ? Ra(r, [Pa(e[10])]) : {}; + if (n !== (n = e[3][e[9]] || e[9])) { + if (t) { + ya(); + const e = t; + va(e.$$.fragment, 1, 0, (() => { + La(e, 1) + })), ba() + } + n ? (t = Wn(n, a()), Ia(t.$$.fragment), xa(t.$$.fragment, 1), Aa(t, o.parentNode, o)) : t = null + } else n && t.$set(s) + }, + i(e) { + i || (t && xa(t.$$.fragment, e), i = !0) + }, + o(e) { + t && va(t.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(o), t && La(t, e) + } + } +} + +function op(e) { + let t, o = e[9], + i = e[9] && ap(e); + return { + c() { + i && i.c(), t = Rn() + }, + m(e, o) { + i && i.m(e, o), wn(e, t, o) + }, + p(e, r) { + e[9] ? o ? Qr(o, e[9]) ? (i.d(1), i = ap(e), i.c(), i.m(t.parentNode, t)) : i.p(e, r) : (i = ap(e), i.c(), i.m(t.parentNode, t)) : o && (i.d(1), i = null), o = e[9] + }, + i: Gr, + o(e) { + va(i) + }, + d(e) { + e && Sn(t), i && i.d(e) + } + } +} + +function ip(e) { + let t, o, i = e[10].innerHTML + ""; + return { + c() { + t = new Bn(!1), o = Rn(), t.a = o + }, + m(e, r) { + t.m(i, e, r), wn(e, o, r) + }, + p(e, o) { + 4 & o && i !== (i = e[10].innerHTML + "") && t.p(i) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(o), e && t.d() + } + } +} + +function rp(e) { + let t, o = e[10].textContent + ""; + return { + c() { + t = Tn(o) + }, + m(e, o) { + wn(e, t, o) + }, + p(e, i) { + 4 & i && o !== (o = e[10].textContent + "") && Fn(t, o) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t) + } + } +} + +function np(e) { + let t, o; + return t = new dp({ + props: { + items: e[2], + discardEmptyItems: !0 + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 4 & o && (i.items = e[2]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function ap(e) { + let t, o, i, r, n; + const a = [np, rp, ip], + s = []; + + function l(e, t) { + return e[2] && e[2].length ? 0 : e[10].textContent ? 1 : e[10].innerHTML ? 2 : -1 + }~(o = l(e)) && (i = s[o] = a[o](e)); + let c = [e[4](e[10])], + d = {}; + for (let e = 0; e < c.length; e += 1) d = Xr(d, c[e]); + return { + c() { + t = kn(e[9]), i && i.c(), r = Mn(), /-/.test(e[9]) ? zn(t, d) : Ln(t, d) + }, + m(e, i) { + wn(e, t, i), ~o && s[o].m(t, null), bn(t, r), n = !0 + }, + p(e, n) { + let u = o; + o = l(e), o === u ? ~o && s[o].p(e, n) : (i && (ya(), va(s[u], 1, 1, (() => { + s[u] = null + })), ba()), ~o ? (i = s[o], i ? i.p(e, n) : (i = s[o] = a[o](e), i.c()), xa(i, 1), i.m(t, r)) : i = null), d = Ra(c, [4 & n && e[4](e[10])]), /-/.test(e[9]) ? zn(t, d) : Ln(t, d) + }, + i(e) { + n || (xa(i), n = !0) + }, + o(e) { + va(i), n = !1 + }, + d(e) { + e && Sn(t), ~o && s[o].d() + } + } +} + +function sp(e, t) { + let o, i, r, n, a, s; + const l = [op, tp], + c = []; + + function d(e, t) { + return 4 & t && (i = null), null == i && (i = !e[5](e[9])), i ? 0 : 1 + } + return r = d(t, -1), n = c[r] = l[r](t), { + key: e, + first: null, + c() { + o = Rn(), n.c(), a = Rn(), this.first = o + }, + m(e, t) { + wn(e, o, t), c[r].m(e, t), wn(e, a, t), s = !0 + }, + p(e, o) { + let i = r; + r = d(t = e, o), r === i ? c[r].p(t, o) : (ya(), va(c[i], 1, 1, (() => { + c[i] = null + })), ba(), n = c[r], n ? n.p(t, o) : (n = c[r] = l[r](t), n.c()), xa(n, 1), n.m(a.parentNode, a)) + }, + i(e) { + s || (xa(n), s = !0) + }, + o(e) { + va(n), s = !1 + }, + d(e) { + e && Sn(o), c[r].d(e), e && Sn(a) + } + } +} + +function lp(e) { + let t, o, i = [], + r = new Map, + n = e[2]; + const a = e => e[0] + e[1]; + for (let t = 0; t < n.length; t += 1) { + let o = ep(e, n, t), + s = a(o); + r.set(s, i[t] = sp(s, o)) + } + return { + c() { + for (let e = 0; e < i.length; e += 1) i[e].c(); + t = Rn() + }, + m(e, r) { + for (let t = 0; t < i.length; t += 1) i[t].m(e, r); + wn(e, t, r), o = !0 + }, + p(e, [o]) { + 62 & o && (n = e[2], ya(), i = Ma(i, o, a, 1, e, n, r, t.parentNode, Ta, sp, t, ep), ba()) + }, + i(e) { + if (!o) { + for (let e = 0; e < n.length; e += 1) xa(i[e]); + o = !0 + } + }, + o(e) { + for (let e = 0; e < i.length; e += 1) va(i[e]); + o = !1 + }, + d(e) { + for (let t = 0; t < i.length; t += 1) i[t].d(e); + e && Sn(t) + } + } +} + +function cp(e, t, o) { + let i, r, { + items: n + } = t, + { + discardEmptyItems: a = !0 + } = t, + { + key: s = "" + } = t; + const l = { + Button: cd, + ImageButton: Fd, + ImageButtonList: Vd, + Dropdown: sh, + RadioGroup: Bu, + Input: Nu, + Panel: uh, + ProgressIndicator: Rd, + ShapeStyle: Ah, + ToggleSlider: Rh, + ColorPicker: qh, + ShorthandControl: Qh + }, + c = e => !T(e) || !!l[e], + d = e => { + if (!e) return !1; + const [t, , o, i = []] = e; + return !!c(t) || (i.some(d) || o.textContent || o.innerHTML) + }; + return e.$$set = e => { + "items" in e && o(6, n = e.items), "discardEmptyItems" in e && o(7, a = e.discardEmptyItems), "key" in e && o(0, s = e.key) + }, e.$$.update = () => { + 1 & e.$$.dirty && o(1, i = s), 192 & e.$$.dirty && o(2, r = (n && a ? n.filter(d) : n) || []) + }, [s, i, r, l, (e = {}) => { + const { + textContent: t, + innerHTML: o, + ...i + } = e; + return i + }, c, n, a] +} +class dp extends Fa { + constructor(e) { + super(), za(this, e, cp, lp, Qr, { + items: 6, + discardEmptyItems: 7, + key: 0 + }) + } +} +let up = null; +var hp = e => { + if (null === up && (up = c() && "visualViewport" in window), !up) return !1; + const t = visualViewport.height, + o = () => { + e(visualViewport.height < t ? "visible" : "hidden") + }; + return visualViewport.addEventListener("resize", o), () => visualViewport.removeEventListener("resize", o) +}; + +function pp(e) { + let t, o; + const i = [{ + onclick: e[1] + }, e[3]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 10 & o[0] ? Ra(i, [2 & o[0] && { + onclick: e[1] + }, 8 & o[0] && Pa(e[3])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function mp(e) { + let t, o; + const i = [{ + onclick: e[0] + }, { + class: "PinturaInputFormButtonConfirm" + }, e[2]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 5 & o[0] ? Ra(i, [1 & o[0] && { + onclick: e[0] + }, i[1], 4 & o[0] && Pa(e[2])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function gp(e) { + let t, o, i, r, n, a, s, l, c = e[3] && pp(e); + const d = e[24].default, + u = rn(d, e, e[23], null); + let h = e[2] && mp(e); + return { + c() { + t = kn("div"), o = kn("div"), c && c.c(), i = Mn(), r = kn("div"), u && u.c(), n = Mn(), h && h.c(), An(r, "class", "PinturaInputFormFields"), An(o, "class", "PinturaInputFormInner"), An(t, "class", "PinturaInputForm"), An(t, "data-layout", e[4]), An(t, "style", e[6]) + }, + m(d, p) { + wn(d, t, p), bn(t, o), c && c.m(o, null), bn(o, i), bn(o, r), u && u.m(r, null), bn(o, n), h && h.m(o, null), e[25](t), a = !0, s || (l = [Pn(r, "keydown", e[10]), Pn(t, "focusin", e[7]), Pn(t, "focusout", e[8]), Pn(t, "measure", e[9]), hn($c.call(null, t))], s = !0) + }, + p(e, r) { + e[3] ? c ? (c.p(e, r), 8 & r[0] && xa(c, 1)) : (c = pp(e), c.c(), xa(c, 1), c.m(o, i)) : c && (ya(), va(c, 1, 1, (() => { + c = null + })), ba()), u && u.p && (!a || 8388608 & r[0]) && sn(u, d, e, e[23], a ? an(d, e[23], r, null) : ln(e[23]), null), e[2] ? h ? (h.p(e, r), 4 & r[0] && xa(h, 1)) : (h = mp(e), h.c(), xa(h, 1), h.m(o, null)) : h && (ya(), va(h, 1, 1, (() => { + h = null + })), ba()), (!a || 16 & r[0]) && An(t, "data-layout", e[4]), (!a || 64 & r[0]) && An(t, "style", e[6]) + }, + i(e) { + a || (xa(c), xa(u, e), xa(h), a = !0) + }, + o(e) { + va(c), va(u, e), va(h), a = !1 + }, + d(o) { + o && Sn(t), c && c.d(), u && u.d(o), h && h.d(), e[25](null), s = !1, Kr(l) + } + } +} + +function $p(e, t, o) { + let i, r, n, a, s, { + $$slots: l = {}, + $$scope: c + } = t, + { + onconfirm: d + } = t, + { + oncancel: u + } = t, + { + autoFocus: h = !0 + } = t, + { + autoPositionCursor: p = !0 + } = t, + { + buttonConfirm: m + } = t, + { + buttonCancel: g + } = t, + { + layout: $ = "stack" + } = t, + { + parentRect: f + } = t, + { + align: y + } = t, + { + justify: x + } = t, + { + parentMargin: v = 16 + } = t, + { + panelOffset: w = le() + } = t, + S = !1, + k = void 0, + C = void 0, + T = "", + M = 0; + const R = () => { + const e = s.querySelector("input, textarea"); + e.focus(), M >= 1 || e.select() + }, + P = () => { + S = !0, I || !mo() && !b() || o(19, T = "top:1em;bottom:auto;"), mo() && (e => { + let t; + const o = e => t = e.touches[0].screenY, + i = e => { + const o = e.touches[0].screenY, + i = e.target; + /textarea/i.test(i.nodeName) ? (o > t ? 0 == i.scrollTop && e.preventDefault() : o < t ? i.scrollTop + i.offsetHeight == i.scrollHeight && e.preventDefault() : e.preventDefault(), t = o) : e.preventDefault() + }; + e.addEventListener("touchstart", o), e.addEventListener("touchmove", i) + })(s), o(20, M = 1) + }; + let E; + const I = hp((e => { + n ? "hidden" !== e || S ? (clearTimeout(C), C = void 0, o(19, T = `top:${visualViewport.height-k.height-w.y}px`), "visible" === e ? (o(5, s.dataset.stick = !0, s), R(), P()) : (S = !1, o(20, M = 0))) : R() : o(19, T = "top: 4.5em; bottom: auto") + })); + return Zn((() => { + h && R() + })), Yn((() => { + I && I() + })), e.$$set = e => { + "onconfirm" in e && o(0, d = e.onconfirm), "oncancel" in e && o(1, u = e.oncancel), "autoFocus" in e && o(11, h = e.autoFocus), "autoPositionCursor" in e && o(12, p = e.autoPositionCursor), "buttonConfirm" in e && o(2, m = e.buttonConfirm), "buttonCancel" in e && o(3, g = e.buttonCancel), "layout" in e && o(4, $ = e.layout), "parentRect" in e && o(13, f = e.parentRect), "align" in e && o(14, y = e.align), "justify" in e && o(15, x = e.justify), "parentMargin" in e && o(16, v = e.parentMargin), "panelOffset" in e && o(17, w = e.panelOffset), "$$scope" in e && o(23, c = e.$$scope) + }, e.$$.update = () => { + 385024 & e.$$.dirty[0] && o(21, i = f && k ? ((e, t, o, i, r) => { + let n, a; + return n = "center" === i ? e.x + .5 * e.width - .5 * t.width : "right" === i ? e.x + e.width - t.width - r : e.x + r, a = "center" === o ? e.y + .5 * e.height - .5 * t.height : "bottom" === o ? e.y + e.height - t.height - r : e.y + r, `left:${n}px;top:${a}px;right:auto;bottom:auto;` + })(f, k, y, x, v) : void 0), 32 & e.$$.dirty[0] && o(22, r = s && getComputedStyle(s)), 4194304 & e.$$.dirty[0] && (n = r && "1" === r.getPropertyValue("--editor-modal")), 3670016 & e.$$.dirty[0] && o(6, a = `opacity:${M};${i||T}`) + }, [d, u, m, g, $, s, a, e => { + var t; + ((e => /textarea/i.test(e))(e.target) || Ud(e.target)) && (E = Date.now(), p && ((t = e.target).selectionStart = t.selectionEnd = t.value.length), clearTimeout(C), C = setTimeout(P, 200)) + }, e => { + Date.now() - E > 50 || (e.stopPropagation(), R()) + }, ({ + detail: e + }) => { + o(18, k = { + width: e.width, + height: e.height + }) + }, e => "Enter" === e.key ? d() : "Escape" === e.key ? u() : void 0, h, p, f, y, x, v, w, k, T, M, i, r, c, l, function(e) { + ta[e ? "unshift" : "push"]((() => { + s = e, o(5, s) + })) + }] +} +class fp extends Fa { + constructor(e) { + super(), za(this, e, $p, gp, Qr, { + onconfirm: 0, + oncancel: 1, + autoFocus: 11, + autoPositionCursor: 12, + buttonConfirm: 2, + buttonCancel: 3, + layout: 4, + parentRect: 13, + align: 14, + justify: 15, + parentMargin: 16, + panelOffset: 17 + }, null, [-1, -1]) + } +} +const yp = ["aspectRatio", "isRotatedSideways", "flip", "cropSize"], + bp = ms.map((([e]) => e)).filter((e => !yp.includes(e))); +var xp = (e, t) => new CustomEvent("ping", { + detail: { + type: e, + data: t + }, + cancelable: !0, + bubbles: !0 + }), + vp = (e, t) => (t ? cl(e, t) : e).replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\s+/g, "-").toLowerCase(), + wp = (e, t = j) => { + const { + subscribe: o, + set: i + } = Ba(void 0); + return { + subscribe: o, + destroy: ((e, t) => { + const o = matchMedia(e); + return o.addListener(t), t(o), { + get matches() { + return o.matches + }, + destroy: () => o.removeListener(t) + } + })(e, (({ + matches: e + }) => i(t(e)))).destroy + } + }, + Sp = e => /video/.test(e.type); +var kp = (e, t, o) => new Promise(((i, r) => { + (async () => { + Sp(e) && i(await (e => new Promise(((t, o) => { + const i = p("video"); + i.onseeked = () => { + const e = p("canvas"); + Xt(i).then((({ + width: o, + height: r + }) => { + e.width = o, e.height = r; + const n = e.getContext("2d", { + willReadFrequently: !0 + }), + a = () => { + n.drawImage(i, 0, 0, e.width, e.height); + const o = n.getImageData(0, 0, e.width, e.height); + g(e), URL.revokeObjectURL(i.src), t(o) + }; + Gt() ? setTimeout(a, 16) : a() + })) + }, i.onloadeddata = () => { + i.currentTime = 0 + }, i.onerror = e => { + console.error(e), o(i.error) + }, i.src = URL.createObjectURL(e), i.load() + })))(e)); + const n = await t.read(e), + a = e => z(e, o).then((e => t.apply(e, n))).then(i).catch(r); + if (E(e) || !P() || Gt() || mo()) return a(e); + let s; + try { + s = await L(((e, t) => createImageBitmap(e).then((e => t(null, e))).catch(t)), [e]) + } catch (e) {} + s && s.width ? await u() ? Fl() && n > 1 ? i(await (async e => h(await v(e)))(s)) : i(s) : i(t.apply(s, n)) : a(e) + })() + })), + Cp = (e, t) => new Promise((async o => { + if (e.width < t.width && e.height < t.height) return o(e); + const i = Math.min(t.width / e.width, t.height / e.height), + r = i * e.width, + n = i * e.height, + a = p("canvas", { + width: r, + height: n + }), + s = a.getContext("2d", { + willReadFrequently: !0 + }), + l = $(e) ? await v(e) : e; + s.drawImage(l, 0, 0, r, n), o(h(a)) + })); +let Tp = null; +var Mp = () => { + if (null === Tp) { + let e = p("canvas"); + Tp = !!Cl(e), g(e), e = void 0 + } + return Tp +}; +const Rp = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], + Pp = { + precision: 1e-4 + }, + Ep = { + precision: .01 * Pp.precision + }; +var Ip = () => { + const e = [], + t = [], + o = [], + i = () => { + t.forEach((e => e(o))) + }, + r = t => { + t.unsub = t.subscribe((r => ((t, r) => { + const n = e.indexOf(t); + n < 0 || (o[n] = r, i()) + })(t, r))), i() + }; + return { + get length() { + return e.length + }, + clear: () => { + e.forEach((e => e.unsub())), e.length = 0, o.length = 0 + }, + unshift: t => { + e.unshift(t), r(t) + }, + get: t => e[t], + push: t => { + e.push(t), r(t) + }, + remove: t => { + t.unsub(); + const i = e.indexOf(t); + e.splice(i, 1), o.splice(i, 1) + }, + forEach: t => e.forEach(t), + filter: t => e.filter(t), + subscribe: e => (t.push(e), e(o), () => { + t.splice(t.indexOf(e), 1) + }) + } + }, + Ap = e => e[0] < .25 && e[1] < .25 && e[2] < .25, + Lp = (e = {}) => new Promise((t => { + const { + accept: o = "image/*" + } = e, i = p("input", { + style: "position:absolute;visibility:hidden;width:0;height:0;", + type: "file", + accept: o + }), r = () => { + const [e] = i.files; + i.parentNode && i.remove(), i.removeEventListener("change", r), t(e) + }; + i.addEventListener("change", r), mo() && document.body.append(i), i.click() + })), + zp = e => { + try { + return e() + } catch (e) { + console.error(e) + } + }, + Fp = ([e, t]) => e + .5 * (t - e), + Op = e => Math.round(100 * e), + Dp = e => ce(e.clientX, e.clientY), + Bp = (e, t, o) => { + const i = Dp(e); + return xe(xe(i, t), o) + }; + +function Wp(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, { + root: S + } = t, + { + locale: k + } = t, + { + stores: C + } = t, + { + allowPan: T = !0 + } = t, + { + allowZoom: M = !0 + } = t, + { + enablePan: R = !0 + } = t, + { + enableZoom: P = !0 + } = t, + { + enableZoomControls: E = P + } = t, + { + enableZoomInput: I = !0 + } = t, + { + enablePanInput: A = !0 + } = t, + { + enablePanLimit: L = !0 + } = t, + { + panLimitGutterScalar: z = 0 + } = t, + { + zoomOptions: F = [.25, .5, 1, 1.25, 1.5, 2, 3, 4, 6, 8, 16] + } = t, + { + zoomAdjustStep: O = .25 + } = t, + { + zoomAdjustFactor: D = .1 + } = t, + { + zoomAdjustWheelFactor: B = 1 + } = t, + { + elasticity: W = 5 + } = t, + { + imageSelectionRectCentered: V + } = t, + { + imageSelectionRectScalar: _ + } = t, + { + zoomLevel: N = null + } = t, + { + zoomControls: H + } = t, + { + zoomMultiTouching: j = !1 + } = t; + const { + isAnimated: U, + isInteracting: G, + rootRect: Z, + stageRect: X, + stageScalar: Y, + imageSelectionPan: q, + imageSelectionZoom: K, + imageSelectionStageFitScalar: J, + imageSelectionRect: Q, + imageSelectionStoredState: ee, + imagePreviewUpscale: te + } = C; + on(e, U, (e => o(68, v = e))), on(e, G, (e => o(67, b = e))), on(e, Z, (e => o(65, f = e))), on(e, X, (e => o(64, $ = e))), on(e, Y, (e => o(45, x = e))), on(e, q, (e => o(63, p = e))), on(e, K, (e => o(42, h = e))), on(e, J, (e => o(43, m = e))), on(e, Q, (e => o(66, y = e))), on(e, ee, (e => o(69, w = e))), on(e, te, (e => o(44, g = e))); + let oe = !1, + ie = void 0, + re = void 0, + ne = void 0, + ae = void 0; + const se = e => { + const t = S.querySelector(".PinturaMain > .PinturaUtilMain") || S.querySelector('div[tabindex="0"] .PinturaUtilMain'); + return !!t && (!!t.contains(e.target) && !Gd(e.target)) + }, + de = (e = {}) => { + const { + pan: t = p, + zoom: o = h + } = e; + un(ee, w = { + translation: t, + zoom: o + }, w) + }, + he = () => p && 0 === p.x && 0 === p.y, + pe = () => { + un(K, h = void 0, h), he() || un(q, p = le(), p), $e.set(void 0, { + hard: !0 + }) + }, + ge = () => { + pe(), de() + }, + $e = ec(void 0, { + precision: .01 + }); + $e.subscribe((e => { + if (void 0 === e) return un(K, h = void 0, h), void(he() || un(q, p = le(), p)); + const t = h; + e <= 1 ? he() || un(q, p = le(), p) : e <= t && un(q, p = we(p, .8), p), un(K, h = e, h) + })); + const fe = e => { + $e.update((t => { + const o = e(t || m); + return de({ + zoom: o + }), o + })) + }, + ye = e => { + e ? $e.set(e, { + hard: !1 === v + }) : (e = void 0, $e.set(void 0, { + hard: !0 + })), un(K, h = e, h), de({ + zoom: e + }) + }, + be = (e, t) => { + const o = _ * t, + i = { + ...V + }, + r = 1 - rs(z, 0, 1); + at(i, o < r ? o : r); + const n = { + ...V + }; + at(n, o), nt(n, e); + const a = { + ...n + }; + return n.x > i.x && (a.x = i.x), n.y > i.y && (a.y = i.y), n.x + n.width < i.x + i.width && (a.x = i.x + i.width - n.width), n.y + n.height < i.y + i.height && (a.y = i.y + i.height - n.height), xe(rt(a), rt(i)) + }, + Se = ({ + translation: e, + zoom: t = 1, + elastify: o = !0 + }) => { + if (!ie) return; + let i = e; + const r = ce(ie.x + i.x, ie.y + i.y); + if (!L) return r; + const n = be(r, t); + return o ? $d(n, r, W) : n + }; + let ke, Ce; + const Te = () => { + Ce = void 0, un(G, b = !0, b), o(33, oe = A), ke = !1, ne = !1, ie = { + ...p + }, re = g ? h || m : n ? h || 1 : h || m + }, + Me = e => { + const { + scalar: t, + translation: r, + isMultiTouching: n + } = e.detail; + if (!ie || !n && !A) return; + n && we(r, .5), (A || n) && (ke = !0), j || o(12, j = n); + const a = i ? rs(re * t, s, l) : 1, + c = Se({ + translation: r, + zoom: a, + elastify: !0 + }), + d = me(c); + ae = me(p), ne = d < ae, i && K.set(a), q.set(c), Ce = j && { + translation: e.detail.translation, + scalar: t + } + }, + Re = e => { + un(G, b = !1, b), o(33, oe = !1), o(12, j = !1), ne && ae < 50 && (ie = void 0, re = void 0, q.set(le())) + }, + Pe = e => { + un(G, b = !1, b), o(33, oe = !1), o(12, j = !1), Promise.resolve().then((() => { + if (ke && ie) { + const t = Ce || e.detail, + o = i ? rs(re * t.scalar, s, l) : 1, + r = Se({ + elastify: !1, + translation: t.translation, + zoom: o + }); + q.set(r) + } + ie = void 0, re = void 0, A && e.detail.isDoubleTap && ge(), de() + })) + }; + let Ee, Ie = Date.now(), + Ae = 0, + Le = !1, + ze = !1; + const Fe = e => { + if (!se(e)) return; + if (e.preventDefault(), e.stopPropagation(), ze) return; + clearTimeout(Ee); + const t = yd(e), + o = Date.now(), + i = o - Ie; + Ie = o; + const r = Math.abs(t / i) > .2; + Ae = r ? Ae + 1 : 0; + const n = 1 + -1 * t * B / (r ? 50 : 100), + a = Bp(e, f, $); + Oe(a, n, { + isZoomingFast: r + }) + }, + Oe = (e, t, { + isZoomingFast: o + }) => { + const i = g ? h || m : n ? h || 1 : h || m, + r = i * t, + a = le(), + c = p, + d = g ? m : n ? 1 : m, + u = Math.abs(r - d), + $ = r < i, + f = i > d && $ || i < d && r > i, + b = Ae >= 5; + if (o || (Le = !1), Ae > 0 && !Le && (Le = f), b && Le) return ge(), ze = !0, void setTimeout((() => { + ze = !1 + }), 100); + if (b) return; + !o && f && u <= .05 && (Ee = setTimeout((() => { + ge() + }), 250)), un(K, h = rs(r, s, l), h); + const x = Ye(y); + at(x, i), nt(x, c); + const v = rt(x), + w = Ye(x); + at(w, h - i + 1, e); + const S = rt(w), + k = ve(xe(S, v), i); + ((e, t, o) => { + e.x = t, e.y = o + })(a, c.x + k.x, c.y + k.y), un(q, p = $ && o ? we(ue(p), .85) : be(a, i), p), de() + }, + De = e => (e ? "add" : "remove") + "EventListener"; + let Be, We, Ve, _e; + const Ne = e => { + e.preventDefault(), We = { + ...p + }, _e = Ye(y), Ve = Bp(e, f, $), Be = g ? h || m : n ? h || 1 : h || m + }, + He = e => { + e.preventDefault(), un(K, h = rs(e.scale * Be, s, l), h); + const t = Ye(_e); + at(t, Be), nt(t, We); + const o = rt(t), + i = Ye(t); + at(i, h - Be + 1, Ve); + const r = rt(i), + n = ve(xe(r, o), Be), + a = { + x: We.x + n.x, + y: We.y + n.y + }; + un(q, p = be(a, h), p) + }, + je = e => { + e.preventDefault() + }, + Ue = e => { + S[De(e)]("wheel", Fe), mo() || (S[De(e)]("gesturestart", Ne), S[De(e)]("gesturechange", He), S[De(e)]("gestureend", je)) + }, + Ge = e => { + const t = De(e); + S[t]("interactionstart", Te), S[t]("interactionupdate", Me), S[t]("interactionrelease", Re), S[t]("interactionend", Pe) + }; + let Ze; + return Zn((() => { + Ze = hd(S, { + drag: !0, + pinch: !0, + inertia: !0, + inertiaDurationMultiplier: 10, + shouldStartInteraction: se + }) + })), Yn((() => { + Ue(!1), Ge(!1), Ze.destroy(), Ze = void 0 + })), e.$$set = e => { + "root" in e && o(13, S = e.root), "locale" in e && o(14, k = e.locale), "stores" in e && o(15, C = e.stores), "allowPan" in e && o(16, T = e.allowPan), "allowZoom" in e && o(17, M = e.allowZoom), "enablePan" in e && o(18, R = e.enablePan), "enableZoom" in e && o(19, P = e.enableZoom), "enableZoomControls" in e && o(20, E = e.enableZoomControls), "enableZoomInput" in e && o(21, I = e.enableZoomInput), "enablePanInput" in e && o(22, A = e.enablePanInput), "enablePanLimit" in e && o(23, L = e.enablePanLimit), "panLimitGutterScalar" in e && o(24, z = e.panLimitGutterScalar), "zoomOptions" in e && o(25, F = e.zoomOptions), "zoomAdjustStep" in e && o(26, O = e.zoomAdjustStep), "zoomAdjustFactor" in e && o(27, D = e.zoomAdjustFactor), "zoomAdjustWheelFactor" in e && o(28, B = e.zoomAdjustWheelFactor), "elasticity" in e && o(29, W = e.elasticity), "imageSelectionRectCentered" in e && o(30, V = e.imageSelectionRectCentered), "imageSelectionRectScalar" in e && o(31, _ = e.imageSelectionRectScalar), "zoomLevel" in e && o(32, N = e.zoomLevel), "zoomControls" in e && o(11, H = e.zoomControls), "zoomMultiTouching" in e && o(12, j = e.zoomMultiTouching) + }, e.$$.update = () => { + var t, $; + 2752512 & e.$$.dirty[0] && o(35, i = M && P && I), 327680 & e.$$.dirty[0] && o(34, r = T && R), 196608 & e.$$.dirty[0] && (T || M ? (un(K, h = P ? w.zoom : void 0, h), un(q, p = R ? ue(w.translation) : he() ? p : le(), p), $e.set(h)) : pe()), 16384 & e.$$.dirty[1] && (n = x >= 1), 33570816 & e.$$.dirty[0] | 28672 & e.$$.dirty[1] && o(39, a = [(g || x < 1) && [m, Op(m) + "%", { + sublabel: k.labelZoomFit + }], ...F.map((e => [e, Op(e) + "%"]))].filter(Boolean).map((e => (1 === e[0] && (e[2] = { + sublabel: k.labelZoomActual + }), e))).sort(((e, t) => { + const o = e[0] || m, + i = t[0] || m; + return o < i ? -1 : i < o ? 1 : 0 + }))), 4352 & e.$$.dirty[1] && o(37, s = Math.min(a.reduce(((e, [t]) => t < e ? t : e), Number.MAX_SAFE_INTEGER), m)), 256 & e.$$.dirty[1] && o(36, l = a.reduce(((e, [t]) => t > e ? t : e), Number.MIN_SAFE_INTEGER)), 2 & e.$$.dirty[1] && null !== N && ye(N), 30720 & e.$$.dirty[1] && o(41, d = h || (g || x < 1 ? m : 1)), 1280 & e.$$.dirty[1] && o(38, (t = a.map((([e]) => e)), $ = d, c = t.findIndex((e => e === $)))), 1024 & e.$$.dirty[1] && o(40, u = Op(d) + "%"), 202522624 & e.$$.dirty[0] | 3040 & e.$$.dirty[1] && o(11, H = (M || M) && E ? [ + ["Button", "zoom-out", { + hideLabel: !0, + label: k.labelZoomOut, + icon: k.iconZoomOut, + disabled: h === s, + onclick: () => fe((e => Math.max(s, e - O))), + onhold: () => fe((e => Math.max(s, e * (1 - D)))) + }], + ["Dropdown", "zoom-level", { + label: u, + labelClass: "PinturaFixedWidthCharacters", + options: a, + selectedIndex: c, + onchange: e => ye(e.value) + }], + ["Button", "zoom-in", { + hideLabel: !0, + label: k.labelZoomIn, + icon: k.iconZoomIn, + disabled: h === l, + onclick: () => fe((e => Math.min(l, e + O))), + onhold: () => fe((e => Math.min(l, e * (1 + D)))) + }] + ] : []), 8192 & e.$$.dirty[0] | 16 & e.$$.dirty[1] && S && Ue(i), 8192 & e.$$.dirty[0] | 8 & e.$$.dirty[1] && S && Ge(r), 4202496 & e.$$.dirty[0] | 12 & e.$$.dirty[1] && S && S.style.setProperty("--cursor", r && A ? oe ? "grabbing" : "grab" : "") + }, [U, G, Z, X, Y, q, K, J, Q, ee, te, H, j, S, k, C, T, M, R, P, E, I, A, L, z, F, O, D, B, W, V, _, N, oe, r, i, l, s, c, a, u, d, h, m, g, x] +} +class Vp extends Fa { + constructor(e) { + super(), za(this, e, Wp, null, Qr, { + root: 13, + locale: 14, + stores: 15, + allowPan: 16, + allowZoom: 17, + enablePan: 18, + enableZoom: 19, + enableZoomControls: 20, + enableZoomInput: 21, + enablePanInput: 22, + enablePanLimit: 23, + panLimitGutterScalar: 24, + zoomOptions: 25, + zoomAdjustStep: 26, + zoomAdjustFactor: 27, + zoomAdjustWheelFactor: 28, + elasticity: 29, + imageSelectionRectCentered: 30, + imageSelectionRectScalar: 31, + zoomLevel: 32, + zoomControls: 11, + zoomMultiTouching: 12 + }, null, [-1, -1, -1, -1]) + } +} +const _p = e => new Promise((t => { + const o = new FileReader; + o.onload = () => t(o.result), o.readAsArrayBuffer(e) + })), + Np = (e, t = 0, o = e.byteLength) => { + const i = [], + r = t + o; + for (; t < r;) { + const o = e.getUint32(t); + if (o < 0) break; + const r = e.getUint32(t + 4); + if (i.push({ + type: r, + size: o, + offset: t, + bodyOffset: t + 8, + bodySize: o - 8 + }), o < 8) break; + t += o + } + return i + }, + Hp = (e, { + limit: t = 1024 + } = {}) => { + let o = 0; + o += 4; + if (1718909296 !== e.getUint32(o)) return 0; + o += 4; + const i = e.getUint32(o); + return 1836069938 === i ? ((e, t, o) => { + let i = !1, + r = -1; + for (let n = t; n < o; n++) + if (i || 1953653099 !== e.getUint32(n) || (i = !0, n += 4), i && 64 == e.getUint8(n)) { + r = n; + break + } if (r < 0) return 0; + const n = e.getUint32(r - 28), + a = e.getUint32(r - 20), + s = e.getUint32(r - 32), + l = e.getUint32(r - 16); + return 65536 === n && 4294901760 === a ? 90 : 4294901760 === s && 4294901760 === l ? 180 : 4294901760 === n && 65536 === a ? 270 : 0 + })(e, o, t) : 1903435808 === i ? (e => { + const t = Np(e).find((e => 1836019574 === e.type)); + if (!t) return 0; + const o = Np(e, t.bodyOffset, t.bodySize); + o.filter((e => 1953653099 === e.type)).forEach((t => { + o.push(...Np(e, t.bodyOffset, t.bodySize)) + })); + const i = [1836476516, 1953196132], + r = o.filter((e => i.includes(e.type))); + for (const { + type: t, + bodyOffset: o + } + of r) { + const i = e.getUint8(o); + let r = o + 4; + r += 1836476516 === t ? 32 : 36, r += 1 === i ? 12 : 0; + const n = e.getInt32(r), + a = e.getInt32(r + 4); + if (0 === n && a > 0) return 90; + if (n < 0 && 0 === a) return 180; + if (0 === n && a < 0) return 270 + } + return 0 + })(e) : 0 + }, + { + window: jp + } = ka; + +function Up(e) { + let t, o, i, r = e[42] && Gp(e), + n = e[39] && tm(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[42] ? r ? (r.p(e, i), 2048 & i[1] && xa(r, 1)) : (r = Gp(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[39] ? n ? (n.p(e, i), 256 & i[1] && xa(n, 1)) : (n = tm(e), n.c(), xa(n, 1), n.m(o.parentNode, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function Gp(e) { + let t, o, i, r, n, a; + const s = [Xp, Zp], + l = []; + + function c(e, t) { + return e[40] ? 0 : e[35] ? 1 : -1 + } + return ~(i = c(e)) && (r = l[i] = s[i](e)), { + c() { + t = kn("div"), o = kn("p"), r && r.c(), An(o, "style", e[73]), An(t, "class", "PinturaStatus"), An(t, "style", n = "opacity: " + e[55]) + }, + m(e, r) { + wn(e, t, r), bn(t, o), ~i && l[i].m(o, null), a = !0 + }, + p(e, d) { + let u = i; + i = c(e), i === u ? ~i && l[i].p(e, d) : (r && (ya(), va(l[u], 1, 1, (() => { + l[u] = null + })), ba()), ~i ? (r = l[i], r ? r.p(e, d) : (r = l[i] = s[i](e), r.c()), xa(r, 1), r.m(o, null)) : r = null), (!a || 2048 & d[2]) && An(o, "style", e[73]), (!a || 16777216 & d[1] && n !== (n = "opacity: " + e[55])) && An(t, "style", n) + }, + i(e) { + a || (xa(r), a = !0) + }, + o(e) { + va(r), a = !1 + }, + d(e) { + e && Sn(t), ~i && l[i].d() + } + } +} + +function Zp(e) { + let t, o, i, r; + t = new Cd({ + props: { + text: e[35].text || "", + onmeasure: e[214] + } + }); + let n = e[35].aside && Yp(e); + return { + c() { + Ia(t.$$.fragment), o = Mn(), n && n.c(), i = Rn() + }, + m(e, a) { + Aa(t, e, a), wn(e, o, a), n && n.m(e, a), wn(e, i, a), r = !0 + }, + p(e, o) { + const r = {}; + 16 & o[1] && (r.text = e[35].text || ""), t.$set(r), e[35].aside ? n ? (n.p(e, o), 16 & o[1] && xa(n, 1)) : (n = Yp(e), n.c(), xa(n, 1), n.m(i.parentNode, i)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + r || (xa(t.$$.fragment, e), xa(n), r = !0) + }, + o(e) { + va(t.$$.fragment, e), va(n), r = !1 + }, + d(e) { + La(t, e), e && Sn(o), n && n.d(e), e && Sn(i) + } + } +} + +function Xp(e) { + let t, o, i, r; + return t = new Cd({ + props: { + text: e[40], + onmeasure: e[214] + } + }), i = new Id({ + props: { + class: "PinturaStatusIcon", + offset: e[83], + opacity: e[84], + $$slots: { + default: [em] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment), o = Mn(), Ia(i.$$.fragment) + }, + m(e, n) { + Aa(t, e, n), wn(e, o, n), Aa(i, e, n), r = !0 + }, + p(e, o) { + const r = {}; + 512 & o[1] && (r.text = e[40]), t.$set(r); + const n = {}; + 2097152 & o[2] && (n.offset = e[83]), 4194304 & o[2] && (n.opacity = e[84]), 8 & o[0] | 536870912 & o[18] && (n.$$scope = { + dirty: o, + ctx: e + }), i.$set(n) + }, + i(e) { + r || (xa(t.$$.fragment, e), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(t.$$.fragment, e), va(i.$$.fragment, e), r = !1 + }, + d(e) { + La(t, e), e && Sn(o), La(i, e) + } + } +} + +function Yp(e) { + let t, o; + return t = new Id({ + props: { + class: "PinturaStatusButton", + offset: e[83], + opacity: e[84], + $$slots: { + default: [Jp] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 2097152 & o[2] && (i.offset = e[83]), 4194304 & o[2] && (i.opacity = e[84]), 16 & o[1] | 536870912 & o[18] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function qp(e) { + let t, o; + return t = new Rd({ + props: { + progress: e[35].progressIndicator.progress + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[1] && (i.progress = e[35].progressIndicator.progress), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Kp(e) { + let t, o; + const i = [e[35].closeButton, { + hideLabel: !0 + }]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new cd({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 16 & o[1] ? Ra(i, [Pa(e[35].closeButton), i[1]]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Jp(e) { + let t, o, i, r = e[35].progressIndicator.visible && qp(e), + n = e[35].closeButton && e[35].text && Kp(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[35].progressIndicator.visible ? r ? (r.p(e, i), 16 & i[1] && xa(r, 1)) : (r = qp(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[35].closeButton && e[35].text ? n ? (n.p(e, i), 16 & i[1] && xa(n, 1)) : (n = Kp(e), n.c(), xa(n, 1), n.m(o.parentNode, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function Qp(e) { + let t, o = e[3].iconSupportError + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 8 & i[0] && o !== (o = e[3].iconSupportError + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function em(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Qp] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8 & o[0] | 536870912 & o[18] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function tm(e) { + let t, o, i, r, n, a, s, l, c, d, u, h, p, m, g = e[10] && om(e), + $ = e[46] && e[45] && im(e); + const f = [lm, sm], + y = []; + + function b(e, t) { + return e[46] ? 0 : 1 + } + + function x(t) { + e[427](t) + } + + function v(t) { + e[428](t) + } + + function w(t) { + e[429](t) + } + i = b(e), r = y[i] = f[i](e), a = new Tc({ + props: { + isAnimated: e[54], + isTransparent: e[20], + pixelRatio: e[58], + textPixelRatio: e[6], + backgroundColor: e[57], + maskRect: e[59], + maskOpacity: e[74] ? e[74].maskOpacity : 1, + maskMarkupOpacity: e[7], + maskFrameOpacity: e[5], + clipAnnotationsToImage: e[86], + images: e[56], + interfaceImages: e[87], + loadImageData: e[28], + enableGrid: e[11], + gridSize: e[88], + gridColors: [e[89], e[90]], + gridOpacity: e[91], + selectionColor: e[92], + willRequest: e[82] || e[93], + willRender: e[424], + didRender: e[425] + } + }); + let S = { + root: e[2], + locale: e[3], + stores: e[200], + allowPan: e[95], + enablePan: e[17], + enablePanLimit: e[21], + panLimitGutterScalar: e[22], + enablePanInput: e[96], + allowZoom: e[97], + enableZoom: e[18], + enableZoomInput: void 0 !== e[19] ? e[19] : e[98], + enableZoomControls: e[99], + zoomOptions: e[13] || e[23], + zoomAdjustStep: e[14] || e[24], + zoomAdjustFactor: e[15] || e[25], + zoomAdjustWheelFactor: e[16] || e[26], + imageSelectionRectCentered: e[100], + imageSelectionRectScalar: e[101], + elasticity: mm * e[8] + }; + return void 0 !== e[0] && (S.zoomLevel = e[0]), void 0 !== e[33] && (S.zoomControls = e[33]), void 0 !== e[34] && (S.zoomMultiTouching = e[34]), d = new Vp({ + props: S + }), ta.push((() => Ea(d, "zoomLevel", x))), ta.push((() => Ea(d, "zoomControls", v))), ta.push((() => Ea(d, "zoomMultiTouching", w))), { + c() { + g && g.c(), t = Mn(), $ && $.c(), o = Mn(), r.c(), n = Mn(), Ia(a.$$.fragment), s = Mn(), l = kn("div"), c = Mn(), Ia(d.$$.fragment), An(l, "class", "PinturaRootPortal") + }, + m(r, u) { + g && g.m(r, u), wn(r, t, u), $ && $.m(r, u), wn(r, o, u), y[i].m(r, u), wn(r, n, u), Aa(a, r, u), wn(r, s, u), wn(r, l, u), e[426](l), wn(r, c, u), Aa(d, r, u), m = !0 + }, + p(e, s) { + e[10] ? g ? (g.p(e, s), 1024 & s[0] && xa(g, 1)) : (g = om(e), g.c(), xa(g, 1), g.m(t.parentNode, t)) : g && (ya(), va(g, 1, 1, (() => { + g = null + })), ba()), e[46] && e[45] ? $ ? ($.p(e, s), 49152 & s[1] && xa($, 1)) : ($ = im(e), $.c(), xa($, 1), $.m(o.parentNode, o)) : $ && (ya(), va($, 1, 1, (() => { + $ = null + })), ba()); + let l = i; + i = b(e), i === l ? y[i].p(e, s) : (ya(), va(y[l], 1, 1, (() => { + y[l] = null + })), ba(), r = y[i], r ? r.p(e, s) : (r = y[i] = f[i](e), r.c()), xa(r, 1), r.m(n.parentNode, n)); + const c = {}; + 8388608 & s[1] && (c.isAnimated = e[54]), 1048576 & s[0] && (c.isTransparent = e[20]), 134217728 & s[1] && (c.pixelRatio = e[58]), 64 & s[0] && (c.textPixelRatio = e[6]), 67108864 & s[1] && (c.backgroundColor = e[57]), 268435456 & s[1] && (c.maskRect = e[59]), 4096 & s[2] && (c.maskOpacity = e[74] ? e[74].maskOpacity : 1), 128 & s[0] && (c.maskMarkupOpacity = e[7]), 32 & s[0] && (c.maskFrameOpacity = e[5]), 16777216 & s[2] && (c.clipAnnotationsToImage = e[86]), 33554432 & s[1] && (c.images = e[56]), 33554432 & s[2] && (c.interfaceImages = e[87]), 268435456 & s[0] && (c.loadImageData = e[28]), 2048 & s[0] && (c.enableGrid = e[11]), 67108864 & s[2] && (c.gridSize = e[88]), 402653184 & s[2] && (c.gridColors = [e[89], e[90]]), 536870912 & s[2] && (c.gridOpacity = e[91]), 1073741824 & s[2] && (c.selectionColor = e[92]), 1048576 & s[2] | 1 & s[3] && (c.willRequest = e[82] || e[93]), 512 & s[0] | 541982784 & s[1] | 2 & s[3] && (c.willRender = e[424]), 124 & s[2] && (c.didRender = e[425]), a.$set(c); + const m = {}; + 4 & s[0] && (m.root = e[2]), 8 & s[0] && (m.locale = e[3]), 4 & s[3] && (m.allowPan = e[95]), 131072 & s[0] && (m.enablePan = e[17]), 2097152 & s[0] && (m.enablePanLimit = e[21]), 4194304 & s[0] && (m.panLimitGutterScalar = e[22]), 8 & s[3] && (m.enablePanInput = e[96]), 16 & s[3] && (m.allowZoom = e[97]), 262144 & s[0] && (m.enableZoom = e[18]), 524288 & s[0] | 32 & s[3] && (m.enableZoomInput = void 0 !== e[19] ? e[19] : e[98]), 64 & s[3] && (m.enableZoomControls = e[99]), 8396800 & s[0] && (m.zoomOptions = e[13] || e[23]), 16793600 & s[0] && (m.zoomAdjustStep = e[14] || e[24]), 33587200 & s[0] && (m.zoomAdjustFactor = e[15] || e[25]), 67174400 & s[0] && (m.zoomAdjustWheelFactor = e[16] || e[26]), 128 & s[3] && (m.imageSelectionRectCentered = e[100]), 256 & s[3] && (m.imageSelectionRectScalar = e[101]), 256 & s[0] && (m.elasticity = mm * e[8]), !u && 1 & s[0] && (u = !0, m.zoomLevel = e[0], ca((() => u = !1))), !h && 4 & s[1] && (h = !0, m.zoomControls = e[33], ca((() => h = !1))), !p && 8 & s[1] && (p = !0, m.zoomMultiTouching = e[34], ca((() => p = !1))), d.$set(m) + }, + i(e) { + m || (xa(g), xa($), xa(r), xa(a.$$.fragment, e), xa(d.$$.fragment, e), m = !0) + }, + o(e) { + va(g), va($), va(r), va(a.$$.fragment, e), va(d.$$.fragment, e), m = !1 + }, + d(r) { + g && g.d(r), r && Sn(t), $ && $.d(r), r && Sn(o), y[i].d(r), r && Sn(n), La(a, r), r && Sn(s), r && Sn(l), e[426](null), r && Sn(c), La(d, r) + } + } +} + +function om(e) { + let t, o, i, r, n; + return o = new dp({ + props: { + items: e[70] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaNav PinturaNavTools") + }, + m(a, s) { + wn(a, t, s), Aa(o, t, null), i = !0, r || (n = [Pn(t, "measure", e[411]), hn($c.call(null, t))], r = !0) + }, + p(e, t) { + const i = {}; + 256 & t[2] && (i.items = e[70]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o), r = !1, Kr(n) + } + } +} + +function im(e) { + let t, o, i; + return o = new vd({ + props: { + elasticity: e[8] * gm, + scrollDirection: e[76] ? "y" : "x", + $$slots: { + default: [am] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaNav PinturaNavMain") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 256 & t[0] && (i.elasticity = e[8] * gm), 16384 & t[2] && (i.scrollDirection = e[76] ? "y" : "x"), 8192 & t[1] | 393216 & t[2] | 536870912 & t[18] && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function rm(e) { + let t, o = e[586].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 268435456 & i[18] && o !== (o = e[586].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function nm(e) { + let t, o, i, r, n, a = e[586].label + ""; + return t = new td({ + props: { + $$slots: { + default: [rm] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment), o = Mn(), i = kn("span"), r = Tn(a) + }, + m(e, a) { + Aa(t, e, a), wn(e, o, a), wn(e, i, a), bn(i, r), n = !0 + }, + p(e, o) { + const i = {}; + 805306368 & o[18] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i), (!n || 268435456 & o[18]) && a !== (a = e[586].label + "") && Fn(r, a) + }, + i(e) { + n || (xa(t.$$.fragment, e), n = !0) + }, + o(e) { + va(t.$$.fragment, e), n = !1 + }, + d(e) { + La(t, e), e && Sn(o), e && Sn(i) + } + } +} + +function am(e) { + let t, o; + const i = [e[80], { + tabs: e[79] + }]; + let r = { + $$slots: { + default: [nm, ({ + tab: e + }) => ({ + 586: e + }), ({ + tab: e + }) => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, e ? 268435456 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new Fc({ + props: r + }), t.$on("select", e[412]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 393216 & o[2] ? Ra(i, [262144 & o[2] && Pa(e[80]), 131072 & o[2] && { + tabs: e[79] + }]) : {}; + 805306368 & o[18] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function sm(e) { + let t, o, i; + + function r(t) { + e[420](t) + } + let n = { + class: "PinturaMain", + content: { + ...e[47].find(e[419]), + props: e[27][e[44]] + }, + locale: e[3], + stores: e[200] + }; + return void 0 !== e[1][e[44]] && (n.component = e[1][e[44]]), t = new Jc({ + props: n + }), ta.push((() => Ea(t, "component", r))), t.$on("measure", e[226]), t.$on("show", e[421]), t.$on("hide", e[422]), t.$on("fade", e[423]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 134217728 & i[0] | 73728 & i[1] && (r.content = { + ...e[47].find(e[419]), + props: e[27][e[44]] + }), 8 & i[0] && (r.locale = e[3]), !o && 2 & i[0] | 8192 & i[1] && (o = !0, r.component = e[1][e[44]], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function lm(e) { + let t, o; + const i = [{ + class: "PinturaMain" + }, { + visible: e[63] + }, e[80], { + panels: e[78] + }]; + let r = { + $$slots: { + default: [cm, ({ + panel: e, + panelIsActive: t + }) => ({ + 584: e, + 585: t + }), ({ + panel: e, + panelIsActive: t + }) => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (e ? 67108864 : 0) | (t ? 134217728 : 0)]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new Zc({ + props: r + }), t.$on("measure", e[418]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 327682 & o[2] ? Ra(i, [i[0], 2 & o[2] && { + visible: e[63] + }, 262144 & o[2] && Pa(e[80]), 65536 & o[2] && { + panels: e[78] + }]) : {}; + 134217738 & o[0] | 65664 & o[1] | 2 & o[2] | 738197504 & o[18] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function cm(e) { + let t, o, i; + + function r(...t) { + return e[413](e[584], ...t) + } + + function n(t) { + e[414](t, e[584]) + } + let a = { + content: { + ...e[47].find(r), + props: e[27][e[584]] + }, + locale: e[3], + isActive: e[585], + stores: e[200] + }; + return void 0 !== e[1][e[584]] && (a.component = e[1][e[584]]), t = new Jc({ + props: a + }), ta.push((() => Ea(t, "component", n))), t.$on("measure", e[226]), t.$on("show", (function() { + return e[415](e[584]) + })), t.$on("hide", (function() { + return e[416](e[584]) + })), t.$on("fade", (function(...t) { + return e[417](e[584], ...t) + })), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(i, n) { + e = i; + const a = {}; + 134217728 & n[0] | 65536 & n[1] | 67108864 & n[18] && (a.content = { + ...e[47].find(r), + props: e[27][e[584]] + }), 8 & n[0] && (a.locale = e[3]), 134217728 & n[18] && (a.isActive = e[585]), !o && 2 & n[0] | 67108864 & n[18] && (o = !0, a.component = e[1][e[584]], ca((() => o = !1))), t.$set(a) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function dm(e) { + let t, o; + return { + c() { + t = kn("span"), An(t, "class", "PinturaEditorOverlay"), An(t, "style", o = "opacity:" + e[102]) + }, + m(e, o) { + wn(e, t, o) + }, + p(e, i) { + 512 & i[3] && o !== (o = "opacity:" + e[102]) && An(t, "style", o) + }, + d(e) { + e && Sn(t) + } + } +} + +function um(e) { + let t, o; + const i = [{ + layout: "row" + }, { + parentRect: e[51] + }, e[61]]; + let r = { + $$slots: { + default: [hm] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new fp({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 1074790400 & o[1] ? Ra(i, [i[0], 1048576 & o[1] && { + parentRect: e[51] + }, 1073741824 & o[1] && Pa(e[61])]) : {}; + 1073741824 & o[1] | 1 & o[2] | 536870912 & o[18] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function hm(e) { + let t, o, i; + return { + c() { + t = kn("input"), t.value = o = e[61].text, An(t, "placeholder", i = e[61].placeholder), An(t, "type", "text"), An(t, "spellcheck", "false"), An(t, "autocorrect", "off"), An(t, "autocapitalize", "off") + }, + m(o, i) { + wn(o, t, i), e[430](t) + }, + p(e, r) { + 1073741824 & r[1] && o !== (o = e[61].text) && t.value !== o && (t.value = o), 1073741824 & r[1] && i !== (i = e[61].placeholder) && An(t, "placeholder", i) + }, + d(o) { + o && Sn(t), e[430](null) + } + } +} + +function pm(e) { + let t, o, i, n, a, s; + la(e[410]); + let l = e[41] && Up(e), + c = e[102] > 0 && dm(e), + d = e[61] && um(e); + return { + c() { + t = kn("div"), l && l.c(), o = Mn(), c && c.c(), i = Mn(), d && d.c(), An(t, "id", e[4]), An(t, "class", e[77]), An(t, "data-env", e[75]), An(t, "dir", e[12]) + }, + m(u, h) { + wn(u, t, h), l && l.m(t, null), bn(t, o), c && c.m(t, null), bn(t, i), d && d.m(t, null), e[431](t), n = !0, a || (s = [Pn(jp, "keydown", e[217]), Pn(jp, "keyup", e[218]), Pn(jp, "blur", e[219]), Pn(jp, "paste", e[223]), Pn(jp, "resize", e[410]), Pn(t, "ping", (function() { + Jr(e[69]) && e[69].apply(this, arguments) + })), Pn(t, "contextmenu", e[220]), Pn(t, "touchstart", e[215], { + passive: !1 + }), Pn(t, "touchmove", (function() { + Jr(e[72]) && e[72].apply(this, arguments) + })), Pn(t, "pointermove", (function() { + Jr(e[71]) && e[71].apply(this, arguments) + })), Pn(t, "transitionend", e[205]), Pn(t, "dropfiles", e[221]), Pn(t, "measure", e[432]), Pn(t, "click", (function() { + Jr(e[43] ? e[222] : r) && (e[43] ? e[222] : r).apply(this, arguments) + })), hn($c.call(null, t, { + observeViewRect: !0, + isMeasureRoot: !0 + })), hn(fc.call(null, t)), hn(bc.call(null, t))], a = !0) + }, + p(r, a) { + (e = r)[41] ? l ? (l.p(e, a), 1024 & a[1] && xa(l, 1)) : (l = Up(e), l.c(), xa(l, 1), l.m(t, o)): l && (ya(), va(l, 1, 1, (() => { + l = null + })), ba()), e[102] > 0 ? c ? c.p(e, a) : (c = dm(e), c.c(), c.m(t, i)) : c && (c.d(1), c = null), e[61] ? d ? (d.p(e, a), 1073741824 & a[1] && xa(d, 1)) : (d = um(e), d.c(), xa(d, 1), d.m(t, null)) : d && (ya(), va(d, 1, 1, (() => { + d = null + })), ba()), (!n || 16 & a[0]) && An(t, "id", e[4]), (!n || 32768 & a[2]) && An(t, "class", e[77]), (!n || 8192 & a[2]) && An(t, "data-env", e[75]), (!n || 4096 & a[0]) && An(t, "dir", e[12]) + }, + i(e) { + n || (xa(l), xa(d), n = !0) + }, + o(e) { + va(l), va(d), n = !1 + }, + d(o) { + o && Sn(t), l && l.d(), c && c.d(), d && d.d(), e[431](null), a = !1, Kr(s) + } + } +} +const mm = 1, + gm = 10; + +function $m(e, t, o) { + let i, n, a, s, l, c, d, u, p, m, $, f, y, v, w, S, k, C, M, R, P, E, A, L, z, F, O, D, B, W, V, _, N, H, U, G, Z, X, Y, q, K, J, Q, ee, te, oe, ie, re, ae, se, de, ue, he, pe, me, ge, $e, fe, be, xe, ve, we, Se, ke, Ce, Te, Me, Re, Pe, Ee, Ie, Ae, Le, ze, Fe, Oe, Be, We, Ve, _e, Ne, He, je, Ue, Ge, Ze, Xe, Je, Qe, tt, ot, rt, st, lt, ht, pt, $t, ft, xt, wt, kt, Ct, Tt, Mt, Rt, Pt, Et, It, At, Lt, zt, Ft, Ot, Wt, Vt, _t, Nt, Ht, jt, Ut, Zt, Xt, Yt, qt, Kt, Jt, Qt, eo, to, oo, io, ro, no, ao, lo, co, uo, ho, po, go, $o, fo, yo, bo, xo, vo, wo, So, ko, Co, To, Mo, Ro, Po, Io, Ao, Lo, zo, Fo, Oo, Do, Bo, Vo, _o, No, Ho, jo, Uo, Zo, Yo, qo, Ko, Jo, Qo, ei, ti, oi, ii, ri, ni, ai, si, li, ci, di, ui, hi, pi, mi, $i, fi, yi, bi, xi, vi, ki, Ci, Ti, Ri, Pi, Ii, Ai, Li, zi, Fi, Oi, Di, Bi, Wi = Gr, + Vi = Gr; + on(e, tc, (e => o(398, qo = e))), e.$$.on_destroy.push((() => Wi())), e.$$.on_destroy.push((() => Vi())); + const _i = Go(), + Ni = qn(); + let Hi, ji, { + class: Ui + } = t, + { + layout: Gi + } = t, + { + stores: Zi + } = t, + { + locale: Xi + } = t, + { + id: Yi + } = t, + { + util: qi + } = t, + { + utils: Ki + } = t, + { + animations: Ji = "auto" + } = t, + { + disabled: Qi = !1 + } = t, + { + status: er + } = t, + { + previewUpscale: tr = !1 + } = t, + { + previewPad: or = !1 + } = t, + { + previewMaskOpacity: ir = .95 + } = t, + { + previewImageDataMaxSize: rr + } = t, + { + previewImageTextPixelRatio: nr + } = t, + { + markupMaskOpacity: ar = 1 + } = t, + { + zoomMaskOpacity: sr = .85 + } = t, + { + elasticityMultiplier: lr = 10 + } = t, + { + willRevert: cr = (() => Promise.resolve(!0)) + } = t, + { + willProcessImage: dr = (() => Promise.resolve(!0)) + } = t, + { + willRenderCanvas: hr = j + } = t, + { + willRenderToolbar: pr = j + } = t, + { + willSetHistoryInitialState: mr = j + } = t, + { + enableButtonExport: gr = !0 + } = t, + { + enableButtonRevert: yr = !0 + } = t, + { + enableNavigateHistory: br = !0 + } = t, + { + enableToolbar: xr = !0 + } = t, + { + enableUtils: vr = !0 + } = t, + { + enableButtonClose: wr = !1 + } = t, + { + enableDropImage: kr = !1 + } = t, + { + enablePasteImage: Cr = !1 + } = t, + { + enableBrowseImage: Tr = !1 + } = t, + { + enableTransparencyGrid: Mr = !1 + } = t, + { + layoutDirectionPreference: Rr = "auto" + } = t, + { + layoutHorizontalUtilsPreference: Pr = "left" + } = t, + { + layoutVerticalUtilsPreference: Er = "bottom" + } = t, + { + layoutVerticalToolbarPreference: Ir = "top" + } = t, + { + layoutVerticalControlGroupsPreference: Ar = "bottom" + } = t, + { + layoutVerticalControlTabsPreference: Lr = "bottom" + } = t, + { + textDirection: zr + } = t, + { + markupEditorZoomLevel: Fr = null + } = t, + { + markupEditorZoomLevels: Or + } = t, + { + markupEditorZoomAdjustStep: Dr + } = t, + { + markupEditorZoomAdjustFactor: Br + } = t, + { + markupEditorZoomAdjustWheelFactor: Wr + } = t, + { + markupEditorInteractionMode: Vr = !1 + } = t, + { + muteAudio: _r = !0 + } = t, + { + willSetMediaInitialTimeOffset: Nr = ((e, t) => e * Fp(t[0])) + } = t, + { + enablePan: Hr = !0 + } = t, + { + enableZoom: Zr = !0 + } = t, + { + enableZoomControls: Xr = !0 + } = t, + { + enableZoomInput: Yr + } = t, + { + enablePanInput: qr + } = t, + { + enableCanvasAlpha: Kr = !1 + } = t, + { + enablePanLimit: Jr + } = t, + { + panLimitGutterScalar: Qr + } = t, + { + zoomPresetOptions: rn = [.25, .5, 1, 1.25, 1.5, 2, 3, 4, 6, 8, 16] + } = t, + { + zoomAdjustStep: nn = .25 + } = t, + { + zoomAdjustFactor: an = .1 + } = t, + { + zoomAdjustWheelFactor: sn = 1 + } = t, + { + zoomLevel: ln = null + } = t; + let { + imagePreviewSrc: cn + } = t, { + imageOrienter: dn = { + read: () => 1, + apply: e => e + } + } = t, { + pluginComponents: hn + } = t, { + pluginOptions: pn = {} + } = t; + const mn = _i.sub, + gn = {}; + let { + root: $n + } = t; + const fn = () => { + $t.setAttribute("data-redraw", "true"), Vn.set({}) + }, + yn = Ba(!0); + on(e, yn, (e => o(464, Nt = e))); + const bn = Ba(void 0); + on(e, bn, (e => o(406, di = e))); + const xn = Ba(0); + on(e, xn, (e => o(407, ui = e))); + const vn = Ba(0), + wn = Ba(!1), + Sn = e => { + wn.set("play" === e.type), _i.pub(e.type) + }; + let kn, Cn; + let Tn, Mn, Rn = !1; + const Pn = () => { + if (!n || !In()) return; + Mn = u, un(bn, di = void 0, di); + const e = $t; + Rn = !1; + const t = 1 / 24, + o = Dn(); + (Math.abs(c * o - ui * o) <= t || o - o * ui <= t) && un(xn, ui = l, ui), Wn(Dn() * ui), e.play().catch((() => {})); + const i = () => { + In() || (Tn = requestAnimationFrame(i), un(xn, ui = Bn() / Dn(), ui), Mn >= 0 && ui >= c && (un(xn, ui = c, ui), En()), u > -1 && (Rn = !0), Rn && -1 === u && p > 0 && (un(xn, ui = s[p][0], ui), Wn(ui * Dn())), fn()) + }; + i() + }, + En = () => { + n && !In() && (un(bn, di = void 0, di), Mn = void 0, $t.pause(), cancelAnimationFrame(Tn), fn()) + }, + In = () => $t && $t.paused, + An = () => { + if (n) return In() ? Pn() : En() + }, + Ln = () => { + if (!n) return; + $t.muted = !0 + }, + zn = () => { + if (!n) return; + $t.muted = !1 + }, + Fn = () => { + n && un(On, ci = !ci, ci) + }, + On = Ba(_r); + on(e, On, (e => o(405, ci = e))); + const Dn = () => { + if (n) return $t.duration + }, + Bn = () => { + if (!n) return; + return $t.currentTime + }, + Wn = e => { + if (!n) return; + $t.currentTime = e, vn.set(e) + }; + Kn("previewcontrols", { + play: Pn, + pause: En, + togglePlayPause: An, + mute: Ln, + unmute: zn, + toggleMute: Fn, + setCurrentTime: Wn, + getCurrentTime: Bn, + getDuration: Dn, + currentTime: vn, + frameOffset: xn, + framePeekOffset: bn, + isPlaying: wn, + isMuted: On + }); + const Vn = Ba({}); + on(e, Vn, (e => o(53, Ut = e))), Kn("redrawTrigger", Vn); + const _n = Ba(lr); + on(e, _n, (e => o(480, si = e))), Kn("elasticityMultiplier", _n); + let Nn = []; + const Hn = ec(); + on(e, Hn, (e => o(102, Bi = e))); + const jn = zl() || 1024, + Un = De(jn, jn), + Gn = ks(), + Zn = e => Promise.resolve(ai && ai(e, { + resourceType: "image" + })).then((t => { + if (!1 === t) return; + const { + headers: o, + credentials: i + } = t || {}; + return fetch(e, { + headers: o, + credentials: i + }).then((e => { + if (200 !== e.status) throw `${e.status} (${e.statusText})`; + return e.blob() + })).then((e => kp(e, dn, Gn))).then((e => Cp(e, f))) + })); + let { + imageSourceToImageData: Xn = (e => T(e) ? Zn(e) : Dt(e) ? new Promise((t => t(h(e)))) : so(e) || Bt(e) ? kp(e, dn, Gn).then((e => Cp(e, f))) : void 0) + } = t; + const Jn = (() => { + let e, t; + const o = bp.reduce(((e, o) => (e[o] = function(e, t, o) { + let i = []; + return { + set: t, + update: o, + publish: e => { + i.forEach((t => t(e))) + }, + subscribe: t => (i.push(t), e(t), () => { + i = i.filter((e => e !== t)) + }) + } + }((e => { + if (!t) return e(); + t.stores[o].subscribe(e)() + }), (e => { + t && t.stores[o].set(e) + }), (e => { + t && t.stores[o].update(e) + })), e)), {}); + return { + update: i => { + if (t = i, e && (e.forEach((e => e())), e = void 0), !i) return o.file.publish(void 0), void o.loadState.publish(void 0); + e = bp.map((e => i.stores[e].subscribe((t => { + o[e].publish(t) + })))) + }, + stores: o, + destroy: () => { + e && e.forEach((e => e())) + } + } + })(), + { + file: Qn, + size: ea, + duration: oa, + trim: ia, + volume: ra, + minDuration: na, + maxDuration: aa, + loadState: sa, + processState: la, + cropAspectRatio: ca, + cropLimitToImage: da, + crop: ua, + cropMinSize: ha, + cropMaxSize: pa, + cropRange: ma, + cropOrigin: ga, + cropRectAspectRatio: $a, + rotation: fa, + rotationRange: ya, + targetSize: ba, + flipX: xa, + flipY: va, + backgroundColor: wa, + backgroundImage: Sa, + colorMatrix: ka, + convolutionMatrix: Ca, + gamma: Ta, + vignette: Ma, + noise: Ra, + decoration: Pa, + annotation: Ea, + manipulation: Ia, + redaction: Aa, + frame: La, + selection: za, + state: Fa + } = Jn.stores; + on(e, Qn, (e => o(382, go = e))), on(e, ea, (e => o(355, wt = e))), on(e, oa, (e => o(408, hi = e))), on(e, ia, (e => o(403, ni = e))), on(e, ra, (e => o(404, li = e))), on(e, aa, (e => o(409, pi = e))), on(e, sa, (e => o(374, oo = e))), on(e, la, (e => o(373, to = e))), on(e, ca, (e => o(477, Jo = e))), on(e, da, (e => o(86, yi = e))), on(e, ua, (e => o(393, zo = e))), on(e, fa, (e => o(358, Tt = e))), on(e, xa, (e => o(357, Ct = e))), on(e, va, (e => o(356, kt = e))), on(e, wa, (e => o(364, Wt = e))), on(e, Pa, (e => o(49, xt = e))), on(e, Ea, (e => o(50, Mt = e))), on(e, Ia, (e => o(361, zt = e))), on(e, Aa, (e => o(362, Ft = e))), on(e, La, (e => o(48, ft = e))), on(e, za, (e => o(60, oi = e))), on(e, Fa, (e => o(466, yo = e))); + const Oa = (e, t, o = 0) => new Promise(((i, r) => { + if (Sp(e)) { + return void(Xo() ? (async e => { + const t = await _p(e), + o = new DataView(t); + return Hp(o) + })(e) : Promise.resolve()).then((t => { + const o = document.createElement("video"); + o.onerror = () => console.error(o.error), o.playsInline = !0, o.preload = "auto", o.onloadeddata = () => { + o.onloadeddata = void 0, o.dataset.rotation = t || "0", Ts(o).then((() => { + const e = Nr(o.duration, ni || [ + [0, 1] + ]); + e > 0 ? (o.onseeked = () => { + o.onseeked = void 0, i(o) + }, o.currentTime = e) : (o.currentTime = e, i(o)) + })) + }, o.src = URL.createObjectURL(e), o.load() + })) + } + let n, a = !1; + t.cancel = () => a = !0; + const s = Date.now(); + Xn(e).then((e => { + const t = Date.now() - s; + clearTimeout(n), n = setTimeout((() => { + a || i(e) + }), Math.max(0, o - t)) + })).catch(r) + })), + { + images: Va, + shapePreprocessor: _a, + imageScrambler: Na, + imageRedactionRendering: Ha, + willRequest: ja, + willRequestResource: Ua + } = Zi; + let Ga; + on(e, Va, (e => o(402, ri = e))), on(e, _a, (e => o(401, ii = e))), on(e, Na, (e => o(365, Vt = e))), on(e, Ha, (e => o(363, Ot = e))), on(e, ja, (e => o(82, ai = e))), on(e, Ua, (e => o(93, Ri = e))); + const Za = Wa(Sa, ((e, t) => { + if (!e) return t(void 0); + Ga && (Ga.cancel(), Ga = void 0), Ga = { + cancel: r + }, Oa(e, Ga).then(t).catch((e => {})) + })), + Xa = Fa.subscribe((e => _i.pub("update", e))), + Ya = Ba(); + Kn("ui", Ba({})), Kn("selection", za); + const qa = Ba(!0); + on(e, qa, (e => o(95, Ii = e))); + const Ka = Ba(!0); + on(e, Ka, (e => o(97, Li = e))); + const Ja = Ba(!0); + on(e, Ja, (e => o(400, ti = e))); + const Qa = Ba(!0); + on(e, Qa, (e => o(478, Qo = e))); + const es = Ba(!0); + on(e, es, (e => o(98, zi = e))); + const ts = Ba(); + on(e, ts, (e => o(99, Fi = e))); + const os = Ba(); + on(e, os, (e => o(479, ei = e))); + const is = Wa([os, Qa], (() => void 0 !== ei ? ei : Qo)); + on(e, is, (e => o(96, Ai = e))); + const ns = Ba([0, 0, 0]); + on(e, ns, (e => o(57, So = e))); + const as = Ba([1, 1, 1]); + on(e, as, (e => o(462, Lt = e))); + const ss = ec([1, 1, 1]); + on(e, ss, (e => o(461, At = e))); + const ls = Ba(); + on(e, ls, (e => o(92, Ti = e))); + const ds = Ba(), + us = Ba(); + on(e, us, (e => o(52, Ht = e))); + const hs = Ba(); + on(e, hs, (e => o(359, Pt = e))); + const ps = Ba(qe()); + on(e, ps, (e => o(81, bo = e))); + const ms = Ba(0); + on(e, ms, (e => o(399, Ko = e))); + const gs = Ba(qe()); + on(e, gs, (e => o(85, fi = e))); + const $s = Ba(); + on(e, $s, (e => o(459, pt = e))); + const fs = wp("(pointer: fine)", (e => e ? "pointer-fine" : "pointer-coarse")); + on(e, fs, (e => o(380, ho = e))); + const ys = wp("(hover: hover)", (e => e ? "pointer-hover" : "pointer-no-hover")); + on(e, ys, (e => o(379, uo = e))); + const bs = Ba(!1), + xs = Ba(!1); + on(e, xs, (e => o(360, It = e))); + const vs = Da(void 0, (e => { + const t = ec(0), + o = [xs.subscribe((e => { + t.set(e ? 1 : 0) + })), t.subscribe(e)]; + return () => o.forEach((e => e())) + })); + on(e, vs, (e => o(460, Et = e))); + const ws = Ba(); + on(e, ws, (e => o(465, ao = e))); + const Ss = Ba(); + let Cs; + on(e, Ss, (e => o(54, Xt = e))), Kn("isAnimated", Ss); + const Ms = Ba(tr); + on(e, Ms, (e => o(383, $o = e))); + const Rs = Ba(!1); + on(e, Rs, (e => o(471, Bo = e))), Kn("imageIsStatic", Rs); + const Ps = Ba(); + on(e, Ps, (e => o(472, Vo = e))); + const Es = Ba(); + on(e, Es, (e => o(469, Oo = e))); + const Is = Da(void 0, (e => { + const t = Ba(void 0), + o = [ua.subscribe((() => { + if (!zo) return; + if (Bo) return t.set(Ye(zo)); + const e = gd(zo, Oo, 5 * lr); + t.set(e) + })), t.subscribe(e)]; + return () => o.forEach((e => e())) + })), + As = Ba(); + on(e, As, (e => o(468, Lo = e))); + const Ls = Ba(); + on(e, Ls, (e => o(470, Do = e))); + const zs = Ba(void 0); + on(e, zs, (e => o(475, Uo = e))); + const Fs = Ba(le()); + on(e, Fs, (e => o(476, Zo = e))); + const Os = (e, t) => { + if (!t || !e) return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; + const o = fr(t, e, y), + i = $r(o, e); + return { + top: Math.abs(i.top), + right: Math.abs(i.right), + bottom: Math.abs(i.bottom), + left: Math.abs(i.left) + } + }, + Ds = Ba({}), + Bs = Wa([$s, ps, gs, Ds], (([e, t, o, i], r) => { + if (!e) return r(void 0); + let n = 0; + 1 !== D.length || m || "bottom" === Ir || (n = o.y + o.height), r(it(e.x + t.x, e.y + t.y + n, e.width, e.height)) + })); + let Ws = { + left: 0, + right: 0, + top: 0, + bottom: 0 + }; + const Vs = Ba(!1), + _s = Wa([Vs, La, Bs, xs], (([e, t, o, i], r) => { + if (!o) return r({ + left: 0, + right: 0, + top: 0, + bottom: 0 + }); + if (!e) return; + const n = Math.min(o.width, o.height), + a = Os({ + width: n, + height: n + }, t); + ne(Ws.top, 4) === ne(a.top, 4) && ne(Ws.bottom, 4) === ne(a.bottom, 4) && ne(Ws.right, 4) === ne(a.right, 4) && ne(Ws.left, 4) === ne(a.left, 4) || (Ws = a, r(a)) + })); + on(e, _s, (e => o(391, Po = e))); + const Ns = Wa([Vs, _s], (([e, t], o) => { + if (!e) return o(!1); + o(Object.values(t).some((e => e > 0))) + })); + on(e, Ns, (e => o(392, Io = e))); + const Hs = Wa([Vs, $s, Ns, _s], (([e, t, o, i], r) => { + if (t) return e && o ? void r(it(t.x + i.left, t.y + i.top, t.width - i.left - i.right, t.height - i.top - i.bottom)) : r({ + ...t + }) + })), + js = Wa([Bs, Ns, _s], (([e, t, o], i) => e ? t ? void i(it(e.x + o.left, e.y + o.top, e.width - o.left - o.right, e.height - o.top - o.bottom)) : i(e) : i(void 0))); + on(e, js, (e => o(51, Rt = e))); + const Us = Wa([Rs, ea, fa], (([e, t, o], i) => { + if (!e || !t) return i(void 0); + const r = Ke(t); + i(mt(r, o)) + })), + Gs = Wa([Us], (([e], t) => { + if (!e) return t(void 0); + const o = et(e); + t(St(o)) + })); + on(e, Gs, (e => o(394, Fo = e))); + const Zs = Wa([js, ua, Gs, Ms], (([e, t, o, i], r) => { + if (!e || !t || !(!Vo && !Oo)) return; + const { + width: n, + height: a + } = o || t, s = Math.min(e.width / n, e.height / a); + r(i ? s : Math.min(1, s)) + })); + on(e, Zs, (e => o(395, No = e))); + Kn("imageStaticVisualCorners", Wa([Rs, ea, fa, js, $s, Zs], (([e, t, o, i, r, n], a) => { + if (!(e && i && r && t)) return a(void 0); + const s = Ke(t), + l = St(at(s, n)), + c = gt(i, l); + l.x = c.x, l.y = c.y; + a(mt(l, o)) + }))); + const Xs = Ba(void 0); + on(e, Xs, (e => o(397, Yo = e))); + const Ys = Wa([ua, js], (([e, t]) => { + if (t && e) return Math.min(t.width / e.width, t.height / e.height) + })), + qs = Wa([ua, As], (([e, t]) => e && t ? Math.min(e.width / t.width, e.height / t.height) : 1)); + on(e, qs, (e => o(101, Di = e))); + const Ks = Wa([Xs, qs], (([e, t]) => e && t ? t * e : 1)); + on(e, Ks, (e => o(474, Ho = e))); + const Js = Ba(le()); + on(e, Js, (e => o(396, jo = e))); + const Qs = Ba({ + scalar: Ho, + translation: jo + }), + el = () => { + Qs.set({ + scalar: void 0, + translation: le() + }) + }, + tl = Da(void 0, (e => { + const t = ec(void 0, { + precision: 1e-4 + }), + o = 1 === _d() ? e => vt(e, Math.round) : j, + i = () => { + if (!Lo) return; + const e = It || !ao; + if (Bo) { + const o = Ye(Lo); + return nt(o, Zo), nt(o, Rt), t.set(o, { + hard: e + }) + } + const i = gd(Lo, Uo, mm * lr); + i.width < 0 && (i.width = 0, i.x = Lo.x), i.height < 0 && (i.height = 0, i.y = Lo.y), nt(i, Rt), nt(i, jo), at(i, Ho), !e && o(i), t.set(i, { + hard: e + }) + }, + r = [js.subscribe(i), As.subscribe(i), Ks.subscribe(i), Js.subscribe(i), La.subscribe(i), t.subscribe(e)]; + return () => r.forEach((e => e())) + })); + on(e, tl, (e => o(59, Ro = e))); + const ol = Ba(1); + on(e, ol, (e => o(467, Ao = e))); + const il = () => { + if (!zo || !Rt) return; + let e = ct(Ye(zo), No || 1); + const t = gt(Rt, ct(Ye(Fo), No)); + nt(e, t); + const o = pt.width / e.width, + i = pt.height / e.height, + r = Math.min(1, o, i); + ol.set(r), at(e, r), ((e, t) => { + const [o, i, r, n] = bt(e); + o < t.y && (e.y = Math.max(t.y, e.y)), i > t.width && (e.x = t.width - e.width), r > t.height && (e.y = t.height - e.height), n < t.x && (e.x = Math.max(t.x, e.x)) + })(e, { + ...pt, + x: 0, + y: 0 + }), As.set(e) + }, + rl = Wa([js, Zs, ua, ea], (([e, t, o, i], r) => { + e && (o || i) && r(al(e, t || 1, o || i)) + })); + on(e, rl, (e => o(100, Oi = e))); + const al = (e, t, o) => o.width <= e.width && o.height <= e.height ? gt(e, ct(Ye(o), t)) : yt(e, ut(o)); + let sl, ll; + const dl = e => { + if (m && sl && dt(sl, e) && ll === No) return; + if (Bo) return il(); + sl = e, ll = No; + const t = al(e, No, zo || wt); + As.set(t) + }; + let ul = !1; + const hl = Zs.subscribe((e => { + !ul && void 0 !== e && zo && (dl(Rt), ul = !0) + })), + pl = js.subscribe((e => { + e && void 0 !== No && zo && dl(e) + })), + ml = Rs.subscribe((e => { + !e && Rt && dl(Rt) + })); + let gl; + const $l = Ls.subscribe((e => { + if (!e) return gl = void 0, void un(Ps, Vo = void 0, Vo); + gl = _o; + const t = Ye(zo); + Ps.set(t) + })), + fl = As.subscribe((e => { + if (!e || !Do) return; + const t = (o = Ye(e), i = Do, o.x -= i.x, o.y -= i.y, o.width -= i.width, o.height -= i.height, o); + var o, i; + ((e, t) => { + e.x /= t, e.y /= t, e.width /= t, e.height /= t + })(t, gl); + const r = ((e, t) => (e.x += t.x, e.y += t.y, e.width += t.width, e.height += t.height, e))(Ye(Vo), t); + ua.set(r) + })), + yl = ua.subscribe((e => { + if (!e || !Lo) return; + if (Bo) return void(Do || il()); + if (It || Do || Oo) return; + const t = ut(Lo), + o = ut(e); + if (ne(t, 6) === ne(o, 6)) return; + const { + width: i, + height: r + } = Fo || zo, n = Math.min(Rt.width / i, Rt.height / r), a = De(e.width * n, e.height * n), s = .5 * (Lo.width - a.width), l = .5 * (Lo.height - a.height), c = it(Lo.x + s, Lo.y + l, a.width, a.height); + As.set(c) + })), + bl = Wa([Zs, ua, As, Rs], (([e, t, o, i], r) => { + if (!e || !t || !o) return; + if (i) return r(Ao); + const n = o.width / t.width, + a = o.height / t.height; + r(Math.max(n, a) / e) + })), + xl = Wa([Zs, bl], (([e, t], o) => { + if (!t) return; + o(e * t) + })); + on(e, xl, (e => o(473, _o = e))); + let vl = { + left: 0, + right: 0, + top: 0, + bottom: 0 + }; + const wl = Wa([La, As], (([e, t], o) => { + if (!t) return o(vl); + const i = Os(t, e); + ne(vl.top, 4) === ne(i.top, 4) && ne(vl.bottom, 4) === ne(i.bottom, 4) && ne(vl.right, 4) === ne(i.right, 4) && ne(vl.left, 4) === ne(i.left, 4) || (vl = i, o(i)) + })), + Sl = Wa([wl], (([e], t) => { + t(Object.values(e).some((e => e > 0))) + })), + kl = ec(.075, { + stiffness: .03, + damping: .4, + precision: .001 + }), + Cl = Wa([ss, ns, kl, tl, Ks, La, Sl, wl, Ns], (([e, t, o, i, r, n, a, s, l], c) => { + if (!i || m) return c([]); + let { + x: d, + y: u, + width: h, + height: p + } = i; + d += .5, u += .5, h -= .5, p -= .5; + const g = []; + if (n) { + if (a) { + let { + left: e, + right: o, + top: i, + bottom: n + } = s; + e *= r, o *= r, i *= r, n *= r; + const a = Ap(t) ? [1, 1, 1, .125] : [0, 0, 0, .075]; + g.push({ + x: d - e - .5, + y: u - i - .5, + width: h + e + o + 1, + height: p + i + n + 1, + strokeWidth: 1, + strokeColor: a, + opacity: l ? 1 : .5 + }) + } + const i = Ap(e); + n && n.frameColor && Ap(n.frameColor) || i || (g.push({ + x: d - 1, + y: u - 1, + width: h + 2, + height: p + 2, + strokeWidth: 2, + strokeColor: [0, 0, 0, .1], + opacity: o + }), g.push({ + x: d + 1, + y: u + 1, + width: h - 2, + height: p - 2, + strokeWidth: 2, + strokeColor: [0, 0, 0, .1], + opacity: o + })) + } + c([...g, { + x: d, + y: u, + width: h, + height: p, + strokeWidth: 1, + strokeColor: e, + opacity: o + }]) + })), + Tl = Ba([]); + on(e, Tl, (e => o(385, xo = e))); + const Ml = Wa([Cl, Tl], (([e, t], o) => { + o([...e, ...t]) + })); + on(e, Ml, (e => o(94, Pi = e))); + const Rl = ec(0, { + precision: .001 + }); + on(e, Rl, (e => o(387, wo = e))); + const Pl = ec(); + on(e, Pl, (e => o(390, To = e))); + const El = ec(); + on(e, El, (e => o(389, Co = e))); + const Il = ec(); + on(e, Il, (e => o(388, ko = e))); + const Al = ec(); + on(e, Al, (e => o(386, vo = e))); + const Ll = Ba(!1); + on(e, Ll, (e => o(372, eo = e))); + const Ol = Ba(); + let Dl; + on(e, Ol, (e => o(375, io = e))); + const Bl = Wa([Ll, Ol], (([e, t], i) => { + if (!e || !t) return void i(void 0); + if (Dl && (Dl.cancel(), o(282, Dl = void 0)), Sr(t)) return i(x(t)); + const n = ac.length ? 0 : Xt ? 250 : 0; + o(282, Dl = { + cancel: r + }), Oa(t, Dl, n).then(i).catch((e => { + un(sa, oo.error = e, oo) + })).finally((() => { + o(282, Dl = void 0) + })) + })); + Wi(), Wi = en(Bl, (e => o(354, $t = e))); + let { + imagePreviewCurrent: Wl + } = t; + const Vl = Ba({}); + on(e, Vl, (e => o(377, lo = e))); + const _l = Ba([]); + on(e, _l, (e => o(87, bi = e))); + const Nl = Wa([js, hs, ea, Is, As, xl, fa, xa, va, Ks, Js, bs], (([e, t, o, i, r, n, a, s, l, c, d, u], h) => { + if (!e || !r) return; + const p = nl(e, t, o, i, r, c, d, n, a, s, l); + !u && z(p), h(p) + })); + on(e, Nl, (e => o(378, co = e))); + const Hl = Wa([ka, Ca, Ta, Ma, Ra], (([e, t, o, i, r], n) => { + const a = e && Object.keys(e).map((t => e[t])).filter(Boolean); + n({ + gamma: o || void 0, + vignette: i || void 0, + noise: r || void 0, + convolutionMatrix: t || void 0, + colorMatrix: a && a.length && jr(a) + }) + })); + let jl, Ul; + const Gl = (() => { + if (!mo()) return !1; + const e = navigator.userAgent.match(/OS (\d+)_(\d+)_?(\d+)?/i) || [], + [, t, o] = e.map((e => parseInt(e, 10) || 0)); + return t > 13 || 13 === t && o >= 4 + })(), + Zl = Ba({}); + on(e, Zl, (e => o(366, jt = e))), Kn("env", Zl); + const Xl = _d(), + Yl = Da(Xl, (e => { + const t = () => e(_d()), + o = matchMedia(`(resolution: ${Xl}dppx)`); + return o.addListener(t), () => o.removeListener(t) + })); + on(e, Yl, (e => o(58, Mo = e))); + const ql = ((e, t) => { + const { + sub: o, + pub: i + } = Go(), r = [], n = Ba(0), a = [], s = () => a.forEach((e => e({ + index: tn(n), + length: r.length + }))), l = { + get index() { + return tn(n) + }, + set index(e) { + e = Number.isInteger(e) ? e : 0, e = rs(e, 0, r.length - 1), n.set(e), t(r[l.index]), s() + }, + get state() { + return r[r.length - 1] + }, + length: () => r.length, + undo() { + const e = l.index--; + return i("undo", e), e + }, + redo() { + const e = l.index++; + return i("redo", l.index), e + }, + revert() { + r.length = 1, l.index = 0, i("revert") + }, + write(o) { + o && t({ + ...e(), + ...o + }); + const a = e(), + c = r[r.length - 1]; + JSON.stringify(a) !== JSON.stringify(c) && (r.length = l.index + 1, r.push(a), n.set(r.length - 1), s(), i("writehistory")) + }, + set(e = {}) { + r.length = 0, l.index = 0; + const t = Array.isArray(e) ? e : [e]; + r.push(...t), l.index = r.length - 1 + }, + get: () => [...r], + subscribe: e => (a.push(e), e({ + index: l.index, + length: r.length + }), () => a.splice(a.indexOf(e), 1)), + on: o + }; + return l + })((() => yo), (e => { + un(Fa, yo = e, yo), ps.set(bo) + })); + Vi(), Vi = en(ql, (e => o(384, fo = e))); + const Kl = () => { + const e = { + x: 0, + y: 0, + ...wt + }, + t = vt(yt(e, yo.cropAspectRatio), Math.round), + o = mr({ + ...yo, + rotation: 0, + crop: t + }, yo), + i = [o]; + JSON.stringify(o) !== JSON.stringify(yo) && i.push({ + ...yo + }), ql.set(i) + }, + Ql = sa.subscribe((e => { + e && e.complete && Kl() + })), + oc = () => cr().then((e => e && ql.revert())), + ic = Ba(!1); + on(e, ic, (e => o(367, Zt = e))); + const rc = () => { + un(ic, Zt = !0, Zt), dr().then((e => { + if (!e) return void un(ic, Zt = !1, Zt); + let t; + t = Lc.subscribe((e => { + 1 === e && (t && t(), Ni("processImage")) + })) + })) + }, + nc = la.subscribe((e => { + if (!e) return void un(ic, Zt = !1, Zt); + un(ic, Zt = !0, Zt); + const { + complete: t, + abort: o + } = e; + (t || o) && un(ic, Zt = !1, Zt) + })), + ac = Ip(); + on(e, ac, (e => o(56, ro = e))); + const sc = Wa([ac], (([e], t) => { + if (!e.length) return t(); + const { + origin: o, + translation: i, + rotation: r, + scale: n + } = e[0]; + t({ + origin: o, + translation: i, + rotation: r, + scale: n + }) + })), + lc = Ba(); + on(e, lc, (e => o(381, po = e))); + let cc, dc = []; + const uc = Ba(), + hc = Ba(), + pc = Wa([Xs, hc, Zs, Ys], (([e, t, o, i]) => e || (t || o < 1 ? i : 1))), + mc = { + ...Zi, + imageFile: Qn, + imageSize: ea, + mediaDuration: oa, + mediaMinDuration: na, + mediaMaxDuration: aa, + mediaTrim: ia, + imageBackgroundColor: wa, + imageBackgroundImage: Sa, + imageCropAspectRatio: ca, + imageCropMinSize: ha, + imageCropMaxSize: pa, + imageCropLimitToImage: da, + imageCropRect: ua, + imageCropRectOrigin: ga, + imageCropRectSnapshot: Ps, + imageCropRectAspectRatio: $a, + imageCropRange: ma, + imageRotation: fa, + imageRotationRange: ya, + imageFlipX: xa, + imageFlipY: va, + imageOutputSize: ba, + imageColorMatrix: ka, + imageConvolutionMatrix: Ca, + imageGamma: Ta, + imageVignette: Ma, + imageNoise: Ra, + imageManipulation: Ia, + imageDecoration: Pa, + imageAnnotation: Ea, + imageRedaction: Aa, + imageFrame: La, + imagePreview: Bl, + imagePreviewSource: Ol, + imageTransforms: Nl, + imagePreviewModifiers: Vl, + history: ql, + animation: ws, + pixelRatio: Yl, + elasticityMultiplier: lr, + scrollElasticity: gm, + rangeInputElasticity: 5, + redrawTrigger: Vn, + pointerAccuracy: fs, + pointerHoverable: ys, + env: Zl, + rootRect: hs, + stageRect: js, + stageRectBase: Bs, + stageRecenter: Ds, + stageScalar: Zs, + stagePadding: _s, + stagePadded: Ns, + presentationScalar: xl, + imagePreviewUpscale: hc, + utilRect: $s, + utilRectPadded: Hs, + allowPlayPause: yn, + allowPan: qa, + allowZoom: Ka, + allowZoomControls: Ja, + enableZoomInput: es, + enablePanInput: Qa, + enablePanInputStatus: is, + imageSelectionMultiTouching: uc, + rootBackgroundColor: ns, + rootForegroundColor: as, + rootLineColor: ss, + rootColorSecondary: ds, + imageOutlineOpacity: kl, + utilTools: lc, + imageSelectionPan: Js, + imageSelectionZoom: Xs, + imageSelectionZoomCurrent: pc, + imageSelectionStageFitScalar: Ys, + imageSelectionStoredState: Qs, + imageOverlayMarkup: Tl, + interfaceImages: _l, + isInteracting: xs, + isTransformingImage: bs, + isInteractingFraction: vs, + imageCropRectIntent: Es, + imageCropRectPresentation: Is, + imageSelectionRect: As, + imageSelectionRectIntent: zs, + imageSelectionRectPresentation: tl, + imageSelectionRectSnapshot: Ls, + imageScalar: bl, + imageTransformsInterpolated: sc, + imageEffects: Hl + }; + delete mc.image; + const gc = "util-" + I(); + let $c = []; + const fc = e => B.find((([t]) => e === t)); + let yc = [], + bc = mo(); + const xc = (e, t, o) => { + let i = be.getPropertyValue(e); + i = o ? o(i) : /^[0-9]+$/.test(i) ? parseFloat(i) : void 0, t.set(i, { + hard: !Xt + }) + }, + wc = (e, t, o = !1) => { + const i = (e => { + const t = be.getPropertyValue(e); + return Dh(t) + })(e); + i && 0 !== i[3] && (o || (i.length = 3), t.set(i, { + hard: !Xt + })) + }, + Sc = Ba(); + on(e, Sc, (e => o(88, xi = e))); + const kc = Ba(); + on(e, kc, (e => o(89, vi = e))); + const Cc = Ba(); + on(e, Cc, (e => o(90, ki = e))); + const Tc = ec(0, { + damping: .9 + }); + on(e, Tc, (e => o(91, Ci = e))); + const Rc = () => { + wc("color", as), wc(Kr ? "--color-background" : "background-color", ns), wc("outline-color", ss), wc("--color-primary", ls), wc("--color-secondary", ds), wc("--grid-color-even", kc, !0), wc("--grid-color-odd", Cc, !0), xc("--grid-size", Sc), xc("--editor-inset-top", ms, (e => parseInt(e, 10))) + }, + Pc = Wa([Nl, Hl, wa, Za], (([e, t, o, i]) => e && { + ...e, + ...t, + backgroundColor: o, + backgroundImage: i + })); + on(e, Pc, (e => o(376, no = e))); + const Ec = () => { + const e = ac.length ? void 0 : { + resize: 1.05 + }, + t = ((e, t, o = {}) => { + const { + resize: i = 1, + opacity: r = 0 + } = o, n = { + opacity: [ec(r, { + ...Pp, + stiffness: .1 + }), j], + resize: [ec(i, { + ...Pp, + stiffness: .1 + }), j], + translation: [ec(void 0, Pp), j], + rotation: [ec(void 0, Ep), j], + origin: [ec(void 0, Pp), j], + scale: [ec(void 0, Ep), j], + gamma: [ec(void 0, Ep), e => e || 1], + vignette: [ec(void 0, Ep), e => e || 0], + colorMatrix: [ec([...Rp], Pp), e => e || [...Rp]], + convolutionMatrix: [Ba(void 0), e => e && e.clarity || void 0], + backgroundColor: [ec(void 0, Pp), (e, t, o) => { + if (Array.isArray(e)) { + if (Array.isArray(t)) { + const i = [...e]; + 0 === t[3] ? (i[3] = 0, o(i)) : 0 === i[3] && ((e = [...t])[3] = 0) + } + return e + } + }], + backgroundImage: [Ba(void 0), j] + }, a = Object.entries(n).map((([e, t]) => [e, t[0]])), s = a.map((([, e]) => e)), l = Object.entries(n).reduce(((e, [t, o]) => { + const [i, r] = o; + return e[t] = (e, o) => i.set(r(e, c[t], (e => { + i.set(e, { + hard: !0 + }) + })), o), e + }), {}); + let c; + const d = Wa(s, (o => (c = o.reduce(((e, t, o) => (e[a[o][0]] = t, e)), {}), c.data = e, c.size = t, c.scale *= o[1], c))); + return d.get = () => c, d.set = (e, t) => { + const o = { + hard: !t + }; + Object.entries(e).forEach((([e, t]) => { + l[e] && l[e](t, o) + })) + }, d + })($t, wt, e); + ac.unshift(t), Ic(no) + }, + Ic = e => { + ac.forEach(((t, o) => { + const i = 0 === o ? 1 : 0; + t.set({ + ...e, + opacity: i, + resize: 1 + }, ao) + })) + }; + let Ac; + const Lc = Jl(void 0, { + duration: 500 + }); + let zc; + on(e, Lc, (e => o(55, Jt = e))); + const Fc = Ba(!1); + let Oc; + on(e, Fc, (e => o(371, Qt = e))); + const Dc = ec(void 0, { + stiffness: .1, + damping: .7, + precision: .25 + }); + on(e, Dc, (e => o(83, mi = e))); + const Bc = ec(0, { + stiffness: .1, + precision: .05 + }); + on(e, Bc, (e => o(84, $i = e))); + const Wc = ec(0, { + stiffness: .02, + damping: .5, + precision: .25 + }); + on(e, Wc, (e => o(369, qt = e))); + const Vc = ec(void 0, { + stiffness: .02, + damping: .5, + precision: .25 + }); + on(e, Vc, (e => o(370, Kt = e))); + const _c = ec(void 0, { + stiffness: .02, + damping: .5, + precision: .25 + }); + let Nc; + on(e, _c, (e => o(368, Yt = e))); + const Hc = () => { + Ni("abortLoadImage") + }, + jc = () => { + Ni("abortProcessImage"), un(ic, Zt = !1, Zt) + }, + Uc = e => { + e.target && "true" === e.target.dataset.touchScroll || e.preventDefault() + }, + Gc = Gl ? e => { + const t = e.touches ? e.touches[0] : e; + t.pageX > 20 && t.pageX < window.innerWidth - 20 || Uc(e) + } : r, + Zc = Ba([]); + on(e, Zc, (e => o(463, _t = e))), Kn("keysPressed", Zc); + const Xc = e => { + !e || Wo(e) && !(e => /^image/.test(e.type) && !/svg/.test(e.type))(e) || !Wo(e) && !/^http/.test(e) || Ni("loadImage", e) + }, + Yc = e => { + e && Xc(e) + }; + let qc = void 0; + let Kc, Jc = []; + const Qc = Ba(); + Kn("rootPortal", Qc), Kn("rootRect", hs); + const ed = () => ({ + foregroundColor: [...Lt], + lineColor: [...At], + utilVisibility: { + ...N + }, + isInteracting: It, + isInteractingFraction: Et, + rootRect: Ye(Pt), + stageRect: Ye(Rt), + manipulationShapesDirty: yd, + annotationShapesDirty: pd, + decorationShapesDirty: $d, + frameShapesDirty: fd + }), + td = (e, t, o) => ur(e, De(t.width / o, t.height / o)), + od = (e, t, o) => { + var i; + return e._translate = ce((i = t).x, i.y), e._scale = o, e + }, + id = e => { + const t = []; + return e.forEach((e => t.push(rd(e)))), t.filter(Boolean) + }, + rd = e => Mi(e) ? (e.points = [ce(e.x1, e.y1), ce(e.x2, e.y2)], e) : (!(e => wi(e) && !e.text.length)(e) || e.backgroundColor && 0 !== e.backgroundColor[3] || (Si(e) && (e.width = 5, e.height = e.lineHeight), e.strokeWidth = 1, e.strokeColor = [1, 1, 1, .5], e.backgroundColor = [0, 0, 0, .1]), e); + let nd, ad = [], + sd = [], + ld = [], + cd = [], + dd = [], + ud = {}; + const hd = (e, t, o, i, r, n, a) => { + const { + manipulationShapesDirty: s, + annotationShapesDirty: l, + decorationShapesDirty: c, + frameShapesDirty: d, + selectionRect: u, + scale: h + } = e, p = nd !== h, m = p || !dt(ud, u); + m && (nd = h, ud = u), s && (ld = t.filter(Ei).map(gi).map((e => ur(e, wt)))), (l || o !== Mt) && (ad = o.filter(Ei).map(gi).sort(((e, t) => e.alwaysOnTop ? 1 : t.alwaysOnTop ? -1 : 0)).map((e => ur(e, wt)))), (p || md || l || o !== Mt) && (sd = id(ad.map((e => y(e, { + flipX: Ct, + flipY: kt, + rotation: Tt, + scale: h, + context: Ke(wt) + }))).flat())), (c || i !== xt || m) && (cd = id(i.filter(Ei).map(gi).sort(((e, t) => e.alwaysOnTop ? 1 : t.alwaysOnTop ? -1 : 0)).map((e => td(e, u, h))).map((e => y(e, { + context: u + }))).flat().map((e => od(e, u, h))))), (d || n !== ft || m) && (dd = n ? id([n].map(gi).map((e => td(e, u, h))).map(y).flat().map((e => od(e, u, h)))) : []); + let g = id(r.filter(Ei)); + return "undefined" != typeof window && (e => { + if (e && e._clpdx4s) return; + const [t] = [ + [85, 110, 108, 105, 99, 101, 110, 115, 101, 100, 32, 80, 105, 110, 116, 117, 114, 97, 32, 105, 110, 115, 116, 97, 110, 99, 101] + ].map((e => e.map((e => String.fromCharCode(e))).join(""))); + g = [...g, { + x: u.x + .5 * u.width - 82, + y: u.y + u.height - 16 - 12, + width: 164, + height: 16, + text: t, + fontWeight: 900, + fontSize: 12, + color: [1, 1, 1, .25] + }] + })(window), { + manipulationShapesDirty: s, + manipulationShapes: ld, + annotationShapesDirty: l, + annotationShapes: sd, + decorationShapesDirty: c, + decorationShapes: cd, + frameShapesDirty: d, + frameShapes: dd, + interfaceShapes: g, + selectionShapes: a.map(gi).map((e => ur(e, wt))) + } + }; + let pd = !0; + let md = !0; + let $d = !0; + let fd = !0; + let yd = !0; + Yn((() => { + En(), $t && T($t.src) && /^blob:/.test($t.src) && URL.revokeObjectURL($t.src), Xa(), pl(), hl(), ml(), $l(), fl(), yl(), Ql(), nc(), fs.destroy(), ys.destroy(), Jn.destroy(), ac.clear(), ad.length = 0, sd.length = 0, ld.length = 0, cd.length = 0, dd.length = 0; + try { + o(228, Wl = void 0), o(283, Ac = void 0) + } catch (e) {} + })); + return e.$$set = e => { + "class" in e && o(229, Ui = e.class), "layout" in e && o(230, Gi = e.layout), "stores" in e && o(231, Zi = e.stores), "locale" in e && o(3, Xi = e.locale), "id" in e && o(4, Yi = e.id), "util" in e && o(232, qi = e.util), "utils" in e && o(233, Ki = e.utils), "animations" in e && o(234, Ji = e.animations), "disabled" in e && o(235, Qi = e.disabled), "status" in e && o(227, er = e.status), "previewUpscale" in e && o(236, tr = e.previewUpscale), "previewPad" in e && o(237, or = e.previewPad), "previewMaskOpacity" in e && o(5, ir = e.previewMaskOpacity), "previewImageDataMaxSize" in e && o(238, rr = e.previewImageDataMaxSize), "previewImageTextPixelRatio" in e && o(6, nr = e.previewImageTextPixelRatio), "markupMaskOpacity" in e && o(7, ar = e.markupMaskOpacity), "zoomMaskOpacity" in e && o(239, sr = e.zoomMaskOpacity), "elasticityMultiplier" in e && o(8, lr = e.elasticityMultiplier), "willRevert" in e && o(240, cr = e.willRevert), "willProcessImage" in e && o(241, dr = e.willProcessImage), "willRenderCanvas" in e && o(9, hr = e.willRenderCanvas), "willRenderToolbar" in e && o(242, pr = e.willRenderToolbar), "willSetHistoryInitialState" in e && o(243, mr = e.willSetHistoryInitialState), "enableButtonExport" in e && o(244, gr = e.enableButtonExport), "enableButtonRevert" in e && o(245, yr = e.enableButtonRevert), "enableNavigateHistory" in e && o(246, br = e.enableNavigateHistory), "enableToolbar" in e && o(10, xr = e.enableToolbar), "enableUtils" in e && o(247, vr = e.enableUtils), "enableButtonClose" in e && o(248, wr = e.enableButtonClose), "enableDropImage" in e && o(249, kr = e.enableDropImage), "enablePasteImage" in e && o(250, Cr = e.enablePasteImage), "enableBrowseImage" in e && o(251, Tr = e.enableBrowseImage), "enableTransparencyGrid" in e && o(11, Mr = e.enableTransparencyGrid), "layoutDirectionPreference" in e && o(252, Rr = e.layoutDirectionPreference), "layoutHorizontalUtilsPreference" in e && o(253, Pr = e.layoutHorizontalUtilsPreference), "layoutVerticalUtilsPreference" in e && o(254, Er = e.layoutVerticalUtilsPreference), "layoutVerticalToolbarPreference" in e && o(255, Ir = e.layoutVerticalToolbarPreference), "layoutVerticalControlGroupsPreference" in e && o(256, Ar = e.layoutVerticalControlGroupsPreference), "layoutVerticalControlTabsPreference" in e && o(257, Lr = e.layoutVerticalControlTabsPreference), "textDirection" in e && o(12, zr = e.textDirection), "markupEditorZoomLevel" in e && o(258, Fr = e.markupEditorZoomLevel), "markupEditorZoomLevels" in e && o(13, Or = e.markupEditorZoomLevels), "markupEditorZoomAdjustStep" in e && o(14, Dr = e.markupEditorZoomAdjustStep), "markupEditorZoomAdjustFactor" in e && o(15, Br = e.markupEditorZoomAdjustFactor), "markupEditorZoomAdjustWheelFactor" in e && o(16, Wr = e.markupEditorZoomAdjustWheelFactor), "markupEditorInteractionMode" in e && o(259, Vr = e.markupEditorInteractionMode), "muteAudio" in e && o(260, _r = e.muteAudio), "willSetMediaInitialTimeOffset" in e && o(261, Nr = e.willSetMediaInitialTimeOffset), "enablePan" in e && o(17, Hr = e.enablePan), "enableZoom" in e && o(18, Zr = e.enableZoom), "enableZoomControls" in e && o(262, Xr = e.enableZoomControls), "enableZoomInput" in e && o(19, Yr = e.enableZoomInput), "enablePanInput" in e && o(263, qr = e.enablePanInput), "enableCanvasAlpha" in e && o(20, Kr = e.enableCanvasAlpha), "enablePanLimit" in e && o(21, Jr = e.enablePanLimit), "panLimitGutterScalar" in e && o(22, Qr = e.panLimitGutterScalar), "zoomPresetOptions" in e && o(23, rn = e.zoomPresetOptions), "zoomAdjustStep" in e && o(24, nn = e.zoomAdjustStep), "zoomAdjustFactor" in e && o(25, an = e.zoomAdjustFactor), "zoomAdjustWheelFactor" in e && o(26, sn = e.zoomAdjustWheelFactor), "zoomLevel" in e && o(0, ln = e.zoomLevel), "imagePreviewSrc" in e && o(266, cn = e.imagePreviewSrc), "imageOrienter" in e && o(267, dn = e.imageOrienter), "pluginComponents" in e && o(268, hn = e.pluginComponents), "pluginOptions" in e && o(27, pn = e.pluginOptions), "root" in e && o(2, $n = e.root), "imageSourceToImageData" in e && o(28, Xn = e.imageSourceToImageData), "imagePreviewCurrent" in e && o(228, Wl = e.imagePreviewCurrent) + }, e.$$.update = () => { + if (1 & e.$$.dirty[0] | 1024 & e.$$.dirty[8] && o(0, ln = null === ln ? Fr : ln), 2 & e.$$.dirty[0] | 1048576 & e.$$.dirty[8]) { + let e = !1; + hn.forEach((([t]) => { + gn[t] || (o(1, gn[t] = {}, gn), e = !0) + })), e && o(280, Nn = [...hn]) + } + var t, h, b, x; + if (8 & e.$$.dirty[0] | 65536 & e.$$.dirty[7] | 2 & e.$$.dirty[9] && o(335, D = Xi && Nn.length ? Ki || Nn.map((([e]) => e)) : []), 134217728 & e.$$.dirty[0] | 2 & e.$$.dirty[9] | 33554432 & e.$$.dirty[10] | 1024 & e.$$.dirty[12] && o(336, B = ((e, t, o, i) => { + const r = t.filter((([t]) => e.includes(t))).filter((([e, { + isSupported: t + }]) => t({ + ...i, + ...o[e] + }))).map((([e, t]) => [e, t.Component])); + return cs(r, $c, ((e, t) => e[0] === t[0] && e[1] === t[1])) ? $c : ($c = r, r) + })(D, Nn, pn, { + src: go + })), 67108864 & e.$$.dirty[10] && o(291, W = B.length), 8 & e.$$.dirty[0] | 4096 & e.$$.dirty[9] | 33554432 & e.$$.dirty[10] && o(47, V = W && D.map((e => { + const t = fc(e); + if (t) return { + id: e, + view: t[1], + tabIcon: Xi[e + "Icon"], + tabLabel: Xi[e + "Label"] + } + })).filter(Boolean) || []), 65536 & e.$$.dirty[1] && o(353, i = !!V.find((e => "trim" === e.id))), 12288 & e.$$.dirty[11] | 32 & e.$$.dirty[13] && o(290, n = !!(hi && $t && i)), 32768 & e.$$.dirty[7] | 4096 & e.$$.dirty[9] && o(44, _ = W && qi && "string" == typeof qi && fc(qi) ? qi : W > 0 ? B[0][0] : void 0), 8192 & e.$$.dirty[1] | 2048 & e.$$.dirty[9] && n && _ && En(), 2048 & e.$$.dirty[9] | 8192 & e.$$.dirty[11] && (n ? ($t.addEventListener("play", Sn), $t.addEventListener("pause", Sn)) : $t && "video" === $t.nodeName && ($t.removeEventListener("play", Sn), $t.removeEventListener("pause", Sn))), 2048 & e.$$.dirty[9] && n && xn.set(Bn() / Dn()), 24 & e.$$.dirty[13] && (e => { + if (!In()) return; + const t = Date.now(); + if (Cn && t - Cn < 16) return; + Cn = t; + const o = hi * e; + if (o.toFixed(1) === kn) return; + kn = o.toFixed(1); + const i = $t, + r = () => { + i.removeEventListener("seeked", r), fn() + }; + i.addEventListener("seeked", r), ((e, t) => { + e.fastSeek && e.fastSeek(t), e.currentTime = t + })(i, o) + })(di || ui), 16 & e.$$.dirty[13] && o(351, a = ui && ne(ui, 6)), 97 & e.$$.dirty[13] && o(349, s = ni || [ + [0, Math.min(hi, pi) / hi] + ]), 256 & e.$$.dirty[11] && (l = s[0][0]), 256 & e.$$.dirty[11] && (c = s[s.length - 1][1]), 256 & e.$$.dirty[11] && o(352, d = s.map((([e, t]) => [ne(e, 6), ne(t, 6)]))), 3072 & e.$$.dirty[11] && o(350, u = d.findIndex((([e, t]) => a >= e && a <= t))), 3584 & e.$$.dirty[11] && (p = -1 === u && d.findIndex(((e, t, o) => { + const i = o[t - 1]; + return i ? a <= e[0] && a >= i[1] : a <= e[0] + }))), 4096 & e.$$.dirty[8] && On.set(_r), 8192 & e.$$.dirty[11] | 4 & e.$$.dirty[13] && ($t && ci ? Ln() : zn()), 8192 & e.$$.dirty[11] | 2 & e.$$.dirty[13] && $t && (e => { + if (!n) return; + $t.volume = Math.min(1, e) + })(li), 256 & e.$$.dirty[0] && un(_n, si = lr, si), 8192 & e.$$.dirty[7] && o(345, m = "overlay" === Gi), 1073741824 & e.$$.dirty[7] | 16 & e.$$.dirty[11] && o(45, $ = vr && !m), 134217730 & e.$$.dirty[0] && pn && Object.entries(pn).forEach((([e, t]) => { + Object.entries(t).forEach((([t, i]) => { + gn[e] && o(1, gn[e][t] = i, gn) + })) + })), 262144 & e.$$.dirty[7] && Hn.set(Qi ? 1 : 0), 2097152 & e.$$.dirty[7] && (f = rr ? (t = rr, h = Un, De(Math.min(t.width, h.width), Math.min(t.height, h.height))) : Un), 1073741824 & e.$$.dirty[12] && Jn.update(ri[0]), 536870912 & e.$$.dirty[12] && (y = ii ? (e, t) => ii(e, { + flipX: void 0, + flipY: void 0, + rotation: void 0, + ...t, + isPreview: !0 + }) : j), 536870912 & e.$$.dirty[1] && Array.isArray(oi) && Ni("selectionchange", [...oi]), 16384 & e.$$.dirty[8] | 268435456 & e.$$.dirty[12] && ts.set(ti && Xr), 34816 & e.$$.dirty[8] && os.set("pan" === Vr || qr), 2097152 & e.$$.dirty[1] && Ht && hs.set(it(Ht.x, Ht.y, Ht.width, Ht.height)), 262160 & e.$$.dirty[11] | 4 & e.$$.dirty[12] && Pt && m && oo && oo.complete && (() => { + const e = Jo, + t = ut(Pt); + e && e === t || (ca.set(ut(Pt)), Kl()) + })(), 33554432 & e.$$.dirty[10] && o(46, Z = D.length > 1), 32768 & e.$$.dirty[1] && (Z || ps.set(qe())), 1024 & e.$$.dirty[0] | 134217728 & e.$$.dirty[12] && (xr || gs.set(it(0, Ko, 0, 0))), 524352 & e.$$.dirty[11] && o(348, w = !It && v), 67108864 & e.$$.dirty[12] && o(346, S = !qo), 2097152 & e.$$.dirty[1] && o(292, Qe = Ht && Ht.width > 0 && Ht.height > 0), 8 & e.$$.dirty[0] | 12288 & e.$$.dirty[9] && o(41, tt = Qe && Xi && !!W), 1024 & e.$$.dirty[1] && setTimeout((() => o(281, Cs = tt)), 1), 131072 & e.$$.dirty[7] | 4 & e.$$.dirty[9] | 160 & e.$$.dirty[11] && un(ws, ao = "always" === Ji ? w : "never" !== Ji && (w && Cs && S), ao), 131072 & e.$$.dirty[7] | 96 & e.$$.dirty[11] && un(Ss, Xt = "always" === Ji ? v : "never" !== Ji && (v && S), Xt), 524288 & e.$$.dirty[7] | 16 & e.$$.dirty[11] && Ms.set(tr || m), 1048576 & e.$$.dirty[7] && Vs.set(or), 4 & e.$$.dirty[0] | 41943040 & e.$$.dirty[12] && $n && ($n.dispatchEvent(xp("markupzoom", Yo)), $n.dispatchEvent(xp("zoom", Eo(Yo) ? Yo : No))), 4 & e.$$.dirty[0] | 16777216 & e.$$.dirty[12] && $n && ($n.dispatchEvent(xp("markuppan", jo)), $n.dispatchEvent(xp("pan", jo))), 2097152 & e.$$.dirty[12] && zo && el(), 4194304 & e.$$.dirty[12] && Fo && il(), 8396800 & e.$$.dirty[1] && _ && kl.set(.075, { + hard: !Xt + }), 4194304 & e.$$.dirty[7] && o(343, k = sr), 1572864 & e.$$.dirty[12] && o(344, C = Io ? -Math.max(...Object.values(Po)) : 0), 277872640 & e.$$.dirty[1] | 12 & e.$$.dirty[11] && Ro) { + let e = Ro.x - Rt.x, + t = Rt.x + Rt.width - (Ro.x + Ro.width), + o = Ro.y - Rt.y, + i = Rt.y + Rt.height - (Ro.y + Ro.height), + r = Math.min(e, o, t, i); + Rl.set(r > C ? 0 : Math.min(k, Math.abs(r / 64)), { + hard: !Xt + }) + } + if (134217728 & e.$$.dirty[1] && o(342, M = .55 / Mo), 9437184 & e.$$.dirty[1] | 2 & e.$$.dirty[11] && Rt && Pl.set({ + x: 0, + y: Rt.y, + width: Rt.x < 64 ? 0 : Rt.x, + height: Rt.height + M + }, { + hard: !Xt + }), 9437184 & e.$$.dirty[1] | 262146 & e.$$.dirty[11] && Rt && El.set({ + x: 0, + y: 0, + width: Pt.width, + height: Rt.y + M + }, { + hard: !Xt + }), 9437184 & e.$$.dirty[1] | 262146 & e.$$.dirty[11] && Rt) { + let e = Rt.x + Rt.width, + t = Pt.width - (Rt.x + Rt.width); + t < 64 && (e += t, t = 0), Il.set({ + x: e, + y: Rt.y, + width: t, + height: Rt.height + M + }, { + hard: !Xt + }) + } + if (9437184 & e.$$.dirty[1] | 262144 & e.$$.dirty[11] && Rt && Al.set({ + x: 0, + y: Rt.y + Rt.height, + width: Pt.width, + height: Pt.height - (Rt.y + Rt.height) + }, { + hard: !Xt + }), 67108864 & e.$$.dirty[1] | 294912 & e.$$.dirty[12] && o(338, R = To && { + id: "stage-overlay", + backgroundColor: So, + opacity: wo, + ...To + }), 67108864 & e.$$.dirty[1] | 163840 & e.$$.dirty[12] && o(341, P = Co && { + id: "stage-overlay", + backgroundColor: So, + opacity: wo, + ...Co + }), 67108864 & e.$$.dirty[1] | 98304 & e.$$.dirty[12] && o(340, E = ko && { + id: "stage-overlay", + backgroundColor: So, + opacity: wo, + ...ko + }), 67108864 & e.$$.dirty[1] | 49152 & e.$$.dirty[12] && o(339, A = vo && { + id: "stage-overlay", + backgroundColor: So, + opacity: wo, + ...vo + }), 1879048192 & e.$$.dirty[10] | 1 & e.$$.dirty[11] && o(337, L = [P, E, A, R].filter(Boolean)), 134217728 & e.$$.dirty[10] | 8192 & e.$$.dirty[12] && L && xo && Tl.update((e => [...e.filter((e => "stage-overlay" !== e.id)), ...L])), 262144 & e.$$.dirty[8] | 1024 & e.$$.dirty[12] && Ol.set(cn || (go || void 0)), 4 & e.$$.dirty[0] | 2048 & e.$$.dirty[7] | 8192 & e.$$.dirty[11] && (o(228, Wl = $t), $t && $n.dispatchEvent(xp("loadpreview", Wl))), 8 & e.$$.dirty[12] && io && (Js.set(le()), Xs.set(void 0), el(), _l.set([])), 4096 & e.$$.dirty[12] && o(296, F = fo.index > 0), 4096 & e.$$.dirty[12] && o(295, O = fo.index < fo.length - 1), 8 & e.$$.dirty[1] && uc.set(cc), 2048 & e.$$.dirty[12] && hc.set($o), 8192 & e.$$.dirty[1] && Ya.set(_), 65664 & e.$$.dirty[1] && o(38, N = V.reduce(((e, t) => (e[t.id] = N && N[t.id] || 0, e)), {})), 8192 & e.$$.dirty[1] && o(80, H = { + name: gc, + selected: _ + }), 65536 & e.$$.dirty[1] && o(79, U = V.map((e => ({ + id: e.id, + icon: e.tabIcon, + label: e.tabLabel + })))), 65536 & e.$$.dirty[1] && o(78, G = V.map((e => e.id))), 4096 & e.$$.dirty[7] && o(77, X = Mc(["PinturaRoot", "PinturaRootComponent", Ui])), 262144 & e.$$.dirty[11] && o(331, Y = Pt && (Pt.width > 1e3 ? "wide" : Pt.width < 600 ? "narrow" : void 0)), 262144 & e.$$.dirty[11] && o(318, q = Pt && (Pt.width <= 320 || Pt.height <= 460)), 262144 & e.$$.dirty[11] && o(330, K = Pt && (Pt.height > 1e3 ? "tall" : Pt.height < 600 ? "short" : void 0)), 4 & e.$$.dirty[0] && o(298, J = $n && $n.parentNode && $n.parentNode.classList.contains("PinturaModal")), 1 & e.$$.dirty[1] | 524288 & e.$$.dirty[9] | 262144 & e.$$.dirty[11] && o(323, Q = J && Pt && jl > Pt.width), 2 & e.$$.dirty[1] | 524288 & e.$$.dirty[9] | 262144 & e.$$.dirty[11] && o(322, ee = J && Pt && Ul > Pt.height), 12288 & e.$$.dirty[10] && o(324, te = Q && ee), 1048576 & e.$$.dirty[0] && o(321, oe = Kr), 2097152 & e.$$.dirty[10] && o(293, ie = "narrow" === Y), 16 & e.$$.dirty[8] | 262144 & e.$$.dirty[11] && o(332, (b = Pt, x = Rr, re = Pt ? "auto" === x ? b.width > b.height ? "landscape" : "portrait" : "horizontal" === x ? b.width < 500 ? "portrait" : "landscape" : "vertical" === x ? b.height < 400 ? "landscape" : "portrait" : void 0 : "landscape")), 4194304 & e.$$.dirty[10] && o(76, ae = "landscape" === re), 16384 & e.$$.dirty[9] | 1048576 & e.$$.dirty[10] && o(320, se = ie || "short" === K), 1 & e.$$.dirty[1] | 262144 & e.$$.dirty[11] && o(319, de = bc && Pt && jl === Pt.width && !Gl), 4 & e.$$.dirty[1] | 512 & e.$$.dirty[12] && o(294, ue = [...po || [], ...dc].filter(Boolean)), 32 & e.$$.dirty[8] && o(329, he = "has-navigation-preference-" + Pr), 64 & e.$$.dirty[8] && o(328, pe = "has-navigation-preference-" + Er), 128 & e.$$.dirty[8] && o(325, me = "has-toolbar-preference-" + Ir), 256 & e.$$.dirty[8] && o(327, ge = "has-controlgroups-preference-" + Ar), 512 & e.$$.dirty[8] && o(326, $e = "has-controltabs-preference-" + Lr), 262144 & e.$$.dirty[11] && o(334, fe = void 0 !== Pt && Pt.width > 0 && Pt.height > 0), 4 & e.$$.dirty[0] | 16777216 & e.$$.dirty[10] && o(333, be = fe && $n && getComputedStyle($n)), 8388608 & e.$$.dirty[10] && be && Rc(), 1024 & e.$$.dirty[0] | 8437760 & e.$$.dirty[1] | 270336 & e.$$.dirty[7] | 524288 & e.$$.dirty[9] | 8388352 & e.$$.dirty[10] | 33554432 & e.$$.dirty[11] | 384 & e.$$.dirty[12] && Zl.set({ + ...jt, + layoutMode: Gi, + orientation: re, + horizontalSpace: Y, + verticalSpace: K, + navigationHorizontalPreference: he, + navigationVerticalPreference: pe, + controlGroupsVerticalPreference: ge, + controlTabsVerticalpreference: $e, + toolbarVerticalPreference: me, + isModal: J, + isDisabled: Qi, + isCentered: te, + isCenteredHorizontally: Q, + isCenteredVertically: ee, + isAnimated: Xt, + isTransparent: oe, + pointerAccuracy: ho, + pointerHoverable: uo, + isCompact: se, + hasSwipeNavigation: de, + hasLimitedSpace: q, + hasToolbar: xr, + hasNavigation: Z && $, + isIOS: bc, + browserVersion: Fl() ? "chrome-" + (navigator.userAgent.match(/Chrome\/([0-9]+)/) || [])[1] : void 0 + }), 33554432 & e.$$.dirty[11] && o(75, xe = Object.entries(jt).map((([e, t]) => /^is|has/.test(e) ? t ? vp(e) : void 0 : t)).filter(Boolean).join(" ")), 8192 & e.$$.dirty[1] && _ && lc.set([]), 96 & e.$$.dirty[12] && o(74, ve = co && Object.entries(lo).filter((([, e]) => null != e)).reduce(((e, [, t]) => e = { + ...e, + ...t + }), {})), 4 & e.$$.dirty[12] && o(315, Ce = oo && "any-to-file" === oo.task), 32 & e.$$.dirty[10] && Ce && ac && ac.clear(), 16 & e.$$.dirty[12] && o(317, we = !!no && !!no.translation), 16 & e.$$.dirty[9] | 128 & e.$$.dirty[10] | 8192 & e.$$.dirty[11] && we && $t && $t !== Ac && (o(283, Ac = $t), Ec()), 128 & e.$$.dirty[10] | 16 & e.$$.dirty[12] && we && Ic(no), 33554432 & e.$$.dirty[1] && ro && ro.length > 1) { + let e = []; + ac.forEach(((t, o) => { + 0 !== o && t.get().opacity <= 0 && e.push(t) + })), e.forEach((e => ac.remove(e))) + } + if (8 & e.$$.dirty[0] | 64 & e.$$.dirty[10] && o(40, ke = Xi && Se.length && Xi.labelSupportError(Se)), 4 & e.$$.dirty[12] && o(307, Te = oo && !!oo.error), 4 & e.$$.dirty[12] && o(43, Me = !oo || !oo.complete && void 0 === oo.task), 4 & e.$$.dirty[12] && o(308, Re = oo && (oo.taskLengthComputable ? oo.taskProgress : 1 / 0)), 32 & e.$$.dirty[10] && Ce && un(Ll, eo = !1, eo), 8388608 & e.$$.dirty[1] | 32 & e.$$.dirty[9] | 4 & e.$$.dirty[12] && oo && oo.complete) { + const e = Xt ? 250 : 0; + clearTimeout(zc), o(284, zc = setTimeout((() => { + un(Ll, eo = !0, eo) + }), e)) + } + if (4096 & e.$$.dirty[1] | 268435456 & e.$$.dirty[9] | 5 & e.$$.dirty[12] && o(312, Pe = oo && !Te && !Me && !eo), 8 & e.$$.dirty[9] | 8192 & e.$$.dirty[11] | 8 & e.$$.dirty[12] && o(311, Ee = !(!io || $t && !Dl)), 8388608 & e.$$.dirty[1] | 1 & e.$$.dirty[12]) + if (eo) { + setTimeout((() => Tc.set(1)), Xt ? 500 : 0) + } else Tc.set(0); + if (67108864 & e.$$.dirty[11] | 2 & e.$$.dirty[12] && o(306, Ie = !!(Zt || to && void 0 !== to.progress && !to.complete)), 134217728 & e.$$.dirty[9] && Ie && En(), 4096 & e.$$.dirty[1] | 4 & e.$$.dirty[12] && o(309, Ae = oo && !(oo.error || Me)), 8 & e.$$.dirty[0] | 4 & e.$$.dirty[12] && o(310, Le = Xi && (oo ? !oo.complete || oo.error ? cl(Xi.statusLabelLoadImage(oo), oo.error && oo.error.metadata, "{", "}") : Xi.statusLabelLoadImage({ + progress: 1 / 0, + task: "blob-to-bitmap" + }) : Xi.statusLabelLoadImage(oo))), 8 & e.$$.dirty[0] | 2 & e.$$.dirty[12] && o(305, ze = to && Xi && Xi.statusLabelProcessImage(to)), 2 & e.$$.dirty[12] && o(303, Fe = to && (to.taskLengthComputable ? to.taskProgress : 1 / 0)), 2 & e.$$.dirty[12] && o(304, Oe = to && !to.error), 2 & e.$$.dirty[12] && o(302, Be = !(!to || !to.error)), 8 & e.$$.dirty[0] | 4096 & e.$$.dirty[1] | 1024 & e.$$.dirty[7] | 2139095040 & e.$$.dirty[9] | 7 & e.$$.dirty[10]) + if (er) { + let e, t, i, r, n; + T(er) && (e = er), Eo(er) ? t = er : Array.isArray(er) && ([e, t, n] = er, !1 === t && (r = !0), Eo(t) && (i = !0)), o(35, Oc = (e || t) && { + text: e, + aside: r || i, + progressIndicator: { + visible: i, + progress: t + }, + closeButton: r && { + label: Xi.statusLabelButtonClose, + icon: Xi.statusIconButtonClose, + onclick: n || (() => o(227, er = void 0)) + } + }) + } else o(35, Oc = Xi && Me || Te || Pe || Ee ? { + text: Le, + aside: Te || Ae, + progressIndicator: { + visible: Ae, + progress: Re + }, + closeButton: Te && { + label: Xi.statusLabelButtonClose, + icon: Xi.statusIconButtonClose, + onclick: Hc + } + } : Xi && Ie && ze ? { + text: ze, + aside: Be || Oe, + progressIndicator: { + visible: Oe, + progress: Fe + }, + closeButton: Be && { + label: Xi.statusLabelButtonClose, + icon: Xi.statusIconButtonClose, + onclick: jc + } + } : void 0); + if (1024 & e.$$.dirty[7] && o(314, We = void 0 !== er), 8388608 & e.$$.dirty[1] | 524288 & e.$$.dirty[9] | 2 & e.$$.dirty[12] && J && to && to.complete && (Fc.set(!0), setTimeout((() => Fc.set(!1)), Xt ? 100 : 0)), 4 & e.$$.dirty[0] | 8192 & e.$$.dirty[1] | 1 & e.$$.dirty[12] && eo && $n && $n.dispatchEvent(xp("selectutil", _)), 4608 & e.$$.dirty[1] | 402653184 & e.$$.dirty[9] | 22 & e.$$.dirty[10] | 1073741824 & e.$$.dirty[11] && o(313, Ve = Qt || ke || Me || Te || Pe || Ee || Ie || We), 8 & e.$$.dirty[10] && un(Lc, Jt = Ve ? 1 : 0, Jt), 8388608 & e.$$.dirty[1] | 8 & e.$$.dirty[10] && Lc.set(Ve ? 1 : 0, { + duration: Xt ? 500 : 1 + }), 16777216 & e.$$.dirty[1] && o(42, _e = Jt > 0), 16 & e.$$.dirty[1] && o(301, Ne = !(!Oc || !Oc.aside)), 8390672 & e.$$.dirty[1] | 4194368 & e.$$.dirty[9] | 536870912 & e.$$.dirty[11] && _e && Oc) { + clearTimeout(Nc); + const e = { + hard: !1 === Xt + }; + if (Ne) { + const t = !!Oc.error || !Xt; + Bc.set(1, e), Dc.set(Kt, { + hard: t + }), o(285, Nc = setTimeout((() => { + Wc.set(16, e) + }), 1)) + } else Bc.set(0, e), o(285, Nc = setTimeout((() => { + Wc.set(0, e) + }), 1)) + } + if (2048 & e.$$.dirty[1] && (_e || (_c.set(void 0, { + hard: !0 + }), Dc.set(void 0, { + hard: !0 + }), Wc.set(0, { + hard: !0 + }))), 268435456 & e.$$.dirty[11] && o(300, He = .5 * qt), 2097152 & e.$$.dirty[9] | 134217728 & e.$$.dirty[11] && o(73, je = `transform: translateX(${Yt-He}px)`), 512 & e.$$.dirty[1] | 8192 & e.$$.dirty[11] && o(39, ht = $t && !ke), 256 & e.$$.dirty[1] | 1572864 & e.$$.dirty[9] && o(297, Ge = Ue && (ht || J) ? Uc : r), 262144 & e.$$.dirty[9] && o(72, Ze = Ge), 262144 & e.$$.dirty[9] && o(71, Xe = Ge), 8 & e.$$.dirty[0] | 4194304 & e.$$.dirty[1] | 973078528 & e.$$.dirty[7] | 1 & e.$$.dirty[8] | 245760 & e.$$.dirty[9] | 33554432 & e.$$.dirty[11] && o(70, Je = Xi && Ut && zp((() => pr([ + ["div", "alpha", { + class: "PinturaNavGroup" + }, + [ + ["div", "alpha-set", { + class: "PinturaNavSet" + }, + [wr && ["Button", "close", { + label: Xi.labelClose, + icon: Xi.iconButtonClose, + onclick: () => Ni("close"), + hideLabel: !0 + }], yr && ["Button", "revert", { + label: Xi.labelButtonRevert, + icon: Xi.iconButtonRevert, + disabled: !F, + onclick: oc, + hideLabel: !0 + }]] + ] + ] + ], + ["div", "beta", { + class: "PinturaNavGroup PinturaNavGroupFloat" + }, + [br && ["div", "history", { + class: "PinturaNavSet" + }, + [ + ["Button", "undo", { + label: Xi.labelButtonUndo, + icon: Xi.iconButtonUndo, + disabled: !F, + onclick: ql.undo, + hideLabel: !0 + }], + ["Button", "redo", { + label: Xi.labelButtonRedo, + icon: Xi.iconButtonRedo, + disabled: !O, + onclick: ql.redo, + hideLabel: !0 + }] + ] + ], ue.length && ["div", "plugin-tools", { + class: "PinturaNavSet" + }, ue.filter(Boolean).map((([e, t, o]) => [e, t, { + ...o + }]))]] + ], + ["div", "gamma", { + class: "PinturaNavGroup" + }, + [gr && ["Button", "export", { + label: Xi.labelButtonExport, + icon: ie && Xi.iconButtonExport, + class: "PinturaButtonExport", + onclick: rc, + hideLabel: ie + }]] + ] + ], { + ...jt + }, (() => Vn.set({})))))), 2097152 & e.$$.dirty[11] && o(289, ot = Ft && !!Ft.length), 1024 & e.$$.dirty[9] | 2113536 & e.$$.dirty[11] && o(288, rt = ot && Ur(wt, Ft)), 1536 & e.$$.dirty[9] | 25174016 & e.$$.dirty[11] && ot && ((e, t, i, r) => { + if (!t) return; + const n = { + dataSizeScalar: i + }; + r && r[3] > 0 && (n.backgroundColor = [...r]), t(e, n).then((e => { + qc && g(qc), o(286, qc = e) + })) + })($t, Vt, rt, Wt), 128 & e.$$.dirty[9] | 6307840 & e.$$.dirty[11] && Ft && qc && wt) { + const { + width: e, + height: t + } = wt, i = Gt() ? "pixelated" : "auto" === Ot ? "auto" : "pixelated"; + o(287, Jc = Ft.map((o => { + const r = it(o.x, o.y, o.width, o.height), + n = mt(Ye(r), o.rotation).map((o => ce(o.x / e, o.y / t))); + return { + ...o, + id: "redaction", + flipX: !1, + flipY: !1, + cornerRadius: 0, + strokeWidth: 0, + strokeColor: void 0, + backgroundColor: [0, 0, 0, 0], + backgroundImage: qc, + backgroundImageRendering: i, + backgroundCorners: n + } + }))) + } + 256 & e.$$.dirty[9] | 1048576 & e.$$.dirty[11] && o(37, st = [...Jc, ...zt || []]), 32 & e.$$.dirty[1] && Kc && Qc.set(Kc), 4 & e.$$.dirty[0] | 256 & e.$$.dirty[1] && ht && $n.dispatchEvent(xp("ready")), 524288 & e.$$.dirty[1] && o(64, pd = !0), 245760 & e.$$.dirty[11] && o(65, md = !0), 262144 & e.$$.dirty[1] && o(66, $d = !0), 131072 & e.$$.dirty[1] && o(67, fd = !0), 64 & e.$$.dirty[1] && o(68, yd = !0) + }, o(347, v = !vc()), z = 1 === _d() ? e => { + e && (ye(e.origin, Math.round), ye(e.translation, Math.round)) + } : j, o(316, Se = [!Mp() && "WebGL"].filter(Boolean)), o(299, Ue = mo() || b() && Xo()), o(69, lt = ((e, t = !0) => o => { + "ping" === o.type && (t && o.stopPropagation(), e(o.detail.type, o.detail.data)) + })(_i.pub)), [ln, gn, $n, Xi, Yi, ir, nr, ar, lr, hr, xr, Mr, zr, Or, Dr, Br, Wr, Hr, Zr, Yr, Kr, Jr, Qr, rn, nn, an, sn, pn, Xn, Bl, ql, jl, Ul, dc, cc, Oc, Kc, st, N, ht, ke, tt, _e, Me, _, $, Z, V, ft, xt, Mt, Rt, Ht, Ut, Xt, Jt, ro, So, Mo, Ro, oi, Hi, ji, yc, pd, md, $d, fd, yd, lt, Je, Xe, Ze, je, ve, xe, ae, X, G, U, H, bo, ai, mi, $i, fi, yi, bi, xi, vi, ki, Ci, Ti, Ri, Pi, Ii, Ai, Li, zi, Fi, Oi, Di, Bi, yn, bn, xn, On, Vn, _n, Hn, Qn, ea, oa, ia, ra, aa, sa, la, ca, da, ua, fa, xa, va, wa, Pa, Ea, Ia, Aa, La, za, Fa, Va, _a, Na, Ha, ja, Ua, qa, Ka, Ja, Qa, es, ts, os, is, ns, as, ss, ls, us, hs, ps, ms, gs, $s, fs, ys, xs, vs, ws, Ss, Ms, Rs, Ps, Es, As, Ls, zs, Fs, _s, Ns, js, Gs, Zs, Xs, qs, Ks, Js, tl, ol, rl, xl, Tl, Ml, Rl, Pl, El, Il, Al, Ll, Ol, Vl, _l, Nl, Zl, Yl, ic, ac, lc, mc, Sc, kc, Cc, Tc, ({ + target: e, + propertyName: t + }) => { + e === $n && /background|outline/.test(t) && be && Rc() + }, Pc, Lc, Fc, Dc, Bc, Wc, Vc, _c, e => { + const t = !(!Oc || !Oc.closeButton) || !Xt; + Vc.set(e.detail.width, { + hard: t + }), _c.set(Math.round(.5 * -e.detail.width), { + hard: t + }) + }, Gc, Zc, e => { + const { + keyCode: t, + metaKey: o, + ctrlKey: i, + shiftKey: r + } = e; + if (9 === t && Qi) return void e.preventDefault(); + if (e.target && 32 === t && $n.contains(e.target) && !Gd(e.target) && (Nt && n && An(), e.preventDefault()), 90 === t && (o || i)) return void(r && o ? ql.redo() : ql.undo()); + if (89 === t && i) return void ql.redo(); + if (229 === t) return; + const a = new Set([..._t, t]); + Zc.set(Array.from(a)) + }, ({ + key: e, + keyCode: t + }) => { + if ("Meta" === e) return Zc.set([]); + Zc.set(_t.filter((e => e !== t))) + }, () => { + Zc.set([]) + }, e => { + Gd(e.target) || e.preventDefault() + }, e => { + kr && Xc(e.detail.resources[0]) + }, () => { + Tr && Lp().then(Yc) + }, e => { + if (!Cr) return; + const t = rs((window.innerWidth - Math.abs(Pt.x)) / Pt.width, 0, 1), + o = rs((window.innerHeight - Math.abs(Pt.y)) / Pt.height, 0, 1); + t < .75 && o < .75 || Xc((e.clipboardData || window.clipboardData).files[0]) + }, ed, hd, e => { + pt && dt(e.detail, pt) || un($s, pt = e.detail, pt) + }, er, Wl, Ui, Gi, Zi, qi, Ki, Ji, Qi, tr, or, rr, sr, cr, dr, pr, mr, gr, yr, br, vr, wr, kr, Cr, Tr, Rr, Pr, Er, Ir, Ar, Lr, Fr, Vr, _r, Nr, Xr, qr, () => o(61, Hi = void 0), (e, t, i) => { + const { + text: r = "", + placeholder: n = "", + autoClose: a = !0, + align: s = "top", + justify: l = "center", + buttonConfirm: c, + buttonCancel: d + } = i; + o(61, Hi = { + align: s, + justify: l, + text: r, + placeholder: n, + buttonConfirm: c, + buttonCancel: d, + onconfirm: () => { + e(ji.value), a && o(61, Hi = void 0) + }, + oncancel: () => { + t(void 0), o(61, Hi = void 0) + } + }) + }, cn, dn, hn, mn, Pn, En, In, An, Ln, zn, Fn, Dn, Bn, Wn, Nn, Cs, Dl, Ac, zc, Nc, qc, Jc, rt, ot, n, W, Qe, ie, ue, O, F, Ge, J, Ue, He, Ne, Be, Fe, Oe, ze, Ie, Te, Re, Ae, Le, Ee, Pe, Ve, We, Ce, Se, we, q, de, se, oe, ee, Q, te, me, $e, ge, pe, he, K, Y, re, be, fe, D, B, L, R, A, E, P, M, k, C, m, S, v, w, s, u, a, d, i, $t, wt, kt, Ct, Tt, Pt, It, zt, Ft, Ot, Wt, Vt, jt, Zt, Yt, qt, Kt, Qt, eo, to, oo, io, no, lo, co, uo, ho, po, go, $o, fo, xo, vo, wo, ko, Co, To, Po, Io, zo, Fo, No, jo, Yo, qo, Ko, ti, ii, ri, ni, li, ci, di, ui, hi, pi, function() { + o(31, jl = jp.innerWidth), o(32, Ul = jp.innerHeight) + }, e => un(gs, fi = e.detail, fi), ({ + detail: e + }) => o(44, _ = e), (e, t) => t.id === e, function(t, i) { + e.$$.not_equal(gn[i], t) && (gn[i] = t, o(1, gn), o(268, hn), o(27, pn)) + }, e => o(63, yc = yc.concat(e)), e => o(63, yc = yc.filter((t => t !== e))), (e, { + detail: t + }) => o(38, N[e] = t, N), e => un(ps, bo = e.detail, bo), e => e.id === _, function(t) { + e.$$.not_equal(gn[_], t) && (gn[_] = t, o(1, gn), o(268, hn), o(27, pn)) + }, () => o(63, yc = yc.concat(_)), () => o(63, yc = yc.filter((e => e !== _))), ({ + detail: e + }) => o(38, N[_] = e, N), e => { + const t = { + ...e, + ...ed() + }, + { + annotationShapes: o, + decorationShapes: i, + interfaceShapes: r, + frameShapes: n, + selectionShapes: a + } = hr({ + annotationShapes: Mt, + decorationShapes: xt, + interfaceShapes: Pi, + frameShapes: ft, + selectionShapes: oi + }, t); + return hd(t, st, o, i, r, n, a) + }, () => { + o(64, pd = !1), o(65, md = !1), o(66, $d = !1), o(67, fd = !1), o(68, yd = !1) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + Kc = e, o(36, Kc) + })) + }, function(e) { + ln = e, o(0, ln), o(258, Fr) + }, function(e) { + dc = e, o(33, dc) + }, function(e) { + cc = e, o(34, cc) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + ji = e, o(62, ji) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + $n = e, o(2, $n) + })) + }, e => un(us, Ht = e.detail, Ht)] +} +class fm extends Fa { + constructor(e) { + super(), za(this, e, $m, pm, Qr, { + class: 229, + layout: 230, + stores: 231, + locale: 3, + id: 4, + util: 232, + utils: 233, + animations: 234, + disabled: 235, + status: 227, + previewUpscale: 236, + previewPad: 237, + previewMaskOpacity: 5, + previewImageDataMaxSize: 238, + previewImageTextPixelRatio: 6, + markupMaskOpacity: 7, + zoomMaskOpacity: 239, + elasticityMultiplier: 8, + willRevert: 240, + willProcessImage: 241, + willRenderCanvas: 9, + willRenderToolbar: 242, + willSetHistoryInitialState: 243, + enableButtonExport: 244, + enableButtonRevert: 245, + enableNavigateHistory: 246, + enableToolbar: 10, + enableUtils: 247, + enableButtonClose: 248, + enableDropImage: 249, + enablePasteImage: 250, + enableBrowseImage: 251, + enableTransparencyGrid: 11, + layoutDirectionPreference: 252, + layoutHorizontalUtilsPreference: 253, + layoutVerticalUtilsPreference: 254, + layoutVerticalToolbarPreference: 255, + layoutVerticalControlGroupsPreference: 256, + layoutVerticalControlTabsPreference: 257, + textDirection: 12, + markupEditorZoomLevel: 258, + markupEditorZoomLevels: 13, + markupEditorZoomAdjustStep: 14, + markupEditorZoomAdjustFactor: 15, + markupEditorZoomAdjustWheelFactor: 16, + markupEditorInteractionMode: 259, + muteAudio: 260, + willSetMediaInitialTimeOffset: 261, + enablePan: 17, + enableZoom: 18, + enableZoomControls: 262, + enableZoomInput: 19, + enablePanInput: 263, + enableCanvasAlpha: 20, + enablePanLimit: 21, + panLimitGutterScalar: 22, + zoomPresetOptions: 23, + zoomAdjustStep: 24, + zoomAdjustFactor: 25, + zoomAdjustWheelFactor: 26, + zoomLevel: 0, + hideTextInput: 264, + showTextInput: 265, + imagePreviewSrc: 266, + imageOrienter: 267, + pluginComponents: 268, + pluginOptions: 27, + sub: 269, + pluginInterface: 1, + root: 2, + play: 270, + pause: 271, + isPaused: 272, + togglePlayPause: 273, + mute: 274, + unmute: 275, + toggleMute: 276, + getDuration: 277, + getCurrentTime: 278, + setCurrentTime: 279, + imageSourceToImageData: 28, + imagePreview: 29, + imagePreviewCurrent: 228, + history: 30 + }, null, [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) + } + get class() { + return this.$$.ctx[229] + } + set class(e) { + this.$$set({ + class: e + }), pa() + } + get layout() { + return this.$$.ctx[230] + } + set layout(e) { + this.$$set({ + layout: e + }), pa() + } + get stores() { + return this.$$.ctx[231] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[3] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get id() { + return this.$$.ctx[4] + } + set id(e) { + this.$$set({ + id: e + }), pa() + } + get util() { + return this.$$.ctx[232] + } + set util(e) { + this.$$set({ + util: e + }), pa() + } + get utils() { + return this.$$.ctx[233] + } + set utils(e) { + this.$$set({ + utils: e + }), pa() + } + get animations() { + return this.$$.ctx[234] + } + set animations(e) { + this.$$set({ + animations: e + }), pa() + } + get disabled() { + return this.$$.ctx[235] + } + set disabled(e) { + this.$$set({ + disabled: e + }), pa() + } + get status() { + return this.$$.ctx[227] + } + set status(e) { + this.$$set({ + status: e + }), pa() + } + get previewUpscale() { + return this.$$.ctx[236] + } + set previewUpscale(e) { + this.$$set({ + previewUpscale: e + }), pa() + } + get previewPad() { + return this.$$.ctx[237] + } + set previewPad(e) { + this.$$set({ + previewPad: e + }), pa() + } + get previewMaskOpacity() { + return this.$$.ctx[5] + } + set previewMaskOpacity(e) { + this.$$set({ + previewMaskOpacity: e + }), pa() + } + get previewImageDataMaxSize() { + return this.$$.ctx[238] + } + set previewImageDataMaxSize(e) { + this.$$set({ + previewImageDataMaxSize: e + }), pa() + } + get previewImageTextPixelRatio() { + return this.$$.ctx[6] + } + set previewImageTextPixelRatio(e) { + this.$$set({ + previewImageTextPixelRatio: e + }), pa() + } + get markupMaskOpacity() { + return this.$$.ctx[7] + } + set markupMaskOpacity(e) { + this.$$set({ + markupMaskOpacity: e + }), pa() + } + get zoomMaskOpacity() { + return this.$$.ctx[239] + } + set zoomMaskOpacity(e) { + this.$$set({ + zoomMaskOpacity: e + }), pa() + } + get elasticityMultiplier() { + return this.$$.ctx[8] + } + set elasticityMultiplier(e) { + this.$$set({ + elasticityMultiplier: e + }), pa() + } + get willRevert() { + return this.$$.ctx[240] + } + set willRevert(e) { + this.$$set({ + willRevert: e + }), pa() + } + get willProcessImage() { + return this.$$.ctx[241] + } + set willProcessImage(e) { + this.$$set({ + willProcessImage: e + }), pa() + } + get willRenderCanvas() { + return this.$$.ctx[9] + } + set willRenderCanvas(e) { + this.$$set({ + willRenderCanvas: e + }), pa() + } + get willRenderToolbar() { + return this.$$.ctx[242] + } + set willRenderToolbar(e) { + this.$$set({ + willRenderToolbar: e + }), pa() + } + get willSetHistoryInitialState() { + return this.$$.ctx[243] + } + set willSetHistoryInitialState(e) { + this.$$set({ + willSetHistoryInitialState: e + }), pa() + } + get enableButtonExport() { + return this.$$.ctx[244] + } + set enableButtonExport(e) { + this.$$set({ + enableButtonExport: e + }), pa() + } + get enableButtonRevert() { + return this.$$.ctx[245] + } + set enableButtonRevert(e) { + this.$$set({ + enableButtonRevert: e + }), pa() + } + get enableNavigateHistory() { + return this.$$.ctx[246] + } + set enableNavigateHistory(e) { + this.$$set({ + enableNavigateHistory: e + }), pa() + } + get enableToolbar() { + return this.$$.ctx[10] + } + set enableToolbar(e) { + this.$$set({ + enableToolbar: e + }), pa() + } + get enableUtils() { + return this.$$.ctx[247] + } + set enableUtils(e) { + this.$$set({ + enableUtils: e + }), pa() + } + get enableButtonClose() { + return this.$$.ctx[248] + } + set enableButtonClose(e) { + this.$$set({ + enableButtonClose: e + }), pa() + } + get enableDropImage() { + return this.$$.ctx[249] + } + set enableDropImage(e) { + this.$$set({ + enableDropImage: e + }), pa() + } + get enablePasteImage() { + return this.$$.ctx[250] + } + set enablePasteImage(e) { + this.$$set({ + enablePasteImage: e + }), pa() + } + get enableBrowseImage() { + return this.$$.ctx[251] + } + set enableBrowseImage(e) { + this.$$set({ + enableBrowseImage: e + }), pa() + } + get enableTransparencyGrid() { + return this.$$.ctx[11] + } + set enableTransparencyGrid(e) { + this.$$set({ + enableTransparencyGrid: e + }), pa() + } + get layoutDirectionPreference() { + return this.$$.ctx[252] + } + set layoutDirectionPreference(e) { + this.$$set({ + layoutDirectionPreference: e + }), pa() + } + get layoutHorizontalUtilsPreference() { + return this.$$.ctx[253] + } + set layoutHorizontalUtilsPreference(e) { + this.$$set({ + layoutHorizontalUtilsPreference: e + }), pa() + } + get layoutVerticalUtilsPreference() { + return this.$$.ctx[254] + } + set layoutVerticalUtilsPreference(e) { + this.$$set({ + layoutVerticalUtilsPreference: e + }), pa() + } + get layoutVerticalToolbarPreference() { + return this.$$.ctx[255] + } + set layoutVerticalToolbarPreference(e) { + this.$$set({ + layoutVerticalToolbarPreference: e + }), pa() + } + get layoutVerticalControlGroupsPreference() { + return this.$$.ctx[256] + } + set layoutVerticalControlGroupsPreference(e) { + this.$$set({ + layoutVerticalControlGroupsPreference: e + }), pa() + } + get layoutVerticalControlTabsPreference() { + return this.$$.ctx[257] + } + set layoutVerticalControlTabsPreference(e) { + this.$$set({ + layoutVerticalControlTabsPreference: e + }), pa() + } + get textDirection() { + return this.$$.ctx[12] + } + set textDirection(e) { + this.$$set({ + textDirection: e + }), pa() + } + get markupEditorZoomLevel() { + return this.$$.ctx[258] + } + set markupEditorZoomLevel(e) { + this.$$set({ + markupEditorZoomLevel: e + }), pa() + } + get markupEditorZoomLevels() { + return this.$$.ctx[13] + } + set markupEditorZoomLevels(e) { + this.$$set({ + markupEditorZoomLevels: e + }), pa() + } + get markupEditorZoomAdjustStep() { + return this.$$.ctx[14] + } + set markupEditorZoomAdjustStep(e) { + this.$$set({ + markupEditorZoomAdjustStep: e + }), pa() + } + get markupEditorZoomAdjustFactor() { + return this.$$.ctx[15] + } + set markupEditorZoomAdjustFactor(e) { + this.$$set({ + markupEditorZoomAdjustFactor: e + }), pa() + } + get markupEditorZoomAdjustWheelFactor() { + return this.$$.ctx[16] + } + set markupEditorZoomAdjustWheelFactor(e) { + this.$$set({ + markupEditorZoomAdjustWheelFactor: e + }), pa() + } + get markupEditorInteractionMode() { + return this.$$.ctx[259] + } + set markupEditorInteractionMode(e) { + this.$$set({ + markupEditorInteractionMode: e + }), pa() + } + get muteAudio() { + return this.$$.ctx[260] + } + set muteAudio(e) { + this.$$set({ + muteAudio: e + }), pa() + } + get willSetMediaInitialTimeOffset() { + return this.$$.ctx[261] + } + set willSetMediaInitialTimeOffset(e) { + this.$$set({ + willSetMediaInitialTimeOffset: e + }), pa() + } + get enablePan() { + return this.$$.ctx[17] + } + set enablePan(e) { + this.$$set({ + enablePan: e + }), pa() + } + get enableZoom() { + return this.$$.ctx[18] + } + set enableZoom(e) { + this.$$set({ + enableZoom: e + }), pa() + } + get enableZoomControls() { + return this.$$.ctx[262] + } + set enableZoomControls(e) { + this.$$set({ + enableZoomControls: e + }), pa() + } + get enableZoomInput() { + return this.$$.ctx[19] + } + set enableZoomInput(e) { + this.$$set({ + enableZoomInput: e + }), pa() + } + get enablePanInput() { + return this.$$.ctx[263] + } + set enablePanInput(e) { + this.$$set({ + enablePanInput: e + }), pa() + } + get enableCanvasAlpha() { + return this.$$.ctx[20] + } + set enableCanvasAlpha(e) { + this.$$set({ + enableCanvasAlpha: e + }), pa() + } + get enablePanLimit() { + return this.$$.ctx[21] + } + set enablePanLimit(e) { + this.$$set({ + enablePanLimit: e + }), pa() + } + get panLimitGutterScalar() { + return this.$$.ctx[22] + } + set panLimitGutterScalar(e) { + this.$$set({ + panLimitGutterScalar: e + }), pa() + } + get zoomPresetOptions() { + return this.$$.ctx[23] + } + set zoomPresetOptions(e) { + this.$$set({ + zoomPresetOptions: e + }), pa() + } + get zoomAdjustStep() { + return this.$$.ctx[24] + } + set zoomAdjustStep(e) { + this.$$set({ + zoomAdjustStep: e + }), pa() + } + get zoomAdjustFactor() { + return this.$$.ctx[25] + } + set zoomAdjustFactor(e) { + this.$$set({ + zoomAdjustFactor: e + }), pa() + } + get zoomAdjustWheelFactor() { + return this.$$.ctx[26] + } + set zoomAdjustWheelFactor(e) { + this.$$set({ + zoomAdjustWheelFactor: e + }), pa() + } + get zoomLevel() { + return this.$$.ctx[0] + } + set zoomLevel(e) { + this.$$set({ + zoomLevel: e + }), pa() + } + get hideTextInput() { + return this.$$.ctx[264] + } + get showTextInput() { + return this.$$.ctx[265] + } + get imagePreviewSrc() { + return this.$$.ctx[266] + } + set imagePreviewSrc(e) { + this.$$set({ + imagePreviewSrc: e + }), pa() + } + get imageOrienter() { + return this.$$.ctx[267] + } + set imageOrienter(e) { + this.$$set({ + imageOrienter: e + }), pa() + } + get pluginComponents() { + return this.$$.ctx[268] + } + set pluginComponents(e) { + this.$$set({ + pluginComponents: e + }), pa() + } + get pluginOptions() { + return this.$$.ctx[27] + } + set pluginOptions(e) { + this.$$set({ + pluginOptions: e + }), pa() + } + get sub() { + return this.$$.ctx[269] + } + get pluginInterface() { + return this.$$.ctx[1] + } + get root() { + return this.$$.ctx[2] + } + set root(e) { + this.$$set({ + root: e + }), pa() + } + get play() { + return this.$$.ctx[270] + } + get pause() { + return this.$$.ctx[271] + } + get isPaused() { + return this.$$.ctx[272] + } + get togglePlayPause() { + return this.$$.ctx[273] + } + get mute() { + return this.$$.ctx[274] + } + get unmute() { + return this.$$.ctx[275] + } + get toggleMute() { + return this.$$.ctx[276] + } + get getDuration() { + return this.$$.ctx[277] + } + get getCurrentTime() { + return this.$$.ctx[278] + } + get setCurrentTime() { + return this.$$.ctx[279] + } + get imageSourceToImageData() { + return this.$$.ctx[28] + } + set imageSourceToImageData(e) { + this.$$set({ + imageSourceToImageData: e + }), pa() + } + get imagePreview() { + return this.$$.ctx[29] + } + get imagePreviewCurrent() { + return this.$$.ctx[228] + } + set imagePreviewCurrent(e) { + this.$$set({ + imagePreviewCurrent: e + }), pa() + } + get history() { + return this.$$.ctx[30] + } +} +"undefined" != typeof window && (e => { + if (e && e._clpdx4s) return; + const [t, o, i] = [ + [99, 111, 110, 115, 111, 108, 101], + [108, 111, 103], + [84, 104, 105, 115, 32, 118, 101, 114, 115, 105, 111, 110, 32, 111, 102, 32, 80, 105, 110, 116, 117, 114, 97, 32, 105, 115, 32, 102, 111, 114, 32, 116, 101, 115, 116, 105, 110, 103, 32, 112, 117, 114, 112, 111, 115, 101, 115, 32, 111, 110, 108, 121, 46, 32, 86, 105, 115, 105, 116, 32, 104, 116, 116, 112, 115, 58, 47, 47, 112, 113, 105, 110, 97, 46, 110, 108, 47, 112, 105, 110, 116, 117, 114, 97, 47, 32, 116, 111, 32, 112, 117, 114, 99, 104, 97, 115, 101, 32, 97, 32, 118, 97, 108, 105, 100, 32, 108, 105, 99, 101, 110, 115, 101, 46] + ].map((e => e.map((e => String.fromCharCode(e))).join(""))); + e && e[t] +})(window); +const ym = ["klass", "stores", "isVisible", "isActive", "isActiveFraction", "locale"], + bm = ["history", "klass", "stores", "navButtons", "pluginComponents", "pluginInterface", "pluginOptions", "sub", "imagePreviewSrc", "imagePreview", "imagePreviewCurrent"], + xm = ["locale"]; +let vm; +const wm = new Set([]), + Sm = {}, + km = new Map, + Cm = (...e) => { + e.filter((e => !!e.util)).forEach((e => { + const [t, o, i = (() => !0)] = e.util; + km.has(t) || (km.set(t, { + Component: o, + isSupported: i + }), Xc(o).filter((e => !ym.includes(e))).forEach((e => { + wm.add(e), Sm[e] ? Sm[e].push(t) : Sm[e] = [t] + }))) + })) + }; +var Tm = [...$s, "init", "update", "undo", "redo", "revert", "writehistory", "destroy", "show", "hide", "close", "ready", "zoom", "pan", "loadpreview", "selectshape", "blurshape", "updateshape", "addshape", "removeshape", "selectstyle", "markuptap", "markupzoom", "markuppan", "selectutil", "selectcontrol", "selectiondown", "selectionup", "selectionchange"]; +var Mm = (e, t, o = {}) => { + const { + prefix: i = "pintura:" + } = o; + return Tm.map((o => e.on(o, (e => Dt(t) ? ((e, t, o) => e.dispatchEvent(new CustomEvent(t, { + detail: o, + bubbles: !0, + cancelable: !0 + })))(t, `${i}${o}`, e) : t(o, e))))) + }, + Rm = e => { + if (void 0 === e || Eo(e)) return e; + if (!T(e)) return !1; + const t = e; + if (!t.length) return; + const [o, i] = t.split(/\/|:/g).map((e => parseFloat(e.replace(/,/, ".")))).filter(Boolean); + return !!o && (i ? Math.abs(o / i) : o) + }; +const Pm = e => T(e[0]), + Em = e => !Pm(e), + Im = e => e[1], + Am = e => e[3] || []; + +function Lm(e, t, o, i) { + return Array.isArray(o) && (i = o, o = {}), [e, t, o || {}, i || []] +} +const zm = (e, t, o, i = (e => e)) => { + const r = Vm(t, o), + n = r.findIndex((e => Im(e) === t)); + var a, s, l; + a = r, s = i(n), l = e, a.splice(s, 0, l) + }, + Fm = (e, t, o) => zm(e, t, o), + Om = (e, t, o) => zm(e, t, o, (e => e + 1)), + Dm = (e, t) => { + if (Em(t)) return t.push(e); + t[3] = [...Am(t), e] + }, + Bm = (e, t) => { + const o = Vm(e, t); + return dd(o, (t => Im(t) === e)), o + }, + Wm = (e, t) => { + if (t && t.length) { + if (Pm(t)) { + if (Im(t) === e) return t; + const o = Wm(e, Am(t)); + if (o) return o + } + if (Em(t)) + for (const o of t) { + const t = Wm(e, o); + if (t) return t + } + } + }, + Vm = (e, t) => { + if (Em(t)) { + if (t.find((t => Im(t) === e))) return t; + const o = t.find((t => Vm(e, Am(t)))); + return o && o[3] + } + return Vm(e, Am(t)) + }, + _m = (e, t) => { + const [, , o] = e; + Object.assign(o, t) + }, + Nm = () => [.75, .25, .25, 0, 0, .25, .75, .25, 0, 0, .25, .25, .75, 0, 0, 0, 0, 0, 1, 0], + Hm = () => [1.398, -.316, .065, -.273, .201, -.051, 1.278, -.08, -.273, .201, -.051, .119, 1.151, -.29, .215, 0, 0, 0, 1, 0], + jm = () => [1.073, -.015, .092, -.115, -.017, .107, .859, .184, -.115, -.017, .015, .077, 1.104, -.115, -.017, 0, 0, 0, 1, 0], + Um = () => [1.06, 0, 0, 0, 0, 0, 1.01, 0, 0, 0, 0, 0, .93, 0, 0, 0, 0, 0, 1, 0], + Gm = () => [1.1, 0, 0, 0, -.1, 0, 1.1, 0, 0, -.1, 0, 0, 1.2, 0, -.1, 0, 0, 0, 1, 0], + Zm = () => [-1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0], + Xm = () => [.212, .715, .114, 0, 0, .212, .715, .114, 0, 0, .212, .715, .114, 0, 0, 0, 0, 0, 1, 0], + Ym = () => [.15, 1.3, -.25, .1, -.2, .15, 1.3, -.25, .1, -.2, .15, 1.3, -.25, .1, -.2, 0, 0, 0, 1, 0], + qm = () => [.163, .518, .084, -.01, .208, .163, .529, .082, -.02, .21, .171, .529, .084, 0, .214, 0, 0, 0, 1, 0], + Km = () => [.338, .991, .117, .093, -.196, .302, 1.049, .096, .078, -.196, .286, 1.016, .146, .101, -.196, 0, 0, 0, 1, 0], + Jm = () => [.393, .768, .188, 0, 0, .349, .685, .167, 0, 0, .272, .533, .13, 0, 0, 0, 0, 0, 1, 0], + Qm = () => [.289, .62, .185, 0, .077, .257, .566, .163, 0, .115, .2, .43, .128, 0, .188, 0, 0, 0, 1, 0], + eg = () => [.269, .764, .172, .05, .1, .239, .527, .152, 0, .176, .186, .4, .119, 0, .159, 0, 0, 0, 1, 0], + tg = () => [.547, .764, .134, 0, -.147, .281, .925, .12, 0, -.135, .225, .558, .33, 0, -.113, 0, 0, 0, 1, 0], + og = { + chrome: Hm, + fade: jm, + pastel: Nm, + cold: Gm, + warm: Um, + monoDefault: Xm, + monoWash: qm, + monoNoir: Ym, + monoStark: Km, + sepiaDefault: Jm, + sepiaRust: eg, + sepiaBlues: Qm, + sepiaColor: tg + }; +var ig = { + filterFunctions: og, + filterOptions: [ + ["Default", [ + [void 0, e => e.labelDefault] + ]], + ["Classic", [ + ["chrome", e => e.filterLabelChrome], + ["fade", e => e.filterLabelFade], + ["cold", e => e.filterLabelCold], + ["warm", e => e.filterLabelWarm], + ["pastel", e => e.filterLabelPastel] + ]], + ["Monochrome", [ + ["monoDefault", e => e.filterLabelMonoDefault], + ["monoNoir", e => e.filterLabelMonoNoir], + ["monoStark", e => e.filterLabelMonoStark], + ["monoWash", e => e.filterLabelMonoWash] + ]], + ["Sepia", [ + ["sepiaDefault", e => e.filterLabelSepiaDefault], + ["sepiaRust", e => e.filterLabelSepiaRust], + ["sepiaBlues", e => e.filterLabelSepiaBlues], + ["sepiaColor", e => e.filterLabelSepiaColor] + ]] + ] +}; +const rg = { + borderColor: "strokeColor", + borderWidth: "strokeWidth", + lineWidth: "strokeWidth", + fontColor: "color", + lineColor: "strokeColor", + src: "backgroundImage", + fit: "backgroundSize" + }, + ng = e => 0 === e || "0%" === e || "0px" === e ? 0 : /px$/.test(e) ? parseInt(e, 10) : /\%$/.test(e) ? e : e <= 1 ? 100 * e + "%" : void 0, + ag = (e, t) => { + let o, i; + return /%$/.test(e) ? (o = parseFloat(e), i = parseFloat(t), o + i + "%") : /px$/.test(e) ? (o = parseInt(e, 10), i = parseInt(t, 10), o + i + "px") : void 0 + }, + sg = (e, t) => { + const o = e, + i = t, + r = 1.5707963267948966 - t, + n = Math.sin(1.5707963267948966), + a = Math.sin(i), + s = Math.sin(r), + l = Math.cos(r), + c = o / n; + return ce(l * (c * a), l * (c * s)) + }, + lg = (e, { + flip: t, + aspectRatio: o, + rotation: i, + center: r, + zoom: n, + scaleToFit: a + }) => { + const s = { + flipX: !1, + flipY: !1 + }, + l = !r || r && .5 === r.x && .5 === r.y; + t && t.horizontal && (s.flipX = t.horizontal), t && t.vertical && (s.flipY = t.vertical); + const c = ((e, t) => null != t ? 1 / t : e.width / e.height)(e, o), + d = !(!1 === a), + u = ((e, t, o = 1) => { + const i = e.height / e.width, + r = t; + let n = 1, + a = i; + a > r && (a = r, n = a / i); + const s = Math.max(1 / n, r / a), + l = e.width / (o * s * n); + return { + width: l, + height: l * t + } + })(e, o, n), + h = l ? e : ((e, t) => { + const o = t.x > .5 ? 1 - t.x : t.x, + i = t.y > .5 ? 1 - t.y : t.y; + return De(2 * o * e.width, 2 * i * e.height) + })(e, d ? r : { + x: .5, + y: .5 + }), + p = ((e, t) => { + let o = e.width, + i = o * t; + i > e.height && (i = e.height, o = i / t); + const r = .5 * (e.width - o), + n = .5 * (e.height - i); + return it(r, n, o, i) + })(e, o); + if ((o || !l || n) && (s.crop = yt(Ke(h), c)), "number" == typeof i && null !== i && 0 !== i) { + null != i && (s.rotation = i); + const t = ((e, t) => { + const o = e.width, + i = e.height, + r = sg(o, t), + n = sg(i, t), + a = ce(e.x + Math.abs(r.x), e.y - Math.abs(r.y)), + s = ce(e.x + e.width + Math.abs(n.y), e.y + Math.abs(n.x)), + l = ce(e.x - Math.abs(n.y), e.y + e.height - Math.abs(n.x)); + return { + width: Te(a, s), + height: Te(a, l) + } + })(p, i), + o = Math.max(t.width / h.width, t.height / h.height), + n = ce(r.x * e.width, r.y * e.height), + a = Ot(e, i), + l = Ve(a), + c = ce(.5 * (a.width - e.width), .5 * (a.height - e.height)), + d = mt({ + x: c.x + n.x - u.width / o * .5, + y: c.y + n.y - u.height / o * .5, + width: u.width / o, + height: u.height / o + }, i), + m = Ee(d.map(ue), i, l.x, l.y), + g = rt(et(m)), + $ = Ee(m.map(ue), -2 * i, g.x, g.y); + s.crop = et($) + } else null != n && at(s.crop, 1 / n); + return d || (s.cropLimitToImage = !1), s + }; +var cg = (e, t, o = {}) => { + const i = {}; + if (!((e = {}) => { + if ("markup" in e || "color" in e || "filter" in e) return !0; + const { + crop: t + } = e; + return !(!t || !("flip" in t || "center" in t || "aspectRatio" in t || "rotation" in t)) + })(o)) return o; + if (o.crop && Object.assign(i, lg(t, o.crop)), o.markup) { + const e = Array.isArray(o.markup) ? o.markup : Object.values(o.markup); + i.decoration = e.map((e => ((e, t, o) => { + const i = Object.keys(o).reduce(((t, i) => { + let r = o[i]; + return i = rg[i] || i, /px$/.test(r) ? r = ng(r) : /^(?:x|y|left|right|top|bottom|width|height|fontSize|borderWidth|strokeWidth)$/.test(i) && "number" == typeof r && ("strokeWidth" !== i && "borderWidth" !== i && "fontSize" !== i || (r = Math.min(e.width, e.height) * r + "px"), r = ng(r)), /color/i.test(i) && r && (r = Dh(r)), null === r && (r = void 0), t[i] = r, t + }), {}); + if ("line" === t && (i.lineDecoration.length >= 1 && (i.lineEnd = "arrow"), 2 === i.lineDecoration.length && (i.lineStart = "arrow"), i.x1 = i.x, i.y1 = i.y, i.x2 = ag(i.x, i.width), i.y2 = ag(i.y, i.height), delete i.x, delete i.y, delete i.width, delete i.height, delete i.lineDecoration, delete i.lineStyle), "text" === t) { + if (!Eo(i.y)) { + const t = Math.min(e.width, e.height); + i.y = t * (parseFloat(i.y) / 100) + } + i.y = i.y - i.fontSize, delete i.width, delete i.height, delete i.borderStyle, i.lineHeight = i.lineHeight || "120%" + } + if ("ellipse" === t) { + let t, o; + if (/%$/.test(i.width)) { + t = parseFloat(i.width) / 100, o = parseFloat(i.height) / 100; + const r = t * e.width, + n = o * e.height; + t = r / e.width * 100, o = n / e.height * 100 + } else t = i.width, o = i.height; + i.rx = .5 * t, i.ry = .5 * o, /%$/.test(i.width) && (i.rx += "%", i.ry += "%"), i.x = ag(i.x, i.rx), i.y = ag(i.y, i.ry), delete i.width, delete i.height, delete i.borderStyle + } + if ("rect" === t && delete i.borderStyle, "path" === t) { + let e, t = []; + for (const o of i.points) e ? Ce(e, o) < 1e-9 || (t.push(o), e = o, e = o) : (t.push(o), e = o); + i.points = t.map((e => ({ + x: ng(e.x), + y: ng(e.y) + }))) + } + return i + })(i.crop || t, e[0], e[1]))) + } + if (o.color || o.colors) { + const e = o.color || o.colors; + Object.keys(e).filter((t => e[t])).map((t => [t, Array.isArray(e[t].matrix) ? e[t].matrix : Object.values(e[t].matrix)])).forEach((([e, t]) => { + i.colorMatrix || (i.colorMatrix = {}), i.colorMatrix[e] = t + })) + } + if (o.filter || o.filters) { + const t = o.filters || o.filter; + i.colorMatrix || (i.colorMatrix = {}); + const r = e ? e.filterFunctions : og; + i.colorMatrix.filter = "string" == typeof t && r[t] ? r[t]() : t.matrix + } + const r = o.size ? o.size : !!o.resize && o.resize.size; + return r && r.width && r.height && (i.targetSize = { + width: r.width, + height: r.height + }), i +}; +let dg = null; +var ug = () => (null === dg && (dg = c() && !("[object OperaMini]" === Object.prototype.toString.call(window.operamini)) && "visibilityState" in document && "Promise" in window && "File" in window && "URL" in window && "createObjectURL" in window.URL && "performance" in window), dg); +const hg = { + base: 0, + min: -.25, + max: .25, + getLabel: e => Op(e / .25), + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (e.brightness) return e.brightness[4] + }, + setValue: (e, t) => e.update((e => ({ + ...e, + brightness: [1, 0, 0, 0, t, 0, 1, 0, 0, t, 0, 0, 1, 0, t, 0, 0, 0, 1, 0] + }))) + }, + pg = { + base: 1, + min: .5, + max: 1.5, + getLabel: e => Op(2 * (e - .5) - 1), + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (e.contrast) return e.contrast[0] + }, + setValue: (e, t) => e.update((e => ({ + ...e, + contrast: [t, 0, 0, 0, .5 * (1 - t), 0, t, 0, 0, .5 * (1 - t), 0, 0, t, 0, .5 * (1 - t), 0, 0, 0, 1, 0] + }))) + }, + mg = { + base: 1, + min: 0, + max: 2, + getLabel: e => Op(e - 1), + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (e.saturation) return (e.saturation[0] - .213) / .787 + }, + setValue: (e, t) => e.update((e => ({ + ...e, + saturation: [.213 + .787 * t, .715 - .715 * t, .072 - .072 * t, 0, 0, .213 - .213 * t, .715 + .285 * t, .072 - .072 * t, 0, 0, .213 - .213 * t, .715 - .715 * t, .072 + .928 * t, 0, 0, 0, 0, 0, 1, 0] + }))) + }, + gg = { + base: 1, + min: .5, + max: 1.5, + getLabel: e => Op(2 * (e - .5) - 1), + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (e.exposure) return e.exposure[0] + }, + setValue: (e, t) => e.update((e => ({ + ...e, + exposure: [t, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, 1, 0] + }))) + }, + $g = { + base: 1, + min: .15, + max: 4, + getLabel: e => Op(e < 1 ? (e - .15) / .85 - 1 : (e - 1) / 3), + getStore: ({ + imageGamma: e + }) => e + }, + fg = { + base: 0, + min: -1, + max: 1, + getStore: ({ + imageVignette: e + }) => e + }, + yg = { + base: 0, + min: -1, + max: 1, + getStore: ({ + imageConvolutionMatrix: e + }) => e, + getValue: e => { + if (e.clarity) return 0 === e.clarity[0] ? e.clarity[1] / -1 : e.clarity[1] / -2 + }, + setValue: (e, t) => { + e.update((e => ({ + ...e, + clarity: t >= 0 ? [0, -1 * t, 0, -1 * t, 1 + 4 * t, -1 * t, 0, -1 * t, 0] : [-1 * t, -2 * t, -1 * t, -2 * t, 1 + -3 * t, -2 * t, -1 * t, -2 * t, -1 * t] + }))) + } + }, + bg = { + base: 0, + min: -1, + max: 1, + getStore: ({ + imageColorMatrix: e + }) => e, + getValue: e => { + if (!e.temperature) return; + const t = e.temperature[0]; + return t >= 1 ? (t - 1) / .1 : (1 - t) / -.15 + }, + setValue: (e, t) => e.update((e => ({ + ...e, + temperature: t > 0 ? [1 + .1 * t, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1 + .1 * -t, 0, 0, 0, 0, 0, 1, 0] : [1 + .15 * t, 0, 0, 0, 0, 0, 1 + .05 * t, 0, 0, 0, 0, 0, 1 + .15 * -t, 0, 0, 0, 0, 0, 1, 0] + }))) + }; +var xg = { + finetuneControlConfiguration: { + gamma: $g, + brightness: hg, + contrast: pg, + saturation: mg, + exposure: gg, + temperature: bg, + clarity: yg, + vignette: fg + }, + finetuneOptions: [ + ["brightness", e => e.finetuneLabelBrightness], + ["contrast", e => e.finetuneLabelContrast], + ["saturation", e => e.finetuneLabelSaturation], + ["exposure", e => e.finetuneLabelExposure], + ["temperature", e => e.finetuneLabelTemperature], + ["gamma", e => e.finetuneLabelGamma], !vc() && ["clarity", e => e.finetuneLabelClarity], + ["vignette", e => e.finetuneLabelVignette] + ].filter(Boolean) +}; +const vg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "solid", + frameSize: "2.5%" + }, + thumb: '' + }, + wg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "solid", + frameSize: "2.5%", + frameRound: !0 + }, + thumb: '' + }, + Sg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "line", + frameInset: "2.5%", + frameSize: ".3125%", + frameRadius: 0 + }, + thumb: '
' + }, + kg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "line", + frameAmount: 2, + frameInset: "2.5%", + frameSize: ".3125%", + frameOffset: "1.25%", + frameRadius: 0 + }, + thumb: '
' + }, + Cg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "edge", + frameInset: "2.5%", + frameOffset: "5%", + frameSize: ".3125%" + }, + thumb: '
' + }, + Tg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "edge", + frameInset: "2.5%", + frameSize: ".3125%" + }, + thumb: '
' + }, + Mg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "edge", + frameOffset: "1.5%", + frameSize: ".3125%" + }, + thumb: '
' + }, + Rg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "hook", + frameInset: "2.5%", + frameSize: ".3125%", + frameLength: "5%" + }, + thumb: '
' + }, + Pg = { + shape: { + frameColor: [1, 1, 1], + frameStyle: "polaroid" + }, + thumb: '' + }; +var Eg = { + frameStyles: { + solidSharp: vg, + solidRound: wg, + lineSingle: Sg, + lineMultiple: kg, + edgeSeparate: Cg, + edgeCross: Tg, + edgeOverlap: Mg, + hook: Rg, + polaroid: Pg + }, + frameOptions: [ + [void 0, e => e.labelNone], + ["solidSharp", e => e.frameLabelMatSharp], + ["solidRound", e => e.frameLabelMatRound], + ["lineSingle", e => e.frameLabelLineSingle], + ["lineMultiple", e => e.frameLabelLineMultiple], + ["edgeCross", e => e.frameLabelEdgeCross], + ["edgeSeparate", e => e.frameLabelEdgeSeparate], + ["edgeOverlap", e => e.frameLabelEdgeOverlap], + ["hook", e => e.frameLabelCornerHooks], + ["polaroid", e => e.frameLabelPolaroid] + ] + }, + Ig = e => e.charAt(0).toUpperCase() + e.slice(1); +let Ag = null; +var Lg = () => { + if (null === Ag) + if (c()) try { + Ag = !1 === document.fonts.check("16px TestNonExistingFont") + } catch (e) { + Ag = !1 + } else Ag = !1; + return Ag +}; +const zg = (e, t) => o => o[t ? `${t}${Ig(e)}` : e], + Fg = e => [e, "" + e], + Og = (e, t) => o => [e[o], zg(o, t)], + Dg = e => Array.isArray(e) && e.every(Eo) ? e.map(Fg) : e, + Bg = [1, .2549, .2118], + Wg = [1, 1, 1, 0], + Vg = { + brush: ["path", { + bitmap: !0, + drawMode: "add", + strokeWidth: "5%", + cursorStyle: "ellipse", + cursorSize: "strokeWidth", + disableStyle: ["strokeColor"], + settings: { + strokeWidth: { + control: "brushSize" + } + } + }], + lassoo: ["path", { + drawMode: "add", + disableStyle: ["strokeWidth", "strokeColor"], + pathClose: !0 + }], + rectangle: ["rectangle", { + disableStyle: ["backgroundColor", "strokeWidth", "strokeColor", "cornerRadius"], + drawMode: "add" + }], + ellipse: ["ellipse", { + disableStyle: ["backgroundColor", "strokeWidth", "strokeColor"], + drawMode: "add" + }] + }, + _g = ["brush", "lassoo", "rectangle", "ellipse"], + Ng = (e, t) => { + const { + tools: o = _g + } = t || {}; + return o.reduce(((t, o) => { + const [i, r] = Vg[o], n = Zg(i, { + ...r, + action: e + }, { + position: "absolute", + isSelection: !0 + }); + return Object.assign(t, { + [`selection-${o}-${e}`]: n + }) + }), {}) + }, + Hg = (e, t) => { + const { + tools: o = _g, + hideLabel: i = !0 + } = t || {}; + return o.map((t => [`selection-${t}-${e}`, zg(t, "shapeLabelToolSelection"), { + hideLabel: i, + icon: zg(t, "shapeIconToolSelection") + }])) + }, + jg = e => { + const { + hideLabel: t = !0 + } = e || {}; + return R$(["new", "add", "subtract"].map((e => [e, zg(e, "shapeLabelSelectionMode"), { + icon: zg(e, "shapeIconSelectionMode"), + hideLabel: t + }])), { + title: e => e.shapeTitleSelectionMode, + layout: "radio" + }) + }, + Ug = e => M$(e, { + title: e => e.shapeTitleBrushSize, + layout: "radio", + optionHideLabel: !0, + optionIcon: (e, t) => `` + }), + Gg = { + eraser: () => ({ + eraseRadius: 8, + cursorStyle: "ellipse", + cursorSize: "eraseRadius" + }), + path: () => ({ + points: [] + }), + line: () => ({ + x1: 0, + y1: 0, + x2: 0, + y2: 0, + disableErase: !1 + }), + rectangle: () => ({ + x: 0, + y: 0, + width: 0, + height: 0 + }), + ellipse: () => ({ + x: 0, + y: 0, + rx: 0, + ry: 0 + }), + text: () => ({ + x: 0, + y: 0, + text: "Text" + }) + }, + Zg = (e, t = {}, o) => { + if (!Gg[e]) return; + const { + position: i = "relative", + inputMode: r = "drag", + isSelection: n = !1 + } = o || {}; + return [{ + ...Gg[e](), + ...t + }, { + position: i, + inputMode: r, + isSelection: n + }] + }, + Xg = e => ({ + sharpie: Zg("path", { + bitmap: !0, + strokeJoin: "round", + strokeCap: "round", + strokeWidth: "0.5%", + strokeColor: [...Bg], + cursorStyle: "ellipse", + cursorSize: "strokeWidth", + disableErase: !1, + disableResize: !0, + disableMove: !0 + }), + eraser: Zg("eraser"), + path: Zg("path", { + pathClose: void 0, + strokeWidth: "0.5%", + strokeColor: [...Bg], + backgroundColor: [0, 0, 0, 0] + }, { + inputMode: "step" + }), + line: Zg("line", { + strokeColor: [...Bg], + strokeWidth: "0.5%" + }), + arrow: Zg("line", { + lineStart: "none", + lineEnd: "arrow-solid", + strokeColor: [...Bg], + strokeWidth: "0.5%" + }), + rectangle: Zg("rectangle", { + strokeColor: [...Wg], + backgroundColor: [...Bg] + }), + ellipse: Zg("ellipse", { + strokeColor: [...Wg], + backgroundColor: [...Bg] + }), + text: Zg("text", { + color: [...Bg], + fontSize: "2%" + }), + ...e + }), + Yg = (e, t, o) => [e, t || zg(e, "shapeLabelTool"), { + icon: zg(e, "shapeIconTool"), + ...o + }], + qg = (e = ["move", "view", "sharpie", "eraser", "path", "line", "arrow", "rectangle", "ellipse", "text", "preset"]) => e.map((e => T(e) ? Yg(e) : Array.isArray(e) ? S(e[1]) ? Yg(e[0], void 0, e[1]) : Yg(e[0], e[1], e[2]) : void 0)).filter(Boolean), + Kg = () => ({ + transparent: [1, 1, 1, 0], + white: [1, 1, 1], + silver: [.8667, .8667, .8667], + gray: [.6667, .6667, .6667], + black: [0, 0, 0], + navy: [0, .1216, .2471], + blue: [0, .4549, .851], + aqua: [.498, .8588, 1], + teal: [.2235, .8, .8], + olive: [.2392, .6, .4392], + green: [.1804, .8, .251], + yellow: [1, .8627, 0], + orange: [1, .5216, .1059], + red: [1, .2549, .2118], + maroon: [.5216, .0784, .2941], + fuchsia: [.9412, .0706, .7451], + purple: [.6941, .051, .7882] + }), + Jg = () => [16, 18, 20, 24, 30, 36, 48, 64, 72, 96, 128, 144], + Qg = Jg, + e$ = () => ({ + extraSmall: "2%", + small: "4%", + mediumSmall: "8%", + medium: "10%", + mediumLarge: "15%", + large: "20%", + extraLarge: "25%" + }), + t$ = () => ({ + extraSmall: "40%", + small: "60%", + mediumSmall: "100%", + medium: "120%", + mediumLarge: "140%", + large: "180%", + extraLarge: "220%" + }), + o$ = () => [1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 32, 48, 64], + i$ = () => ({ + extraSmall: "0.25%", + small: "0.5%", + mediumSmall: "1%", + medium: "1.75%", + mediumLarge: "2.5%", + large: "3.5%", + extraLarge: "5%" + }), + r$ = () => ["bar", "arrow", "arrowSolid", "circle", "circleSolid", "square", "squareSolid"], + n$ = () => [ + ["Helvetica, Arial, Verdana, 'Droid Sans', sans-serif", "Sans Serif"], + ["'Arial Black', 'Avenir-Black', 'Arial Bold'", "Black"], + ["'Arial Narrow', 'Futura-CondensedMedium'", "Narrow"], + ["'Trebuchet MS'", "Humanist"], + ["Georgia, 'Avenir-Black', 'Times New Roman', 'Droid Serif', serif", "Serif"], + ["Palatino", "Old-Style"], + ["'Times New Roman', 'TimesNewRomanPSMT'", "Transitional"], + ["Menlo, Monaco, 'Lucida Console', monospace", "Monospaced"], + ["'Courier New', monospace", "Slab Serif"] + ], + a$ = () => ["left", "center", "right"], + s$ = () => [ + ["normal", "bold"], + ["italic", "normal"], + ["italic", "bold"] + ], + l$ = e => Object.keys(e).map(Og(e, "shapeTitleColor")), + c$ = e => e.map(Fg), + d$ = e => Object.keys(e).map(Og(e, "labelSize")), + u$ = e => e.map(Fg), + h$ = e => Object.keys(e).map(Og(e, "labelSize")), + p$ = e => e.map(Fg), + m$ = e => Object.keys(e).map(Og(e, "labelSize")), + g$ = e => [...e], + $$ = e => e.map((e => [e, t => t["shapeLabelFontStyle" + e.filter((e => "normal" !== e)).map(Ig).join("")]])), + f$ = e => e.map((e => [vp(e), t => t["shapeTitleLineDecoration" + Ig(e)], { + icon: t => t["shapeIconLineDecoration" + Ig(e)] + }])), + y$ = (e, t) => { + const { + defaultKey: o, + defaultValue: i, + defaultOptions: r + } = t || {}, n = []; + return o && (n[0] = [i, e => e[o], { + ...r + }]), [...n, ...e] + }, + b$ = e => e.split(",").map((e => e.trim())).some((e => document.fonts.check("16px " + e))), + x$ = (e = {}) => ["ToggleSlider", { + ...e + }], + v$ = (e, t = {}) => ["Dropdown", { + ...t, + options: e + }], + w$ = (e, t = { + defaultKey: "labelDefault" + }) => ["Dropdown", { + title: e => e.shapeTitleFontFamily, + onload: ({ + options: e = [] + }) => { + Lg() && e.map((([e]) => e)).filter(Boolean).filter((e => !b$(e))).forEach((e => { + const t = "PinturaFontTest-" + e.replace(/[^a-zA-Z0-9]+/g, "").toLowerCase(); + document.getElementById(t) || document.body.append(p("span", { + textContent: " ", + id: t, + class: "PinturaFontTest", + style: `font-family:${e};font-size:0;color:transparent;` + })) + })) + }, + ondestroy: () => { + if (!Lg()) return; + document.querySelectorAll(".PinturaFontTest").forEach((e => e.remove())) + }, + optionLabelStyle: e => "font-family: " + e, + options: y$(e, t), + optionFilter: e => { + if (!Lg()) return !0; + const [t] = e; + if (!t) return !0; + return b$(t) + } + }], + S$ = (e, t = {}) => ["ColorPicker", { + options: y$(e), + ...t + }], + k$ = (e, t = {}) => S$(e, { + title: e => e.labelColor, + ...t + }), + C$ = (e, t = {}) => S$(e, { + title: e => e.shapeTitleBackgroundColor, + ...t + }), + T$ = (e, t = {}) => S$(e, { + title: e => e.shapeTitleStrokeColor, + options: y$(e), + buttonClass: "PinturaColorPickerButtonStroke", + onchange: (e, o) => { + const i = o.strokeWidth; + (Eo(i) || T(i) ? parseFloat(i) : 0) > 0 || (o.strokeWidth = t && t.defaultStrokeWidth || "0.5%") + }, + ...t + }), + M$ = (e, t) => { + const { + title: o, + optionHideLabel: i = !1, + layout: r, + optionIcon: n = !1 + } = t || {}, a = Dg(e), s = e.map((([e]) => T(e) ? parseFloat(e) : e)), l = Math.max(...s), c = Math.min(...s), d = l - c; + return ["radio" === r ? "RadioGroup" : "Dropdown", { + title: !1 === o ? void 0 : o || (e => e.shapeTitleStrokeWidth), + options: e => { + const o = t ? a.map((e => { + const [t, o, r = {}] = e, a = T(t) ? parseFloat(t) : t, s = (a - c) / d; + let l = void 0; + return "line" === n ? l = `` : "dot" === n ? l = `` : T(n) ? l = n : M(n) && (l = n(a, s)), [t, o, { + icon: l, + hideLabel: i, + ...r + }] + })) : a; + return Ao(e, "backgroundColor") ? y$(o, { + defaultKey: "shapeLabelStrokeNone" + }) : y$(o) + }, + onchange: (e, t) => { + if (!e) return; + const o = t.strokeColor || []; + if (o[3]) return; + const i = [...o]; + i[3] = 1, t.strokeColor = i + } + }] + }, + R$ = (e, t) => { + const { + title: o, + layout: i + } = t || {}; + return ["radio" === i ? "RadioGroup" : "Dropdown", { + title: o, + options: y$(e) + }] + }, + P$ = (e, t, o) => ["Dropdown", { + title: e => e[t], + options: y$(e, { + defaultKey: "labelNone", + defaultOptions: { + icon: '' + } + }), + optionIconStyle: o + }], + E$ = e => P$(e, "shapeTitleLineStart", "transform: scaleX(-1)"), + I$ = e => P$(e, "shapeTitleLineEnd"), + A$ = e => S$(e, { + title: e => e.shapeTitleTextColor, + options: y$(e) + }), + L$ = e => ["Dropdown", { + title: e => e.shapeTitleFontStyle, + optionLabelStyle: e => e && `font-style:${e[0]};font-weight:${e[1]}`, + options: y$(e, { + defaultKey: "shapeLabelFontStyleNormal" + }) + }], + z$ = e => ["ShorthandControl", e], + F$ = (e, t, o, i) => { + i || e.find((([e]) => e === o)) || (i = { + defaultKey: "labelAuto", + defaultValue: o + }); + const r = Dg(e); + return ["Dropdown", { + title: t, + options: y$(r, i), + ...i + }] + }, + O$ = (e, t) => F$(e, (e => e.shapeTitleFontSize), "4%", t), + D$ = (e, t) => F$(e, (e => e.shapeTitleLineHeight), "120%", t), + B$ = e => ["RadioGroup", { + title: e => e.shapeTitleTextAlign, + options: y$(e) + }], + W$ = { + colorOptions: () => l$({ + transparent: [1, 1, 1, 0], + white: [1, 1, 1], + silver: [.8667, .8667, .8667], + gray: [.6667, .6667, .6667], + black: [0, 0, 0], + navy: [0, .1216, .2471], + blue: [0, .4549, .851], + aqua: [.498, .8588, 1], + teal: [.2235, .8, .8], + olive: [.2392, .6, .4392], + green: [.1804, .8, .251], + yellow: [1, .8627, 0], + orange: [1, .5216, .1059], + red: [1, .2549, .2118], + maroon: [.5216, .0784, .2941], + fuchsia: [.9412, .0706, .7451], + purple: [.6941, .051, .7882] + }), + lineEndStyleOptions: () => f$(["bar", "arrow", "arrowSolid", "circle", "circleSolid", "square", "squareSolid"]), + fontFamilyOptions: () => g$([ + ["Helvetica, Arial, Verdana, 'Droid Sans', sans-serif", "Sans Serif"], + ["'Arial Black', 'Avenir-Black', 'Arial Bold'", "Black"], + ["'Arial Narrow', 'Futura-CondensedMedium'", "Narrow"], + ["'Trebuchet MS'", "Humanist"], + ["Georgia, 'Avenir-Black', 'Times New Roman', 'Droid Serif', serif", "Serif"], + ["Palatino", "Old-Style"], + ["'Times New Roman', 'TimesNewRomanPSMT'", "Transitional"], + ["Menlo, Monaco, 'Lucida Console', monospace", "Monospaced"], + ["'Courier New', monospace", "Slab Serif"] + ]), + fontStyleOptions: () => $$([ + ["normal", "bold"], + ["italic", "normal"], + ["italic", "bold"] + ]), + textAlignOptions: () => ["left", "center", "right"].map((e => [e, t => t["shapeTitleTextAlign" + Ig(e)], { + hideLabel: !0, + icon: t => t["shapeIconTextAlign" + Ig(e)] + }])), + strokeWidthOptions: () => m$({ + extraSmall: "0.25%", + small: "0.5%", + mediumSmall: "1%", + medium: "1.75%", + mediumLarge: "2.5%", + large: "3.5%", + extraLarge: "5%" + }), + brushSizeOptions: () => m$(Object.entries({ + extraSmall: "0.25%", + small: "0.5%", + mediumSmall: "1%", + medium: "1.75%", + mediumLarge: "2.5%", + large: "3.5%", + extraLarge: "5%" + }).reduce(((e, [t, o]) => (e[t] = 2 * parseFloat(o) + "%", e)), {})), + fontSizeOptions: () => d$({ + extraSmall: "2%", + small: "4%", + mediumSmall: "8%", + medium: "10%", + mediumLarge: "15%", + large: "20%", + extraLarge: "25%" + }), + lineHeightOptions: () => h$({ + extraSmall: "40%", + small: "60%", + mediumSmall: "100%", + medium: "120%", + mediumLarge: "140%", + large: "180%", + extraLarge: "220%" + }) + }, + V$ = new Intl.NumberFormat("default", { + minimumFractionDigits: 1, + maximumFractionDigits: 1 + }), + _$ = (e, t) => T(t) ? e + "%" : e, + N$ = (e, t, o, i) => T(i) ? Math.round(e / o * 100) + "%" : "" + V$.format(e), + H$ = { + getValue: e => parseFloat(e), + setValue: _$, + label: N$, + step: .05, + labelClass: "PinturaPercentageLabel" + }, + j$ = { + factory: z$, + options: { + title: "Text shadow", + controls: [ + ["ToggleSlider", "x", { + ...H$, + min: -100, + max: 100, + labelPrefix: "X" + }], + ["ToggleSlider", "y", { + ...H$, + min: -100, + max: 100, + labelPrefix: "Y" + }], + ["ToggleSlider", "blur", { + ...H$, + min: 0, + max: 25, + labelPrefix: e => e.shapeTitleTextShadowBlur + }], + ["ColorPicker", "color", { + enablePresets: !1 + }] + ] + } + }, + U$ = { + defaultColor: { + factory: k$, + items: "colorOptions" + }, + defaultNumber: { + factory: x$ + }, + defaultPercentage: { + factory: x$, + options: { + getValue: e => parseFloat(e), + setValue: e => e + "%", + step: .05, + label: (e, t, o) => Math.round(e / o * 100) + "%", + labelClass: "PinturaPercentageLabel" + } + }, + backgroundColor: { + items: "colorOptions", + factory: C$ + }, + strokeColor: { + items: "colorOptions", + factory: T$ + }, + strokeWidth: { + items: "strokeWidthOptions", + factory: M$ + }, + brushSize: { + items: "brushSizeOptions", + factory: Ug + }, + drawMode: { + factory: jg + }, + lineStart: { + items: "lineEndStyleOptions", + factory: E$ + }, + lineEnd: { + items: "lineEndStyleOptions", + factory: I$ + }, + color: { + items: "colorOptions", + factory: A$ + }, + fontFamily: { + items: "fontFamilyOptions", + factory: w$ + }, + fontStyle_fontWeight: { + items: "fontStyleOptions", + factory: L$ + }, + fontSize: { + items: "fontSizeOptions", + factory: O$ + }, + lineHeight: { + items: "lineHeightOptions", + factory: D$ + }, + textAlign: { + items: "textAlignOptions", + factory: B$ + }, + textShadowX_textShadowY_textShadowBlur_textShadowColor: j$, + textOutlineWidth_textOutlineColor: { + factory: z$, + options: { + title: "Text outline", + controls: [ + ["ToggleSlider", "width", { + getValue: e => parseFloat(e), + setValue: _$, + label: N$, + min: 0, + max: 15, + step: .05, + labelClass: "PinturaPercentageLabel", + labelPrefix: e => e.shapeTitleTextOutlineWidth + }], + ["ColorPicker", "color", { + enablePresets: !1 + }] + ] + } + }, + cornerRadius: { + factory: "defaultPercentage", + options: { + min: 0, + max: 50, + title: e => e.shapeTitleCornerRadius + } + }, + frameColor: { + factory: "defaultColor" + }, + frameSize: { + factory: "defaultPercentage", + options: { + min: .2, + max: 10, + title: e => e.labelSize + } + }, + frameInset: { + factory: "defaultPercentage", + options: { + min: .5, + max: 10, + title: e => e.labelOffset + } + }, + frameOffset: { + factory: "defaultPercentage", + options: { + min: .5, + max: 10, + title: e => e.labelOffset + } + }, + frameRadius: { + factory: "defaultPercentage", + options: { + min: .5, + max: 10, + title: e => e.labelRadius + } + }, + frameAmount: { + factory: "defaultNumber", + options: { + min: 1, + max: 5, + step: 1, + title: e => e.labelAmount + } + } + }, + G$ = (e = {}) => { + const t = { + ...U$, + ...e + }, + o = {}; + return Object.entries(t).forEach((([e, i]) => { + if (!/Options$/.test(e)) + if (U$[e] && S(i) && !Lo(i)) { + const { + component: i, + factory: r, + items: n, + options: a = {} + } = t[e]; + if (T(r)) o[e] = [r, a]; + else { + const s = U$[e].items; + let l = T(s) ? t[s] || W$[s]() : void 0; + T(n) && W$[n] ? l = t[n] ? t[n].every((e => !Array.isArray(e))) ? t[n].map((e => [e, e])) : t[n] : W$[n]() : (n || a.items) && (l = n || a.items); + let c = r || U$[e].factory; + M(c) ? o[e] = l ? c(l, a) : c(a) : i && (o[e] = [i, { + ...a, + items: n + }]) + } + } else o[e] = i + })), o + }; + +function Z$(e) { + let t, o, i, r, n; + const a = e[7].default, + s = rn(a, e, e[6], null); + return { + c() { + t = kn("div"), o = kn("div"), s && s.c(), An(o, "class", "PinturaToolbarInner"), An(t, "class", "PinturaToolbar"), An(t, "data-layout", e[1]), An(t, "data-overflow", e[0]) + }, + m(a, l) { + wn(a, t, l), bn(t, o), s && s.m(o, null), i = !0, r || (n = [Pn(o, "measure", e[3]), hn($c.call(null, o)), Pn(t, "measure", e[2]), hn($c.call(null, t))], r = !0) + }, + p(e, [o]) { + s && s.p && (!i || 64 & o) && sn(s, a, e, e[6], i ? an(a, e[6], o, null) : ln(e[6]), null), (!i || 2 & o) && An(t, "data-layout", e[1]), (!i || 1 & o) && An(t, "data-overflow", e[0]) + }, + i(e) { + i || (xa(s, e), i = !0) + }, + o(e) { + va(s, e), i = !1 + }, + d(e) { + e && Sn(t), s && s.d(e), r = !1, Kr(n) + } + } +} + +function X$(e, t, o) { + let i, r, { + $$slots: n = {}, + $$scope: a + } = t, + s = 0, + l = 0, + c = 0; + const d = () => { + o(0, r = "compact" === i && s > c ? "overflow" : void 0) + }; + return e.$$set = e => { + "$$scope" in e && o(6, a = e.$$scope) + }, e.$$.update = () => { + 48 & e.$$.dirty && o(1, i = l > c ? "compact" : "default") + }, [r, i, ({ + detail: e + }) => { + const { + width: t + } = e; + o(5, c = t), d() + }, ({ + detail: e + }) => { + const { + width: t + } = e; + t > l && o(4, l = t), s = t, r || d() + }, l, c, a, n] +} +class Y$ extends Fa { + constructor(e) { + super(), za(this, e, X$, Z$, Qr, {}) + } +} + +function q$(e) { + let t, o, i, r; + const n = e[5].default, + a = rn(n, e, e[4], null); + return { + c() { + t = kn("div"), a && a.c(), An(t, "class", e[0]) + }, + m(n, s) { + wn(n, t, s), a && a.m(t, null), o = !0, i || (r = [Pn(t, "measure", (function() { + Jr(e[1] && e[3]) && (e[1] && e[3]).apply(this, arguments) + })), hn(e[2].call(null, t))], i = !0) + }, + p(i, [r]) { + e = i, a && a.p && (!o || 16 & r) && sn(a, n, e, e[4], o ? an(n, e[4], r, null) : ln(e[4]), null), (!o || 1 & r) && An(t, "class", e[0]) + }, + i(e) { + o || (xa(a, e), o = !0) + }, + o(e) { + va(a, e), o = !1 + }, + d(e) { + e && Sn(t), a && a.d(e), i = !1, Kr(r) + } + } +} + +function K$(e, t, o) { + let { + $$slots: i = {}, + $$scope: r + } = t; + const n = qn(); + let { + class: a = null + } = t; + const s = Jn("measurable"); + let l = !1; + return Zn((() => o(1, l = !0))), e.$$set = e => { + "class" in e && o(0, a = e.class), "$$scope" in e && o(4, r = e.$$scope) + }, [a, l, s, ({ + detail: e + }) => n("measure", e), r, i] +} +class J$ extends Fa { + constructor(e) { + super(), za(this, e, K$, q$, Qr, { + class: 0 + }) + } +} +const Q$ = e => ({}), + ef = e => ({}), + tf = e => ({}), + of = e => ({}), + rf = e => ({}), + nf = e => ({}); + +function af(e) { + let t, o; + const i = e[4].header, + r = rn(i, e, e[3], nf); + return { + c() { + t = kn("div"), r && r.c(), An(t, "class", "PinturaUtilHeader") + }, + m(e, i) { + wn(e, t, i), r && r.m(t, null), o = !0 + }, + p(e, t) { + r && r.p && (!o || 8 & t) && sn(r, i, e, e[3], o ? an(i, e[3], t, rf) : ln(e[3]), nf) + }, + i(e) { + o || (xa(r, e), o = !0) + }, + o(e) { + va(r, e), o = !1 + }, + d(e) { + e && Sn(t), r && r.d(e) + } + } +} + +function sf(e) { + let t, o; + const i = e[4].footer, + r = rn(i, e, e[3], ef); + return { + c() { + t = kn("div"), r && r.c(), An(t, "class", "PinturaUtilFooter") + }, + m(e, i) { + wn(e, t, i), r && r.m(t, null), o = !0 + }, + p(e, t) { + r && r.p && (!o || 8 & t) && sn(r, i, e, e[3], o ? an(i, e[3], t, Q$) : ln(e[3]), ef) + }, + i(e) { + o || (xa(r, e), o = !0) + }, + o(e) { + va(r, e), o = !1 + }, + d(e) { + e && Sn(t), r && r.d(e) + } + } +} + +function lf(e) { + let t, o, i, r, n, a, s = e[1] && af(e); + const l = e[4].main, + c = rn(l, e, e[3], of), + d = c || function(e) { + let t, o; + return t = new J$({ + props: { + class: "PinturaStage" + } + }), t.$on("measure", e[5]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p: Gr, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } + }(e); + let u = e[2] && sf(e); + return { + c() { + s && s.c(), t = Mn(), o = kn("div"), d && d.c(), i = Mn(), u && u.c(), r = Mn(), n = Rn(), An(o, "class", "PinturaUtilMain") + }, + m(l, c) { + s && s.m(l, c), wn(l, t, c), wn(l, o, c), d && d.m(o, null), e[6](o), wn(l, i, c), u && u.m(l, c), wn(l, r, c), wn(l, n, c), a = !0 + }, + p(e, [o]) { + e[1] ? s ? (s.p(e, o), 2 & o && xa(s, 1)) : (s = af(e), s.c(), xa(s, 1), s.m(t.parentNode, t)) : s && (ya(), va(s, 1, 1, (() => { + s = null + })), ba()), c && c.p && (!a || 8 & o) && sn(c, l, e, e[3], a ? an(l, e[3], o, tf) : ln(e[3]), of), e[2] ? u ? (u.p(e, o), 4 & o && xa(u, 1)) : (u = sf(e), u.c(), xa(u, 1), u.m(r.parentNode, r)) : u && (ya(), va(u, 1, 1, (() => { + u = null + })), ba()) + }, + i(e) { + a || (xa(s), xa(d, e), xa(u), xa(false), a = !0) + }, + o(e) { + va(s), va(d, e), va(u), va(false), a = !1 + }, + d(a) { + s && s.d(a), a && Sn(t), a && Sn(o), d && d.d(a), e[6](null), a && Sn(i), u && u.d(a), a && Sn(r), a && Sn(n) + } + } +} + +function cf(e, t, o) { + let { + $$slots: i = {}, + $$scope: r + } = t, { + hasHeader: n = !!t.$$slots.header + } = t, { + hasFooter: a = !!t.$$slots.footer + } = t, { + root: s + } = t; + return e.$$set = e => { + o(7, t = Xr(Xr({}, t), cn(e))), "hasHeader" in e && o(1, n = e.hasHeader), "hasFooter" in e && o(2, a = e.hasFooter), "root" in e && o(0, s = e.root), "$$scope" in e && o(3, r = e.$$scope) + }, t = cn(t), [s, n, a, r, i, function(t) { + Qn.call(this, e, t) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + s = e, o(0, s) + })) + }] +} +class df extends Fa { + constructor(e) { + super(), za(this, e, cf, lf, Qr, { + hasHeader: 1, + hasFooter: 2, + root: 0 + }) + } +} + +function uf(e) { + let t, o; + return { + c() { + t = kn("div"), An(t, "class", "PinturaRangeInputMeter"), An(t, "style", o = `transform: translateX(${e[9].x-e[11].x}px) translateY(${e[9].y-e[11].y}px)`) + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[7] + }, + p(e, i) { + 128 & i[0] && (t.innerHTML = e[7]), 512 & i[0] && o !== (o = `transform: translateX(${e[9].x-e[11].x}px) translateY(${e[9].y-e[11].y}px)`) && An(t, "style", o) + }, + d(e) { + e && Sn(t) + } + } +} + +function hf(e) { + let t, o, i, r, n, a, s, l, c, d, u, h = e[9] && uf(e); + return { + c() { + t = kn("div"), o = kn("span"), i = Mn(), r = kn("button"), n = Tn(e[1]), s = Mn(), l = kn("div"), h && h.c(), An(o, "class", "PinturaRangeInputValue"), An(r, "class", "PinturaRangeInputReset"), An(r, "type", "button"), r.disabled = a = e[0] === e[2], An(l, "class", "PinturaRangeInputInner"), An(l, "style", e[8]), An(l, "data-value-limited", e[5]), An(t, "class", "PinturaRangeInput"), An(t, "tabindex", "0") + }, + m(a, p) { + wn(a, t, p), bn(t, o), o.innerHTML = e[3], bn(t, i), bn(t, r), bn(r, n), bn(t, s), bn(t, l), h && h.m(l, null), d || (u = [Pn(r, "click", e[16]), Pn(l, "interactionstart", e[12]), Pn(l, "interactionupdate", e[14]), Pn(l, "interactionend", e[15]), Pn(l, "interactionrelease", e[13]), hn(c = hd.call(null, l, { + inertia: e[6] + })), Pn(l, "measure", e[36]), hn($c.call(null, l)), Pn(t, "wheel", e[18], { + passive: !1 + }), Pn(t, "nudge", e[19]), hn(pd.call(null, t, { + direction: "horizontal", + preventDefault: !0 + }))], d = !0) + }, + p(e, t) { + 8 & t[0] && (o.innerHTML = e[3]), 2 & t[0] && Fn(n, e[1]), 5 & t[0] && a !== (a = e[0] === e[2]) && (r.disabled = a), e[9] ? h ? h.p(e, t) : (h = uf(e), h.c(), h.m(l, null)) : h && (h.d(1), h = null), 256 & t[0] && An(l, "style", e[8]), 32 & t[0] && An(l, "data-value-limited", e[5]), c && Jr(c.update) && 64 & t[0] && c.update.call(null, { + inertia: e[6] + }) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t), h && h.d(), d = !1, Kr(u) + } + } +} + +function pf(e, t, o) { + let i, n, a, s, l, c, d, u, h, { + labelReset: p = "Reset" + } = t, + { + direction: m = "x" + } = t, + { + min: g = 0 + } = t, + { + max: $ = 1 + } = t, + { + base: f = g + } = t, + { + value: y = 0 + } = t, + { + valueLabel: b = 0 + } = t, + { + valueMin: x + } = t, + { + valueMax: v + } = t, + { + oninputstart: w = r + } = t, + { + oninputmove: S = r + } = t, + { + oninputend: k = r + } = t, + { + elasticity: C = 0 + } = t, + { + nudgeMultiplier: T + } = t, + { + step: M = 8 + } = t; + const R = Jn("isAnimated"); + on(e, R, (e => o(6, u = e))); + const P = (e, t, o) => Math.ceil((e - o) / t) * t + o; + let E, I, A; + const L = { + x: 2, + y: 0 + }, + z = (e, t, o) => `M ${e-o} ${t} a ${o} ${o} 0 1 0 0 -1`; + let F, O = void 0, + D = !1, + B = { + snap: !1, + elastic: !1 + }; + const W = (e, t, o) => { + const i = e[m] + t[m], + r = rs(i, F[1][m], F[0][m]), + n = C ? r + md(i - r, C) : r, + a = o.elastic ? n : r, + s = ce(0, 0); + return s[m] = a, V.set(s, { + hard: o.snap + }), rs(N(s, m), g, $) + }, + V = ec(); + on(e, V, (e => o(9, h = e))); + const _ = (e, t) => { + const o = .5 * (E[t] - s[t]) - (hh(e, g, $) * s[t] - .5 * s[t]); + return { + x: "x" === t ? o : 0, + y: "y" === t ? o : 0 + } + }, + N = (e, t) => { + const o = -(e[t] - .5 * E[t]) / s[t]; + return g + o * i + }, + H = V.subscribe((e => { + e && O && S(rs(N(e, m), g, $)) + })), + j = e => { + const t = [_(null != x ? x : g, m), _(null != v ? v : $, m)], + o = { + x: "x" === m ? h.x + e : 0, + y: "y" === m ? h.y + e : 0 + }, + i = rs(o[m], t[1][m], t[0][m]), + r = { + ...h, + [m]: i + }; + un(V, h = r, h); + const n = rs(N(r, m), g, $); + w(), S(n), k(n) + }; + Yn((() => { + H() + })); + return e.$$set = e => { + "labelReset" in e && o(1, p = e.labelReset), "direction" in e && o(20, m = e.direction), "min" in e && o(21, g = e.min), "max" in e && o(22, $ = e.max), "base" in e && o(2, f = e.base), "value" in e && o(0, y = e.value), "valueLabel" in e && o(3, b = e.valueLabel), "valueMin" in e && o(23, x = e.valueMin), "valueMax" in e && o(24, v = e.valueMax), "oninputstart" in e && o(25, w = e.oninputstart), "oninputmove" in e && o(26, S = e.oninputmove), "oninputend" in e && o(27, k = e.oninputend), "elasticity" in e && o(28, C = e.elasticity), "nudgeMultiplier" in e && o(29, T = e.nudgeMultiplier), "step" in e && o(30, M = e.step) + }, e.$$.update = () => { + if (6291456 & e.$$.dirty[0] && o(32, i = $ - g), 10485760 & e.$$.dirty[0] && o(34, n = null != x ? Math.max(x, g) : g), 20971520 & e.$$.dirty[0] && o(33, a = null != v ? Math.min(v, $) : $), 6291460 & e.$$.dirty[0] && o(35, l = hh(f, g, $)), 16 & e.$$.dirty[0] | 16 & e.$$.dirty[1] && E) { + const e = .5 * E.y; + let t, i = 40 * l, + r = "", + n = E.y, + a = ""; + for (let o = 0; o <= 40; o++) { + const n = L.x + 10 * o, + s = e; + r += z(n, s, o % 5 == 0 ? 2 : .75) + " ", t = n + L.x, o === i && (a = ``) + } + o(7, I = ``), o(31, A = { + x: t - 2 * L.x, + y: n + }) + } + 16 & e.$$.dirty[0] | 1 & e.$$.dirty[1] && (s = E && A), 6291456 & e.$$.dirty[0] | 12 & e.$$.dirty[1] && o(5, c = n !== g || a !== $), 32 & e.$$.dirty[0] | 12 & e.$$.dirty[1] && o(8, d = c ? function(e, t) { + const o = 1 / 40, + i = hh(e, g, $), + r = hh(t, g, $); + return `--range-mask-from:${100*ne(P(i,o,0)-.0125)}%;--range-mask-to:${100*ne(P(r,o,0)-.0125)}%` + }(n, a) : ""), 1048657 & e.$$.dirty[0] | 2 & e.$$.dirty[1] && i && E && E.x && E.y && V.set(_(y, m), { + hard: !1 === u + }) + }, [y, p, f, b, E, c, u, I, d, h, R, L, () => { + D = !1, O = tn(V), F = [_(null != x ? x : g, m), _(null != v ? v : $, m)], w() + }, () => { + D = !0 + }, ({ + detail: e + }) => { + B.snap = !D, B.elastic = !D, W(O, e.translation, B) + }, ({ + detail: e + }) => { + B.snap = !1, B.elastic = !1; + const t = W(O, e.translation, B); + if (O = void 0, F = void 0, Math.abs(t - f) < .01) return k(f); + k(t) + }, () => { + o(0, y = rs(f, n, a)), w(), k(y) + }, V, e => { + e.preventDefault(), e.stopPropagation(); + const t = yd(e) * M; + j(t) + }, ({ + detail: e + }) => { + j(e[m] * Math.abs(T || 8)) + }, m, g, $, x, v, w, S, k, C, T, M, A, i, a, n, l, e => o(4, E = (e => ce(e.width, e.height))(e.detail))] +} +class mf extends Fa { + constructor(e) { + super(), za(this, e, pf, hf, Qr, { + labelReset: 1, + direction: 20, + min: 21, + max: 22, + base: 2, + value: 0, + valueLabel: 3, + valueMin: 23, + valueMax: 24, + oninputstart: 25, + oninputmove: 26, + oninputend: 27, + elasticity: 28, + nudgeMultiplier: 29, + step: 30 + }, null, [-1, -1]) + } +} +var gf = { + [q]: e => ({ + x: e.x, + y: e.y + }), + [te]: e => ({ + x: e.x + e.width, + y: e.y + }), + [K]: e => ({ + x: e.x + e.width, + y: e.y + }), + [oe]: e => ({ + x: e.x + e.width, + y: e.y + e.height + }), + [J]: e => ({ + x: e.x, + y: e.y + e.height + }), + [ie]: e => ({ + x: e.x, + y: e.y + e.height + }), + [Q]: e => ({ + x: e.x, + y: e.y + }), + [ee]: e => ({ + x: e.x, + y: e.y + }) +}; + +function $f(e, t, o) { + const i = e.slice(); + return i[14] = t[o].key, i[15] = t[o].translate, i[16] = t[o].scale, i[17] = t[o].type, i[18] = t[o].opacity, i +} + +function ff(e, t) { + let o, i, r, n, a, s, l, c; + return { + key: e, + first: null, + c() { + o = kn("div"), An(o, "role", "button"), An(o, "aria-label", i = `Drag ${t[17]} ${t[14]}`), An(o, "tabindex", r = "edge" === t[17] ? -1 : 0), An(o, "class", "PinturaRectManipulator"), An(o, "data-direction", n = t[14]), An(o, "data-shape", a = "" + ("edge" === t[17] ? "edge" : "" + t[0])), An(o, "style", s = `--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`), this.first = o + }, + m(e, i) { + wn(e, o, i), l || (c = [Pn(o, "nudge", (function() { + Jr(t[6](t[14])) && t[6](t[14]).apply(this, arguments) + })), hn(pd.call(null, o, { + preventDefault: !0 + })), Pn(o, "interactionstart", (function() { + Jr(t[5]("resizestart", t[14])) && t[5]("resizestart", t[14]).apply(this, arguments) + })), Pn(o, "interactionupdate", (function() { + Jr(t[5]("resizemove", t[14])) && t[5]("resizemove", t[14]).apply(this, arguments) + })), Pn(o, "interactionend", (function() { + Jr(t[5]("resizeend", t[14])) && t[5]("resizeend", t[14]).apply(this, arguments) + })), hn(hd.call(null, o))], l = !0) + }, + p(e, l) { + t = e, 2 & l && i !== (i = `Drag ${t[17]} ${t[14]}`) && An(o, "aria-label", i), 2 & l && r !== (r = "edge" === t[17] ? -1 : 0) && An(o, "tabindex", r), 2 & l && n !== (n = t[14]) && An(o, "data-direction", n), 3 & l && a !== (a = "" + ("edge" === t[17] ? "edge" : "" + t[0])) && An(o, "data-shape", a), 2 & l && s !== (s = `--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`) && An(o, "style", s) + }, + d(e) { + e && Sn(o), l = !1, Kr(c) + } + } +} + +function yf(e) { + let t, o = [], + i = new Map, + r = e[1]; + const n = e => e[14]; + for (let t = 0; t < r.length; t += 1) { + let a = $f(e, r, t), + s = n(a); + i.set(s, o[t] = ff(s, a)) + } + return { + c() { + for (let e = 0; e < o.length; e += 1) o[e].c(); + t = Rn() + }, + m(e, i) { + for (let t = 0; t < o.length; t += 1) o[t].m(e, i); + wn(e, t, i) + }, + p(e, [a]) { + 99 & a && (r = e[1], o = Ma(o, a, n, 1, e, r, i, t.parentNode, Ca, ff, t, $f)) + }, + i: Gr, + o: Gr, + d(e) { + for (let t = 0; t < o.length; t += 1) o[t].d(e); + e && Sn(t) + } + } +} + +function bf(e, t, o) { + let i, r, n, a, { + rect: s = null + } = t, + { + visible: l = !1 + } = t, + { + style: c + } = t; + const d = Jn("isAnimated"); + on(e, d, (e => o(11, a = e))); + const u = ec(void 0, { + precision: 1e-4, + stiffness: .2, + damping: .4 + }); + on(e, u, (e => o(10, n = e))); + const h = ec(0, { + precision: .001 + }); + let p; + on(e, h, (e => o(9, r = e))); + const m = qn(); + return e.$$set = e => { + "rect" in e && o(7, s = e.rect), "visible" in e && o(8, l = e.visible), "style" in e && o(0, c = e.style) + }, e.$$.update = () => { + 2304 & e.$$.dirty && u.set(l ? 1 : .5, { + hard: !1 === a + }), 2304 & e.$$.dirty && h.set(l ? 1 : 0, { + hard: !1 === a + }), 1664 & e.$$.dirty && o(1, i = Object.keys(Y).map(((e, t) => { + const o = Y[e], + i = gf[o](s), + a = 1 === o.length ? "edge" : "corner", + l = "corner" === a; + return { + key: o, + type: a, + scale: { + x: /^(t|b)$/.test(o) ? s.width : l ? rs(n, .5, 1.25) : 1, + y: /^(r|l)$/.test(o) ? s.height : l ? rs(n, .5, 1.25) : 1 + }, + translate: { + x: i.x, + y: i.y + }, + opacity: r + } + }))) + }, [c, i, d, u, h, (e, t) => ({ + detail: o + }) => { + p && t !== p || "resizestart" !== e && void 0 === p || ("resizestart" === e && (p = t), "resizeend" === e && (p = void 0), m(e, { + direction: t, + translation: o && o.translation + })) + }, e => ({ + detail: t + }) => { + m("resizestart", { + direction: e, + translation: { + x: 0, + y: 0 + } + }), m("resizemove", { + direction: e, + translation: t + }), m("resizeend", { + direction: e, + translation: { + x: 0, + y: 0 + } + }) + }, s, l, r, n, a] +} +class xf extends Fa { + constructor(e) { + super(), za(this, e, bf, yf, Qr, { + rect: 7, + visible: 8, + style: 0 + }) + } +} +var vf = e => { + function t(t, o) { + e.dispatchEvent(new CustomEvent(t, { + detail: o + })) + } + const o = o => { + o.preventDefault(), e.addEventListener("gesturechange", i), e.addEventListener("gestureend", r), t("gesturedown") + }, + i = e => { + e.preventDefault(), t("gestureupdate", e.scale) + }, + r = e => { + t("gestureup", e.scale), e.preventDefault(), n() + }, + n = () => { + e.removeEventListener("gesturechange", i), e.removeEventListener("gestureend", r) + }; + return e.addEventListener("gesturestart", o), { + destroy: () => { + n(), e.removeEventListener("gesturestart", o) + } + } + }, + wf = { + [q]: J, + [K]: Q, + [J]: q, + [Q]: K, + [ee]: oe, + [te]: ie, + [oe]: ee, + [ie]: te + }, + Sf = e => { + const t = e === Q || e === K, + o = e === q || e === J; + return [e === K || e === te || e === oe, e === Q || e === ie || e === ee, e === q || e === te || e === ee, e === J || e === oe || e === ie, t, o, t || o] + }, + kf = (e, t, o, i = {}) => { + const { + target: r, + translate: n + } = t, { + aspectRatio: a, + minSize: s, + maxSize: l + } = i, c = re[wf[r]], d = be(ce(e.x, e.y), ce(c[0] * e.width, c[1] * e.height)), u = re[r], h = be(Ye(e), ce(u[0] * e.width, u[1] * e.height)), [p, m, g, $, f, y, b] = Sf(r); + let x = n.x, + v = n.y; + f ? v = 0 : y && (x = 0); + const { + inner: w, + outer: S + } = Cf(d, r, o, { + aspectRatio: a, + minSize: s, + maxSize: l + }); + let [k, C, T, M] = bt(e); + if (p ? M = d.x : m && (C = d.x), $ ? k = d.y : g && (T = d.y), p) { + const e = w.x + w.width, + t = S.x + S.width; + C = rs(h.x + x, e, t) + } else if (m) { + const e = S.x, + t = w.x; + M = rs(h.x + x, e, t) + } + if ($) { + const e = w.y + w.height, + t = S.y + S.height; + T = rs(h.y + v, e, t) + } else if (g) { + const e = S.y, + t = w.y; + k = rs(h.y + v, e, t) + } + if (M > w.x && (M = w.x), C < w.x + w.width && (C = w.x + w.width), k > w.y && (k = w.y), T < w.y + w.height && (T = w.y + w.height), M < S.x) { + const e = S.x - M; + M = S.x, C += e + } + if (C > S.x + S.width) { + const e = C - (S.x + S.width); + C = S.x + S.width, M -= e + } + if (k < S.y) { + const e = S.y - k; + k = S.y, T += e + } + if (T > S.y + S.height) { + const e = T - (S.y + S.height); + T = S.y + S.height, k -= e + } + if (a) + if (b) { + let e = C - M, + t = T - k; + f ? (t = e / a, k = d.y - .5 * t, T = d.y + .5 * t) : y && (e = t * a, M = d.x - .5 * e, C = d.x + .5 * e) + } else { + const e = ce(h.x + x - d.x, h.y + v - d.y); + r === te ? (e.x = Math.max(0, e.x), e.y = Math.min(0, e.y)) : r === oe ? (e.x = Math.max(0, e.x), e.y = Math.max(0, e.y)) : r === ie ? (e.x = Math.min(0, e.x), e.y = Math.max(0, e.y)) : r === ee && (e.x = Math.min(0, e.x), e.y = Math.min(0, e.y)); + const t = me(e), + o = me(ce(w.width, w.height)), + i = me(ce(S.width, S.height)), + n = rs(t, o, i), + s = ce(a, 1), + l = we(ge(s), n); + r === te ? (C = d.x + l.x, k = d.y - l.y) : r === oe ? (C = d.x + l.x, T = d.y + l.y) : r === ie ? (M = d.x - l.x, T = d.y + l.y) : r === ee && (M = d.x - l.x, k = d.y - l.y) + } return it(M, k, C - M, T - k) + }; +const Cf = (e, t, o, i) => { + const { + aspectRatio: r, + minSize: n, + maxSize: a + } = i, s = t === K || t === te || t === oe, l = t === Q || t === ie || t === ee, c = t === q || t === te || t === ee, d = t === J || t === oe || t === ie, u = t === Q || t === K, h = t === q || t === J, p = Ye(o); + s ? (p.x = e.x, p.width -= e.x) : l && (p.width = e.x), d ? (p.y = e.y, p.height -= e.y) : c && (p.height = e.y); + const m = ((e, t) => Xe(0, 0, e, t))(Math.min(p.width, a.width), Math.min(p.height, a.height)); + if (r) + if (u) { + const t = Math.min(e.y, o.height - e.y); + m.height = Math.min(2 * t, m.height) + } else if (h) { + const t = Math.min(e.x, o.width - e.x); + m.width = Math.min(2 * t, m.width) + } + const g = r ? ze(ft(Ke(n), r)) : n, + $ = r ? ze(yt(m, r)) : m; + let f, y, b, x; + s ? f = e.x : l && (y = e.x), d ? b = e.y : c && (x = e.y), s ? y = f + g.width : l && (f = y - g.width), d ? x = b + g.height : c && (b = x - g.height), u ? (b = e.y - .5 * g.height, x = e.y + .5 * g.height) : h && (f = e.x - .5 * g.width, y = e.x + .5 * g.width); + const v = et([ce(f, b), ce(y, x)]); + s ? y = f + $.width : l && (f = y - $.width), d ? x = b + $.height : c && (b = x - $.height), u ? (b = e.y - .5 * $.height, x = e.y + .5 * $.height) : h && (f = e.x - .5 * $.width, y = e.x + .5 * $.width), f = Math.max(o.x, f), y = Math.min(o.x + o.width, y), b = Math.max(o.y, b), x = Math.min(o.y + o.height, x); + return { + inner: v, + outer: et([ce(f, b), ce(y, x)]) + } +}; +var Tf = e => 180 * e / Math.PI; + +function Mf(e) { + let t, o, i; + return o = new mf({ + props: { + elasticity: e[5], + min: e[9], + max: e[10], + value: e[11], + valueMin: Math.max(e[9], e[0]), + valueMax: Math.min(e[10], e[1]), + labelReset: e[6], + base: e[12], + valueLabel: Math.round(Tf(e[11])) + "°", + oninputstart: e[2], + oninputmove: e[17], + oninputend: e[18] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaImageRotator") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, [t]) { + const i = {}; + 32 & t && (i.elasticity = e[5]), 512 & t && (i.min = e[9]), 1024 & t && (i.max = e[10]), 2048 & t && (i.value = e[11]), 513 & t && (i.valueMin = Math.max(e[9], e[0])), 1026 & t && (i.valueMax = Math.min(e[10], e[1])), 64 & t && (i.labelReset = e[6]), 4096 & t && (i.base = e[12]), 2048 & t && (i.valueLabel = Math.round(Tf(e[11])) + "°"), 4 & t && (i.oninputstart = e[2]), 392 & t && (i.oninputmove = e[17]), 400 & t && (i.oninputend = e[18]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Rf(e, t, o) { + let i, n, a, s, l, c, d, { + rotation: u + } = t, + { + valueMin: h + } = t, + { + valueMax: p + } = t, + { + oninputstart: m = r + } = t, + { + oninputmove: g = r + } = t, + { + oninputend: $ = r + } = t, + { + elasticity: f = 0 + } = t, + { + labelReset: y + } = t, + { + rotationMin: b + } = t, + { + rotationMax: x + } = t; + return e.$$set = e => { + "rotation" in e && o(13, u = e.rotation), "valueMin" in e && o(0, h = e.valueMin), "valueMax" in e && o(1, p = e.valueMax), "oninputstart" in e && o(2, m = e.oninputstart), "oninputmove" in e && o(3, g = e.oninputmove), "oninputend" in e && o(4, $ = e.oninputend), "elasticity" in e && o(5, f = e.elasticity), "labelReset" in e && o(6, y = e.labelReset), "rotationMin" in e && o(14, b = e.rotationMin), "rotationMax" in e && o(15, x = e.rotationMax) + }, e.$$.update = () => { + 16384 & e.$$.dirty && o(9, i = b + 1e-9), 32768 & e.$$.dirty && o(10, n = x - 1e-9), 1536 & e.$$.dirty && o(12, a = i + .5 * (n - i)), 32768 & e.$$.dirty && o(16, s = 2 * x), 8192 & e.$$.dirty && o(8, l = Math.sign(u)), 73728 & e.$$.dirty && o(7, c = Math.round(Math.abs(u) / s) * s), 8576 & e.$$.dirty && o(11, d = u - l * c) + }, [h, p, m, g, $, f, y, c, l, i, n, d, a, u, b, x, s, e => g(l * c + e), e => $(l * c + e)] +} +class Pf extends Fa { + constructor(e) { + super(), za(this, e, Rf, Mf, Qr, { + rotation: 13, + valueMin: 0, + valueMax: 1, + oninputstart: 2, + oninputmove: 3, + oninputend: 4, + elasticity: 5, + labelReset: 6, + rotationMin: 14, + rotationMax: 15 + }) + } +} + +function Ef(e) { + let t, o, i, r, n; + return { + c() { + t = kn("div"), o = kn("p"), i = Tn(e[0]), r = Tn(" × "), n = Tn(e[1]), An(t, "class", "PinturaImageInfo") + }, + m(e, a) { + wn(e, t, a), bn(t, o), bn(o, i), bn(o, r), bn(o, n) + }, + p(e, [t]) { + 1 & t && Fn(i, e[0]), 2 & t && Fn(n, e[1]) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t) + } + } +} + +function If(e, t, o) { + let { + width: i + } = t, { + height: r + } = t; + return e.$$set = e => { + "width" in e && o(0, i = e.width), "height" in e && o(1, r = e.height) + }, [i, r] +} +class Af extends Fa { + constructor(e) { + super(), za(this, e, If, Ef, Qr, { + width: 0, + height: 1 + }) + } +} + +function Lf(e) { + let t, o; + return t = new Bu({ + props: { + class: "PinturaPresetListFilter", + layout: "row", + options: e[8], + selectedIndex: e[7], + onchange: e[10] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 256 & o && (i.options = e[8]), 128 & o && (i.selectedIndex = e[7]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function zf(e) { + let t, o; + return t = new sh({ + props: { + icon: e[0], + label: e[1], + labelClass: e[2], + hideLabel: e[3], + options: e[9], + selectedIndex: e[4], + onchange: e[5], + optionMapper: e[6], + $$slots: { + controls: [Lf] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, [o]) { + const i = {}; + 1 & o && (i.icon = e[0]), 2 & o && (i.label = e[1]), 4 & o && (i.labelClass = e[2]), 8 & o && (i.hideLabel = e[3]), 512 & o && (i.options = e[9]), 16 & o && (i.selectedIndex = e[4]), 32 & o && (i.onchange = e[5]), 64 & o && (i.optionMapper = e[6]), 262528 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} +const Ff = 'fill="none" stroke="currentColor"'; + +function Of(e, t, o) { + let i, n, a, { + icon: s + } = t, + { + label: l + } = t, + { + labelClass: c + } = t, + { + hideLabel: d + } = t, + { + options: u + } = t, + { + selectedIndex: h + } = t, + { + onchange: p + } = t, + { + optionMapper: m + } = t, + { + filter: g = "landscape" + } = t, + { + onfilterchange: $ = r + } = t; + const f = (e, t, o, i, r) => `\n `, + y = (e, t) => ``; + return e.$$set = e => { + "icon" in e && o(0, s = e.icon), "label" in e && o(1, l = e.label), "labelClass" in e && o(2, c = e.labelClass), "hideLabel" in e && o(3, d = e.hideLabel), "options" in e && o(12, u = e.options), "selectedIndex" in e && o(4, h = e.selectedIndex), "onchange" in e && o(5, p = e.onchange), "optionMapper" in e && o(6, m = e.optionMapper), "filter" in e && o(11, g = e.filter), "onfilterchange" in e && o(13, $ = e.onfilterchange) + }, e.$$.update = () => { + 6144 & e.$$.dirty && o(9, i = ((e, t) => (e || []).map((e => T(e[0]) ? (e[1] = e[1].map(t), e) : t(e))))(u, (e => t => { + const [o, i, r = {}] = t; + return Eo(o) && (r.hidden = "landscape" === e ? o < 1 : o > 1), [o, i, r] + })(g))), 2048 & e.$$.dirty && o(7, n = "landscape" === g ? 0 : 1), 128 & e.$$.dirty && o(8, a = [ + ["landscape", "Landscape", { + hideLabel: !0, + icon: f(2, 6, 19, 12, 2) + (0 === n ? y(9, 12) : "") + }], + ["portrait", "Portrait", { + hideLabel: !0, + icon: f(5, 3, 13, 18, 2) + (1 === n ? y(9, 12) : "") + }] + ]) + }, [s, l, c, d, h, p, m, n, a, i, e => { + o(11, g = e.value), $(e.value) + }, g, u, $] +} +class Df extends Fa { + constructor(e) { + super(), za(this, e, Of, zf, Qr, { + icon: 0, + label: 1, + labelClass: 2, + hideLabel: 3, + options: 12, + selectedIndex: 4, + onchange: 5, + optionMapper: 6, + filter: 11, + onfilterchange: 13 + }) + } +} +const Bf = e => ye(e, (e => ne(e, 6))), + Wf = e => vt(e, (e => ne(e, 6))), + Vf = (e, t, o = 1e-4) => Math.abs(e - t) < o; +var _f = (e, t, o, i, r = {}) => { + const { + aspectRatio: n + } = r; + e = Wf(e), i = i.map(Bf); + const a = lt(e, wf[o.target]), + s = ye(a, (e => ne(e, 6))), + l = n ? ft(r.minSize, n) : r.minSize, + c = n ? yt(r.maxSize, n) : r.maxSize, + d = lt(t, o.target); + if (Te(d, a) < 1) { + t = Ye(e); + const o = Math.min(l.width / e.width, l.height / e.height); + at(t, o, a) + } + t = st(Ye(t), l, c, a); + let u = Ye(t); + t = Wf(t); + const h = Et(i, 1), + p = xt(e), + m = xt(t), + g = p.findIndex((e => fe(ye(e, (e => ne(e, 6))), s))), + $ = e => h.map((t => Ct(t, e))).filter(Boolean).pop(); + if (n) { + const t = m.map(((e, t) => { + if (t === g) return; + const o = ce(a.x - e.x, a.y - e.y); + ge(o), we(o, .5); + const i = ce(a.x - o.x, a.y - o.y), + r = je(i, Bf(e)), + n = $(r); + if (!n) return; + const s = p[t]; + return { + intersection: n, + cornerDist: Te(a, s), + intersectionDist: Te(a, n) + } + })).filter(Boolean); + if (t.length) { + const o = t.reduce(((e, t) => { + const o = t.intersectionDist / t.cornerDist; + return o < e ? o : e + }), Number.MAX_SAFE_INTEGER); + u = Ye(e), at(u, o, a) + } + } else { + const e = 1 === o.target.length, + r = !(i[0].y === i[1].y || i[0].x === i[1].x), + n = p.map(((t, o) => { + if (o === g) return; + const i = m[o], + n = !Vf(i.x, s.x) && !Vf(i.y, s.y); + if (!e && !r && n) return; + if (e && (Vf(i.x, s.x) || Vf(i.y, s.y))) return; + const l = ue(e ? t : a), + c = xe(ue(l), i); + ge(c), we(c, .5), e ? be(l, c) : xe(l, c); + const d = je(l, i), + u = $(d); + return u || void 0 + })).filter(Boolean); + if (n.length) { + const [e, i, r, l] = Sf(o.target); + let [c, d, h, p] = bt(t); + n.forEach((({ + x: t, + y: o + }) => { + const n = ne(t, 6), + a = ne(o, 6); + r && !Vf(a, s.y) && (c = Math.max(c, o)), e && !Vf(n, s.x) && (d = Math.min(d, t)), l && !Vf(a, s.y) && (h = Math.min(h, o)), i && !Vf(n, s.x) && (p = Math.max(p, t)) + })), u = Je([c, d, h, p]), at(u, .9999, a) + } + } + return st(u, l, c, a), u +}; + +function Nf(e) { + let t, o; + return t = new dp({ + props: { + items: e[11] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 2048 & o[0] && (i.items = e[11]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Hf(e) { + let t, o, i; + return o = new Y$({ + props: { + $$slots: { + default: [Nf] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "header") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 2048 & t[0] | 1 & t[7] && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function jf(e) { + let t, o; + return t = new cd({ + props: { + onclick: e[87], + label: e[4].cropLabelButtonRecenter, + icon: e[4].cropIconButtonRecenter, + class: "PinturaButtonCenter", + disabled: !e[9], + hideLabel: !0, + style: `opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)` + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.label = e[4].cropLabelButtonRecenter), 16 & o[0] && (i.icon = e[4].cropIconButtonRecenter), 512 & o[0] && (i.disabled = !e[9]), 1610612736 & o[0] && (i.style = `opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)`), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Uf(e) { + let t, o; + return t = new xf({ + props: { + rect: e[8], + visible: e[12], + style: e[1] + } + }), t.$on("resizestart", e[67]), t.$on("resizemove", e[68]), t.$on("resizeend", e[69]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 256 & o[0] && (i.rect = e[8]), 4096 & o[0] && (i.visible = e[12]), 2 & o[0] && (i.style = e[1]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Gf(e) { + let t, o; + return t = new Af({ + props: { + width: Math.round(e[13].width), + height: Math.round(e[13].height) + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8192 & o[0] && (i.width = Math.round(e[13].width)), 8192 & o[0] && (i.height = Math.round(e[13].height)), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Zf(e) { + let t, o, i, r, n, a, s, l, c = e[21] && e[10] && jf(e), + d = e[21] && Uf(e), + u = e[22] && Gf(e); + return { + c() { + t = kn("div"), o = kn("div"), c && c.c(), i = Mn(), d && d.c(), n = Mn(), u && u.c(), An(o, "class", "PinturaStage"), An(t, "slot", "main") + }, + m(h, p) { + wn(h, t, p), bn(t, o), c && c.m(o, null), bn(o, i), d && d.m(o, null), e[161](o), bn(t, n), u && u.m(t, null), a = !0, s || (l = [hn($c.call(null, o)), Pn(o, "measure", e[159]), Pn(o, "wheel", (function() { + Jr(e[2] && e[86]) && (e[2] && e[86]).apply(this, arguments) + }), { + passive: !1 + }), Pn(o, "interactionstart", e[73]), Pn(o, "interactionupdate", e[74]), Pn(o, "interactionrelease", e[76]), Pn(o, "interactionend", e[75]), hn(r = hd.call(null, o, { + drag: !0, + inertia: !0, + pinch: e[2], + shouldStartInteraction: iy, + getEventPosition: e[162] + })), Pn(o, "gesturedown", e[83]), Pn(o, "gestureupdate", e[84]), Pn(o, "gestureup", e[85]), hn(vf.call(null, o))], s = !0) + }, + p(n, a) { + (e = n)[21] && e[10] ? c ? (c.p(e, a), 2098176 & a[0] && xa(c, 1)) : (c = jf(e), c.c(), xa(c, 1), c.m(o, i)) : c && (ya(), va(c, 1, 1, (() => { + c = null + })), ba()), e[21] ? d ? (d.p(e, a), 2097152 & a[0] && xa(d, 1)) : (d = Uf(e), d.c(), xa(d, 1), d.m(o, null)) : d && (ya(), va(d, 1, 1, (() => { + d = null + })), ba()), r && Jr(r.update) && 16777220 & a[0] && r.update.call(null, { + drag: !0, + inertia: !0, + pinch: e[2], + shouldStartInteraction: iy, + getEventPosition: e[162] + }), e[22] ? u ? (u.p(e, a), 4194304 & a[0] && xa(u, 1)) : (u = Gf(e), u.c(), xa(u, 1), u.m(t, null)) : u && (ya(), va(u, 1, 1, (() => { + u = null + })), ba()) + }, + i(e) { + a || (xa(c), xa(d), xa(u), a = !0) + }, + o(e) { + va(c), va(d), va(u), a = !1 + }, + d(o) { + o && Sn(t), c && c.d(), d && d.d(), e[161](null), u && u.d(), s = !1, Kr(l) + } + } +} + +function Xf(e) { + let t, o, i, r; + const n = [{ + class: "PinturaControlList" + }, { + tabs: e[7] + }, e[18]]; + let a = { + $$slots: { + default: [Yf, ({ + tab: e + }) => ({ + 216: e + }), ({ + tab: e + }) => [0, 0, 0, 0, 0, 0, e ? 1073741824 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < n.length; e += 1) a = Xr(a, n[e]); + t = new Fc({ + props: a + }), t.$on("select", e[160]); + const s = [{ + class: "PinturaControlPanels" + }, { + panelClass: "PinturaControlPanel" + }, { + panels: e[17] + }, e[18]]; + let l = { + $$slots: { + default: [Jf, ({ + panel: e + }) => ({ + 215: e + }), ({ + panel: e + }) => [0, 0, 0, 0, 0, 0, e ? 536870912 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < s.length; e += 1) l = Xr(l, s[e]); + return i = new Zc({ + props: l + }), { + c() { + Ia(t.$$.fragment), o = Mn(), Ia(i.$$.fragment) + }, + m(e, n) { + Aa(t, e, n), wn(e, o, n), Aa(i, e, n), r = !0 + }, + p(e, o) { + const r = 262272 & o[0] ? Ra(n, [n[0], 128 & o[0] && { + tabs: e[7] + }, 262144 & o[0] && Pa(e[18])]) : {}; + 1073741824 & o[6] | 1 & o[7] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r); + const a = 393216 & o[0] ? Ra(s, [s[0], s[1], 131072 & o[0] && { + panels: e[17] + }, 262144 & o[0] && Pa(e[18])]) : {}; + 511721496 & o[0] | 536870912 & o[6] | 1 & o[7] && (a.$$scope = { + dirty: o, + ctx: e + }), i.$set(a) + }, + i(e) { + r || (xa(t.$$.fragment, e), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(t.$$.fragment, e), va(i.$$.fragment, e), r = !1 + }, + d(e) { + La(t, e), e && Sn(o), La(i, e) + } + } +} + +function Yf(e) { + let t, o, i = e[216].label + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 1073741824 & t[6] && i !== (i = e[216].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function qf(e) { + let t, o; + return t = new mf({ + props: { + elasticity: e[25] * e[43], + base: oy, + min: e[23], + max: ty, + valueMin: e[27][0], + valueMax: e[27][1], + value: e[28], + labelReset: e[4].labelReset, + valueLabel: Math.round(100 * e[28]) + "%", + oninputstart: e[80], + oninputmove: e[81], + oninputend: e[82] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 33554432 & o[0] && (i.elasticity = e[25] * e[43]), 8388608 & o[0] && (i.min = e[23]), 134217728 & o[0] && (i.valueMin = e[27][0]), 134217728 & o[0] && (i.valueMax = e[27][1]), 268435456 & o[0] && (i.value = e[28]), 16 & o[0] && (i.labelReset = e[4].labelReset), 268435456 & o[0] && (i.valueLabel = Math.round(100 * e[28]) + "%"), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Kf(e) { + let t, o; + return t = new Pf({ + props: { + elasticity: e[25] * e[43], + rotation: e[14], + labelReset: e[4].labelReset, + valueMin: e[26][0], + valueMax: e[26][1], + rotationMin: -e[3], + rotationMax: e[3], + oninputstart: e[70], + oninputmove: e[71], + oninputend: e[72] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 33554432 & o[0] && (i.elasticity = e[25] * e[43]), 16384 & o[0] && (i.rotation = e[14]), 16 & o[0] && (i.labelReset = e[4].labelReset), 67108864 & o[0] && (i.valueMin = e[26][0]), 67108864 & o[0] && (i.valueMax = e[26][1]), 8 & o[0] && (i.rotationMin = -e[3]), 8 & o[0] && (i.rotationMax = e[3]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Jf(e) { + let t, o, i, r; + const n = [Kf, qf], + a = []; + + function s(e, t) { + return e[215] === e[92] + "-rotation" ? 0 : e[215] === e[92] + "-zoom" ? 1 : -1 + } + return ~(t = s(e)) && (o = a[t] = n[t](e)), { + c() { + o && o.c(), i = Rn() + }, + m(e, o) { + ~t && a[t].m(e, o), wn(e, i, o), r = !0 + }, + p(e, r) { + let l = t; + t = s(e), t === l ? ~t && a[t].p(e, r) : (o && (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba()), ~t ? (o = a[t], o ? o.p(e, r) : (o = a[t] = n[t](e), o.c()), xa(o, 1), o.m(i.parentNode, i)) : o = null) + }, + i(e) { + r || (xa(o), r = !0) + }, + o(e) { + va(o), r = !1 + }, + d(e) { + ~t && a[t].d(e), e && Sn(i) + } + } +} + +function Qf(e) { + let t, o, i = e[19] && Xf(e); + return { + c() { + t = kn("div"), i && i.c(), An(t, "slot", "footer"), An(t, "style", e[16]) + }, + m(e, r) { + wn(e, t, r), i && i.m(t, null), o = !0 + }, + p(e, r) { + e[19] ? i ? (i.p(e, r), 524288 & r[0] && xa(i, 1)) : (i = Xf(e), i.c(), xa(i, 1), i.m(t, null)) : i && (ya(), va(i, 1, 1, (() => { + i = null + })), ba()), (!o || 65536 & r[0]) && An(t, "style", e[16]) + }, + i(e) { + o || (xa(i), o = !0) + }, + o(e) { + va(i), o = !1 + }, + d(e) { + e && Sn(t), i && i.d() + } + } +} + +function ey(e) { + let t, o, i; + + function r(t) { + e[163](t) + } + let n = { + hasHeader: e[20], + $$slots: { + footer: [Qf], + main: [Zf], + header: [Hf] + }, + $$scope: { + ctx: e + } + }; + return void 0 !== e[15] && (n.root = e[15]), t = new df({ + props: n + }), ta.push((() => Ea(t, "root", r))), t.$on("measure", e[164]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 1048576 & i[0] && (r.hasHeader = e[20]), 2146402302 & i[0] | 1 & i[7] && (r.$$scope = { + dirty: i, + ctx: e + }), !o && 32768 & i[0] && (o = !0, r.root = e[15], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} +const ty = 1, + oy = 0, + iy = (e, t) => e.target === t; + +function ry(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, T, M, R, P, E, A, L, z, F, O, D, B, W, V, _, N, U, G, Y, q, K, J, Q, ae, se, le, de, pe, $e, ye, ve, Se, ke, Ce, Te, Me, Re, Pe, Ee, Ie, Le, Oe, Be, je, Ue, Ge, Ze, Xe, qe = Gr, + Je = () => (qe(), qe = en(Qe, (e => o(12, A = e))), Qe); + e.$$.on_destroy.push((() => qe())); + let { + isActive: Qe + } = t; + Je(); + let { + stores: et + } = t, { + cropImageSelectionCornerStyle: tt = "circle" + } = t, { + cropWillRenderImageSelectionGuides: st = ((e, t) => { + const o = "rotate" == e; + return { + rows: o ? 5 : 3, + cols: o ? 5 : 3, + opacity: .25 * t + } + }) + } = t, { + cropAutoCenterImageSelectionTimeout: lt + } = t, { + cropEnableZoomMatchImageAspectRatio: ht = !0 + } = t, { + cropEnableRotateMatchImageAspectRatio: pt = "never" + } = t, { + cropEnableRotationInput: mt = !0 + } = t, { + cropEnableZoom: xt = !0 + } = t, { + cropEnableZoomInput: wt = !0 + } = t, { + cropEnableZoomAutoHide: St = !0 + } = t, { + cropEnableImageSelection: kt = !0 + } = t, { + cropEnableInfoIndicator: Ct = !1 + } = t, { + cropEnableZoomTowardsWheelPosition: Tt = !0 + } = t, { + cropEnableLimitWheelInputToCropSelection: Mt = !0 + } = t, { + cropEnableCenterImageSelection: Rt = !0 + } = t, { + cropEnableButtonRotateLeft: Pt = !0 + } = t, { + cropEnableButtonRotateRight: Et = !1 + } = t, { + cropEnableButtonFlipHorizontal: It = !0 + } = t, { + cropEnableButtonFlipVertical: At = !1 + } = t, { + cropSelectPresetOptions: Lt + } = t, { + cropEnableSelectPreset: zt = !0 + } = t, { + cropEnableFilterMatchAspectRatio: Ft = !0 + } = t, { + cropSelectPresetFilter: Ot = !1 + } = t, { + cropEnableButtonToggleCropLimit: Dt = !1 + } = t, { + cropWillRenderTools: Bt = j + } = t, { + cropActiveTransformTool: Wt = "rotation" + } = t, { + cropMinimizeToolbar: Vt = "auto" + } = t, { + cropInteractionFocus: _t = "image" + } = t, { + cropRotationRange: Nt = Z + } = t, { + cropMaskOpacity: Ht = .85 + } = t, { + locale: jt = {} + } = t; + const Ut = Jn("isAnimated"); + on(e, Ut, (e => o(138, L = e))); + const Gt = Jn("elasticityMultiplier"); + on(e, Gt, (e => o(25, Be = e))); + const Zt = Jn("redrawTrigger"); + on(e, Zt, (e => o(158, Oe = e))); + const Xt = Jn("imageIsStatic"); + on(e, Xt, (e => o(144, V = e))); + const Yt = Jn("imageStaticVisualCorners"); + on(e, Yt, (e => o(179, Ce = e))); + let qt = "idle"; + const Kt = Ba(); + on(e, Kt, (e => o(155, Ee = e))); + const Jt = () => void 0 === Se, + Qt = e => 1 / e, + eo = e => { + Ft && Ot !== e && (o(94, Ot = e), Se && 1 !== Se && to() && un(Vo, Se = Qt(Se), Se)) + }, + to = () => { + if (1 === Se || !i) return !1; + const e = Qt(Se); + return !!lu(Ee).find((([t]) => t === e)) + }, + oo = (e, t, o) => X(o) ? t.width === Math.round(e.height) || t.height === Math.round(e.width) : t.width === Math.round(e.width) || t.height === Math.round(e.height), + io = () => (Jt() || "always" === pt && to()) && ((e, t, o) => { + const i = He(_e(Ae(t), o), (e => Math.abs(Math.round(e)))), + r = Ve(i), + n = rt(e); + return fe(r, n) + })(_, ae, se) && oo(_, ae, se), + ro = e => { + if ("never" !== pt && io()) { + un(To, se += e, se); + const t = X(se), + o = t ? ae.height : ae.width, + i = t ? ae.width : ae.height; + un(Oo, _ = it(0, 0, o, i), _), Jt() || un(Vo, Se = H(o, i), Se) + } else un(To, se += e, se) + }, + { + history: no, + env: ao, + isInteracting: so, + isInteractingFraction: lo, + isTransformingImage: co, + rootRect: uo, + stageRect: ho, + utilRect: po, + utilRectPadded: mo, + rootLineColor: go, + allowPan: $o, + allowZoom: fo, + allowPlayPause: yo, + rangeInputElasticity: bo, + presentationScalar: xo, + utilTools: vo, + imagePreviewModifiers: wo, + imageOutlineOpacity: So, + imageFlipX: ko, + imageFlipY: Co, + imageRotation: To, + imageRotationRange: Mo, + imageOutputSize: Ro, + imageSelectionRect: Po, + imageSelectionRectSnapshot: Eo, + imageSelectionRectIntent: Io, + imageSelectionRectPresentation: Ao, + imageCropRectIntent: zo, + imageCropRectOrigin: Fo, + imageCropRect: Oo, + imageCropMinSize: Do, + imageCropMaxSize: Bo, + imageCropRange: Wo, + imageCropAspectRatio: Vo, + imageCropLimitToImage: _o, + imageSize: No, + imageScalar: Ho, + imageOverlayMarkup: jo, + stagePadded: Uo, + stageRecenter: Go + } = et; + let Zo; + on(e, ao, (e => o(139, z = e))), on(e, so, (e => o(143, W = e))), on(e, co, (e => o(172, J = e))), on(e, uo, (e => o(24, pe = e))), on(e, ho, (e => o(150, K = e))), on(e, mo, (e => o(147, G = e))), on(e, xo, (e => o(146, U = e))), on(e, vo, (e => o(181, Me = e))), on(e, wo, (e => o(171, D = e))), on(e, ko, (e => o(157, Le = e))), on(e, Co, (e => o(156, Ie = e))), on(e, To, (e => o(14, se = e))), on(e, Mo, (e => o(26, je = e))), on(e, Ro, (e => o(182, Re = e))), on(e, Po, (e => o(149, q = e))), on(e, Eo, (e => o(148, Y = e))), on(e, Io, (e => o(180, Te = e))), on(e, Ao, (e => o(142, B = e))), on(e, zo, (e => o(174, $e = e))), on(e, Fo, (e => o(176, ve = e))), on(e, Oo, (e => o(13, _ = e))), on(e, Do, (e => o(153, de = e))), on(e, Bo, (e => o(178, ke = e))), on(e, Wo, (e => o(175, ye = e))), on(e, Vo, (e => o(177, Se = e))), on(e, _o, (e => o(152, le = e))), on(e, No, (e => o(151, ae = e))), on(e, Ho, (e => o(145, N = e))), on(e, Uo, (e => o(141, O = e))); + const Xo = (e, t) => { + const o = { + target: e, + translate: t + }, + i = We(Ae(de), U), + r = We(Ae(ke), U); + let n = kf(Y, o, { + ...G, + x: 0, + y: 0 + }, { + aspectRatio: Se, + minSize: i, + maxSize: r + }); + if (n = ((e, t, o) => { + const [i, r, n, a] = bt(e), s = { + ...e + }; + if (i < t.y && (e.height = e.height - (t.y - i), e.y = t.y), r > t.x + t.width && (e.width = t.x + t.width - e.x), n > t.y + t.height && (e.height = t.y + t.height - e.y), a < t.x && (e.width = e.width - (t.x - a), e.x = t.x), o) { + const t = Math.min(1, s.width / e.width, s.height / e.height); + return ct(s, t) + } + return e + })(n, { + ...G, + x: 0, + y: 0 + }, Se), !le) return { + boundsLimited: n, + boundsIntent: n + }; + let a = _f(Y, n, o, Ce, { + aspectRatio: Se, + minSize: i, + maxSize: r + }); + return { + boundsLimited: a, + boundsIntent: a + } + }, + Yo = (e, t) => { + const o = { + target: e, + translate: t + }, + i = We(Ae(de), U), + r = We(Ae(ke), U), + n = ((e, t, o = {}) => { + const { + target: i, + translate: r + } = t, { + aspectRatio: n, + minSize: a + } = o, s = re[wf[i]], l = be(Ye(e), ce(s[0] * e.width, s[1] * e.height)), c = re[i], d = be(Ye(e), ce(c[0] * e.width, c[1] * e.height)), [u, h, p, m, g, $, f] = Sf(i); + let y = r.x, + b = r.y; + g ? b = 0 : $ && (y = 0); + let [x, v, w, S] = bt(e); + if (u ? S = l.x : h && (v = l.x), m ? x = l.y : p && (w = l.y), u ? v = d.x + y : h && (S = d.x + y), m ? w = d.y + b : p && (x = d.y + b), a && g && w - x < a.height) { + const e = a.height - (w - x); + x -= .5 * e, w += .5 * e + } + if (a && $ && v - S < a.width) { + const e = a.width - (v - S); + S -= .5 * e, v += .5 * e + } + if (n) + if (f) { + let e = v - S, + t = w - x; + g ? (t = e / n, x = l.y - .5 * t, w = l.y + .5 * t) : $ && (e = t * n, S = l.x - .5 * e, v = l.x + .5 * e) + } else { + const e = ce(d.x + y - l.x, d.y + b - l.y); + i === te ? (e.x = Math.max(0, e.x), e.y = Math.min(0, e.y)) : i === oe ? (e.x = Math.max(0, e.x), e.y = Math.max(0, e.y)) : i === ie ? (e.x = Math.min(0, e.x), e.y = Math.max(0, e.y)) : i === ee && (e.x = Math.min(0, e.x), e.y = Math.min(0, e.y)); + const t = me(e), + o = ce(n, 1), + r = we(ge(o), t); + i === te ? (v = l.x + r.x, x = l.y - r.y) : i === oe ? (v = l.x + r.x, w = l.y + r.y) : i === ie ? (S = l.x - r.x, w = l.y + r.y) : i === ee && (S = l.x - r.x, x = l.y - r.y) + } return it(S, x, v - S, w - x) + })(Y, o, { + aspectRatio: Se, + minSize: i + }); + return { + boundsLimited: kf(Y, o, { + ...G, + x: 0, + y: 0 + }, { + aspectRatio: Se, + minSize: i, + maxSize: r + }), + boundsIntent: n + } + }; + let qo = void 0, + Ko = void 0; + const Jo = ({ + translation: e, + scalar: t + }) => { + V && (t = 1, e = he(ue(e))); + const o = Math.min(q.width / _.width, q.height / _.height), + i = we(ue(e), 1 / o); + let r; + if (Ko) { + const t = xe(ue(Ko), e); + Ko = e, r = nt(Ye(_), t) + } else r = nt(Ye(qo), he(ue(i))), void 0 !== t && at(r, 1 / t); + un(zo, $e = r, $e), un(Oo, _ = r, _) + }, + Qo = Wa([Wo, Oo], (([e, t], o) => { + if (!t) return; + const [i, r] = e, n = ut(t); + o([ze(vt(ft(i, n), ne)), ze(vt(yt(r, n), ne))]) + })); + on(e, Qo, (e => o(173, Q = e))); + const ei = Wa([No, _o, Do, Bo, Wo, To], (([e, t, o, i, r, n], a) => { + if (!e) return; + const s = r[0], + l = r[1]; + let c, d; + t ? (c = ((e, t, o) => X(o) ? 1 - 1 / Math.min(e.height / t.width, e.width / t.height) : 1 - 1 / Math.min(e.width / t.width, e.height / t.height))(e, l, n), d = Math.min(s.width / o.width, s.height / o.height)) : (c = -1, d = 1); + a([c, d].map((e => ne(e)))) + })); + on(e, ei, (e => o(27, Ue = e))); + const ti = Wa([No, Oo, Wo, To], (([e, t, o, i], r) => { + if (!e || !t) return r(0); + let n; + const a = o[0], + s = o[1], + l = t.width, + c = t.height, + d = ut(t), + u = X(i) ? De(e.height, e.width) : e, + h = yt(u, d); + if (l <= h.width || c <= h.height) { + const e = h.width - a.width, + t = h.height - a.height; + n = 0 === e || 0 === t ? 1 : 1 - Math.min((l - a.width) / e, (c - a.height) / t) + } else { + const e = s.width - h.width, + t = s.height - h.height, + o = yt({ + width: e, + height: t + }, d); + n = -Math.min((l - h.width) / o.width, (c - h.height) / o.height) + } + r(n) + })); + on(e, ti, (e => o(28, Ge = e))); + const oi = e => { + const t = ut(qo); + let o, i, r; + const n = X(se) ? De(ae.height, ae.width) : ae, + a = yt(n, t); + if (e >= 0) { + const n = a.width - ye[0].width, + s = a.height - ye[0].height; + o = a.width - n * e, i = a.height - s * e, r = ft({ + width: o, + height: i + }, t) + } else { + const n = ye[1].width - a.width, + s = ye[1].height - a.height; + o = a.width + n * -e, i = a.height + s * -e, r = yt({ + width: o, + height: i + }, t) + } + o = r.width, i = r.height; + const s = qo.x + .5 * qo.width - .5 * o, + l = qo.y + .5 * qo.height - .5 * i; + un(Oo, _ = { + x: s, + y: l, + width: o, + height: i + }, _) + }; + let ii; + const ri = e => { + const t = at(Ye(ii), 1 / e); + un(zo, $e = t, $e), un(Oo, _ = t, _) + }; + let ni; + const ai = () => { + Go.set({}) + }; + let si; + const li = ec(0, { + precision: 1e-4 + }); + on(e, li, (e => o(29, Ze = e))); + const ci = ec(); + on(e, ci, (e => o(30, Xe = e))); + const di = Wa([Vo, Ro, Kt], (([e, t, o], r) => { + if (!i) return; + const n = lu(o), + a = [...n].map((e => e[0])).sort(((e, t) => Lo(e[0]) && !Lo(t[0]) ? 1 : -1)).find((o => { + if (Lo(o) && t) { + const [i, r] = o, n = t.width === i && t.height === r, a = e === H(i, r); + return n && a + } + return o === e + })); + if (!a) return r(void 0); + r(n.map((e => e[0])).findIndex((e => Lo(e) ? cs(e, a) : e === a))) + })); + on(e, di, (e => o(154, Pe = e))); + const ui = (e, t) => { + if (!i || -1 === e || void 0 === e) return; + const o = lu(t)[e][0]; + return o ? Lo(o) ? H(o[0], o[1]) : o : void 0 + }, + hi = Wa([go, Ao, lo], (([e, t, o], i) => { + const { + rows: r, + cols: n, + opacity: a + } = st(qt, o); + if (!t || a <= 0) return i([]); + const { + x: s, + y: l, + width: c, + height: d + } = t, u = c / n, h = d / r, p = []; + for (let t = 1; t <= r - 1; t++) { + const o = l + h * t; + p.push({ + id: "image-selection-guide-row-" + t, + points: [ce(s, o), ce(s + c, o)], + opacity: a, + strokeWidth: 1, + strokeColor: e + }) + } + for (let t = 1; t <= n - 1; t++) { + const o = s + u * t; + p.push({ + id: "image-selection-guide-col-" + t, + points: [ce(o, l), ce(o, l + d)], + opacity: a, + strokeWidth: 1, + strokeColor: e + }) + } + i(p) + })); + on(e, hi, (e => o(140, F = e))); + const pi = "crop-" + I(); + let mi, gi = pi + "-" + (mt ? Wt : "zoom"), + $i = gi, + fi = void 0; + const yi = ec(L ? 20 : 0); + on(e, yi, (e => o(137, E = e))); + return e.$$set = e => { + "isActive" in e && Je(o(0, Qe = e.isActive)), "stores" in e && o(96, et = e.stores), "cropImageSelectionCornerStyle" in e && o(1, tt = e.cropImageSelectionCornerStyle), "cropWillRenderImageSelectionGuides" in e && o(97, st = e.cropWillRenderImageSelectionGuides), "cropAutoCenterImageSelectionTimeout" in e && o(98, lt = e.cropAutoCenterImageSelectionTimeout), "cropEnableZoomMatchImageAspectRatio" in e && o(99, ht = e.cropEnableZoomMatchImageAspectRatio), "cropEnableRotateMatchImageAspectRatio" in e && o(100, pt = e.cropEnableRotateMatchImageAspectRatio), "cropEnableRotationInput" in e && o(101, mt = e.cropEnableRotationInput), "cropEnableZoom" in e && o(2, xt = e.cropEnableZoom), "cropEnableZoomInput" in e && o(102, wt = e.cropEnableZoomInput), "cropEnableZoomAutoHide" in e && o(103, St = e.cropEnableZoomAutoHide), "cropEnableImageSelection" in e && o(104, kt = e.cropEnableImageSelection), "cropEnableInfoIndicator" in e && o(105, Ct = e.cropEnableInfoIndicator), "cropEnableZoomTowardsWheelPosition" in e && o(106, Tt = e.cropEnableZoomTowardsWheelPosition), "cropEnableLimitWheelInputToCropSelection" in e && o(107, Mt = e.cropEnableLimitWheelInputToCropSelection), "cropEnableCenterImageSelection" in e && o(108, Rt = e.cropEnableCenterImageSelection), "cropEnableButtonRotateLeft" in e && o(109, Pt = e.cropEnableButtonRotateLeft), "cropEnableButtonRotateRight" in e && o(110, Et = e.cropEnableButtonRotateRight), "cropEnableButtonFlipHorizontal" in e && o(111, It = e.cropEnableButtonFlipHorizontal), "cropEnableButtonFlipVertical" in e && o(112, At = e.cropEnableButtonFlipVertical), "cropSelectPresetOptions" in e && o(113, Lt = e.cropSelectPresetOptions), "cropEnableSelectPreset" in e && o(114, zt = e.cropEnableSelectPreset), "cropEnableFilterMatchAspectRatio" in e && o(115, Ft = e.cropEnableFilterMatchAspectRatio), "cropSelectPresetFilter" in e && o(94, Ot = e.cropSelectPresetFilter), "cropEnableButtonToggleCropLimit" in e && o(116, Dt = e.cropEnableButtonToggleCropLimit), "cropWillRenderTools" in e && o(117, Bt = e.cropWillRenderTools), "cropActiveTransformTool" in e && o(118, Wt = e.cropActiveTransformTool), "cropMinimizeToolbar" in e && o(119, Vt = e.cropMinimizeToolbar), "cropInteractionFocus" in e && o(120, _t = e.cropInteractionFocus), "cropRotationRange" in e && o(3, Nt = e.cropRotationRange), "cropMaskOpacity" in e && o(121, Ht = e.cropMaskOpacity), "locale" in e && o(4, jt = e.locale) + }, e.$$.update = () => { + 4096 & e.$$.dirty[0] | 134217728 & e.$$.dirty[3] && Xt.set("selection" === _t && A), 1048576 & e.$$.dirty[3] && o(128, i = Lt && Array.isArray(Lt) && Lt.length), 1048576 & e.$$.dirty[3] | 16 & e.$$.dirty[4] && Kt.set(i ? Lt : []), 4096 & e.$$.dirty[0] && A && So.set(1), 4096 & e.$$.dirty[0] && $o.set(!A), 4096 & e.$$.dirty[0] && fo.set(!A), 4096 & e.$$.dirty[0] && A && yo.set(!0), 32768 & e.$$.dirty[4] && o(123, p = "overlay" === z.layoutMode), 1075838976 & e.$$.dirty[3] && o(127, v = zt && !p), 41943040 & e.$$.dirty[4] && o(136, l = G && q && gt(G, q)), 33558528 & e.$$.dirty[4] && o(134, c = !(!q || !l)), 33559552 & e.$$.dirty[4] && o(132, d = c && dt(q, l, (e => ne(e, 5)))), 16400 & e.$$.dirty[0] | 26148866 & e.$$.dirty[3] | 2013298968 & e.$$.dirty[4] | 15 & e.$$.dirty[5] && o(11, r = Oe && Bt([Pt && ["Button", "rotate-left", { + label: jt.cropLabelButtonRotateLeft, + labelClass: "PinturaToolbarContentWide", + icon: jt.cropIconButtonRotateLeft, + onclick: () => { + ro(-Math.PI / 2), no.write() + } + }], Et && ["Button", "rotate-right", { + label: jt.cropLabelButtonRotateRight, + labelClass: "PinturaToolbarContentWide", + icon: jt.cropIconButtonRotateRight, + onclick: () => { + ro(Math.PI / 2), no.write() + } + }], It && ["Button", "flip-horizontal", { + label: jt.cropLabelButtonFlipHorizontal, + labelClass: "PinturaToolbarContentWide", + icon: jt.cropIconButtonFlipHorizontal, + onclick: () => { + X(se) ? un(Co, Ie = !Ie, Ie) : un(ko, Le = !Le, Le), no.write() + } + }], At && ["Button", "flip-vertical", { + label: jt.cropLabelButtonFlipVertical, + labelClass: "PinturaToolbarContentWide", + icon: jt.cropIconButtonFlipVertical, + onclick: () => { + X(se) ? un(ko, Le = !Le, Le) : un(Co, Ie = !Ie, Ie), no.write() + } + }], v && i && [!1 === Ot ? "Dropdown" : Df, "select-preset", { + icon: du(jt.cropIconSelectPreset, jt, ui(Pe, Ee)), + label: du(jt.cropLabelSelectPreset, jt, ui(Pe, Ee)), + labelClass: "PinturaToolbarContentWide", + options: Ee, + filter: Ot, + onfilterchange: eo, + selectedIndex: Pe, + onchange: ({ + value: e + }) => { + Lo(e) ? (un(Vo, Se = H(e[0], e[1]), Se), un(Ro, Re = Fe(e), Re)) : un(Vo, Se = e, Se), d && ai(), no.write() + }, + optionMapper: e => { + let t = !1; + const o = Lo(e.value) ? e.value[0] / e.value[1] : e.value; + if (o) { + const e = ts(ae, se, o); + t = e.width < de.width || e.height < de.height + } + return e.icon = ((e, t = {}) => { + const { + width: o = 24, + height: i = 24, + bounds: r = 16, + radius: n = 3 + } = t; + let a, s, l, c, d = Lo(e) ? H(e[0], e[1]) : e, + u = !!d; + return d = u ? d : 1, l = d > 1 ? r : d * r, c = l / d, a = Math.round(.5 * (o - l)), s = Math.round(.5 * (i - c)), `` + })(e.value, { + bounds: 14 + }), { + ...e, + disabled: t + } + } + }], Dt && ["Dropdown", "select-crop-limit", { + icon: du(jt.cropIconCropBoundary, jt, le), + label: jt.cropLabelCropBoundary, + labelClass: "PinturaToolbarContentWide", + onchange: ({ + value: e + }) => { + un(_o, le = e, le), no.write() + }, + options: [ + [!0, jt.cropLabelCropBoundaryEdge, { + icon: du(jt.cropIconCropBoundary, jt, !0) + }], + [!1, jt.cropLabelCropBoundaryNone, { + icon: du(jt.cropIconCropBoundary, jt, !1) + }] + ] + }]].filter(Boolean), z, (() => Zt.set({}))).filter(Boolean)), 6144 & e.$$.dirty[0] | 1140850688 & e.$$.dirty[3] | 32768 & e.$$.dirty[4] && un(vo, Me = A && "never" !== Vt && ("always" === Vt || "short" === z.verticalSpace || p) ? r.map((([e, t, o]) => Array.isArray(o) ? [e, t, o] : [e, t, { + ...o, + hideLabel: !0 + }])) : [], Me), 268435456 & e.$$.dirty[4] && o(23, n = le ? 0 : -1), 75497472 & e.$$.dirty[4] && o(129, a = G && ce(-(K.x - G.x), -(K.y - G.y))), 262176 & e.$$.dirty[4] && o(130, s = B && ce(Hd(B.x + .5 * B.width + a.x), Hd(B.y + .5 * B.height + a.y))), 16777216 & e.$$.dirty[4] && o(133, u = null != Y), 8392704 & e.$$.dirty[4] && o(135, h = G && l && (l.height === G.height || l.width === G.width)), 6293504 & e.$$.dirty[4] && o(131, m = !h && U < 1 && N < 1), 1920 & e.$$.dirty[4] && o(9, g = c && !u && (!d || m)), 8192 & e.$$.dirty[0] | 1073745920 & e.$$.dirty[3] && o(22, $ = Ct && !!_ && !p), 262176 & e.$$.dirty[4] && o(8, b = B && a && { + x: B.x + a.x, + y: B.y + a.y, + width: B.width, + height: B.height + }), 256 & e.$$.dirty[0] | 1073743872 & e.$$.dirty[3] && o(21, f = kt && !!b && !p), 32800 & e.$$.dirty[3] | 1048640 & e.$$.dirty[4] && o(10, y = Rt && !!s && !lt && !V), 512 & e.$$.dirty[0] | 536870944 & e.$$.dirty[3] | 524288 & e.$$.dirty[4] && g && lt && !W && (clearTimeout(si), o(122, si = setTimeout(ai, lt))), 536870912 & e.$$.dirty[3] | 524288 & e.$$.dirty[4] && W && clearTimeout(si), 1536 & e.$$.dirty[0] | 16384 & e.$$.dirty[4] && li.set(y && g ? 1 : 0, { + hard: !1 === L + }), 16448 & e.$$.dirty[4] && ci.set(s, { + hard: !1 === L + }), 4096 & e.$$.dirty[0] | 131072 & e.$$.dirty[4] && (A && !O ? (un(wo, D.crop = { + maskOpacity: Ht, + maskMarkupOpacity: Ht + }, D), wo.set(D)) : (delete D.crop, wo.set(D))), 65536 & e.$$.dirty[4] && F && jo.update((e => { + const t = e.filter((e => !/^image\-selection\-guide/.test(e.id))); + return A ? [...t, ...F] : t + })), 32768 & e.$$.dirty[4] && o(126, x = "short" !== z.verticalSpace), 1140850688 & e.$$.dirty[3] | 4 & e.$$.dirty[4] && o(20, w = "never" === Vt && !p || x && "always" !== Vt), 4 & e.$$.dirty[0] | 512 & e.$$.dirty[3] && o(125, S = xt && wt), 1024 & e.$$.dirty[3] | 6 & e.$$.dirty[4] && o(124, k = St ? x && S : S), 256 & e.$$.dirty[3] | 1 & e.$$.dirty[4] && o(19, C = mt || k), 1 & e.$$.dirty[4] && (k || o(5, $i = gi)), 32 & e.$$.dirty[0] && o(18, T = { + name: pi, + selected: $i + }), 16 & e.$$.dirty[0] | 256 & e.$$.dirty[3] | 1 & e.$$.dirty[4] && o(7, M = [mt && { + id: pi + "-rotation", + label: jt.cropLabelTabRotation + }, k && { + id: pi + "-zoom", + label: jt.cropLabelTabZoom + }].filter(Boolean)), 128 & e.$$.dirty[0] && o(17, R = M.map((e => e.id))), 64 & e.$$.dirty[0] | 1073741824 & e.$$.dirty[3] && mi && !mi.children.length && p && mi.dispatchEvent(new CustomEvent("measure", { + detail: mi.rect + })), 4096 & e.$$.dirty[0] | 16384 & e.$$.dirty[4] && L && yi.set(A ? 0 : 20), 8192 & e.$$.dirty[4] && o(16, P = E ? `transform: translateY(${E}px)` : void 0) + }, [Qe, tt, xt, Nt, jt, $i, mi, M, b, g, y, r, A, _, se, fi, P, R, T, C, w, f, $, n, pe, Be, je, Ue, Ge, Ze, Xe, Ut, Gt, Zt, Xt, Yt, Kt, ao, so, co, uo, ho, mo, bo, xo, vo, wo, ko, Co, To, Mo, Ro, Po, Eo, Io, Ao, zo, Fo, Oo, Do, Bo, Wo, Vo, _o, No, Ho, Uo, () => { + qt = "select", un(so, W = !0, W), un(Eo, Y = Ye(q), Y), Zo = V ? Xo : Yo + }, ({ + detail: e + }) => { + const { + boundsLimited: t, + boundsIntent: o + } = Zo(e.direction, e.translation); + un(co, J = !0, J), un(Io, Te = o, Te), un(Po, q = t, q) + }, ({ + detail: e + }) => { + const { + boundsLimited: t + } = Zo(e.direction, e.translation); + un(co, J = !1, J), un(so, W = !1, W), un(Io, Te = void 0, Te), me(e.translation) && (un(Po, q = t, q), no.write()), un(Eo, Y = void 0, Y), qt = void 0 + }, () => { + qt = "rotate", un(so, W = !0, W), un(Fo, ve = Ye(_), ve) + }, e => { + un(co, J = !0, J), un(To, se = e, se) + }, e => { + un(co, J = !1, J), un(so, W = !1, W), un(To, se = e, se), no.write(), un(Fo, ve = void 0, ve) + }, () => { + qt = "pan", Ko = void 0, un(so, W = !0, W), qo = Ye(_) + }, ({ + detail: e + }) => { + un(co, J = !0, J), Jo(e) + }, ({ + detail: e + }) => { + un(co, J = !1, J), un(so, W = !1, W), (me(e.translation) > 0 || 0 !== e.scalar) && (Jo(e), no.write()), un(zo, $e = void 0, $e), qo = void 0 + }, ({ + detail: { + translation: e + } + }) => { + V && (e = he(ue(e))), Ko = e, un(so, W = !1, W) + }, Qo, ei, ti, () => { + qt = "zoom", un(so, W = !0, W), qo = Ye(_) + }, e => { + un(co, J = !1, J), oi(e) + }, e => { + oi(e), no.write(), un(co, J = !1, J), un(so, W = !1, W), qo = void 0 + }, () => { + qt = "zoom", qo || (ii = Ye(_), un(so, W = !0, W)) + }, ({ + detail: e + }) => { + ii && (un(co, J = !0, J), ri(e)) + }, ({ + detail: e + }) => { + ii && (un(co, J = !1, J), un(so, W = !1, W), ri(e), un(zo, $e = void 0, $e), ii = void 0, no.write()) + }, e => { + const t = Bp(e, pe, K); + if (Mt && !$t(q, t)) return; + qt = "zoom", un(so, W = !0, W), un(co, J = !0, J), e.preventDefault(), e.stopPropagation(); + const o = yd(e), + i = 1 + o / 100, + r = Ye(_), + n = 1 === Math.min(_.width / de.width, _.height / de.height); + if (ht && le) { + const e = oo(_, ae, se); + if (Jt() && e && o > 0 && d) { + un(so, W = !1, W), un(co, J = !1, J); + const e = X(se) ? Ke({ + height: ae.width, + width: ae.height + }) : Ke(ae); + if (dt(r, e)) return; + if (clearTimeout(ni), dt(no.state.crop, e)) return; + return un(Oo, _ = e, _), void no.write() + } + } + let a = rt(_); + if (Tt && "selection" !== _t && o < 0 && !n) { + const e = xe(ue(t), q), + o = Math.min(q.width / _.width, q.height / _.height), + i = at(Ye(q), 1.1); + a = $t(i, t) ? be(Ye(_), we(e, 1 / o)) : a + } + let s = at(Ye(_), i, a); + if (Ne(Q[1], s) || (s = ot(rt(s), Q[1])), Ne(s, Q[0]) || (s = ot(rt(s), Q[0])), dt(r, s, ne)) return un(so, W = !1, W), void un(co, J = !1, J); + un(Oo, _ = vt(s, (e => ne(e, 5))), _), un(so, W = !1, W), un(co, J = !1, J), clearTimeout(ni), ni = setTimeout((() => { + no.write() + }), 500) + }, ai, li, ci, di, hi, pi, yi, Ot, "crop", et, st, lt, ht, pt, mt, wt, St, kt, Ct, Tt, Mt, Rt, Pt, Et, It, At, Lt, zt, Ft, Dt, Bt, Wt, Vt, _t, Ht, si, p, k, S, x, v, i, a, s, m, d, u, c, h, l, E, L, z, F, O, B, W, V, N, U, G, Y, q, K, ae, le, de, Pe, Ee, Ie, Le, Oe, function(t) { + Qn.call(this, e, t) + }, ({ + detail: e + }) => o(5, $i = e), function(e) { + ta[e ? "unshift" : "push"]((() => { + mi = e, o(6, mi) + })) + }, e => Dp(e), function(e) { + fi = e, o(15, fi) + }, function(t) { + Qn.call(this, e, t) + }] +} +var ny = { + util: ["crop", class extends Fa { + constructor(e) { + super(), za(this, e, ry, ey, Qr, { + name: 95, + isActive: 0, + stores: 96, + cropImageSelectionCornerStyle: 1, + cropWillRenderImageSelectionGuides: 97, + cropAutoCenterImageSelectionTimeout: 98, + cropEnableZoomMatchImageAspectRatio: 99, + cropEnableRotateMatchImageAspectRatio: 100, + cropEnableRotationInput: 101, + cropEnableZoom: 2, + cropEnableZoomInput: 102, + cropEnableZoomAutoHide: 103, + cropEnableImageSelection: 104, + cropEnableInfoIndicator: 105, + cropEnableZoomTowardsWheelPosition: 106, + cropEnableLimitWheelInputToCropSelection: 107, + cropEnableCenterImageSelection: 108, + cropEnableButtonRotateLeft: 109, + cropEnableButtonRotateRight: 110, + cropEnableButtonFlipHorizontal: 111, + cropEnableButtonFlipVertical: 112, + cropSelectPresetOptions: 113, + cropEnableSelectPreset: 114, + cropEnableFilterMatchAspectRatio: 115, + cropSelectPresetFilter: 94, + cropEnableButtonToggleCropLimit: 116, + cropWillRenderTools: 117, + cropActiveTransformTool: 118, + cropMinimizeToolbar: 119, + cropInteractionFocus: 120, + cropRotationRange: 3, + cropMaskOpacity: 121, + locale: 4 + }, null, [-1, -1, -1, -1, -1, -1, -1, -1]) + } + get name() { + return this.$$.ctx[95] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get stores() { + return this.$$.ctx[96] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get cropImageSelectionCornerStyle() { + return this.$$.ctx[1] + } + set cropImageSelectionCornerStyle(e) { + this.$$set({ + cropImageSelectionCornerStyle: e + }), pa() + } + get cropWillRenderImageSelectionGuides() { + return this.$$.ctx[97] + } + set cropWillRenderImageSelectionGuides(e) { + this.$$set({ + cropWillRenderImageSelectionGuides: e + }), pa() + } + get cropAutoCenterImageSelectionTimeout() { + return this.$$.ctx[98] + } + set cropAutoCenterImageSelectionTimeout(e) { + this.$$set({ + cropAutoCenterImageSelectionTimeout: e + }), pa() + } + get cropEnableZoomMatchImageAspectRatio() { + return this.$$.ctx[99] + } + set cropEnableZoomMatchImageAspectRatio(e) { + this.$$set({ + cropEnableZoomMatchImageAspectRatio: e + }), pa() + } + get cropEnableRotateMatchImageAspectRatio() { + return this.$$.ctx[100] + } + set cropEnableRotateMatchImageAspectRatio(e) { + this.$$set({ + cropEnableRotateMatchImageAspectRatio: e + }), pa() + } + get cropEnableRotationInput() { + return this.$$.ctx[101] + } + set cropEnableRotationInput(e) { + this.$$set({ + cropEnableRotationInput: e + }), pa() + } + get cropEnableZoom() { + return this.$$.ctx[2] + } + set cropEnableZoom(e) { + this.$$set({ + cropEnableZoom: e + }), pa() + } + get cropEnableZoomInput() { + return this.$$.ctx[102] + } + set cropEnableZoomInput(e) { + this.$$set({ + cropEnableZoomInput: e + }), pa() + } + get cropEnableZoomAutoHide() { + return this.$$.ctx[103] + } + set cropEnableZoomAutoHide(e) { + this.$$set({ + cropEnableZoomAutoHide: e + }), pa() + } + get cropEnableImageSelection() { + return this.$$.ctx[104] + } + set cropEnableImageSelection(e) { + this.$$set({ + cropEnableImageSelection: e + }), pa() + } + get cropEnableInfoIndicator() { + return this.$$.ctx[105] + } + set cropEnableInfoIndicator(e) { + this.$$set({ + cropEnableInfoIndicator: e + }), pa() + } + get cropEnableZoomTowardsWheelPosition() { + return this.$$.ctx[106] + } + set cropEnableZoomTowardsWheelPosition(e) { + this.$$set({ + cropEnableZoomTowardsWheelPosition: e + }), pa() + } + get cropEnableLimitWheelInputToCropSelection() { + return this.$$.ctx[107] + } + set cropEnableLimitWheelInputToCropSelection(e) { + this.$$set({ + cropEnableLimitWheelInputToCropSelection: e + }), pa() + } + get cropEnableCenterImageSelection() { + return this.$$.ctx[108] + } + set cropEnableCenterImageSelection(e) { + this.$$set({ + cropEnableCenterImageSelection: e + }), pa() + } + get cropEnableButtonRotateLeft() { + return this.$$.ctx[109] + } + set cropEnableButtonRotateLeft(e) { + this.$$set({ + cropEnableButtonRotateLeft: e + }), pa() + } + get cropEnableButtonRotateRight() { + return this.$$.ctx[110] + } + set cropEnableButtonRotateRight(e) { + this.$$set({ + cropEnableButtonRotateRight: e + }), pa() + } + get cropEnableButtonFlipHorizontal() { + return this.$$.ctx[111] + } + set cropEnableButtonFlipHorizontal(e) { + this.$$set({ + cropEnableButtonFlipHorizontal: e + }), pa() + } + get cropEnableButtonFlipVertical() { + return this.$$.ctx[112] + } + set cropEnableButtonFlipVertical(e) { + this.$$set({ + cropEnableButtonFlipVertical: e + }), pa() + } + get cropSelectPresetOptions() { + return this.$$.ctx[113] + } + set cropSelectPresetOptions(e) { + this.$$set({ + cropSelectPresetOptions: e + }), pa() + } + get cropEnableSelectPreset() { + return this.$$.ctx[114] + } + set cropEnableSelectPreset(e) { + this.$$set({ + cropEnableSelectPreset: e + }), pa() + } + get cropEnableFilterMatchAspectRatio() { + return this.$$.ctx[115] + } + set cropEnableFilterMatchAspectRatio(e) { + this.$$set({ + cropEnableFilterMatchAspectRatio: e + }), pa() + } + get cropSelectPresetFilter() { + return this.$$.ctx[94] + } + set cropSelectPresetFilter(e) { + this.$$set({ + cropSelectPresetFilter: e + }), pa() + } + get cropEnableButtonToggleCropLimit() { + return this.$$.ctx[116] + } + set cropEnableButtonToggleCropLimit(e) { + this.$$set({ + cropEnableButtonToggleCropLimit: e + }), pa() + } + get cropWillRenderTools() { + return this.$$.ctx[117] + } + set cropWillRenderTools(e) { + this.$$set({ + cropWillRenderTools: e + }), pa() + } + get cropActiveTransformTool() { + return this.$$.ctx[118] + } + set cropActiveTransformTool(e) { + this.$$set({ + cropActiveTransformTool: e + }), pa() + } + get cropMinimizeToolbar() { + return this.$$.ctx[119] + } + set cropMinimizeToolbar(e) { + this.$$set({ + cropMinimizeToolbar: e + }), pa() + } + get cropInteractionFocus() { + return this.$$.ctx[120] + } + set cropInteractionFocus(e) { + this.$$set({ + cropInteractionFocus: e + }), pa() + } + get cropRotationRange() { + return this.$$.ctx[3] + } + set cropRotationRange(e) { + this.$$set({ + cropRotationRange: e + }), pa() + } + get cropMaskOpacity() { + return this.$$.ctx[121] + } + set cropMaskOpacity(e) { + this.$$set({ + cropMaskOpacity: e + }), pa() + } + get locale() { + return this.$$.ctx[4] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + }] +}; + +function ay(e) { + let t, o, i, r, n, a, s, l = e[77], + c = (M(e[77].label) ? e[77].label(e[2]) : e[77].label) + ""; + + function d(...t) { + return e[51](e[77], ...t) + } + const u = () => e[52](o, l), + h = () => e[52](null, l); + return { + c() { + t = kn("div"), o = kn("div"), i = Mn(), r = kn("span"), n = Tn(c), An(o, "class", dy), An(t, "slot", "option"), An(t, "class", "PinturaFilterOption") + }, + m(e, l) { + wn(e, t, l), bn(t, o), u(), bn(t, i), bn(t, r), bn(r, n), a || (s = [Pn(o, "measure", d), hn($c.call(null, o))], a = !0) + }, + p(t, o) { + l !== (e = t)[77] && (h(), l = e[77], u()), 4 & o[0] | 32768 & o[2] && c !== (c = (M(e[77].label) ? e[77].label(e[2]) : e[77].label) + "") && Fn(n, c) + }, + d(e) { + e && Sn(t), h(), a = !1, Kr(s) + } + } +} + +function sy(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[2], + layout: "row", + options: e[3], + selectedIndex: e[12], + onchange: e[32], + $$slots: { + option: [ay, ({ + option: e + }) => ({ + 77: e + }), ({ + option: e + }) => [0, 0, e ? 32768 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 4 & o[0] && (i.locale = e[2]), 8 & o[0] && (i.options = e[3]), 4096 & o[0] && (i.selectedIndex = e[12]), 1028 & o[0] | 98304 & o[2] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function ly(e) { + let t, o, i, r, n, a, s, l; + + function c(t) { + e[54](t) + } + + function d(t) { + e[55](t) + } + + function u(t) { + e[56](t) + } + let h = { + elasticity: e[13] * e[19], + onscroll: e[53], + $$slots: { + default: [sy] + }, + $$scope: { + ctx: e + } + }; + return void 0 !== e[4] && (h.maskFeatherStartOpacity = e[4]), void 0 !== e[5] && (h.maskFeatherEndOpacity = e[5]), void 0 !== e[6] && (h.maskFeatherSize = e[6]), o = new vd({ + props: h + }), ta.push((() => Ea(o, "maskFeatherStartOpacity", c))), ta.push((() => Ea(o, "maskFeatherEndOpacity", d))), ta.push((() => Ea(o, "maskFeatherSize", u))), o.$on("measure", e[57]), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "footer"), An(t, "style", e[11]) + }, + m(i, r) { + wn(i, t, r), Aa(o, t, null), a = !0, s || (l = [Pn(t, "transitionend", e[30]), Pn(t, "measure", e[58]), hn($c.call(null, t, { + observePosition: !0 + }))], s = !0) + }, + p(e, s) { + const l = {}; + 8192 & s[0] && (l.elasticity = e[13] * e[19]), 128 & s[0] && (l.onscroll = e[53]), 5132 & s[0] | 65536 & s[2] && (l.$$scope = { + dirty: s, + ctx: e + }), !i && 16 & s[0] && (i = !0, l.maskFeatherStartOpacity = e[4], ca((() => i = !1))), !r && 32 & s[0] && (r = !0, l.maskFeatherEndOpacity = e[5], ca((() => r = !1))), !n && 64 & s[0] && (n = !0, l.maskFeatherSize = e[6], ca((() => n = !1))), o.$set(l), (!a || 2048 & s[0]) && An(t, "style", e[11]) + }, + i(e) { + a || (xa(o.$$.fragment, e), a = !0) + }, + o(e) { + va(o.$$.fragment, e), a = !1 + }, + d(e) { + e && Sn(t), La(o), s = !1, Kr(l) + } + } +} + +function cy(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [ly] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[59]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16380 & o[0] | 65536 & o[2] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} +let dy = "PinturaFilterPreview"; + +function uy(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S = Gr, + k = () => (S(), S = en(P, (e => o(43, d = e))), P), + C = Gr, + T = () => (C(), C = en(R, (e => o(49, b = e))), R); + e.$$.on_destroy.push((() => S())), e.$$.on_destroy.push((() => C())); + let { + isActive: R + } = t; + T(); + let { + isActiveFraction: P + } = t; + k(); + let { + stores: E + } = t, { + locale: I + } = t, { + filterFunctions: A + } = t, { + filterOptions: L + } = t; + const z = Jn("elasticityMultiplier"); + on(e, z, (e => o(13, w = e))); + const { + history: F, + interfaceImages: O, + stageRectBase: D, + utilRect: B, + animation: W, + scrollElasticity: V, + imageSize: _, + imagePreview: N, + imageCropRect: H, + imageRotation: j, + imageFlipX: U, + imageFlipY: G, + imageBackgroundColor: Z, + imageGamma: X, + imageColorMatrix: Y, + allowPan: q, + allowZoom: K, + allowZoomControls: J, + allowPlayPause: Q + } = E; + on(e, O, (e => o(60, u = e))), on(e, D, (e => o(48, y = e))), on(e, B, (e => o(47, f = e))), on(e, W, (e => o(50, x = e))), on(e, _, (e => o(62, p = e))), on(e, N, (e => o(42, c = e))), on(e, Z, (e => o(61, h = e))), on(e, X, (e => o(44, m = e))), on(e, Y, (e => o(40, s = e))); + const ee = Ba({}); + on(e, ee, (e => o(46, $ = e))); + const te = (e, t) => un(ee, $[e.value] = t, $), + oe = Wa(ee, (e => { + if (!e[void 0]) return; + const t = e[void 0]; + return v && Be(v, t) ? v : Ae(t) + })); + on(e, oe, (e => o(63, v = e))); + const ie = Wa([R, oe, H, _, j, U, G], (([e, t, o, i, r, n, a], s) => { + if (!e || !t || !i) return g; + const l = Ke(i), + c = rt(l), + d = is(i, o, r), + u = rt(d), + h = xe(ue(c), u), + p = he(ue(h)), + m = Math.max(t.width / o.width, t.height / o.height); + s({ + origin: p, + translation: h, + rotation: { + x: a ? Math.PI : 0, + y: n ? Math.PI : 0, + z: r + }, + scale: m + }) + })); + on(e, ie, (e => o(45, g = e))); + const re = ec(x ? 20 : 0); + let ne; + on(e, re, (e => o(39, a = e))); + const ae = {}; + let se, le, de, pe, me, ge, $e = { + x: 0, + y: 0 + }; + const fe = Ba([]); + on(e, fe, (e => o(41, l = e))); + const ye = e => { + const t = { + ...e, + data: c, + size: p, + offset: { + ...e.offset + }, + mask: { + ...e.mask + }, + backgroundColor: h + }; + return t.opacity = d, t.offset.y += a, t.mask.y += a, t.id = "filter", t + }, + be = () => u.filter((e => "filter" !== e.id)); + Yn((() => { + O.set([]) + })); + return e.$$set = e => { + "isActive" in e && T(o(0, R = e.isActive)), "isActiveFraction" in e && k(o(1, P = e.isActiveFraction)), "stores" in e && o(34, E = e.stores), "locale" in e && o(2, I = e.locale), "filterFunctions" in e && o(35, A = e.filterFunctions), "filterOptions" in e && o(3, L = e.filterOptions) + }, e.$$.update = () => { + if (262144 & e.$$.dirty[1] && q.set(b), 262144 & e.$$.dirty[1] && K.set(b), 262144 & e.$$.dirty[1] && J.set(b), 262144 & e.$$.dirty[1] && b && Q.set(!1), 8 & e.$$.dirty[0] && o(38, i = lu(L)), 640 & e.$$.dirty[1] && o(12, r = ((e, t) => { + if (!e || !e.filter || !t) return 0; + const o = e.filter; + return t.findIndex((([e]) => { + if (!A[e]) return !1; + const t = A[e](); + return cs(t, o) + })) + })(s, i)), 786432 & e.$$.dirty[1] && x && re.set(b ? 0 : 20), 512 & e.$$.dirty[0] | 458752 & e.$$.dirty[1] && b && f && y && ge && o(37, me = { + x: y.x - f.x, + y: y.y - f.y + ge.y + }), 496 & e.$$.dirty[0] | 58096 & e.$$.dirty[1] && g && me && $e && pe && ne) { + const e = me.x + pe.x + $e.x, + t = me.y, + o = pe.x + me.x, + r = o + pe.width; + fe.set(i.map((([i], n) => { + const a = $[i], + l = $e.x + a.x, + c = l + a.width; + if (c < 0 || l > pe.width) return !1; + const d = e + a.x, + u = t + a.y, + h = (e => ({ + origin: ue(e.origin), + translation: ue(e.translation), + rotation: { + ...e.rotation + }, + scale: e.scale + }))(g); + h.offset = ce(.5 * a.width + d, .5 * a.height + u); + h.maskOpacity = 1, h.mask = it(d + 0, u, a.width + 0, a.height), h.maskFeather = [1, 0, 1, 0, 1, r, 1, r], l < de && se < 1 && (h.maskFeather[0] = se, h.maskFeather[1] = o, h.maskFeather[2] = 1, h.maskFeather[3] = o + de), c > pe.width - de && le < 1 && (h.maskFeather[4] = le, h.maskFeather[5] = r - de, h.maskFeather[6] = 1, h.maskFeather[7] = r), h.maskCornerRadius = ne[i]; + let p = s && Object.keys(s).filter((e => "filter" != e)).map((e => s[e])) || []; + return M(A[i]) && p.push(A[i]()), h.colorMatrix = p.length ? jr(p) : void 0, h.gamma = m, h + })).filter(Boolean)) + } + if (7424 & e.$$.dirty[1]) + if (d > 0 && l) { + const e = [...be(), ...l.map(ye)]; + O.set(e) + } else O.set(be()); + 256 & e.$$.dirty[1] && o(11, n = a ? `transform: translateY(${a}px)` : void 0) + }, [R, P, I, L, se, le, de, $e, pe, ge, ae, n, r, w, z, O, D, B, W, V, _, N, Z, X, Y, ee, te, oe, ie, re, e => { + e.target.className === dy && o(36, ne = Object.keys(ae).reduce(((e, t) => { + const o = ae[t], + i = getComputedStyle(o), + r = ["top-left", "top-right", "bottom-left", "bottom-right"].map((e => i.getPropertyValue(`border-${e}-radius`))).map(fd).map((e => 1.25 * e)); + return e[t] = r, e + }), {})) + }, fe, ({ + value: e + }) => { + un(Y, s = { + ...s, + filter: M(A[e]) ? A[e]() : void 0 + }, s), F.write() + }, "filter", E, A, ne, me, i, a, s, l, c, d, m, g, $, f, y, b, x, (e, t) => te(e, t.detail), function(e, t) { + ta[e ? "unshift" : "push"]((() => { + ae[t.value] = e, o(10, ae) + })) + }, e => o(7, $e = e), function(e) { + se = e, o(4, se) + }, function(e) { + le = e, o(5, le) + }, function(e) { + de = e, o(6, de) + }, e => o(8, pe = e.detail), e => o(9, ge = e.detail), function(t) { + Qn.call(this, e, t) + }] +} +var hy = { + util: ["filter", class extends Fa { + constructor(e) { + super(), za(this, e, uy, cy, Qr, { + name: 33, + isActive: 0, + isActiveFraction: 1, + stores: 34, + locale: 2, + filterFunctions: 35, + filterOptions: 3 + }, null, [-1, -1, -1]) + } + get name() { + return this.$$.ctx[33] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[1] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get stores() { + return this.$$.ctx[34] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[2] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get filterFunctions() { + return this.$$.ctx[35] + } + set filterFunctions(e) { + this.$$set({ + filterFunctions: e + }), pa() + } + get filterOptions() { + return this.$$.ctx[3] + } + set filterOptions(e) { + this.$$set({ + filterOptions: e + }), pa() + } + }] +}; + +function py(e) { + let t, o, i = e[43].label + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 4096 & t[1] && i !== (i = e[43].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function my(e) { + let t, o; + const i = [{ + class: "PinturaControlList" + }, { + tabs: e[1] + }, e[5]]; + let r = { + $$slots: { + default: [py, ({ + tab: e + }) => ({ + 43: e + }), ({ + tab: e + }) => [0, e ? 4096 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new Fc({ + props: r + }), t.$on("select", e[24]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 34 & o[0] ? Ra(i, [i[0], 2 & o[0] && { + tabs: e[1] + }, 32 & o[0] && Pa(e[5])]) : {}; + 12288 & o[1] && (r.$$scope = { + dirty: o, + ctx: e + }), t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function gy(e) { + let t, o; + const i = [e[7][e[42]]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new mf({ + props: r + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 128 & o[0] | 2048 & o[1] ? Ra(i, [Pa(e[7][e[42]])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function $y(e) { + let t, o, i, r, n; + o = new vd({ + props: { + elasticity: e[6] * e[9], + class: "PinturaControlListScroller", + $$slots: { + default: [my] + }, + $$scope: { + ctx: e + } + } + }); + const a = [{ + class: "PinturaControlPanels" + }, { + panelClass: "PinturaControlPanel" + }, { + panels: e[4] + }, e[5]]; + let s = { + $$slots: { + default: [gy, ({ + panel: e + }) => ({ + 42: e + }), ({ + panel: e + }) => [0, e ? 2048 : 0]] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < a.length; e += 1) s = Xr(s, a[e]); + return r = new Zc({ + props: s + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), i = Mn(), Ia(r.$$.fragment), An(t, "slot", "footer"), An(t, "style", e[3]) + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), Aa(r, t, null), n = !0 + }, + p(e, i) { + const s = {}; + 64 & i[0] && (s.elasticity = e[6] * e[9]), 38 & i[0] | 8192 & i[1] && (s.$$scope = { + dirty: i, + ctx: e + }), o.$set(s); + const l = 48 & i[0] ? Ra(a, [a[0], a[1], 16 & i[0] && { + panels: e[4] + }, 32 & i[0] && Pa(e[5])]) : {}; + 128 & i[0] | 10240 & i[1] && (l.$$scope = { + dirty: i, + ctx: e + }), r.$set(l), (!n || 8 & i[0]) && An(t, "style", e[3]) + }, + i(e) { + n || (xa(o.$$.fragment, e), xa(r.$$.fragment, e), n = !0) + }, + o(e) { + va(o.$$.fragment, e), va(r.$$.fragment, e), n = !1 + }, + d(e) { + e && Sn(t), La(o), La(r) + } + } +} + +function fy(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [$y] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[25]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 254 & o[0] | 8192 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function yy(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m = Gr, + g = () => (m(), m = en(f, (e => o(21, c = e))), f); + e.$$.on_destroy.push((() => m())); + let { + stores: $ + } = t, { + isActive: f + } = t; + g(); + let { + locale: y = {} + } = t, { + finetuneControlConfiguration: b + } = t, { + finetuneOptions: x + } = t, { + finetuneNudgePrecision: v + } = t; + const { + history: w, + animation: S, + scrollElasticity: k, + rangeInputElasticity: C, + imageColorMatrix: T, + imageConvolutionMatrix: R, + imageGamma: P, + imageVignette: E, + imageNoise: A, + allowPan: L, + allowZoom: z, + allowZoomControls: F, + allowPlayPause: O + } = $; + on(e, S, (e => o(22, d = e))); + const D = { + imageColorMatrix: T, + imageConvolutionMatrix: R, + imageGamma: P, + imageVignette: E, + imageNoise: A + }, + B = Jn("elasticityMultiplier"); + on(e, B, (e => o(6, h = e))); + const W = "finetune-" + I(), + V = Ba({}); + on(e, V, (e => o(23, u = e))); + const _ = Ba({}); + on(e, _, (e => o(7, p = e))); + let N = []; + const H = ec(d ? 20 : 0); + on(e, H, (e => o(20, l = e))); + return e.$$set = e => { + "stores" in e && o(15, $ = e.stores), "isActive" in e && g(o(0, f = e.isActive)), "locale" in e && o(16, y = e.locale), "finetuneControlConfiguration" in e && o(17, b = e.finetuneControlConfiguration), "finetuneOptions" in e && o(18, x = e.finetuneOptions), "finetuneNudgePrecision" in e && o(19, v = e.finetuneNudgePrecision) + }, e.$$.update = () => { + var t; + 2097152 & e.$$.dirty[0] && L.set(c), 2097152 & e.$$.dirty[0] && z.set(c), 2097152 & e.$$.dirty[0] && F.set(c), 2097152 & e.$$.dirty[0] && c && O.set(!0), 327680 & e.$$.dirty[0] && o(1, i = x ? x.map((([e, t]) => ({ + id: e, + label: M(t) ? t(y) : t + }))) : []), 2 & e.$$.dirty[0] && o(2, r = i.length && i[0].id), 4 & e.$$.dirty[0] && o(5, n = { + name: W, + selected: r + }), 2 & e.$$.dirty[0] && o(4, a = i.map((e => e.id))), 131072 & e.$$.dirty[0] && b && (t = b, N && N.forEach((e => e())), N = a.map((e => { + const { + getStore: o, + getValue: i = j + } = t[e]; + return o(D).subscribe((t => { + const o = null != t ? i(t) : t; + un(V, u = { + ...u, + [e]: o + }, u) + })) + }))), 8519680 & e.$$.dirty[0] && b && u && un(_, p = Object.keys(u).reduce(((e, t) => { + const { + base: o, + min: i, + max: r, + getLabel: n, + getStore: a, + setValue: s = ((e, t) => e.set(t)) + } = b[t], l = a(D), c = null != u[t] ? u[t] : o; + return e[t] = { + base: o, + min: i, + max: r, + value: c, + valueLabel: n ? n(c, i, r, r - i) : Math.round(100 * c), + oninputmove: e => { + s(l, e) + }, + oninputend: e => { + s(l, e), w.write() + }, + elasticity: h * C, + labelReset: y.labelReset, + nudgeMultiplier: v + }, e + }), {}), p), 6291456 & e.$$.dirty[0] && d && H.set(c ? 0 : 20), 1048576 & e.$$.dirty[0] && o(3, s = l ? `transform: translateY(${l}px)` : void 0) + }, [f, i, r, s, a, n, h, p, S, k, B, V, _, H, "finetune", $, y, b, x, v, l, c, d, u, ({ + detail: e + }) => o(2, r = e), function(t) { + Qn.call(this, e, t) + }] +} +var by = { + util: ["finetune", class extends Fa { + constructor(e) { + super(), za(this, e, yy, fy, Qr, { + name: 14, + stores: 15, + isActive: 0, + locale: 16, + finetuneControlConfiguration: 17, + finetuneOptions: 18, + finetuneNudgePrecision: 19 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[14] + } + get stores() { + return this.$$.ctx[15] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get locale() { + return this.$$.ctx[16] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get finetuneControlConfiguration() { + return this.$$.ctx[17] + } + set finetuneControlConfiguration(e) { + this.$$set({ + finetuneControlConfiguration: e + }), pa() + } + get finetuneOptions() { + return this.$$.ctx[18] + } + set finetuneOptions(e) { + this.$$set({ + finetuneOptions: e + }), pa() + } + get finetuneNudgePrecision() { + return this.$$.ctx[19] + } + set finetuneNudgePrecision(e) { + this.$$set({ + finetuneNudgePrecision: e + }), pa() + } + }] + }, + xy = (e, t) => { + const o = t.length; + return e < 0 ? e % o + o : e >= o ? e % o : e + }; + +function vy(e, t, o) { + const i = e.slice(); + return i[45] = t[o].key, i[46] = t[o].index, i[47] = t[o].translate, i[48] = t[o].scale, i[12] = t[o].rotate, i[49] = t[o].dir, i[50] = t[o].center, i[51] = t[o].type, i[2] = t[o].visible, i +} + +function wy(e) { + let t, o; + return { + c() { + t = kn("div"), An(t, "class", "PinturaShapeManipulator"), An(t, "data-control", "point"), An(t, "style", o = `pointer-events:none;transform: translate3d(${e[50].x}px, ${e[50].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`) + }, + m(e, o) { + wn(e, t, o) + }, + p(e, i) { + 56 & i[0] && o !== (o = `pointer-events:none;transform: translate3d(${e[50].x}px, ${e[50].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`) && An(t, "style", o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Sy(e, t) { + let o, i, r, n, a, s, l, c, d; + + function u(...e) { + return t[17](t[46], ...e) + } + let h = "edge" === t[51] && t[2] && wy(t); + return { + key: e, + first: null, + c() { + o = kn("div"), s = Mn(), h && h.c(), l = Rn(), An(o, "role", "button"), An(o, "aria-label", i = `Drag ${t[51]} ${t[45]}`), An(o, "tabindex", r = "edge" === t[51] ? -1 : 0), An(o, "class", "PinturaShapeManipulator"), An(o, "data-control", n = t[51]), An(o, "style", a = `cursor:${t[49]?t[49]+"-resize":"move"};opacity:${t[4]};--tx:${t[47].x};--ty:${t[47].y};--r:${"edge"===t[51]?t[12]:0}rad;--sx:${"point"===t[51]?t[5]:t[48].x};--sy:${"point"===t[51]?t[5]:t[48].y};`), this.first = o + }, + m(e, i) { + wn(e, o, i), wn(e, s, i), h && h.m(e, i), wn(e, l, i), c || (d = [Pn(o, "nudge", u), hn(pd.call(null, o, { + preventDefault: !0 + })), Pn(o, "interactionstart", (function() { + Jr(t[9]("start", t[46])) && t[9]("start", t[46]).apply(this, arguments) + })), Pn(o, "interactionupdate", (function() { + Jr(t[9]("move", t[46])) && t[9]("move", t[46]).apply(this, arguments) + })), Pn(o, "interactionend", (function() { + Jr(t[9]("end", t[46])) && t[9]("end", t[46]).apply(this, arguments) + })), hn(hd.call(null, o, { + observeKeys: !0 + }))], c = !0) + }, + p(e, s) { + t = e, 8 & s[0] && i !== (i = `Drag ${t[51]} ${t[45]}`) && An(o, "aria-label", i), 8 & s[0] && r !== (r = "edge" === t[51] ? -1 : 0) && An(o, "tabindex", r), 8 & s[0] && n !== (n = t[51]) && An(o, "data-control", n), 56 & s[0] && a !== (a = `cursor:${t[49]?t[49]+"-resize":"move"};opacity:${t[4]};--tx:${t[47].x};--ty:${t[47].y};--r:${"edge"===t[51]?t[12]:0}rad;--sx:${"point"===t[51]?t[5]:t[48].x};--sy:${"point"===t[51]?t[5]:t[48].y};`) && An(o, "style", a), "edge" === t[51] && t[2] ? h ? h.p(t, s) : (h = wy(t), h.c(), h.m(l.parentNode, l)) : h && (h.d(1), h = null) + }, + d(e) { + e && Sn(o), e && Sn(s), h && h.d(e), e && Sn(l), c = !1, Kr(d) + } + } +} + +function ky(e) { + let t, o, i, r; + return { + c() { + t = kn("div"), An(t, "role", "button"), An(t, "aria-label", "Drag rotator"), An(t, "tabindex", "0"), An(t, "class", "PinturaShapeManipulator"), An(t, "data-control", "rotate"), An(t, "style", o = `transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`) + }, + m(o, n) { + wn(o, t, n), i || (r = [Pn(t, "nudge", e[11]), hn(pd.call(null, t, { + preventDefault: !0 + })), Pn(t, "interactionstart", e[12]("start")), Pn(t, "interactionupdate", e[12]("move")), Pn(t, "interactionend", e[12]("end")), hn(hd.call(null, t, { + observeKeys: !0 + }))], i = !0) + }, + p(e, i) { + 49 & i[0] && o !== (o = `transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`) && An(t, "style", o) + }, + d(e) { + e && Sn(t), i = !1, Kr(r) + } + } +} + +function Cy(e) { + let t, o, i = [], + r = new Map, + n = e[3]; + const a = e => e[45]; + for (let t = 0; t < n.length; t += 1) { + let o = vy(e, n, t), + s = a(o); + r.set(s, i[t] = Sy(s, o)) + } + let s = e[1] && ky(e); + return { + c() { + for (let e = 0; e < i.length; e += 1) i[e].c(); + t = Mn(), s && s.c(), o = Rn() + }, + m(e, r) { + for (let t = 0; t < i.length; t += 1) i[t].m(e, r); + wn(e, t, r), s && s.m(e, r), wn(e, o, r) + }, + p(e, l) { + 1592 & l[0] && (n = e[3], i = Ma(i, l, a, 1, e, n, r, t.parentNode, Ca, Sy, t, vy)), e[1] ? s ? s.p(e, l) : (s = ky(e), s.c(), s.m(o.parentNode, o)) : s && (s.d(1), s = null) + }, + i: Gr, + o: Gr, + d(e) { + for (let t = 0; t < i.length; t += 1) i[t].d(e); + e && Sn(t), s && s.d(e), e && Sn(o) + } + } +} + +function Ty(e, t, o) { + let i, r, n, a; + const s = qn(), + l = .5 * Z, + c = G - l, + d = G + l, + u = -G, + h = u - l, + p = u + l, + m = U - l, + g = -U + l, + $ = l, + f = -l, + y = G - Z, + b = y - l, + x = y + l, + v = U - Z, + w = v - l, + S = v + l, + k = u - Z, + C = k + l, + T = k - l, + M = u + Z, + R = M + l, + P = M - l; + let { + visible: E = !1 + } = t, { + points: I = [] + } = t, { + rotatorPoint: A + } = t, { + enableDragEdges: L = !0 + } = t, { + enableDragPoints: z = !0 + } = t, { + enableRotatePoints: F = !0 + } = t; + const O = Jn("isAnimated"); + on(e, O, (e => o(16, r = e))); + const D = ec(.5, { + precision: 1e-4, + stiffness: .3, + damping: .7 + }); + on(e, D, (e => o(5, a = e))); + const B = ec(0, { + precision: .001, + stiffness: .3, + damping: .7 + }); + on(e, B, (e => o(4, n = e))); + const W = e => { + let t = ""; + return (e <= d && e >= c || e >= h && e <= p) && (t = "ns"), (e <= g || e >= m || e >= f && e <= $) && (t = "ew"), (e >= w && e <= S || e <= R && e >= P) && (t = "nesw"), (e >= b && e <= x || e <= C && e >= T) && (t = "nwse"), t + }, + V = (e, t) => { + s("resizestart", { + indexes: e, + translation: le() + }), s("resizemove", { + indexes: e, + translation: t + }), s("resizeend", { + indexes: e, + translation: le() + }) + }; + return e.$$set = e => { + "visible" in e && o(2, E = e.visible), "points" in e && o(13, I = e.points), "rotatorPoint" in e && o(0, A = e.rotatorPoint), "enableDragEdges" in e && o(14, L = e.enableDragEdges), "enableDragPoints" in e && o(15, z = e.enableDragPoints), "enableRotatePoints" in e && o(1, F = e.enableRotatePoints) + }, e.$$.update = () => { + 65540 & e.$$.dirty[0] && D.set(E ? 1 : .5, { + hard: !1 === r + }), 65540 & e.$$.dirty[0] && B.set(E ? 1 : 0, { + hard: !1 === r + }), 8192 & e.$$.dirty[0] && o(3, i = ((e, t) => { + let o = 0; + const i = Re(e), + r = [], + n = e.length; + for (; o < n; o++) { + const t = xy(o - 1, e), + n = xy(o + 1, e), + a = e[t], + s = e[o], + l = e[n], + c = Math.atan2(l.y - s.y, l.x - s.x); + if (z) { + const e = ge(ce(a.x - s.x, a.y - s.y)), + t = ge(ce(l.x - s.x, l.y - s.y)), + i = ce(e.x + t.x, e.y + t.y), + n = L ? z && W(Math.atan2(i.y, i.x)) : void 0; + r.push({ + index: [o], + key: "point-" + o, + type: "point", + scale: { + x: 1, + y: 1 + }, + translate: { + x: s.x, + y: s.y + }, + angle: void 0, + rotate: F, + center: s, + dir: n + }) + } + if (!L) continue; + if (Array.isArray(L) && !L.some((([e, t]) => o === e && n === t))) continue; + const d = ce(s.x + .5 * (l.x - s.x), s.y + .5 * (l.y - s.y)); + r.push({ + index: [o, n], + key: "edge-" + o, + type: "edge", + scale: { + x: Te(s, l), + y: 1 + }, + translate: { + x: s.x, + y: s.y + }, + angle: c, + rotate: c, + center: d, + visible: Array.isArray(L), + dir: W(Math.atan2(i.y - d.y, i.x - d.x)) + }) + } + return r + })(I)) + }, [A, F, E, i, n, a, O, D, B, (e, t) => ({ + detail: o + }) => { + const i = o && o.translation ? o.translation : ce(0, 0); + s("resize" + e, { + ...o, + indexes: t, + translation: i + }) + }, V, ({ + detail: e + }) => { + s("rotatestart", { + translation: le() + }), s("rotatemove", { + translation: e + }), s("rotateend", { + translation: le() + }) + }, e => ({ + detail: t + }) => { + const o = t && t.translation ? t.translation : ce(0, 0); + s("rotate" + e, { + ...t, + translation: o + }) + }, I, L, z, r, (e, { + detail: t + }) => V(e, t)] +} +class My extends Fa { + constructor(e) { + super(), za(this, e, Ty, Cy, Qr, { + visible: 2, + points: 13, + rotatorPoint: 0, + enableDragEdges: 14, + enableDragPoints: 15, + enableRotatePoints: 1 + }, null, [-1, -1]) + } +} +var Ry = (e, t) => { + const o = Dp(e); + return xe(o, t) + }, + Py = e => document.createTextNode(e), + Ey = e => (Gt() && e.endsWith("

") ? e.replace(/

<\/div>$/, "

") : e).replace(/

<\/div>/g, "
").replace(/<\/div>/g, "").replace(/
/g, "
"); + +function Iy(e) { + let t, o; + return { + c() { + t = kn("pre"), An(t, "class", "PinturaContentEditable"), An(t, "style", o = e[7] + ";position:absolute;z-index:-1;pointer-events:none;") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[0] + }, + p(e, i) { + 1 & i[0] && (t.innerHTML = e[0]), 128 & i[0] && o !== (o = e[7] + ";position:absolute;z-index:-1;pointer-events:none;") && An(t, "style", o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Ay(e) { + let t, o, i, r, n, a, s = e[8] && Iy(e); + return { + c() { + s && s.c(), t = Mn(), o = kn("pre"), An(o, "class", "PinturaContentEditable"), An(o, "data-wrap-content", i = e[4] || e[5] ? "wrap" : "nowrap"), An(o, "contenteditable", ""), An(o, "spellcheck", e[1]), An(o, "autocorrect", e[2]), An(o, "autocapitalize", e[3]), An(o, "style", r = e[8] ? e[15](e[7]) : e[7]) + }, + m(i, r) { + s && s.m(i, r), wn(i, t, r), wn(i, o, r), e[26](o), n || (a = [Pn(o, "input", e[13]), Pn(o, "compositionend", e[12]), Pn(o, "paste", e[14]), Pn(o, "keydown", e[10]), Pn(o, "keyup", e[11]), Pn(o, "blur", e[9])], n = !0) + }, + p(e, n) { + e[8] ? s ? s.p(e, n) : (s = Iy(e), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), 48 & n[0] && i !== (i = e[4] || e[5] ? "wrap" : "nowrap") && An(o, "data-wrap-content", i), 2 & n[0] && An(o, "spellcheck", e[1]), 4 & n[0] && An(o, "autocorrect", e[2]), 8 & n[0] && An(o, "autocapitalize", e[3]), 384 & n[0] && r !== (r = e[8] ? e[15](e[7]) : e[7]) && An(o, "style", r) + }, + i: Gr, + o: Gr, + d(i) { + s && s.d(i), i && Sn(t), i && Sn(o), e[26](null), n = !1, Kr(a) + } + } +} + +function Ly(e, t, o) { + let i, n, { + spellcheck: a = "false" + } = t, + { + autocorrect: s = "off" + } = t, + { + autocapitalize: l = "off" + } = t, + { + wrapLines: c = !0 + } = t, + { + allowNewline: d = !0 + } = t, + { + textFormat: u = "text" + } = t, + { + formatInput: h = j + } = t, + { + formatPaste: m = j + } = t, + { + style: g + } = t, + { + innerHTML: $ + } = t, + { + oninput: f = r + } = t, + { + enableTextStyleShortcuts: y = !1 + } = t; + const b = () => { + if (!v) return; + const e = document.createRange(); + e.selectNodeContents(v); + const t = R(); + t.removeAllRanges(), t.addRange(e) + }, + x = qn(); + let v; + document.execCommand("defaultParagraphSeparator", !1, "br"); + const w = e => e.replace(/<\/?(?:i|b|em|u|s|strike|strong|font)>/, "").replace(/style=".*?"/g, "").replace(/\n/gim, "
"), + S = () => { + o(0, $ = v.innerHTML); + const e = Ey($); + x("input", e), f(e), requestAnimationFrame((() => v && v.scrollTo(0, 0))) + }, + k = () => { + P(v); + const e = "html" === u ? v.innerHTML : w(v.innerHTML); + o(6, v.innerHTML = h(e), v), E(v), S() + }, + C = { + b: "bold", + i: "italic", + u: "underline", + s: "strikethrough" + }, + T = e => { + const t = p("span"); + return t.dataset.bookmark = e, t + }, + M = (e, t, o) => { + const i = T(o); + if (e.nodeType === Node.TEXT_NODE) { + const r = e.textContent; + if ("start" === o) { + const o = Py(r.substr(0, t)), + n = Py(r.substr(t)); + e.replaceWith(o, i, n) + } else { + const o = Py(r.substr(0, t)), + n = Py(r.substr(t)); + e.replaceWith(o, i, n) + } + } else e.nodeType === Node.ELEMENT_NODE && e.insertBefore(i, e.childNodes[t]) + }, + R = () => { + const e = v.getRootNode(); + return "getSelection" in e ? e.getSelection() : document.getSelection() + }, + P = e => { + const t = R(); + if (!t.getRangeAt || !t.rangeCount) return; + const o = t.getRangeAt(0), + { + startOffset: i, + endOffset: r, + startContainer: n, + endContainer: a + } = o; + if (e.contains(o.startContainer) && e.contains(o.endContainer)) + if (n.nodeType === Node.TEXT_NODE && n === a) { + const e = n.textContent, + t = e.substr(0, i), + o = T("start"), + a = r - i > 0 ? e.substr(i, r) : "", + s = T("end"), + l = e.substr(r); + n.replaceWith(t, o, a, s, l) + } else M(n, i, "start"), M(a, r + (n === a ? 1 : 0), "end") + }, + E = e => { + const t = I(e, "start"), + o = I(e, "end"); + if (!t || !o) return; + const i = document.createRange(); + i.setStart(t, 0), i.setEnd(o, 0); + const r = R(); + r.removeAllRanges(), r.addRange(i), t.remove(), o.remove() + }, + I = (e, t) => { + const o = e.children; + for (let e = 0; e < o.length; e++) { + const i = o[e]; + if (i.dataset.bookmark === t) return i; + if (i.children.length) { + const e = I(i, t); + if (e) return e + } + } + }; + let A; + return e.$$set = e => { + "spellcheck" in e && o(1, a = e.spellcheck), "autocorrect" in e && o(2, s = e.autocorrect), "autocapitalize" in e && o(3, l = e.autocapitalize), "wrapLines" in e && o(4, c = e.wrapLines), "allowNewline" in e && o(5, d = e.allowNewline), "textFormat" in e && o(16, u = e.textFormat), "formatInput" in e && o(17, h = e.formatInput), "formatPaste" in e && o(18, m = e.formatPaste), "style" in e && o(19, g = e.style), "innerHTML" in e && o(0, $ = e.innerHTML), "oninput" in e && o(20, f = e.oninput), "enableTextStyleShortcuts" in e && o(21, y = e.enableTextStyleShortcuts) + }, e.$$.update = () => { + var t; + if (64 & e.$$.dirty[0] && o(25, i = !!v), 33554433 & e.$$.dirty[0] && i && $ && (t = $) !== v.innerHTML && (o(6, v.innerHTML = t, v), v === document.activeElement && b()), 524336 & e.$$.dirty[0]) + if (!c && d) { + const e = g.includes(":right") ? "text-indent:-100px!important" : g.includes(":center") ? "" : "min-width:calc(100% + 100px)!important"; + o(7, A = g + ";overflow:visible;" + e) + } else o(7, A = g); + 524288 & e.$$.dirty[0] && o(8, n = g.includes("text-stroke")) + }, [$, a, s, l, c, d, v, A, n, () => { + x("blur") + }, e => { + if (/escape/i.test(e.code)) return e.stopPropagation(), void x("cancel"); + const t = e.ctrlKey || e.metaKey; + if ("html" === u && t && /b|i|u|s/.test(e.key)) return y && (e => { + const t = C[e]; + t && document.execCommand(t) + })(e.key), void e.preventDefault(); + /enter/i.test(e.code) && (e.stopPropagation(), e.isComposing || (t ? x("confirm") : (d || e.preventDefault(), document.execCommand("insertLineBreak"), e.preventDefault()))) + }, () => {}, e => { + "" !== e.data && k() + }, e => { + const { + inputType: t + } = e; + "insertCompositionText" !== t && "deleteCompositionText" !== t && k() + }, e => { + e.preventDefault(); + const t = e.clipboardData.getData("text/plain"), + o = "html" === u ? t : w(t), + i = m(o); + if (!i.length) return; + const r = R().getRangeAt(0); + r.deleteContents(), r.insertNode(document.createTextNode(i)), S() + }, e => e.replace("-webkit-text-stroke", "--text-stroke").replace("text-shadow", "--text-shadow"), u, h, m, g, f, y, () => k(), () => v && v.focus(), b, i, function(e) { + ta[e ? "unshift" : "push"]((() => { + v = e, o(6, v) + })) + }] +} +class zy extends Fa { + constructor(e) { + super(), za(this, e, Ly, Ay, Qr, { + spellcheck: 1, + autocorrect: 2, + autocapitalize: 3, + wrapLines: 4, + allowNewline: 5, + textFormat: 16, + formatInput: 17, + formatPaste: 18, + style: 19, + innerHTML: 0, + oninput: 20, + enableTextStyleShortcuts: 21, + confirm: 22, + focus: 23, + select: 24 + }, null, [-1, -1]) + } + get spellcheck() { + return this.$$.ctx[1] + } + set spellcheck(e) { + this.$$set({ + spellcheck: e + }), pa() + } + get autocorrect() { + return this.$$.ctx[2] + } + set autocorrect(e) { + this.$$set({ + autocorrect: e + }), pa() + } + get autocapitalize() { + return this.$$.ctx[3] + } + set autocapitalize(e) { + this.$$set({ + autocapitalize: e + }), pa() + } + get wrapLines() { + return this.$$.ctx[4] + } + set wrapLines(e) { + this.$$set({ + wrapLines: e + }), pa() + } + get allowNewline() { + return this.$$.ctx[5] + } + set allowNewline(e) { + this.$$set({ + allowNewline: e + }), pa() + } + get textFormat() { + return this.$$.ctx[16] + } + set textFormat(e) { + this.$$set({ + textFormat: e + }), pa() + } + get formatInput() { + return this.$$.ctx[17] + } + set formatInput(e) { + this.$$set({ + formatInput: e + }), pa() + } + get formatPaste() { + return this.$$.ctx[18] + } + set formatPaste(e) { + this.$$set({ + formatPaste: e + }), pa() + } + get style() { + return this.$$.ctx[19] + } + set style(e) { + this.$$set({ + style: e + }), pa() + } + get innerHTML() { + return this.$$.ctx[0] + } + set innerHTML(e) { + this.$$set({ + innerHTML: e + }), pa() + } + get oninput() { + return this.$$.ctx[20] + } + set oninput(e) { + this.$$set({ + oninput: e + }), pa() + } + get enableTextStyleShortcuts() { + return this.$$.ctx[21] + } + set enableTextStyleShortcuts(e) { + this.$$set({ + enableTextStyleShortcuts: e + }), pa() + } + get confirm() { + return this.$$.ctx[22] + } + get focus() { + return this.$$.ctx[23] + } + get select() { + return this.$$.ctx[24] + } +} +const Fy = ["i", "b", "u", "strike"].map((e => ({ + tag: e, + tagOpen: new RegExp(`<${e}>`, "g"), + tagClose: new RegExp(``, "g"), + placeholderOpen: new RegExp(`___${e}O___`, "g"), + placeholderClose: new RegExp(`___${e}C___`, "g") +}))); +var Oy = e => e = ((e, t = Fy) => (t.forEach((({ + tag: t, + placeholderOpen: o, + placeholderClose: i + }) => { + e = e.replace(o, `<${t}>`).replace(i, ``) + })), e))(e = (e = ((e, t = Fy) => (t.forEach((({ + tag: t, + tagOpen: o, + tagClose: i + }) => { + e = e.replace(o, `___${t}O___`).replace(i, `___${t}C___`) + })), e))(e)).replace(/ {2,}/g, " ").replace(/\u00a0/g, " ").split("\n").join("
")), + Dy = (e, t) => T(e) ? parseFloat(e) / 100 * t : e, + By = (e, t) => ({ + x: Vo(e.x, t.width), + y: Vo(e.y, t.height) + }); + +function Wy(e, t, o) { + const i = e.slice(); + return i[276] = t[o], i[278] = o, i +} + +function Vy(e, t) { + let o, i, r, n, a, s, l, c, d, u, h, p = t[276].name + ""; + + function m() { + return t[180](t[278]) + } + return r = new Oh({ + props: { + color: t[276].color + } + }), { + key: e, + first: null, + c() { + o = kn("li"), i = kn("button"), Ia(r.$$.fragment), n = Mn(), a = kn("span"), s = Tn(p), c = Mn(), An(i, "class", "PinturaShapeListItem"), An(i, "type", "button"), An(i, "aria-label", l = "Select shape " + t[276].name), this.first = o + }, + m(e, t) { + wn(e, o, t), bn(o, i), Aa(r, i, null), bn(i, n), bn(i, a), bn(a, s), bn(o, c), d = !0, u || (h = Pn(i, "click", m), u = !0) + }, + p(e, o) { + t = e; + const n = {}; + 1048576 & o[0] && (n.color = t[276].color), r.$set(n), (!d || 1048576 & o[0]) && p !== (p = t[276].name + "") && Fn(s, p), (!d || 1048576 & o[0] && l !== (l = "Select shape " + t[276].name)) && An(i, "aria-label", l) + }, + i(e) { + d || (xa(r.$$.fragment, e), d = !0) + }, + o(e) { + va(r.$$.fragment, e), d = !1 + }, + d(e) { + e && Sn(o), La(r), u = !1, h() + } + } +} + +function _y(e) { + let t, o; + return t = new My({ + props: { + visible: !0, + points: e[12], + rotatorPoint: e[26], + enableDragEdges: e[16], + enableDragPoints: e[28], + enableRotatePoints: e[14] + } + }), t.$on("resizestart", e[37]), t.$on("resizemove", e[38]), t.$on("resizeend", e[39]), t.$on("rotatestart", e[40]), t.$on("rotatemove", e[41]), t.$on("rotateend", e[42]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 4096 & o[0] && (i.points = e[12]), 67108864 & o[0] && (i.rotatorPoint = e[26]), 65536 & o[0] && (i.enableDragEdges = e[16]), 268435456 & o[0] && (i.enableDragPoints = e[28]), 16384 & o[0] && (i.enableRotatePoints = e[14]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ny(e) { + let t, o, i, r; + const n = [jy, Hy], + a = []; + + function s(e, t) { + return "modal" === e[4] ? 0 : "inline" === e[4] ? 1 : -1 + } + return ~(t = s(e)) && (o = a[t] = n[t](e)), { + c() { + o && o.c(), i = Rn() + }, + m(e, o) { + ~t && a[t].m(e, o), wn(e, i, o), r = !0 + }, + p(e, r) { + let l = t; + t = s(e), t === l ? ~t && a[t].p(e, r) : (o && (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba()), ~t ? (o = a[t], o ? o.p(e, r) : (o = a[t] = n[t](e), o.c()), xa(o, 1), o.m(i.parentNode, i)) : o = null) + }, + i(e) { + r || (xa(o), r = !0) + }, + o(e) { + va(o), r = !1 + }, + d(e) { + ~t && a[t].d(e), e && Sn(i) + } + } +} + +function Hy(e) { + let t, o, i, r, n, a = { + formatInput: e[44], + wrapLines: !!e[13].width, + textFormat: e[13].format, + enableTextStyleShortcuts: e[5], + allowNewline: e[27], + style: e[25] + }; + return o = new zy({ + props: a + }), e[183](o), o.$on("input", e[45]), o.$on("keyup", e[48]), o.$on("cancel", e[50]), o.$on("confirm", e[49]), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaInlineInput"), An(t, "style", e[24]) + }, + m(a, s) { + wn(a, t, s), Aa(o, t, null), i = !0, r || (n = Pn(t, "focusout", e[184]), r = !0) + }, + p(e, r) { + const n = {}; + 8192 & r[0] && (n.wrapLines = !!e[13].width), 8192 & r[0] && (n.textFormat = e[13].format), 32 & r[0] && (n.enableTextStyleShortcuts = e[5]), 134217728 & r[0] && (n.allowNewline = e[27]), 33554432 & r[0] && (n.style = e[25]), o.$set(n), (!i || 16777216 & r[0]) && An(t, "style", e[24]) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(i) { + i && Sn(t), e[183](null), La(o), r = !1, n() + } + } +} + +function jy(e) { + let t, o; + return t = new fp({ + props: { + panelOffset: e[2], + onconfirm: e[49], + oncancel: e[50], + buttonCancel: { + icon: e[6].shapeIconInputCancel, + label: e[6].shapeLabelInputCancel + }, + buttonConfirm: { + icon: e[6].shapeLabelInputConfirm, + label: e[6].shapeIconInputConfirm, + hideLabel: !0 + }, + $$slots: { + default: [Uy] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 4 & o[0] && (i.panelOffset = e[2]), 64 & o[0] && (i.buttonCancel = { + icon: e[6].shapeIconInputCancel, + label: e[6].shapeLabelInputCancel + }), 64 & o[0] && (i.buttonConfirm = { + icon: e[6].shapeLabelInputConfirm, + label: e[6].shapeIconInputConfirm, + hideLabel: !0 + }), 41943296 & o[0] | 1 & o[9] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Uy(e) { + let t, o, i; + return { + c() { + t = kn("textarea"), An(t, "spellcheck", "false"), An(t, "autocorrect", "off"), An(t, "autocapitalize", "off"), An(t, "style", e[25]) + }, + m(r, n) { + wn(r, t, n), e[181](t), On(t, e[23]), o || (i = [Pn(t, "keydown", e[47]), Pn(t, "keypress", e[46]), Pn(t, "keyup", e[48]), Pn(t, "input", e[45]), Pn(t, "input", e[182])], o = !0) + }, + p(e, o) { + 33554432 & o[0] && An(t, "style", e[25]), 8388608 & o[0] && On(t, e[23]) + }, + d(r) { + r && Sn(t), e[181](null), o = !1, Kr(i) + } + } +} + +function Gy(e) { + let t, o, i, r, n; + return o = new dp({ + props: { + items: e[21], + key: e[10] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaShapeControls"), An(t, "style", e[22]) + }, + m(a, s) { + wn(a, t, s), Aa(o, t, null), i = !0, r || (n = [Pn(t, "measure", e[185]), hn($c.call(null, t))], r = !0) + }, + p(e, r) { + const n = {}; + 2097152 & r[0] && (n.items = e[21]), 1024 & r[0] && (n.key = e[10]), o.$set(n), (!i || 4194304 & r[0]) && An(t, "style", e[22]) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o), r = !1, Kr(n) + } + } +} + +function Zy(e) { + let t, o, i, n, a, s, l, c, d, u, h = [], + p = new Map, + m = e[20]; + const g = e => e[276].id; + for (let t = 0; t < m.length; t += 1) { + let o = Wy(e, m, t), + i = g(o); + p.set(i, h[t] = Vy(i, o)) + } + let $ = e[15] && _y(e), + f = e[11] && Ny(e), + y = e[17] > 0 && Gy(e); + return { + c() { + t = kn("div"), o = kn("nav"), i = kn("ul"); + for (let e = 0; e < h.length; e += 1) h[e].c(); + n = Mn(), $ && $.c(), a = Mn(), f && f.c(), s = Mn(), y && y.c(), An(o, "class", "PinturaShapeList"), An(o, "data-visible", e[18]), An(t, "class", "PinturaShapeEditor"), An(t, "tabindex", "0") + }, + m(p, m) { + wn(p, t, m), bn(t, o), bn(o, i); + for (let e = 0; e < h.length; e += 1) h[e].m(i, null); + bn(t, n), $ && $.m(t, null), bn(t, a), f && f.m(t, null), bn(t, s), y && y.m(t, null), e[186](t), c = !0, d || (u = [Pn(o, "focusin", e[53]), Pn(o, "focusout", e[54]), Pn(t, "keydown", (function() { + Jr(e[0] ? r : e[43]) && (e[0] ? r : e[43]).apply(this, arguments) + })), Pn(t, "nudge", (function() { + Jr(e[0] ? r : e[52]) && (e[0] ? r : e[52]).apply(this, arguments) + })), Pn(t, "measure", e[179]), Pn(t, "pointermove", (function() { + Jr(e[0] ? r : e[55]) && (e[0] ? r : e[55]).apply(this, arguments) + })), Pn(t, "pointerleave", (function() { + Jr(e[0] ? r : e[56]) && (e[0] ? r : e[56]).apply(this, arguments) + })), Pn(t, "interactionstart", (function() { + Jr(e[0] ? r : e[31]) && (e[0] ? r : e[31]).apply(this, arguments) + })), Pn(t, "interactionupdate", (function() { + Jr(e[0] ? r : e[33]) && (e[0] ? r : e[33]).apply(this, arguments) + })), Pn(t, "interactioncancel", (function() { + Jr(e[0] ? r : e[32]) && (e[0] ? r : e[32]).apply(this, arguments) + })), Pn(t, "interactionrelease", (function() { + Jr(e[0] ? r : e[34]) && (e[0] ? r : e[34]).apply(this, arguments) + })), Pn(t, "interactionend", (function() { + Jr(e[0] ? r : e[35]) && (e[0] ? r : e[35]).apply(this, arguments) + })), hn($c.call(null, t)), hn(pd.call(null, t)), hn(l = hd.call(null, t, { + drag: !0, + inertia: !0, + multiTouch: !1, + observeKeys: !0, + shouldStartInteraction: Xy, + getEventPosition: e[187] + }))], d = !0) + }, + p(r, n) { + e = r, 1048706 & n[0] && (m = e[20], ya(), h = Ma(h, n, g, 1, e, m, p, i, Ta, Vy, null, Wy), ba()), (!c || 262144 & n[0]) && An(o, "data-visible", e[18]), e[15] ? $ ? ($.p(e, n), 32768 & n[0] && xa($, 1)) : ($ = _y(e), $.c(), xa($, 1), $.m(t, a)) : $ && (ya(), va($, 1, 1, (() => { + $ = null + })), ba()), e[11] ? f ? (f.p(e, n), 2048 & n[0] && xa(f, 1)) : (f = Ny(e), f.c(), xa(f, 1), f.m(t, s)) : f && (ya(), va(f, 1, 1, (() => { + f = null + })), ba()), e[17] > 0 ? y ? (y.p(e, n), 131072 & n[0] && xa(y, 1)) : (y = Gy(e), y.c(), xa(y, 1), y.m(t, null)) : y && (ya(), va(y, 1, 1, (() => { + y = null + })), ba()), l && Jr(l.update) && 8 & n[0] && l.update.call(null, { + drag: !0, + inertia: !0, + multiTouch: !1, + observeKeys: !0, + shouldStartInteraction: Xy, + getEventPosition: e[187] + }) + }, + i(e) { + if (!c) { + for (let e = 0; e < m.length; e += 1) xa(h[e]); + xa($), xa(f), xa(y), c = !0 + } + }, + o(e) { + for (let e = 0; e < h.length; e += 1) va(h[e]); + va($), va(f), va(y), c = !1 + }, + d(o) { + o && Sn(t); + for (let e = 0; e < h.length; e += 1) h[e].d(); + $ && $.d(), f && f.d(), y && y.d(), e[186](null), d = !1, Kr(u) + } + } +} +const Xy = (e, t) => e.target === t; + +function Yy(e, t, o) { + let i, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, M, R, P, E, A, L, z, F, O, D, B, W, V, _, N, H, U, G, Z, X, Y, q, K, J, Q, ee, te, oe, ie, re, ae, de, he = Gr, + me = () => (he(), he = en(Me, (e => o(175, oe = e))), Me); + e.$$.on_destroy.push((() => he())); + let { + uid: ve = I() + } = t, { + ui: Se + } = t, { + disabled: ke = !1 + } = t, { + shapes: Me + } = t; + me(); + let { + selection: Ie + } = t, { + offset: Ae + } = t, { + contextRotation: ze = 0 + } = t, { + contextFlipX: Fe = !1 + } = t, { + contextFlipY: Oe = !1 + } = t, { + contextZoom: Be = 1 + } = t, { + active: We = !1 + } = t, { + opacity: Ve = 1 + } = t, { + parentRect: _e + } = t, { + rootRect: Ne + } = t, { + utilRect: Ue + } = t, { + hoverColor: Ze + } = t, { + caretColor: Xe + } = t, { + gridColor: Ye + } = t, { + snapColor: qe + } = t, { + textInputMode: Ke = "inline" + } = t, { + oninteractionstart: Je = r + } = t, { + oninteractionupdate: ot = r + } = t, { + oninteractionrelease: nt = r + } = t, { + oninteractionend: at = r + } = t, { + oninteractioncancel: st = r + } = t, { + onaddshape: lt = r + } = t, { + onupdateshape: ct = r + } = t, { + onselectshape: dt = r + } = t, { + onblurshape: ut = r + } = t, { + onremoveshape: ht = r + } = t, { + ontapshape: pt = r + } = t, { + onhovershape: gt = r + } = t, { + onhovercanvas: $t = r + } = t, { + ontapcanvas: ft = r + } = t, { + onleavecanvas: vt = r + } = t, { + beforeSelectShape: wt = (() => !0) + } = t, { + beforeDeselectShape: St = (() => !0) + } = t, { + beforeRemoveShape: kt = (() => !0) + } = t, { + beforeUpdateShape: Ct = ((e, t) => t) + } = t, { + willRenderShapeControls: Tt = j + } = t, { + willRenderShapeTextControls: Pt = j + } = t, { + willStartInteraction: Et = ((e, t) => !0) + } = t, { + mapEditorPointToImagePoint: Ot + } = t, { + mapImagePointToEditorPoint: Dt + } = t, { + eraseRadius: Bt + } = t, { + selectRadius: Wt + } = t, { + enableButtonFlipVertical: Vt = !1 + } = t, { + enableTapToAddText: _t = !0 + } = t, { + enableTextStyleControls: Nt = !0 + } = t, { + locale: Ht + } = t, { + snapThreshold: jt = 0 + } = t, { + snapPointer: Ut = !0 + } = t, { + enableSnapToContext: Gt = !0 + } = t, { + gridSize: Zt = 0 + } = t; + const Xt = e => { + if (0 === jt) return []; + let t; + return Gt && (t = { + ..._e, + x: 0, + y: 0 + }), [...oe.filter((t => t !== e)).filter((e => !Li(e))).map((e => ur({ + ...e + }, _e))), t].filter(Boolean) + }, + Yt = (e, t, o, i) => 0 === e ? { + snapTargets: [] + } : { + snapThreshold: e, + gridSize: t, + gridRect: o, + snapTargets: Xt(i) + }, + qt = Jn("isAnimated"); + on(e, qt, (e => o(176, re = e))); + const Kt = e => e.set(tn(e)), + Jt = e => tn(e).find(Li), + Qt = (e, t) => { + if (!Jt(t)) return Bi(e), io(e, t) + }, + eo = e => { + Jt(e) && e.update((e => e.filter((e => !Li(e))))) + }, + to = e => { + const t = Jt(e); + if (t) return Wi(t), Kt(e), t + }, + oo = (e, t, o = ((e, t) => ({ + ...e, + ...t + }))) => { + Jt(t) && t.update((t => t.map((t => Li(t) ? o(t, e) : t)))) + }, + io = (e, t = Me) => (t.update((t => [...t, e])), e), + ro = (e, t, o) => { + const i = Ct({ + ...e + }, t, { + ...o + }); + return gr(e, i, o), e + }, + no = (e, t) => { + const o = Te(e, t), + i = $e(e, t), + r = Math.PI / 8, + n = r * Math.round(i / r) - ze % r; + t.x = e.x + o * Math.cos(n), t.y = e.y + o * Math.sin(n) + }, + ao = Jn("keysPressed"); + on(e, ao, (e => o(177, ae = e))); + const so = (e, t, o) => 0 === e || t && o ? e : t || o ? -e : e, + lo = e => { + if (null === e.x && null === e.y) return co(); + e.x && o(138, uo = Ot({ + x: e.x, + y: 0 + }).x), e.y && o(139, ho = Ot({ + x: 0, + y: e.y + }).y) + }, + co = () => { + o(138, uo = null), o(139, ho = null) + }; + let uo = null, + ho = null; + const po = (e, t) => { + const o = Dt(e); + return Ot(be(o, t)) + }, + mo = (e, t, o) => { + const i = (o - t) / e + 1; + return Array.from({ + length: i + }, ((o, i) => t + i * e)) + }, + go = e => { + let t = [], + o = [], + i = e.points; + if (void 0 !== e.x1 && (i = [{ + x: e.x1, + y: e.y1 + }, { + x: e.x2, + y: e.y2 + }]), i) { + const e = i.map(Dt), + r = et(e), + n = e[0], + a = e[e.length - 1]; + t = [r.x, r.x + .5 * r.width, r.x + r.width, n.x, a.x], o = [r.y, r.y + .5 * r.height, r.y + r.height, n.y, a.y] + } else if (e.text || void 0 !== e.width || void 0 !== e.rx) { + let i; + if (e.text && void 0 === e.height) { + const t = ii(e.text, e); + i = it(e.x, e.y, t.width, t.height) + } else i = void 0 !== e.width ? Qe(e) : Qe({ + x: e.x - e.rx, + y: e.y - e.ry, + width: 2 * e.rx, + height: 2 * e.ry + }); + const r = xt(i).map(Dt), + n = Math.abs(e.rotation) > 0 ? mt(i, e.rotation).map(Dt) : r, + a = et(n), + s = rt(a), + l = .5 * a.width, + c = .5 * a.height; + t = [s.x - l, s.x, s.x + l], o = [s.y - c, s.y, s.y + c] + } else if (void 0 !== e.x) { + const i = Dt(e); + t = [i.x], o = [i.y] + } + return { + x: t, + y: o + } + }, + $o = (e, t, o) => { + let i, r, n, a = Number.Infinity, + s = null, + l = null; + for (let c = 0; c < e.length; c++) { + r = e[c]; + for (let e = 0; e < t.length; e++) n = t[e], i = Math.abs(r - n), i < o && (null === l || i < a) && (a = i, s = r, l = n) + } + return { + origin: s, + target: l + } + }, + fo = (e, t, o, i, r) => { + const n = { + x: null, + y: null + }, + a = { + x: null, + y: null + }, + s = t.map(go); + if (i > 0) { + const e = Dt({ + x: 0, + y: 0 + }), + t = Dt({ + x: i, + y: i + }), + o = Dt({ + x: r.width, + y: r.height + }), + n = t.x - e.x, + a = mo(n, e.x, o.x), + l = mo(n, e.y, o.y); + s.push({ + x: a, + y: l + }) + } + return s.forEach((t => { + const { + snapTranslation: i, + snapLine: r + } = ((e, t, o) => { + const i = { + x: null, + y: null + }, + r = { + x: null, + y: null + }, + n = $o(e.x, t.x, o); + null !== n.target && (i.x = n.target, r.x = n.target - n.origin); + const a = $o(e.y, t.y, o); + return null !== a.target && (i.y = a.target, r.y = a.target - a.origin), { + snapTranslation: r, + snapLine: i + } + })(e, t, o); + null !== i.x && (null === a.x || Math.abs(i.x) < Math.abs(a.x)) && (a.x = i.x || 0, n.x = r.x), null !== i.y && (null === a.y || Math.abs(i.y) < Math.abs(a.y)) && (a.y = i.y || 0, n.y = r.y) + })), { + snapTranslation: a, + snapLines: n + } + }, + yo = (e, t) => (null !== t.x && (e.x += t.x), null !== t.y && (e.y += t.y), e), + bo = (e, t, o, i) => { + const { + snapThreshold: r = 0, + gridSize: n = 0, + gridRect: a, + snapTargets: s = [] + } = i || {}; + let l = null; + if (Mi(e)) { + if (r) { + const i = ur({ + ...e + }, _e), + l = po(xi(t), o), + c = po(vi(t), o), + d = go({ + ...i, + x1: l.x, + y1: l.y, + x2: c.x, + y2: c.y + }), + { + snapTranslation: u, + snapLines: h + } = fo(d, s, r, n, a); + yo(o, u), lo(h) + } + const i = po(xi(t), o), + c = po(vi(t), o); + l = { + x1: i.x, + y1: i.y, + x2: c.x, + y2: c.y + } + } else if (e.points) { + if (r) { + const i = ur({ + ...e + }, _e), + l = go({ + ...i, + points: t.points.map((e => po(e, o))) + }), + { + snapTranslation: c, + snapLines: d + } = fo(l, s, r, n, a); + yo(o, c), lo(d) + } + l = { + points: t.points.map((e => po(e, o))) + } + } else if (Ci(e) || wi(e) || Ti(e)) { + if (r) { + const i = ur({ + ...e + }, _e), + l = po(t, o), + c = go({ + ...i, + ...l + }), + { + snapTranslation: d, + snapLines: u + } = fo(c, s, r, n, a); + yo(o, d), lo(u) + } + l = po(t, o) + } + l && (ro(e, l, _e), Mo()) + }, + xo = { + 0: 1, + 1: 0, + 2: 3, + 3: 2 + }, + vo = { + 0: 3, + 1: 2, + 2: 1, + 3: 0 + }; + let wo; + const So = () => { + if (oe.length) return oe.find(Li) + }, + ko = () => { + if (oe.length) return oe.findIndex(Li) + }, + Co = () => { + const e = So(); + if (e) return Wi(e), Mo(), e + }, + To = () => { + if (!So()) return; + const e = [...oe]; + e.splice(ko(), 1), Me.set(e) + }, + Mo = () => { + Me.set(oe) + }, + Ro = (e, t = [], o = !0) => { + t.filter(Boolean).forEach((t => delete e[t])), o && Mo() + }, + Po = (e, t, o = !0) => { + e = Object.assign(e, t), o && Mo() + }, + Io = (e, t, o, i = !0) => { + e[t] = o, i && Mo() + }, + Lo = (e, t = !0) => { + oe.forEach((t => Po(t, e, !1))), t && Mo() + }, + zo = () => [...oe].reverse().find(Ii), + Fo = () => !!zo(), + Oo = e => { + if (!kt(e)) return !1; + Me.set(oe.filter((t => t !== e))), ht(e) + }, + Do = () => { + const e = zo(); + if (!e) return; + const t = oe.filter((e => Ni(e) && _i(e))), + o = t.findIndex((t => t === e)); + if (!1 === Oo(e)) return; + if (Bo = e, t.length - 1 <= 0) return Wo(); + const i = o - 1 < 0 ? t.length - 1 : o - 1; + Ho(t[i]) + }; + let Bo = void 0; + const Wo = (e = {}) => { + const { + storePrevious: t = !0 + } = e; + Object.keys(hr).forEach((e => hr[e] = {})); + const o = No(); + t && (Bo = o), Lo({ + isSelected: !1, + isEditing: !1, + _prerender: !1 + }), o && ut(o) + }, + No = () => oe.find(Ii), + Ho = (e, t = !0) => { + if (Li(e)) return; + const o = No() || Bo, + i = Ii(e); + Bo = void 0, wt(o, e) && (Wo(), (e => { + e.isSelected = !0 + })(e), !i && dt(e), t && Mo()) + }, + jo = e => { + or && or.confirm && e.isEditing && or.confirm(), Po(e, { + isSelected: !1, + isEditing: !1, + _prerender: !1 + }), ut(e) + }, + Uo = e => { + Po(e, { + isSelected: !0, + isEditing: !0, + _prerender: "inline" === Ke + }) + }, + Go = e => { + Po(e, { + isSelected: !0, + isEditing: !1, + _prerender: !1 + }) + }, + Zo = e => { + if (!e.length) return []; + const t = e.filter(kt); + return Me.set(oe.filter((e => !t.includes(e)))), t + }, + Yo = e => { + const t = ii(e.text, e); + return it(e.x, e.y, e.width ? Math.min(e.width, t.width) : t.width, e.height ? Math.min(e.height, t.height) : t.height) + }, + qo = e => { + if (zi(e)) return Qe(e); + if (Ti(e)) return tt(e); + const t = Yo(e); + return t.width = Math.max(10, e.width || t.width), t + }, + Ko = (e, t, o = 0, i = (() => !0)) => [...e].reverse().filter(i).map((e => ({ + shape: e, + priority: 1 + }))).filter((e => { + const { + shape: i + } = e, r = ur(gi(i), _e), n = o + .5 * (r.strokeWidth || 0); + if (Ci(r)) return Ft(t, n, r, i.rotation); + if (wi(r)) { + const o = qo(r), + a = Ft(t, n, o, i.rotation); + let s = !1; + if (a && !Ii(i)) { + const a = Yo(r); + "right" !== i.textAlign || i.flipX || (a.x = o.x + o.width - a.width), "center" === i.textAlign && (a.x = o.x + .5 * o.width - .5 * a.width), s = Ft(t, n, a, i.rotation, rt(o)), s || (e.priority = -1) + } + return a + } + return Ti(r) ? ((e, t, o, i, r, n) => { + const a = It(ce(o.x, o.y), o.rx, o.ry, i, r, n, 12); + return zt(e, t, a) + })(t, n, r, i.rotation, i.flipX, i.flipY) : Mi(r) ? At(t, Math.max(16, n), xi(r), vi(r)) : Ri(r) && r.pathClose ? zt(t, n, r.points) : !!Ri(r) && (1 === r.points.length ? Ce(t, r.points[0]) < n * n : Lt(t, Math.max(16, n), r.points)) + })).sort(((e, t) => e.priority < t.priority ? 1 : e.priority > t.priority ? -1 : 0)).map((e => e.shape)), + Jo = (e, t, o, i = 0) => { + const r = Math.abs(i), + n = je(t, o), + a = Ge(n, r), + s = (({ + start: e, + end: t + }, o) => { + if (0 === o) return [ce(e.x, e.y), ce(e.x, e.y), ce(t.x, t.y), ce(t.x, t.y)]; + const i = Math.atan2(t.y - e.y, t.x - e.x), + r = Math.sin(i) * o, + n = Math.cos(i) * o; + return [ce(r + e.x, -n + e.y), ce(-r + e.x, n + e.y), ce(-r + t.x, n + t.y), ce(r + t.x, -n + t.y)] + })(a, r); + return e.filter((e => { + const t = ur(gi(e), _e); + if (Mi(t) || Ri(t)) { + const e = t.points ? [...t.points] : [xi(t), vi(t)]; + return !!Mt(a, e) + } + return ((e, t) => !!e.find((e => Rt(e, t))) || !!t.find((t => Rt(t, e))))(s, ((e, t = 12) => { + if (Ci(e)) return mt(e, e.rotation, rt(e)); + if (wi(e)) { + const t = qo(e); + return mt(t, e.rotation, rt(t)) + } + return Ti(e) ? It(ce(e.x, e.y), e.rx, e.ry, e.rotation, e.flipX, e.flipY, t) : [] + })(t)) + })) + }; + let Qo = void 0, + ei = void 0, + ti = void 0, + oi = void 0, + ri = void 0, + ni = void 0, + ai = !1, + si = !1, + li = !1; + const ci = () => { + clearTimeout(ei), ei = void 0, o(141, li = !1), co() + }; + let di = null; + const ui = e => { + const t = Eo(e.rotation) && 0 !== e.rotation; + if (Ci(e)) { + if (e.width < 1 && e.height < 1) return; + const o = rt(e), + i = xt(e); + return (e.flipX || e.flipY) && Pe(i, e.flipX, e.flipY, o.x, o.y), t ? Ee(i, e.rotation, o.x, o.y) : i + } + if (Ti(e)) { + if (e.rx < 1 && e.ry < 1) return; + const o = e, + i = xt(tt(e)); + return (e.flipX || e.flipY) && Pe(i, e.flipX, e.flipY, o.x, o.y), t ? Ee(i, e.rotation, o.x, o.y) : i + } + if (Mi(e)) return [xi(e), vi(e)]; + if (Ri(e)) { + if (e.bitmap && !e.pathClose) { + const t = et(e.points); + t.x -= .5 * e.strokeWidth, t.y -= .5 * e.strokeWidth, t.width += e.strokeWidth, t.height += e.strokeWidth; + return ui({ + ...e, + ...t + }) + } + return [...e.points] + } + if (wi(e)) { + if (e.width < 5 && e.height < 5) return; + const o = qo(e); + o.width = Math.max(10, o.width); + const i = rt(o), + r = xt(o); + return (e.flipX || e.flipY) && Pe(r, e.flipX, e.flipY, i.x, i.y), t ? Ee(r, e.rotation, i.x, i.y) : r + } + return [] + }, + hi = e => { + const t = ui(e); + let o, i; + return e.flipY ? (o = Re([t[0], t[1]]), i = ge(ce(t[1].x - t[2].x, t[1].y - t[2].y))) : (o = Re([t[2], t[3]]), i = ge(ce(t[2].x - t[1].x, t[2].y - t[1].y))), we(i, 20 / Be), { + origin: o, + dir: i + } + }, + pi = e => t => t.id === e, + mi = e => { + const t = pi(e); + return e => e.filter((e => t => !e(t))(t)) + }, + $i = e => { + const t = pi(e), + o = mi(e); + return () => Se.update((e => e.some(t) ? o(e) : e)) + }, + fi = e => { + const t = mi(e); + return (...e) => { + Se.update((o => [...t(o), ...e.filter(Boolean)])) + } + }, + yi = $i("markup-hover"), + bi = fi("markup-hover"); + let Ei; + const Ai = "markup-manipulator-segment-" + ve, + Fi = (e, t) => { + const o = e[t], + i = t - 1 < 0 ? e[e.length - 1] : e[t - 1], + r = t + 1 < e.length ? e[t + 1] : e[0], + n = xe(ue(i), o); + ge(n); + const a = be(we(n, 10), o), + s = xe(ue(r), o); + ge(s); + return [a, o, be(we(s, 10), o)] + }, + Oi = $i(Ai), + Di = fi(Ai), + Xi = (e, t) => { + if (jt <= 0) return e; + if (t) return co(), e; + const o = Ot(e), + r = Xt(), + { + snapTranslation: n, + snapLines: a + } = fo(go(o), r, jt, Zt, i); + return lo(a), yo(e, n), e + }, + Yi = ec(0); + on(e, Yi, (e => o(178, de = e))); + const qi = "markup-grid-line-" + ve, + Ki = $i(qi), + Ji = fi(qi), + Qi = "markup-snap-line", + er = $i(Qi), + tr = fi(Qi); + let or; + const rr = e => { + o(8, or.innerHTML = Oy(e), or) + }, + nr = e => { + const t = void 0 === e.value ? e.innerHTML : e.value, + o = "text" === n.format ? Ey(t).split(/
|/g).join("\n").replace(/ /g, String.fromCharCode(160)).replace(/&/g, "&") : t; + return Si(n) && !1 !== n.disableNewline ? (e => { + const t = e.split(/[\n\r]/g); + return t.length > 1 ? t.map((e => e.trim())).filter((e => e.length)).join(" ") : t[0] + })(o) : o + }, + ar = () => { + const e = nr(or), + t = ji(n, e), + o = !0 === t ? e : t; + let i = E.x, + r = E.y; + if (!n.height) { + const e = mt({ + ...L + }, n.rotation), + t = ii(o, c), + a = mt({ + x: i, + y: r, + ...t + }, n.rotation), + [s, , l] = e, + [d, , u] = a; + let h = s, + p = d; + n.flipX && (h = l, p = u); + const m = xe(ue(h), p); + i += m.x, r += m.y + } + Po(n, { + x: T(P.x) ? Vo(i, _e.width) : i, + y: T(P.y) ? Vo(r, _e.height) : r, + text: o + }) + }, + sr = () => { + let e = s; + s && Co(), or && or.confirm && or.confirm(), ar(), Go(n), e ? lt(n) : ct(n) + }, + lr = () => { + s ? To() : (Po(n, { + text: P.text, + x: P.x, + y: P.y + }), Go(n)) + }, + cr = (e, t, { + flipX: o, + flipY: i, + rotation: r + }, n = "top left") => { + let a, s; + const [l, c, d, u] = mt(e, r), [h, p, m, g] = mt(t, r); + if ("top center" === n) { + a = Re(i ? [u, d] : [l, c]), s = Re(i ? [g, m] : [h, p]) + } else "top right" === n && !o || "top left" === n && o ? (a = i ? d : c, s = i ? m : p) : (a = i ? u : l, s = i ? g : h); + return xe(ue(a), s) + }, + dr = (e, t, o) => ce(T(e.x) ? Vo(t.x + o.x, _e.width) : t.x + o.x, T(e.y) ? Vo(t.y + o.y, _e.height) : t.y + o.y), + hr = {}, + pr = () => Uo(n), + $r = () => { + const e = He(ii(n.text, c), (e => Math.ceil(e))), + t = Ao(n, "height"), + o = !t && Ao(n, "width"), + i = n.id; + let r = hr[i]; + r || (hr[i] = {}, r = hr[i]); + const a = e => { + const { + width: t, + ...o + } = c, i = ii(n.text, o), r = cr(it(c.x, c.y, e.width, e.height), it(c.x, c.y, i.width, i.height), c, "top " + n.textAlign), a = !1 !== c.disableNewline; + Ro(n, ["width", "height", a && "textAlign"]), Po(n, { + ...dr(n, c, r) + }) + }, + s = t => { + const o = De(r.width || c.width || e.width, e.height), + i = r.textAlign || "left", + a = cr(it(c.x, c.y, t.width, t.height), it(c.x, c.y, o.width, o.height), c, "top " + i); + Ro(n, ["height"]), Po(n, { + ...dr(n, c, a), + width: T(n.width) ? Vo(o.width, _e.width) : o.width, + textAlign: i + }) + }, + l = t => { + const o = De(r.width || e.width, r.height || e.height), + i = r.textAlign || "left", + a = cr(it(c.x, c.y, t.width, t.height), it(c.x, c.y, o.width, o.height), c, "top " + i); + Po(n, { + ...dr(n, c, a), + width: T(n.width) ? Vo(o.width, _e.width) : o.width, + height: T(n.width) ? Vo(o.height, _e.height) : o.height, + textAlign: i + }) + }; + if (t) { + r.textAlign = n.textAlign, r.width = c.width, r.height = c.height; + const e = De(c.width, c.height); + Ui(n, "auto-height") ? s(e) : Ui(n, "auto-width") && a(e) + } else if (o) { + r.textAlign = n.textAlign, r.width = c.width; + const t = De(c.width, e.height); + Ui(n, "auto-width") ? a(t) : Ui(n, "fixed-size") && l(t) + } else { + r.textAlign = n.textAlign; + const t = De(Math.ceil(e.width), Math.ceil(e.height)); + Ui(n, "fixed-size") ? l(t) : Ui(n, "auto-height") && s(t) + } + }, + fr = e => { + e.stopPropagation(); + const t = n.flipX || !1; + Io(n, "flipX", !t), ct(n) + }, + yr = e => { + e.stopPropagation(); + const t = n.flipY || !1; + Io(n, "flipY", !t), ct(n) + }, + br = e => { + Io(n, "opacity", e) + }, + xr = e => { + br(e), ct(n) + }, + vr = e => { + e.stopPropagation(), e.target.blur(), Do() + }, + wr = e => { + e.stopPropagation(); + oe.findIndex((e => e === n)) !== oe.length - 1 && (Me.set(oe.filter((e => e !== n)).concat([n])), ct(n)) + }, + Sr = e => { + e.stopPropagation(), kr() + }, + kr = () => { + const e = gi(n); + e.id = I(); + const t = ce(50, -50); + if (Ao(e, "points")) { + const o = mr(e, ["points"], _e); + o.points.forEach((e => { + e.x += t.x, e.y += t.y + })), gr(e, o, _e) + } else if (Mi(e)) { + const o = mr(e, ["x1", "y1", "x2", "y2"], _e); + o.x1 += t.x, o.y1 += t.y, o.x2 += t.x, o.y2 += t.y, gr(e, o, _e) + } else { + const t = mr(e, ["x", "y"], _e); + t.x += 50, t.y -= 50, gr(e, t, _e) + } + Me.set([...oe, e]), lt(e), Ho(e) + }, + Cr = ec(0, { + stiffness: .2, + damping: .7 + }); + let Tr; + on(e, Cr, (e => o(17, ie = e))); + const Mr = (e, t) => { + const { + disableTextLayout: o = [] + } = t; + return "height" in t ? o.includes("auto-height") ? e.shapeIconButtonTextLayoutAutoWidth : e.shapeIconButtonTextLayoutAutoHeight : "width" in t ? o.includes("auto-width") ? e.shapeIconButtonTextLayoutFixedSize : e.shapeIconButtonTextLayoutAutoWidth : o.includes("fixed-size") ? e.shapeIconButtonTextLayoutAutoHeight : e.shapeIconButtonTextLayoutFixedSize + }, + Rr = (e, t) => { + const { + disableTextLayout: o = [] + } = t; + return "height" in t ? o.includes("auto-height") ? e.shapeTitleButtonTextLayoutAutoWidth : e.shapeTitleButtonTextLayoutAutoHeight : "width" in t ? o.includes("auto-width") ? e.shapeTitleButtonTextLayoutFixedSize : e.shapeTitleButtonTextLayoutAutoWidth : o.includes("fixed-size") ? e.shapeTitleButtonTextLayoutAutoHeight : e.shapeTitleButtonTextLayoutFixedSize + }; + let Pr = !1; + let Er = le(), + Ir = void 0; + const Ar = e => { + gt(e), o(142, Ei = e) + }; + let Lr; + Yn((() => { + er(), Ki(), Oi(), yi() + })); + return e.$$set = e => { + "uid" in e && o(57, ve = e.uid), "ui" in e && o(58, Se = e.ui), "disabled" in e && o(0, ke = e.disabled), "shapes" in e && me(o(1, Me = e.shapes)), "selection" in e && o(59, Ie = e.selection), "offset" in e && o(2, Ae = e.offset), "contextRotation" in e && o(60, ze = e.contextRotation), "contextFlipX" in e && o(61, Fe = e.contextFlipX), "contextFlipY" in e && o(62, Oe = e.contextFlipY), "contextZoom" in e && o(63, Be = e.contextZoom), "active" in e && o(64, We = e.active), "opacity" in e && o(65, Ve = e.opacity), "parentRect" in e && o(66, _e = e.parentRect), "rootRect" in e && o(3, Ne = e.rootRect), "utilRect" in e && o(67, Ue = e.utilRect), "hoverColor" in e && o(68, Ze = e.hoverColor), "caretColor" in e && o(69, Xe = e.caretColor), "gridColor" in e && o(70, Ye = e.gridColor), "snapColor" in e && o(71, qe = e.snapColor), "textInputMode" in e && o(4, Ke = e.textInputMode), "oninteractionstart" in e && o(72, Je = e.oninteractionstart), "oninteractionupdate" in e && o(73, ot = e.oninteractionupdate), "oninteractionrelease" in e && o(74, nt = e.oninteractionrelease), "oninteractionend" in e && o(75, at = e.oninteractionend), "oninteractioncancel" in e && o(76, st = e.oninteractioncancel), "onaddshape" in e && o(77, lt = e.onaddshape), "onupdateshape" in e && o(78, ct = e.onupdateshape), "onselectshape" in e && o(79, dt = e.onselectshape), "onblurshape" in e && o(80, ut = e.onblurshape), "onremoveshape" in e && o(81, ht = e.onremoveshape), "ontapshape" in e && o(82, pt = e.ontapshape), "onhovershape" in e && o(83, gt = e.onhovershape), "onhovercanvas" in e && o(84, $t = e.onhovercanvas), "ontapcanvas" in e && o(85, ft = e.ontapcanvas), "onleavecanvas" in e && o(86, vt = e.onleavecanvas), "beforeSelectShape" in e && o(87, wt = e.beforeSelectShape), "beforeDeselectShape" in e && o(88, St = e.beforeDeselectShape), "beforeRemoveShape" in e && o(89, kt = e.beforeRemoveShape), "beforeUpdateShape" in e && o(90, Ct = e.beforeUpdateShape), "willRenderShapeControls" in e && o(91, Tt = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(92, Pt = e.willRenderShapeTextControls), "willStartInteraction" in e && o(93, Et = e.willStartInteraction), "mapEditorPointToImagePoint" in e && o(94, Ot = e.mapEditorPointToImagePoint), "mapImagePointToEditorPoint" in e && o(95, Dt = e.mapImagePointToEditorPoint), "eraseRadius" in e && o(96, Bt = e.eraseRadius), "selectRadius" in e && o(97, Wt = e.selectRadius), "enableButtonFlipVertical" in e && o(98, Vt = e.enableButtonFlipVertical), "enableTapToAddText" in e && o(99, _t = e.enableTapToAddText), "enableTextStyleControls" in e && o(5, Nt = e.enableTextStyleControls), "locale" in e && o(6, Ht = e.locale), "snapThreshold" in e && o(100, jt = e.snapThreshold), "snapPointer" in e && o(101, Ut = e.snapPointer), "enableSnapToContext" in e && o(102, Gt = e.enableSnapToContext), "gridSize" in e && o(103, Zt = e.gridSize) + }, e.$$.update = () => { + var t, r; + 16 & e.$$.dirty[2] | 1024 & e.$$.dirty[3] && o(166, i = Zt > 0 ? { + x: 0, + y: 0, + ..._e + } : void 0), 1 & e.$$.dirty[0] | 1048576 & e.$$.dirty[5] && o(146, n = !ke && oe && (So() || zo())), 4194304 & e.$$.dirty[4] && o(173, a = !!n), 4194304 & e.$$.dirty[4] && o(160, s = n && Li(n)), 4194304 & e.$$.dirty[4] | 32 & e.$$.dirty[5] && o(10, l = n && !s ? n.id : void 0), 8 & e.$$.dirty[0] | 16 & e.$$.dirty[2] | 4194304 & e.$$.dirty[4] && o(13, c = Ne && n && ur(gi(n), _e)), 4194304 & e.$$.dirty[4] | 32 & e.$$.dirty[5] && o(144, d = !(!n || !s)), 8192 & e.$$.dirty[0] | 8 & e.$$.dirty[2] | 4194304 & e.$$.dirty[4] && o(172, u = n && Ve && ui(c) || []), 4194304 & e.$$.dirty[4] && o(174, h = n && (Gi(t = n) && Zi(t) && !0 !== t.disableResize && (zi(t) || ki(t) || Ti(t) || Mi(t) || Ri(t) && Ao(t, "pathClose"))) && !Pi(n)), 4194304 & e.$$.dirty[4] && o(14, p = n && (e => Gi(e) && !0 !== e.disableRotate && (zi(e) || Ao(e, "text") || Ti(e)))(n) && !Pi(n)), 4194304 & e.$$.dirty[4] | 524288 & e.$$.dirty[5] && o(16, m = h && Ao(n, "text") && !n.height ? [ + [1, 2], + [3, 0] + ] : (!n || !Mi(n) && !Ri(n)) && h), 65536 & e.$$.dirty[0] | 4194304 & e.$$.dirty[4] | 524288 & e.$$.dirty[5] && o(28, g = !!n && (!Array.isArray(m) && h)), 4194304 & e.$$.dirty[4] | 131072 & e.$$.dirty[5] && o(15, $ = n && u.length > 1), 4 & e.$$.dirty[3] | 131072 & e.$$.dirty[5] && o(170, f = u.map(Dt)), 4 & e.$$.dirty[0] | 32768 & e.$$.dirty[5] && o(12, y = f.map((e => ce(e.x - Ae.x, e.y - Ae.y)))), 4194304 & e.$$.dirty[4] | 262144 & e.$$.dirty[5] && o(27, b = a && (ki(n) ? !Ao(n, "disableNewline") || !n.disableNewline : !1 === n.disableNewline)), 4 & e.$$.dirty[3] | 262144 & e.$$.dirty[4] && (Ei && Dt && !Ii(Ei) && _i(Ei) ? (e => { + const t = ui(ur(gi(e), _e)); + if (!t) return; + const o = t.map(Dt), + i = !!e.pathClose || !(!e.bitmap && (Ri(e) || Mi(e))), + r = "hook" === e.selectionStyle, + n = r ? o.map(((e, t, o) => ({ + id: "markup-hover", + points: Fi(o, t), + strokeColor: [0, 0, 0, .1], + strokeWidth: 2 + }))) : [{ + id: "markup-hover", + points: o.map((e => ce(e.x + 1, e.y + 1))), + strokeColor: [0, 0, 0, .1], + strokeWidth: 2, + pathClose: i + }], + a = r ? o.map(((e, t, o) => ({ + id: "markup-hover", + points: Fi(o, t), + strokeColor: Ze, + strokeWidth: 2 + }))) : [{ + id: "markup-hover", + points: o, + strokeColor: Ze, + strokeWidth: 2, + pathClose: i + }]; + bi(...n, ...a) + })(Ei) : yi()), 61440 & e.$$.dirty[0] | 8 & e.$$.dirty[2] && o(171, x = $ && p && Ve && y && (e => { + const t = hi(e), + o = Dt({ + x: t.origin.x + t.dir.x, + y: t.origin.y + t.dir.y + }); + return { + origin: Dt(t.origin), + position: o + } + })(c)), 4 & e.$$.dirty[0] | 65536 & e.$$.dirty[5] && o(26, v = x && ce(x.position.x - Ae.x, x.position.y - Ae.y)), 4194304 & e.$$.dirty[5] && o(165, C = !!(ae || []).find((e => [91, 93, 17].includes(e)))), 256 & e.$$.dirty[3] | 1024 & e.$$.dirty[5] && o(167, w = !(C || !Ut)), 8 & e.$$.dirty[2] | 4718592 & e.$$.dirty[4] | 36896 & e.$$.dirty[5] && n && f && Ve > 0 && ((e, t, o) => { + if (!_i(t)) return; + const i = Ri(t), + r = i && Ao(t, "pathClose"), + n = r && (e => e.strokeWidth && ((e, t) => { + const o = e.strokeColor; + return !!o && (3 === o.length || o[3] > 0) + })(e))(t), + a = Li(t), + s = Pi(t), + l = "hook" === t.selectionStyle, + { + selectionOpacity: c = 1 + } = t; + if (a && i && !r) return; + const d = [], + h = [...f], + p = h[h.length - 1], + m = h[0], + g = (s ? .05 : .1) * e * c, + $ = g > 0, + y = (s ? .5 : 1) * e * c, + b = y > 0, + v = [0, 0, 0], + w = [1, 1, 1], + S = s ? 1 : 1.5; + ae.includes(16) && p && o && no(p, o); + const k = (h.length && r && a && o ? Ce(m, o) : 1 / 0) <= 256, + C = (h.length && r && a && o ? Ce(p, o) : 1 / 0) <= 256; + !k && o && h.push(o); + const T = h.length > 1, + M = !!t.pathClose || !(!t.bitmap && (Ri(t) || Mi(t))) || h.length > 2 && k; + T && $ && (l ? d.push(...h.map(((e, t, o) => ({ + id: Ai, + points: Fi(o, t), + strokeColor: v, + strokeWidth: 2, + opacity: g + })))) : d.push({ + id: Ai, + points: h.map((e => ce(e.x + 1, e.y + 1))), + pathClose: M, + strokeColor: v, + strokeWidth: 2, + opacity: g + })), r && $ && d.push(...h.map((e => ({ + id: Ai, + ...e, + rx: 2 * S, + ry: 2 * S, + backgroundColor: v, + opacity: g + })))), x && $ && d.push({ + id: Ai, + points: [ce(x.origin.x + 1, x.origin.y + 1), ce(x.position.x + 1, x.position.y + 1)], + strokeColor: v, + strokeWidth: 2, + opacity: g + }), T && b && (l ? d.push(...h.map(((e, t, o) => ({ + id: Ai, + points: Fi(o, t), + strokeColor: w, + strokeWidth: S, + opacity: y + })))) : d.push({ + id: Ai, + points: h, + pathClose: M, + strokeColor: w, + strokeWidth: S, + backgroundColor: a && r && t.backgroundColor && t.backgroundColor[3] > 0 ? t.backgroundColor : [0, 0, 0, 0], + opacity: y + })), r && d.push(...h.map((e => ({ + id: Ai, + ...e, + rx: 3 * S, + ry: 3 * S, + backgroundColor: [.5, .5, .5], + strokeWidth: S, + strokeColor: w + })))), r && a && f.length >= 3 && d.push({ + ...m, + id: Ai, + rx: S * (k ? 5 : 4), + ry: S * (k ? 5 : 4), + backgroundColor: k ? Ze : [.5, .5, .5], + strokeWidth: S, + strokeColor: w + }), r && a && n && !k && u.length >= 2 && d.push({ + ...p, + id: Ai, + rx: S * (C ? 5 : 4), + ry: S * (C ? 5 : 4), + backgroundColor: C ? Ze : [.5, .5, .5], + strokeWidth: S, + strokeColor: w + }), x && b && !l && d.push({ + id: Ai, + points: [{ + x: x.origin.x, + y: x.origin.y + }, { + x: x.position.x, + y: x.position.y + }], + strokeColor: w, + strokeWidth: S, + opacity: y + }), Di(...d) + })(Ve, n, s && Ri(n) ? Xi({ + ...Ir + }, !w) : void 0), 4194304 & e.$$.dirty[4] && (n || Oi()), 262144 & e.$$.dirty[4] && o(168, S = !!Ei), 65536 & e.$$.dirty[4] && o(169, k = !!oi), 524288 & e.$$.dirty[4] | 28672 & e.$$.dirty[5] && (!Ir || k || S || Xi({ + ...Ir + }, !w)), 256 & e.$$.dirty[2] | 1028 & e.$$.dirty[3] | 8390656 & e.$$.dirty[5] && Zt > 0 && i && Dt && ((e, t, o, i) => { + const r = Dt({ + x: 0, + y: 0 + }), + n = Dt({ + x: e, + y: e + }), + a = Dt({ + x: t.width, + y: t.height + }), + s = n.x - r.x; + if (Yi.set(s > 6 ? 1 : 0), i <= 0) return Ki(); + const l = mo(s, r.x, a.x).map((e => ({ + id: qi, + opacity: i, + points: [{ + x: e, + y: r.y + }, { + x: e, + y: a.y + }], + strokeWidth: 1, + strokeColor: o + }))), + c = mo(s, r.y, a.y).map((e => ({ + id: qi, + opacity: i, + points: [{ + x: r.x, + y: e + }, { + x: a.x, + y: e + }], + strokeWidth: 1, + strokeColor: o + }))); + Ji(...c, ...l) + })(Zt, i, Ye, de), 512 & e.$$.dirty[2] | 4 & e.$$.dirty[3] | 49152 & e.$$.dirty[4] | 1024 & e.$$.dirty[5] && Dt && (C ? er() : ((e, t, o) => { + if (null === e && null === t) return er(); + let i, r; + null !== e && (i = { + id: Qi, + strokeColor: o, + strokeWidth: 1.5, + points: [Dt({ + x: e, + y: 0 + }), Dt({ + x: e, + y: _e.height + })] + }), null !== t && (r = { + id: Qi, + strokeColor: o, + strokeWidth: 1.5, + points: [Dt({ + x: 0, + y: t + }), Dt({ + x: _e.width, + y: t + })] + }), tr(i, r) + })(uo, ho, qe)), 4 & e.$$.dirty[2] && (e => { + if (!e) return Lo({ + _prerender: !1 + }); + const t = oe.find((e => e.isEditing)); + t && Po(t, { + _prerender: "inline" === Ke + }) + })(We), 4194304 & e.$$.dirty[5] && ae && ae.length && (() => { + const [e] = ae; + 8 !== e && 46 !== e || Fo() && (n.isEditing || setTimeout((() => Do()), 0)) + })(), 272 & e.$$.dirty[0] && or && "inline" === Ke && or.focus(), 4194304 & e.$$.dirty[4] && o(164, M = n && wi(n)), 4194304 & e.$$.dirty[4] | 512 & e.$$.dirty[5] && o(11, R = M && !1 !== ji(n) && Pi(n)), 2048 & e.$$.dirty[0] && o(159, P = R ? { + ...n + } : void 0), 16 & e.$$.dirty[2] | 16 & e.$$.dirty[5] && o(161, E = P && ur({ + ...P + }, _e)), 64 & e.$$.dirty[5] && o(163, A = E && ii(E.text, E)), 320 & e.$$.dirty[5] && (L = E && it(E.x, E.y, A.width, A.height)), 2048 & e.$$.dirty[0] | 4194304 & e.$$.dirty[4] && o(23, z = R ? n.text : ""), 2056 & e.$$.dirty[0] | 16 & e.$$.dirty[2] | 4194304 & e.$$.dirty[4] && o(162, F = Ne && n && R && ur({ + ...gi(n), + width: Eo(n.width) ? Math.floor(n.width) : void 0, + height: Eo(n.height) ? Math.floor(n.height) : void 0 + }, _e)), 2064 & e.$$.dirty[0] | 128 & e.$$.dirty[5] && o(25, O = R && ((e, t) => { + const { + textAlign: o = "left", + fontFamily: i = "sans-serif", + fontWeight: r = "normal", + fontStyle: n = "normal", + letterSpacing: a = "normal", + textShadowX: s = 0, + textShadowY: l = 0, + textShadowBlur: c = 0, + textShadowColor: d, + textOutlineWidth: u = 0, + textOutlineColor: h + } = e, p = "!important", m = `caret-color:${B};text-align:${o}${p};font-family:${i}${p};font-weight:${r}${p};font-style:${n}${p};letter-spacing:${Eo(a)?a+"px":"normal"}${p}`; + if ("modal" === t) return m; + const g = u ? `;-webkit-text-stroke:${2*u}px ${_o(h)} ${p}` : "", + $ = c || s || l ? `;text-shadow:${s}px ${l}px ${c}px ${_o(d)} ${p}` : ""; + let f = e.fontSize, + y = 1, + b = ""; + f > 1e3 && Xo() && (y = f / 1e3, b = `transform-origin:0 0;transform:scale(${y})`, f = 1e3); + let x = e.lineHeight / y; + const v = _o(e.color), + w = .5 * Math.max(0, f - x); + return `--font-scalar:${y};--bottom-inset:${w}px;padding:${w}px 0 0${p};color:${v}${p};font-size:${f}px${p};line-height:${x}px${p};${m};${b}${g}${$}` + })(F, Ke)), 2052 & e.$$.dirty[0] | 536870912 & e.$$.dirty[1] | 2 & e.$$.dirty[2] | 128 & e.$$.dirty[5] && o(24, D = R && ((e, t, o, i) => { + let r, a; + e.width && e.height ? (r = rt(e), a = Le(e)) : (a = ii(n.text, c), a.width = c.width || a.width, r = ce(e.x + .5 * a.width, e.y + .5 * a.height)); + const s = Math.max(0, e.fontSize - e.lineHeight) + e.lineHeight, + l = Dt(r); + let d = l.x - t.x - .5 * a.width, + u = l.y - t.y - .5 * a.height, + h = e.flipX, + p = e.flipY, + m = e.rotation; + Fe && Oe ? (h = !h, p = !p) : Fe ? (h = !h, m = -m) : Oe && (p = !p, m = -m), m += i; + const g = o * (h ? -1 : 1), + $ = o * (p ? -1 : 1); + return `--line-height:${s}px;width:${a.width}px;height:${a.height}px;transform:translate(${d}px,${u}px) rotate(${m}rad) scale(${g}, ${$})` + })(F, Ae, Be, ze)), 128 & e.$$.dirty[2] && (B = _o(Xe)), 2320 & e.$$.dirty[0] && R && or && "inline" === Ke && rr(z), 72351744 & e.$$.dirty[4] && o(150, W = n && !d ? n : W), 67108864 & e.$$.dirty[4] && o(152, V = W && Hi(W)), 67108864 & e.$$.dirty[4] && o(147, _ = W && Ui(W)), 67108864 & e.$$.dirty[4] && o(149, N = W && (e => !0 !== e.disableDuplicate && Zi(e))(W)), 67108864 & e.$$.dirty[4] && o(148, H = W && Ni(W)), 67108864 & e.$$.dirty[4] && o(151, U = W && (e => !0 !== e.disableReorder)(W)), 67108864 & e.$$.dirty[4] && o(145, G = W && !1 !== ji(W)), 67108864 & e.$$.dirty[4] && o(153, Z = W && Ao(W, "backgroundImage") && Vi(W, "opacity")), 4194304 & e.$$.dirty[4] && o(155, X = n && "html" === n.format), 5242880 & e.$$.dirty[4] | 1 & e.$$.dirty[5] && o(158, Y = n && (!d || X)), 131072 & e.$$.dirty[4] | 2097160 & e.$$.dirty[5] && Cr.set(Y && !li ? 1 : 0, { + hard: !1 === re + }), 4096 & e.$$.dirty[0] | 12 & e.$$.dirty[5] && o(157, q = Y && y.length ? (r = et(y), ye(ce(r.x + .5 * r.width, r.y), Hd)) : q), 512 & e.$$.dirty[0] | 32 & e.$$.dirty[2] | 4 & e.$$.dirty[5] && o(156, K = q && Tr && Ue && (e => { + const t = Ue.x, + o = Ue.y, + i = t + Ue.width; + let r = Math.max(e.x - .5 * Tr.width, t), + n = Math.max(e.y - Tr.height - 16, o); + return r + Tr.width > i && (r = i - Tr.width), ce(r, n) + })(q)), 131072 & e.$$.dirty[0] | 2 & e.$$.dirty[5] && o(22, J = K && `transform: translate(${K.x}px, ${K.y}px);opacity:${ie}`), 2048 & e.$$.dirty[0] && o(154, Q = R ? "text" : "shape"), 1088 & e.$$.dirty[0] | 1610612736 & e.$$.dirty[2] | 32 & e.$$.dirty[3] | 2145386496 & e.$$.dirty[4] | 1048577 & e.$$.dirty[5] && o(21, ee = "text" === Q && Pt && X ? zp((() => Pt([ + ["div", "text-styles", { + class: "PinturaShapeControlsGroup" + }, + [...[ + ["bold", { + label: "B", + style: "font-weight:900;", + title: "Bold", + shortcut: ["CMD", "B"] + }], + ["italic", { + label: "I", + style: "font-family:Times New Roman;font-style:italic;", + title: "Italic", + shortcut: ["CMD", "I"] + }], + ["underline", { + label: "U", + style: "text-decoration:underline;", + title: "Underline", + shortcut: ["CMD", "U"] + }], + ["strikeThrough", { + label: "S", + style: "text-decoration:line-through;", + title: "Strikethrough", + shortcut: ["CMD", "S"] + }] + ].map((([e, t]) => ["Button", "style-" + e, { + onclick: () => document.execCommand(e), + ...t, + style: "font-size:1.25em;text-underline-offset:1px;text-decoration-thickness:1.5px;font-weight:400;" + t.style + }]))] + ], + ["div", "text-reset", { + class: "PinturaShapeControlsGroup" + }, + [ + ["Button", "style-reset", { + onclick: () => document.execCommand("removeFormat"), + style: "font-weight:400;", + label: 'T×', + title: "Remove styles" + }] + ] + ] + ], l))) : "shape" === Q && Tt && l ? zp((() => Tt([Z && ["div", "alpha", { + class: "PinturaShapeControlsGroup" + }, + [ + ["ToggleSlider", "adjust-opacity", { + onrelease: xr, + onchange: br, + step: .01, + value: Ao(n, "opacity") ? n.opacity : 1, + label: (e, t, o) => Math.round(e / o * 100) + "%", + min: 0, + max: 1, + direction: "x" + }] + ] + ], + ["div", "beta", { + class: "PinturaShapeControlsGroup" + }, + [V && ["Button", "flip-horizontal", { + onclick: fr, + label: Ht.shapeTitleButtonFlipHorizontal, + icon: Ht.shapeIconButtonFlipHorizontal, + hideLabel: !0 + }], V && Vt && ["Button", "flip-vertical", { + onclick: yr, + label: Ht.shapeTitleButtonFlipVertical, + icon: Ht.shapeIconButtonFlipVertical, + hideLabel: !0 + }], U && ["Button", "to-front", { + onclick: wr, + label: Ht.shapeTitleButtonMoveToFront, + icon: Ht.shapeIconButtonMoveToFront, + hideLabel: !0, + disabled: oe[oe.length - 1] === W + }], N && ["Button", "duplicate", { + onclick: Sr, + label: Ht.shapeTitleButtonDuplicate, + icon: Ht.shapeIconButtonDuplicate, + shortcut: ["CMD", "D"], + hideLabel: !0 + }], H && ["Button", "remove", { + onclick: vr, + label: Ht.shapeTitleButtonRemove, + icon: Ht.shapeIconButtonRemove, + shortcut: ["Backspace"], + hideLabel: !0 + }]].filter(Boolean) + ], G && _ && ["div", "gamma", { + class: "PinturaShapeControlsGroup" + }, + [ + ["Button", "text-layout", { + onclick: $r, + label: du(Rr, Ht, n), + icon: du(Mr, Ht, n), + hideLabel: !0 + }] + ] + ], G && ["div", "delta", { + class: "PinturaShapeControlsGroup" + }, + [ + ["Button", "edit-text", { + label: Ht.shapeLabelInputText, + onclick: pr + }] + ] + ] + ].filter(Boolean), l))) : []), 64 & e.$$.dirty[0] | 1048576 & e.$$.dirty[5] && o(20, te = oe.filter(_i).filter((e => e.id)).filter((e => !Li(e))).map((e => ({ + id: e.id, + color: wi(e) ? e.color : Mi(e) ? e.strokeColor : e.backgroundColor, + name: e.name || Ht["shapeLabelTool" + Ya(ir(e))] + })))) + }, [ke, Me, Ae, Ne, Ke, Nt, Ht, Ho, or, Tr, l, R, y, c, p, $, m, ie, Pr, Lr, te, ee, J, z, D, O, v, b, g, qt, ao, e => { + const { + origin: t + } = e.detail; + o(140, oi = void 0), ri = void 0, ni = void 0, ai = !1, ti = void 0, si = !1, co(), clearTimeout(ei), ei = setTimeout((() => o(141, li = !0)), 250); + const i = So(); + if (!i || Ri(i) && Ao(i, "pathClose") || Co(), Qo = Ot(ue(t)), i && Ri(i) && Ao(i, "pathClose")) return Je(e); + const r = Ko(oe, Qo, Wt, (e => _i(e))), + a = r.length && r.shift(); + if (n && Pi(n) && (sr(), _t && (si = !0)), !a && n && Pi(n) && jo(n), !Et(t)) return; + if (a && Ii(a)) return ai = !0, o(140, oi = a), ri = gi(oi), void(ni = ur(gi(oi), _e)); + ti = a || void 0; + !Je(e) && a && (Ho(a), o(140, oi = a), ri = gi(oi), ni = ur(gi(oi), _e)) + }, e => { + ci(), st(e) + }, e => { + const { + translation: t, + ctrlKey: o, + metaKey: r, + shiftKey: n, + position: a + } = e.detail; + if (oi) { + if (!Zi(oi)) return; + if (Pi(oi)) return; + if (n) { + let e = Math.abs(t.x), + o = Math.abs(t.y); + "x" === di && (o -= 64), "y" === di && (e -= 64), e > o ? (t.y = 0, di = "x") : o > e && (t.x = 0, di = "y") + } else di = null; + return bo(oi, ni, t, { + ...Yt(o || r ? 0 : jt, Zt, i, oi) + }) + } + ot(e) + }, e => { + ci(), oi ? Pi(oi) ? lr() : e.detail.isTap && ai && wi(oi) && !1 !== ji(oi) && Uo(oi) : nt(e) + }, e => { + const t = ti && e.detail.isTap; + if (e.detail.isTap && setTimeout((() => { + ft({ + target: oi || ti, + position: Qo + }, 0) + })), oi) return pt(oi), i = oi, r = ri, JSON.stringify(i) !== JSON.stringify(r) && ct(oi), void o(140, oi = void 0); + var i, r; + const n = No(), + a = !n || St(n, ti || void 0); + a && Wo({ + storePrevious: !1 + }), at(e), a && t && Ho(ti) + }, Yi, e => { + o(141, li = !0), o(140, oi = n), ni = c + }, e => { + if (!oi) return void o(141, li = !1); + const { + translation: t, + indexes: n, + shiftKey: a, + ctrlKey: s, + metaKey: l + } = e.detail; + ((e, t, o, i, n) => { + const { + snapThreshold: a = 0, + gridSize: s = 0, + gridRect: l, + snapTargets: c = [] + } = n || {}, d = a ? (e, t, o) => { + const { + snapTranslation: i, + snapLines: r + } = fo(go(e), c, a, s, l); + yo(t, i), lo(r); + const n = po(o(), t); + e.x = n.x, e.y = n.y + } : r; + if (Mi(e) || Ri(e) && Ao(e, "pathClose")) { + const [r] = o, n = ae.includes(16) ? no : (e, t) => t; + let a, s, l; + if (Mi(e)) 0 === r ? (a = () => xi(t), s = e => n(vi(t), e), l = (e, t) => { + e.x1 = t.x, e.y1 = t.y + }) : 1 === r && (a = () => vi(t), s = e => n(xi(t), e), l = (e, t) => { + e.x2 = t.x, e.y2 = t.y + }); + else { + const e = t.points; + a = () => ({ + ...e[r] + }), s = t => { + const o = e[xy(r - 1, e)], + i = e[xy(r + 1, e)]; + n(o, t), n(i, t) + }, l = (e, t) => e.points[r] = t + } + const c = po(a(), i); + d(c, i, a), s(c), l(e, c) + } else if (zi(e) || Ti(e) || ki(e)) { + let r, a, s = !1; + if (Ti(e)) r = tt(t); + else if (zi(e)) r = Qe(t); + else { + s = !0, r = Qe(t); + const e = ii(t.text, t); + r.height = e.height + } + e.aspectRatio ? a = e.aspectRatio : n.shiftKey && !s && (a = r.width / r.height); + const l = Qe(r), + c = rt(l), + u = e.rotation, + h = xt(l), + p = mt(l, u); + if (1 === o.length) { + let t = o[0]; + e.flipX && (t = xo[t]), e.flipY && (t = vo[t]); + const [r, n, s, l] = h, m = Dt(p[t]), g = be({ + ...m + }, i), $ = Ot(g); + d($, i, (() => Ot(m))); + const f = ce($.x - p[t].x, $.y - p[t].y), + y = pe(ue(f), -u), + b = ce(h[t].x + y.x, h[t].y + y.y); + let x; + 0 === t && (x = s), 1 === t && (x = l), 2 === t && (x = r), 3 === t && (x = n); + const v = et([x, b]); + if (a) { + const { + width: e, + height: t + } = yt(v, a), [o, i, r, n] = bt(v); + v.width = e, v.height = t, b.y < x.y && (v.y = r - t), b.x < x.x && (v.x = i - e) + } + const w = mt(v, u, c), + S = Re(w), + k = pe(w[0], -u, S), + C = pe(w[2], -u, S), + T = et([k, C]); + ro(e, Ti(e) ? se(T) : T, _e) + } else { + o = o.map((t => (e.flipX && (t = xo[t]), e.flipY && (t = vo[t]), t))); + const [t, r] = o.map((e => p[e])), n = { + x: t.x + .5 * (r.x - t.x), + y: t.y + .5 * (r.y - t.y) + }, [l, m] = o.map((e => h[e])), [g, $] = o.map((e => { + const t = e + 2; + return t < 4 ? h[t] : h[t - 4] + })), f = { + x: g.x + .5 * ($.x - g.x), + y: g.y + .5 * ($.y - g.y) + }, y = Dt(n), b = be({ + ...y + }, i), x = Ot(b); + d(x, i, (() => Ot(y))); + const v = ce(x.x - n.x, x.y - n.y), + w = pe(ue(v), -u), + S = xe(ue(l), m), + k = ye(S, (e => 1 - Math.abs(Math.sign(e)))), + C = ce(w.x * k.x, w.y * k.y); + be(l, C), be(m, C); + const T = et(h); + if (a) { + let e = T.width, + t = T.height; + 0 === k.y ? t = e / a : e = t * a, T.width = e, T.height = t, 0 === k.y ? T.y = f.y - .5 * t : T.x = f.x - .5 * e + } + const M = mt(T, u, c), + R = Re(M), + P = pe(M[0], -u, R), + E = pe(M[2], -u, R), + I = et([P, E]); + let A; + Ti(e) ? A = se(I) : zi(e) ? A = I : s && (A = { + x: I.x, + y: I.y, + width: I.width + }), ro(e, A, _e) + } + } + Mo() + })(oi, ni, n, t, { + shiftKey: a, + ...Yt(s || l ? 0 : jt, Zt, i, oi) + }) + }, e => { + if (!oi) return void o(141, li = !1); + Ho(oi); + const { + isTap: t + } = e.detail; + t && pt(oi), o(140, oi = void 0), o(141, li = !1), ct(n) + }, e => { + wo = hi(c).origin, o(141, li = !0), o(140, oi = n), ni = c + }, e => { + if (!oi) return void o(141, li = !1); + const { + translation: t, + shiftKey: i + } = e.detail; + ((e, t, o, i) => { + const r = qo(ur(gi(e), _e)), + n = rt(r), + a = po(wo, o); + let s = $e(a, n) + Math.PI / 2; + if (i.shiftKey) { + const e = Math.PI / 16; + s = e * Math.round(s / e) - ze % e + } + ro(e, { + rotation: s + }, _e), Mo() + })(oi, 0, t, { + shiftKey: i + }) + }, () => { + oi ? (Ho(oi), o(140, oi = void 0), o(141, li = !1), ct(n)) : o(141, li = !1) + }, e => { + const { + key: t + } = e, o = /escape/i.test(t); + if (Fo()) return o ? (e.preventDefault(), e.stopPropagation(), jo(n)) : void(N && "d" === t && (e.metaKey || e.ctrlKey) && (e.preventDefault(), e.stopPropagation(), kr())) + }, e => { + const t = ji(n, e); + return !0 === t ? e : t + }, ar, e => { + const { + target: t, + key: o + } = e, i = t.value || t.innerText, r = t.selectionStart || 0, a = t.selectionEnd || i.length, s = i.substring(0, r) + o + i.substring(a); + if (ji(n, s) !== s) return e.preventDefault() + }, e => Si(n) && /enter/i.test(e.code) && !1 !== n.disableNewline ? e.preventDefault() : /arrow/i.test(e.code) ? e.stopPropagation() : /escape/i.test(e.key) ? lr() : void 0, e => { + const { + key: t, + ctrlKey: o, + altKey: i + } = e; + if (/enter/i.test(t) && (o || i)) return sr() + }, sr, lr, Cr, e => { + const t = zo(); + t && (Pi(t) || Zi(t) && (o(140, oi = t), ni = ur(gi(oi), _e), bo(oi, ni, e.detail))) + }, e => { + o(18, Pr = !0) + }, ({ + relatedTarget: e + }) => { + e && e.classList.contains("shape-selector__button") || o(18, Pr = !1) + }, e => { + if ("touch" === e.pointerType || "PinturaShapeEditor" !== e.target.className) return void vt(); + (li || ei) && Ar(void 0); + const t = Ry(e, Ne); + o(143, Ir = ue(t)); + const i = ye(Ot(t), (e => Math.round(e))); + if (fe(i, Er)) return; + if (Er = ue(i), $t(li, t, i), li || ei) return; + if (d) return; + const [r] = Ko(oe, i, 0, _i); + r && Li(r) || Ar(r) + }, e => { + "touch" !== e.pointerType && vt() + }, ve, Se, Ie, ze, Fe, Oe, Be, We, Ve, _e, Ue, Ze, Xe, Ye, qe, Je, ot, nt, at, st, lt, ct, dt, ut, ht, pt, gt, $t, ft, vt, wt, St, kt, Ct, Tt, Pt, Et, Ot, Dt, Bt, Wt, Vt, _t, jt, Ut, Gt, Zt, Kt, Jt, Qt, eo, to, oo, io, (e, t = {}) => { + let o, r, n, a = Ti(e), + s = wi(e), + l = "relative" === t.position; + const c = Xt(), + d = e => { + if (!jt) return e; + const t = Ot(e), + { + snapTranslation: o, + snapLines: r + } = fo(go(t), c, jt, Zt, i); + return yo(e, o), lo(r), e + }, + u = !!No(), + h = t.isSelection ? Ie : Me, + p = "step" === t.inputMode; + if (Ri(e)) { + if (p) { + let t = !1; + const i = (e, o) => { + const i = Jt(h), + r = e && ce(Dy(e.x, _e.width), Dy(e.y, _e.height)), + n = r && Dt(r); + ae.includes(16) && n && no(n, o); + const a = Ot(o), + s = i.points.length ? i.points[0] : a, + c = ce(Dy(s.x, _e.width), Dy(s.y, _e.height)), + d = Dt(c), + u = Ce(d, o); + if (!t && 1 === i.points.length && u < 36) return eo(h); + if (i.points.length > 2 && u <= 256) { + i.pathClose = !0, _i(i) && Ho(i); + const e = to(h); + return void lt(e) + } + const p = i.strokeWidth && i.strokeColor && (void 0 === i.strokeColor[3] || i.strokeColor[3] > 0), + m = Ce(n, o); + if (p && i.points.length > 1 && m < 256) { + i.pathClose = !1, i.backgroundColor = [0, 0, 0, 0], _i(i) && Ho(i); + const e = to(h); + lt(e) + } else if (!(i.points.length > 0 && m < 100)) return l ? By(a, _e) : a + }; + return { + start: e => { + const a = Jt(h), + { + origin: s + } = e.detail; + if (r = 4, o = d(ue(s)), n = ue(o), a) { + const e = a.points[a.points.length - 1], + t = i(e, o); + return t && (a.points = [...a.points, t]), void oo({ + points: a.points + }, h) + } + t = !0 + }, + update: e => { + if (!t) return; + const r = Jt(h); + if (!r) return; + const n = r.points[0], + a = i(n, ce(o.x + e.detail.translation.x, o.y + e.detail.translation.y)); + a && (r.points[1] = a, oo({ + points: r.points + }, h)) + }, + release: e => e.detail.preventInertia(), + end: i => { + if (!t) return; + const r = Ot(o), + n = l ? By(r, _e) : r, + { + isTap: a + } = i.detail; + if (a) { + if (Ko(oe, r, 0, _i).length) return eo(h) + } + Qt({ + ...e, + points: [n] + }, h) + } + } + } + return { + start: t => { + const { + origin: i + } = t.detail; + r = 4, o = ue(i), n = ue(o); + const a = Ot(o), + s = l ? By(a, _e) : a; + Qt({ + ...e, + points: [s] + }, h) + }, + update: e => { + const t = Jt(h), + { + translation: i + } = e.detail, + a = ce(o.x + i.x, o.y + i.y), + s = Te(n, a); + if (ne(s, 5) <= r) return; + const c = $e(a, n), + d = r - s; + n.x += d * Math.cos(c), n.y += d * Math.sin(c); + const u = Ot(n), + p = l ? By(u, _e) : u; + oo({ + points: t.points.concat(p) + }, h) + }, + release: e => e.detail.preventInertia(), + cancel: () => { + eo(h) + }, + end: e => { + const t = Jt(h); + if (e.detail.isTap) { + let e = !1; + if (t.bitmap ? (ti && (e = !0), u && (e = !0)) : e = !0, e) return eo(h) + } + const o = to(h); + lt(o) + } + } + } + return a || s || Ci(e) ? { + start: t => { + const { + origin: i + } = t.detail; + o = d(ue(i)); + const r = Ot(o), + n = l ? By(r, _e) : r, + s = -1 * so(ze, Fe, Oe), + c = { + ...e, + rotation: s, + ...n + }; + c.flipX = Fe, c.flipY = Oe, delete c.position, c.opacity = 0; + (a ? ["rx", "ry"] : ["width", "height"]).forEach((e => { + c[e] = l ? "0%" : 0 + })), Qt(c, h) + }, + update: e => { + const t = Jt(h); + t.opacity = 1; + let { + aspectRatio: i + } = t, { + translation: r, + shiftKey: n, + ctrlKey: s + } = e.detail; + !i && n && (i = 1); + const l = d(ce(o.x + r.x, o.y + r.y)), + c = Ot(o), + u = Ot(l); + if (i) { + const e = et([c, u]), + t = yt(e, i); + u.x = c.x + t.width, u.y = c.y + t.height + } + const p = { + x: c.x + .5 * (u.x - c.x), + y: c.y + .5 * (u.y - c.y) + }, + m = so(ze, Fe, Oe); + pe(c, m, p), pe(u, m, p); + const g = Math.min(c.x, u.x), + $ = Math.min(c.y, u.y); + let f = Math.max(c.x, u.x) - g, + y = Math.max(c.y, u.y) - $, + b = {}; + a ? (s ? (b.x = c.x, b.y = c.y) : (b.x = g + .5 * f, b.y = $ + .5 * y), b.rx = .5 * f, b.ry = .5 * y) : (s ? (b.x = c.x - .5 * f, b.y = c.y - .5 * y) : (b.x = g, b.y = $), b.width = f, b.height = y), oo(b, h, ((e, t) => ro(e, t, _e))) + }, + release: e => { + e.detail.preventInertia() + }, + cancel: e => { + eo(h) + }, + end: e => { + const t = Jt(h); + if (e.detail.isTap) { + if (wi(t) && _t && si) return eo(h); + if (!wi(t) || !_t || ti) return eo(h); + delete t.width, delete t.height, !1 !== t.disableNewline && delete t.textAlign; + const e = ur({ + ...t + }, _e), + i = ii(t.text, e), + r = Ot({ + x: o.x, + y: o.y - .5 * i.height + }), + n = Ot({ + x: o.x + i.width, + y: o.y + .5 * i.height + }), + a = { + x: r.x + .5 * (n.x - r.x), + y: r.y + .5 * (n.y - r.y) + }, + s = so(ze, Fe, Oe); + pe(r, s, a), pe(n, s, a); + let l = Math.min(r.x, n.x), + c = Math.min(r.y, n.y); + l < 0 && (l = 0), c < 0 && (c = 0), l + i.width > _e.width && (l = _e.width - i.width), c + i.height > _e.height && (c = _e.height - i.height), t.x = T(t.x) ? Vo(l, _e.width) : l, t.y = T(t.y) ? Vo(c, _e.height) : c + } + if (t.opacity = 1, !wi(t)) { + const e = to(h); + lt(e) + } + _i(t) && Ho(t), wi(t) && Uo(t) + } + } : Mi(e) ? { + start: t => { + const { + origin: i + } = t.detail, r = Ot(d(i)), n = ye(r, Hd); + o = ue(i), Qt({ + ...e, + x1: l ? Vo(n.x, _e.width) : n.x, + y1: l ? Vo(n.y, _e.height) : n.y, + x2: l ? Vo(n.x, _e.width) : n.x, + y2: l ? Vo(n.y, _e.height) : n.y, + opacity: 0 + }, h) + }, + update: e => { + const { + translation: t + } = e.detail, i = d(be(ue(o), t)); + if (ae.includes(16)) { + const e = Te(o, i), + t = $e(o, i), + r = Math.PI / 4, + n = r * Math.round(t / r); + i.x = o.x + e * Math.cos(n), i.y = o.y + e * Math.sin(n) + } + const r = Ot(i); + oo({ + x2: l ? Vo(r.x, _e.width) : r.x, + y2: l ? Vo(r.y, _e.height) : r.y, + opacity: 1 + }, h) + }, + release: e => e.detail.preventInertia(), + cancel: e => { + eo(h) + }, + end: e => { + const t = Jt(h); + if (e.detail.isTap) return eo(h); + t.opacity = 1; + const o = to(h); + lt(o), _i(t) && Ho(o) + } + } : void 0 + }, () => { + let e, t; + const o = Bt * Bt, + i = (e, t, i = !1) => { + const r = Ce(e, t); + if (!i && r < 2) return !1; + const n = oe.filter((e => !e.disableErase)); + let a; + a = r < o ? Ko(oe, Ot(t), Bt) : Jo(n, Ot(e), Ot(t), Bt); + return Zo(a).forEach(ht), !0 + }; + return { + start: o => { + e = ce(Math.round(o.detail.origin.x), Math.round(o.detail.origin.y)), i(e, e, !0), t = e + }, + update: o => { + const { + translation: r + } = o.detail, n = ce(Math.round(e.x + r.x), Math.round(e.y + r.y)); + i(t, n) && (t = ue(n)) + }, + release: e => e.detail.preventInertia(), + end: () => {} + } + }, So, ko, e => { + if (!So()) return Bi(e), io(e) + }, Co, To, (e = {}) => ({ + id: I(), + ...e + }), Mo, Ro, Po, Io, (e, t, o = !0) => { + oe.forEach((o => Io(o, e, t, !1))), o && Mo() + }, Lo, zo, Fo, Oo, Do, Wo, jo, Uo, Go, Zo, Yo, qo, Ko, Jo, uo, ho, oi, li, Ei, Ir, d, G, n, _, H, N, W, U, V, Z, Q, X, K, q, Y, P, s, E, F, A, M, C, i, w, S, k, f, x, u, a, h, oe, re, ae, de, function(t) { + Qn.call(this, e, t) + }, e => Ho(Me[e]), function(e) { + ta[e ? "unshift" : "push"]((() => { + or = e, o(8, or) + })) + }, function() { + z = this.value, o(23, z), o(11, R), o(146, n), o(164, M), o(0, ke), o(175, oe) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + or = e, o(8, or) + })) + }, () => { + Lr && Lr.focus() + }, e => o(9, Tr = e.detail), function(e) { + ta[e ? "unshift" : "push"]((() => { + Lr = e, o(19, Lr) + })) + }, e => Ry(e, Ne)] +} +class qy extends Fa { + constructor(e) { + super(), za(this, e, Yy, Zy, Qr, { + uid: 57, + ui: 58, + disabled: 0, + shapes: 1, + selection: 59, + offset: 2, + contextRotation: 60, + contextFlipX: 61, + contextFlipY: 62, + contextZoom: 63, + active: 64, + opacity: 65, + parentRect: 66, + rootRect: 3, + utilRect: 67, + hoverColor: 68, + caretColor: 69, + gridColor: 70, + snapColor: 71, + textInputMode: 4, + oninteractionstart: 72, + oninteractionupdate: 73, + oninteractionrelease: 74, + oninteractionend: 75, + oninteractioncancel: 76, + onaddshape: 77, + onupdateshape: 78, + onselectshape: 79, + onblurshape: 80, + onremoveshape: 81, + ontapshape: 82, + onhovershape: 83, + onhovercanvas: 84, + ontapcanvas: 85, + onleavecanvas: 86, + beforeSelectShape: 87, + beforeDeselectShape: 88, + beforeRemoveShape: 89, + beforeUpdateShape: 90, + willRenderShapeControls: 91, + willRenderShapeTextControls: 92, + willStartInteraction: 93, + mapEditorPointToImagePoint: 94, + mapImagePointToEditorPoint: 95, + eraseRadius: 96, + selectRadius: 97, + enableButtonFlipVertical: 98, + enableTapToAddText: 99, + enableTextStyleControls: 5, + locale: 6, + snapThreshold: 100, + snapPointer: 101, + enableSnapToContext: 102, + gridSize: 103, + syncShapeCollection: 104, + getShapeDraft: 105, + addShapeDraft: 106, + discardShapeDraft: 107, + confirmShapeDraft: 108, + updateShapeDraft: 109, + addShape: 110, + createShape: 111, + eraseShape: 112, + getMarkupItemDraft: 113, + getMarkupItemDraftIndex: 114, + addMarkupItemDraft: 115, + confirmMarkupItemDraft: 116, + discardMarkupItemDraft: 117, + createMarkupItem: 118, + syncShapes: 119, + removeMarkupShapeProps: 120, + updateMarkupShape: 121, + updateMarkupShapeProperty: 122, + updateMarkupItemsShapeProperty: 123, + updateMarkupShapeItems: 124, + getActiveMarkupItem: 125, + hasActiveMarkupItem: 126, + removeShape: 127, + removeActiveMarkupItem: 128, + blurShapes: 129, + selectShape: 7, + deselectMarkupItem: 130, + editMarkupItem: 131, + finishEditMarkupItem: 132, + removeMarkupItems: 133, + getTextShapeRect: 134, + getMarkupShapeRect: 135, + getShapesNearPosition: 136, + getShapesBetweenPoints: 137 + }, null, [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) + } + get syncShapeCollection() { + return this.$$.ctx[104] + } + get getShapeDraft() { + return this.$$.ctx[105] + } + get addShapeDraft() { + return this.$$.ctx[106] + } + get discardShapeDraft() { + return this.$$.ctx[107] + } + get confirmShapeDraft() { + return this.$$.ctx[108] + } + get updateShapeDraft() { + return this.$$.ctx[109] + } + get addShape() { + return this.$$.ctx[110] + } + get createShape() { + return this.$$.ctx[111] + } + get eraseShape() { + return this.$$.ctx[112] + } + get getMarkupItemDraft() { + return this.$$.ctx[113] + } + get getMarkupItemDraftIndex() { + return this.$$.ctx[114] + } + get addMarkupItemDraft() { + return this.$$.ctx[115] + } + get confirmMarkupItemDraft() { + return this.$$.ctx[116] + } + get discardMarkupItemDraft() { + return this.$$.ctx[117] + } + get createMarkupItem() { + return this.$$.ctx[118] + } + get syncShapes() { + return this.$$.ctx[119] + } + get removeMarkupShapeProps() { + return this.$$.ctx[120] + } + get updateMarkupShape() { + return this.$$.ctx[121] + } + get updateMarkupShapeProperty() { + return this.$$.ctx[122] + } + get updateMarkupItemsShapeProperty() { + return this.$$.ctx[123] + } + get updateMarkupShapeItems() { + return this.$$.ctx[124] + } + get getActiveMarkupItem() { + return this.$$.ctx[125] + } + get hasActiveMarkupItem() { + return this.$$.ctx[126] + } + get removeShape() { + return this.$$.ctx[127] + } + get removeActiveMarkupItem() { + return this.$$.ctx[128] + } + get blurShapes() { + return this.$$.ctx[129] + } + get selectShape() { + return this.$$.ctx[7] + } + get deselectMarkupItem() { + return this.$$.ctx[130] + } + get editMarkupItem() { + return this.$$.ctx[131] + } + get finishEditMarkupItem() { + return this.$$.ctx[132] + } + get removeMarkupItems() { + return this.$$.ctx[133] + } + get getTextShapeRect() { + return this.$$.ctx[134] + } + get getMarkupShapeRect() { + return this.$$.ctx[135] + } + get getShapesNearPosition() { + return this.$$.ctx[136] + } + get getShapesBetweenPoints() { + return this.$$.ctx[137] + } +} + +function Ky(e) { + let t, o, i; + return o = new dp({ + props: { + items: e[2] + } + }), { + c() { + t = kn("ul"), Ia(o.$$.fragment), An(t, "class", "PinturaShapeStyleList") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 4 & t && (i.items = e[2]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Jy(e) { + let t, o; + return t = new vd({ + props: { + class: "PinturaShapeStyles", + elasticity: e[0], + $$slots: { + default: [Qy] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1 & o && (i.elasticity = e[0]), 131076 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Qy(e) { + let t, o, i; + return o = new dp({ + props: { + items: e[2] + } + }), { + c() { + t = kn("ul"), Ia(o.$$.fragment), An(t, "class", "PinturaShapeStyleList") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 4 & t && (i.items = e[2]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function eb(e) { + let t, o, i, r; + const n = [Jy, Ky], + a = []; + + function s(e, t) { + return e[1] ? 0 : 1 + } + return o = s(e), i = a[o] = n[o](e), { + c() { + t = kn("div"), i.c(), An(t, "style", e[3]) + }, + m(e, i) { + wn(e, t, i), a[o].m(t, null), r = !0 + }, + p(e, [l]) { + let c = o; + o = s(e), o === c ? a[o].p(e, l) : (ya(), va(a[c], 1, 1, (() => { + a[c] = null + })), ba(), i = a[o], i ? i.p(e, l) : (i = a[o] = n[o](e), i.c()), xa(i, 1), i.m(t, null)), (!r || 8 & l) && An(t, "style", e[3]) + }, + i(e) { + r || (xa(i), r = !0) + }, + o(e) { + va(i), r = !1 + }, + d(e) { + e && Sn(t), a[o].d() + } + } +} + +function tb(e, t, o) { + let i, r, n, a, s, l, { + isActive: c = !1 + } = t, + { + controls: d = [] + } = t, + { + locale: u + } = t, + { + scrollElasticity: h + } = t, + { + scrollEnable: p = !0 + } = t, + { + hideTitles: m = !1 + } = t, + { + willRenderControls: g = j + } = t; + const $ = Jn("redrawTrigger"); + on(e, $, (e => o(14, a = e))); + const f = Jn("env"); + on(e, f, (e => o(13, n = e))); + const y = Jn("isAnimated"); + on(e, y, (e => o(16, l = e))); + const b = ec(0, { + stiffness: .25, + damping: .9 + }); + return on(e, b, (e => o(15, s = e))), e.$$set = e => { + "isActive" in e && o(8, c = e.isActive), "controls" in e && o(9, d = e.controls), "locale" in e && o(10, u = e.locale), "scrollElasticity" in e && o(0, h = e.scrollElasticity), "scrollEnable" in e && o(1, p = e.scrollEnable), "hideTitles" in e && o(11, m = e.hideTitles), "willRenderControls" in e && o(12, g = e.willRenderControls) + }, e.$$.update = () => { + 65792 & e.$$.dirty && b.set(c ? 1 : 0, { + hard: !1 === l + }), 33024 & e.$$.dirty && o(3, i = `opacity:${s};${c?"":"pointer-events:none;"}${s<=0?"visibility:hidden":""}`), 32256 & e.$$.dirty && o(2, r = a && g(d.map((e => ["ShapeStyle", e.id, { + title: e.componentProps.title, + locale: u, + hideTitle: m, + items: [ + [e.component, e.id, e.componentProps] + ] + }])), n, (() => $.set({})))) + }, [h, p, r, i, $, f, y, b, c, d, u, m, g, n, a, s, l] +} +class ob extends Fa { + constructor(e) { + super(), za(this, e, tb, eb, Qr, { + isActive: 8, + controls: 9, + locale: 10, + scrollElasticity: 0, + scrollEnable: 1, + hideTitles: 11, + willRenderControls: 12 + }) + } +} + +function ib(e, t, o) { + const i = e.slice(); + return i[15] = t[o].key, i[6] = t[o].controls, i[16] = t[o].isActive, i +} + +function rb(e, t) { + let o, i, r; + return i = new ob({ + props: { + isActive: t[16], + controls: t[6], + locale: t[1], + scrollElasticity: t[2], + scrollEnable: t[3], + hideTitles: t[4], + willRenderControls: t[5] + } + }), { + key: e, + first: null, + c() { + o = Rn(), Ia(i.$$.fragment), this.first = o + }, + m(e, t) { + wn(e, o, t), Aa(i, e, t), r = !0 + }, + p(e, o) { + t = e; + const r = {}; + 128 & o && (r.isActive = t[16]), 128 & o && (r.controls = t[6]), 2 & o && (r.locale = t[1]), 4 & o && (r.scrollElasticity = t[2]), 8 & o && (r.scrollEnable = t[3]), 16 & o && (r.hideTitles = t[4]), 32 & o && (r.willRenderControls = t[5]), i.$set(r) + }, + i(e) { + r || (xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(o), La(i, e) + } + } +} + +function nb(e) { + let t, o, i, r = [], + n = new Map, + a = e[7]; + const s = e => e[15]; + for (let t = 0; t < a.length; t += 1) { + let o = ib(e, a, t), + i = s(o); + n.set(i, r[t] = rb(i, o)) + } + return { + c() { + t = kn("div"); + for (let e = 0; e < r.length; e += 1) r[e].c(); + An(t, "class", o = Mc(["PinturaShapeStyleEditor", !e[3] && "PinturaShapeStyleEditorOverflow", e[0]])) + }, + m(e, o) { + wn(e, t, o); + for (let e = 0; e < r.length; e += 1) r[e].m(t, null); + i = !0 + }, + p(e, [l]) { + 190 & l && (a = e[7], ya(), r = Ma(r, l, s, 1, e, a, n, t, Ta, rb, null, ib), ba()), (!i || 9 & l && o !== (o = Mc(["PinturaShapeStyleEditor", !e[3] && "PinturaShapeStyleEditorOverflow", e[0]]))) && An(t, "class", o) + }, + i(e) { + if (!i) { + for (let e = 0; e < a.length; e += 1) xa(r[e]); + i = !0 + } + }, + o(e) { + for (let e = 0; e < r.length; e += 1) va(r[e]); + i = !1 + }, + d(e) { + e && Sn(t); + for (let e = 0; e < r.length; e += 1) r[e].d() + } + } +} + +function ab(e, t, o) { + let i, r, n, { + class: a + } = t, + { + controls: s = {} + } = t, + { + shape: l + } = t, + { + onchange: c + } = t, + { + locale: d + } = t, + { + scrollElasticity: u + } = t, + { + scrollEnable: h = !0 + } = t, + { + hideTitles: p = !1 + } = t, + { + willRenderControls: m + } = t; + const g = []; + return e.$$set = e => { + "class" in e && o(0, a = e.class), "controls" in e && o(6, s = e.controls), "shape" in e && o(8, l = e.shape), "onchange" in e && o(9, c = e.onchange), "locale" in e && o(1, d = e.locale), "scrollElasticity" in e && o(2, u = e.scrollElasticity), "scrollEnable" in e && o(3, h = e.scrollEnable), "hideTitles" in e && o(4, p = e.hideTitles), "willRenderControls" in e && o(5, m = e.willRenderControls) + }, e.$$.update = () => { + 64 & e.$$.dirty && o(11, i = Object.keys(s).filter((e => s[e]))), 2304 & e.$$.dirty && o(10, r = l && Object.keys(l).length && i && Vi(l) ? (e => i.filter((t => t.split("_").every((t => Ao(e, t) && Vi(e, t))))).map((t => { + const o = (e.settings && e.settings[t] || {}).control || t, + i = t.split("_"), + r = i.length > 1 ? i.map((t => e[t])) : e[t]; + if (M(s[o])) { + const { + title: i, + component: n + } = s[o](r, (e => { + c({ + [t]: e + }) + }), { + selectedShapeId: e.id + }); + return { + id: o, + component: dp, + componentProps: { + title: i, + items: n + } + } + } + let [n, a] = s[o]; + if (T(n) && s[n]) { + const e = { + ...a + }; + [n, a] = s[n], a = { + ...a, + ...e + } + } + const l = M(a.options) ? a.options(e) : a.options; + return { + id: o, + component: n, + componentProps: { + ...a, + options: l, + locale: d, + value: r, + optionLabelClass: "PinturaButtonLabel", + onchange: o => { + const r = S(o) && !Lo(o) ? o.value : o; + a.onchange && a.onchange(r, e); + const n = i.length > 1 ? i.reduce(((e, t, o) => ({ + ...e, + [t]: Array.isArray(r) ? r[o] : r + })), {}) : { + [t]: r + }; + c(n) + } + } + } + })).filter(Boolean))(l) : []), 1280 & e.$$.dirty && o(7, n = ((e, t) => { + let o = g.find((t => t.key === e)); + return o || (o = { + key: e, + controls: t + }, g.push(o)), g.forEach((e => e.isActive = !1)), o.controls = t, o.isActive = !0, g + })(l && Object.keys(l).length ? Object.keys(l).join("_") : "none", r || [])) + }, [a, d, u, h, p, m, s, n, l, c, r, i] +} +class sb extends Fa { + constructor(e) { + super(), za(this, e, ab, nb, Qr, { + class: 0, + controls: 6, + shape: 8, + onchange: 9, + locale: 1, + scrollElasticity: 2, + scrollEnable: 3, + hideTitles: 4, + willRenderControls: 5 + }) + } +} +var lb = e => / { + a[l] = null + })), ba(), o = a[t], o ? o.p(e, r) : (o = a[t] = n[t](e), o.c()), xa(o, 1), o.m(i.parentNode, i)) + }, + i(e) { + r || (xa(o), r = !0) + }, + o(e) { + va(o), r = !1 + }, + d(e) { + a[t].d(e), e && Sn(i) + } + } +} + +function ub(e) { + let t, o, i, r, n = e[10] && pb(e); + return i = new vd({ + props: { + scrollAutoCancel: e[9], + elasticity: e[0], + $$slots: { + default: [mb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), n && n.c(), o = Mn(), Ia(i.$$.fragment), An(t, "class", "PinturaShapePresetsFlat") + }, + m(e, a) { + wn(e, t, a), n && n.m(t, null), bn(t, o), Aa(i, t, null), r = !0 + }, + p(e, r) { + e[10] ? n ? (n.p(e, r), 1024 & r && xa(n, 1)) : (n = pb(e), n.c(), xa(n, 1), n.m(t, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()); + const a = {}; + 512 & r && (a.scrollAutoCancel = e[9]), 1 & r && (a.elasticity = e[0]), 536871070 & r && (a.$$scope = { + dirty: r, + ctx: e + }), i.$set(a) + }, + i(e) { + r || (xa(n), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(n), va(i.$$.fragment, e), r = !1 + }, + d(e) { + e && Sn(t), n && n.d(), La(i) + } + } +} + +function hb(e) { + let t, o, i, r, n; + o = new vd({ + props: { + elasticity: e[0], + class: "PinturaShapePresetsGroups", + $$slots: { + default: [xb] + }, + $$scope: { + ctx: e + } + } + }); + const a = [{ + class: "PinturaControlPanels" + }, { + panelClass: "PinturaControlPanel" + }, { + panels: e[11] + }, e[12]]; + let s = { + $$slots: { + default: [wb, ({ + panel: e, + panelIsActive: t + }) => ({ + 26: e, + 27: t + }), ({ + panel: e, + panelIsActive: t + }) => (e ? 67108864 : 0) | (t ? 134217728 : 0)] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < a.length; e += 1) s = Xr(s, a[e]); + return r = new Zc({ + props: s + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), i = Mn(), Ia(r.$$.fragment), An(t, "class", "PinturaShapePresetsGrouped") + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), Aa(r, t, null), n = !0 + }, + p(e, t) { + const i = {}; + 1 & t && (i.elasticity = e[0]), 536876128 & t && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i); + const n = 6144 & t ? Ra(a, [a[0], a[1], 2048 & t && { + panels: e[11] + }, 4096 & t && Pa(e[12])]) : {}; + 738206239 & t && (n.$$scope = { + dirty: t, + ctx: e + }), r.$set(n) + }, + i(e) { + n || (xa(o.$$.fragment, e), xa(r.$$.fragment, e), n = !0) + }, + o(e) { + va(o.$$.fragment, e), va(r.$$.fragment, e), n = !1 + }, + d(e) { + e && Sn(t), La(o), La(r) + } + } +} + +function pb(e) { + let t, o; + return t = new dp({ + props: { + items: e[10] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o && (i.items = e[10]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function mb(e) { + let t, o; + return t = new Vd({ + props: { + items: e[7], + onclickitem: e[1], + ongrabitem: e[2], + ondragitem: e[3], + ondropitem: e[4] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 128 & o && (i.items = e[7]), 2 & o && (i.onclickitem = e[1]), 4 & o && (i.ongrabitem = e[2]), 8 & o && (i.ondragitem = e[3]), 16 & o && (i.ondropitem = e[4]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function gb(e) { + let t, o; + return t = new dp({ + props: { + items: e[10] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o && (i.items = e[10]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function $b(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [fb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 805306368 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function fb(e) { + let t, o = e[28].icon + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 268435456 & i && o !== (o = e[28].icon + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function yb(e) { + let t, o, i = e[28].label + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 268435456 & t && i !== (i = e[28].label + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function bb(e) { + let t, o, i, r = e[28].icon && $b(e), + n = !e[28].hideLabel && yb(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[28].icon ? r ? (r.p(e, i), 268435456 & i && xa(r, 1)) : (r = $b(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[28].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = yb(e), n.c(), n.m(o.parentNode, o)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function xb(e) { + let t, o, i, r = e[10] && gb(e); + const n = [{ + class: "PinturaControlList" + }, { + tabs: e[5] + }, e[12], { + layout: "compact" + }]; + let a = { + $$slots: { + default: [bb, ({ + tab: e + }) => ({ + 28: e + }), ({ + tab: e + }) => e ? 268435456 : 0] + }, + $$scope: { + ctx: e + } + }; + for (let e = 0; e < n.length; e += 1) a = Xr(a, n[e]); + return o = new Fc({ + props: a + }), o.$on("select", e[18]), { + c() { + r && r.c(), t = Mn(), Ia(o.$$.fragment) + }, + m(e, n) { + r && r.m(e, n), wn(e, t, n), Aa(o, e, n), i = !0 + }, + p(e, i) { + e[10] ? r ? (r.p(e, i), 1024 & i && xa(r, 1)) : (r = gb(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()); + const a = 4128 & i ? Ra(n, [n[0], 32 & i && { + tabs: e[5] + }, 4096 & i && Pa(e[12]), n[3]]) : {}; + 805306368 & i && (a.$$scope = { + dirty: i, + ctx: e + }), o.$set(a) + }, + i(e) { + i || (xa(r), xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(r), va(o.$$.fragment, e), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), La(o, e) + } + } +} + +function vb(e) { + let t, o; + return t = new Vd({ + props: { + items: e[13][e[26]].items, + disabled: e[13][e[26]].disabled, + onclickitem: e[1], + ongrabitem: e[2], + ondragitem: e[3], + ondropitem: e[4] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 67117056 & o && (i.items = e[13][e[26]].items), 67117056 & o && (i.disabled = e[13][e[26]].disabled), 2 & o && (i.onclickitem = e[1]), 4 & o && (i.ongrabitem = e[2]), 8 & o && (i.ondragitem = e[3]), 16 & o && (i.ondropitem = e[4]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function wb(e) { + let t, o; + return t = new vd({ + props: { + scroll: e[27] ? { + scrollOffset: 0, + animate: !1 + } : void 0, + scrollAutoCancel: e[9], + elasticity: e[0], + $$slots: { + default: [vb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 134217728 & o && (i.scroll = e[27] ? { + scrollOffset: 0, + animate: !1 + } : void 0), 512 & o && (i.scrollAutoCancel = e[9]), 1 & o && (i.elasticity = e[0]), 603987998 & o && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Sb(e) { + let t, o, i, r; + const n = [db, cb], + a = []; + + function s(e, t) { + return e[9] ? 0 : e[10] ? 1 : -1 + } + return ~(o = s(e)) && (i = a[o] = n[o](e)), { + c() { + t = kn("div"), i && i.c(), An(t, "class", "PinturaShapePresetsPalette") + }, + m(e, i) { + wn(e, t, i), ~o && a[o].m(t, null), r = !0 + }, + p(e, [r]) { + let l = o; + o = s(e), o === l ? ~o && a[o].p(e, r) : (i && (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba()), ~o ? (i = a[o], i ? i.p(e, r) : (i = a[o] = n[o](e), i.c()), xa(i, 1), i.m(t, null)) : i = null) + }, + i(e) { + r || (xa(i), r = !0) + }, + o(e) { + va(i), r = !1 + }, + d(e) { + e && Sn(t), ~o && a[o].d() + } + } +} + +function kb(e, t, o) { + let i, n, a, s, l, c, d, u, h, { + locale: p + } = t, + { + presets: m + } = t, + { + scrollElasticity: g + } = t, + { + enableSelectImage: $ = !0 + } = t, + { + willRenderPresetToolbar: f = j + } = t, + { + onaddpreset: y = r + } = t, + { + ongrabpreset: b + } = t, + { + ondragpreset: x + } = t, + { + ondroppreset: v + } = t; + const w = "presets-" + I(), + S = (e, t = "") => lb(e) ? e : Io(e) ? Bo(e, t) : `${t}`, + k = e => W(Vt(e)), + C = ["src", "alt", "thumb", "shape", "id", "mount", "disabled"], + M = e => e.map((e => (e => Lo(e) && T(e[0]) && Lo(e[1]))(e) ? { + ...e[2], + id: `${w}-${e[0].toLowerCase()}`, + label: e[0], + items: M(e[1]) + } : (e => { + let t, o, i, r, n, a, s, l = e; + return T(e) ? Io(e) ? (t = e, n = e, r = S(t, n)) : (t = e, n = k(t), r = S(t, n)) : (t = e.src, n = e.alt || (T(t) ? k(t) : T(e.thumb) ? k(e.thumb) : void 0), r = S(e.thumb || t, n), o = e.shape, a = e.mount, s = e.disabled, i = Object.keys(e).reduce(((t, o) => (C.includes(o) || (t[o] = e[o]), t)), {})), { + id: l, + src: t, + thumb: r, + shape: o, + shapeProps: i, + alt: n, + title: n, + mount: a, + disabled: s + } + })(e))); + return e.$$set = e => { + "locale" in e && o(14, p = e.locale), "presets" in e && o(15, m = e.presets), "scrollElasticity" in e && o(0, g = e.scrollElasticity), "enableSelectImage" in e && o(16, $ = e.enableSelectImage), "willRenderPresetToolbar" in e && o(17, f = e.willRenderPresetToolbar), "onaddpreset" in e && o(1, y = e.onaddpreset), "ongrabpreset" in e && o(2, b = e.ongrabpreset), "ondragpreset" in e && o(3, x = e.ondragpreset), "ondroppreset" in e && o(4, v = e.ondroppreset) + }, e.$$.update = () => { + 32768 & e.$$.dirty && o(7, i = M(m)), 128 & e.$$.dirty && o(9, n = i.length), 640 & e.$$.dirty && o(8, a = n && i.some((e => !!e.items))), 384 & e.$$.dirty && o(5, s = a && i), 384 & e.$$.dirty && o(13, l = a && i.reduce(((e, t) => (e[t.id] = t, e)), {})), 96 & e.$$.dirty && o(6, c = c || s && (s.find((e => !e.disabled)) || {}).id), 64 & e.$$.dirty && o(12, d = { + name: w, + selected: c + }), 32 & e.$$.dirty && o(11, u = s && s.map((e => e.id))), 212994 & e.$$.dirty && o(10, h = p && f([$ && ["Button", "browse", { + label: p.shapeLabelButtonSelectSticker, + icon: p.shapeIconButtonSelectSticker, + onclick: () => { + Lp().then((e => { + e && y(e) + })) + } + }]])) + }, [g, y, b, x, v, s, c, i, a, n, h, u, d, l, p, m, $, f, ({ + detail: e + }) => o(6, c = e)] +} +class Cb extends Fa { + constructor(e) { + super(), za(this, e, kb, Sb, Qr, { + locale: 14, + presets: 15, + scrollElasticity: 0, + enableSelectImage: 16, + willRenderPresetToolbar: 17, + onaddpreset: 1, + ongrabpreset: 2, + ondragpreset: 3, + ondroppreset: 4 + }) + } +} + +function Tb(e) { + let t, o, i, r; + return t = new dp({ + props: { + items: e[29] + } + }), i = new sb({ + props: { + locale: e[4], + shape: e[31] || e[49], + onchange: e[86], + controls: e[9], + scrollEnable: !1, + hideTitles: !0, + willRenderControls: e[163] + } + }), { + c() { + Ia(t.$$.fragment), o = Mn(), Ia(i.$$.fragment) + }, + m(e, n) { + Aa(t, e, n), wn(e, o, n), Aa(i, e, n), r = !0 + }, + p(e, o) { + const r = {}; + 536870912 & o[0] && (r.items = e[29]), t.$set(r); + const n = {}; + 16 & o[0] && (n.locale = e[4]), 262145 & o[1] && (n.shape = e[31] || e[49]), 512 & o[0] && (n.controls = e[9]), i.$set(n) + }, + i(e) { + r || (xa(t.$$.fragment, e), xa(i.$$.fragment, e), r = !0) + }, + o(e) { + va(t.$$.fragment, e), va(i.$$.fragment, e), r = !1 + }, + d(e) { + La(t, e), e && Sn(o), La(i, e) + } + } +} + +function Mb(e) { + let t, o, i; + return o = new Y$({ + props: { + $$slots: { + default: [Tb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "header") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 536871440 & t[0] | 262145 & t[1] | 262144 & t[6] && (i.$$scope = { + dirty: t, + ctx: e + }), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Rb(e) { + let t, o; + const i = [{ + locale: e[4] + }, { + ui: e[69] + }, { + shapes: e[5] + }, { + selection: e[58] + }, { + uid: e[19] + }, { + parentRect: e[37] + }, { + rootRect: e[55] + }, { + utilRect: e[39] + }, { + offset: e[50] + }, { + disabled: e[38] + }, { + contextRotation: e[22] + }, { + contextFlipX: e[23] + }, { + contextFlipY: e[24] + }, { + contextZoom: e[36].scale + }, { + active: e[35] + }, { + opacity: e[56] + }, { + hoverColor: e[57] + }, { + caretColor: e[57] + }, { + gridColor: [1, 1, 1, .125] + }, { + snapColor: e[57] + }, { + eraseRadius: e[47] + }, { + selectRadius: e[6] + }, { + enableButtonFlipVertical: e[10] + }, { + mapEditorPointToImagePoint: e[20] + }, { + mapImagePointToEditorPoint: e[21] + }, { + enableTapToAddText: e[13] + }, { + textInputMode: e[8] + }, { + snapThreshold: e[15] + }, { + snapPointer: !e[48] + }, { + enableSnapToContext: e[16] + }, { + gridSize: e[14] + }, { + willStartInteraction: e[96] + }, { + oninteractionstart: e[80] + }, { + oninteractionupdate: e[81] + }, { + oninteractionrelease: e[82] + }, { + oninteractionend: e[84] + }, { + oninteractioncancel: e[83] + }, { + onleavecanvas: e[88] + }, { + onhovercanvas: e[87] + }, { + onhovershape: e[90] + }, { + ontapcanvas: e[89] + }, { + onaddshape: e[155] + }, { + onselectshape: e[156] + }, { + onblurshape: e[157] + }, { + ontapshape: e[158] + }, { + onupdateshape: e[159] + }, { + onremoveshape: e[160] + }, e[42]]; + let r = {}; + for (let e = 0; e < i.length; e += 1) r = Xr(r, i[e]); + return t = new qy({ + props: r + }), e[161](t), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const r = 1106896240 & o[0] | 252381680 & o[1] | 511443072 & o[2] | 24 & o[3] ? Ra(i, [16 & o[0] && { + locale: e[4] + }, 128 & o[2] && { + ui: e[69] + }, 32 & o[0] && { + shapes: e[5] + }, 134217728 & o[1] && { + selection: e[58] + }, 524288 & o[0] && { + uid: e[19] + }, 64 & o[1] && { + parentRect: e[37] + }, 16777216 & o[1] && { + rootRect: e[55] + }, 256 & o[1] && { + utilRect: e[39] + }, 524288 & o[1] && { + offset: e[50] + }, 128 & o[1] && { + disabled: e[38] + }, 4194304 & o[0] && { + contextRotation: e[22] + }, 8388608 & o[0] && { + contextFlipX: e[23] + }, 16777216 & o[0] && { + contextFlipY: e[24] + }, 32 & o[1] && { + contextZoom: e[36].scale + }, 16 & o[1] && { + active: e[35] + }, 33554432 & o[1] && { + opacity: e[56] + }, 67108864 & o[1] && { + hoverColor: e[57] + }, 67108864 & o[1] && { + caretColor: e[57] + }, i[18], 67108864 & o[1] && { + snapColor: e[57] + }, 65536 & o[1] && { + eraseRadius: e[47] + }, 64 & o[0] && { + selectRadius: e[6] + }, 1024 & o[0] && { + enableButtonFlipVertical: e[10] + }, 1048576 & o[0] && { + mapEditorPointToImagePoint: e[20] + }, 2097152 & o[0] && { + mapImagePointToEditorPoint: e[21] + }, 8192 & o[0] && { + enableTapToAddText: e[13] + }, 256 & o[0] && { + textInputMode: e[8] + }, 32768 & o[0] && { + snapThreshold: e[15] + }, 131072 & o[1] && { + snapPointer: !e[48] + }, 65536 & o[0] && { + enableSnapToContext: e[16] + }, 16384 & o[0] && { + gridSize: e[14] + }, 8 & o[3] && { + willStartInteraction: e[96] + }, 262144 & o[2] && { + oninteractionstart: e[80] + }, 524288 & o[2] && { + oninteractionupdate: e[81] + }, 1048576 & o[2] && { + oninteractionrelease: e[82] + }, 4194304 & o[2] && { + oninteractionend: e[84] + }, 2097152 & o[2] && { + oninteractioncancel: e[83] + }, 67108864 & o[2] && { + onleavecanvas: e[88] + }, 33554432 & o[2] && { + onhovercanvas: e[87] + }, 268435456 & o[2] && { + onhovershape: e[90] + }, 134217728 & o[2] && { + ontapcanvas: e[89] + }, 1073741824 & o[0] | 16 & o[3] && { + onaddshape: e[155] + }, 1073741824 & o[0] && { + onselectshape: e[156] + }, 1073741824 & o[0] && { + onblurshape: e[157] + }, 1073741824 & o[0] && { + ontapshape: e[158] + }, 1073741824 & o[0] | 16 & o[3] && { + onupdateshape: e[159] + }, 1073741824 & o[0] | 16 & o[3] && { + onremoveshape: e[160] + }, 2048 & o[1] && Pa(e[42])]) : {}; + t.$set(r) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(o) { + e[161](null), La(t, o) + } + } +} + +function Pb(e) { + let t, o, i, n, a, s = e[51] && Rb(e); + return { + c() { + t = kn("div"), s && s.c(), An(t, "slot", "main"), An(t, "style", o = "cursor:" + e[46]) + }, + m(o, l) { + wn(o, t, l), s && s.m(t, null), e[162](t), i = !0, n || (a = [Pn(t, "keydown", e[85]), hn(bc.call(null, t)), Pn(t, "dropfiles", (function() { + Jr(e[12] ? e[95] : r) && (e[12] ? e[95] : r).apply(this, arguments) + })), hn($c.call(null, t)), Pn(t, "measure", e[151])], n = !0) + }, + p(r, n) { + (e = r)[51] ? s ? (s.p(e, n), 1048576 & n[1] && xa(s, 1)) : (s = Rb(e), s.c(), xa(s, 1), s.m(t, null)): s && (ya(), va(s, 1, 1, (() => { + s = null + })), ba()), (!i || 32768 & n[1] && o !== (o = "cursor:" + e[46])) && An(t, "style", o) + }, + i(e) { + i || (xa(s), i = !0) + }, + o(e) { + va(s), i = !1 + }, + d(o) { + o && Sn(t), s && s.d(), e[162](null), n = !1, Kr(a) + } + } +} + +function Eb(e) { + let t, o; + return t = new Cb({ + props: { + locale: e[4], + presets: e[18], + enableSelectImage: e[11], + willRenderPresetToolbar: e[43], + onaddpreset: e[94], + ongrabpreset: e[91], + ondragpreset: e[92], + ondroppreset: e[93], + scrollElasticity: e[44] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.locale = e[4]), 262144 & o[0] && (i.presets = e[18]), 2048 & o[0] && (i.enableSelectImage = e[11]), 4096 & o[1] && (i.willRenderPresetToolbar = e[43]), 8192 & o[1] && (i.scrollElasticity = e[44]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ib(e) { + let t, o, i, r = "stack" === e[7] && Ab(e), + n = (e[53] && e[34] || "row" === e[7]) && Fb(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + "stack" === e[7] ? r ? (r.p(e, i), 128 & i[0] && xa(r, 1)) : (r = Ab(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[53] && e[34] || "row" === e[7] ? n ? (n.p(e, i), 128 & i[0] | 4194312 & i[1] && xa(n, 1)) : (n = Fb(e), n.c(), xa(n, 1), n.m(o.parentNode, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function Ab(e) { + let t, o, i, r; + const n = [zb, Lb], + a = []; + + function s(e, t) { + return e[45] ? 0 : 1 + } + return o = s(e), i = a[o] = n[o](e), { + c() { + t = kn("div"), i.c(), An(t, "class", "PinturaControlPanels") + }, + m(e, i) { + wn(e, t, i), a[o].m(t, null), r = !0 + }, + p(e, r) { + let l = o; + o = s(e), o === l ? a[o].p(e, r) : (ya(), va(a[l], 1, 1, (() => { + a[l] = null + })), ba(), i = a[o], i ? i.p(e, r) : (i = a[o] = n[o](e), i.c()), xa(i, 1), i.m(t, null)) + }, + i(e) { + r || (xa(i), r = !0) + }, + o(e) { + va(i), r = !1 + }, + d(e) { + e && Sn(t), a[o].d() + } + } +} + +function Lb(e) { + let t, o, i; + return o = new sb({ + props: { + locale: e[4], + shape: e[31] || e[49], + onchange: e[86], + controls: e[9], + scrollElasticity: e[44], + willRenderControls: e[17] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaControlPanel") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 16 & t[0] && (i.locale = e[4]), 262145 & t[1] && (i.shape = e[31] || e[49]), 512 & t[0] && (i.controls = e[9]), 8192 & t[1] && (i.scrollElasticity = e[44]), 131072 & t[0] && (i.willRenderControls = e[17]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function zb(e) { + let t, o, i; + return o = new Cb({ + props: { + locale: e[4], + presets: e[18], + enableSelectImage: e[11], + willRenderPresetToolbar: e[43], + onaddpreset: e[94], + ongrabpreset: e[91], + ondragpreset: e[92], + ondroppreset: e[93], + scrollElasticity: e[44] + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "class", "PinturaControlPanel") + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, t) { + const i = {}; + 16 & t[0] && (i.locale = e[4]), 262144 & t[0] && (i.presets = e[18]), 2048 & t[0] && (i.enableSelectImage = e[11]), 4096 & t[1] && (i.willRenderPresetToolbar = e[43]), 8192 & t[1] && (i.scrollElasticity = e[44]), o.$set(i) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Fb(e) { + let t, o; + return t = new vd({ + props: { + class: "PinturaControlListScroller", + elasticity: e[44], + $$slots: { + default: [Nb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8192 & o[1] && (i.elasticity = e[44]), 131729 & o[0] | 262155 & o[1] | 262144 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ob(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[4], + class: "PinturaControlList", + optionClass: "PinturaControlListOption", + layout: "row", + options: e[32], + selectedIndex: e[32].findIndex(e[152]), + onchange: e[79], + $$slots: { + option: [Vb, ({ + option: e + }) => ({ + 203: e + }), ({ + option: e + }) => [0, 0, 0, 0, 0, 0, e ? 131072 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.locale = e[4]), 2 & o[1] && (i.options = e[32]), 1 & o[0] | 2 & o[1] && (i.selectedIndex = e[32].findIndex(e[152])), 16 & o[0] | 393216 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Db(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Bb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] | 393216 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Bb(e) { + let t, o = (M(e[203].icon) ? e[203].icon(e[4]) : e[203].icon) + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 16 & i[0] | 131072 & i[6] && o !== (o = (M(e[203].icon) ? e[203].icon(e[4]) : e[203].icon) + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Wb(e) { + let t, o, i = (M(e[203].label) ? e[203].label(e[4]) : e[203].label) + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 16 & t[0] | 131072 & t[6] && i !== (i = (M(e[203].label) ? e[203].label(e[4]) : e[203].label) + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Vb(e) { + let t, o, i, r = e[203].icon && Db(e), + n = !e[203].hideLabel && Wb(e); + return { + c() { + t = kn("div"), r && r.c(), o = Mn(), n && n.c(), An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), r && r.m(t, null), bn(t, o), n && n.m(t, null), i = !0 + }, + p(e, i) { + e[203].icon ? r ? (r.p(e, i), 131072 & i[6] && xa(r, 1)) : (r = Db(e), r.c(), xa(r, 1), r.m(t, o)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), e[203].hideLabel ? n && (n.d(1), n = null) : n ? n.p(e, i) : (n = Wb(e), n.c(), n.m(t, null)) + }, + i(e) { + i || (xa(r), i = !0) + }, + o(e) { + va(r), i = !1 + }, + d(e) { + e && Sn(t), r && r.d(), n && n.d() + } + } +} + +function _b(e) { + let t, o; + return t = new sb({ + props: { + locale: e[4], + shape: e[31] || e[49], + onchange: e[86], + controls: e[9], + scrollEnable: !1, + hideTitles: !0, + willRenderControls: e[153] + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.locale = e[4]), 262145 & o[1] && (i.shape = e[31] || e[49]), 512 & o[0] && (i.controls = e[9]), 131072 & o[0] && (i.willRenderControls = e[153]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Nb(e) { + let t, o, i, r = e[34] && Ob(e), + n = "row" === e[7] && _b(e); + return { + c() { + r && r.c(), t = Mn(), n && n.c(), o = Rn() + }, + m(e, a) { + r && r.m(e, a), wn(e, t, a), n && n.m(e, a), wn(e, o, a), i = !0 + }, + p(e, i) { + e[34] ? r ? (r.p(e, i), 8 & i[1] && xa(r, 1)) : (r = Ob(e), r.c(), xa(r, 1), r.m(t.parentNode, t)) : r && (ya(), va(r, 1, 1, (() => { + r = null + })), ba()), "row" === e[7] ? n ? (n.p(e, i), 128 & i[0] && xa(n, 1)) : (n = _b(e), n.c(), xa(n, 1), n.m(o.parentNode, o)) : n && (ya(), va(n, 1, 1, (() => { + n = null + })), ba()) + }, + i(e) { + i || (xa(r), xa(n), i = !0) + }, + o(e) { + va(r), va(n), i = !1 + }, + d(e) { + r && r.d(e), e && Sn(t), n && n.d(e), e && Sn(o) + } + } +} + +function Hb(e) { + let t, o; + return t = new vd({ + props: { + class: "PinturaControlListScroller", + elasticity: e[44], + $$slots: { + default: [Zb] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8192 & o[1] && (i.elasticity = e[44]), 67108880 & o[0] | 8388608 & o[1] | 262144 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function jb(e) { + let t, o; + return t = new td({ + props: { + $$slots: { + default: [Ub] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] | 393216 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ub(e) { + let t, o = (M(e[203].icon) ? e[203].icon(e[4]) : e[203].icon) + ""; + return { + c() { + t = Cn("g") + }, + m(e, i) { + wn(e, t, i), t.innerHTML = o + }, + p(e, i) { + 16 & i[0] | 131072 & i[6] && o !== (o = (M(e[203].icon) ? e[203].icon(e[4]) : e[203].icon) + "") && (t.innerHTML = o) + }, + d(e) { + e && Sn(t) + } + } +} + +function Gb(e) { + let t, o, i, r, n, a = (M(e[203].label) ? e[203].label(e[4]) : e[203].label) + "", + s = e[203].icon && jb(e); + return { + c() { + t = kn("div"), s && s.c(), o = Mn(), i = kn("span"), r = Tn(a), An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), s && s.m(t, null), bn(t, o), bn(t, i), bn(i, r), n = !0 + }, + p(e, i) { + e[203].icon ? s ? (s.p(e, i), 131072 & i[6] && xa(s, 1)) : (s = jb(e), s.c(), xa(s, 1), s.m(t, o)) : s && (ya(), va(s, 1, 1, (() => { + s = null + })), ba()), (!n || 16 & i[0] | 131072 & i[6]) && a !== (a = (M(e[203].label) ? e[203].label(e[4]) : e[203].label) + "") && Fn(r, a) + }, + i(e) { + n || (xa(s), n = !0) + }, + o(e) { + va(s), n = !1 + }, + d(e) { + e && Sn(t), s && s.d() + } + } +} + +function Zb(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[4], + class: "PinturaControlList", + optionClass: "PinturaControlListOption", + layout: "row", + options: e[54], + selectedIndex: e[54].findIndex(e[154]), + onchange: e[78], + $$slots: { + option: [Gb, ({ + option: e + }) => ({ + 203: e + }), ({ + option: e + }) => [0, 0, 0, 0, 0, 0, e ? 131072 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 16 & o[0] && (i.locale = e[4]), 8388608 & o[1] && (i.options = e[54]), 67108864 & o[0] | 8388608 & o[1] && (i.selectedIndex = e[54].findIndex(e[154])), 16 & o[0] | 393216 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Xb(e) { + let t, o, i, r, n; + const a = [Ib, Eb], + s = []; + + function l(e, t) { + return e[52] ? 0 : e[45] ? 1 : -1 + }~(o = l(e)) && (i = s[o] = a[o](e)); + let c = e[33] && Hb(e); + return { + c() { + t = kn("div"), i && i.c(), r = Mn(), c && c.c(), An(t, "slot", "footer"), An(t, "style", e[40]) + }, + m(e, i) { + wn(e, t, i), ~o && s[o].m(t, null), bn(t, r), c && c.m(t, null), n = !0 + }, + p(e, d) { + let u = o; + o = l(e), o === u ? ~o && s[o].p(e, d) : (i && (ya(), va(s[u], 1, 1, (() => { + s[u] = null + })), ba()), ~o ? (i = s[o], i ? i.p(e, d) : (i = s[o] = a[o](e), i.c()), xa(i, 1), i.m(t, r)) : i = null), e[33] ? c ? (c.p(e, d), 4 & d[1] && xa(c, 1)) : (c = Hb(e), c.c(), xa(c, 1), c.m(t, null)) : c && (ya(), va(c, 1, 1, (() => { + c = null + })), ba()), (!n || 512 & d[1]) && An(t, "style", e[40]) + }, + i(e) { + n || (xa(i), xa(c), n = !0) + }, + o(e) { + va(i), va(c), n = !1 + }, + d(e) { + e && Sn(t), ~o && s[o].d(), c && c.d() + } + } +} + +function Yb(e) { + let t, o; + return t = new df({ + props: { + hasHeader: e[41], + $$slots: { + footer: [Xb], + main: [Pb], + header: [Mb] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[164]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 1024 & o[1] && (i.hasHeader = e[41]), 2113929201 & o[0] | 134216703 & o[1] | 262144 & o[6] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function qb(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, M, R, P, E, I, A, L, z, F, O, D, B, W, V, _, N, H, U, G, Z, X, Y, q, K, J, Q, ee, te, oe, ie, re, ne, ae, se, le, de, ue, he, pe, me, ge, $e, fe, ye = Gr, + be = () => (ye(), ye = en(Ee, (e => o(35, G = e))), Ee), + xe = Gr, + ve = () => (xe(), xe = en(Fe, (e => o(142, q = e))), Fe), + we = Gr, + Se = () => (we(), we = en(mt, (e => o(37, ie = e))), mt), + ke = Gr, + Ce = () => (ke(), ke = en(Ae, (e => o(149, pe = e))), Ae), + Me = Gr, + Pe = () => (Me(), Me = en(Ie, (e => o(56, $e = e))), Ie); + e.$$.on_destroy.push((() => ye())), e.$$.on_destroy.push((() => xe())), e.$$.on_destroy.push((() => we())), e.$$.on_destroy.push((() => ke())), e.$$.on_destroy.push((() => Me())); + let { + isActive: Ee + } = t; + be(); + let { + isActiveFraction: Ie + } = t; + Pe(); + let { + isVisible: Ae + } = t; + Ce(); + let { + stores: Le + } = t, { + locale: ze = {} + } = t, { + shapes: Fe + } = t; + ve(); + let { + toolbar: Oe = [] + } = t, { + toolShapes: De = {} + } = t, { + toolActive: Be + } = t, { + toolSelectRadius: We + } = t, { + toolRetainStyles: Ve = !1 + } = t, { + toolbarLayout: _e = "stack" + } = t, { + textInputMode: Ne + } = t, { + shapeControls: He = {} + } = t, { + enableButtonFlipVertical: je = !1 + } = t, { + enablePresetSelectImage: Ue = !0 + } = t, { + enablePresetDropImage: Ge = !0 + } = t, { + enableSelectToolToAddShape: Ze = !1 + } = t, { + enableAutoSelectMoveTool: Xe = ["line", "arrow", "path", "rectangle", "ellipse", "text"] + } = t, { + enableTapToAddText: Ye = !1 + } = t, { + enableMoveTool: qe = !1 + } = t, { + enableViewTool: Ke = !1 + } = t, { + enableToolShareStyles: Je = !0 + } = t, { + gridSize: Qe = 0 + } = t, { + snapThreshold: et = 0 + } = t, { + enableSnapToContext: tt = !0 + } = t, { + willRenderHeaderTools: ot = j + } = t, { + willRenderPresetToolbar: it + } = t, { + willRenderShapeStyleControls: nt + } = t, { + willStartInteraction: at + } = t, { + shapePresets: st = [] + } = t, { + utilKey: lt + } = t, { + mapScreenPointToImagePoint: ct + } = t, { + mapImagePointToScreenPoint: dt + } = t, { + imageRotation: ut = 0 + } = t, { + imageFlipX: ht = !1 + } = t, { + imageFlipY: pt = !1 + } = t, { + parentRect: mt + } = t; + Se(); + let { + hooks: gt = {} + } = t; + const ft = Jn("selection"); + on(e, ft, (e => o(148, de = e))); + const yt = Jn("isAnimated"); + on(e, yt, (e => o(139, Z = e))); + const bt = Jn("elasticityMultiplier"); + on(e, bt, (e => o(143, K = e))); + const xt = Jn("ui"); + on(e, xt, (e => o(174, ue = e))); + const vt = Jn("keysPressed"); + let wt; + on(e, vt, (e => o(146, se = e))); + const { + env: St, + history: kt, + rootRect: Ct, + rootColorSecondary: Tt, + enablePanInput: Mt, + enablePanInputStatus: Rt, + enableZoomInput: Pt, + stageRect: Et, + utilRectPadded: It, + scrollElasticity: At, + imageOverlayMarkup: Lt, + imagePreviewModifiers: zt, + imageCropRect: Ft, + shapePreprocessor: Ot, + stageScalar: Dt, + imageSelectionRect: Bt, + imageTransformsInterpolated: Wt, + imageSelectionPan: Vt, + imageSize: _t, + allowPan: Nt, + allowZoom: Ht, + allowZoomControls: jt, + allowPlayPause: Ut + } = Le; + on(e, St, (e => o(140, X = e))), on(e, Ct, (e => o(55, ge = e))), on(e, Tt, (e => o(57, fe = e))), on(e, Rt, (e => o(38, ne = e))), on(e, Et, (e => o(144, J = e))), on(e, It, (e => o(39, he = e))), on(e, zt, (e => o(150, me = e))), on(e, Ft, (e => o(173, re = e))), on(e, Ot, (e => o(147, le = e))), on(e, Dt, (e => o(171, te = e))), on(e, Bt, (e => o(172, oe = e))), on(e, Wt, (e => o(36, Q = e))), on(e, Vt, (e => o(170, ee = e))), on(e, _t, (e => o(145, ae = e))); + let Gt = 0, + Zt = {}; + const Xt = e => { + const [t, o] = wt[e]; + let i, r, n = "relative" === o.position; + const a = n ? "0%" : 0, + s = n ? "0%" : 0; + Ci(t) || wi(t) ? (r = n ? "20%" : .2 * ie.width, i = gi(t), i.x = a, i.y = s, gr(i, { + width: r, + height: r + }, ie)) : Ti(t) ? (r = n ? "10%" : .1 * ie.width, i = gi(t), i.x = a, i.y = s, gr(i, { + rx: r, + ry: r + }, ie)) : Mi(t) && (r = n ? "10%" : .1 * ie.width, i = gi(t), i.x1 = a, i.y1 = s, i.x2 = a, i.y2 = s), i && Promise.resolve().then((() => { + lo(ao(i, void 0, r)) + })) + }, + Yt = e => ct(Ry(e, ge)); + let qt, Kt, Jt = {}; + let Qt; + const eo = e => { + if (!(Ri(e) && Ao(e, "pathClose"))) return; + const t = [...e.strokeColor]; + t[3] = 1, qt.updateMarkupShape(e, { + pathClose: !1, + strokeColor: t + }, !1), qt.removeMarkupShapeProps(e, ["backgroundColor"], !1), qt.confirmMarkupItemDraft(), qt.selectShape(e) + }; + let to; + const oo = (e, t) => { + if (Eo(e)) return e; + if (e.endsWith("%")) { + return parseFloat(e) / 100 * t.width + } + }; + let io = void 0, + ro = void 0, + no = void 0; + const ao = (e, t, o) => { + let i = !1; + t || (i = !0, t = O ? ct(rt(J)) : rt(re)), t.x -= ie.x || 0, t.y -= ie.y || 0, (ht || pt) && (e.flipX = ht, e.flipY = pt); + const r = qt.getShapesNearPosition(q, t); + if (i && r.length) { + const e = .1 * Math.min(re.width, re.height); + t.x += Math.round(-e + Math.random() * e * 2), t.y += Math.round(-e + Math.random() * e * 2) + } + if (0 !== ut && (e.rotation = ht && pt ? -ut : ht || pt ? ut : -ut), Ao(e, "width") && Ao(e, "height")) { + const { + width: o, + height: i + } = mr(e, ["width", "height"], ie); + gr(e, { + x: t.x - .5 * o, + y: t.y - .5 * i + }, ie) + } else if (Ti(e)) gr(e, { + x: t.x, + y: t.y + }, ie); + else if (Mi(e)) { + const { + x1: i, + y1: r, + x2: n, + y2: a + } = mr(e, ["x1", "y1", "x2", "y2"], ie), s = Te(ce(i, r), ce(n, a)), l = T(o) ? rr(o, ie.width) : s; + gr(e, { + x1: t.x - l, + y1: t.y + l, + x2: t.x + l, + y2: t.y - l + }, ie) + } else if (Ri(e)) { + const { + points: o + } = mr(e, ["points"], ie), i = Re(o); + gr(e, { + points: o.map((e => ({ + x: e.x + t.x - i.x, + y: e.y + t.y - i.y + }))) + }, ie) + } + return e + }, + so = (e, t) => { + const o = ao(bi(e, re), t); + return e.shape && (Ao(e.shape, "x") && (o.x = e.shape.x), Ao(e.shape, "y") && (o.y = e.shape.y)), lo(o) + }, + lo = e => { + const { + beforeAddShape: t = (() => !0) + } = gt; + if (t(e)) return qt.addShape(e), qt.selectShape(e), D("addshape", e), kt.write(), e + }; + let co = !1; + const uo = () => { + kt.write() + }; + let ho; + const po = Jn("redrawTrigger"); + on(e, po, (e => o(141, Y = e))); + const mo = [], + go = ec(Z ? 20 : 0); + on(e, go, (e => o(138, U = e))); + return e.$$set = e => { + "isActive" in e && be(o(1, Ee = e.isActive)), "isActiveFraction" in e && Pe(o(2, Ie = e.isActiveFraction)), "isVisible" in e && Ce(o(3, Ae = e.isVisible)), "stores" in e && o(101, Le = e.stores), "locale" in e && o(4, ze = e.locale), "shapes" in e && ve(o(5, Fe = e.shapes)), "toolbar" in e && o(102, Oe = e.toolbar), "toolShapes" in e && o(103, De = e.toolShapes), "toolActive" in e && o(0, Be = e.toolActive), "toolSelectRadius" in e && o(6, We = e.toolSelectRadius), "toolRetainStyles" in e && o(104, Ve = e.toolRetainStyles), "toolbarLayout" in e && o(7, _e = e.toolbarLayout), "textInputMode" in e && o(8, Ne = e.textInputMode), "shapeControls" in e && o(9, He = e.shapeControls), "enableButtonFlipVertical" in e && o(10, je = e.enableButtonFlipVertical), "enablePresetSelectImage" in e && o(11, Ue = e.enablePresetSelectImage), "enablePresetDropImage" in e && o(12, Ge = e.enablePresetDropImage), "enableSelectToolToAddShape" in e && o(105, Ze = e.enableSelectToolToAddShape), "enableAutoSelectMoveTool" in e && o(106, Xe = e.enableAutoSelectMoveTool), "enableTapToAddText" in e && o(13, Ye = e.enableTapToAddText), "enableMoveTool" in e && o(107, qe = e.enableMoveTool), "enableViewTool" in e && o(108, Ke = e.enableViewTool), "enableToolShareStyles" in e && o(109, Je = e.enableToolShareStyles), "gridSize" in e && o(14, Qe = e.gridSize), "snapThreshold" in e && o(15, et = e.snapThreshold), "enableSnapToContext" in e && o(16, tt = e.enableSnapToContext), "willRenderHeaderTools" in e && o(110, ot = e.willRenderHeaderTools), "willRenderPresetToolbar" in e && o(111, it = e.willRenderPresetToolbar), "willRenderShapeStyleControls" in e && o(17, nt = e.willRenderShapeStyleControls), "willStartInteraction" in e && o(112, at = e.willStartInteraction), "shapePresets" in e && o(18, st = e.shapePresets), "utilKey" in e && o(19, lt = e.utilKey), "mapScreenPointToImagePoint" in e && o(20, ct = e.mapScreenPointToImagePoint), "mapImagePointToScreenPoint" in e && o(21, dt = e.mapImagePointToScreenPoint), "imageRotation" in e && o(22, ut = e.imageRotation), "imageFlipX" in e && o(23, ht = e.imageFlipX), "imageFlipY" in e && o(24, pt = e.imageFlipY), "parentRect" in e && Se(o(25, mt = e.parentRect)), "hooks" in e && o(113, gt = e.hooks) + }, e.$$.update = () => { + var t, ee, te, oe; + if (4194304 & e.$$.dirty[4] && o(123, i = se.includes(18)), 2098176 & e.$$.dirty[3] && (wt && De === wt || o(114, wt = De)), 16 & e.$$.dirty[1] && Nt.set(G), 16 & e.$$.dirty[1] && Ht.set(G), 16 & e.$$.dirty[1] && jt.set(G), 512 & e.$$.dirty[3] && o(33, r = Array.isArray(Oe) && Oe.length > 1 && Array.isArray(Oe[0][1])), 4 & e.$$.dirty[1] | 512 & e.$$.dirty[3] && o(54, n = r ? Oe.map(((e, t) => [t, e[0]])) : []), 67108864 & e.$$.dirty[0] | 4 & e.$$.dirty[1] | 512 & e.$$.dirty[3] && o(137, a = r ? Oe[Gt][1] : Oe), 262144 & e.$$.dirty[0] | 311296 & e.$$.dirty[3] | 8192 & e.$$.dirty[4] && o(32, s = ((e, { + willRenderPresetToolbar: t, + shapePresets: o, + enableViewTool: i, + enableMoveTool: n + }) => { + let a = 0 !== o.length || t ? e : e.filter((e => "preset" !== e[0])); + return r && (a = [ + ["move", e => e.shapeLabelToolMove, { + icon: e => e.shapeIconToolMove + }], + ["view", e => e.shapeLabelToolView, { + icon: e => e.shapeIconToolView + }], ...a + ]), a = n ? a : a.filter((e => "move" !== e[0])), i ? a : a.filter((e => "view" !== e[0])) + })(a, { + willRenderPresetToolbar: it, + shapePresets: st, + enableMoveTool: qe, + enableViewTool: Ke + })), 2 & e.$$.dirty[1] && o(135, d = !!s.length), 1 & e.$$.dirty[0] | 2 & e.$$.dirty[1] | 2048 & e.$$.dirty[4] && d && void 0 === Be && o(0, Be = s[0][0]), 67108865 & e.$$.dirty[0] | 4 & e.$$.dirty[1] | 4194304 & e.$$.dirty[3] | 8192 & e.$$.dirty[4] && r && o(115, Zt = { + ...Zt, + [Gt]: a.map((([e]) => e)).includes(Be) ? Be : Zt[Gt] || a[0][0] + }), 512 & e.$$.dirty[0] && o(134, l = !!Object.keys(He).length), 2 & e.$$.dirty[1] && o(34, c = s.length > 1), 12 & e.$$.dirty[1] && o(53, u = c || r), 1 & e.$$.dirty[0] && o(136, h = void 0 !== Be), 7168 & e.$$.dirty[4] && o(52, p = (!h || d) && l), 268435456 & e.$$.dirty[0] && o(30, D = ho && (t = ho, (e, o) => { + t.dispatchEvent(xp(e, o)) + })), 1073741825 & e.$$.dirty[0] | 16 & e.$$.dirty[1] && G && D && D("selectcontrol", Be), 524288 & e.$$.dirty[0] | 16 & e.$$.dirty[1] | 67108864 & e.$$.dirty[4] && (G ? un(zt, me[lt] = { + maskMarkupOpacity: .85 + }, me) : delete me[lt]), 1 & e.$$.dirty[0] | 2097152 & e.$$.dirty[3] && o(133, m = Be && wt[Be] ? wt[Be][1] : void 0), 512 & e.$$.dirty[4] && o(124, g = m && m.isSelection ? "selection" : "shapes"), 1073741824 & e.$$.dirty[3] | 1 & e.$$.dirty[4] && (e => { + if (!qt) return; + const t = qt.getShapeDraft(ft); + t && (e && (Kt = t.drawMode), qt.updateShapeDraft({ + drawMode: e ? "subtract" : Kt + }, ft)) + })("selection" === g && i), 134217729 & e.$$.dirty[0] && Be && qt) { + const e = qt.getMarkupItemDraft(); + e && eo(e) + } + if (1 & e.$$.dirty[0] && Be && qt && "move" !== Be && qt.blurShapes(), 16 & e.$$.dirty[1] | 33554432 & e.$$.dirty[4] && o(51, $ = pe && G), 256 & e.$$.dirty[1] | 1048576 & e.$$.dirty[4] && o(50, f = he && ce(J.x - he.x, J.y - he.y)), 512 & e.$$.dirty[0] && o(132, y = Object.keys(He)), 16 & e.$$.dirty[1] | 262144 & e.$$.dirty[4] && o(120, b = G && q.filter(Ii)[0]), 16 & e.$$.dirty[1] | 262144 & e.$$.dirty[4] && o(129, x = G && q.find((e => Ai(e)))), 16 & e.$$.dirty[1] | 262144 & e.$$.dirty[4] && o(49, v = G && q.find((e => Li(e)))), 1 & e.$$.dirty[0] | 16 & e.$$.dirty[1] | 2097152 & e.$$.dirty[3] && o(126, w = G && wt[Be] ? or(gi({ + ...wt[Be][0], + ...ue[lt] ? ue[lt][Be] : {} + })) : {}), 2097152 & e.$$.dirty[3] && wt && o(116, Jt = {}), 1 & e.$$.dirty[0] | 8454144 & e.$$.dirty[3] | 260 & e.$$.dirty[4] && o(125, S = w && Object.keys(w).reduce(((e, t) => { + const o = "disableStyle" === t, + i = "settings" === t, + r = !!y.find((e => e.split("_").includes(t))); + if (!o && !i && !r) return e; + if (void 0 === w[t]) return e; + if (!0 === w.disableStyle) return e; + if (w.disableStyle && w.disableStyle.includes(t)) return e; + if ("strokeWidth" === t && void 0 === Jt[t] && Ao(w, "points")) return e[t] = w[t], e; + const { + share: n = !0 + } = w.settings && w.settings[t] || {}, a = Je && n ? Jt : Jt[Be] || {}; + return e[t] = Ao(a, t) ? a[t] : w[t], e + }), {})), e.$$.dirty[4], 524289 & e.$$.dirty[0] | 2048 & e.$$.dirty[3] | 2 & e.$$.dirty[4] && (Ve ? ((e, t, o) => { + const i = ue[e], + r = i ? i[t] : {}; + xt.set({ + ...ue, + [e]: { + ...i, + [t]: { + ...r, + ...o + } + } + }) + })(lt, Be, S) : (ee = lt, xt.set({ + [ee]: {} + }))), 16 & e.$$.dirty[1] | 134217728 & e.$$.dirty[3] | 16777218 & e.$$.dirty[4] && o(31, k = de && G ? b || S : void 0), 1 & e.$$.dirty[1] | 8388608 & e.$$.dirty[4] && k && k.lineEnd && !le && console.warn("Set shapePreprocessor property to draw lineStart and lineEnd styles.\nhttps://pqina.nl/pintura/docs/v8/api/exports/#createshapepreprocessor"), 1 & e.$$.dirty[0] | 4 & e.$$.dirty[4] && o(48, C = Ao(w, "eraseRadius") || Ao(w, "points") && !Ao(w, "pathClose") || "move" === Be || "view" === Be), 64 & e.$$.dirty[1] | 4 & e.$$.dirty[4] && o(47, M = w && void 0 !== w.eraseRadius ? oo(w.eraseRadius, ie) : void 0), 16 & e.$$.dirty[1] | 4194304 & e.$$.dirty[4] && o(130, R = G && se.includes(32)), 1 & e.$$.dirty[0] | 16 & e.$$.dirty[1] && o(131, P = G && "view" === Be), 192 & e.$$.dirty[4] && o(128, E = P || R), 48 & e.$$.dirty[4] && o(127, I = !!E && (!!x || Gd(document.activeElement))), 16 & e.$$.dirty[1] | 24 & e.$$.dirty[4] && Mt.set(!G || E && !I), 16 & e.$$.dirty[1] | 8 & e.$$.dirty[4] && Pt.set(!G || !I), 64 & e.$$.dirty[1] | 6 & e.$$.dirty[4] && o(121, A = w.cursorStyle ? (({ + cursorStyle: e, + cursorSize: t + }, o, i) => { + let r; + const n = o[t]; + if (void 0 === n ? r = oo(t, i) : Eo(n) ? r = n : T(n) && (r = lr(t, o[t], i), "strokeWidth" === t && (r *= .5)), !(r <= 0 || void 0 === r)) return { + size: r, + style: e + } + })(w, { + ...w, + ...S + }, ie) : void 0), 67108864 & e.$$.dirty[3] | 2097152 & e.$$.dirty[4] && o(122, L = no && (oe = ae, (te = no).x >= 0 && te.y >= 0 && te.x <= oe.width && te.y <= oe.height)), 524288 & e.$$.dirty[0] | 160 & e.$$.dirty[1] | 1929379840 & e.$$.dirty[3] | 1 & e.$$.dirty[4]) + if (L && !io && A && !ne) { + const e = A.size * Q.scale, + t = { + id: "cursor-" + lt, + x: ro.x, + y: ro.y, + strokeWidth: .5, + strokeColor: [0, 0, 0] + }; + "ellipse" === A.style && (t.rx = e, t.ry = e); + const o = { + strokeWidth: 2.5, + strokeColor: [1, 1, 1], + opacity: .75 + }, + r = [{ + ...t, + ...o + }, t]; + if ("selection" === g && i) { + const t = e, + i = ro.x + t, + n = ro.y + t + 4, + a = { + id: "cursor-" + lt, + strokeWidth: .75, + strokeColor: [0, 0, 0], + points: [{ + x: i, + y: n + }, { + x: i + 4, + y: n + }] + }; + r.push({ + ...a, + ...o, + strokeWidth: 2, + points: [{ + x: i - .5, + y: n + }, { + x: i + 4.5, + y: n + }] + }, a) + }(e => { + Lt.update((t => [...t.filter((e => e.id !== "cursor-" + lt)), ...e])) + })(r) + } else Lt.update((e => e.filter((e => e.id !== "cursor-" + lt)))); + 1 & e.$$.dirty[0] | 128 & e.$$.dirty[1] | 956301312 & e.$$.dirty[3] && o(46, z = L ? ((e, t, o, i, r, n) => { + if (i) return r ? "grabbing" : "grab"; + if (e && !t) return "none"; + if (!t) return "move" === n ? "default" : "crosshair"; + let a = t || o; + return Ii(a) ? Ai(a) ? "modal" === Ne ? "default" : "text" : Zi(a) ? "move" : "default" : "default" + })(A, io, b, ne, false, Be) : "default"), 264193 & e.$$.dirty[0] | 262144 & e.$$.dirty[3] && o(45, F = "preset" === Be && (st.length > 0 || Ue || it)), 64 & e.$$.dirty[1] && (O = !Ao(ie, "x") && !Ao(ie, "y")), 524288 & e.$$.dirty[4] && o(44, B = K * At), 262144 & e.$$.dirty[3] | 196608 & e.$$.dirty[4] && o(43, W = Y && it ? e => zp((() => it(e, so, { + ...X + }, (() => po.set({}))))) : j), 1048576 & e.$$.dirty[3] && o(42, V = Object.keys(gt).reduce(((e, t) => ("beforeAddShape" === t || void 0 === gt[t] || (e[t] = gt[t]), e)), {})), 16 & e.$$.dirty[1] && (e => { + q && Fe.update((t => t.map((t => (t._prerender = !!e && Ai(t), t))))) + })(G), 131072 & e.$$.dirty[3] | 196608 & e.$$.dirty[4] && o(29, _ = Y && ot([], X, (() => po.set({})))), 536871424 & e.$$.dirty[0] && o(41, N = !!_.length || !!Object.keys(He).some((e => mo.includes(e)))), 16 & e.$$.dirty[1] | 32768 & e.$$.dirty[4] && Z && go.set(G ? 0 : 20), 16384 & e.$$.dirty[4] && o(40, H = U ? `transform: translateY(${U}px)` : void 0) + }, Ut.set(!1), [Be, Ee, Ie, Ae, ze, Fe, We, _e, Ne, He, je, Ue, Ge, Ye, Qe, et, tt, nt, st, lt, ct, dt, ut, ht, pt, mt, Gt, qt, ho, _, D, k, s, r, c, G, Q, ie, ne, he, H, N, V, W, B, F, z, M, C, v, f, $, p, u, n, ge, $e, fe, ft, yt, bt, xt, vt, St, Ct, Tt, Rt, Et, It, Lt, zt, Ft, Ot, Dt, Bt, Wt, Vt, _t, ({ + index: e + }, t) => { + o(26, Gt = e), o(0, Be = Zt[e]) + }, ({ + value: e + }, t) => { + o(0, Be = e), (Ze || /enter/i.test(t.key)) && Xt(e) + }, e => { + if ("eraser" === Be) Qt = qt.eraseShape(); + else if (Be && wt[Be]) { + const [e, t = {}] = wt[Be], { + drawMode: o + } = k; + "selection" === g && "new" === o && ft.set([]); + let r = {}; + "selection" === g && (D("selectiondown", [...de]), i && (Kt = e.drawMode, r.drawMode = "subtract")), Qt = qt.createShape({ + ...e, + ...S, + ...r + }, t) + } else Qt = void 0; + return !!Qt && (Qt.start(e), !0) + }, e => !!Qt && (Qt.update(e), !0), e => !!Qt && (Qt.release(e), !0), e => !!Qt && (Qt.cancel(e), Qt = void 0, !0), e => { + if (!Qt) return !1; + if (Qt.end(e), Qt = void 0, "selection" === g) { + if (e.detail.isTap) { + const [e] = wt[Be]; + e.bitmap || ft.set([]) + } + D("selectionup", [...de]) + } + const t = qt.getMarkupItemDraft(), + i = qe && (!0 === Xe || Array.isArray(Xe) && Xe.includes(Be)); + return t && !t.isEditing || !i || o(0, Be = "move"), !0 + }, e => { + const { + key: t + } = e, o = qt.getMarkupItemDraft(); + /escape/i.test(t) && o && (e.preventDefault(), e.stopPropagation(), qt.discardMarkupItemDraft(), Qt = void 0), /enter/i.test(t) && o && (e.preventDefault(), e.stopPropagation(), eo(o), Qt = void 0) + }, function(e) { + Object.keys(e).forEach((t => { + const { + retain: i = !0, + share: r = !0 + } = w.settings && w.settings[t] || {}; + i && (Je && r ? o(116, Jt[t] = e[t], Jt) : (Jt[Be] || o(116, Jt[Be] = {}, Jt), o(116, Jt[Be][t] = e[t], Jt))) + })), D("selectstyle", e), b && (qt.updateMarkupShape(b, e), clearTimeout(to), to = setTimeout((() => { + uo() + }), 200)) + }, (e, t, i) => { + o(118, ro = t), o(119, no = i) + }, () => { + o(119, no = void 0), o(118, ro = void 0) + }, e => { + D("markuptap", e) + }, e => o(117, io = e), () => { + co = !1 + }, (e, t) => { + if (co) return; + const { + beforeAddShape: o = (() => !0) + } = gt, i = Yt(t), r = qt.getMarkupItemDraft(), n = $t(re, { + x: i.x + (ie.x || 0), + y: i.y + (ie.y || 0) + }); + if (r && !n && qt.discardMarkupItemDraft(), n) { + if (!r) { + const r = bi(e, re), + n = ao(r, i); + return o(n) ? (Bi(n), void qt.addShape(n)) : (co = !0, void t.preventDefault()) + } + Ci(r) && (i.x -= .5 * r.width, i.y -= .5 * r.height), e.shape && (Ao(e.shape, "x") && (i.x = e.shape.x), Ao(e.shape, "y") && (i.y = e.shape.y)), qt.updateMarkupShape(r, i) + } + }, (e, t) => { + if (co) return; + const o = Yt(t); + if (!$t(re, { + x: o.x + (ie.x || 0), + y: o.y + (ie.y || 0) + })) return void qt.discardMarkupItemDraft(); + const i = qt.confirmMarkupItemDraft(); + qt.selectShape(i), D("addshape", i), kt.write() + }, e => so(e), e => { + return t = e.detail.resources, o = Yt(e.detail.event), t.forEach((e => so(e, o))); + var t, o + }, e => { + if (!at) return !0; + const t = rectClone(oe); + return rectScale(t, 1 / te), rectTranslate(t, ee), rectScale(t, Q.scale), at(e, { + ...t, + x: t.x + J.x, + y: t.y + J.y + }) + }, uo, po, mo, go, Le, Oe, De, Ve, Ze, Xe, qe, Ke, Je, ot, it, at, gt, wt, Zt, Jt, io, ro, no, b, A, L, i, g, S, w, I, E, x, R, P, y, m, l, d, h, a, U, Z, X, Y, q, K, J, ae, se, le, de, pe, me, function(t) { + Qn.call(this, e, t) + }, e => e[0] === Be, (e, t, o) => { + const i = e.filter((([, e]) => !mo.includes(e))); + return nt ? nt(i, t, o) : i + }, e => e[0] === Gt, e => { + Promise.resolve().then((() => { + D("addshape", e), uo() + })) + }, e => { + D("selectshape", e) + }, e => { + Promise.resolve().then((() => { + D("blurshape", e) + })) + }, e => { + D("tapshape", e) + }, e => { + D("updateshape", e), uo() + }, e => { + D("removeshape", e), uo() + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + qt = e, o(27, qt) + })) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + ho = e, o(28, ho) + })) + }, e => e.filter((([, e]) => mo.includes(e))), function(t) { + Qn.call(this, e, t) + }] +} +class Kb extends Fa { + constructor(e) { + super(), za(this, e, qb, Yb, Qr, { + isActive: 1, + isActiveFraction: 2, + isVisible: 3, + stores: 101, + locale: 4, + shapes: 5, + toolbar: 102, + toolShapes: 103, + toolActive: 0, + toolSelectRadius: 6, + toolRetainStyles: 104, + toolbarLayout: 7, + textInputMode: 8, + shapeControls: 9, + enableButtonFlipVertical: 10, + enablePresetSelectImage: 11, + enablePresetDropImage: 12, + enableSelectToolToAddShape: 105, + enableAutoSelectMoveTool: 106, + enableTapToAddText: 13, + enableMoveTool: 107, + enableViewTool: 108, + enableToolShareStyles: 109, + gridSize: 14, + snapThreshold: 15, + enableSnapToContext: 16, + willRenderHeaderTools: 110, + willRenderPresetToolbar: 111, + willRenderShapeStyleControls: 17, + willStartInteraction: 112, + shapePresets: 18, + utilKey: 19, + mapScreenPointToImagePoint: 20, + mapImagePointToScreenPoint: 21, + imageRotation: 22, + imageFlipX: 23, + imageFlipY: 24, + parentRect: 25, + hooks: 113 + }, null, [-1, -1, -1, -1, -1, -1, -1]) + } + get isActive() { + return this.$$.ctx[1] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[2] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[3] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[101] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[4] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get shapes() { + return this.$$.ctx[5] + } + set shapes(e) { + this.$$set({ + shapes: e + }), pa() + } + get toolbar() { + return this.$$.ctx[102] + } + set toolbar(e) { + this.$$set({ + toolbar: e + }), pa() + } + get toolShapes() { + return this.$$.ctx[103] + } + set toolShapes(e) { + this.$$set({ + toolShapes: e + }), pa() + } + get toolActive() { + return this.$$.ctx[0] + } + set toolActive(e) { + this.$$set({ + toolActive: e + }), pa() + } + get toolSelectRadius() { + return this.$$.ctx[6] + } + set toolSelectRadius(e) { + this.$$set({ + toolSelectRadius: e + }), pa() + } + get toolRetainStyles() { + return this.$$.ctx[104] + } + set toolRetainStyles(e) { + this.$$set({ + toolRetainStyles: e + }), pa() + } + get toolbarLayout() { + return this.$$.ctx[7] + } + set toolbarLayout(e) { + this.$$set({ + toolbarLayout: e + }), pa() + } + get textInputMode() { + return this.$$.ctx[8] + } + set textInputMode(e) { + this.$$set({ + textInputMode: e + }), pa() + } + get shapeControls() { + return this.$$.ctx[9] + } + set shapeControls(e) { + this.$$set({ + shapeControls: e + }), pa() + } + get enableButtonFlipVertical() { + return this.$$.ctx[10] + } + set enableButtonFlipVertical(e) { + this.$$set({ + enableButtonFlipVertical: e + }), pa() + } + get enablePresetSelectImage() { + return this.$$.ctx[11] + } + set enablePresetSelectImage(e) { + this.$$set({ + enablePresetSelectImage: e + }), pa() + } + get enablePresetDropImage() { + return this.$$.ctx[12] + } + set enablePresetDropImage(e) { + this.$$set({ + enablePresetDropImage: e + }), pa() + } + get enableSelectToolToAddShape() { + return this.$$.ctx[105] + } + set enableSelectToolToAddShape(e) { + this.$$set({ + enableSelectToolToAddShape: e + }), pa() + } + get enableAutoSelectMoveTool() { + return this.$$.ctx[106] + } + set enableAutoSelectMoveTool(e) { + this.$$set({ + enableAutoSelectMoveTool: e + }), pa() + } + get enableTapToAddText() { + return this.$$.ctx[13] + } + set enableTapToAddText(e) { + this.$$set({ + enableTapToAddText: e + }), pa() + } + get enableMoveTool() { + return this.$$.ctx[107] + } + set enableMoveTool(e) { + this.$$set({ + enableMoveTool: e + }), pa() + } + get enableViewTool() { + return this.$$.ctx[108] + } + set enableViewTool(e) { + this.$$set({ + enableViewTool: e + }), pa() + } + get enableToolShareStyles() { + return this.$$.ctx[109] + } + set enableToolShareStyles(e) { + this.$$set({ + enableToolShareStyles: e + }), pa() + } + get gridSize() { + return this.$$.ctx[14] + } + set gridSize(e) { + this.$$set({ + gridSize: e + }), pa() + } + get snapThreshold() { + return this.$$.ctx[15] + } + set snapThreshold(e) { + this.$$set({ + snapThreshold: e + }), pa() + } + get enableSnapToContext() { + return this.$$.ctx[16] + } + set enableSnapToContext(e) { + this.$$set({ + enableSnapToContext: e + }), pa() + } + get willRenderHeaderTools() { + return this.$$.ctx[110] + } + set willRenderHeaderTools(e) { + this.$$set({ + willRenderHeaderTools: e + }), pa() + } + get willRenderPresetToolbar() { + return this.$$.ctx[111] + } + set willRenderPresetToolbar(e) { + this.$$set({ + willRenderPresetToolbar: e + }), pa() + } + get willRenderShapeStyleControls() { + return this.$$.ctx[17] + } + set willRenderShapeStyleControls(e) { + this.$$set({ + willRenderShapeStyleControls: e + }), pa() + } + get willStartInteraction() { + return this.$$.ctx[112] + } + set willStartInteraction(e) { + this.$$set({ + willStartInteraction: e + }), pa() + } + get shapePresets() { + return this.$$.ctx[18] + } + set shapePresets(e) { + this.$$set({ + shapePresets: e + }), pa() + } + get utilKey() { + return this.$$.ctx[19] + } + set utilKey(e) { + this.$$set({ + utilKey: e + }), pa() + } + get mapScreenPointToImagePoint() { + return this.$$.ctx[20] + } + set mapScreenPointToImagePoint(e) { + this.$$set({ + mapScreenPointToImagePoint: e + }), pa() + } + get mapImagePointToScreenPoint() { + return this.$$.ctx[21] + } + set mapImagePointToScreenPoint(e) { + this.$$set({ + mapImagePointToScreenPoint: e + }), pa() + } + get imageRotation() { + return this.$$.ctx[22] + } + set imageRotation(e) { + this.$$set({ + imageRotation: e + }), pa() + } + get imageFlipX() { + return this.$$.ctx[23] + } + set imageFlipX(e) { + this.$$set({ + imageFlipX: e + }), pa() + } + get imageFlipY() { + return this.$$.ctx[24] + } + set imageFlipY(e) { + this.$$set({ + imageFlipY: e + }), pa() + } + get parentRect() { + return this.$$.ctx[25] + } + set parentRect(e) { + this.$$set({ + parentRect: e + }), pa() + } + get hooks() { + return this.$$.ctx[113] + } + set hooks(e) { + this.$$set({ + hooks: e + }), pa() + } +} +var Jb = (e, t, o, i, r, n, a, s, l) => { + const c = ue(e), + d = .5 * o.width, + u = .5 * o.height, + h = .5 * t.width, + p = .5 * t.height, + m = r.x + i.x, + g = r.y + i.y; + s && (c.x = o.width - c.x), l && (c.y = o.height - c.y); + const $ = Math.cos(n), + f = Math.sin(n); + c.x -= d, c.y -= u; + const y = c.x * $ - c.y * f, + b = c.x * f + c.y * $; + c.x = d + y, c.y = u + b, c.x *= a, c.y *= a, c.x += h, c.y += p, c.x += m, c.y += g, c.x -= d * a, c.y -= u * a; + const x = (r.x - m) * a, + v = (r.y - g) * a, + w = x * $ - v * f, + S = x * f + v * $; + return c.x += w, c.y += S, c + }, + Qb = (e, t, o, i, r, n, a, s, l) => { + const c = ue(e), + d = Ve(o), + u = Ve(t), + h = ce(r.x + i.x, r.y + i.y), + p = Math.cos(n), + m = Math.sin(n); + c.x -= u.x, c.y -= u.y; + const g = (r.x - h.x) * a, + $ = (r.y - h.y) * a, + f = g * p - $ * m, + y = g * m + $ * p; + c.x -= f, c.y -= y, c.x -= h.x, c.y -= h.y, c.x /= a, c.y /= a; + const b = c.x * p + c.y * m, + x = c.x * m - c.y * p; + return c.x = b, c.y = -x, c.x += d.x, c.y += d.y, s && (c.x = o.width - c.x), l && (c.y = o.height - c.y), c + }, + ex = e => "boolean" == typeof e; + +function tx(e) { + let t, o, i; + + function r(t) { + e[58](t) + } + let n = { + utilKey: "annotate", + stores: e[4], + locale: e[5], + isActive: e[1], + isActiveFraction: e[2], + isVisible: e[3], + mapScreenPointToImagePoint: e[43], + mapImagePointToScreenPoint: e[42], + imageRotation: e[44], + imageFlipX: e[41], + imageFlipY: e[40], + shapes: e[46], + toolbar: e[20] || e[6], + toolShapes: e[21] || e[7], + toolRetainStyles: e[8], + enableSelectToolToAddShape: e[29], + enableTapToAddText: e[30], + enableViewTool: e[28], + enableMoveTool: e[32], + enableAutoSelectMoveTool: e[31], + snapThreshold: e[15], + gridSize: Eo(e[17]) ? e[17] : e[14], + enableSnapToContext: ex(e[18]) ? e[18] : e[16], + enableToolShareStyles: e[12], + shapeControls: e[22] || e[9], + shapePresets: e[26], + enableButtonFlipVertical: e[23], + parentRect: e[47], + enablePresetDropImage: e[25], + enablePresetSelectImage: e[24], + toolSelectRadius: e[10], + textInputMode: e[11], + willStartInteraction: e[13], + willRenderPresetToolbar: e[27] || e[19], + hooks: { + willRenderShapeControls: e[33], + willRenderShapeTextControls: e[34], + beforeAddShape: e[35], + beforeRemoveShape: e[36], + beforeDeselectShape: e[37], + beforeSelectShape: e[38], + beforeUpdateShape: e[39] + } + }; + return void 0 !== e[0] && (n.toolActive = e[0]), t = new Kb({ + props: n + }), ta.push((() => Ea(t, "toolActive", r))), t.$on("measure", e[59]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 16 & i[0] && (r.stores = e[4]), 32 & i[0] && (r.locale = e[5]), 2 & i[0] && (r.isActive = e[1]), 4 & i[0] && (r.isActiveFraction = e[2]), 8 & i[0] && (r.isVisible = e[3]), 4096 & i[1] && (r.mapScreenPointToImagePoint = e[43]), 2048 & i[1] && (r.mapImagePointToScreenPoint = e[42]), 8192 & i[1] && (r.imageRotation = e[44]), 1024 & i[1] && (r.imageFlipX = e[41]), 512 & i[1] && (r.imageFlipY = e[40]), 1048640 & i[0] && (r.toolbar = e[20] || e[6]), 2097280 & i[0] && (r.toolShapes = e[21] || e[7]), 256 & i[0] && (r.toolRetainStyles = e[8]), 536870912 & i[0] && (r.enableSelectToolToAddShape = e[29]), 1073741824 & i[0] && (r.enableTapToAddText = e[30]), 268435456 & i[0] && (r.enableViewTool = e[28]), 2 & i[1] && (r.enableMoveTool = e[32]), 1 & i[1] && (r.enableAutoSelectMoveTool = e[31]), 32768 & i[0] && (r.snapThreshold = e[15]), 147456 & i[0] && (r.gridSize = Eo(e[17]) ? e[17] : e[14]), 327680 & i[0] && (r.enableSnapToContext = ex(e[18]) ? e[18] : e[16]), 4096 & i[0] && (r.enableToolShareStyles = e[12]), 4194816 & i[0] && (r.shapeControls = e[22] || e[9]), 67108864 & i[0] && (r.shapePresets = e[26]), 8388608 & i[0] && (r.enableButtonFlipVertical = e[23]), 33554432 & i[0] && (r.enablePresetDropImage = e[25]), 16777216 & i[0] && (r.enablePresetSelectImage = e[24]), 1024 & i[0] && (r.toolSelectRadius = e[10]), 2048 & i[0] && (r.textInputMode = e[11]), 8192 & i[0] && (r.willStartInteraction = e[13]), 134742016 & i[0] && (r.willRenderPresetToolbar = e[27] || e[19]), 508 & i[1] && (r.hooks = { + willRenderShapeControls: e[33], + willRenderShapeTextControls: e[34], + beforeAddShape: e[35], + beforeRemoveShape: e[36], + beforeDeselectShape: e[37], + beforeSelectShape: e[38], + beforeUpdateShape: e[39] + }), !o && 1 & i[0] && (o = !0, r.toolActive = e[0], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function ox(e, t, o) { + let i, r, n, a, s, l, c, d, u; + let { + isActive: h + } = t, { + isActiveFraction: p + } = t, { + isVisible: m + } = t, { + stores: g + } = t, { + locale: $ = {} + } = t, { + markupEditorToolbar: f + } = t, { + markupEditorToolStyles: y + } = t, { + markupEditorToolRetainStyles: b + } = t, { + markupEditorShapeStyleControls: x + } = t, { + markupEditorToolSelectRadius: v + } = t, { + markupEditorTextInputMode: w + } = t, { + markupEditorToolShareStyles: S + } = t, { + markupEditorWillStartInteraction: k + } = t, { + markupEditorGridSize: C = 0 + } = t, { + markupEditorSnapThreshold: T = 0 + } = t, { + markupEditorSnapToContext: M = !1 + } = t, { + annotateGridSize: R + } = t, { + annotateSnapToContext: P + } = t, { + willRenderShapePresetToolbar: E + } = t, { + annotateTools: I + } = t, { + annotateToolShapes: A + } = t, { + annotateShapeControls: L + } = t, { + annotateActiveTool: z + } = t, { + annotateEnableButtonFlipVertical: F = !1 + } = t, { + annotateEnableSelectImagePreset: O = !1 + } = t, { + annotateEnableDropImagePreset: D = !0 + } = t, { + annotatePresets: B = [] + } = t, { + annotateWillRenderShapePresetToolbar: W + } = t, { + enableViewTool: V + } = t, { + enableSelectToolToAddShape: _ + } = t, { + enableTapToAddText: N + } = t, { + enableAutoSelectMoveTool: H + } = t, { + enableMoveTool: j + } = t, { + willRenderShapeControls: U + } = t, { + willRenderShapeTextControls: G + } = t, { + beforeAddShape: Z + } = t, { + beforeRemoveShape: X + } = t, { + beforeDeselectShape: Y + } = t, { + beforeSelectShape: q + } = t, { + beforeUpdateShape: K + } = t; + const { + rootRect: J, + imageAnnotation: Q, + imageSize: ee, + imageRotation: te, + imageFlipX: oe, + imageFlipY: ie, + imageTransforms: re, + imageTransformsInterpolated: ne + } = g; + return on(e, J, (e => o(57, d = e))), on(e, ee, (e => o(56, c = e))), on(e, te, (e => o(44, u = e))), on(e, oe, (e => o(41, a = e))), on(e, ie, (e => o(40, n = e))), on(e, re, (e => o(55, l = e))), on(e, ne, (e => o(54, s = e))), e.$$set = e => { + "isActive" in e && o(1, h = e.isActive), "isActiveFraction" in e && o(2, p = e.isActiveFraction), "isVisible" in e && o(3, m = e.isVisible), "stores" in e && o(4, g = e.stores), "locale" in e && o(5, $ = e.locale), "markupEditorToolbar" in e && o(6, f = e.markupEditorToolbar), "markupEditorToolStyles" in e && o(7, y = e.markupEditorToolStyles), "markupEditorToolRetainStyles" in e && o(8, b = e.markupEditorToolRetainStyles), "markupEditorShapeStyleControls" in e && o(9, x = e.markupEditorShapeStyleControls), "markupEditorToolSelectRadius" in e && o(10, v = e.markupEditorToolSelectRadius), "markupEditorTextInputMode" in e && o(11, w = e.markupEditorTextInputMode), "markupEditorToolShareStyles" in e && o(12, S = e.markupEditorToolShareStyles), "markupEditorWillStartInteraction" in e && o(13, k = e.markupEditorWillStartInteraction), "markupEditorGridSize" in e && o(14, C = e.markupEditorGridSize), "markupEditorSnapThreshold" in e && o(15, T = e.markupEditorSnapThreshold), "markupEditorSnapToContext" in e && o(16, M = e.markupEditorSnapToContext), "annotateGridSize" in e && o(17, R = e.annotateGridSize), "annotateSnapToContext" in e && o(18, P = e.annotateSnapToContext), "willRenderShapePresetToolbar" in e && o(19, E = e.willRenderShapePresetToolbar), "annotateTools" in e && o(20, I = e.annotateTools), "annotateToolShapes" in e && o(21, A = e.annotateToolShapes), "annotateShapeControls" in e && o(22, L = e.annotateShapeControls), "annotateActiveTool" in e && o(0, z = e.annotateActiveTool), "annotateEnableButtonFlipVertical" in e && o(23, F = e.annotateEnableButtonFlipVertical), "annotateEnableSelectImagePreset" in e && o(24, O = e.annotateEnableSelectImagePreset), "annotateEnableDropImagePreset" in e && o(25, D = e.annotateEnableDropImagePreset), "annotatePresets" in e && o(26, B = e.annotatePresets), "annotateWillRenderShapePresetToolbar" in e && o(27, W = e.annotateWillRenderShapePresetToolbar), "enableViewTool" in e && o(28, V = e.enableViewTool), "enableSelectToolToAddShape" in e && o(29, _ = e.enableSelectToolToAddShape), "enableTapToAddText" in e && o(30, N = e.enableTapToAddText), "enableAutoSelectMoveTool" in e && o(31, H = e.enableAutoSelectMoveTool), "enableMoveTool" in e && o(32, j = e.enableMoveTool), "willRenderShapeControls" in e && o(33, U = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(34, G = e.willRenderShapeTextControls), "beforeAddShape" in e && o(35, Z = e.beforeAddShape), "beforeRemoveShape" in e && o(36, X = e.beforeRemoveShape), "beforeDeselectShape" in e && o(37, Y = e.beforeDeselectShape), "beforeSelectShape" in e && o(38, q = e.beforeSelectShape), "beforeUpdateShape" in e && o(39, K = e.beforeUpdateShape) + }, e.$$.update = () => { + 125830656 & e.$$.dirty[1] && o(43, i = e => Qb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)), 125830656 & e.$$.dirty[1] && o(42, r = e => Jb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)) + }, [z, h, p, m, g, $, f, y, b, x, v, w, S, k, C, T, M, R, P, E, I, A, L, F, O, D, B, W, V, _, N, H, j, U, G, Z, X, Y, q, K, n, a, r, i, u, J, Q, ee, te, oe, ie, re, ne, "annotate", s, l, c, d, function(e) { + z = e, o(0, z) + }, function(t) { + Qn.call(this, e, t) + }] +} +var ix = { + util: ["annotate", class extends Fa { + constructor(e) { + super(), za(this, e, ox, tx, Qr, { + name: 53, + isActive: 1, + isActiveFraction: 2, + isVisible: 3, + stores: 4, + locale: 5, + markupEditorToolbar: 6, + markupEditorToolStyles: 7, + markupEditorToolRetainStyles: 8, + markupEditorShapeStyleControls: 9, + markupEditorToolSelectRadius: 10, + markupEditorTextInputMode: 11, + markupEditorToolShareStyles: 12, + markupEditorWillStartInteraction: 13, + markupEditorGridSize: 14, + markupEditorSnapThreshold: 15, + markupEditorSnapToContext: 16, + annotateGridSize: 17, + annotateSnapToContext: 18, + willRenderShapePresetToolbar: 19, + annotateTools: 20, + annotateToolShapes: 21, + annotateShapeControls: 22, + annotateActiveTool: 0, + annotateEnableButtonFlipVertical: 23, + annotateEnableSelectImagePreset: 24, + annotateEnableDropImagePreset: 25, + annotatePresets: 26, + annotateWillRenderShapePresetToolbar: 27, + enableViewTool: 28, + enableSelectToolToAddShape: 29, + enableTapToAddText: 30, + enableAutoSelectMoveTool: 31, + enableMoveTool: 32, + willRenderShapeControls: 33, + willRenderShapeTextControls: 34, + beforeAddShape: 35, + beforeRemoveShape: 36, + beforeDeselectShape: 37, + beforeSelectShape: 38, + beforeUpdateShape: 39 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[53] + } + get isActive() { + return this.$$.ctx[1] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[2] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[3] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[4] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[5] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get markupEditorToolbar() { + return this.$$.ctx[6] + } + set markupEditorToolbar(e) { + this.$$set({ + markupEditorToolbar: e + }), pa() + } + get markupEditorToolStyles() { + return this.$$.ctx[7] + } + set markupEditorToolStyles(e) { + this.$$set({ + markupEditorToolStyles: e + }), pa() + } + get markupEditorToolRetainStyles() { + return this.$$.ctx[8] + } + set markupEditorToolRetainStyles(e) { + this.$$set({ + markupEditorToolRetainStyles: e + }), pa() + } + get markupEditorShapeStyleControls() { + return this.$$.ctx[9] + } + set markupEditorShapeStyleControls(e) { + this.$$set({ + markupEditorShapeStyleControls: e + }), pa() + } + get markupEditorToolSelectRadius() { + return this.$$.ctx[10] + } + set markupEditorToolSelectRadius(e) { + this.$$set({ + markupEditorToolSelectRadius: e + }), pa() + } + get markupEditorTextInputMode() { + return this.$$.ctx[11] + } + set markupEditorTextInputMode(e) { + this.$$set({ + markupEditorTextInputMode: e + }), pa() + } + get markupEditorToolShareStyles() { + return this.$$.ctx[12] + } + set markupEditorToolShareStyles(e) { + this.$$set({ + markupEditorToolShareStyles: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[13] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + get markupEditorGridSize() { + return this.$$.ctx[14] + } + set markupEditorGridSize(e) { + this.$$set({ + markupEditorGridSize: e + }), pa() + } + get markupEditorSnapThreshold() { + return this.$$.ctx[15] + } + set markupEditorSnapThreshold(e) { + this.$$set({ + markupEditorSnapThreshold: e + }), pa() + } + get markupEditorSnapToContext() { + return this.$$.ctx[16] + } + set markupEditorSnapToContext(e) { + this.$$set({ + markupEditorSnapToContext: e + }), pa() + } + get annotateGridSize() { + return this.$$.ctx[17] + } + set annotateGridSize(e) { + this.$$set({ + annotateGridSize: e + }), pa() + } + get annotateSnapToContext() { + return this.$$.ctx[18] + } + set annotateSnapToContext(e) { + this.$$set({ + annotateSnapToContext: e + }), pa() + } + get willRenderShapePresetToolbar() { + return this.$$.ctx[19] + } + set willRenderShapePresetToolbar(e) { + this.$$set({ + willRenderShapePresetToolbar: e + }), pa() + } + get annotateTools() { + return this.$$.ctx[20] + } + set annotateTools(e) { + this.$$set({ + annotateTools: e + }), pa() + } + get annotateToolShapes() { + return this.$$.ctx[21] + } + set annotateToolShapes(e) { + this.$$set({ + annotateToolShapes: e + }), pa() + } + get annotateShapeControls() { + return this.$$.ctx[22] + } + set annotateShapeControls(e) { + this.$$set({ + annotateShapeControls: e + }), pa() + } + get annotateActiveTool() { + return this.$$.ctx[0] + } + set annotateActiveTool(e) { + this.$$set({ + annotateActiveTool: e + }), pa() + } + get annotateEnableButtonFlipVertical() { + return this.$$.ctx[23] + } + set annotateEnableButtonFlipVertical(e) { + this.$$set({ + annotateEnableButtonFlipVertical: e + }), pa() + } + get annotateEnableSelectImagePreset() { + return this.$$.ctx[24] + } + set annotateEnableSelectImagePreset(e) { + this.$$set({ + annotateEnableSelectImagePreset: e + }), pa() + } + get annotateEnableDropImagePreset() { + return this.$$.ctx[25] + } + set annotateEnableDropImagePreset(e) { + this.$$set({ + annotateEnableDropImagePreset: e + }), pa() + } + get annotatePresets() { + return this.$$.ctx[26] + } + set annotatePresets(e) { + this.$$set({ + annotatePresets: e + }), pa() + } + get annotateWillRenderShapePresetToolbar() { + return this.$$.ctx[27] + } + set annotateWillRenderShapePresetToolbar(e) { + this.$$set({ + annotateWillRenderShapePresetToolbar: e + }), pa() + } + get enableViewTool() { + return this.$$.ctx[28] + } + set enableViewTool(e) { + this.$$set({ + enableViewTool: e + }), pa() + } + get enableSelectToolToAddShape() { + return this.$$.ctx[29] + } + set enableSelectToolToAddShape(e) { + this.$$set({ + enableSelectToolToAddShape: e + }), pa() + } + get enableTapToAddText() { + return this.$$.ctx[30] + } + set enableTapToAddText(e) { + this.$$set({ + enableTapToAddText: e + }), pa() + } + get enableAutoSelectMoveTool() { + return this.$$.ctx[31] + } + set enableAutoSelectMoveTool(e) { + this.$$set({ + enableAutoSelectMoveTool: e + }), pa() + } + get enableMoveTool() { + return this.$$.ctx[32] + } + set enableMoveTool(e) { + this.$$set({ + enableMoveTool: e + }), pa() + } + get willRenderShapeControls() { + return this.$$.ctx[33] + } + set willRenderShapeControls(e) { + this.$$set({ + willRenderShapeControls: e + }), pa() + } + get willRenderShapeTextControls() { + return this.$$.ctx[34] + } + set willRenderShapeTextControls(e) { + this.$$set({ + willRenderShapeTextControls: e + }), pa() + } + get beforeAddShape() { + return this.$$.ctx[35] + } + set beforeAddShape(e) { + this.$$set({ + beforeAddShape: e + }), pa() + } + get beforeRemoveShape() { + return this.$$.ctx[36] + } + set beforeRemoveShape(e) { + this.$$set({ + beforeRemoveShape: e + }), pa() + } + get beforeDeselectShape() { + return this.$$.ctx[37] + } + set beforeDeselectShape(e) { + this.$$set({ + beforeDeselectShape: e + }), pa() + } + get beforeSelectShape() { + return this.$$.ctx[38] + } + set beforeSelectShape(e) { + this.$$set({ + beforeSelectShape: e + }), pa() + } + get beforeUpdateShape() { + return this.$$.ctx[39] + } + set beforeUpdateShape(e) { + this.$$set({ + beforeUpdateShape: e + }), pa() + } + }] +}; + +function rx(e) { + let t, o, i; + + function r(t) { + e[50](t) + } + let n = { + stores: e[4], + locale: e[5], + isActive: e[1], + isActiveFraction: e[2], + isVisible: e[3], + mapScreenPointToImagePoint: e[41], + mapImagePointToScreenPoint: e[40], + utilKey: "decorate", + shapes: e[43], + toolbar: e[19] || e[6], + toolShapes: e[20] || e[7], + toolRetainStyles: e[8], + shapeControls: e[21] || e[9], + shapePresets: e[25], + enableSelectToolToAddShape: e[27], + enableTapToAddText: e[28], + enableViewTool: e[29], + enableMoveTool: e[30], + enableAutoSelectMoveTool: e[31], + snapThreshold: e[15], + gridSize: Eo(e[17]) ? e[17] : e[14], + enableSnapToContext: ex(e[18]) ? e[18] : e[16], + enableToolShareStyles: e[12], + enablePresetSelectImage: e[23], + enablePresetDropImage: e[24], + enableButtonFlipVertical: e[22], + parentRect: e[42], + toolSelectRadius: e[10], + textInputMode: e[11], + willStartInteraction: e[39], + willRenderPresetToolbar: e[26] || e[13], + hooks: { + willRenderShapeControls: e[32], + willRenderShapeTextControls: e[33], + beforeAddShape: e[34], + beforeRemoveShape: e[35], + beforeDeselectShape: e[36], + beforeSelectShape: e[37], + beforeUpdateShape: e[38] + } + }; + return void 0 !== e[0] && (n.toolActive = e[0]), t = new Kb({ + props: n + }), ta.push((() => Ea(t, "toolActive", r))), t.$on("measure", e[51]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 16 & i[0] && (r.stores = e[4]), 32 & i[0] && (r.locale = e[5]), 2 & i[0] && (r.isActive = e[1]), 4 & i[0] && (r.isActiveFraction = e[2]), 8 & i[0] && (r.isVisible = e[3]), 1024 & i[1] && (r.mapScreenPointToImagePoint = e[41]), 512 & i[1] && (r.mapImagePointToScreenPoint = e[40]), 524352 & i[0] && (r.toolbar = e[19] || e[6]), 1048704 & i[0] && (r.toolShapes = e[20] || e[7]), 256 & i[0] && (r.toolRetainStyles = e[8]), 2097664 & i[0] && (r.shapeControls = e[21] || e[9]), 33554432 & i[0] && (r.shapePresets = e[25]), 134217728 & i[0] && (r.enableSelectToolToAddShape = e[27]), 268435456 & i[0] && (r.enableTapToAddText = e[28]), 536870912 & i[0] && (r.enableViewTool = e[29]), 1073741824 & i[0] && (r.enableMoveTool = e[30]), 1 & i[1] && (r.enableAutoSelectMoveTool = e[31]), 32768 & i[0] && (r.snapThreshold = e[15]), 147456 & i[0] && (r.gridSize = Eo(e[17]) ? e[17] : e[14]), 327680 & i[0] && (r.enableSnapToContext = ex(e[18]) ? e[18] : e[16]), 4096 & i[0] && (r.enableToolShareStyles = e[12]), 8388608 & i[0] && (r.enablePresetSelectImage = e[23]), 16777216 & i[0] && (r.enablePresetDropImage = e[24]), 4194304 & i[0] && (r.enableButtonFlipVertical = e[22]), 1024 & i[0] && (r.toolSelectRadius = e[10]), 2048 & i[0] && (r.textInputMode = e[11]), 256 & i[1] && (r.willStartInteraction = e[39]), 67117056 & i[0] && (r.willRenderPresetToolbar = e[26] || e[13]), 254 & i[1] && (r.hooks = { + willRenderShapeControls: e[32], + willRenderShapeTextControls: e[33], + beforeAddShape: e[34], + beforeRemoveShape: e[35], + beforeDeselectShape: e[36], + beforeSelectShape: e[37], + beforeUpdateShape: e[38] + }), !o && 1 & i[0] && (o = !0, r.toolActive = e[0], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function nx(e, t, o) { + let i, r, n, a, s; + let { + isActive: l + } = t, { + isActiveFraction: c + } = t, { + isVisible: d + } = t, { + stores: u + } = t, { + locale: h = {} + } = t, { + markupEditorToolbar: p + } = t, { + markupEditorToolStyles: m + } = t, { + markupEditorToolRetainStyles: g + } = t, { + markupEditorShapeStyleControls: $ + } = t, { + markupEditorToolSelectRadius: f + } = t, { + markupEditorTextInputMode: y + } = t, { + markupEditorToolShareStyles: b + } = t, { + willRenderShapePresetToolbar: x + } = t, { + markupEditorGridSize: v + } = t, { + markupEditorSnapThreshold: w + } = t, { + markupEditorSnapToContext: S = !0 + } = t, { + decorateGridSize: k + } = t, { + decorateSnapToContext: C + } = t, { + decorateTools: T + } = t, { + decorateToolShapes: M + } = t, { + decorateShapeControls: R + } = t, { + decorateActiveTool: P + } = t, { + decorateEnableButtonFlipVertical: E = !1 + } = t, { + decorateEnableSelectImagePreset: I = !1 + } = t, { + decorateEnableDropImagePreset: A = !0 + } = t, { + decoratePresets: L = [] + } = t, { + decorateWillRenderShapePresetToolbar: z + } = t, { + enableSelectToolToAddShape: F + } = t, { + enableTapToAddText: O + } = t, { + enableViewTool: D + } = t, { + enableMoveTool: B + } = t, { + enableAutoSelectMoveTool: W + } = t, { + willRenderShapeControls: V + } = t, { + willRenderShapeTextControls: _ + } = t, { + beforeAddShape: N + } = t, { + beforeRemoveShape: H + } = t, { + beforeDeselectShape: j + } = t, { + beforeSelectShape: U + } = t, { + beforeUpdateShape: G + } = t, { + markupEditorWillStartInteraction: Z + } = t; + const { + imageCropRect: X, + imageDecoration: Y, + imageSelectionRectPresentation: q, + imageTransformsInterpolated: K + } = u; + return on(e, q, (e => o(48, a = e))), on(e, K, (e => o(49, s = e))), e.$$set = e => { + "isActive" in e && o(1, l = e.isActive), "isActiveFraction" in e && o(2, c = e.isActiveFraction), "isVisible" in e && o(3, d = e.isVisible), "stores" in e && o(4, u = e.stores), "locale" in e && o(5, h = e.locale), "markupEditorToolbar" in e && o(6, p = e.markupEditorToolbar), "markupEditorToolStyles" in e && o(7, m = e.markupEditorToolStyles), "markupEditorToolRetainStyles" in e && o(8, g = e.markupEditorToolRetainStyles), "markupEditorShapeStyleControls" in e && o(9, $ = e.markupEditorShapeStyleControls), "markupEditorToolSelectRadius" in e && o(10, f = e.markupEditorToolSelectRadius), "markupEditorTextInputMode" in e && o(11, y = e.markupEditorTextInputMode), "markupEditorToolShareStyles" in e && o(12, b = e.markupEditorToolShareStyles), "willRenderShapePresetToolbar" in e && o(13, x = e.willRenderShapePresetToolbar), "markupEditorGridSize" in e && o(14, v = e.markupEditorGridSize), "markupEditorSnapThreshold" in e && o(15, w = e.markupEditorSnapThreshold), "markupEditorSnapToContext" in e && o(16, S = e.markupEditorSnapToContext), "decorateGridSize" in e && o(17, k = e.decorateGridSize), "decorateSnapToContext" in e && o(18, C = e.decorateSnapToContext), "decorateTools" in e && o(19, T = e.decorateTools), "decorateToolShapes" in e && o(20, M = e.decorateToolShapes), "decorateShapeControls" in e && o(21, R = e.decorateShapeControls), "decorateActiveTool" in e && o(0, P = e.decorateActiveTool), "decorateEnableButtonFlipVertical" in e && o(22, E = e.decorateEnableButtonFlipVertical), "decorateEnableSelectImagePreset" in e && o(23, I = e.decorateEnableSelectImagePreset), "decorateEnableDropImagePreset" in e && o(24, A = e.decorateEnableDropImagePreset), "decoratePresets" in e && o(25, L = e.decoratePresets), "decorateWillRenderShapePresetToolbar" in e && o(26, z = e.decorateWillRenderShapePresetToolbar), "enableSelectToolToAddShape" in e && o(27, F = e.enableSelectToolToAddShape), "enableTapToAddText" in e && o(28, O = e.enableTapToAddText), "enableViewTool" in e && o(29, D = e.enableViewTool), "enableMoveTool" in e && o(30, B = e.enableMoveTool), "enableAutoSelectMoveTool" in e && o(31, W = e.enableAutoSelectMoveTool), "willRenderShapeControls" in e && o(32, V = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(33, _ = e.willRenderShapeTextControls), "beforeAddShape" in e && o(34, N = e.beforeAddShape), "beforeRemoveShape" in e && o(35, H = e.beforeRemoveShape), "beforeDeselectShape" in e && o(36, j = e.beforeDeselectShape), "beforeSelectShape" in e && o(37, U = e.beforeSelectShape), "beforeUpdateShape" in e && o(38, G = e.beforeUpdateShape), "markupEditorWillStartInteraction" in e && o(39, Z = e.markupEditorWillStartInteraction) + }, e.$$.update = () => { + 262144 & e.$$.dirty[1] && o(47, i = s ? s.scale : 1), 196608 & e.$$.dirty[1] && o(41, r = e => { + const t = ue(e); + return t.x -= a.x, t.y -= a.y, t.x /= i, t.y /= i, t + }), 196608 & e.$$.dirty[1] && o(40, n = e => { + const t = ue(e); + return t.x *= i, t.y *= i, t.x += a.x, t.y += a.y, t + }) + }, [P, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, T, M, R, E, I, A, L, z, F, O, D, B, W, V, _, N, H, j, U, G, Z, n, r, X, Y, q, K, "decorate", i, a, s, function(e) { + P = e, o(0, P) + }, function(t) { + Qn.call(this, e, t) + }] +} +var ax = { + util: ["decorate", class extends Fa { + constructor(e) { + super(), za(this, e, nx, rx, Qr, { + name: 46, + isActive: 1, + isActiveFraction: 2, + isVisible: 3, + stores: 4, + locale: 5, + markupEditorToolbar: 6, + markupEditorToolStyles: 7, + markupEditorToolRetainStyles: 8, + markupEditorShapeStyleControls: 9, + markupEditorToolSelectRadius: 10, + markupEditorTextInputMode: 11, + markupEditorToolShareStyles: 12, + willRenderShapePresetToolbar: 13, + markupEditorGridSize: 14, + markupEditorSnapThreshold: 15, + markupEditorSnapToContext: 16, + decorateGridSize: 17, + decorateSnapToContext: 18, + decorateTools: 19, + decorateToolShapes: 20, + decorateShapeControls: 21, + decorateActiveTool: 0, + decorateEnableButtonFlipVertical: 22, + decorateEnableSelectImagePreset: 23, + decorateEnableDropImagePreset: 24, + decoratePresets: 25, + decorateWillRenderShapePresetToolbar: 26, + enableSelectToolToAddShape: 27, + enableTapToAddText: 28, + enableViewTool: 29, + enableMoveTool: 30, + enableAutoSelectMoveTool: 31, + willRenderShapeControls: 32, + willRenderShapeTextControls: 33, + beforeAddShape: 34, + beforeRemoveShape: 35, + beforeDeselectShape: 36, + beforeSelectShape: 37, + beforeUpdateShape: 38, + markupEditorWillStartInteraction: 39 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[46] + } + get isActive() { + return this.$$.ctx[1] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[2] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[3] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[4] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[5] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get markupEditorToolbar() { + return this.$$.ctx[6] + } + set markupEditorToolbar(e) { + this.$$set({ + markupEditorToolbar: e + }), pa() + } + get markupEditorToolStyles() { + return this.$$.ctx[7] + } + set markupEditorToolStyles(e) { + this.$$set({ + markupEditorToolStyles: e + }), pa() + } + get markupEditorToolRetainStyles() { + return this.$$.ctx[8] + } + set markupEditorToolRetainStyles(e) { + this.$$set({ + markupEditorToolRetainStyles: e + }), pa() + } + get markupEditorShapeStyleControls() { + return this.$$.ctx[9] + } + set markupEditorShapeStyleControls(e) { + this.$$set({ + markupEditorShapeStyleControls: e + }), pa() + } + get markupEditorToolSelectRadius() { + return this.$$.ctx[10] + } + set markupEditorToolSelectRadius(e) { + this.$$set({ + markupEditorToolSelectRadius: e + }), pa() + } + get markupEditorTextInputMode() { + return this.$$.ctx[11] + } + set markupEditorTextInputMode(e) { + this.$$set({ + markupEditorTextInputMode: e + }), pa() + } + get markupEditorToolShareStyles() { + return this.$$.ctx[12] + } + set markupEditorToolShareStyles(e) { + this.$$set({ + markupEditorToolShareStyles: e + }), pa() + } + get willRenderShapePresetToolbar() { + return this.$$.ctx[13] + } + set willRenderShapePresetToolbar(e) { + this.$$set({ + willRenderShapePresetToolbar: e + }), pa() + } + get markupEditorGridSize() { + return this.$$.ctx[14] + } + set markupEditorGridSize(e) { + this.$$set({ + markupEditorGridSize: e + }), pa() + } + get markupEditorSnapThreshold() { + return this.$$.ctx[15] + } + set markupEditorSnapThreshold(e) { + this.$$set({ + markupEditorSnapThreshold: e + }), pa() + } + get markupEditorSnapToContext() { + return this.$$.ctx[16] + } + set markupEditorSnapToContext(e) { + this.$$set({ + markupEditorSnapToContext: e + }), pa() + } + get decorateGridSize() { + return this.$$.ctx[17] + } + set decorateGridSize(e) { + this.$$set({ + decorateGridSize: e + }), pa() + } + get decorateSnapToContext() { + return this.$$.ctx[18] + } + set decorateSnapToContext(e) { + this.$$set({ + decorateSnapToContext: e + }), pa() + } + get decorateTools() { + return this.$$.ctx[19] + } + set decorateTools(e) { + this.$$set({ + decorateTools: e + }), pa() + } + get decorateToolShapes() { + return this.$$.ctx[20] + } + set decorateToolShapes(e) { + this.$$set({ + decorateToolShapes: e + }), pa() + } + get decorateShapeControls() { + return this.$$.ctx[21] + } + set decorateShapeControls(e) { + this.$$set({ + decorateShapeControls: e + }), pa() + } + get decorateActiveTool() { + return this.$$.ctx[0] + } + set decorateActiveTool(e) { + this.$$set({ + decorateActiveTool: e + }), pa() + } + get decorateEnableButtonFlipVertical() { + return this.$$.ctx[22] + } + set decorateEnableButtonFlipVertical(e) { + this.$$set({ + decorateEnableButtonFlipVertical: e + }), pa() + } + get decorateEnableSelectImagePreset() { + return this.$$.ctx[23] + } + set decorateEnableSelectImagePreset(e) { + this.$$set({ + decorateEnableSelectImagePreset: e + }), pa() + } + get decorateEnableDropImagePreset() { + return this.$$.ctx[24] + } + set decorateEnableDropImagePreset(e) { + this.$$set({ + decorateEnableDropImagePreset: e + }), pa() + } + get decoratePresets() { + return this.$$.ctx[25] + } + set decoratePresets(e) { + this.$$set({ + decoratePresets: e + }), pa() + } + get decorateWillRenderShapePresetToolbar() { + return this.$$.ctx[26] + } + set decorateWillRenderShapePresetToolbar(e) { + this.$$set({ + decorateWillRenderShapePresetToolbar: e + }), pa() + } + get enableSelectToolToAddShape() { + return this.$$.ctx[27] + } + set enableSelectToolToAddShape(e) { + this.$$set({ + enableSelectToolToAddShape: e + }), pa() + } + get enableTapToAddText() { + return this.$$.ctx[28] + } + set enableTapToAddText(e) { + this.$$set({ + enableTapToAddText: e + }), pa() + } + get enableViewTool() { + return this.$$.ctx[29] + } + set enableViewTool(e) { + this.$$set({ + enableViewTool: e + }), pa() + } + get enableMoveTool() { + return this.$$.ctx[30] + } + set enableMoveTool(e) { + this.$$set({ + enableMoveTool: e + }), pa() + } + get enableAutoSelectMoveTool() { + return this.$$.ctx[31] + } + set enableAutoSelectMoveTool(e) { + this.$$set({ + enableAutoSelectMoveTool: e + }), pa() + } + get willRenderShapeControls() { + return this.$$.ctx[32] + } + set willRenderShapeControls(e) { + this.$$set({ + willRenderShapeControls: e + }), pa() + } + get willRenderShapeTextControls() { + return this.$$.ctx[33] + } + set willRenderShapeTextControls(e) { + this.$$set({ + willRenderShapeTextControls: e + }), pa() + } + get beforeAddShape() { + return this.$$.ctx[34] + } + set beforeAddShape(e) { + this.$$set({ + beforeAddShape: e + }), pa() + } + get beforeRemoveShape() { + return this.$$.ctx[35] + } + set beforeRemoveShape(e) { + this.$$set({ + beforeRemoveShape: e + }), pa() + } + get beforeDeselectShape() { + return this.$$.ctx[36] + } + set beforeDeselectShape(e) { + this.$$set({ + beforeDeselectShape: e + }), pa() + } + get beforeSelectShape() { + return this.$$.ctx[37] + } + set beforeSelectShape(e) { + this.$$set({ + beforeSelectShape: e + }), pa() + } + get beforeUpdateShape() { + return this.$$.ctx[38] + } + set beforeUpdateShape(e) { + this.$$set({ + beforeUpdateShape: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[39] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + }] +}; + +function sx(e) { + let t, o; + return t = new Kb({ + props: { + stores: e[3], + locale: e[4], + isActive: e[0], + isActiveFraction: e[1], + isVisible: e[2], + mapScreenPointToImagePoint: e[25], + mapImagePointToScreenPoint: e[24], + utilKey: "sticker", + shapePresets: e[5], + shapes: e[6] ? e[34] : e[35], + toolActive: "preset", + imageFlipX: !!e[6] && e[23], + imageFlipY: !!e[6] && e[22], + imageRotation: e[6] ? e[30] : 0, + parentRect: e[6] ? e[36] : e[32], + snapThreshold: e[28], + gridSize: e[27], + enableSnapToContext: e[26], + enablePresetDropImage: e[7], + enablePresetSelectImage: e[29], + enableButtonFlipVertical: e[10] || e[8], + toolSelectRadius: e[14], + willStartInteraction: e[21], + willRenderPresetToolbar: e[11] || e[9] || e[15], + hooks: { + willRenderShapeControls: e[12], + willRenderShapeTextControls: e[13], + beforeAddShape: e[16], + beforeRemoveShape: e[17], + beforeDeselectShape: e[18], + beforeSelectShape: e[19], + beforeUpdateShape: e[20] + } + } + }), t.$on("measure", e[59]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 8 & o[0] && (i.stores = e[3]), 16 & o[0] && (i.locale = e[4]), 1 & o[0] && (i.isActive = e[0]), 2 & o[0] && (i.isActiveFraction = e[1]), 4 & o[0] && (i.isVisible = e[2]), 33554432 & o[0] && (i.mapScreenPointToImagePoint = e[25]), 16777216 & o[0] && (i.mapImagePointToScreenPoint = e[24]), 32 & o[0] && (i.shapePresets = e[5]), 64 & o[0] && (i.shapes = e[6] ? e[34] : e[35]), 8388672 & o[0] && (i.imageFlipX = !!e[6] && e[23]), 4194368 & o[0] && (i.imageFlipY = !!e[6] && e[22]), 1073741888 & o[0] && (i.imageRotation = e[6] ? e[30] : 0), 64 & o[0] && (i.parentRect = e[6] ? e[36] : e[32]), 268435456 & o[0] && (i.snapThreshold = e[28]), 134217728 & o[0] && (i.gridSize = e[27]), 67108864 & o[0] && (i.enableSnapToContext = e[26]), 128 & o[0] && (i.enablePresetDropImage = e[7]), 536870912 & o[0] && (i.enablePresetSelectImage = e[29]), 1280 & o[0] && (i.enableButtonFlipVertical = e[10] || e[8]), 16384 & o[0] && (i.toolSelectRadius = e[14]), 2097152 & o[0] && (i.willStartInteraction = e[21]), 35328 & o[0] && (i.willRenderPresetToolbar = e[11] || e[9] || e[15]), 2043904 & o[0] && (i.hooks = { + willRenderShapeControls: e[12], + willRenderShapeTextControls: e[13], + beforeAddShape: e[16], + beforeRemoveShape: e[17], + beforeDeselectShape: e[18], + beforeSelectShape: e[19], + beforeUpdateShape: e[20] + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function lx(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f; + let { + isActive: y + } = t, { + isActiveFraction: b + } = t, { + isVisible: x + } = t, { + stores: v + } = t, { + locale: w = {} + } = t, { + stickers: S = [] + } = t, { + stickerForceEnable: k = !1 + } = t, { + stickerStickToImage: C = !1 + } = t, { + stickerEnableSelectImagePreset: T = !0 + } = t, { + stickerEnableDropImagePreset: M = !0 + } = t, { + stickerEnableButtonFlipVertical: R = !1 + } = t, { + stickerWillRenderShapePresetToolbar: P + } = t, { + stickerEnableSelectImage: E = !0 + } = t, { + stickersEnableButtonFlipVertical: I = !1 + } = t, { + stickersWillRenderShapePresetToolbar: A + } = t, { + markupEditorGridSize: L = 0 + } = t, { + markupEditorSnapThreshold: z = 0 + } = t, { + markupEditorSnapToContext: F = !1 + } = t, { + annotateGridSize: O + } = t, { + annotateSnapToContext: D + } = t, { + decorateGridSize: B + } = t, { + decorateSnapToContext: W + } = t, { + willRenderShapeControls: V + } = t, { + willRenderShapeTextControls: _ + } = t, { + markupEditorToolSelectRadius: N + } = t, { + willRenderShapePresetToolbar: H + } = t, { + beforeAddShape: j + } = t, { + beforeRemoveShape: U + } = t, { + beforeDeselectShape: G + } = t, { + beforeSelectShape: Z + } = t, { + beforeUpdateShape: X + } = t, { + markupEditorWillStartInteraction: Y + } = t; + const { + rootRect: q, + imageCropRect: K, + imageSelectionRectPresentation: J, + imageAnnotation: Q, + imageDecoration: ee, + imageSize: te, + imageTransforms: oe, + imageTransformsInterpolated: ie, + imageRotation: re, + imageFlipX: ne, + imageFlipY: ae + } = v; + return on(e, q, (e => o(58, $ = e))), on(e, J, (e => o(54, d = e))), on(e, te, (e => o(57, g = e))), on(e, oe, (e => o(56, m = e))), on(e, ie, (e => o(55, p = e))), on(e, re, (e => o(30, f = e))), on(e, ne, (e => o(23, h = e))), on(e, ae, (e => o(22, u = e))), e.$$set = e => { + "isActive" in e && o(0, y = e.isActive), "isActiveFraction" in e && o(1, b = e.isActiveFraction), "isVisible" in e && o(2, x = e.isVisible), "stores" in e && o(3, v = e.stores), "locale" in e && o(4, w = e.locale), "stickers" in e && o(5, S = e.stickers), "stickerForceEnable" in e && o(43, k = e.stickerForceEnable), "stickerStickToImage" in e && o(6, C = e.stickerStickToImage), "stickerEnableSelectImagePreset" in e && o(44, T = e.stickerEnableSelectImagePreset), "stickerEnableDropImagePreset" in e && o(7, M = e.stickerEnableDropImagePreset), "stickerEnableButtonFlipVertical" in e && o(8, R = e.stickerEnableButtonFlipVertical), "stickerWillRenderShapePresetToolbar" in e && o(9, P = e.stickerWillRenderShapePresetToolbar), "stickerEnableSelectImage" in e && o(45, E = e.stickerEnableSelectImage), "stickersEnableButtonFlipVertical" in e && o(10, I = e.stickersEnableButtonFlipVertical), "stickersWillRenderShapePresetToolbar" in e && o(11, A = e.stickersWillRenderShapePresetToolbar), "markupEditorGridSize" in e && o(46, L = e.markupEditorGridSize), "markupEditorSnapThreshold" in e && o(47, z = e.markupEditorSnapThreshold), "markupEditorSnapToContext" in e && o(48, F = e.markupEditorSnapToContext), "annotateGridSize" in e && o(49, O = e.annotateGridSize), "annotateSnapToContext" in e && o(50, D = e.annotateSnapToContext), "decorateGridSize" in e && o(51, B = e.decorateGridSize), "decorateSnapToContext" in e && o(52, W = e.decorateSnapToContext), "willRenderShapeControls" in e && o(12, V = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(13, _ = e.willRenderShapeTextControls), "markupEditorToolSelectRadius" in e && o(14, N = e.markupEditorToolSelectRadius), "willRenderShapePresetToolbar" in e && o(15, H = e.willRenderShapePresetToolbar), "beforeAddShape" in e && o(16, j = e.beforeAddShape), "beforeRemoveShape" in e && o(17, U = e.beforeRemoveShape), "beforeDeselectShape" in e && o(18, G = e.beforeDeselectShape), "beforeSelectShape" in e && o(19, Z = e.beforeSelectShape), "beforeUpdateShape" in e && o(20, X = e.beforeUpdateShape), "markupEditorWillStartInteraction" in e && o(21, Y = e.markupEditorWillStartInteraction) + }, e.$$.update = () => { + 16777216 & e.$$.dirty[1] && o(53, i = p ? p.scale : 1), 24576 & e.$$.dirty[1] && o(29, r = !1 !== T && E), 65536 & e.$$.dirty[1] && o(28, n = z), 64 & e.$$.dirty[0] | 1343488 & e.$$.dirty[1] && o(27, a = C ? Eo(O) ? O : L : Eo(B) ? B : L), 64 & e.$$.dirty[0] | 2752512 & e.$$.dirty[1] && o(26, s = C ? ex(D) ? D : F : ex(W) ? W : F), 12582976 & e.$$.dirty[0] | 264241152 & e.$$.dirty[1] && o(25, l = C ? e => Qb(e, $, g, p.origin, p.translation, m.rotation.z, p.scale, h, u) : e => { + const t = ue(e); + return t.x -= d.x, t.y -= d.y, t.x /= i, t.y /= i, t + }), 12582976 & e.$$.dirty[0] | 264241152 & e.$$.dirty[1] && o(24, c = C ? e => Jb(e, $, g, p.origin, p.translation, m.rotation.z, p.scale, h, u) : e => { + const t = ue(e); + return t.x *= i, t.y *= i, t.x += d.x, t.y += d.y, t + }) + }, [y, b, x, v, w, S, C, M, R, P, I, A, V, _, N, H, j, U, G, Z, X, Y, u, h, c, l, s, a, n, r, f, q, K, J, Q, ee, te, oe, ie, re, ne, ae, "sticker", k, T, E, L, z, F, O, D, B, W, i, d, p, m, g, $, function(t) { + Qn.call(this, e, t) + }] +} +var cx = { + util: ["sticker", class extends Fa { + constructor(e) { + super(), za(this, e, lx, sx, Qr, { + name: 42, + isActive: 0, + isActiveFraction: 1, + isVisible: 2, + stores: 3, + locale: 4, + stickers: 5, + stickerForceEnable: 43, + stickerStickToImage: 6, + stickerEnableSelectImagePreset: 44, + stickerEnableDropImagePreset: 7, + stickerEnableButtonFlipVertical: 8, + stickerWillRenderShapePresetToolbar: 9, + stickerEnableSelectImage: 45, + stickersEnableButtonFlipVertical: 10, + stickersWillRenderShapePresetToolbar: 11, + markupEditorGridSize: 46, + markupEditorSnapThreshold: 47, + markupEditorSnapToContext: 48, + annotateGridSize: 49, + annotateSnapToContext: 50, + decorateGridSize: 51, + decorateSnapToContext: 52, + willRenderShapeControls: 12, + willRenderShapeTextControls: 13, + markupEditorToolSelectRadius: 14, + willRenderShapePresetToolbar: 15, + beforeAddShape: 16, + beforeRemoveShape: 17, + beforeDeselectShape: 18, + beforeSelectShape: 19, + beforeUpdateShape: 20, + markupEditorWillStartInteraction: 21 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[42] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[1] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[2] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[3] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[4] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get stickers() { + return this.$$.ctx[5] + } + set stickers(e) { + this.$$set({ + stickers: e + }), pa() + } + get stickerForceEnable() { + return this.$$.ctx[43] + } + set stickerForceEnable(e) { + this.$$set({ + stickerForceEnable: e + }), pa() + } + get stickerStickToImage() { + return this.$$.ctx[6] + } + set stickerStickToImage(e) { + this.$$set({ + stickerStickToImage: e + }), pa() + } + get stickerEnableSelectImagePreset() { + return this.$$.ctx[44] + } + set stickerEnableSelectImagePreset(e) { + this.$$set({ + stickerEnableSelectImagePreset: e + }), pa() + } + get stickerEnableDropImagePreset() { + return this.$$.ctx[7] + } + set stickerEnableDropImagePreset(e) { + this.$$set({ + stickerEnableDropImagePreset: e + }), pa() + } + get stickerEnableButtonFlipVertical() { + return this.$$.ctx[8] + } + set stickerEnableButtonFlipVertical(e) { + this.$$set({ + stickerEnableButtonFlipVertical: e + }), pa() + } + get stickerWillRenderShapePresetToolbar() { + return this.$$.ctx[9] + } + set stickerWillRenderShapePresetToolbar(e) { + this.$$set({ + stickerWillRenderShapePresetToolbar: e + }), pa() + } + get stickerEnableSelectImage() { + return this.$$.ctx[45] + } + set stickerEnableSelectImage(e) { + this.$$set({ + stickerEnableSelectImage: e + }), pa() + } + get stickersEnableButtonFlipVertical() { + return this.$$.ctx[10] + } + set stickersEnableButtonFlipVertical(e) { + this.$$set({ + stickersEnableButtonFlipVertical: e + }), pa() + } + get stickersWillRenderShapePresetToolbar() { + return this.$$.ctx[11] + } + set stickersWillRenderShapePresetToolbar(e) { + this.$$set({ + stickersWillRenderShapePresetToolbar: e + }), pa() + } + get markupEditorGridSize() { + return this.$$.ctx[46] + } + set markupEditorGridSize(e) { + this.$$set({ + markupEditorGridSize: e + }), pa() + } + get markupEditorSnapThreshold() { + return this.$$.ctx[47] + } + set markupEditorSnapThreshold(e) { + this.$$set({ + markupEditorSnapThreshold: e + }), pa() + } + get markupEditorSnapToContext() { + return this.$$.ctx[48] + } + set markupEditorSnapToContext(e) { + this.$$set({ + markupEditorSnapToContext: e + }), pa() + } + get annotateGridSize() { + return this.$$.ctx[49] + } + set annotateGridSize(e) { + this.$$set({ + annotateGridSize: e + }), pa() + } + get annotateSnapToContext() { + return this.$$.ctx[50] + } + set annotateSnapToContext(e) { + this.$$set({ + annotateSnapToContext: e + }), pa() + } + get decorateGridSize() { + return this.$$.ctx[51] + } + set decorateGridSize(e) { + this.$$set({ + decorateGridSize: e + }), pa() + } + get decorateSnapToContext() { + return this.$$.ctx[52] + } + set decorateSnapToContext(e) { + this.$$set({ + decorateSnapToContext: e + }), pa() + } + get willRenderShapeControls() { + return this.$$.ctx[12] + } + set willRenderShapeControls(e) { + this.$$set({ + willRenderShapeControls: e + }), pa() + } + get willRenderShapeTextControls() { + return this.$$.ctx[13] + } + set willRenderShapeTextControls(e) { + this.$$set({ + willRenderShapeTextControls: e + }), pa() + } + get markupEditorToolSelectRadius() { + return this.$$.ctx[14] + } + set markupEditorToolSelectRadius(e) { + this.$$set({ + markupEditorToolSelectRadius: e + }), pa() + } + get willRenderShapePresetToolbar() { + return this.$$.ctx[15] + } + set willRenderShapePresetToolbar(e) { + this.$$set({ + willRenderShapePresetToolbar: e + }), pa() + } + get beforeAddShape() { + return this.$$.ctx[16] + } + set beforeAddShape(e) { + this.$$set({ + beforeAddShape: e + }), pa() + } + get beforeRemoveShape() { + return this.$$.ctx[17] + } + set beforeRemoveShape(e) { + this.$$set({ + beforeRemoveShape: e + }), pa() + } + get beforeDeselectShape() { + return this.$$.ctx[18] + } + set beforeDeselectShape(e) { + this.$$set({ + beforeDeselectShape: e + }), pa() + } + get beforeSelectShape() { + return this.$$.ctx[19] + } + set beforeSelectShape(e) { + this.$$set({ + beforeSelectShape: e + }), pa() + } + get beforeUpdateShape() { + return this.$$.ctx[20] + } + set beforeUpdateShape(e) { + this.$$set({ + beforeUpdateShape: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[21] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + }, ({ + stickers: e, + stickerEnableSelectImage: t, + stickerEnableSelectImagePreset: o, + stickerEnableDropImagePreset: i, + stickerForceEnable: r + }) => e && e.length || t || o || i || r] +}; + +function dx(e) { + let t, o, i, r, n, a = (e[14](e[34].value) || "") + "", + s = (M(e[34].label) ? e[34].label(e[1]) : e[34].label) + ""; + return { + c() { + t = kn("div"), o = new Bn(!1), i = Mn(), r = kn("span"), n = Tn(s), o.a = i, An(t, "slot", "option") + }, + m(e, s) { + wn(e, t, s), o.m(a, t), bn(t, i), bn(t, r), bn(r, n) + }, + p(e, t) { + 8 & t[1] && a !== (a = (e[14](e[34].value) || "") + "") && o.p(a), 2 & t[0] | 8 & t[1] && s !== (s = (M(e[34].label) ? e[34].label(e[1]) : e[34].label) + "") && Fn(n, s) + }, + d(e) { + e && Sn(t) + } + } +} + +function ux(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[1], + class: "PinturaControlList", + layout: "row", + options: e[2], + selectedIndex: e[6], + onchange: e[12], + $$slots: { + option: [dx, ({ + option: e + }) => ({ + 34: e + }), ({ + option: e + }) => [0, e ? 8 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 2 & o[0] && (i.locale = e[1]), 4 & o[0] && (i.options = e[2]), 64 & o[0] && (i.selectedIndex = e[6]), 2 & o[0] | 24 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function hx(e) { + let t, o, i, r, n; + return o = new sb({ + props: { + locale: e[1], + class: "PinturaControlPanels", + shape: e[4], + onchange: e[13], + controls: e[3], + scrollElasticity: e[7] + } + }), r = new vd({ + props: { + elasticity: e[10], + $$slots: { + default: [ux] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), i = Mn(), Ia(r.$$.fragment), An(t, "slot", "footer"), An(t, "style", e[5]) + }, + m(e, a) { + wn(e, t, a), Aa(o, t, null), bn(t, i), Aa(r, t, null), n = !0 + }, + p(e, i) { + const a = {}; + 2 & i[0] && (a.locale = e[1]), 16 & i[0] && (a.shape = e[4]), 8 & i[0] && (a.controls = e[3]), 128 & i[0] && (a.scrollElasticity = e[7]), o.$set(a); + const s = {}; + 70 & i[0] | 16 & i[1] && (s.$$scope = { + dirty: i, + ctx: e + }), r.$set(s), (!n || 32 & i[0]) && An(t, "style", e[5]) + }, + i(e) { + n || (xa(o.$$.fragment, e), xa(r.$$.fragment, e), n = !0) + }, + o(e) { + va(o.$$.fragment, e), va(r.$$.fragment, e), n = !1 + }, + d(e) { + e && Sn(t), La(o), La(r) + } + } +} + +function px(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [hx] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[23]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 254 & o[0] | 16 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function mx(e, t, o) { + let i, r, n, a, s, l, c, d, u = Gr, + h = () => (u(), u = en(p, (e => o(20, s = e))), p); + e.$$.on_destroy.push((() => u())); + let { + isActive: p + } = t; + h(); + let { + stores: m + } = t, { + locale: g = {} + } = t, { + frameStyles: $ = {} + } = t, { + frameOptions: f = [] + } = t, { + markupEditorShapeStyleControls: y + } = t; + const b = Jn("elasticityMultiplier"); + on(e, b, (e => o(22, d = e))); + const { + history: x, + animation: v, + scrollElasticity: w, + imageFrame: S, + allowPan: k, + allowZoom: C, + allowZoomControls: T, + allowPlayPause: M + } = m; + on(e, v, (e => o(21, l = e))), on(e, S, (e => o(4, c = e))); + let R = {}; + let P; + const E = ec(l ? 20 : 0); + return on(e, E, (e => o(19, a = e))), e.$$set = e => { + "isActive" in e && h(o(0, p = e.isActive)), "stores" in e && o(17, m = e.stores), "locale" in e && o(1, g = e.locale), "frameStyles" in e && o(18, $ = e.frameStyles), "frameOptions" in e && o(2, f = e.frameOptions), "markupEditorShapeStyleControls" in e && o(3, y = e.markupEditorShapeStyleControls) + }, e.$$.update = () => { + 1048576 & e.$$.dirty[0] && k.set(s), 1048576 & e.$$.dirty[0] && C.set(s), 1048576 & e.$$.dirty[0] && T.set(s), 1048576 & e.$$.dirty[0] && s && M.set(!0), 4194304 & e.$$.dirty[0] && o(7, i = d * w), 20 & e.$$.dirty[0] && o(6, r = c ? f.findIndex((([e]) => e === c.id)) : 0), 3145728 & e.$$.dirty[0] && l && E.set(s ? 0 : 20), 524288 & e.$$.dirty[0] && o(5, n = a ? `transform: translateY(${a}px)` : void 0) + }, [p, g, f, y, c, n, r, i, b, v, w, S, ({ + value: e + }) => { + const t = $[e]; + if (!t || !t.shape) return S.set(void 0), void x.write(); + const { + shape: o + } = t, i = { + id: e, + ...gi(o), + ...Object.keys(R).reduce(((e, t) => o[t] ? (e[t] = R[t], e) : e), {}) + }; + S.set(i), x.write() + }, function(e) { + Ao(e, "frameColor") && (R.frameColor = e.frameColor), c && (gr(c, e), S.set(c), clearTimeout(P), P = setTimeout((() => { + x.write() + }), 200)) + }, e => { + const t = $[e]; + var o; + if (t && t.thumb) return o = t.thumb, /div/i.test(o) || lb(o) ? o : /rect|path|circle|line|/i.test(o) ? `` : `` + }, E, "frame", m, $, a, s, l, d, function(t) { + Qn.call(this, e, t) + }] +} +var gx = { + util: ["frame", class extends Fa { + constructor(e) { + super(), za(this, e, mx, px, Qr, { + name: 16, + isActive: 0, + stores: 17, + locale: 1, + frameStyles: 18, + frameOptions: 2, + markupEditorShapeStyleControls: 3 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[16] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get stores() { + return this.$$.ctx[17] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[1] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get frameStyles() { + return this.$$.ctx[18] + } + set frameStyles(e) { + this.$$set({ + frameStyles: e + }), pa() + } + get frameOptions() { + return this.$$.ctx[2] + } + set frameOptions(e) { + this.$$set({ + frameOptions: e + }), pa() + } + get markupEditorShapeStyleControls() { + return this.$$.ctx[3] + } + set markupEditorShapeStyleControls(e) { + this.$$set({ + markupEditorShapeStyleControls: e + }), pa() + } + }, ({ + src: e + }) => e && !Sp(e)] +}; + +function $x(e) { + let t, o, i, r, n, a, s, l; + return { + c() { + t = kn("div"), o = kn("input"), r = Mn(), n = kn("label"), a = Tn(e[1]), An(o, "id", e[0]), An(o, "type", "number"), An(o, "min", "1"), An(o, "inputmode", "numeric"), An(o, "pattern", "[0-9]*"), An(o, "data-state", e[3]), An(o, "autocomplete", "off"), An(o, "placeholder", e[4]), o.value = i = void 0 === e[5] ? "" : e[7](e[5] + ""), An(n, "for", e[0]), An(n, "title", e[2]), An(n, "aria-label", e[2]), An(t, "class", "PinturaInputDimension") + }, + m(i, c) { + wn(i, t, c), bn(t, o), bn(t, r), bn(t, n), bn(n, a), s || (l = Pn(o, "input", e[8]), s = !0) + }, + p(e, [t]) { + 1 & t && An(o, "id", e[0]), 8 & t && An(o, "data-state", e[3]), 16 & t && An(o, "placeholder", e[4]), 160 & t && i !== (i = void 0 === e[5] ? "" : e[7](e[5] + "")) && o.value !== i && (o.value = i), 2 & t && Fn(a, e[1]), 1 & t && An(n, "for", e[0]), 4 & t && An(n, "title", e[2]), 4 & t && An(n, "aria-label", e[2]) + }, + i: Gr, + o: Gr, + d(e) { + e && Sn(t), s = !1, l() + } + } +} + +function fx(e, t, o) { + let { + id: i + } = t, { + label: r + } = t, { + title: n + } = t, { + state: a + } = t, { + placeholder: s + } = t, { + value: l + } = t, { + onchange: c + } = t, { + format: d = (e => e.replace(/\D/g, "")) + } = t; + return e.$$set = e => { + "id" in e && o(0, i = e.id), "label" in e && o(1, r = e.label), "title" in e && o(2, n = e.title), "state" in e && o(3, a = e.state), "placeholder" in e && o(4, s = e.placeholder), "value" in e && o(5, l = e.value), "onchange" in e && o(6, c = e.onchange), "format" in e && o(7, d = e.format) + }, [i, r, n, a, s, l, c, d, e => c(d(e.currentTarget.value))] +} +class yx extends Fa { + constructor(e) { + super(), za(this, e, fx, $x, Qr, { + id: 0, + label: 1, + title: 2, + state: 3, + placeholder: 4, + value: 5, + onchange: 6, + format: 7 + }) + } +} + +function bx(e) { + let t; + return { + c() { + t = Cn("g") + }, + m(o, i) { + wn(o, t, i), t.innerHTML = e[2] + }, + p(e, o) { + 4 & o && (t.innerHTML = e[2]) + }, + d(e) { + e && Sn(t) + } + } +} + +function xx(e) { + let t, o, i, r, n, a, s, l; + return n = new td({ + props: { + $$slots: { + default: [bx] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), o = kn("input"), i = Mn(), r = kn("label"), Ia(n.$$.fragment), An(o, "id", e[0]), An(o, "class", "implicit"), An(o, "type", "checkbox"), o.checked = e[1], An(r, "for", e[0]), An(r, "title", e[3]) + }, + m(c, d) { + wn(c, t, d), bn(t, o), bn(t, i), bn(t, r), Aa(n, r, null), a = !0, s || (l = Pn(o, "change", e[5]), s = !0) + }, + p(e, [t]) { + (!a || 1 & t) && An(o, "id", e[0]), (!a || 2 & t) && (o.checked = e[1]); + const i = {}; + 68 & t && (i.$$scope = { + dirty: t, + ctx: e + }), n.$set(i), (!a || 1 & t) && An(r, "for", e[0]), (!a || 8 & t) && An(r, "title", e[3]) + }, + i(e) { + a || (xa(n.$$.fragment, e), a = !0) + }, + o(e) { + va(n.$$.fragment, e), a = !1 + }, + d(e) { + e && Sn(t), La(n), s = !1, l() + } + } +} + +function vx(e, t, o) { + let { + id: i + } = t, { + locked: r + } = t, { + icon: n + } = t, { + title: a + } = t, { + onchange: s + } = t; + return e.$$set = e => { + "id" in e && o(0, i = e.id), "locked" in e && o(1, r = e.locked), "icon" in e && o(2, n = e.icon), "title" in e && o(3, a = e.title), "onchange" in e && o(4, s = e.onchange) + }, [i, r, n, a, s, e => s(e.currentTarget.checked)] +} +class wx extends Fa { + constructor(e) { + super(), za(this, e, vx, xx, Qr, { + id: 0, + locked: 1, + icon: 2, + title: 3, + onchange: 4 + }) + } +} + +function Sx(e) { + let t; + return { + c() { + t = Tn("Save") + }, + m(e, o) { + wn(e, t, o) + }, + d(e) { + e && Sn(t) + } + } +} + +function kx(e) { + let t, o, i, r, n, a, s, l, c, d, u, h, p, m = e[1].resizeLabelFormCaption + ""; + return l = new dp({ + props: { + items: e[4] + } + }), d = new cd({ + props: { + type: "submit", + class: "implicit", + $$slots: { + default: [Sx] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("form"), o = kn("div"), i = kn("fieldset"), r = kn("legend"), n = Tn(m), a = Mn(), s = kn("div"), Ia(l.$$.fragment), c = Mn(), Ia(d.$$.fragment), An(r, "class", "implicit"), An(s, "class", "PinturaFieldsetInner"), An(o, "class", "PinturaFormInner"), An(t, "slot", "footer"), An(t, "style", e[3]) + }, + m(m, g) { + wn(m, t, g), bn(t, o), bn(o, i), bn(i, r), bn(r, n), bn(i, a), bn(i, s), Aa(l, s, null), e[65](s), bn(o, c), Aa(d, o, null), u = !0, h || (p = [Pn(s, "focusin", e[15]), Pn(s, "focusout", e[16]), Pn(t, "submit", En(e[17]))], h = !0) + }, + p(e, o) { + (!u || 2 & o[0]) && m !== (m = e[1].resizeLabelFormCaption + "") && Fn(n, m); + const i = {}; + 16 & o[0] && (i.items = e[4]), l.$set(i); + const r = {}; + 16 & o[3] && (r.$$scope = { + dirty: o, + ctx: e + }), d.$set(r), (!u || 8 & o[0]) && An(t, "style", e[3]) + }, + i(e) { + u || (xa(l.$$.fragment, e), xa(d.$$.fragment, e), u = !0) + }, + o(e) { + va(l.$$.fragment, e), va(d.$$.fragment, e), u = !1 + }, + d(o) { + o && Sn(t), La(l), e[65](null), La(d), h = !1, Kr(p) + } + } +} + +function Cx(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [kx] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[66]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 30 & o[0] | 16 & o[3] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Tx(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p, m, g, $, f, y, b, x, v, w, S, k, C, M, R, P, E, A, L, z, F = Gr, + O = () => (F(), F = en(B, (e => o(49, p = e))), B); + e.$$.on_destroy.push((() => F())); + const D = (e, t = 0, o = 9999) => { + if (T(e) && !(e = e.replace(/\D/g, "")).length) return; + const i = Math.round(e); + return Number.isNaN(i) ? void 0 : rs(i, t, o) + }; + let { + isActive: B + } = t; + O(); + let { + stores: W + } = t, { + locale: V = {} + } = t, { + resizeMinSize: _ = De(1, 1) + } = t, { + resizeMaxSize: N = De(9999, 9999) + } = t, { + resizeAspectRatioLocked: U = !1 + } = t, { + resizeEnableButtonLockAspectRatio: G = !0 + } = t, { + resizeSizePresetOptions: Z + } = t, { + resizeWidthPresetOptions: X + } = t, { + resizeHeightPresetOptions: Y + } = t, { + resizeWillRenderFooter: q = j + } = t; + const K = ec(0, { + stiffness: .15, + damping: .3 + }); + on(e, K, (e => o(54, y = e))); + const { + animation: J, + imageSize: Q, + imageCropRect: ee, + imageCropRectAspectRatio: te, + imageCropAspectRatio: oe, + imageOutputSize: ie, + imageSelectionZoom: re, + imageSelectionPan: ne, + history: ae, + env: se, + allowPan: ce, + allowZoom: de, + allowZoomControls: ue, + allowPlayPause: he + } = W; + on(e, J, (e => o(50, m = e))), on(e, Q, (e => o(73, A = e))), on(e, ee, (e => o(52, $ = e))), on(e, te, (e => o(53, f = e))), on(e, oe, (e => o(72, M = e))), on(e, ie, (e => o(61, C = e))), on(e, re, (e => o(74, L = e))), on(e, ne, (e => o(75, z = e))), on(e, se, (e => o(51, g = e))); + const pe = I(); + let me, ge, $e, fe, ye, be, xe = le(); + const ve = (e, t, o, i, r) => null != e && o !== t ? e >= i[t] && e <= r[t] ? "valid" : "invalid" : "undetermined", + we = (e, t, o) => Math.round(null != e ? e / t : o.height), + Se = () => { + U && ge && $e && ("width" === fe ? o(39, $e = Math.round(ge / f)) : "height" === fe ? o(38, ge = Math.round($e * f)) : ("width" === ye ? o(39, $e = Math.round(ge / f)) : "height" === ye && o(38, ge = Math.round($e * f)), ke())) + }, + ke = e => { + let t = D(ge), + i = D($e), + r = t, + n = i, + a = r && n, + s = e || f; + if (!r && !n) return; + r && !n ? n = Math.round(r / s) : n && !r && (r = Math.round(n * s)), s = e || a ? H(r, n) : f; + let l = De(r, n); + Ne(N, l) || (l = yt(N, s)), Ne(l, _) || (l = ft(_, s)), o(38, ge = null != t ? Math.round(l.width) : void 0), o(39, $e = null != i ? Math.round(l.height) : void 0) + }, + Ce = () => { + ke(); + const { + width: e, + height: t + } = C || {}; + e === ge && t === $e || (ge || $e ? (ge && $e && un(oe, M = ge / $e, M), un(ie, C = De(ge, $e), C)) : (un(oe, M = A.width / A.height, M), un(oe, M = void 0, M), un(ie, C = void 0, C)), ae.write()) + }, + Te = ie.subscribe((e => { + if (!e) return o(38, ge = void 0), void o(39, $e = void 0); + o(38, ge = e.width), o(39, $e = e.height), ke() + })), + Me = oe.subscribe((e => { + (ge || $e) && e && (ge && $e && H(ge, $e) !== e ? (o(39, $e = ge / e), ke(e)) : ke()) + })), + Re = e => T(e[0]) ? (e[1] = e[1].map(Re), e) : Eo(e) ? [e, "" + e] : e, + Pe = e => { + if (T(e[0])) return e[1] = e[1].map(Pe), e; + let [t, o] = e; + if (Eo(t) && Eo(o)) { + const [e, i] = [t, o]; + o = `${e} × ${i}`, t = [e, i] + } + return [t, o] + }, + Ee = Ba(); + on(e, Ee, (e => o(60, k = e))); + const Ie = Ba(); + on(e, Ie, (e => o(64, E = e))); + const Ae = Ba(); + on(e, Ae, (e => o(58, w = e))); + const Le = Ba(); + on(e, Le, (e => o(63, P = e))); + const ze = Ba(); + on(e, ze, (e => o(56, x = e))); + const Oe = Ba(); + on(e, Oe, (e => o(62, R = e))); + const Be = Wa([ie, Ie], (([e, t], o) => { + if (!t) return o(-1); + const i = t.findIndex((([t]) => { + if (!t && !e) return !0; + if (!t) return !1; + const [o, i] = t; + return e.width === o && e.height === i + })); + o(i < 0 ? 0 : i) + })); + on(e, Be, (e => o(59, S = e))); + const We = Wa([ie, Le], (([e, t], o) => { + if (!t) return o(-1); + const i = t.findIndex((([t]) => !t && !e || !!t && e.width === t)); + o(i < 0 ? 0 : i) + })); + on(e, We, (e => o(57, v = e))); + const Ve = Wa([ie, Oe], (([e, t], o) => { + if (!t) return o(-1); + const i = t.findIndex((([t]) => !t && !e || !!t && e.height === t)); + o(i < 0 ? 0 : i) + })); + on(e, Ve, (e => o(55, b = e))); + let _e = void 0, + He = void 0; + const je = Jn("redrawTrigger"), + Ue = ec(m ? 20 : 0); + return on(e, Ue, (e => o(48, h = e))), Yn((() => { + Te(), Me() + })), e.$$set = e => { + "isActive" in e && O(o(0, B = e.isActive)), "stores" in e && o(30, W = e.stores), "locale" in e && o(1, V = e.locale), "resizeMinSize" in e && o(31, _ = e.resizeMinSize), "resizeMaxSize" in e && o(32, N = e.resizeMaxSize), "resizeAspectRatioLocked" in e && o(28, U = e.resizeAspectRatioLocked), "resizeEnableButtonLockAspectRatio" in e && o(33, G = e.resizeEnableButtonLockAspectRatio), "resizeSizePresetOptions" in e && o(34, Z = e.resizeSizePresetOptions), "resizeWidthPresetOptions" in e && o(35, X = e.resizeWidthPresetOptions), "resizeHeightPresetOptions" in e && o(36, Y = e.resizeHeightPresetOptions), "resizeWillRenderFooter" in e && o(37, q = e.resizeWillRenderFooter) + }, e.$$.update = () => { + var t; + 262144 & e.$$.dirty[1] && ce.set(!p), 262144 & e.$$.dirty[1] && de.set(!p), 262144 & e.$$.dirty[1] && ue.set(!p), 262144 & e.$$.dirty[1] && p && he.set(!0), 536870920 & e.$$.dirty[1] && Z && (un(Ee, k = Z.map(Pe), k), un(Ie, E = lu(k), E)), 536870912 & e.$$.dirty[1] && o(47, a = !!k), 268435456 & e.$$.dirty[1] | 4 & e.$$.dirty[2] && o(46, i = S > -1 && E[S][1]), 134217744 & e.$$.dirty[1] && X && (un(Ae, w = X.map(Re), w), un(Le, P = lu(w), P)), 134283264 & e.$$.dirty[1] && o(44, s = !a && w), 67108864 & e.$$.dirty[1] | 2 & e.$$.dirty[2] && o(45, r = v > -1 && P[v][1]), 33554464 & e.$$.dirty[1] && Y && (un(ze, x = Y.map(Re), x), un(Oe, R = lu(x), R)), 33619968 & e.$$.dirty[1] && o(43, l = !a && x), 16777216 & e.$$.dirty[1] | 1 & e.$$.dirty[2] && o(42, n = b > -1 && R[b][1]), 77824 & e.$$.dirty[1] && o(41, c = !a && !s && !l), 268435458 & e.$$.dirty[0] | 1072824263 & e.$$.dirty[1] && o(4, d = je && zp((() => { + return q([a && ["Dropdown", "size-presets", { + label: i, + options: k, + onchange: e => { + return (t = e.value) && !_e && (_e = { + ...$ + }, He = M), t ? (un(oe, M = H(t[0], t[1]), M), un(ie, C = Fe(t), C)) : (un(ee, $ = _e, $), un(oe, M = He, M), un(ie, C = void 0, C), _e = void 0, He = void 0), void ae.write(); + var t + }, + selectedIndex: S + }], s && ["Dropdown", "width-presets", { + label: r, + options: w, + onchange: e => { + o(38, ge = e.value), Ce() + }, + selectedIndex: v + }], s && l && ["span", "times", { + class: "PinturaResizeLabel", + innerHTML: "×" + }], l && ["Dropdown", "height-presets", { + label: n, + options: x, + onchange: e => { + o(39, $e = e.value), Ce() + }, + selectedIndex: b + }], c && [yx, "width-input", { + id: "width-" + pe, + title: V.resizeTitleInputWidth, + label: V.resizeLabelInputWidth, + placeholder: (e = D($e), t = f, d = $, Math.round(null != e ? e * t : d.width)), + value: ge, + state: ve(D(ge), "width", fe, _, N), + onchange: e => { + o(38, ge = e), Se() + } + }], c && G && [wx, "aspect-ratio-lock", { + id: "aspect-ratio-lock-" + pe, + title: V.resizeTitleButtonMaintainAspectRatio, + icon: T(V.resizeIconButtonMaintainAspectRatio) ? V.resizeIconButtonMaintainAspectRatio : V.resizeIconButtonMaintainAspectRatio(U, y), + locked: U, + onchange: e => { + o(28, U = e), Se() + } + }], c && [yx, "height-input", { + id: "height-" + pe, + title: V.resizeTitleInputHeight, + label: V.resizeLabelInputHeight, + placeholder: we(D(ge), f, $), + value: $e, + state: ve(D($e), "height", fe, _, N), + onchange: e => { + o(39, $e = e), Se() + } + }]].filter(Boolean), { + ...g + }, (() => je.set({}))); + var e, t, d + })).filter(Boolean)), 268435456 & e.$$.dirty[0] && K.set(U ? 1 : 0), 512 & e.$$.dirty[1] && fe && (ye = fe), 262144 & e.$$.dirty[1] && p && (xe = z, be = L), 1074003968 & e.$$.dirty[1] && (p ? (t = C, un(ne, z = le(), z), un(re, L = t && $ ? t.width / $.width || t.height / $.height : 1, L)) : (un(ne, z = xe, z), un(re, L = be, L))), 786432 & e.$$.dirty[1] && m && Ue.set(p ? 0 : 20), 131072 & e.$$.dirty[1] && o(3, u = h ? `transform: translateY(${h}px)` : void 0) + }, [B, V, me, u, d, K, J, Q, ee, te, oe, ie, re, ne, se, e => { + const t = e.target.id; + /width/.test(t) ? o(40, fe = "width") : /height/.test(t) ? o(40, fe = "height") : /aspectRatio/i.test(t) ? o(40, fe = "lock") : o(40, fe = void 0) + }, e => { + me.contains(e.relatedTarget) || Ce(), o(40, fe = void 0) + }, Ce, Ee, Ie, Ae, Le, ze, Oe, Be, We, Ve, Ue, U, "resize", W, _, N, G, Z, X, Y, q, ge, $e, fe, c, n, l, s, r, i, a, h, p, m, g, $, f, y, b, x, v, w, S, k, C, R, P, E, function(e) { + ta[e ? "unshift" : "push"]((() => { + me = e, o(2, me) + })) + }, function(t) { + Qn.call(this, e, t) + }] +} +var Mx = { + util: ["resize", class extends Fa { + constructor(e) { + super(), za(this, e, Tx, Cx, Qr, { + name: 29, + isActive: 0, + stores: 30, + locale: 1, + resizeMinSize: 31, + resizeMaxSize: 32, + resizeAspectRatioLocked: 28, + resizeEnableButtonLockAspectRatio: 33, + resizeSizePresetOptions: 34, + resizeWidthPresetOptions: 35, + resizeHeightPresetOptions: 36, + resizeWillRenderFooter: 37 + }, null, [-1, -1, -1, -1]) + } + get name() { + return this.$$.ctx[29] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get stores() { + return this.$$.ctx[30] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[1] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get resizeMinSize() { + return this.$$.ctx[31] + } + set resizeMinSize(e) { + this.$$set({ + resizeMinSize: e + }), pa() + } + get resizeMaxSize() { + return this.$$.ctx[32] + } + set resizeMaxSize(e) { + this.$$set({ + resizeMaxSize: e + }), pa() + } + get resizeAspectRatioLocked() { + return this.$$.ctx[28] + } + set resizeAspectRatioLocked(e) { + this.$$set({ + resizeAspectRatioLocked: e + }), pa() + } + get resizeEnableButtonLockAspectRatio() { + return this.$$.ctx[33] + } + set resizeEnableButtonLockAspectRatio(e) { + this.$$set({ + resizeEnableButtonLockAspectRatio: e + }), pa() + } + get resizeSizePresetOptions() { + return this.$$.ctx[34] + } + set resizeSizePresetOptions(e) { + this.$$set({ + resizeSizePresetOptions: e + }), pa() + } + get resizeWidthPresetOptions() { + return this.$$.ctx[35] + } + set resizeWidthPresetOptions(e) { + this.$$set({ + resizeWidthPresetOptions: e + }), pa() + } + get resizeHeightPresetOptions() { + return this.$$.ctx[36] + } + set resizeHeightPresetOptions(e) { + this.$$set({ + resizeHeightPresetOptions: e + }), pa() + } + get resizeWillRenderFooter() { + return this.$$.ctx[37] + } + set resizeWillRenderFooter(e) { + this.$$set({ + resizeWillRenderFooter: e + }), pa() + } + }, ({ + src: e + }) => e && !Sp(e)] +}; + +function Rx(e) { + let t, o; + return t = new Kb({ + props: { + stores: e[3], + locale: e[4], + isActive: e[0], + isActiveFraction: e[1], + isVisible: e[2], + mapScreenPointToImagePoint: e[9], + mapImagePointToScreenPoint: e[8], + utilKey: "redact", + imageRotation: e[10], + imageFlipX: e[7], + imageFlipY: e[6], + shapes: e[11], + toolbar: ["rect"], + toolShapes: { + rectangle: [{ + x: 0, + y: 0, + width: 0, + height: 0 + }] + }, + toolActive: "rectangle", + parentRect: e[13], + enablePresetDropImage: !1, + enablePresetSelectImage: !1, + willStartInteraction: e[5], + hooks: { + willRenderShapeControls: e[24] + } + } + }), t.$on("measure", e[25]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, [o]) { + const i = {}; + 8 & o && (i.stores = e[3]), 16 & o && (i.locale = e[4]), 1 & o && (i.isActive = e[0]), 2 & o && (i.isActiveFraction = e[1]), 4 & o && (i.isVisible = e[2]), 512 & o && (i.mapScreenPointToImagePoint = e[9]), 256 & o && (i.mapImagePointToScreenPoint = e[8]), 1024 & o && (i.imageRotation = e[10]), 128 & o && (i.imageFlipX = e[7]), 64 & o && (i.imageFlipY = e[6]), 32 & o && (i.willStartInteraction = e[5]), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Px(e, t, o) { + let i, r, n, a, s, l, c, d, u; + let { + isActive: h + } = t, { + isActiveFraction: p + } = t, { + isVisible: m + } = t, { + stores: g + } = t, { + locale: $ = {} + } = t, { + markupEditorWillStartInteraction: f + } = t; + const { + imageRedaction: y, + rootRect: b, + imageSize: x, + imageRotation: v, + imageFlipX: w, + imageFlipY: S, + imageTransforms: k, + imageTransformsInterpolated: C + } = g; + on(e, b, (e => o(23, d = e))), on(e, x, (e => o(22, c = e))), on(e, v, (e => o(10, u = e))), on(e, w, (e => o(7, a = e))), on(e, S, (e => o(6, n = e))), on(e, k, (e => o(21, l = e))), on(e, C, (e => o(20, s = e))); + return e.$$set = e => { + "isActive" in e && o(0, h = e.isActive), "isActiveFraction" in e && o(1, p = e.isActiveFraction), "isVisible" in e && o(2, m = e.isVisible), "stores" in e && o(3, g = e.stores), "locale" in e && o(4, $ = e.locale), "markupEditorWillStartInteraction" in e && o(5, f = e.markupEditorWillStartInteraction) + }, e.$$.update = () => { + 15728832 & e.$$.dirty && o(9, i = e => Qb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)), 15728832 & e.$$.dirty && o(8, r = e => Jb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)) + }, [h, p, m, g, $, f, n, a, r, i, u, y, b, x, v, w, S, k, C, "redact", s, l, c, d, e => { + const t = Am(e[0]); + return Bm("to-front", t), e + }, function(t) { + Qn.call(this, e, t) + }] +} +var Ex = { + util: ["redact", class extends Fa { + constructor(e) { + super(), za(this, e, Px, Rx, Qr, { + name: 19, + isActive: 0, + isActiveFraction: 1, + isVisible: 2, + stores: 3, + locale: 4, + markupEditorWillStartInteraction: 5 + }) + } + get name() { + return this.$$.ctx[19] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[1] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[2] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[3] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[4] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[5] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + }, ({ + src: e + }) => e && !Sp(e)] +}; + +function Ix(e) { + let t, o, i = (M(e[32].label) ? e[32].label(e[1]) : e[32].label) + ""; + return { + c() { + t = kn("span"), o = Tn(i) + }, + m(e, i) { + wn(e, t, i), bn(t, o) + }, + p(e, t) { + 2 & t[0] | 2 & t[1] && i !== (i = (M(e[32].label) ? e[32].label(e[1]) : e[32].label) + "") && Fn(o, i) + }, + d(e) { + e && Sn(t) + } + } +} + +function Ax(e) { + let t, o, i, r = (e[11](e[32].value) || "") + "", + n = e[32].label && Ix(e); + return { + c() { + t = kn("div"), o = new Bn(!1), i = Mn(), n && n.c(), o.a = i, An(t, "slot", "option") + }, + m(e, a) { + wn(e, t, a), o.m(r, t), bn(t, i), n && n.m(t, null) + }, + p(e, i) { + 2 & i[1] && r !== (r = (e[11](e[32].value) || "") + "") && o.p(r), e[32].label ? n ? n.p(e, i) : (n = Ix(e), n.c(), n.m(t, null)) : n && (n.d(1), n = null) + }, + d(e) { + e && Sn(t), n && n.d() + } + } +} + +function Lx(e) { + let t, o; + return t = new Bu({ + props: { + locale: e[1], + class: "PinturaControlList", + layout: "row", + options: e[2], + selectedIndex: e[4], + onchange: e[10], + $$slots: { + option: [Ax, ({ + option: e + }) => ({ + 32: e + }), ({ + option: e + }) => [0, e ? 2 : 0]] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 2 & o[0] && (i.locale = e[1]), 4 & o[0] && (i.options = e[2]), 16 & o[0] && (i.selectedIndex = e[4]), 2 & o[0] | 6 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function zx(e) { + let t, o, i; + return o = new vd({ + props: { + elasticity: e[5], + $$slots: { + default: [Lx] + }, + $$scope: { + ctx: e + } + } + }), { + c() { + t = kn("div"), Ia(o.$$.fragment), An(t, "slot", "footer"), An(t, "style", e[3]) + }, + m(e, r) { + wn(e, t, r), Aa(o, t, null), i = !0 + }, + p(e, r) { + const n = {}; + 32 & r[0] && (n.elasticity = e[5]), 22 & r[0] | 4 & r[1] && (n.$$scope = { + dirty: r, + ctx: e + }), o.$set(n), (!i || 8 & r[0]) && An(t, "style", e[3]) + }, + i(e) { + i || (xa(o.$$.fragment, e), i = !0) + }, + o(e) { + va(o.$$.fragment, e), i = !1 + }, + d(e) { + e && Sn(t), La(o) + } + } +} + +function Fx(e) { + let t, o; + return t = new df({ + props: { + $$slots: { + footer: [zx] + }, + $$scope: { + ctx: e + } + } + }), t.$on("measure", e[22]), { + c() { + Ia(t.$$.fragment) + }, + m(e, i) { + Aa(t, e, i), o = !0 + }, + p(e, o) { + const i = {}; + 62 & o[0] | 4 & o[1] && (i.$$scope = { + dirty: o, + ctx: e + }), t.$set(i) + }, + i(e) { + o || (xa(t.$$.fragment, e), o = !0) + }, + o(e) { + va(t.$$.fragment, e), o = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Ox(e, t, o) { + let i, r, n, a, s, l, c, d, u, h, p = Gr, + m = () => (p(), p = en(g, (e => o(17, l = e))), g); + e.$$.on_destroy.push((() => p())); + let { + isActive: g + } = t; + m(); + let { + stores: $ + } = t, { + locale: f = {} + } = t, { + fillOptions: y = [] + } = t; + const b = e => e.map((e => (e => Lo(e) && T(e[0]) && Lo(e[1]))(e) ? [e[0], b(e[1]), e[2]] : (e => [Array.isArray(e) && 3 === e.length ? [...e, 1] : e, void 0, { + disabled: !1 + }])(e))), + x = Jn("elasticityMultiplier"); + on(e, x, (e => o(21, h = e))); + const { + history: v, + animation: w, + scrollElasticity: S, + imageBackgroundColor: k, + imageBackgroundImage: C, + allowPan: M, + allowZoom: R, + allowZoomControls: P, + allowPlayPause: E + } = $; + on(e, w, (e => o(18, c = e))), on(e, k, (e => o(20, u = e))), on(e, C, (e => o(19, d = e))); + const I = ec(c ? 20 : 0); + return on(e, I, (e => o(16, s = e))), e.$$set = e => { + "isActive" in e && m(o(0, g = e.isActive)), "stores" in e && o(14, $ = e.stores), "locale" in e && o(1, f = e.locale), "fillOptions" in e && o(15, y = e.fillOptions) + }, e.$$.update = () => { + 32768 & e.$$.dirty[0] && o(2, i = b(y)), 131072 & e.$$.dirty[0] && M.set(l), 131072 & e.$$.dirty[0] && R.set(l), 131072 & e.$$.dirty[0] && P.set(l), 131072 & e.$$.dirty[0] && l && E.set(!0), 2097152 & e.$$.dirty[0] && o(5, r = h * S), 1572868 & e.$$.dirty[0] && o(4, n = i.findIndex((([e]) => d ? e === d : Array.isArray(e) ? cs(e, u) : void 0)) || 0), 393216 & e.$$.dirty[0] && c && I.set(l ? 0 : 20), 65536 & e.$$.dirty[0] && o(3, a = s ? `transform: translateY(${s}px)` : void 0) + }, [g, f, i, a, n, r, x, w, k, C, ({ + value: e + }) => { + T(e) && (un(k, u = void 0, u), un(C, d = e, d)), Lo(e) && (un(k, u = e, u), un(C, d = void 0, d)), v.write() + }, e => { + if (T(e)) return `
`; + if (Lo(e)) { + const [t, o, i, r] = e.map(((e, t) => t < 3 ? Math.round(255 * e) : e)); + return `
` + } + return "
" + }, I, "fill", $, y, s, l, c, d, u, h, function(t) { + Qn.call(this, e, t) + }] +} +var Dx = { + util: ["fill", class extends Fa { + constructor(e) { + super(), za(this, e, Ox, Fx, Qr, { + name: 13, + isActive: 0, + stores: 14, + locale: 1, + fillOptions: 15 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[13] + } + get isActive() { + return this.$$.ctx[0] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get stores() { + return this.$$.ctx[14] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[1] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get fillOptions() { + return this.$$.ctx[15] + } + set fillOptions(e) { + this.$$set({ + fillOptions: e + }), pa() + } + }, ({ + src: e, + fillOptions: t + }) => e && !Sp(e) && t && t.length] +}; + +function Bx(e) { + let t, o, i; + + function r(t) { + e[41](t) + } + let n = { + utilKey: "retouch", + stores: e[4], + locale: e[5], + isActive: e[1], + isActiveFraction: e[2], + isVisible: e[3], + mapScreenPointToImagePoint: e[26], + mapImagePointToScreenPoint: e[25], + imageRotation: e[27], + imageFlipX: e[24], + imageFlipY: e[23], + toolbar: e[6], + toolbarLayout: "stack", + shapes: e[29], + toolShapes: e[7], + enableViewTool: e[14], + enableMoveTool: e[13], + enableToolShareStyles: !1, + shapeControls: e[8], + enablePresetSelectImage: !1, + enablePresetDropImage: !1, + parentRect: e[30], + willStartInteraction: e[12], + willRenderHeaderTools: e[10] || e[17], + willRenderShapeStyleControls: e[9], + hooks: { + willRenderShapeControls: e[11] || e[15], + willRenderShapeTextControls: e[16], + beforeAddShape: e[18], + beforeRemoveShape: e[19], + beforeDeselectShape: e[20], + beforeSelectShape: e[21], + beforeUpdateShape: e[22] + } + }; + return void 0 !== e[0] && (n.toolActive = e[0]), t = new Kb({ + props: n + }), ta.push((() => Ea(t, "toolActive", r))), t.$on("measure", e[42]), { + c() { + Ia(t.$$.fragment) + }, + m(e, o) { + Aa(t, e, o), i = !0 + }, + p(e, i) { + const r = {}; + 16 & i[0] && (r.stores = e[4]), 32 & i[0] && (r.locale = e[5]), 2 & i[0] && (r.isActive = e[1]), 4 & i[0] && (r.isActiveFraction = e[2]), 8 & i[0] && (r.isVisible = e[3]), 67108864 & i[0] && (r.mapScreenPointToImagePoint = e[26]), 33554432 & i[0] && (r.mapImagePointToScreenPoint = e[25]), 134217728 & i[0] && (r.imageRotation = e[27]), 16777216 & i[0] && (r.imageFlipX = e[24]), 8388608 & i[0] && (r.imageFlipY = e[23]), 64 & i[0] && (r.toolbar = e[6]), 128 & i[0] && (r.toolShapes = e[7]), 16384 & i[0] && (r.enableViewTool = e[14]), 8192 & i[0] && (r.enableMoveTool = e[13]), 256 & i[0] && (r.shapeControls = e[8]), 4096 & i[0] && (r.willStartInteraction = e[12]), 132096 & i[0] && (r.willRenderHeaderTools = e[10] || e[17]), 512 & i[0] && (r.willRenderShapeStyleControls = e[9]), 8226816 & i[0] && (r.hooks = { + willRenderShapeControls: e[11] || e[15], + willRenderShapeTextControls: e[16], + beforeAddShape: e[18], + beforeRemoveShape: e[19], + beforeDeselectShape: e[20], + beforeSelectShape: e[21], + beforeUpdateShape: e[22] + }), !o && 1 & i[0] && (o = !0, r.toolActive = e[0], ca((() => o = !1))), t.$set(r) + }, + i(e) { + i || (xa(t.$$.fragment, e), i = !0) + }, + o(e) { + va(t.$$.fragment, e), i = !1 + }, + d(e) { + La(t, e) + } + } +} + +function Wx(e, t, o) { + let i, r, n, a, s, l, c, d, u; + let { + isActive: h + } = t, { + isActiveFraction: p + } = t, { + isVisible: m + } = t, { + stores: g + } = t, { + locale: $ = {} + } = t, { + retouchTools: f + } = t, { + retouchToolShapes: y + } = t, { + retouchShapeControls: b + } = t, { + retouchActiveTool: x + } = t, { + retouchWillRenderShapeStyleControls: v + } = t, { + retouchWillRenderHeaderTools: w + } = t, { + retouchWillRenderShapeControls: S + } = t, { + markupEditorWillStartInteraction: k + } = t, { + retouchEnableMoveTool: C + } = t, { + retouchEnableViewTool: T + } = t, { + willRenderShapeControls: M + } = t, { + willRenderShapeTextControls: R + } = t, { + willRenderHeaderTools: P + } = t, { + beforeAddShape: E + } = t, { + beforeRemoveShape: I + } = t, { + beforeDeselectShape: A + } = t, { + beforeSelectShape: L + } = t, { + beforeUpdateShape: z + } = t; + const { + rootRect: F, + imageManipulation: O, + imageSize: D, + imageRotation: B, + imageFlipX: W, + imageFlipY: V, + imageTransforms: _, + imageTransformsInterpolated: N + } = g; + return on(e, F, (e => o(40, d = e))), on(e, D, (e => o(39, c = e))), on(e, B, (e => o(27, u = e))), on(e, W, (e => o(24, a = e))), on(e, V, (e => o(23, n = e))), on(e, _, (e => o(38, l = e))), on(e, N, (e => o(37, s = e))), e.$$set = e => { + "isActive" in e && o(1, h = e.isActive), "isActiveFraction" in e && o(2, p = e.isActiveFraction), "isVisible" in e && o(3, m = e.isVisible), "stores" in e && o(4, g = e.stores), "locale" in e && o(5, $ = e.locale), "retouchTools" in e && o(6, f = e.retouchTools), "retouchToolShapes" in e && o(7, y = e.retouchToolShapes), "retouchShapeControls" in e && o(8, b = e.retouchShapeControls), "retouchActiveTool" in e && o(0, x = e.retouchActiveTool), "retouchWillRenderShapeStyleControls" in e && o(9, v = e.retouchWillRenderShapeStyleControls), "retouchWillRenderHeaderTools" in e && o(10, w = e.retouchWillRenderHeaderTools), "retouchWillRenderShapeControls" in e && o(11, S = e.retouchWillRenderShapeControls), "markupEditorWillStartInteraction" in e && o(12, k = e.markupEditorWillStartInteraction), "retouchEnableMoveTool" in e && o(13, C = e.retouchEnableMoveTool), "retouchEnableViewTool" in e && o(14, T = e.retouchEnableViewTool), "willRenderShapeControls" in e && o(15, M = e.willRenderShapeControls), "willRenderShapeTextControls" in e && o(16, R = e.willRenderShapeTextControls), "willRenderHeaderTools" in e && o(17, P = e.willRenderHeaderTools), "beforeAddShape" in e && o(18, E = e.beforeAddShape), "beforeRemoveShape" in e && o(19, I = e.beforeRemoveShape), "beforeDeselectShape" in e && o(20, A = e.beforeDeselectShape), "beforeSelectShape" in e && o(21, L = e.beforeSelectShape), "beforeUpdateShape" in e && o(22, z = e.beforeUpdateShape) + }, e.$$.update = () => { + 25165824 & e.$$.dirty[0] | 960 & e.$$.dirty[1] && o(26, i = e => Qb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)), 25165824 & e.$$.dirty[0] | 960 & e.$$.dirty[1] && o(25, r = e => Jb(e, d, c, s.origin, s.translation, l.rotation.z, s.scale, a, n)) + }, [x, h, p, m, g, $, f, y, b, v, w, S, k, C, T, M, R, P, E, I, A, L, z, n, a, r, i, u, F, O, D, B, W, V, _, N, "retouch", s, l, c, d, function(e) { + x = e, o(0, x) + }, function(t) { + Qn.call(this, e, t) + }] +} +var Vx = { + util: ["retouch", class extends Fa { + constructor(e) { + super(), za(this, e, Wx, Bx, Qr, { + name: 36, + isActive: 1, + isActiveFraction: 2, + isVisible: 3, + stores: 4, + locale: 5, + retouchTools: 6, + retouchToolShapes: 7, + retouchShapeControls: 8, + retouchActiveTool: 0, + retouchWillRenderShapeStyleControls: 9, + retouchWillRenderHeaderTools: 10, + retouchWillRenderShapeControls: 11, + markupEditorWillStartInteraction: 12, + retouchEnableMoveTool: 13, + retouchEnableViewTool: 14, + willRenderShapeControls: 15, + willRenderShapeTextControls: 16, + willRenderHeaderTools: 17, + beforeAddShape: 18, + beforeRemoveShape: 19, + beforeDeselectShape: 20, + beforeSelectShape: 21, + beforeUpdateShape: 22 + }, null, [-1, -1]) + } + get name() { + return this.$$.ctx[36] + } + get isActive() { + return this.$$.ctx[1] + } + set isActive(e) { + this.$$set({ + isActive: e + }), pa() + } + get isActiveFraction() { + return this.$$.ctx[2] + } + set isActiveFraction(e) { + this.$$set({ + isActiveFraction: e + }), pa() + } + get isVisible() { + return this.$$.ctx[3] + } + set isVisible(e) { + this.$$set({ + isVisible: e + }), pa() + } + get stores() { + return this.$$.ctx[4] + } + set stores(e) { + this.$$set({ + stores: e + }), pa() + } + get locale() { + return this.$$.ctx[5] + } + set locale(e) { + this.$$set({ + locale: e + }), pa() + } + get retouchTools() { + return this.$$.ctx[6] + } + set retouchTools(e) { + this.$$set({ + retouchTools: e + }), pa() + } + get retouchToolShapes() { + return this.$$.ctx[7] + } + set retouchToolShapes(e) { + this.$$set({ + retouchToolShapes: e + }), pa() + } + get retouchShapeControls() { + return this.$$.ctx[8] + } + set retouchShapeControls(e) { + this.$$set({ + retouchShapeControls: e + }), pa() + } + get retouchActiveTool() { + return this.$$.ctx[0] + } + set retouchActiveTool(e) { + this.$$set({ + retouchActiveTool: e + }), pa() + } + get retouchWillRenderShapeStyleControls() { + return this.$$.ctx[9] + } + set retouchWillRenderShapeStyleControls(e) { + this.$$set({ + retouchWillRenderShapeStyleControls: e + }), pa() + } + get retouchWillRenderHeaderTools() { + return this.$$.ctx[10] + } + set retouchWillRenderHeaderTools(e) { + this.$$set({ + retouchWillRenderHeaderTools: e + }), pa() + } + get retouchWillRenderShapeControls() { + return this.$$.ctx[11] + } + set retouchWillRenderShapeControls(e) { + this.$$set({ + retouchWillRenderShapeControls: e + }), pa() + } + get markupEditorWillStartInteraction() { + return this.$$.ctx[12] + } + set markupEditorWillStartInteraction(e) { + this.$$set({ + markupEditorWillStartInteraction: e + }), pa() + } + get retouchEnableMoveTool() { + return this.$$.ctx[13] + } + set retouchEnableMoveTool(e) { + this.$$set({ + retouchEnableMoveTool: e + }), pa() + } + get retouchEnableViewTool() { + return this.$$.ctx[14] + } + set retouchEnableViewTool(e) { + this.$$set({ + retouchEnableViewTool: e + }), pa() + } + get willRenderShapeControls() { + return this.$$.ctx[15] + } + set willRenderShapeControls(e) { + this.$$set({ + willRenderShapeControls: e + }), pa() + } + get willRenderShapeTextControls() { + return this.$$.ctx[16] + } + set willRenderShapeTextControls(e) { + this.$$set({ + willRenderShapeTextControls: e + }), pa() + } + get willRenderHeaderTools() { + return this.$$.ctx[17] + } + set willRenderHeaderTools(e) { + this.$$set({ + willRenderHeaderTools: e + }), pa() + } + get beforeAddShape() { + return this.$$.ctx[18] + } + set beforeAddShape(e) { + this.$$set({ + beforeAddShape: e + }), pa() + } + get beforeRemoveShape() { + return this.$$.ctx[19] + } + set beforeRemoveShape(e) { + this.$$set({ + beforeRemoveShape: e + }), pa() + } + get beforeDeselectShape() { + return this.$$.ctx[20] + } + set beforeDeselectShape(e) { + this.$$set({ + beforeDeselectShape: e + }), pa() + } + get beforeSelectShape() { + return this.$$.ctx[21] + } + set beforeSelectShape(e) { + this.$$set({ + beforeSelectShape: e + }), pa() + } + get beforeUpdateShape() { + return this.$$.ctx[22] + } + set beforeUpdateShape(e) { + this.$$set({ + beforeUpdateShape: e + }), pa() + } + }, ({ + src: e + }) => e && !Sp(e)] +}; +const _x = '', + Nx = ''; +var Hx = { + labelReset: "Reset", + labelDefault: "Default", + labelAuto: "Auto", + labelNone: "None", + labelEdit: "Edit", + labelClose: "Close", + labelSupportError: e => e.join(", ") + " not supported on this browser", + labelColor: "Color", + labelWidth: "Width", + labelSize: "Size", + labelOffset: "Offset", + labelAmount: "Amount", + labelInset: "Inset", + labelRadius: "Radius", + labelColorPalette: "Color palette", + labelSizeExtraSmall: "Extra small", + labelSizeSmall: "Small", + labelSizeMediumSmall: "Medium small", + labelSizeMedium: "Medium", + labelSizeMediumLarge: "Medium large", + labelSizeLarge: "Large", + labelSizeExtraLarge: "Extra large", + labelButtonCancel: "Cancel", + labelButtonUndo: "Undo", + labelButtonRedo: "Redo", + labelButtonRevert: "Revert", + labelButtonExport: "Done", + labelZoomIn: "Zoom in", + labelZoomOut: "Zoom out", + labelZoomFit: "Fit to view", + labelZoomActual: "Actual size", + iconZoomIn: '', + iconZoomOut: '', + iconSupportError: '', + iconButtonClose: _x, + iconButtonRevert: '', + iconButtonUndo: '', + iconButtonRedo: '', + iconButtonExport: '', + statusLabelButtonClose: "Close", + statusIconButtonClose: _x, + statusLabelLoadImage: e => e && e.task ? e.error ? "IMAGE_TOO_SMALL" === e.error.code ? "Minimum image size is {minWidth} × {minHeight}" : "Error loading image" : "blob-to-bitmap" === e.task ? "Preparing image…" : "Loading image…" : "Waiting for image", + statusLabelProcessImage: e => { + if (e && e.task) return "store" === e.task ? e.error ? "Error uploading image" : "Uploading image…" : e.error ? "Error processing image" : "Processing image…" + } +}; +const jx = { + shapeLabelButtonSelectSticker: "Select image", + shapeIconButtonSelectSticker: '', + shapeIconButtonFlipHorizontal: '', + shapeIconButtonFlipVertical: '', + shapeIconButtonRemove: '', + shapeIconButtonDuplicate: '', + shapeIconButtonMoveToFront: '', + shapeIconButtonTextLayoutAutoWidth: "" + Nx, + shapeIconButtonTextLayoutAutoHeight: '' + Nx, + shapeIconButtonTextLayoutFixedSize: '' + Nx, + shapeTitleButtonTextLayoutAutoWidth: "Auto width", + shapeTitleButtonTextLayoutAutoHeight: "Auto height", + shapeTitleButtonTextLayoutFixedSize: "Fixed size", + shapeTitleButtonFlipHorizontal: "Flip Horizontal", + shapeTitleButtonFlipVertical: "Flip Vertical", + shapeTitleButtonRemove: "Remove", + shapeTitleButtonDuplicate: "Duplicate", + shapeTitleButtonMoveToFront: "Move to front", + shapeLabelInputText: "Edit text", + shapeIconInputCancel: '', + shapeIconInputConfirm: '', + shapeLabelInputCancel: "Cancel", + shapeLabelInputConfirm: "Confirm", + shapeLabelStrokeNone: "No outline", + shapeLabelFontStyleNormal: "Normal", + shapeLabelFontStyleBold: "Bold", + shapeLabelFontStyleItalic: "Italic", + shapeLabelFontStyleItalicBold: "Bold Italic", + shapeTitleBackgroundColor: "Fill color", + shapeTitleCornerRadius: "Corner radius", + shapeTitleFontFamily: "Font", + shapeTitleFontSize: "Font size", + shapeTitleFontStyle: "Font style", + shapeTitleLineHeight: "Line height", + shapeTitleLineStart: "Start", + shapeTitleLineEnd: "End", + shapeTitleStrokeWidth: "Line width", + shapeTitleStrokeColor: "Line color", + shapeTitleLineDecorationBar: "Bar", + shapeTitleLineDecorationCircle: "Circle", + shapeTitleLineDecorationSquare: "Square", + shapeTitleLineDecorationArrow: "Arrow", + shapeTitleLineDecorationCircleSolid: "Circle solid", + shapeTitleLineDecorationSquareSolid: "Square solid", + shapeTitleLineDecorationArrowSolid: "Arrow solid", + shapeIconLineDecorationBar: '', + shapeIconLineDecorationCircle: '', + shapeIconLineDecorationSquare: '', + shapeIconLineDecorationArrow: '', + shapeIconLineDecorationCircleSolid: '', + shapeIconLineDecorationSquareSolid: '', + shapeIconLineDecorationArrowSolid: '', + shapeTitleColorTransparent: "Transparent", + shapeTitleColorWhite: "White", + shapeTitleColorSilver: "Silver", + shapeTitleColorGray: "Gray", + shapeTitleColorBlack: "Black", + shapeTitleColorNavy: "Navy", + shapeTitleColorBlue: "Blue", + shapeTitleColorAqua: "Aqua", + shapeTitleColorTeal: "Teal", + shapeTitleColorOlive: "Olive", + shapeTitleColorGreen: "Green", + shapeTitleColorYellow: "Yellow", + shapeTitleColorOrange: "Orange", + shapeTitleColorRed: "Red", + shapeTitleColorMaroon: "Maroon", + shapeTitleColorFuchsia: "Fuchsia", + shapeTitleColorPurple: "Purple", + shapeTitleTextOutline: "Text outline", + shapeTitleTextOutlineWidth: "Width", + shapeTitleTextShadow: "Text shadow", + shapeTitleTextShadowBlur: "Blur", + shapeTitleTextColor: "Font color", + shapeTitleTextAlign: "Text align", + shapeTitleTextAlignLeft: "Left align text", + shapeTitleTextAlignCenter: "Center align text", + shapeTitleTextAlignRight: "Right align text", + shapeIconTextAlignLeft: '', + shapeIconTextAlignCenter: '', + shapeIconTextAlignRight: '', + shapeLabelToolMove: "Move", + shapeLabelToolView: "View", + shapeLabelToolSharpie: "Sharpie", + shapeLabelToolEraser: "Eraser", + shapeLabelToolPath: "Path", + shapeLabelToolRectangle: "Rectangle", + shapeLabelToolEllipse: "Ellipse", + shapeLabelToolArrow: "Arrow", + shapeLabelToolLine: "Line", + shapeLabelToolText: "Text", + shapeLabelToolPreset: "Stickers", + shapeIconToolView: '', + shapeIconToolMove: '', + shapeIconToolSharpie: '', + shapeIconToolEraser: '', + shapeIconToolPath: '', + shapeIconToolRectangle: '', + shapeIconToolEllipse: '', + shapeIconToolArrow: '', + shapeIconToolLine: '', + shapeIconToolText: '', + shapeIconToolPreset: '', + shapeTitleSelectionMode: "Selection mode", + shapeTitleBrushSize: "Brush size", + shapeLabelSelectionModeNew: "New", + shapeLabelSelectionModeAdd: "Add", + shapeLabelSelectionModeSubtract: "Remove", + shapeLabelToolSelectionBrush: "Brush", + shapeLabelToolSelectionLassoo: "Lassoo", + shapeLabelToolSelectionRectangle: "Rectangle marquee", + shapeLabelToolSelectionEllipse: "Ellipse marquee", + shapeIconSelectionModeNew: '', + shapeIconSelectionModeAdd: '', + shapeIconSelectionModeSubtract: '', + shapeIconToolSelectionBrush: '', + shapeIconToolSelectionLassoo: '', + shapeIconToolSelectionRectangle: '', + shapeIconToolSelectionEllipse: '' +}; +var Ux = { + cropLabel: "Crop", + cropIcon: '', + cropIconButtonRecenter: '', + cropIconButtonRotateLeft: '', + cropIconButtonRotateRight: '', + cropIconButtonFlipVertical: '', + cropIconButtonFlipHorizontal: '', + cropIconSelectPreset: (e, t) => { + const [o, i, r] = t ? [t < 1 ? 1 : .3, 1 === t ? .85 : .5, t > 1 ? 1 : .3] : [.2, .3, .4]; + return `\n \n \n \n ` + }, + cropIconCropBoundary: (e, t) => { + const [o, i, r, n] = t ? [.3, 1, 0, 0] : [0, 0, .3, 1]; + return `\n \n \n \n \n ` + }, + cropLabelButtonRecenter: "Recenter", + cropLabelButtonRotateLeft: "Rotate left", + cropLabelButtonRotateRight: "Rotate right", + cropLabelButtonFlipHorizontal: "Flip horizontal", + cropLabelButtonFlipVertical: "Flip vertical", + cropLabelSelectPreset: "Crop shape", + cropLabelCropBoundary: "Crop boundary", + cropLabelCropBoundaryEdge: "Edge of image", + cropLabelCropBoundaryNone: "None", + cropLabelTabRotation: "Rotation", + cropLabelTabZoom: "Scale" + }, + Gx = { + fillLabel: "Fill", + fillIcon: '\n \n \n \n \n \n \n \n ' + }, + Zx = { + frameLabel: "Frame", + frameIcon: '\n \n \n ', + frameLabelMatSharp: "Mat", + frameLabelMatRound: "Bevel", + frameLabelLineSingle: "Line", + frameLabelLineMultiple: "Zebra", + frameLabelEdgeSeparate: "Inset", + frameLabelEdgeOverlap: "Plus", + frameLabelEdgeCross: "Lumber", + frameLabelCornerHooks: "Hook", + frameLabelPolaroid: "Polaroid" + }, + Xx = { + redactLabel: "Redact", + redactIcon: '' + }, + Yx = { + retouchLabel: "Retouch", + retouchIcon: '\n \n ' + }, + qx = (e, t) => { + const o = Object.getOwnPropertyDescriptors(e); + Object.keys(o).forEach((i => { + o[i].get ? Object.defineProperty(t, i, { + get: () => e[i], + set: t => e[i] = t + }) : t[i] = e[i] + })) + }, + Kx = e => { + const t = {}, + { + sub: o, + pub: i + } = Go(); + c() && null !== document.doctype || console.warn("Browser is in quirks mode, add to page to fix render issues"); + const n = ws(); + qx(n, t); + const a = ((e, t) => { + const o = {}, + i = new fm({ + target: e, + props: { + stores: t, + pluginComponents: Array.from(km) + } + }); + let r = !1; + const n = () => { + r || (c() && window.removeEventListener("pagehide", n), i && (r = !0, i.$destroy())) + }; + vm || (vm = new Set(Xc(fm).filter((e => !bm.includes(e))))), vm.forEach((e => { + Object.defineProperty(o, e, { + get: () => i[e], + set: xm.includes(e) ? t => { + i[e] = { + ...i[e], + ...t + } + } : t => i[e] = t + }) + })), Object.defineProperty(o, "previewImageData", { + get: () => i.imagePreviewCurrent + }), wm.forEach((e => { + const t = Sm[e], + r = t[0]; + Object.defineProperty(o, e, { + get: () => i.pluginInterface[r][e], + set: o => { + const r = t.reduce(((t, r) => (t[r] = { + ...i.pluginOptions[r], + [e]: o + }, t)), {}); + i.pluginOptions = { + ...i.pluginOptions, + ...r + } + } + }) + })), Object.defineProperty(o, "element", { + get: () => i.root, + set: () => {} + }); + const a = i.history; + return qa(o, { + on: (e, t) => { + if (r) return () => {}; + if (/undo|redo|revert|writehistory/.test(e)) return a.on(e, t); + const o = [i.sub(e, t), i.$on(e, (e => t(e instanceof CustomEvent && !e.detail ? void 0 : e)))].filter(Boolean); + return () => o.forEach((e => e())) + }, + updateImagePreview: e => { + i.imagePreviewSrc = e + }, + close: () => !r && i.pub("close"), + destroy: n + }), Object.defineProperty(o, "history", { + get: () => ({ + undo: () => a.undo(), + redo: () => a.redo(), + revert: () => a.revert(), + get: () => a.get(), + getCollapsed: () => a.get().splice(0, a.index + 1), + set: e => a.set(e), + write: e => a.write(e), + get length() { + return a.length() + }, + get index() { + return a.index + }, + set index(e) { + a.index = e + } + }) + }), c() && window.addEventListener("pagehide", n), o + })(e, n.stores); + qx(a, t); + const s = ["loadImage", "processImage", "abortProcessImage", "abortLoadImage"].map((e => a.on(e, (t => { + const o = n[e](t && t.detail); + o instanceof Promise && o.catch(r) + })))), + l = (e, t) => { + const i = o(e, t), + r = n.on(e, t), + s = a.on(e, t); + return () => { + i(), r(), s() + } + }; + t.handleEvent = r; + const d = Tm.map((e => l(e, (o => t.handleEvent(e, o))))); + return qa(t, { + on: l, + updateImage: e => new Promise(((o, i) => { + const r = t.history.get(), + a = t.history.index, + s = t.imageState; + n.loadImage(e).then((e => { + t.history.set(r), t.history.index = a, t.imageState = s, o(e) + })).catch(i) + })), + close: () => { + i("close") + }, + destroy: () => { + [...s, ...d].forEach((e => e())), a.destroy(), n.destroy(), i("destroy") + } + }), setTimeout((() => i("init", t)), 0), t + }; +const Jx = "pintura-editor"; +var Qx = () => new Promise((e => { + if (!ev) return e([]); + var t; + t = Jx, document.createElement(t).constructor === HTMLElement && customElements.define(Jx, ev), customElements.whenDefined(Jx).then((() => e(document.querySelectorAll(Jx)))) +})); +const ev = c() && class extends HTMLElement { + constructor() { + super(), this._editor = void 0, this._unsubs = void 0 + } + static get observedAttributes() { + return ["src"] + } + attributeChangedCallback(e, t, o) { + this[e] = o + } + connectedCallback() { + this._editor = Kx(this), qx(this._editor, this), this._editor.src = this.getAttribute("src"), this._unsubs = Mm(this._editor, this) + } + disconnectedCallback() { + this._editor.destroy(), this._unsubs.forEach((e => e())) + } +}; +var tv = (e, t = {}) => { + const o = T(e) ? document.querySelector(e) : e; + if (!Dt(o)) return; + t.class = t.class ? "pintura-editor " + t.class : "pintura-editor"; + const i = Kx(o); + return Object.assign(i, t) +}; +const { + document: ov, + window: iv +} = ka; + +function rv(e) { + let t, o, i, r; + return la(e[27]), { + c() { + t = Mn(), o = kn("div"), An(o, "class", e[4]), An(o, "style", e[5]) + }, + m(n, a) { + wn(n, t, a), wn(n, o, a), e[28](o), i || (r = [Pn(iv, "keydown", e[10]), Pn(iv, "orientationchange", e[11]), Pn(iv, "resize", e[27]), Pn(ov.body, "focusin", (function() { + Jr(!e[1] && e[7]) && (!e[1] && e[7]).apply(this, arguments) + })), Pn(ov.body, "focusout", (function() { + Jr(e[2] && e[8]) && (e[2] && e[8]).apply(this, arguments) + })), Pn(o, "wheel", e[9], { + passive: !1 + })], i = !0) + }, + p(t, i) { + e = t, 16 & i[0] && An(o, "class", e[4]), 32 & i[0] && An(o, "style", e[5]) + }, + i: Gr, + o: Gr, + d(n) { + n && Sn(t), n && Sn(o), e[28](null), i = !1, Kr(r) + } + } +} + +function nv(e, t, o) { + let i, r, n, a, s, l, d, u; + const h = qn(); + let { + root: m + } = t, { + preventZoomViewport: g = !0 + } = t, { + preventScrollBodyIfNeeded: $ = !0 + } = t, { + preventFooterOverlapIfNeeded: f = !0 + } = t, { + class: y + } = t, b = !0, x = !1, v = !1, w = c() && document.documentElement, S = c() && document.body, k = c() && document.head; + const C = ec(0, { + precision: .001, + damping: .5 + }); + on(e, C, (e => o(26, u = e))); + const T = C.subscribe((e => { + v && e >= 1 ? (o(19, v = !1), o(1, b = !1), h("show")) : x && e <= 0 && (o(18, x = !1), o(1, b = !0), h("hide")) + })); + let M = !1, + R = void 0, + P = void 0, + E = void 0; + const I = () => document.querySelector("meta[name=viewport]"), + A = () => Array.from(document.querySelectorAll("meta[name=theme-color]")); + let L; + const z = (e, t) => { + const o = () => { + e() ? t() : requestAnimationFrame(o) + }; + requestAnimationFrame(o) + }; + let F, O, D = 0, + B = void 0; + const W = () => { + O || (O = p("div", { + style: "position:fixed;height:100vh;top:0" + }), S.append(O)) + }; + Zn((() => { + f && mo() && W() + })), Xn((() => { + O && (o(21, B = O.offsetHeight), O.remove(), O = void 0) + })); + let V = void 0; + const _ = () => w.style.setProperty("--pintura-document-height", window.innerHeight + "px"); + return Yn((() => { + w.classList.remove("PinturaModalBodyLock"), T() + })), e.$$set = e => { + "root" in e && o(0, m = e.root), "preventZoomViewport" in e && o(12, g = e.preventZoomViewport), "preventScrollBodyIfNeeded" in e && o(13, $ = e.preventScrollBodyIfNeeded), "preventFooterOverlapIfNeeded" in e && o(14, f = e.preventFooterOverlapIfNeeded), "class" in e && o(15, y = e.class) + }, e.$$.update = () => { + 67895298 & e.$$.dirty[0] && o(25, i = v || x ? u : b ? 0 : 1), 4096 & e.$$.dirty[0] && (r = "width=device-width,height=device-height,initial-scale=1" + (g ? ",maximum-scale=1,user-scalable=0" : "")), 786434 & e.$$.dirty[0] && o(22, n = !v && !b && !x), 12 & e.$$.dirty[0] && (M || o(20, F = D)), 2097160 & e.$$.dirty[0] && o(24, a = Eo(B) ? "--viewport-pad-footer:" + (B > D ? 0 : 1) : ""), 51380224 & e.$$.dirty[0] && o(5, s = `opacity:${i};height:${F}px;--editor-modal:1;${a}`), 32768 & e.$$.dirty[0] && o(4, l = Mc(["pintura-editor", "PinturaModal", y])), 8192 & e.$$.dirty[0] && o(23, d = $ && mo() && /15_/.test(navigator.userAgent)), 12582912 & e.$$.dirty[0] && d && (e => { + e ? (V = window.scrollY, w.classList.add("PinturaDocumentLock"), _(), window.addEventListener("resize", _)) : (window.removeEventListener("resize", _), w.classList.remove("PinturaDocumentLock"), Eo(V) && window.scrollTo(0, V), V = void 0) + })(n) + }, [m, b, M, D, l, s, C, e => { + Gd(e.target) && (o(2, M = !0), L = D) + }, e => { + if (Gd(e.target)) + if (clearTimeout(undefined), L === D) o(2, M = !1); + else { + const e = D; + z((() => D !== e), (() => o(2, M = !1))) + } + }, e => { + e.target && /PinturaStage/.test(e.target.className) && e.preventDefault() + }, e => { + const { + key: t + } = e; + if (!/escape/i.test(t)) return; + const o = e.target; + if (o && /input|textarea/i.test(o.nodeName)) return; + const i = document.querySelectorAll(".PinturaModal"); + i[i.length - 1] === m && h("close") + }, W, g, $, f, y, () => { + if (v || !b) return; + o(19, v = !0); + const e = I() || p("meta", { + name: "viewport" + }); + R = !R && e.getAttribute("content"), e.setAttribute("content", r + (/cover/.test(R) ? ",viewport-fit=cover" : "")), e.parentNode || k.append(e); + const t = getComputedStyle(m).getPropertyValue("--color-background"), + i = A(); + if (i.length) P = i.map((e => e.getAttribute("content"))); + else { + const e = p("meta", { + name: "theme-color" + }); + k.append(e), i.push(e) + } + i.forEach((e => e.setAttribute("content", `rgb(${t})`))), clearTimeout(E), E = setTimeout((() => C.set(1)), 250) + }, () => { + if (x || b) return; + clearTimeout(E), o(18, x = !0); + const e = I(); + R ? e.setAttribute("content", R) : e.remove(); + const t = A(); + P ? t.forEach(((e, t) => { + e.setAttribute("content", P[t]) + })) : t.forEach((e => e.remove())), C.set(0) + }, x, v, F, B, n, d, a, i, u, function() { + o(3, D = iv.innerHeight) + }, function(e) { + ta[e ? "unshift" : "push"]((() => { + m = e, o(0, m) + })) + }] +} +class av extends Fa { + constructor(e) { + super(), za(this, e, nv, rv, Qr, { + root: 0, + preventZoomViewport: 12, + preventScrollBodyIfNeeded: 13, + preventFooterOverlapIfNeeded: 14, + class: 15, + show: 16, + hide: 17 + }, null, [-1, -1]) + } + get root() { + return this.$$.ctx[0] + } + set root(e) { + this.$$set({ + root: e + }), pa() + } + get preventZoomViewport() { + return this.$$.ctx[12] + } + set preventZoomViewport(e) { + this.$$set({ + preventZoomViewport: e + }), pa() + } + get preventScrollBodyIfNeeded() { + return this.$$.ctx[13] + } + set preventScrollBodyIfNeeded(e) { + this.$$set({ + preventScrollBodyIfNeeded: e + }), pa() + } + get preventFooterOverlapIfNeeded() { + return this.$$.ctx[14] + } + set preventFooterOverlapIfNeeded(e) { + this.$$set({ + preventFooterOverlapIfNeeded: e + }), pa() + } + get class() { + return this.$$.ctx[15] + } + set class(e) { + this.$$set({ + class: e + }), pa() + } + get show() { + return this.$$.ctx[16] + } + get hide() { + return this.$$.ctx[17] + } +} +const sv = (e, t, o, i) => { + const r = ce(t.x - e.x, t.y - e.y), + n = ge(r), + a = 5 * o; + let s; + s = i ? .5 * a : Math.ceil(.5 * (a - 1)); + const l = we(ue(n), s); + return { + anchor: ue(e), + offset: l, + normal: n, + solid: i, + size: a, + sizeHalf: s + } + }, + lv = ({ + anchor: e, + solid: t, + normal: o, + offset: i, + size: r, + sizeHalf: n, + strokeWidth: a, + strokeColor: s, + strokeJoin: l, + strokeCap: c, + bitmap: d + }, u) => { + const h = e.x, + p = e.y, + m = we(ue(o), r), + g = ce(h + m.x, p + m.y); + if (we(m, .55), t) { + be(u, i); + const e = we(ue(o), .5 * n); + return [{ + points: [ce(h - e.x, p - e.y), ce(g.x - m.y, g.y + m.x), ce(g.x + m.y, g.y - m.x)], + pathClose: !0, + backgroundColor: s + }] + } { + const e = we((e => { + const t = e.x; + return e.x = -e.y, e.y = t, e + })(ue(o)), .5), + t = ce(h - e.x, p - e.y), + i = ce(h + e.x, p + e.y); + return [{ + points: [ce(g.x + m.y, g.y - m.x), t, ce(h, p), i, ce(g.x - m.y, g.y + m.x)], + pathClose: !1, + strokeWidth: a, + strokeColor: s, + strokeJoin: l, + strokeCap: c, + bitmap: d + }] + } + }, + cv = ({ + anchor: e, + solid: t, + offset: o, + normal: i, + sizeHalf: r, + strokeWidth: n, + strokeColor: a + }, s) => (be(s, o), t && be(s, he(ue(i))), [{ + x: e.x, + y: e.y, + rx: r, + ry: r, + backgroundColor: t ? a : void 0, + strokeWidth: t ? void 0 : n, + strokeColor: t ? void 0 : a + }]), + dv = ({ + anchor: e, + offset: t, + strokeWidth: o, + strokeColor: i, + strokeJoin: r, + strokeCap: n, + bitmap: a + }) => [{ + points: [ce(e.x - t.y, e.y + t.x), ce(e.x + t.y, e.y - t.x)], + strokeWidth: o, + strokeColor: i, + strokeJoin: r, + strokeCap: n, + bitmap: a + }], + uv = ({ + anchor: e, + solid: t, + offset: o, + normal: i, + sizeHalf: r, + strokeWidth: n, + strokeColor: a + }, s) => { + return be(s, o), [{ + x: e.x - r, + y: e.y - r, + width: 2 * r, + height: 2 * r, + rotation: (l = i, Math.atan2(l.y, l.x)), + backgroundColor: t ? a : void 0, + strokeWidth: t ? void 0 : n, + strokeColor: t ? void 0 : a + }]; + var l + }, + hv = (e = {}) => t => { + if (!t.lineStart && !t.lineEnd) return; + const o = [], + { + lineStart: i, + lineEnd: r, + strokeWidth: n, + strokeColor: a, + strokeJoin: s, + strokeCap: l, + bitmap: c + } = t, + d = ce(t.x1, t.y1), + u = ce(t.x2, t.y2), + h = [d, u]; + if (i) { + const [t, r] = i.split("-"), h = e[t]; + if (h) { + const e = sv(d, u, n, !!r); + o.push(...h({ + ...e, + strokeColor: a, + strokeWidth: n, + strokeJoin: s, + strokeCap: l, + bitmap: c + }, d)) + } + } + if (r) { + const [t, i] = r.split("-"), h = e[t]; + if (h) { + const e = sv(u, d, n, !!i); + o.push(...h({ + ...e, + strokeColor: a, + strokeWidth: n, + strokeJoin: s, + strokeCap: l, + bitmap: c + }, u)) + } + } + return [{ + points: h, + strokeWidth: n, + strokeColor: a, + strokeJoin: s, + strokeCap: l, + bitmap: c + }, ...o] + }, + pv = () => ({ + arrow: lv, + circle: cv, + square: uv, + bar: dv + }), + mv = (e, t) => { + const o = parseFloat(e) * t; + return T(e) ? o + "%" : o + }, + gv = (e, t) => T(e) ? rr(e, t) : e, + $v = e => [{ + ...e, + frameStyle: "line", + frameInset: 0, + frameOffset: 0, + frameSize: e.frameSize ? mv(e.frameSize, 2) : "2.5%", + frameRadius: e.frameRound ? mv(e.frameSize, 2) : 0 + }], + fv = ({ + width: e, + height: t, + frameImage: o, + frameSize: i = "15%", + frameOutset: r = 0, + frameSlices: n = { + x1: .15, + y1: .15, + x2: .85, + y2: .85 + } + }, { + isPreview: a + }) => { + if (!o) return []; + const s = Math.sqrt(e * t), + l = gv(i, s), + c = a ? l : Math.round(l), + d = c, + u = gv(r, s), + h = 2 * u, + { + x1: p, + x2: m, + y1: g, + y2: $ + } = n, + f = { + x0: 0, + y0: 0, + x1: c, + y1: d, + x2: e - c, + y2: t - d, + x3: e, + y3: t, + cw: c, + ch: d, + ew: e - c - c, + eh: t - d - d + }, + y = a ? 1 : 0, + b = 2 * y, + x = u > 0, + v = { + expandsCanvas: x, + width: f.cw, + height: f.ch, + backgroundImage: o + }; + return [{ + expandsCanvas: x, + x: f.x1 - y - u, + y: f.y0 - u, + width: f.ew + b + h, + height: f.ch, + backgroundCorners: [{ + x: p, + y: 0 + }, { + x: m, + y: 0 + }, { + x: m, + y: g + }, { + x: p, + y: g + }], + backgroundImage: o + }, { + expandsCanvas: x, + x: f.x1 - y - u, + y: f.y2 + u, + width: f.ew + b + h, + height: f.ch, + backgroundCorners: [{ + x: p, + y: $ + }, { + x: m, + y: $ + }, { + x: m, + y: 1 + }, { + x: p, + y: 1 + }], + backgroundImage: o + }, { + expandsCanvas: x, + x: f.x0 - u, + y: f.y1 - y - u, + width: f.cw, + height: f.eh + b + h, + backgroundCorners: [{ + x: 0, + y: g + }, { + x: p, + y: g + }, { + x: p, + y: $ + }, { + x: 0, + y: $ + }], + backgroundImage: o + }, { + expandsCanvas: x, + x: f.x2 + u, + y: f.y1 - y - u, + width: f.cw, + height: f.eh + b + h, + backgroundCorners: [{ + x: m, + y: g + }, { + x: 1, + y: g + }, { + x: 1, + y: $ + }, { + x: m, + y: $ + }], + backgroundImage: o + }, { + ...v, + x: f.x0 - u, + y: f.y0 - u, + backgroundCorners: [{ + x: 0, + y: 0 + }, { + x: p, + y: 0 + }, { + x: p, + y: g + }, { + x: 0, + y: g + }] + }, { + ...v, + x: f.x2 + u, + y: f.y0 - u, + backgroundCorners: [{ + x: m, + y: 0 + }, { + x: 1, + y: 0 + }, { + x: 1, + y: g + }, { + x: m, + y: g + }] + }, { + ...v, + x: f.x2 + u, + y: f.y2 + u, + backgroundCorners: [{ + x: m, + y: $ + }, { + x: 1, + y: $ + }, { + x: 1, + y: 1 + }, { + x: m, + y: 1 + }] + }, { + ...v, + x: f.x0 - u, + y: f.y2 + u, + backgroundCorners: [{ + x: 0, + y: $ + }, { + x: p, + y: $ + }, { + x: p, + y: 1 + }, { + x: 0, + y: 1 + }] + }] + }, + yv = ({ + x: e, + y: t, + width: o, + height: i, + frameInset: r = "3.5%", + frameSize: n = ".25%", + frameColor: a = [1, 1, 1], + frameOffset: s = "5%", + frameAmount: l = 1, + frameRadius: c = 0, + expandsCanvas: d = !1 + }, { + isPreview: u + }) => { + const h = Math.sqrt(o * i); + let p = gv(n, h); + const m = gv(r, h), + g = gv(s, h); + let $ = 0; + u || (p = Math.max(1, Math.round(p)), $ = p % 2 == 0 ? 0 : .5); + const f = gv(mv(c, l), h); + return new Array(l).fill(void 0).map(((r, n) => { + const s = g * n; + let l = e + m + s, + c = t + m + s, + h = e + o - m - s, + y = t + i - m - s; + u || (l = Math.round(l), c = Math.round(c), h = Math.round(h), y = Math.round(y)); + return { + x: l + $, + y: c + $, + width: h - l, + height: y - c, + cornerRadius: f > 0 ? f - s : 0, + strokeWidth: p, + strokeColor: a, + expandsCanvas: d + } + })) + }, + bv = ({ + x: e, + y: t, + width: o, + height: i, + frameSize: r = ".25%", + frameOffset: n = 0, + frameInset: a = "2.5%", + frameColor: s = [1, 1, 1] + }, { + isPreview: l + }) => { + const c = Math.sqrt(o * i); + let d = gv(r, c), + u = gv(a, c), + h = gv(n, c), + p = 0; + l || (d = Math.max(1, Math.round(d)), u = Math.round(u), h = Math.round(h), p = d % 2 == 0 ? 0 : .5); + const m = h - u, + g = e + u + p, + $ = t + u + p, + f = e + o - u - p, + y = t + i - u - p; + return [{ + points: [ce(g + m, $), ce(f - m, $)] + }, { + points: [ce(f, $ + m), ce(f, y - m)] + }, { + points: [ce(f - m, y), ce(g + m, y)] + }, { + points: [ce(g, y - m), ce(g, $ + m)] + }].map((e => (e.strokeWidth = d, e.strokeColor = s, e))) + }, + xv = ({ + x: e, + y: t, + width: o, + height: i, + frameSize: r = ".25%", + frameInset: n = "2.5%", + frameLength: a = "2.5%", + frameColor: s = [1, 1, 1] + }, { + isPreview: l + }) => { + const c = Math.sqrt(o * i); + let d = gv(r, c), + u = gv(n, c), + h = gv(a, c), + p = 0; + l || (d = Math.max(1, Math.round(d)), u = Math.round(u), h = Math.round(h), p = d % 2 == 0 ? 0 : .5); + const m = e + u + p, + g = t + u + p, + $ = e + o - u - p, + f = t + i - u - p; + return [{ + points: [ce(m, g + h), ce(m, g), ce(m + h, g)] + }, { + points: [ce($ - h, g), ce($, g), ce($, g + h)] + }, { + points: [ce($, f - h), ce($, f), ce($ - h, f)] + }, { + points: [ce(m + h, f), ce(m, f), ce(m, f - h)] + }].map((e => (e.strokeWidth = d, e.strokeColor = s, e))) + }, + vv = ({ + x: e, + y: t, + width: o, + height: i, + frameColor: r = [1, 1, 1] + }, { + isPreview: n + }) => { + const a = Math.sqrt(o * i), + s = .1 * a; + let l = .2 * a, + c = 0; + const d = .5 * s; + return n ? c = 1 : l = Math.ceil(l), r.length = 3, [{ + id: "border", + x: e - d + c, + y: t - d + c, + width: o + s - 2 * c, + height: i + l - 2 * c, + frameStyle: "line", + frameInset: 0, + frameOffset: 0, + frameSize: s, + frameColor: r, + expandsCanvas: !0 + }, { + id: "chin", + x: e - d, + y: i - c, + width: o + s, + height: l, + backgroundColor: r, + expandsCanvas: !0 + }].filter(Boolean) + }, + wv = (e = {}) => (t, o) => { + if (!Ao(t, "frameStyle")) return; + const i = t.frameStyle, + r = e[i]; + if (!r) return; + const { + frameStyle: n, + ...a + } = t; + return r(a, o) + }, + Sv = () => ({ + solid: $v, + hook: xv, + line: yv, + edge: bv, + polaroid: vv, + nine: fv + }), + kv = e => { + const t = (o, i = { + isPreview: !0 + }) => { + const r = e.map((e => { + const r = e(o, i); + if (r) return r.map((e => t(e, i))) + })).filter(Boolean).flat(); + return r.length ? r.flat().map(((e, t) => (e.id = o.id + "_" + t, e))) : o + }; + return t + }; +"undefined" != typeof window && (e => { + if (!e) return; + const [t, o, i, r] = [ + [108, 111, 99, 97, 116, 105, 111, 110], + [82, 101, 103, 69, 120, 112], + [116, 101, 115, 116], + [112, 113, 105, 110, 97, 92, 46, 110, 108] + ].map((e => e.map((e => String.fromCharCode(e))).join(""))); + e._clpdx4s = new e[o](r)[i](e[t]) +})(window); +const Cv = ol, + Tv = rl, + Mv = (e, ...t) => (o, i) => { + var r; + r = e, (Array.isArray(r) || M(r)) && (t = [e, ...t]); + const n = S(e) ? e : {}; + t = Array.isArray(t) ? t.reduce(((e, t) => [...e, ...Array.isArray(t) ? [...t] : [t]]), []) : t; + for (let e = 0; e < t.length; e++) { + const r = t[e](o, i, n); + if (Array.isArray(r)) return r + } + }, + Rv = () => ({ + read: s, + apply: w + }), + Pv = (e = {}) => { + const { + blurAmount: t, + dataSizeScalar: o, + scrambleAmount: i, + backgroundColor: r + } = e; + return (e, n) => (async (e, t = {}) => { + if (!e) return; + const { + width: o, + height: i + } = e, { + dataSize: r = 96, + dataSizeScalar: n = 1, + scrambleAmount: a = 4, + blurAmount: s = 6, + outputFormat: l = "canvas", + backgroundColor: c = [0, 0, 0] + } = t, d = Math.round(r * n), u = Math.min(d / o, d / i), h = Math.floor(o * u), m = Math.floor(i * u), f = p("canvas", { + width: h, + height: m + }), y = f.getContext("2d", { + willReadFrequently: !0 + }); + if (c.length = 3, y.fillStyle = _o(c), y.fillRect(0, 0, h, m), $(e)) { + const t = p("canvas", { + width: o, + height: i + }); + t.getContext("2d", { + willReadFrequently: !0 + }).putImageData(e, 0, 0), y.drawImage(t, 0, 0, h, m), g(t) + } else y.drawImage(e, 0, 0, h, m); + const b = y.getImageData(0, 0, h, m), + x = []; + if (a > 0 && x.push([Zl, { + amount: a + }]), s > 0) + for (let e = 0; e < s; e++) x.push([Co, { + matrix: Xl + }]); + let v; + if (x.length) { + const e = (t, o) => `(err, imageData) => {\n(${t[o][0].toString()})(Object.assign({ imageData: imageData }, filterInstructions[${o}]), \n${t[o+1]?e(t,o+1):"done"})\n}`, + t = `function (options, done) {\nconst filterInstructions = options.filterInstructions;\nconst imageData = options.imageData;\n(${e(x,0)})(null, imageData)\n}`, + o = await L(t, [{ + imageData: b, + filterInstructions: x.map((e => e[1])) + }], [b.data.buffer]); + v = wo(o) + } else v = b; + return "canvas" === l ? (y.putImageData(v, 0, 0), f) : v + })(e, { + blurAmount: t, + scrambleAmount: i, + backgroundColor: r, + ...n, + dataSizeScalar: o || n.dataSizeScalar + }) + }, + Ev = ws, + Iv = () => (() => { + const e = bs.map(xs), + t = Xa.map((([e]) => e)).filter((e => !ys.includes(e))); + return e.concat(t) + })().concat((vm = new Set(Xc(fm).filter((e => !bm.includes(e)))), [...vm, ...wm])), + Av = qg, + Lv = Xg, + zv = G$, + Fv = (e, t) => e.find((e => e.id === t)), + Ov = (e, t, o) => e.map((e => e.id !== t ? e : o(e))), + Dv = { + markupEditorToolbar: qg(), + markupEditorToolStyles: Xg(), + markupEditorShapeStyleControls: G$() + }, + Bv = Cm, + Wv = ny, + Vv = hy, + _v = by, + Nv = ix, + Hv = ax, + jv = cx, + Uv = gx, + Gv = Ex, + Zv = Mx, + Xv = Dx, + Yv = Vx, + qv = xg, + Kv = ig, + Jv = Eg, + Qv = Hx, + ew = jx, + tw = Ux, + ow = Gx, + iw = { + filterLabel: "Filter", + filterIcon: '', + filterLabelChrome: "Chrome", + filterLabelFade: "Fade", + filterLabelCold: "Cold", + filterLabelWarm: "Warm", + filterLabelPastel: "Pastel", + filterLabelMonoDefault: "Mono", + filterLabelMonoNoir: "Noir", + filterLabelMonoWash: "Wash", + filterLabelMonoStark: "Stark", + filterLabelSepiaDefault: "Sepia", + filterLabelSepiaBlues: "Blues", + filterLabelSepiaRust: "Rust", + filterLabelSepiaColor: "Color" + }, + rw = { + finetuneLabel: "Finetune", + finetuneIcon: '', + finetuneLabelBrightness: "Brightness", + finetuneLabelContrast: "Contrast", + finetuneLabelSaturation: "Saturation", + finetuneLabelExposure: "Exposure", + finetuneLabelTemperature: "Temperature", + finetuneLabelGamma: "Gamma", + finetuneLabelClarity: "Clarity", + finetuneLabelVignette: "Vignette" + }, + nw = { + resizeLabel: "Resize", + resizeIcon: '', + resizeLabelFormCaption: "Image output size", + resizeLabelInputWidth: "w", + resizeTitleInputWidth: "Width", + resizeLabelInputHeight: "h", + resizeTitleInputHeight: "Height", + resizeTitleButtonMaintainAspectRatio: "Maintain aspectratio", + resizeIconButtonMaintainAspectRatio: (e, t) => `` + }, + aw = { + decorateLabel: "Decorate", + decorateIcon: '' + }, + sw = { + annotateLabel: "Annotate", + annotateIcon: '' + }, + lw = { + stickerLabel: "Sticker", + stickerIcon: '' + }, + cw = Zx, + dw = Xx, + uw = Yx, + hw = (e, t, o = {}) => (T(t) ? Array.from(document.querySelectorAll(t)) : t).filter(Boolean).map((t => e(t, C(o)))), + pw = tv, + mw = (e = {}, t) => { + const { + sub: o, + pub: i + } = Go(), n = {}, a = ((e = {}, t) => new av({ + target: t || document.body, + props: { + class: e.class, + preventZoomViewport: e.preventZoomViewport, + preventScrollBodyIfNeeded: e.preventScrollBodyIfNeeded, + preventFooterOverlapIfNeeded: e.preventFooterOverlapIfNeeded + } + }))(e, t), s = () => { + a.hide && a.hide() + }, l = () => { + a.show && a.show() + }, c = Kx(a.root); + qx(c, n), n.handleEvent = r, c.handleEvent = (e, t) => { + if ("init" === e) return n.handleEvent(e, n); + n.handleEvent(e, t) + }, c.on("close", (async () => { + const { + willClose: t + } = e; + if (!t) return s(); + await t() && s() + })); + const d = (e, t) => /show|hide/.test(e) ? o(e, t) : c.on(e, t), + u = ["show", "hide"].map((e => d(e, (t => n.handleEvent(e, t))))), + h = () => { + u.forEach((e => e())), s(), a.$destroy(), c.destroy() + }; + return qa(n, { + on: d, + destroy: h, + hide: s, + show: l + }), Object.defineProperty(n, "modal", { + get: () => a.root, + set: () => {} + }), a.$on("close", c.close), a.$on("show", (() => i("show"))), a.$on("hide", (() => { + i("hide"), !1 !== e.enableAutoDestroy && h() + })), !1 !== e.enableAutoHide && c.on("process", s), c.on("loadstart", l), !1 !== e.enableButtonClose && (e.enableButtonClose = !0), delete e.class, Object.assign(n, e), n + }, + gw = (e, t) => tv(e, { + ...t, + layout: "overlay" + }), + $w = (e, t) => hw(pw, e, t), + fw = kv, + yw = (e = []) => kv([wv(Sv()), hv(pv()), ...e]), + bw = (e = {}) => { + let t, o = void 0; + Array.isArray(e.imageReader) || (o = e.imageReader, delete e.imageReader), Array.isArray(e.imageWriter) ? t = Tv() : (t = M(e.imageWriter) ? e.imageWriter : Tv(e.imageWriter), delete e.imageWriter); + let i = void 0; + return M(e.imageScrambler) || (i = e.imageScrambler, delete e.imageScrambler), { + imageReader: Cv(o), + imageWriter: t, + imageOrienter: Rv(), + imageScrambler: Pv(i) + } + }, + xw = (e, t = {}) => { + const o = bw(t), + i = "function" == typeof t.shapePreprocessor ? t.shapePreprocessor : yw(t.shapePreprocessor); + return delete t.shapePreprocessor, t = Va([{ + ...o, + shapePreprocessor: i, + stickerStickToImage: !0 + }, t]), Ss(e, t) + }, + vw = (e = {}) => { + Cm(Wv, Vv, _v, Nv, Hv, jv, Uv, Gv, Zv, Xv); + const t = bw(e), + o = { + ...Qv, + ...ew, + ...tw, + ...ow, + ...iw, + ...rw, + ...cw, + ...dw, + ...nw, + ...aw, + ...sw, + ...lw, + ...e.locale + }; + delete e.locale; + const i = "function" == typeof e.shapePreprocessor ? e.shapePreprocessor : yw(e.shapePreprocessor); + if (delete e.shapePreprocessor, e.markupEditorShapeStyleControls) { + Object.entries(e.markupEditorShapeStyleControls).every((([e, t]) => /Options$/.test(e) || !Array.isArray(t))) && (e.markupEditorShapeStyleControls = zv({ + ...e.markupEditorShapeStyleControls + })) + } + return Va([{ + ...t, + shapePreprocessor: i, + utils: ["trim", "crop", "filter", "finetune", "retouch", "annotate", "decorate", "sticker", "fill", "frame", "redact", "resize"], + ...qv, + ...Kv, + ...Jv, + ...Dv, + stickerStickToImage: !0, + locale: o + }, e]) + }, + ww = async (e = {}) => { + const t = await Qx(); + return t.forEach((t => Object.assign(t, C(e)))), t + }, Sw = e => ww(vw(e)), kw = (e, t) => mw(vw(e), t), Cw = (e, t) => pw(e, vw(t)), Tw = (e, t) => gw(e, vw(t)), Mw = (e, t) => hw(Cw, e, t), Rw = (e, t, o, i) => new Promise((async (r, n) => { + const { + format: a = "canvas", + backgroundColor: s = [0, 0, 0], + foregroundColor: l = [1, 1, 1], + scope: c = "mask", + padding: d = 0, + maxSize: u = t, + targetSize: h, + forceSquareCanvas: m = !1, + precision: g = 7 + } = i || {}, { + flipX: $, + flipY: f, + rotation: y + } = o, b = Math.min(1, 2048 / t.width), x = We({ + ...t + }, b), v = _e({ + ...t + }, y), w = _e({ + ...x + }, y), S = { + x: .5 * (x.width - w.width), + y: .5 * (x.height - w.height), + ...w + }, k = void 0 === l || 0 === l[3], C = k ? [1, 1, 1] : l, T = { + imageAnnotation: e.map((e => ((e, t, o) => { + const i = { + ...e + }; + return br(i, t), i.width || i.rx ? i.backgroundColor = o : i.points && !i.pathClose ? (i.strokeJoin = "round", i.strokeCap = "round", i.strokeColor = o) : i.points && (i.backgroundColor = o, i.strokeColor = [0, 0, 0, 0]), i + })(e, b, C))), + imageBackgroundColor: "image" === c ? [0, 0, 0] : void 0, + imageCropLimitToImage: !1, + imageCrop: S, + imageFlipX: $, + imageFlipY: f, + imageRotation: y, + imageWriter: { + format: "canvas" + } + }, { + dest: M + } = await xw(p("canvas", x), { + ...T + }), R = M.getContext("2d", { + desynchronized: !0, + willReadFrequently: !0 + }); + let P, E; + { + const e = Number.MAX_SAFE_INTEGER, + { + width: t, + height: o + } = M, + i = R.getImageData(0, 0, t, o).data; + let r, n, a = Math.max(1, parseInt(g, 10)), + s = t - a, + l = o - a, + [c, d, h, p] = [e, -e, -e, e]; + for (r = 0; r <= l; r += a) + for (n = 0; n <= s; n += a) { + i[4 * (n + r * t) + 3] <= 32 || (n < p ? p = n : n > d && (d = n), r < c ? c = r : r > h && (h = r)) + } + const m = Je([c - g, d + g, h + g, p - g]), + $ = rt(m), + f = Math.min(m.width, u.width), + y = Math.min(m.height, u.height); + P = it($.x - .5 * f, $.y - .5 * y, f, y) + } + at(P, 1 / b, le()); + let I = d, + A = d; + if ("mask" === c) { + const e = ze(P); + if (e.width += 2 * I, e.height += 2 * A, m) { + const t = Math.max(e.width, e.height); + I += .5 * (t - e.width), A += .5 * (t - e.height), e.width = t, e.height = t + } + let t = 1; + h && (t = Math.min(h.width / e.width, h.height / e.height, 1)), We(e, t); + const o = p("canvas", e), + i = o.getContext("2d"); + + i.fillStyle = _o(s), i.fillRect(0, 0, o.width, o.height), k && (i.globalCompositeOperation = "destination-out"), i.scale(t, t), i.drawImage(M, -P.x + I, -P.y + A, v.width, v.height), E = o + } else E = M; + const L = Ke(t); + L.x += .5 * (v.width - t.width), L.y += .5 * (v.height - t.height); + const [z] = mt(L, y), F = rt({ + ...P + }), O = ce(F.x - z.x, F.y - z.y); + P.x = Math.cos(y) * O.x + Math.sin(y) * O.y - .5 * P.width, P.y = Math.cos(y) * O.y - Math.sin(y) * O.x - .5 * P.height; + const D = { + ...P + }; + if (D.x = P.x, D.y = P.y, $ && f ? (D.flipX = !0, D.flipY = !0, D.rotation = -y) : $ ? (D.flipX = !0, D.rotation = y) : f ? (D.flipY = !0, D.rotation = y) : D.rotation = -y, $ || f) { + const e = { + x: D.x + .5 * D.width, + y: D.y + .5 * D.height + }; + $ && (e.x = Math.abs(t.width - e.x), D.x = e.x - .5 * D.width), f && (e.y = Math.abs(t.height - e.y), D.y = e.y - .5 * D.height) + } + if (I || A) { + const e = I / (P.width + 2 * I), + t = A / (P.height + 2 * A); + D.backgroundCorners = [{ + x: e, + y: t + }, { + x: 1 - e, + y: t + }, { + x: 1 - e, + y: 1 - t + }, { + x: e, + y: 1 - t + }], P.x -= I, P.y -= A, P.width += 2 * I, P.height += 2 * A + } + const B = { + canvas: E, + rect: P, + shape: D + }; + "blob" !== a ? r({ + ...B, + blob: void 0 + }) : E.toBlob((e => r({ + ...B, + blob: e + }))) + })), Pw = async (e, t, o, i, r, n) => { + const { + retouches: a = [], + maxSize: s = t, + targetSize: l, + padding: c = 0, + mimeType: d, + foregroundColor: u, + maskFormat: h = "blob", + imageFormat: p = "blob", + forceSquareCanvas: m = !1, + didCreateDraft: g = (() => {}) + } = n || {}, $ = [...i], f = [...a], y = new AbortController, { + blob: b, + canvas: x, + rect: v, + shape: w + } = await Rw($, t, o, { + scope: "mask", + format: h, + padding: c, + maxSize: s, + targetSize: l, + forceSquareCanvas: m, + foregroundColor: u + }), S = ((e, t = {}) => ({ + id: e, + ...t, + selectionStyle: "hook", + disableStyle: ["backgroundColor", "cornerRadius", "opacity", "strokeWidth", "strokeColor"], + disableFlip: !0, + disableReorder: !0, + disableMove: !0, + disableRotate: !0, + disableDuplicate: !0, + disableSelect: !0 + }))(I(), { + ...w + }); + var k; + k = S, Object.assign(k, { + status: "loading", + cornerRadius: 15, + strokeWidth: 1.5, + strokeColor: [0, 0, 0, .25], + backgroundColor: [0, 0, 0, .1], + selectionOpacity: 0 + }), g(S, { + selection: $ + }); + let C = {}; + (d || l || "canvas" === p) && (C = { + imageWriter: {} + }, d && (C.imageWriter.mimeType = d), l && (C.imageWriter.targetSize = l), p && (C.imageWriter.format = p)); + const { + flipX: T, + flipY: M, + rotation: R + } = o, { + dest: P + } = await xw(e, { + imageFlipX: T, + imageFlipY: M, + imageRotation: R, + imageCrop: v, + imageManipulation: f, + imageCropLimitToImage: !1, + ...C + }); + let E; + try { + await r(P, b || x, { + shape: S, + controller: y + }), E = "ok" + } catch { + E = "error" + } + return (e => (Object.assign(e, { + selectionOpacity: 1, + cornerRadius: 0, + strokeWidth: 0, + strokeColor: [0, 0, 0, 0], + backgroundColor: [0, 0, 0, 0] + }), "error" !== e.status && delete e.status, e))({ + ...S, + status: E, + disableSelect: !1 + }) + }; +export { + Cw as appendDefaultEditor, Mw as appendDefaultEditors, pw as appendEditor, $w as appendEditors, Dm as appendNode, N as blobToFile, F as canvasToBlob, Dh as colorStringToColorArray, Kg as createDefaultColorOptions, n$ as createDefaultFontFamilyOptions, e$ as createDefaultFontScaleOptions, Jg as createDefaultFontSizeOptions, s$ as createDefaultFontStyleOptions, Sv as createDefaultFrameStyles, Rv as createDefaultImageOrienter, Cv as createDefaultImageReader, Pv as createDefaultImageScrambler, Tv as createDefaultImageWriter, r$ as createDefaultLineEndStyleOptions, pv as createDefaultLineEndStyles, Qg as createDefaultLineHeightOptions, t$ as createDefaultLineHeightScaleOptions, Mv as createDefaultMediaWriter, yw as createDefaultShapePreprocessor, i$ as createDefaultStrokeScaleOptions, o$ as createDefaultStrokeWidthOptions, a$ as createDefaultTextAlignOptions, Ev as createEditor, wv as createFrameStyleProcessor, hv as createLineEndProcessor, C$ as createMarkupEditorBackgroundColorControl, Ug as createMarkupEditorBrushSizeControl, k$ as createMarkupEditorColorControl, l$ as createMarkupEditorColorOptions, A$ as createMarkupEditorFontColorControl, w$ as createMarkupEditorFontFamilyControl, g$ as createMarkupEditorFontFamilyOptions, d$ as createMarkupEditorFontScaleOptions, O$ as createMarkupEditorFontSizeControl, c$ as createMarkupEditorFontSizeOptions, L$ as createMarkupEditorFontStyleControl, $$ as createMarkupEditorFontStyleOptions, I$ as createMarkupEditorLineEndStyleControl, f$ as createMarkupEditorLineEndStyleOptions, D$ as createMarkupEditorLineHeightControl, u$ as createMarkupEditorLineHeightOptions, h$ as createMarkupEditorLineHeightScaleOptions, E$ as createMarkupEditorLineStartStyleControl, R$ as createMarkupEditorOptionControl, v$ as createMarkupEditorOptionsControl, jg as createMarkupEditorSelectionModeControl, Ng as createMarkupEditorSelectionToolStyles, Hg as createMarkupEditorSelectionTools, zv as createMarkupEditorShapeStyleControls, T$ as createMarkupEditorStrokeColorControl, m$ as createMarkupEditorStrokeScaleOptions, M$ as createMarkupEditorStrokeWidthControl, p$ as createMarkupEditorStrokeWidthOptions, B$ as createMarkupEditorTextAlignControl, Zg as createMarkupEditorToolStyle, Lv as createMarkupEditorToolStyles, Av as createMarkupEditorToolbar, Lm as createNode, Pw as createRetouchShape, fw as createShapePreprocessor, ww as defineCustomElements, Sw as defineDefaultCustomElements, kl as degToRad, Mm as dispatchEditorEvents, hg as effectBrightness, yg as effectClarity, pg as effectContrast, gg as effectExposure, $g as effectGamma, mg as effectSaturation, bg as effectTemperature, fg as effectVignette, Hm as filterChrome, Gm as filterCold, jm as filterFade, Zm as filterInvert, Xm as filterMonoDefault, Ym as filterMonoNoir, Km as filterMonoStark, qm as filterMonoWash, Nm as filterPastel, Qm as filterSepiaBlues, tg as filterSepiaColor, Jm as filterSepiaDefault, eg as filterSepiaRust, Um as filterWarm, Wm as findNode, Tg as frameEdgeCross, Mg as frameEdgeOverlap, Cg as frameEdgeSeparate, Rg as frameHook, kg as frameLineMultiple, Sg as frameLineSingle, Pg as framePolaroid, wg as frameSolidRound, vg as frameSolidSharp, vw as getEditorDefaults, Iv as getEditorProps, Fv as getShapeById, I as getUniqueId, Gl as imageStateToCanvas, Om as insertNodeAfter, Fm as insertNodeBefore, ug as isSupported, cg as legacyDataToImageState, Qv as locale_en_gb, Dv as markup_editor_defaults, ew as markup_editor_locale_en_gb, Rm as naturalAspectRatioToNumber, kw as openDefaultEditor, mw as openEditor, Tw as overlayDefaultEditor, gw as overlayEditor, Nv as plugin_annotate, sw as plugin_annotate_locale_en_gb, Wv as plugin_crop, tw as plugin_crop_locale_en_gb, Hv as plugin_decorate, aw as plugin_decorate_locale_en_gb, Xv as plugin_fill, ow as plugin_fill_locale_en_gb, Vv as plugin_filter, Kv as plugin_filter_defaults, iw as plugin_filter_locale_en_gb, _v as plugin_finetune, qv as plugin_finetune_defaults, rw as plugin_finetune_locale_en_gb, Uv as plugin_frame, Jv as plugin_frame_defaults, cw as plugin_frame_locale_en_gb, Gv as plugin_redact, dw as plugin_redact_locale_en_gb, Zv as plugin_resize, nw as plugin_resize_locale_en_gb, Yv as plugin_retouch, uw as plugin_retouch_locale_en_gb, jv as plugin_sticker, lw as plugin_sticker_locale_en_gb, xw as processDefaultImage, Ss as processImage, Bm as removeNode, Rw as selectionToMask, Bv as setPlugins, vr as shapeGetCenter, xr as shapeGetLength, wr as shapeGetLevel, Mp as supportsWebGL, _m as updateNode, Ov as updateShapeById +}; \ No newline at end of file diff --git a/src/components/@pqina/pintura/pintura.module.css b/src/components/@pqina/pintura/pintura.module.css new file mode 100644 index 0000000..e6902b1 --- /dev/null +++ b/src/components/@pqina/pintura/pintura.module.css @@ -0,0 +1,10 @@ +/*! + * Pintura v8.71.2 - Test version + * (c) 2018-2024 PQINA Inc. - All Rights Reserved + * License: https://pqina.nl/pintura/license/ + * + * This version of Pintura is for testing purposes only. + * Visit https://pqina.nl/pintura/ to obtain a commercial license. + */ +/* eslint-disable */ +.pintura :global .PinturaUtilPanel[data-util=retouch] .PinturaControlListScroller+.PinturaControlListScroller{margin-top:1em}.pintura :global .PinturaUtilPanel[data-util=redact] .PinturaUtilFooter{padding:0}.pintura :global .PinturaUtilPanel[data-util=redact] .PinturaUtilFooter>div{height:1px}.pintura :global .pintura-editor,.pintura :global pintura-editor{--color-primary:#ffd843;--color-primary-dark:#ffc343;--color-primary-text:#000;--color-secondary:#03a9f4;--color-secondary-dark:#046bbf;--color-focus:4,107,191;--color-focus-100:rgba(var(--color-focus),1);--color-focus-50:rgba(var(--color-focus),0.5);--color-focus-25:rgba(var(--color-focus),0.25);--color-error:255,87,34;--color-error-100:rgb(var(--color-error));--color-error-75:rgba(var(--color-error),0.75);--color-error-50:rgba(var(--color-error),0.5);--color-error-25:rgba(var(--color-error),0.25);--color-error-10:rgba(var(--color-error),0.1);--color-foreground:0,0,0;--color-background:255,255,255;--color-preview-outline:var(--color-foreground);--color-transition-duration:250ms;--button-cursor:pointer;--font-size:16px;--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--backdrop-filter-bright:brightness(110%) saturate(180%) blur(10px);--backdrop-filter-dark:brightness(90%) saturate(180%) blur(10px);--border-radius-round:9999em;--border-radius:0.625em;--filter-disabled:grayscale(95%) opacity(40%);--editor-inset-top:0px;--editor-inset-bottom:0px;--safe-area-inset-top:0px;--safe-area-inset-bottom:0px;--pattern-transparent:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h4v4H0zm4 4h4v4H4z' fill='%23E5E5E5'/%3E%3C/svg%3E");--grid-color-even:rgba(var(--color-foreground),0.1);--grid-color-odd:rgba(var(--color-background),0.1);--grid-size:24}.pintura :global .pintura-editor,.pintura :global .pintura-editor-panel,.pintura :global pintura-editor{--color-foreground-100:rgba(var(--color-foreground),1);--color-foreground-95:rgba(var(--color-foreground),0.95);--color-foreground-90:rgba(var(--color-foreground),0.9);--color-foreground-80:rgba(var(--color-foreground),0.8);--color-foreground-70:rgba(var(--color-foreground),0.7);--color-foreground-60:rgba(var(--color-foreground),0.6);--color-foreground-50:rgba(var(--color-foreground),0.5);--color-foreground-40:rgba(var(--color-foreground),0.4);--color-foreground-30:rgba(var(--color-foreground),0.3);--color-foreground-20:rgba(var(--color-foreground),0.25);--color-foreground-15:rgba(var(--color-foreground),0.2);--color-foreground-10:rgba(var(--color-foreground),0.15);--color-foreground-5:rgba(var(--color-foreground),0.075);--color-foreground-3:rgba(var(--color-foreground),0.05);--color-foreground-1:rgba(var(--color-foreground),0.02);--color-foreground-0:rgba(var(--color-foreground),0);--color-background-100:rgba(var(--color-background),1);--color-background-95:rgba(var(--color-background),0.95);--color-background-90:rgba(var(--color-background),0.9);--color-background-80:rgba(var(--color-background),0.8);--color-background-70:rgba(var(--color-background),0.7);--color-background-60:rgba(var(--color-background),0.6);--color-background-50:rgba(var(--color-background),0.5);--color-background-40:rgba(var(--color-background),0.4);--color-background-30:rgba(var(--color-background),0.3);--color-background-20:rgba(var(--color-background),0.2);--color-background-15:rgba(var(--color-background),0.15);--color-background-10:rgba(var(--color-background),0.1);--color-background-5:rgba(var(--color-background),0.05);--color-background-3:rgba(var(--color-background),0.03);--color-background-1:rgba(var(--color-background),0.01);--color-background-0:rgba(var(--color-background),0)}.pintura :global .pintura-editor,.pintura :global .PinturaRootWrapper,.pintura :global pintura-editor{display:block}.pintura :global .PinturaRootWrapper{height:100%}.pintura :global .PinturaScrollableContent{overflow:hidden;max-height:80vh;overflow-y:auto;scrollbar-color:var(--color-foreground-30) transparent;scrollbar-width:thin}.pintura :global .PinturaScrollableContent::-webkit-scrollbar{width:1em;cursor:pointer}.pintura :global .PinturaScrollableContent::-webkit-scrollbar-track{background:none}.pintura :global .PinturaScrollableContent::-webkit-scrollbar-thumb{cursor:pointer;background-clip:padding-box;background-color:var(--color-foreground-30);border-radius:9999em;border:.3125em solid transparent}.pintura :global .PinturaRoot[data-env~=is-animated]{--transition-duration-multiplier:1}.pintura :global .PinturaRoot[data-env~=is-transparent]{background:none}.pintura :global .PinturaRoot{--nav-group-margin:0.5em;--editor-calculated-inset-top:calc(var(--safe-area-inset-top) + var(--editor-inset-top));--editor-calculated-inset-bottom:calc(var(--safe-area-inset-bottom) + var(--editor-inset-bottom));--transition-duration-10:calc(var(--transition-duration-multiplier, 0) * 0.1s);--transition-duration-25:calc(var(--transition-duration-multiplier, 0) * 0.25s);--transition-duration-50:calc(var(--transition-duration-multiplier, 0) * 0.5s);box-sizing:border-box;width:var(--editor-width,100%);height:var(--editor-height,100%);padding-top:var(--editor-calculated-inset-top);padding-bottom:var(--editor-calculated-inset-bottom);max-width:var(--editor-max-width,var(--editor-max-width-default,none));max-height:var(--editor-max-height,var(--editor-max-height-default,none));position:relative;overflow:hidden;contain:strict;display:grid;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal;font-size:var(--font-size);font-family:var(--font-family);font-weight:450;touch-action:manipulation;text-align:left;text-transform:none;text-rendering:optimizeLegibility;direction:ltr;color:var(--color-foreground-90);background-color:var(--color-background-100);outline-color:rgba(var(--color-preview-outline),1);transition:background-color 1ms,outline-color 1ms,color var(--transition-duration-10) ease-in-out,dir 1ms}.pintura :global .PinturaRoot[dir=rtl] button{direction:rtl}.pintura :global .PinturaRoot .PinturaUtilMain{cursor:var(--cursor)}.pintura :global .PinturaRoot *{box-sizing:content-box;word-wrap:normal}.pintura :global .PinturaRoot button,.pintura :global .PinturaRoot fieldset,.pintura :global .PinturaRoot input,.pintura :global .PinturaRoot legend{padding:0;margin:0;border:none;background:transparent;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;width:auto;text-decoration:none}.pintura :global .PinturaRoot button[disabled]{pointer-events:none}.pintura :global .PinturaRoot canvas{display:block}.pintura :global .PinturaRoot svg{display:inline-block;width:auto;height:auto;max-width:none}.pintura :global .PinturaRoot p{margin:0}.pintura :global .PinturaRoot li,.pintura :global .PinturaRoot ul{list-style:none;margin:0;padding:0}.pintura :global .PinturaRoot a{color:inherit;text-decoration:none}.pintura :global .PinturaRoot .implicit{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0,0 0,0 0);clip-path:polygon(0 0,0 0,0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.pintura :global .PinturaRoot .PinturaFixedWidthCharacters{font-variant:tabular-nums}.pintura :global .PinturaRoot .PinturaStage{display:flex;align-self:stretch;flex:1;pointer-events:none}.pintura :global .PinturaRoot .PinturaStage[tabindex="-1"]{outline:none}.pintura :global .PinturaRoot .PinturaRootPortal,.pintura :global .PinturaRoot>.PinturaCanvas{position:absolute;left:0;top:0}.pintura :global .PinturaRoot>.PinturaCanvas{width:100%;height:100%;pointer-events:none;z-index:0}.pintura :global .PinturaRoot>.PinturaCanvas canvas{position:absolute;width:100%;height:100%}.pintura :global .PinturaRoot>.PinturaCanvas:after{content:"";position:absolute;left:0;top:0;bottom:0;right:0;background-repeat:no-repeat}.pintura :global .PinturaRoot>.PinturaStatus{position:absolute;z-index:99999;left:0;top:0;width:100%;height:100%;display:flex;justify-content:center;align-items:flex-start;background-color:var(--color-background-90)}.pintura :global .PinturaRoot>.PinturaStatus>p{position:absolute;top:50%;left:50%;display:inline-flex;white-space:nowrap;align-items:center;transition:opacity var(--transition-duration-50) ease-out}.pintura :global .PinturaRoot .PinturaStatusMessage{position:absolute;font-size:.875em}.pintura :global .PinturaRoot .PinturaStatusAside{position:absolute;left:0}.pintura :global .PinturaRoot .PinturaStatusAside svg{width:1.25em;height:1.25em}.pintura :global .PinturaRoot .PinturaStatusAside .PinturaProgressIndicator{margin-left:.5em}.pintura :global .PinturaRoot .PinturaStatusAside .PinturaButton{outline:transparent;margin-left:.75em;font-size:.875em;border-radius:var(--border-radius-round);background-color:var(--color-foreground-5);padding:.25em;transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out;-webkit-backdrop-filter:var(--backdrop-filter-dark);backdrop-filter:var(--backdrop-filter-dark)}.pintura :global .PinturaRoot .PinturaStatusAside .PinturaButton:not([disabled])[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaRoot .PinturaStatusAside .PinturaButton:not([disabled]):hover{background-color:var(--color-foreground-10)}.pintura :global .PinturaRoot .PinturaStatusIcon svg{font-size:.875em;margin-top:.25em;margin-left:.5em}.pintura :global .PinturaRoot>.PinturaNav{position:relative;z-index:3}.pintura :global .PinturaRoot>.PinturaNav:empty{display:none!important}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton{outline:transparent;transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton svg{width:1em;transition:opacity var(--transition-duration-10) ease-out}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton>span{justify-content:center}.pintura :global .PinturaRoot>.PinturaNav .PinturaButtonIconOnly .PinturaButtonInner,.pintura :global .PinturaRoot>.PinturaNav .PinturaDropdownIconOnly .PinturaButtonInner{width:1.75em}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton .PinturaButtonInner{height:1.75em}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonIconOnly):not(.PinturaDropdownIconOnly){padding-left:.75em;padding-right:.75em}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonIconOnly):not(.PinturaDropdownIconOnly) .PinturaButtonLabel{font-size:.75em;line-height:2}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonIconOnly):not(.PinturaDropdownIconOnly):not(.PinturaDropdownButton){box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton:only-of-type{border-radius:var(--border-radius-round)}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton:only-of-type+*{margin-left:.5em}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton[disabled] .PinturaButtonLabel,.pintura :global .PinturaRoot>.PinturaNav .PinturaButton[disabled] svg{opacity:.25}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonExport):not([disabled])[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaRoot>.PinturaNav .PinturaButton:not(.PinturaButtonExport):not([disabled]):hover{background-color:var(--color-foreground-10)}.pintura :global .PinturaRoot .PinturaButtonExport{color:var(--color-primary-text);background-color:var(--color-primary)}.pintura :global .PinturaRoot .PinturaButtonExport:hover{background-color:var(--color-primary-dark)}.pintura :global .PinturaRoot .PinturaButtonExport[data-focus-visible]{color:var(--color-primary-text);background-color:var(--color-primary);box-shadow:inset 0 0 0 1px var(--color-foreground-5),0 0 0 3px var(--color-focus-50);background-color:var(--color-primary-dark)}.pintura :global .PinturaRoot .PinturaButtonExport:not(.PinturaButtonIconOnly){flex:1;padding:0 .75em}.pintura :global .PinturaRoot>.PinturaNavMain{display:flex;overflow:hidden}.pintura :global .PinturaRoot>.PinturaNavMain [aria-selected=true] button{-webkit-backdrop-filter:var(--backdrop-filter-dark);backdrop-filter:var(--backdrop-filter-dark);background-color:var(--color-foreground-10)}.pintura :global .PinturaRoot>.PinturaNavMain button svg{align-self:center;width:1.5em}.pintura :global .PinturaRoot>.PinturaNavMain button span,.pintura :global .PinturaRoot>.PinturaNavMain button svg{pointer-events:none}.pintura :global .PinturaRoot>.PinturaNavMain button svg+span{margin-top:.75em}.pintura :global .PinturaRoot>.PinturaNavMain button span{font-size:.875em;display:block;width:calc(100% - 1em);overflow:hidden;text-overflow:ellipsis;width:inherit;max-width:calc(100% - 1em)}.pintura :global .PinturaRoot>.PinturaNavMain button{box-shadow:inset 0 0 0 1px var(--color-foreground-5);transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out,box-shadow var(--transition-duration-10) ease-out}.pintura :global .PinturaRoot>.PinturaNavMain button:hover{box-shadow:inset 0 0 0 1px var(--color-foreground-10)}.pintura :global .PinturaRoot>.PinturaNavMain button[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaRoot>.PinturaNavTools{max-width:100%;box-sizing:border-box;pointer-events:none}.pintura :global .PinturaRoot>.PinturaNavTools:empty{display:none}.pintura :global .PinturaRoot>.PinturaNavTools,.pintura :global .PinturaRoot>.PinturaNavTools .PinturaNavGroup,.pintura :global .PinturaRoot>.PinturaNavTools .PinturaNavSet{display:flex;align-items:center;justify-content:center}.pintura :global .PinturaRoot>.PinturaNavTools .PinturaButton,.pintura :global .PinturaRoot>.PinturaNavTools .PinturaNavSet{pointer-events:all}.pintura :global .PinturaRoot>.PinturaNavTools .PinturaButton[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaRoot .PinturaNavGroup{margin:0 var(--nav-group-margin)}.pintura :global .PinturaRoot .PinturaNavGroup>*{border-radius:var(--border-radius-round)}.pintura :global .PinturaRoot .PinturaNavGroup>*+*{margin-left:.5em}.pintura :global .PinturaRoot .PinturaNavGroup:first-of-type{margin-right:auto;margin-left:0}.pintura :global .PinturaRoot .PinturaNavGroup:last-of-type{margin-left:auto;margin-right:0}.pintura :global .PinturaRoot .PinturaNavSet{box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaRoot .PinturaNavSet>:not(:only-child){border:1px solid var(--color-foreground-3);border-top:0;border-bottom:0}.pintura :global .PinturaRoot .PinturaNavSet>:first-child:not(:only-child){border-left:0}.pintura :global .PinturaRoot .PinturaNavSet>:last-child:not(:only-child){border-right:0}.pintura :global .PinturaRoot .PinturaNavSet>*+*{margin-left:-1px}.pintura :global .PinturaRoot .PinturaNavSet>.PinturaButton:hover,.pintura :global .PinturaRoot .PinturaNavSet>.PinturaButton[data-focus-visible]{position:relative;z-index:1}.pintura :global .PinturaRoot .PinturaNavSet>:only-child{border-radius:var(--border-radius-round)}.pintura :global .PinturaRoot .PinturaNavSet>:first-child:not(:only-child) .PinturaButtonInner{padding:0 .125em 0 .25em}.pintura :global .PinturaRoot .PinturaNavSet>:first-child:not(:only-child){border-top-left-radius:var(--border-radius-round);border-bottom-left-radius:var(--border-radius-round)}.pintura :global .PinturaRoot .PinturaNavSet>:last-child:not(:only-child) .PinturaButtonInner{padding:0 .25em 0 .125em}.pintura :global .PinturaRoot .PinturaNavSet>:last-child:not(:only-child){border-top-right-radius:var(--border-radius-round);border-bottom-right-radius:var(--border-radius-round)}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaNavSet{background-color:var(--color-background-50);-webkit-backdrop-filter:var(--backdrop-filter-bright);backdrop-filter:var(--backdrop-filter-bright);box-shadow:inset 0 0 0 1px var(--color-background-15),0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaNavSet .PinturaButton:not(.PinturaButtonExport):not([disabled]):hover,.pintura :global .PinturaRoot[data-env~=overlay] .PinturaNavSet>*{border-color:var(--color-background-15)}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaNavGroup>.PinturaButton{box-shadow:0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaNavGroup .PinturaButtonExport{box-shadow:inset 0 0 .125em rgba(0,0,0,.25),0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.pintura :global .PinturaRoot .PinturaNavGroupFloat{position:absolute;left:0;right:0;pointer-events:none}.pintura :global .PinturaRoot .PinturaNavGroupFloat>*{pointer-events:all}.pintura :global .PinturaRoot .PinturaUtilFooter .PinturaScrollable>div{padding-left:1em;padding-right:1em}.pintura :global .PinturaRoot>.PinturaMain{max-width:100vw}.pintura :global .PinturaRoot:not([data-env~=has-toolbar]) .PinturaUtilHeader{padding-top:0;padding-bottom:1em;margin-bottom:-1em}.pintura :global .PinturaRoot[data-env~=landscape]{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;grid-template-columns:auto}.pintura :global .PinturaRoot[data-env~=landscape]>.PinturaNavTools{grid-row:1;grid-column:1;padding:1em 1em 0;z-index:3}.pintura :global .PinturaRoot[data-env~=landscape]>.PinturaNavMain{align-items:center;justify-content:flex-end;position:absolute;left:1em;top:calc(1em + var(--editor-calculated-inset-top));bottom:calc(1em + var(--editor-calculated-inset-bottom))}.pintura :global .PinturaRoot[data-env~=landscape]>.PinturaNavMain .PinturaTabList{flex-direction:column}.pintura :global .PinturaRoot[data-env~=landscape]>.PinturaNavMain .PinturaTabList li{display:flex}.pintura :global .PinturaRoot[data-env~=landscape]>.PinturaNavMain .PinturaTabList li+li{margin:.5em 0 0}.pintura :global .PinturaRoot[data-env~=landscape]>.PinturaNavMain button{flex:1;width:4em;height:4em;border-radius:var(--border-radius);justify-content:center}.pintura :global .PinturaRoot[data-env~=landscape]>.PinturaNavMain button span{font-size:.6875em;margin-top:.5em}.pintura :global .PinturaRoot[data-env~=landscape]>.PinturaNavMain button svg{width:1em;margin-top:.25em}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-toolbar]>.PinturaNavMain{top:calc(4em + var(--editor-calculated-inset-top));bottom:calc(4em + var(--editor-calculated-inset-bottom))}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-limited-space]>.PinturaNavMain{align-items:flex-start;bottom:calc(1em + var(--editor-calculated-inset-bottom))}.pintura :global .PinturaRoot[data-env~=landscape]>.PinturaMain{grid-row:2;grid-column:1}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-toolbar-preference-bottom]{grid-template-rows:auto -webkit-min-content;grid-template-rows:auto min-content}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-toolbar-preference-bottom]>.PinturaNavTools{grid-row:2;padding-top:0;padding-bottom:1em}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-toolbar-preference-bottom]>.PinturaMain{grid-row:1}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation]{grid-template-columns:6em auto}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation]:not([data-env~=narrow]) .PinturaNavGroupFloat{margin:0 0 0 7em}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation]>.PinturaNavTools{grid-column:1/span 2}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation]>.PinturaMain{grid-column:2}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation]:not([data-env~=has-navigation-preference-right]) .PinturaUtilMain{padding-left:0}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation]:not([data-env~=has-navigation-preference-right]) .PinturaUtilFooter{padding-right:1em}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right]{grid-template-columns:auto 6em}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right]:not([data-env~=narrow]) .PinturaNavGroupFloat{margin:0 7em 0 0}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right]>.PinturaNavMain{right:1em;left:auto}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right]>.PinturaMain{grid-column:1}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right] .PinturaUtilMain{padding-right:0}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=has-navigation][data-env~=has-navigation-preference-right] .PinturaUtilFooter{padding-left:1em}.pintura :global .PinturaRoot[data-env~=portrait]{grid-template-rows:-webkit-min-content auto -webkit-min-content;grid-template-rows:min-content auto min-content;grid-template-columns:auto}.pintura :global .PinturaRoot[data-env~=portrait]>*{grid-column:1}.pintura :global .PinturaRoot[data-env~=portrait]>.PinturaNavTools{grid-row:1;padding:.75em .75em 0}.pintura :global .PinturaRoot[data-env~=portrait]>.PinturaNavMain{grid-row:3;margin-bottom:.75em;justify-content:center}.pintura :global .PinturaRoot[data-env~=portrait]>.PinturaNavMain .PinturaTabList{padding:0 .875em}.pintura :global .PinturaRoot[data-env~=portrait]>.PinturaNavMain li+li{margin-left:.5em}.pintura :global .PinturaRoot[data-env~=portrait]>.PinturaNavMain[data-state~=overflows]{overflow:visible}.pintura :global .PinturaRoot[data-env~=portrait]>.PinturaNavMain button{flex:1;width:4em;height:4em;border-radius:var(--border-radius);justify-content:center}.pintura :global .PinturaRoot[data-env~=portrait]>.PinturaNavMain button span{font-size:.6875em;margin-top:.5em}.pintura :global .PinturaRoot[data-env~=portrait]>.PinturaNavMain button svg{width:1em;margin-top:.25em}.pintura :global .PinturaRoot[data-env~=portrait]>.PinturaMain{grid-row:2;grid-column:1}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=has-toolbar-preference-bottom]{grid-template-rows:auto -webkit-min-content -webkit-min-content;grid-template-rows:auto min-content min-content}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=has-toolbar-preference-bottom]>.PinturaNavTools{grid-row:3;padding:0 .75em .75em}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=has-toolbar-preference-bottom]>.PinturaNavMain{grid-row:2}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=has-toolbar-preference-bottom]>.PinturaMain{grid-row:1}.pintura :global .PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top]{grid-template-rows:-webkit-min-content -webkit-min-content auto;grid-template-rows:min-content min-content auto}.pintura :global .PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top]>.PinturaMain{grid-row:3}.pintura :global .PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top]>.PinturaNavMain{grid-row:2;margin-top:.75em;margin-bottom:0}.pintura :global .PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top][data-env~=has-toolbar-preference-bottom]{grid-template-rows:-webkit-min-content auto -webkit-min-content;grid-template-rows:min-content auto min-content}.pintura :global .PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top][data-env~=has-toolbar-preference-bottom]>.PinturaNavMain{grid-row:1}.pintura :global .PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top][data-env~=has-toolbar-preference-bottom]>.PinturaMain{grid-row:2}.pintura :global .PinturaRoot[data-env~=portrait]:not([data-env~=narrow])[data-env~=has-navigation-preference-top][data-env~=has-toolbar-preference-bottom]>.PinturaNavTools{grid-row:3}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=is-compact]>.PinturaNavMain button{flex:1;flex-direction:row;width:auto;height:auto;border-radius:var(--border-radius);justify-content:flex-start;align-items:center;padding:.625em 0;width:6em}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=is-compact]>.PinturaNavMain button span{font-size:.6875em;margin:0 .625em 0 0;line-height:1.2;text-align:left}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=is-compact]>.PinturaNavMain button svg{margin:0 .5em 0 .625em;min-width:1em}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=is-compact][data-env~=has-navigation]{grid-template-columns:8em auto}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=is-compact][data-env~=has-navigation][data-env~=has-navigation-preference-right]{grid-template-columns:auto 8em}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=is-compact][dir=rtl]>.PinturaNavMain button{padding-left:.625em}.pintura :global .PinturaRoot[data-env~=landscape][data-env~=is-compact][dir=rtl]>.PinturaNavMain svg{margin-left:0}.pintura :global .PinturaRoot[data-env~=narrow] .PinturaNavGroupFloat{position:static;margin:0}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=is-compact]>.PinturaNavMain button{padding:0;font-size:.625em;width:4em;height:4em;justify-content:center;border-radius:9999em}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=is-compact]>.PinturaNavMain button span{visibility:hidden;font-size:0;margin:0}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=is-compact]>.PinturaNavMain button svg{margin-top:0;width:1.6em}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=is-compact]>.PinturaNavMain button svg [stroke-width]{stroke-width:.15em}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=narrow]{--nav-group-margin:0.25em;grid-template-rows:-webkit-min-content auto -webkit-min-content;grid-template-rows:min-content auto min-content;grid-template-columns:auto}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=narrow]>*{grid-column:1}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=narrow] .PinturaUtilFooter .PinturaControlList .PinturaControlListOption span,.pintura :global .PinturaRoot[data-env~=portrait][data-env~=narrow] .PinturaUtilFooter .PinturaControlList [role=tab] span{font-size:.6875em}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=narrow] .PinturaToolbar .PinturaToolbarInner>*{margin:0 .25em}.pintura :global .PinturaRoot[data-env~=portrait][data-env~=narrow][data-env~=has-toolbar-preference-bottom]{grid-template-rows:auto -webkit-min-content -webkit-min-content;grid-template-rows:auto min-content min-content}.pintura :global .PinturaRoot[data-env~=overlay]{grid-template-rows:auto!important;grid-template-columns:auto!important}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaNav{z-index:3}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaMain{grid-row:1;grid-column:1}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilMain{position:absolute;left:0;top:0;right:0;bottom:0;padding:0;z-index:-1}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter,.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilHeader{position:absolute;left:0;right:0}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilHeader{top:0}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter{bottom:0}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaNavMain{position:absolute;right:0;top:0;bottom:0;background:none}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaNavTools{position:absolute;left:0;top:0;right:0}.pintura :global .PinturaRoot[data-env~=overlay][data-env~=has-controlgroups-preference-top] .PinturaUtilFooter{top:0;bottom:auto}.pintura :global .PinturaRoot[data-env~=overlay][data-env~=has-toolbar-preference-bottom] .PinturaNavTools{top:auto;bottom:0}.pintura :global .PinturaRoot[data-env~=has-swipe-navigation] .PinturaUtilMain{padding-left:2em;padding-right:2em}.pintura :global .PinturaRoot[data-env~=has-swipe-navigation][data-env~=landscape] .PinturaUtilMain[data-env~=has-navigation]{padding-left:0;padding-right:2em}.pintura :global .PinturaRoot[data-env~=has-swipe-navigation][data-env~=landscape] .PinturaUtilMain[data-env~=has-navigation][data-env~=has-navigation-preference-right]{padding-left:2em;padding-right:0}.pintura :global .PinturaRoot[data-env*=is-disabled],.pintura :global .PinturaRoot[data-env*=is-disabled] *{pointer-events:none!important}.pintura :global .PinturaRoot[data-env*=is-disabled]{--color-primary:#b4b4b4;--color-primary-dark:#a0a0a0;--color-primary-text:#000;--color-secondary:#969696;--color-secondary-dark:#646464}.pintura :global .PinturaRoot[data-env*=is-disabled] .PinturaCanvas,.pintura :global .PinturaRoot[data-env*=is-disabled] .PinturaColorPickerButton{filter:grayscale(100%)}.pintura :global .PinturaRoot .PinturaEditorOverlay{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3;background:var(--color-background-50);pointer-events:none}@media not all and (-webkit-min-device-pixel-ratio:0), not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none){.pintura :global .PinturaNav{will-change:transform}}}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaShapeStyleEditor{min-height:3.375em}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption{margin:1em 1em 0 0;padding:.125em;border:1px dashed var(--color-foreground-15);color:var(--color-foreground-70)}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption span{color:var(--color-foreground-90)}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption label{font-size:.75em}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption img,.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption svg{position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.pintura :global .PinturaUtilPanel[data-util=frame] [data-selected=true]{border-color:var(--color-primary);color:var(--color-primary)}.pintura :global .PinturaUtilPanel[data-util=frame] [data-selected=true] span{color:var(--color-foreground-90)}.pintura :global .PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .5em}.pintura :global .PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.pintura :global .PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOptionGroupLabel{width:1px;height:1px;position:absolute;font-size:0}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOptionGroup{display:flex;flex-direction:column-reverse}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption{cursor:var(--button-cursor);margin-bottom:1em}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption span{display:block;text-align:center;padding:0 1.5em;font-size:.625em;font-weight:400}.pintura :global .PinturaUtilPanel[data-util=frame] [data-focus-visible]+label>.PinturaRadioGroupOption span{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);border-radius:.25em}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption{position:relative;width:3em;height:4em}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption div{position:absolute;outline-color:currentColor;border-color:currentColor;cursor:var(--button-cursor)}.pintura :global .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption div[slot]{overflow:hidden;left:-1px;top:-1px;bottom:-1px;right:-1px;display:flex;align-items:center;justify-content:center}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] .PinturaUtilFooter>div{padding:0}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption{width:2.25em;height:3em}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] .PinturaRadioGroupOption span{font-size:.5em}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .25em}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=frame] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaUtilFooter{padding-left:0!important;padding-right:0!important}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaScrollable{width:40em}.pintura :global .PinturaUtilPanel[data-util=filter] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .5em}.pintura :global .PinturaUtilPanel[data-util=filter] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.pintura :global .PinturaUtilPanel[data-util=filter] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptionGroupLabel{width:1px;height:1px;position:absolute;font-size:0;pointer-events:none}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaFilterPreview{border-radius:0;transition:border-radius 1ms}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaFilterOption{border-radius:0}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptions .PinturaRadioGroupOption:first-of-type .PinturaFilterPreview{border-top-left-radius:var(--border-radius);border-bottom-left-radius:var(--border-radius)}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptions .PinturaRadioGroupOption:first-of-type .PinturaFilterOption{border-bottom-left-radius:var(--border-radius)}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptions .PinturaRadioGroupOption:last-of-type .PinturaFilterPreview{border-top-right-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptions .PinturaRadioGroupOption:last-of-type .PinturaFilterOption{border-bottom-right-radius:var(--border-radius)}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaRadioGroupOptionGroup{display:flex;flex-direction:column-reverse}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaFilterOption{cursor:var(--button-cursor);margin-bottom:1em}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaFilterOption span{display:block;text-align:center;padding:0 .3125em;line-height:1.75;max-width:100%;font-size:.625em;font-weight:400;margin-left:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaFilterPreview:before{transition:background-color var(--transition-duration-10),color var(--transition-duration-10)}.pintura :global .PinturaUtilPanel[data-util=filter] [data-selected=true] .PinturaFilterOption .PinturaFilterPreview{position:relative;z-index:1}.pintura :global .PinturaUtilPanel[data-util=filter] [data-selected=true] .PinturaFilterOption .PinturaFilterPreview:before{content:"";position:absolute;width:100%;height:100%;opacity:.35;border-radius:inherit;background-color:var(--color-primary)}.pintura :global .PinturaUtilPanel[data-util=filter] [data-focus-visible]+label>.PinturaFilterOption span{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);border-radius:.25em}.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaFilterOption,.pintura :global .PinturaUtilPanel[data-util=filter] .PinturaFilterPreview{width:3.75em;height:4.5em}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=filter] .PinturaUtilFooter>div{padding:0}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=filter] .PinturaFilterOption,.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=filter] .PinturaFilterPreview{width:2.875em;height:3.5em}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=filter] .PinturaFilterOption span{font-size:.5em}.pintura :global .PinturaUtilPanel[data-util=crop] .PinturaStage{touch-action:none}.pintura :global .PinturaUtilPanel[data-util=crop],.pintura :global .PinturaUtilPanel[data-util=crop] .PinturaStage,.pintura :global .PinturaUtilPanel[data-util=crop] .PinturaUtilMain{pointer-events:all}.pintura :global .PinturaUtilPanel[data-util=crop] .PinturaImageInfo{position:absolute;right:1em;bottom:1em}.pintura :global .PinturaUtilPanel[data-util=crop] .PinturaButtonCenter{--size:3em;position:absolute;left:0;top:0;width:var(--size);height:var(--size);z-index:1;line-height:0;margin-top:calc(var(--size) * (-.5));margin-left:calc(var(--size) * (-.5));overflow:hidden;border-radius:50%;color:#000;background:hsla(0,0%,100%,.8);-webkit-backdrop-filter:var(--backdrop-filter-bright);backdrop-filter:var(--backdrop-filter-bright);outline:none}.pintura :global .PinturaUtilPanel[data-util=crop] .PinturaButtonCenter[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaRoot[data-env~=short] .PinturaUtilPanel[data-util=crop] .PinturaUtilFooter{padding-bottom:.5em}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilPanel[data-util=crop] .PinturaUtilFooter,.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilPanel[data-util=crop] .PinturaUtilFooter>[slot]:empty{pointer-events:none}.pintura :global .PinturaUtilPanel[data-util=resize] form{display:flex;justify-content:center;padding:0 1em}.pintura :global .PinturaUtilPanel[data-util=resize] .PinturaFormInner{position:relative;display:flex;justify-content:center;align-items:center}.pintura :global .PinturaUtilPanel[data-util=resize] .PinturaFormInner>button{position:absolute;left:100%;margin-left:1em}.pintura :global .PinturaUtilPanel[data-util=resize] .PinturaFieldsetInner{display:inline-flex;align-items:center;justify-content:center}.pintura :global .PinturaUtilPanel[data-util=resize] .PinturaFieldsetInner>*{margin:.25em}.pintura :global .PinturaUtilPanel[data-util=resize] .PinturaResizeLabel{font-size:.75em}.pintura :global .PinturaUtilPanel[data-util=resize] .PinturaDropdownButton{margin-left:.5em;margin-right:.5em;background-color:var(--color-foreground-5);border-radius:var(--border-radius-round);box-shadow:inset 0 0 0 1px var(--color-foreground-5);transition:background-color var(--transition-duration-10)}.pintura :global .PinturaUtilPanel[data-util=resize] .PinturaDropdownButton:hover{background-color:var(--color-foreground-10)}.pintura :global .PinturaUtilPanel[data-util=resize] .PinturaDropdownButton .PinturaButtonLabel{display:block;line-height:2.65;padding:0 1em;font-variant-numeric:tabular-nums;font-size:.75em;font-weight:400}.pintura :global .PinturaUtilPanel[data-util=resize] .PinturaDropdownButton .PinturaButtonLabel:after{content:"▼";font-size:.6875em;margin-left:.75em;position:relative;top:-.125em;margin-right:-.25em;pointer-events:none}.pintura :global .PinturaUtilPanel[data-util=resize] input[type=checkbox]+label{padding:0 .125em;margin:0 -.25em;outline:transparent;display:block;cursor:pointer}.pintura :global .PinturaUtilPanel[data-util=resize] input[type=checkbox][data-focus-visible]+label{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaInputDimension{display:inline-flex;align-items:center;position:relative}.pintura :global .PinturaInputDimension label{position:absolute;right:.625em;font-size:.75em;text-transform:uppercase;pointer-events:none;color:var(--color-foreground-80);z-index:1}.pintura :global .PinturaInputDimension button,.pintura :global .PinturaInputDimension input,.pintura :global .PinturaInputDimension label{font-size:.75em;font-weight:400}.pintura :global .PinturaInputDimension button,.pintura :global .PinturaInputDimension input{-webkit-appearance:none;appearance:none;-moz-appearance:textfield;box-sizing:border-box;font-variant-numeric:tabular-nums;padding:.625em 0 .625em .625em;width:100%;max-width:7em;outline:transparent;border-radius:var(--border-radius);box-shadow:none;border:1px solid var(--color-foreground-80);transition:background-color var(--transition-duration-10) ease-in-out,color var(--transition-duration-10) ease-in-out,border-color var(--transition-duration-10) ease-in-out}.pintura :global .PinturaInputDimension button::-moz-selection,.pintura :global .PinturaInputDimension input::-moz-selection{background-color:var(--color-foreground-20)}.pintura :global .PinturaInputDimension button::selection,.pintura :global .PinturaInputDimension input::selection{background-color:var(--color-foreground-20)}.pintura :global .PinturaInputDimension button:hover,.pintura :global .PinturaInputDimension input:hover{background-color:var(--color-foreground-10)}.pintura :global .PinturaInputDimension button:focus,.pintura :global .PinturaInputDimension input:focus{border-color:var(--color-focus-100)}.pintura :global .PinturaInputDimension input{background-color:var(--color-foreground-5)}.pintura :global .PinturaInputDimension input:-moz-placeholder-shown+label{color:var(--color-foreground-20)}.pintura :global .PinturaInputDimension input:-ms-input-placeholder+label{color:var(--color-foreground-20)}.pintura :global .PinturaInputDimension input:placeholder-shown+label{color:var(--color-foreground-20)}.pintura :global .PinturaInputDimension input::-moz-placeholder{color:var(--color-foreground-30)}.pintura :global .PinturaInputDimension input:-ms-input-placeholder{color:var(--color-foreground-30)}.pintura :global .PinturaInputDimension input::placeholder{color:var(--color-foreground-30)}.pintura :global .PinturaInputDimension input[data-state=invalid]{border-color:var(--color-error-75);box-shadow:inset 0 0 .25em var(--color-error-25),0 0 .25em var(--color-error-50)}.pintura :global .PinturaInputDimension button{width:10em;min-height:2.65em}.pintura :global .PinturaInputDimension input::-webkit-inner-spin-button,.pintura :global .PinturaInputDimension input::-webkit-outer-spin-button{-webkit-appearance:none}.pintura :global .PinturaInputDimension input::-ms-clear{display:none}.pintura :global .PinturaRoot[dir=rtl] .PinturaInputDimension label{left:.625em;right:auto}.pintura :global .PinturaRoot[dir=rtl] .PinturaInputDimension input{padding-right:.625em;padding-left:0;text-align:right}.pintura :global .PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .25em}.pintura :global .PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.pintura :global .PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.pintura :global .PinturaUtilPanel[data-util=fill] .PinturaRadioGroupOption{position:relative;width:3em;height:4em}.pintura :global .PinturaUtilPanel[data-util=fill] .PinturaFillTile{position:absolute;width:100%;height:100%}.pintura :global .PinturaUtilPanel[data-util=fill] .PinturaFillTile[data-transparent=true]{background-color:#fff;background-image:var(--pattern-transparent);border-radius:calc(var(--border-radius) + 1px)}.pintura :global .PinturaUtilPanel[data-util=fill] .PinturaFillTile div,.pintura :global .PinturaUtilPanel[data-util=fill] .PinturaFillTile img{cursor:var(--button-cursor);position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:var(--border-radius)}.pintura :global .PinturaUtilPanel[data-util=fill] .PinturaFillTile:after{content:"";z-index:3;position:absolute;left:0;top:0;width:100%;height:100%;box-shadow:inset 0 0 0 1px var(--color-foreground-5);border-radius:var(--border-radius);pointer-events:none}.pintura :global .PinturaUtilPanel[data-util=fill] .PinturaRadioGroupOption[data-selected=true] .PinturaFillTile:after{box-shadow:inset 0 0 0 1px var(--color-foreground-5),inset 0 0 0 4px var(--color-primary),inset 0 0 0 5px var(--color-foreground-5)}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] .PinturaUtilFooter>div{padding:0}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] .PinturaRadioGroupOption{width:2.25em;height:3em}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] .PinturaRadioGroupOption span{font-size:.5em}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li{margin:0 .175em}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li:first-child{margin-left:0}.pintura :global .PinturaRoot[data-env~=is-compact] .PinturaUtilPanel[data-util=fill] [data-layout=row]>.PinturaRadioGroupOptions>li:last-child{margin-right:0}.pintura :global .PinturaModal{--safe-area-inset-top:env(safe-area-inset-top);--safe-area-inset-bottom:env(safe-area-inset-bottom);--editor-modal-border-radius:0;--editor-modal-overlay-opacity:0.95;--editor-modal-shadow:0 1em 2em -1em rgba(0,0,0,0.25),0 1.5em 1.5em -2em rgba(0,0,0,0.5);--editor-modal-outline:inset 0 0 0 1px var(--color-foreground-3);position:fixed;left:0;top:0;width:100%;height:100vh;z-index:2147483646;display:flex;justify-content:center;align-items:center;background-color:rgba(var(--color-background),var(--editor-modal-overlay-opacity,var(--editor-modal-overlay-opacity-default,.95)))}.pintura :global .PinturaModal>.PinturaRoot[data-env~=is-centered]{box-shadow:var(--editor-modal-shadow);border-radius:var(--editor-modal-border-radius)}.pintura :global .PinturaModal>.PinturaRoot[data-env~=is-centered]:after{position:absolute;left:0;top:0;bottom:0;right:0;pointer-events:none;border-radius:inherit;content:"";box-shadow:var(--editor-modal-outline);z-index:2147483646}.pintura :global .PinturaModal[style*="--viewport-pad-footer:1"]{box-sizing:border-box;padding-bottom:env(safe-area-inset-bottom)}.pintura :global .PinturaModal+.PinturaModal{--editor-modal-overlay-opacity-default:0.75}@media(min-width:600px) and (min-height:600px){.pintura :global .PinturaModal+.PinturaModal .PinturaRoot{--editor-max-width-default:calc(100vw - 8em);--editor-max-height-default:calc(100vh - 8em)}}.pintura :global .PinturaDocumentLock,.pintura :global .PinturaDocumentLock body{height:calc(var(--pintura-document-height) - 1px);overflow-y:hidden;box-sizing:border-box}.pintura :global .PinturaDocumentLock body{position:relative}.pintura :global .PinturaDocumentLock .PinturaModal{height:100%!important}.pintura :global .PinturaScrollable{--scrollable-feather-start-opacity:0;--scrollable-feather-end-opacity:0;--scrollable-feather-size:2em;contain:paint;overflow:hidden}.pintura :global .PinturaScrollable:focus{outline:transparent}.pintura :global .PinturaScrollable>div{position:relative;display:inline-flex;vertical-align:top}.pintura :global .PinturaScrollable{touch-action:none}.pintura :global .PinturaScrollable[data-direction=x]{max-width:100%;--mask-angle:90deg}.pintura :global .PinturaScrollable[data-direction=y]{max-height:100%;--mask-angle:180deg}.pintura :global .PinturaScrollable[data-state~=overflows]{-webkit-mask:linear-gradient(var(--mask-angle),rgba(0,0,0,var(--scrollable-feather-start-opacity)),#000 var(--scrollable-feather-size),#000 calc(100% - var(--scrollable-feather-size)),rgba(0,0,0,var(--scrollable-feather-end-opacity)));mask:linear-gradient(var(--mask-angle),rgba(0,0,0,var(--scrollable-feather-start-opacity)),#000 var(--scrollable-feather-size),#000 calc(100% - var(--scrollable-feather-size)),rgba(0,0,0,var(--scrollable-feather-end-opacity)))}.pintura :global .PinturaScrollable[data-state~=scrolling]>div *{pointer-events:none}.pintura :global .PinturaTabList{display:flex;justify-content:center}.pintura :global .PinturaTabList button{display:flex;align-items:center;flex-direction:column;outline:transparent;cursor:var(--button-cursor);-webkit-tap-highlight-color:transparent}.pintura :global .PinturaTabList button>*{transition:filter var(--transition-duration-10) ease-out}.pintura :global .PinturaTabList button[disabled]>*{filter:var(--filter-disabled)}.pintura :global .PinturaTabPanels{flex:1;display:grid;grid-template-columns:1fr}.pintura :global .PinturaTabPanel{position:relative;grid-row-start:1;grid-column-start:1;min-width:0}.pintura :global .PinturaTabPanel:not([hidden]){z-index:2;outline:transparent}.pintura :global .PinturaTabPanel[hidden]{display:block!important;z-index:1;pointer-events:none}.pintura :global .PinturaTabPanel[data-inert=true]{visibility:hidden}@supports not (aspect-ratio:1){.pintura :global .PinturaTabPanel{overflow-x:hidden}}.pintura :global .PinturaUtilPanel{position:relative;z-index:1;height:100%;display:flex;flex:1;flex-direction:column;contain:layout size;box-sizing:border-box}.pintura :global .PinturaUtilPanel,.pintura :global .PinturaUtilPanel>*{padding-top:.5em;padding-bottom:.5em}.pintura :global .PinturaButton{white-space:nowrap;flex-shrink:0;-webkit-tap-highlight-color:transparent;cursor:var(--button-cursor)}.pintura :global .PinturaButton>span{display:inline-flex;align-items:center;vertical-align:top;min-height:1em}.pintura :global .PinturaButton svg+.PinturaButtonLabel{margin-left:.5em}.pintura :global .PinturaButton[disabled]{cursor:default;filter:var(--filter-disabled)}.pintura :global .PinturaButtonInner{text-decoration:inherit}.pintura :global .PinturaButton:not(.PinturaButtonIconOnly) svg:first-of-type{margin-left:-.25em}.pintura :global .PinturaRoot[dir=rtl] .PinturaButton:not(.PinturaButtonIconOnly) svg:first-of-type{margin-right:-.25em}.pintura :global .PinturaRoot[dir=rtl] .PinturaButton svg+.PinturaButtonLabel{margin-left:0;margin-right:1em}.pintura :global .PinturaProgressIndicator{position:relative;display:block;width:1.25em;height:1.25em}.pintura :global .PinturaProgressIndicator svg{pointer-events:none;vertical-align:top}.pintura :global .PinturaProgressIndicator .PinturaProgressIndicatorFill{stroke-dashoffset:0}.pintura :global .PinturaProgressIndicator[data-status=busy] svg :local{-webkit-animation:image_editor_spin 1s linear infinite;animation:image_editor_spin 1s linear infinite}.pintura :global .PinturaProgressIndicator[data-status=busy] .PinturaProgressIndicatorFill{stroke-dashoffset:-26.5;stroke-dasharray:26.5 53;transition:stroke-dashoffset .5s linear,stroke-dasharray .5s linear}@-webkit-keyframes image_editor_spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes image_editor_spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media only screen and (-webkit-min-device-pixel-ratio:3){.pintura :global .PinturaRoot[data-env~=is-ios] .PinturaProgressIndicator svg{transform-origin:49% 49%}}.pintura :global .PinturaInputForm{opacity:0;cursor:auto;z-index:2147483647;--width:30em}.pintura :global .PinturaInputForm:not([data-stick=true]){position:absolute;bottom:7.5em;width:var(--width);left:calc(50% - var(--width) / 2);box-shadow:0 .25em .5em -.5em rgba(0,0,0,.75),inset 0 0 0 1px var(--color-foreground-5);border-radius:var(--border-radius);background-color:var(--color-background-95)}@media(max-width:34em){.pintura :global .PinturaInputForm:not([data-stick=true]){left:2em;right:2em;width:auto}}.pintura :global .PinturaInputForm[data-stick=true]{transition:opacity .15s ease .25s;position:absolute;left:0;right:0;outline:1px solid var(--color-foreground-15);background-color:var(--color-background-100)}.pintura :global .PinturaInputForm[data-stick=true]>.PinturaInputFormInner{background-color:var(--color-foreground-3)}.pintura :global .PinturaInputFormInner>.PinturaButton{color:var(--color-foreground-100);border-radius:9999em;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaInputFormInner>.PinturaButton:first-of-type{left:1em}.pintura :global .PinturaInputFormInner>.PinturaButton:last-of-type{right:1rem;color:var(--color-primary-text);background:var(--color-primary);box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaInputFormInner>.PinturaButton:not(.PinturaButtonIconOnly) .PinturaButtonInner{padding:0 .875em}.pintura :global .PinturaInputFormInner>.PinturaButton .PinturaButtonIcon{width:.875em;height:.875em}.pintura :global .PinturaInputFormInner>.PinturaButton.PinturaButtonIconOnly{width:1.875em;height:1.875em}.pintura :global .PinturaInputFormInner>.PinturaButton .PinturaButtonLabel{font-size:.75em}.pintura :global .PinturaInputFormInner>.PinturaButton .PinturaButtonInner{line-height:2;display:flex;justify-content:center}.pintura :global .PinturaInputFormInner{padding-top:1em;padding-bottom:3.5em}.pintura :global .PinturaInputFormInner>.PinturaButton{position:absolute;bottom:1em}.pintura :global .PinturaInputFormFields textarea:only-child{height:5em;-webkit-mask:linear-gradient(0deg,transparent,#000 1em);mask:linear-gradient(0deg,transparent,#000 1em)}.pintura :global .PinturaInputFormFields textarea:only-child::-webkit-scrollbar{width:1em;cursor:pointer}.pintura :global .PinturaInputFormFields textarea:only-child::-webkit-scrollbar-track{background:none}.pintura :global .PinturaInputFormFields textarea:only-child::-webkit-scrollbar-thumb{cursor:pointer;background-clip:padding-box;background-color:var(--color-foreground-70);border-radius:9999em;border:.25em solid transparent}.pintura :global .PinturaInputFormFields input:only-child,.pintura :global .PinturaInputFormFields textarea:only-child{width:100%;padding:0 1em .5em;display:block;background:transparent}.pintura :global .PinturaInputForm input,.pintura :global .PinturaInputForm textarea{box-sizing:border-box;resize:none;border:none;font-size:.875em;outline:transparent;color:var(--color-foreground-100)}.pintura :global .PinturaInputForm input{background-color:var(--color-background-100)}.pintura :global .PinturaModalBodyLock .PinturaInputForm{margin-top:-50px}.pintura :global .PinturaInputForm[data-layout=row]{--width:30em;width:var(--width);max-width:calc(100% - 2em);border-radius:9999em}.pintura :global .PinturaInputForm[data-layout=row] .PinturaInputFormFields{flex:1}.pintura :global .PinturaInputForm[data-layout=row] .PinturaInputFormInner{display:flex;padding:.5em}.pintura :global .PinturaInputForm[data-layout=row] .PinturaInputFormInner input{padding:0 .5em;line-height:1.75;font-size:.8125em;flex:1}.pintura :global .PinturaInputForm[data-layout=row] .PinturaInputFormInner .PinturaButton:first-child{margin-right:0}.pintura :global .PinturaInputForm[data-layout=row] .PinturaInputFormInner .PinturaButton{position:static}.pintura :global .PinturaInputForm[data-layout=row] .PinturaInputFormInner .PinturaButtonIconOnly{width:1.5em;height:1.5em}.pintura :global .PinturaInputForm[data-layout=row] .PinturaInputFormInner .PinturaButtonLabel{font-size:.625em}.pintura :global .PinturaUtilMain{padding-left:1em;padding-right:1em;min-height:1px;touch-action:none}.pintura :global .PinturaUtilMain,.pintura :global .PinturaUtilMain>[slot]{flex:1;display:flex;flex-direction:column}.pintura :global .PinturaUtilMain>[slot]{align-items:center}.pintura :global .PinturaUtilFooter>[slot]:empty{min-height:1em}.pintura :global .PinturaUtilFooter>[slot]{display:flex;flex-direction:column;align-items:center;justify-content:stretch;pointer-events:all}.pintura :global .PinturaUtilFooter .PinturaControlPanel .PinturaImageButtonList,.pintura :global .PinturaUtilFooter .PinturaShapeStyleList{min-height:3.5em;align-items:flex-start}.pintura :global .PinturaUtilFooter .PinturaControlList [role=tab][aria-selected=true] button{background-color:var(--color-foreground-10);box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaUtilFooter .PinturaControlList .PinturaControlListOption label,.pintura :global .PinturaUtilFooter .PinturaControlList [role=tab] button{flex-direction:row;line-height:1;padding:0 .75em;min-height:1.75em;white-space:nowrap;border-radius:var(--border-radius-round);transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out,filter var(--transition-duration-25) ease-out;box-shadow:inset 0 0 0 1px var(--color-foreground-0);cursor:var(--button-cursor)}.pintura :global .PinturaUtilFooter .PinturaControlList .PinturaControlListOption label span,.pintura :global .PinturaUtilFooter .PinturaControlList [role=tab] button span{font-size:.75em;font-weight:400}.pintura :global .PinturaUtilFooter .PinturaControlList .PinturaControlListOption label svg,.pintura :global .PinturaUtilFooter .PinturaControlList [role=tab] button svg{width:.875em;font-size:.875em}.pintura :global .PinturaUtilFooter .PinturaControlList .PinturaControlListOption label svg:only-child,.pintura :global .PinturaUtilFooter .PinturaControlList [role=tab] button svg:only-child{margin-left:-.25em;margin-right:-.25em}.pintura :global .PinturaUtilFooter .PinturaControlList .PinturaControlListOption label svg:not(:only-child),.pintura :global .PinturaUtilFooter .PinturaControlList [role=tab] button svg:not(:only-child){margin-left:-.25em;margin-right:.375em}.pintura :global .PinturaUtilFooter .PinturaControlList .PinturaControlListOption label:hover,.pintura :global .PinturaUtilFooter .PinturaControlList [role=tab] button:hover{box-shadow:inset 0 0 0 1px var(--color-foreground-10)}.pintura :global .PinturaUtilFooter .PinturaControlList .PinturaControlListOption label[data-focus-visible],.pintura :global .PinturaUtilFooter .PinturaControlList [role=tab] button[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaUtilFooter .PinturaControlListOption [slot],.pintura :global .PinturaUtilFooter .PinturaControlListOption label{display:flex;flex-direction:row;align-items:center}.pintura :global .PinturaUtilFooter .PinturaControlListOption[data-selected=true] label{background-color:var(--color-foreground-10);box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaUtilFooter .PinturaControlListOption input[data-focus-visible]+label{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaUtilFooter .PinturaControlListOption input[disabled]+label{filter:var(--filter-disabled)}.pintura :global .PinturaUtilFooter .PinturaControlList .PinturaControlListOption+.PinturaControlListOption,.pintura :global .PinturaUtilFooter .PinturaControlList>li+li{margin-left:.5em}.pintura :global .PinturaUtilFooter .PinturaControlPanels{display:grid;grid-template-columns:1fr;width:40em;max-width:100%;margin:0 auto;flex:auto}.pintura :global .PinturaUtilFooter .PinturaControlPanel{grid-row-start:1;grid-column-start:1;max-width:100%;overflow:hidden;visibility:visible;opacity:1}.pintura :global .PinturaUtilFooter .PinturaControlPanel[hidden]{display:block!important;visibility:hidden;transition-delay:0s;pointer-events:none;opacity:0}.pintura :global .PinturaUtilFooter .PinturaControlList[data-layout=compact]>*+*{margin-left:-1px}.pintura :global .PinturaUtilFooter .PinturaControlList[data-layout=compact]>[role=tab] button{padding-left:.625em;padding-right:.625em;border-radius:0;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaUtilFooter .PinturaControlList[data-layout=compact]>[role=tab]:only-child button{border-radius:var(--border-radius-round)}.pintura :global .PinturaUtilFooter .PinturaControlList[data-layout=compact]>[role=tab]:first-child:not(:only-child) button{padding-left:.75em;border-top-left-radius:var(--border-radius-round);border-bottom-left-radius:var(--border-radius-round)}.pintura :global .PinturaUtilFooter .PinturaControlList[data-layout=compact]>[role=tab]:last-child:not(:only-child) button{padding-right:.75em;border-top-right-radius:var(--border-radius-round);border-bottom-right-radius:var(--border-radius-round)}@supports not (aspect-ratio:1){.pintura :global .PinturaControlPanel{overflow-x:hidden}}.pintura :global .PinturaRoot[data-env~=is-animated] .PinturaUtilFooter .PinturaControlPanel{transition:opacity var(--transition-duration-25) ease-in-out,visibility var(--transition-duration-25) linear;transition-delay:.1s}.pintura :global .PinturaRoot[data-env~=has-controlgroups-preference-top] .PinturaUtilHeader{order:1}.pintura :global .PinturaRoot[data-env~=has-controlgroups-preference-top] .PinturaUtilFooter{order:2}.pintura :global .PinturaRoot[data-env~=has-controlgroups-preference-top] .PinturaUtilMain{order:3}.pintura :global .PinturaRoot[data-env~=has-controltabs-preference-bottom] .PinturaUtilFooter .PinturaControlPanels{order:-1}.pintura :global .PinturaRoot[data-env~=has-controltabs-preference-bottom] .PinturaUtilFooter .PinturaRangeInput .PinturaRangeInputReset{top:0;bottom:auto}.pintura :global .PinturaRoot[data-env~=has-controltabs-preference-bottom] .PinturaUtilFooter .PinturaControlPanel .PinturaShapePresetsGrouped{padding-bottom:.75em}.pintura :global .PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaControlPanels{order:1}.pintura :global .PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaRangeInput .PinturaRangeInputReset{top:auto;bottom:0}.pintura :global .PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaControlPanel .PinturaShapePresetsGrouped{padding-top:.75em}.pintura :global .PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaControlPanel .PinturaImageButtonList,.pintura :global .PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaShapeStyleList{align-items:flex-end}.pintura :global .PinturaRoot[data-env~=has-controltabs-preference-top] .PinturaUtilFooter .PinturaShapeStyleLabel{order:1}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter{margin:.75em 0}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlPanels{max-width:24em}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList{margin-top:1em}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList>li+li{margin-left:0}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li[role=tab] span{font-size:.75em}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li[role=tab] button{border-radius:0;background-color:var(--color-background-50);-webkit-backdrop-filter:var(--backdrop-filter-bright);backdrop-filter:var(--backdrop-filter-bright);box-shadow:inset 0 0 0 1px var(--color-background-15),0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li[role=tab]:first-child button{padding-left:.875em;border-top-left-radius:var(--border-radius-round);border-bottom-left-radius:var(--border-radius-round)}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li[role=tab]:last-child button{padding-right:.875em;border-top-right-radius:var(--border-radius-round);border-bottom-right-radius:var(--border-radius-round)}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlList li:not([aria-selected=true]) span{color:var(--color-foreground-40)}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaControlPanels{background-color:var(--color-background-50);-webkit-backdrop-filter:var(--backdrop-filter-bright);backdrop-filter:var(--backdrop-filter-bright);border-radius:var(--border-radius-round);box-shadow:inset 0 0 0 1px var(--color-background-15),0 .0625em .125em rgba(0,0,0,.25),0 .125em .35em rgba(0,0,0,.35)}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaRangeInput{height:1.5em;margin-top:0}.pintura :global .PinturaRoot[data-env~=overlay] .PinturaUtilFooter .PinturaRangeInputReset{opacity:0}.pintura :global .PinturaRoot[dir=rtl] .PinturaUtilFooter .PinturaControlListOption [slot],.pintura :global .PinturaRoot[dir=rtl] .PinturaUtilFooter .PinturaControlListOption label{flex-direction:row-reverse}.pintura :global .PinturaRoot[dir=rtl] .PinturaUtilFooter .PinturaControlList .PinturaControlListOption label svg:not(:only-child),.pintura :global .PinturaRoot[dir=rtl] .PinturaUtilFooter .PinturaControlList [role=tab] button svg:not(:only-child){margin-right:-.25em;margin-left:.375em}.pintura :global .PinturaRangeInput{position:relative;display:flex;flex-direction:column;align-items:center;margin:auto;height:3.5em;max-width:24em;width:calc(100% - 2em);touch-action:none;--range-input-feather-left:2em;--range-input-feather-right:2em;--range-input-mask-from:0%;--range-input-mask-to:100%;--range-input-mask-color:rgba(0,0,0,0.25);--range-input-line-color:var(--color-foreground-15);outline:transparent}.pintura :global .PinturaRangeInput[data-focus-visible]:after{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);content:"";position:absolute;left:0;right:0;top:calc(50% - 1em);height:2em;border-radius:.25em}.pintura :global .PinturaRangeInputInner{position:relative;overflow:hidden;height:100%;width:100%;contain:strict;-webkit-mask:linear-gradient(90deg,transparent 0,#000 var(--range-input-feather-left),#000 calc(50% - 3em),transparent 50%,#000 calc(50% + 3em),#000 calc(100% - var(--range-input-feather-right)),transparent);mask:linear-gradient(90deg,transparent 0,#000 var(--range-input-feather-left),#000 calc(50% - 3em),transparent 50%,#000 calc(50% + 3em),#000 calc(100% - var(--range-input-feather-right)),transparent)}.pintura :global .PinturaRangeInputMeter{height:100%}.pintura :global .PinturaRangeInput .PinturaRangeInputMeter svg{display:block;pointer-events:none;fill:currentColor}.pintura :global .PinturaRangeInput>.PinturaRangeInputValue{position:absolute;z-index:1;pointer-events:none;top:calc(50% - .6875em);left:calc(50% - 1.75em);width:3.5em;height:1.5em;overflow:hidden;contain:strict;text-align:center;font-size:.75em;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";font-family:Tahoma,Geneva,Verdana,sans-serif}.pintura :global .PinturaRangeInput>.PinturaRangeInputReset{position:absolute;left:calc(50% - 1.0625em);top:0;margin-top:.125em;padding:0;z-index:1;width:2em;overflow:hidden;color:transparent!important;transition:opacity var(--transition-duration-25);opacity:.35;outline:transparent;cursor:var(--button-cursor)}.pintura :global .PinturaRangeInput>.PinturaRangeInputReset:hover{opacity:.5}.pintura :global .PinturaRangeInput>.PinturaRangeInputReset[data-focus-visible]{opacity:1}.pintura :global .PinturaRangeInput>.PinturaRangeInputReset[data-focus-visible]:before{content:"";pointer-events:none;position:absolute;left:calc(50% - .5em);top:calc(50% - .5em);height:1em;width:1em;z-index:2;border-radius:.25em;background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaRangeInput>.PinturaRangeInputReset[disabled]{opacity:.15}.pintura :global .PinturaRangeInput>.PinturaRangeInputReset:after{content:"";position:absolute;left:50%;top:20%;width:1px;height:60%;background:var(--color-foreground-100)}.pintura :global .PinturaRangeInputInner[data-value-limited] svg{-webkit-mask:linear-gradient(90deg,var(--range-input-mask-color) var(--range-mask-from),#000 var(--range-mask-from),#000 var(--range-mask-to),var(--range-input-mask-color) var(--range-mask-to));mask:linear-gradient(90deg,var(--range-input-mask-color) var(--range-mask-from),#000 var(--range-mask-from),#000 var(--range-mask-to),var(--range-input-mask-color) var(--range-mask-to))}.pintura :global .PinturaRangeInputInner[data-value-limited] svg rect{x:var(--range-mask-from);width:calc(var(--range-mask-to) - var(--range-mask-from));fill:var(--range-input-line-color)}.pintura :global .PinturaRadioGroup .PinturaRadioGroupOptions{display:flex;flex-direction:column}.pintura :global .PinturaRadioGroup .PinturaRadioGroupOptionGroup+.PinturaRadioGroupOptionGroup{margin-top:.5em}.pintura :global .PinturaRadioGroup .PinturaRadioGroupOption[data-hidden=true]{display:none}.pintura :global .PinturaRadioGroup[data-layout=row] .PinturaRadioGroupOptions{flex-direction:row}.pintura :global .PinturaRadioGroup label{-webkit-tap-highlight-color:transparent}.pintura :global .PinturaImageInfo{pointer-events:none}.pintura :global .PinturaImageInfo p{width:8em;height:1.25em;contain:strict;overflow:hidden;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";font-family:Tahoma,Geneva,Verdana,sans-serif;text-align:right;line-height:1;font-size:.75em}.pintura :global .PinturaPresetListFilter .PinturaRadioGroupOptions{justify-content:space-evenly;padding:.625em 0 .3125em}.pintura :global .PinturaPresetListFilter .PinturaRadioGroupOptions label{display:block;cursor:pointer}.pintura :global .PinturaPresetListFilter+.PinturaOptionsList{border-top-left-radius:0;border-top-right-radius:0}.pintura :global .PinturaToolbar{display:flex;justify-content:center;margin-left:1em;margin-right:1em}.pintura :global .PinturaToolbar .PinturaToolbarInner{display:inline-flex}.pintura :global .PinturaToolbar[data-layout=compact] .PinturaToolbarContentWide,.pintura :global .PinturaToolbar[data-overflow=overflow] .PinturaToolbarContentOptional{display:none}.pintura :global .PinturaToolbar .PinturaButton{border-radius:var(--border-radius-round);outline:transparent;padding:.3125em .75em;transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out,box-shadow var(--transition-duration-10) ease-out;line-height:1.1}.pintura :global .PinturaToolbar .PinturaButton:hover{box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaToolbar .PinturaButton[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaToolbar .PinturaButton .PinturaButtonIcon{width:1em}.pintura :global .PinturaToolbar .PinturaButtonLabel{font-size:.75em}.pintura :global .PinturaToolbar .PinturaPanel{z-index:3}.pintura :global .PinturaToolbar .PinturaToolbarInner>*{margin:0 .5em}.pintura :global .PinturaShapeStyleEditor{position:relative;display:grid;grid-template-columns:1fr}.pintura :global .PinturaShapeStyleEditor>div{grid-row-start:1;grid-column-start:1;max-width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center}.pintura :global .PinturaShapeStyleEditorOverflow>div{overflow:visible;justify-content:flex-start}.pintura :global .PinturaShapeStyleEditorOverflow .PinturaShapeStyleList{min-height:auto;margin-left:1em}.pintura :global .PinturaShapeStyleEditorOverflow .PinturaShapeStyle{--control-height:1.75em}.pintura :global .PinturaShapeStyles{position:relative}.pintura :global .PinturaShapeStyles:not([data-state~=overflows]){display:flex;justify-content:center}.pintura :global .PinturaShapeStyleList{display:flex}.pintura :global .PinturaShapeStyleList .PinturaButton,.pintura :global .PinturaShapeStyleList .PinturaInput{outline:transparent}.pintura :global .PinturaShapeStyleList .PinturaInput{padding:0 0 0 .625em;font-size:.75em;line-height:2.25}.pintura :global .PinturaShapeStyleList .PinturaShapeStyleLabel{line-height:1.75;font-size:.625em;font-weight:300;padding:0 .75em;text-transform:lowercase;pointer-events:none;text-align:center;color:var(--color-foreground-50);white-space:nowrap}.pintura :global .PinturaShapeStyleList .PinturaShapeStyle{border-radius:var(--border-radius-round)}.pintura :global .PinturaShapeStyleList .PinturaShapeStyle+.PinturaShapeStyle{margin-left:1em}.pintura :global .PinturaShapeStyle{display:flex;flex-direction:column;align-items:stretch;--control-height:1.5em}.pintura :global .PinturaShapeStyle .PinturaPanelButton{border-radius:inherit}.pintura :global .PinturaShapeStyle>.PinturaButton:hover,.pintura :global .PinturaShapeStyle>.PinturaButton[data-focus-visible]{position:relative;z-index:1}.pintura :global .PinturaShapeStyle .PinturaColorPickerButton .PinturaButtonLabel{display:block;border-radius:inherit}.pintura :global .PinturaShapeStyle .PinturaColorPickerButton{display:flex;justify-content:center}.pintura :global .PinturaShapeStyle .PinturaColorPreview{border-radius:inherit;width:1.5em;height:1.5em;background-color:#fff;background-size:4px}.pintura :global .PinturaShapeStyle .PinturaColorPreview span{border-radius:inherit;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaShapeStyle [data-focus-visible] .PinturaColorPreview span:before{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);content:"";z-index:1}.pintura :global .PinturaShapeStyle>.PinturaColorPickerButtonStroke .PinturaColorPreview{-webkit-mask:radial-gradient(circle,transparent 5.5px,#000 6px);mask:radial-gradient(circle,transparent 5.5px,#000 6px);-webkit-mask-size:cover;mask-size:cover}.pintura :global .PinturaShapeStyle>.PinturaColorPickerButtonStroke .PinturaColorPreview span:after{position:absolute;left:6px;top:6px;right:6px;bottom:6px;border-radius:inherit;box-shadow:0 0 0 1px var(--color-foreground-5);content:""}.pintura :global .PinturaShapeStyle>.PinturaSliderButton .PinturaButtonLabel,.pintura :global .PinturaShapeStyle>.PinturaSliderButton .PinturaButtonLabelPrefix{display:block;line-height:2.25;font-size:.6875em}.pintura :global .PinturaShapeStyle>.PinturaSliderButton .PinturaButtonLabelPrefix{color:var(--color-foreground-40);padding-left:.625em;margin-right:-.25em}.pintura :global .PinturaShapeStyle>.PinturaSliderButton .PinturaButtonLabel{padding:0 1em}.pintura :global .PinturaShapeStyle>.PinturaDropdownButton .PinturaButtonLabel,.pintura :global .PinturaShapeStyle>.PinturaRadioGroup .PinturaButtonLabel,.pintura :global .PinturaShapeStyle>.PinturaRadioGroupOption label{display:block;line-height:2.25;padding:0 1em;font-size:.6875em}.pintura :global .PinturaShapeStyle .PinturaButton:not(.PinturaColorPickerButton)[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaShapeStyle .PinturaInputField{padding:0 .75em;width:3em;height:2em;line-height:2em;box-shadow:inset 0 0 0 1px var(--color-foreground-5);border-radius:var(--border-radius)}.pintura :global .PinturaShapeStyle .PinturaPromptInputGroup{position:relative;display:flex;align-items:flex-start}.pintura :global .PinturaShapeStyle .PinturaPromptInputGroup .PinturaInput{width:18em;padding:0}.pintura :global .PinturaShapeStyle .PinturaPromptInputGroup .PinturaInput input{padding-right:2em}.pintura :global .PinturaShapeStyle .PinturaPromptInputGroup>.PinturaButton:not(.PinturaButtonIconOnly){display:block;line-height:2.125;margin-left:.5em;padding:0 1em;font-size:.6875em;box-shadow:inset 0 0 0 1px var(--color-foreground-5);background-color:var(--color-foreground-10);border-radius:var(--border-radius)}.pintura :global .PinturaShapeStyle .PinturaPromptInputGroup .PinturaButtonIconOnly{display:flex;justify-content:center;align-items:center;width:1.75em;height:1.75em;padding:0;box-shadow:inset 0 0 0 1px var(--color-foreground-5);border-radius:var(--border-radius)}.pintura :global .PinturaShapeStyle .PinturaPromptInputGroup .PinturaButtonIconOnly svg{width:.875em}.pintura :global .PinturaShapeStyle .PinturaPromptInputGroup .PinturaProgressIndicator{position:absolute;width:.875em;height:.875em;pointer-events:none}.pintura :global .PinturaShapeStyle .PinturaPromptInputGroup .PinturaProgressIndicator svg{width:.875em}.pintura :global .PinturaShapeStyle .PinturaPromptInputWrapper{position:relative;display:flex;align-items:center}.pintura :global .PinturaShapeStyle .PinturaPromptInputWrapper .PinturaProgressIndicator{right:.3125em}.pintura :global .PinturaShapeStyle .PinturaGenerateMoreButtonWrapper{position:relative;display:flex;align-items:center;justify-content:center;margin-top:.3125em;margin-left:.75em}.pintura :global .PinturaShapeStyle .PinturaPromptOptions{margin-left:.5em;display:flex;align-items:center}.pintura :global .PinturaShapeStyle .PinturaPromptOption{position:relative;padding:0;margin-left:.5em;border-radius:.5em}.pintura :global .PinturaShapeStyle .PinturaPromptOption:after,.pintura :global .PinturaShapeStyle .PinturaPromptOption img{border-radius:.5em;pointer-events:none}.pintura :global .PinturaShapeStyle .PinturaPromptOption:after{content:"";position:absolute;z-index:1;left:0;top:0;right:0;bottom:0;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaShapeStyle .PinturaPromptOption img{display:block;width:2.5em;height:2.5em;-o-object-fit:cover;object-fit:cover}.pintura :global .PinturaShapeStyle>.PinturaDropdownButton{box-shadow:inset 0 0 0 1px var(--color-foreground-5);transition:background-color var(--transition-duration-10)}.pintura :global .PinturaShapeStyle>.PinturaDropdownButton:hover{background-color:var(--color-foreground-10)}.pintura :global .PinturaShapeStyle>.PinturaDropdownButton .PinturaButtonLabel:after,.pintura :global .PinturaShapeStyle>.PinturaDropdownButton .PinturaComboBox:after{content:"▼";font-size:.6875em;margin-left:.75em;position:relative;top:-.125em;margin-right:-.25em;pointer-events:none}.pintura :global .PinturaShapeStyle>.PinturaDropdownButton .PinturaComboBox:after{top:0;margin-left:.375em;font-size:.47265625em}.pintura :global .PinturaShapeStyle .PinturaComboBox{padding-right:.75em}.pintura :global .PinturaShapeStyle .PinturaComboBox .PinturaInput{padding-left:0}.pintura :global .PinturaShapeStyle .PinturaComboBox .PinturaInput input{box-shadow:none}.pintura :global .PinturaShapeStyle .PinturaComboBox .PinturaInputField{padding-right:.375em}.pintura :global .PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions{flex-direction:row}.pintura :global .PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions label{cursor:var(--button-cursor);display:flex;height:var(--control-height);align-items:center;padding:0 .25em;box-shadow:inset 0 0 0 1px var(--color-foreground-5);transition:background-color var(--transition-duration-10)}.pintura :global .PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions label:hover{background-color:var(--color-foreground-20)}.pintura :global .PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions svg{width:1.125em;height:1.125em}.pintura :global .PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions .PinturaRadioGroupOption:first-of-type label{padding-left:.5em;border-top-left-radius:var(--border-radius-round);border-bottom-left-radius:var(--border-radius-round)}.pintura :global .PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions .PinturaRadioGroupOption:last-of-type label{padding-right:.5em;border-top-right-radius:var(--border-radius-round);border-bottom-right-radius:var(--border-radius-round)}.pintura :global .PinturaShapeStyle>.PinturaRadioGroup>.PinturaRadioGroupOptions [data-selected=true] label{background-color:var(--color-foreground-10)}.pintura :global .PinturaRoot[dir=rtl] .PinturaShapeStyle>.PinturaDropdownButton .PinturaButtonLabel:after,.pintura :global .PinturaRoot[dir=rtl] .PinturaShapeStyle>.PinturaDropdownButton .PinturaComboBox:after{margin-right:.75em;margin-left:-.25em}.pintura :global .PinturaRectManipulator{--size:1.25em;position:absolute;left:0;top:0;outline:none;touch-action:none;transform:translate3d(calc(var(--tx) * 1px),calc(var(--ty) * 1px),0) scale(var(--sx),var(--sy))}.pintura :global .PinturaRectManipulator:not([data-shape=edge]){width:var(--size);height:var(--size);z-index:2}.pintura :global .PinturaRectManipulator:not([data-shape=edge]):after{position:absolute;left:-.5em;right:-.5em;top:-.5em;bottom:-.5em;border-radius:inherit;content:""}.pintura :global .PinturaRectManipulator:not([data-shape=edge])[data-focus-visible]:after{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaRectManipulator[data-shape~=circle]{margin-left:calc(var(--size) * (-.5));margin-top:calc(var(--size) * (-.5));line-height:var(--size);border-radius:50%;background-color:var(--color-foreground-100);box-shadow:0 0 2px var(--color-background-50)}.pintura :global .PinturaRectManipulator[data-shape=hook]{border:3px solid var(--color-foreground-100)}.pintura :global .PinturaRectManipulator[data-shape=hook][data-direction*=t]{margin-top:-3px;border-bottom:0}.pintura :global .PinturaRectManipulator[data-shape=hook][data-direction*=r]{border-left:0;margin-left:calc(var(--size) * (-1))}.pintura :global .PinturaRectManipulator[data-shape=hook][data-direction*=b]{margin-top:calc(var(--size) * (-1));border-top:0}.pintura :global .PinturaRectManipulator[data-shape=hook][data-direction*=l]{border-right:0;margin-left:-3px}.pintura :global .PinturaRectManipulator[data-shape~=edge]{height:1px;width:1px;z-index:1}.pintura :global .PinturaRectManipulator[data-shape~=edge][data-focus-visible]{background-color:var(--color-focus-50)}.pintura :global .PinturaRectManipulator[data-direction=b],.pintura :global .PinturaRectManipulator[data-direction=t]{cursor:ns-resize;height:var(--size);margin-top:calc(var(--size) * (-.5));transform-origin:0 center}.pintura :global .PinturaRectManipulator[data-direction=l],.pintura :global .PinturaRectManipulator[data-direction=r]{cursor:ew-resize;width:var(--size);margin-left:calc(var(--size) * (-.5));transform-origin:center 0}.pintura :global .PinturaRectManipulator[data-direction=bl],.pintura :global .PinturaRectManipulator[data-direction=tr]{cursor:nesw-resize}.pintura :global .PinturaRectManipulator[data-direction=br],.pintura :global .PinturaRectManipulator[data-direction=tl]{cursor:nwse-resize}.pintura :global .PinturaRoot[data-env~=pointer-coarse] .PinturaRectManipulator[data-shape=edge]:active{background-color:var(--color-foreground-5)}.pintura :global .PinturaRoot[data-env~=pointer-coarse] .PinturaRectManipulator:not([data-shape=edge]):after{left:-1em;right:-1em;top:-1em;bottom:-1em}.pintura :global .PinturaRoot[data-env~=pointer-coarse] .PinturaRectManipulator:not([data-shape=edge]):active:after{background-color:var(--color-foreground-5)}.pintura :global .PinturaRoot[data-env*=chrome-] .PinturaRectManipulator{transform:translate3d(calc(var(--tx) * 1px),calc(var(--ty) * 1px),0)}.pintura :global .PinturaRoot[data-env*=chrome-] .PinturaRectManipulator[data-direction=b],.pintura :global .PinturaRoot[data-env*=chrome-] .PinturaRectManipulator[data-direction=t]{width:calc(var(--sx) * 1px)}.pintura :global .PinturaRoot[data-env*=chrome-] .PinturaRectManipulator[data-direction=l],.pintura :global .PinturaRoot[data-env*=chrome-] .PinturaRectManipulator[data-direction=r]{height:calc(var(--sy) * 1px)}.pintura :global .PinturaImageButtonList,.pintura :global .PinturaImageButtonList>li{display:flex;align-items:center}.pintura :global .PinturaImageButtonList>li{--thumb-size:1.75em;--thumb-radius:0.3125em;--thumb-margin:0.3125em;justify-content:center;position:relative}.pintura :global .PinturaImageButtonList>li+li{margin-left:.5em}.pintura :global .PinturaRoot .PinturaImageButton{--thumb-size:1.75em;--thumb-radius:0.3125em;--thumb-margin:0.3125em;padding:var(--thumb-margin);border-radius:var(--border-radius);box-shadow:inset 0 0 0 1px var(--color-foreground-5);cursor:var(--button-cursor);outline:transparent}.pintura :global .PinturaRoot .PinturaImageButton>*{pointer-events:none}.pintura :global .PinturaRoot .PinturaImageButton{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:filter var(--transition-duration-25) ease-out}.pintura :global .PinturaRoot .PinturaImageButton[disabled]{filter:var(--filter-disabled)}.pintura :global .PinturaRoot .PinturaImageButton:hover{background-color:var(--color-foreground-10)}.pintura :global .PinturaRoot .PinturaImageButton text{font-family:monospace}.pintura :global .PinturaRoot .PinturaImageButton img,.pintura :global .PinturaRoot .PinturaImageButton svg{display:block;width:var(--thumb-size);height:var(--thumb-size);min-width:auto;max-width:none;-o-object-fit:cover;object-fit:cover;border-radius:var(--thumb-radius)}.pintura :global .PinturaRoot .PinturaImageButton[data-loader]:after,.pintura :global .PinturaRoot .PinturaImageButton[data-loader]:before{display:block;width:var(--thumb-size);height:var(--thumb-size);line-height:var(--thumb-size);border-radius:var(--thumb-radius)}.pintura :global .PinturaRoot .PinturaImageButton[data-error] img{display:none}.pintura :global .PinturaRoot .PinturaImageButton[data-error]:after{content:"⚠";box-shadow:inset 0 0 0 1px var(--color-error-75);background-color:var(--color-error-10);color:var(--color-error-75)}.pintura :global .PinturaRoot .PinturaImageButton[data-loader]{position:relative}.pintura :global .PinturaRoot .PinturaImageButton[data-loader]:before :local{content:"";position:absolute;left:var(--thumb-margin);top:var(--thumb-margin);-webkit-animation:pintura-img-loading calc(var(--transition-duration-multiplier, 0) * 1s) infinite alternate ease-in-out;animation:pintura-img-loading calc(var(--transition-duration-multiplier, 0) * 1s) infinite alternate ease-in-out;background-color:var(--color-foreground-10);transition:transform calc(var(--transition-duration-multiplier, 0) * .5s) ease-in;z-index:-1}.pintura :global .PinturaRoot .PinturaImageButton[data-loader] img{opacity:0;transition:opacity calc(var(--transition-duration-multiplier, 0) * .35s) ease-out}.pintura :global .PinturaRoot .PinturaImageButton[data-loader][data-load] img{opacity:1}.pintura :global .PinturaRoot .PinturaImageButton[data-loader][data-error]:before,.pintura :global .PinturaRoot .PinturaImageButton[data-loader][data-load]:before{-webkit-animation-play-state:paused;animation-play-state:paused;transform:scale(.5)}@-webkit-keyframes pintura-img-loading{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}@keyframes pintura-img-loading{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.pintura :global .PinturaShorthandControl{flex-direction:row;padding-left:.25em;box-shadow:inset 0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaShorthandControl>.PinturaSliderButton+.PinturaSliderButton{border-left:1px solid var(--color-foreground-5);border-radius:0}.pintura :global .PinturaShorthandControl .PinturaSliderButton .PinturaButtonLabel{padding:0 .5em}.pintura :global .PinturaShorthandControl .PinturaColorPreview{width:1em;height:1em;margin-right:.25em;margin-top:.25em}.pintura :global .PinturaPanel.PinturaSliderPanel{border-radius:var(--border-radius-round)}.pintura :global .PinturaPercentageLabel{font-variant-numeric:tabular-nums;min-width:3em;text-align:center}.pintura :global .PinturaSliderPanel .PinturaSlider{width:10em;--knob-size:0.75em;--knob-margin-left:0.3125em;--knob-margin-right:0.3125em}.pintura :global .PinturaSliderPanel .PinturaSliderTrack{background-color:var(--color-foreground-10)}.pintura :global .PinturaSliderPanel .PinturaSliderKnob{background-color:var(--color-foreground-100);box-shadow:0 .125em .25em rgba(0,0,0,.35),0 -.125em .25em rgba(0,0,0,.1)}.pintura :global .PinturaInput{display:flex;flex-direction:row}.pintura :global .PinturaInput input[disabled]{filter:var(--filter-disabled)}.pintura :global .PinturaInputField{flex:1;outline:transparent}.pintura :global .PinturaInputField[type=number]{-moz-appearance:textfield}.pintura :global .PinturaInputField[type=number]::-webkit-inner-spin-button,.pintura :global .PinturaInputField[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.pintura :global .PinturaInputSpinners{display:flex;flex-direction:column;justify-content:space-evenly;align-items:center}.pintura :global .PinturaInputSpinners button{line-height:1!important;width:2em;font-size:.5em!important;outline:transparent}.pintura :global .PinturaShapePresetsPalette{text-align:center;width:40em;max-width:100%;overflow:hidden}.pintura :global .PinturaShapePresetsPalette .PinturaShapePresetSelect{vertical-align:top;display:inline-block}.pintura :global .PinturaShapePresetsPalette .PinturaScrollable:not([data-state~=overflows]){display:flex;justify-content:center}.pintura :global .PinturaShapePresetsPalette .PinturaButton+.PinturaButton{margin-left:.5em}.pintura :global .PinturaShapePresetsPalette .PinturaButton{flex-direction:row;line-height:1.1;padding:.3125em .75em;border-radius:var(--border-radius-round);box-shadow:inset 0 0 0 1px var(--color-foreground-5);cursor:var(--button-cursor);transition:background-color var(--transition-duration-10) ease-out,color var(--transition-duration-10) ease-out,box-shadow var(--transition-duration-10) ease-out;outline:none}.pintura :global .PinturaShapePresetsPalette .PinturaButton .PinturaButtonIcon{width:1em}.pintura :global .PinturaShapePresetsPalette .PinturaButton .PinturaButtonLabel{font-size:.75em}.pintura :global .PinturaShapePresetsPalette .PinturaButton:hover{box-shadow:inset 0 0 0 1px var(--color-foreground-10)}.pintura :global .PinturaShapePresetsPalette .PinturaButton[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaShapePresetsPalette .PinturaShapePresetsFlat>*+*,.pintura :global .PinturaShapePresetsPalette .PinturaShapePresetsGroups>*+*,.pintura :global .PinturaShapePresetsPalette .PinturaShapePresetsGroups>div>*+*{margin-left:.5em}.pintura :global .PinturaShapePresetsGroups{display:flex}.pintura :global .PinturaShapePresetsGrouped{display:flex;flex-direction:column;align-items:center}.pintura :global .PinturaShapePresetsGrouped [role=tab]{white-space:nowrap}.pintura :global .PinturaShapePresetsFlat{display:flex;align-items:center;justify-content:center}.pintura :global .PinturaShapePresetsFlat>.PinturaButton{margin-left:1em}.pintura :global .PinturaShapeList{pointer-events:none;opacity:0;transition:opacity var(--transition-duration-10) ease-in-out;position:absolute;top:1em;left:1em;width:-webkit-max-content;width:-moz-max-content;width:max-content;z-index:1;border-radius:var(--border-radius);color:var(--color-foreground-100);background:var(--color-background-70);box-shadow:0 0 0 1px var(--color-foreground-5)}.pintura :global .PinturaShapeList li+li{margin-top:-.3125em}.pintura :global .PinturaShapeList[data-visible=true]{opacity:1}.pintura :global .PinturaShapeList .PinturaColorPreview{width:.75em;height:.75em;margin-right:.25em;border-radius:.25em}.pintura :global .PinturaShapeList .PinturaShapeListItem{display:flex;align-items:center;padding:.25em .5em;outline:none}.pintura :global .PinturaShapeList .PinturaShapeListItem>span{font-size:.75em;line-height:1.75;padding:0 .325em;margin-left:-.325em}.pintura :global .PinturaShapeList .PinturaShapeListItem[data-focus-visible]>span{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaShapeList[data-visible=true] .PinturaShapeListItem{pointer-events:all}.pintura :global .PinturaShapeEditor{height:100%;width:100%;outline:none;touch-action:none}.pintura :global .PinturaShapeControls{position:absolute!important;left:0;top:0;z-index:3;pointer-events:none;display:flex;align-items:center}.pintura :global .PinturaShapeControlsGroup{pointer-events:all;color:#eee;background:#222;box-shadow:0 .125em .25em rgba(0,0,0,.25);border-radius:.25em}.pintura :global .PinturaShapeControlsGroup,.pintura :global .PinturaShapeControlsGroup .PinturaShapeControlsGroupToggle{display:inline-flex;min-height:1.75em}.pintura :global .PinturaShapeControlsGroup+.PinturaShapeControlsGroup{margin-left:.5em}.pintura :global .PinturaShapeControlsGroup .PinturaShapeControlsGroupToggle{position:relative}.pintura :global .PinturaShapeControlsGroup .PinturaButton{outline:transparent}.pintura :global .PinturaShapeControlsGroup .PinturaButton[data-focus-visible]{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaShapeControlsGroup .PinturaButton[disabled]>span{opacity:.5;pointer-events:all;cursor:not-allowed}.pintura :global .PinturaShapeControlsGroup>.PinturaButton{display:block;font-weight:700;transition:background-color var(--transition-duration-10);outline:transparent}.pintura :global .PinturaShapeControlsGroup>.PinturaButton:hover{background-color:hsla(0,0%,100%,.15)}.pintura :global .PinturaShapeControlsGroup>.PinturaButton .PinturaButtonLabel{display:block;font-size:.6875em;padding:0 .75em;line-height:1.7em}.pintura :global .PinturaShapeControlsGroup .PinturaButtonIconOnly{width:1.75em;transition:background-color var(--transition-duration-10)}.pintura :global .PinturaShapeControlsGroup .PinturaButtonIconOnly:hover{background-color:hsla(0,0%,100%,.15)}.pintura :global .PinturaShapeControlsGroup>button:first-of-type{border-radius:.25em 0 0 .25em}.pintura :global .PinturaShapeControlsGroup>button:last-of-type{border-radius:0 .25em .25em 0}.pintura :global .PinturaShapeControlsGroup>button:only-of-type{border-radius:.25em}.pintura :global .PinturaShapeControlsGroup>*+*{border-left:1px solid rgba(0,0,0,.5)}.pintura :global .PinturaShapeControlsGroup svg{pointer-events:none}.pintura :global .PinturaInlineInput{position:absolute;left:0;top:0;margin:0;padding:0;transform-origin:center;display:flex}.pintura :global .PinturaInlineInput:before{content:"";width:0;height:var(--line-height)}.pintura :global .PinturaContentEditable{margin:0;padding:0;width:calc(100% / var(--font-scalar));height:calc((100% / var(--font-scalar)) - var(--bottom-inset, 0));overflow:hidden;outline:none;vertical-align:top}.pintura :global .PinturaOptionsList,.pintura :global .PinturaOptionsListWrapper{border-radius:inherit}.pintura :global .PinturaOptionsList .PinturaListOption{transition:background-color var(--transition-duration-10);border-radius:inherit}.pintura :global .PinturaOptionsList .PinturaListOption label{display:block;margin:0;border-radius:inherit;white-space:nowrap}.pintura :global .PinturaOptionsList .PinturaListOption svg{margin-right:.25em;margin-left:-.5em;min-width:1.5em}.pintura :global .PinturaOptionsList .PinturaListOption svg:only-child{margin-left:0;margin-right:0}.pintura :global .PinturaOptionsList .PinturaListOption [slot]{display:flex;align-items:center;padding:.325em .75em}.pintura :global .PinturaOptionsList .PinturaDropdownOptionLabel{font-size:.75em;line-height:1.75;padding:0 .325em;margin-left:-.325em;display:inline-flex;flex-direction:column}.pintura :global .PinturaOptionsList .PinturaDropdownOptionSublabel{font-size:.75em;opacity:.5;margin-top:-.5em}.pintura :global .PinturaOptionsList .PinturaListOptionGroup>span{display:block;padding:.75em 1em;text-transform:uppercase;font-size:.75em;color:var(--color-foreground-50)}.pintura :global .PinturaOptionsList [data-disabled=true]{color:var(--color-foreground-50)}.pintura :global .PinturaOptionsList [data-selected=false]:not([data-disabled=true]):hover{background-color:var(--color-foreground-10)}.pintura :global .PinturaOptionsList [data-selected=true]{color:var(--color-foreground-100);background-color:var(--color-foreground-20)}.pintura :global .PinturaOptionsList [data-focus-visible]+label .PinturaDropdownOptionLabel{background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);border-radius:.25em}.pintura :global .PinturaListOption label{margin:0}.pintura :global .PinturaRoot[dir=rtl] .PinturaDropdownOptionLabel{margin-right:-.325em;align-items:flex-end}.pintura :global .PinturaRoot[dir=rtl] .PinturaListOption svg{margin-left:-.5em;margin-right:auto}.pintura :global .PinturaRoot[dir=rtl] .PinturaListOption svg+span{margin-left:.25em}.pintura :global .PinturaRoot[dir=rtl] .PinturaListOption [slot]{justify-content:flex-end}.pintura :global .PinturaColorPickerPanel{padding:.5em;max-width:14em;overflow:visible;touch-action:none}.pintura :global .PinturaColorPickerPanel .PinturaColorPickerButton{outline:transparent}.pintura :global .PinturaColorPickerPanel .PinturaColorPickerButton[data-focus-visible]{box-shadow:inset 0 0 0 1px var(--color-foreground-70)}.pintura :global .PinturaColorPickerPanel .PinturaColorPreview{width:1.25em;height:1.25em;border-radius:.25em}.pintura :global .PinturaColorPickerPanel .PinturaColorPreview span{border-radius:.2em;box-shadow:inset 0 0 0 1px var(--color-foreground-20)}.pintura :global .PinturaColorPickerPanel .PinturaColorPresets legend{color:var(--color-foreground-50);margin:0 0 .25em .3125em;font-size:.75em}.pintura :global .PinturaColorPickerPanel .PinturaColorPresets:only-child legend{display:none}.pintura :global .PinturaColorPickerPanel .PinturaColorPresetsGrid .PinturaRadioGroupOptions{display:flex;flex-direction:row;flex-wrap:wrap}.pintura :global .PinturaColorPickerPanel .PinturaColorPresetsGrid .PinturaListOption{display:block;padding:.25em}.pintura :global .PinturaColorPickerPanel .PinturaColorPresetsGrid .PinturaListOption label,.pintura :global .PinturaColorPickerPanel .PinturaColorPresetsGrid .PinturaListOption label span{display:block;cursor:var(--button-cursor)}.pintura :global .PinturaColorPickerPanel .PinturaColorPresetsGrid input[data-focus-visible]+label .PinturaColorPreview:after{position:absolute;left:-.3125em;right:-.3125em;top:-.3125em;bottom:-.3125em;border-radius:inherit;pointer-events:none;content:"";background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaColorPickerPanel .PinturaSlider{margin-left:-.325em;margin-right:-.325em}.pintura :global .PinturaColorPickerPanel .PinturaSlider>.PinturaSliderControl{position:relative;z-index:2}.pintura :global .PinturaColorPickerPanel .PinturaPicker{width:100%}.pintura :global .PinturaColorPickerPanel .PinturaPicker+.PinturaColorPresets{margin-top:.5em}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaPickerKnob,.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaSliderKnob{border-radius:9999em;box-shadow:inset 0 .06125em .06125em rgba(0,0,0,.1),0 0 0 .06125em #fff,0 .1875em .25em rgba(0,0,0,.35),0 -.125em .25em rgba(0,0,0,.1)}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaPickerKnob{pointer-events:none;position:absolute;z-index:1;left:0;top:0;margin-left:-.625em;margin-top:-.625em;width:1.25em;height:1.25em;visibility:visible;outline:none}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaPickerKnob[data-focus-visible]:after{position:absolute;left:-.3125em;right:-.3125em;top:-.3125em;bottom:-.3125em;border-radius:inherit;pointer-events:none;content:"";background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaPickerKnobController{position:absolute;left:0;top:0;right:0;bottom:0;visibility:hidden}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaSaturationPicker{position:relative;border-radius:var(--border-radius) var(--border-radius) 0 0;margin:-.5em -.5em .5em;height:7em;background-image:linear-gradient(180deg,transparent,#000),linear-gradient(90deg,#fff,transparent)}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaHuePicker .PinturaSliderTrack{background-image:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaSliderTrack{box-shadow:inset 0 0 1px var(--color-foreground-50)}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaOpacityPicker .PinturaSliderKnob:before,.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaOpacityPicker .PinturaSliderTrack:before{position:absolute;content:"";display:block;left:0;top:0;width:100%;height:100%;z-index:-1;border-radius:inherit;background-color:#fff;background-image:var(--pattern-transparent)}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaOpacityPicker .PinturaSliderKnob:before{background-position:calc(var(--slider-position) * -2px) 0}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaOpacityPicker{margin-top:.5em}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaColorPickerInput{color:var(--color-foreground-80);margin:.75em 0 .25em .3125em;width:calc(100% - .625em);line-height:1.75;text-indent:.5em;font-size:.875em;border-radius:.25em;border:1px solid var(--color-foreground-20);font-variant:tabular-nums;text-transform:uppercase}.pintura :global .PinturaColorPickerPanel .PinturaPicker .PinturaColorPickerInput:focus{outline:transparent;border-color:var(--color-focus-100)}.pintura :global .PinturaPanel{--color-inset:hsla(0,0%,100%,0.1);--color-fill:var(--color-foreground-5);top:0;left:0;z-index:2147483647;width:-webkit-max-content;width:-moz-max-content;width:max-content;cursor:auto;outline:transparent;box-shadow:inset 0 0 0 1px var(--color-inset),0 .125em .25em rgba(0,0,0,.25),0 .125em .75em rgba(0,0,0,.15),0 .125em .125em rgba(0,0,0,.1);border-radius:var(--border-radius)}.pintura :global .PinturaPanel,.pintura :global .PinturaPanelTip{position:absolute;color:var(--color-foreground-90);background-color:var(--color-background-100);background-image:linear-gradient(var(--color-fill),var(--color-fill));background-blend-mode:screen}.pintura :global .PinturaPanelTip{--tip-mask:transparent calc(50% - 1.5px),#000 calc(50% - 1.5px);width:.5em;height:.5em;margin-left:-.25em;margin-top:-.25em;z-index:-1;box-shadow:inset -1px -1px 0 0 var(--color-inset);-webkit-mask:linear-gradient(to bottom right,var(--tip-mask));mask:linear-gradient(to bottom right,var(--tip-mask))}.pintura :global .PinturaPanelTip[style*="top:0"]{box-shadow:inset 1px 1px 0 0 var(--color-inset);-webkit-mask:linear-gradient(to top left,var(--tip-mask));mask:linear-gradient(to top left,var(--tip-mask))}.pintura :global .PinturaColorPreview{--color:transparent;color:var(--color);position:relative;pointer-events:none;background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h4v4H0zm4 4h4v4H4z' fill='%23E5E5E5'/%3E%3C/svg%3E")}.pintura :global .PinturaColorPreview span{position:absolute;left:0;top:0;right:0;bottom:0;background-color:var(--color);border-radius:inherit}.pintura :global .PinturaContentEditable{white-space:pre-line!important;word-break:break-word!important;display:inline-block!important;-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.pintura :global .PinturaContentEditable[data-wrap-content=nowrap]{white-space:nowrap!important;word-break:normal!important}.pintura :global .PinturaContentEditable{background:transparent!important;margin:0!important;border-radius:0!important;max-width:none!important;min-width:auto!important;box-shadow:none!important}.pintura :global .PinturaSlider{position:relative;--track-offset-x:0.5em;--track-offset-y:0.5em;--track-size:1.5em;--knob-size:1em;--knob-margin-top:0em;--knob-margin-right:0em;--knob-margin-bottom:0em;--knob-margin-left:0em;display:flex;align-items:center;touch-action:none}.pintura :global .PinturaSlider[data-direction=y]{flex-direction:column}.pintura :global .PinturaSlider .PinturaSliderControl{position:relative;flex:1}.pintura :global .PinturaSlider>button{position:relative;z-index:1;width:var(--track-size);height:var(--track-size);overflow:hidden;cursor:pointer;flex-shrink:none}.pintura :global .PinturaSlider>button svg{width:1.25em;height:1.25em;margin:.125em;stroke-width:.125em;stroke:var(--color-foreground-50)}.pintura :global .PinturaSlider>button:first-of-type{order:2;padding-right:.125em;margin-left:-.325em}.pintura :global .PinturaSlider>button:last-of-type{order:1;padding-left:.125em;margin-right:-.325em}.pintura :global .PinturaSlider>.PinturaSliderControl{order:2}.pintura :global .PinturaSlider .PinturaSliderKnob{left:0;top:50%;border-radius:9999em;visibility:visible;width:var(--knob-size);height:var(--knob-size);margin-left:calc(var(--knob-size) * -.5);margin-top:calc(var(--knob-size) * -.5)}.pintura :global .PinturaSlider .PinturaSliderKnob,.pintura :global .PinturaSlider .PinturaSliderKnobController,.pintura :global .PinturaSlider .PinturaSliderTrack{pointer-events:none;position:absolute}.pintura :global .PinturaSlider .PinturaSliderTrack{top:var(--track-offset-y);bottom:var(--track-offset-y);left:var(--track-offset-x);right:var(--track-offset-x)}.pintura :global .PinturaSlider .PinturaSliderKnobController{visibility:hidden;top:calc(var(--track-offset-y) + var(--knob-margin-top));bottom:calc(var(--track-offset-y) + var(--knob-margin-bottom));left:calc(var(--track-offset-x) + var(--knob-margin-left));right:calc(var(--track-offset-x) + var(--knob-margin-right))}.pintura :global .PinturaSlider .PinturaSliderTrack{border-radius:9999em}.pintura :global .PinturaSlider[data-direction=x] input[type=range]{height:var(--track-size);margin-left:var(--track-offset-x);width:calc(100% - (var(--track-offset-x) * 2))}.pintura :global .PinturaSlider[data-direction=y] input[type=range]{width:var(--track-size);margin-top:var(--track-offset-y);height:calc(100% - (var(--track-offset-y) * 2))}.pintura :global .PinturaSlider input[type=range]{-webkit-appearance:none;display:block}.pintura :global .PinturaSlider input[type=range]::-webkit-slider-runnable-track{background:transparent}.pintura :global .PinturaSlider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;line-height:0;margin:0;padding:0;border:none}.pintura :global .PinturaSlider input[type=range]::-moz-range-thumb{line-height:0;margin:0;padding:0;border:none;visibility:hidden}.pintura :global .PinturaSlider input[type=range]::-ms-thumb{line-height:0;margin:0;padding:0;border:none}.pintura :global .PinturaSlider input[type=range]::-ms-ticks-before,.pintura :global .PinturaSlider input[type=range]::-ms-tooltip{display:none}.pintura :global .PinturaSlider input[type=range]::-ms-ticks-after{display:none}.pintura :global .PinturaSlider input[type=range]::-ms-track{color:transparent;border:none;background:transparent}.pintura :global .PinturaSlider input[type=range]::-ms-fill-lower,.pintura :global .PinturaSlider input[type=range]::-ms-fill-upper{background:transparent}.pintura :global .PinturaSlider input[type=range]:focus{outline:transparent}.pintura :global .PinturaSlider input[type=range][data-focus-visible]~.PinturaSliderKnobController .PinturaSliderKnob:after{position:absolute;left:-.3125em;right:-.3125em;top:-.3125em;bottom:-.3125em;border-radius:inherit;content:"";background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100);pointer-events:none}.pintura :global .PinturaShapeManipulator{position:absolute;left:0;top:0;outline:none;touch-action:none;transform:translate3d(calc(var(--tx) * 1px),calc(var(--ty) * 1px),0) rotate(var(--r)) scale(var(--sx),var(--sy));--size:0.75em}.pintura :global .PinturaShapeManipulator:not([data-control=edge]){margin-left:calc(var(--size) * (-.5));margin-top:calc(var(--size) * (-.5));line-height:var(--size);width:var(--size);height:var(--size);border-radius:9999em}.pintura :global .PinturaShapeManipulator:not([data-control=edge]):after{position:absolute;left:-.5em;right:-.5em;top:-.5em;bottom:-.5em;content:""}.pintura :global .PinturaShapeManipulator:not([data-control=edge])[data-focus-visible]:after{border-radius:inherit;background-color:var(--color-focus-50);box-shadow:inset 0 0 0 1px var(--color-focus-100)}.pintura :global .PinturaShapeManipulator[data-control=point]{background:linear-gradient(90deg,var(--color-secondary-dark),var(--color-secondary));box-shadow:0 0 0 2px #fff,0 0 4px #000;z-index:3}.pintura :global .PinturaShapeManipulator[data-control=edge]{margin-top:calc(var(--size) * (-.5));height:var(--size);width:1px;z-index:1;transform-origin:0 calc(var(--size) * .5)}.pintura :global .PinturaShapeManipulator[data-control=edge][data-focus-visible]{background-color:var(--color-focus-50)}.pintura :global .PinturaShapeManipulator[data-control=rotate]{border-radius:9999em;background:linear-gradient(90deg,#fff,#ddd);box-shadow:0 0 0 2px var(--color-secondary-dark),0 0 4px #000;z-index:2;cursor:-webkit-grab;cursor:grab}.pintura :global .PinturaRoot[data-env*=chrome-] .PinturaShapeManipulator[data-control=edge]{width:calc(var(--sx) * 1px);transform:translate3d(calc(var(--tx) * 1px),calc(var(--ty) * 1px),0) rotate(var(--r))}.pintura :global{display:block;height:100%} \ No newline at end of file diff --git a/src/components/@pqina/react-pintura/.prettierrc b/src/components/@pqina/react-pintura/.prettierrc new file mode 100644 index 0000000..678c5ff --- /dev/null +++ b/src/components/@pqina/react-pintura/.prettierrc @@ -0,0 +1,7 @@ +{ + "trailingComma": "es5", + "tabWidth": 4, + "printWidth": 100, + "singleQuote": true, + "semi": true +} diff --git a/src/components/@pqina/react-pintura/PinturaEditor.js b/src/components/@pqina/react-pintura/PinturaEditor.js new file mode 100644 index 0000000..82c4c2e --- /dev/null +++ b/src/components/@pqina/react-pintura/PinturaEditor.js @@ -0,0 +1,43 @@ +import React from 'react'; + +import { appendEditor } from '../../@pqina/pintura'; +import { sub, unsub } from './events'; + +class PinturaEditor extends React.Component { + constructor(props) { + super(props); + this.elementRef = React.createRef(); + this.editor = undefined; + } + + componentDidMount() { + if (!this.elementRef.current) return; + const props = { ...this.props }; + this.editor = appendEditor(this.elementRef.current, props); + sub(this, props); + } + + componentDidUpdate() { + const props = { ...this.props }; + Object.assign(this.editor, props); + sub(this, props); + } + + componentWillUnmount() { + if (!this.editor) return; + unsub(this); + this.editor.destroy(); + this.editor = undefined; + } + + render() { + return React.createElement('div', { + className: `PinturaRootWrapper ${ + this.props.className ? this.props.className : '' + }`.trim(), + ref: this.elementRef, + }); + } +} + +export default PinturaEditor; diff --git a/src/components/@pqina/react-pintura/PinturaEditorModal.js b/src/components/@pqina/react-pintura/PinturaEditorModal.js new file mode 100644 index 0000000..07025be --- /dev/null +++ b/src/components/@pqina/react-pintura/PinturaEditorModal.js @@ -0,0 +1,51 @@ +import React from 'react'; + +import { openEditor } from '../../@pqina/pintura'; +import { sub, unsub } from './events'; + +class PinturaEditorModal extends React.Component { + constructor(props) { + super(props); + this.editor = undefined; + } + + componentDidMount() { + // We'll wrap the module in a container so we can use the container as a CSS module target + this.el = document.createElement('div'); + if (this.props.className) this.el.className = this.props.className; + document.body.append(this.el); + + // Create editor and proxy events + const props = { ...this.props }; + this.editor = openEditor({ ...props, enableAutoDestroy: false }, this.el); + sub(this, props); + } + + componentDidUpdate() { + const props = { ...this.props }; + Object.assign(this.editor, props); + sub(this, props); + } + + componentWillUnmount() { + if (!this.editor) return; + unsub(this); + this.editor.destroy(); + this.editor = undefined; + this.el.remove(); + } + + show() { + this.editor.show(); + } + + hide() { + this.editor.hide(); + } + + render() { + return null; + } +} + +export default PinturaEditorModal; diff --git a/src/components/@pqina/react-pintura/PinturaEditorOverlay.js b/src/components/@pqina/react-pintura/PinturaEditorOverlay.js new file mode 100644 index 0000000..163a5ff --- /dev/null +++ b/src/components/@pqina/react-pintura/PinturaEditorOverlay.js @@ -0,0 +1,43 @@ +import React from 'react'; + +import { overlayEditor } from '../../@pqina/pintura'; +import { sub, unsub } from './events'; + +class PinturaEditorOverlay extends React.Component { + constructor(props) { + super(props); + this.elementRef = React.createRef(); + this.editor = undefined; + } + + componentDidMount() { + if (!this.elementRef.current) return; + const props = { ...this.props }; + this.editor = overlayEditor(this.elementRef.current, props); + sub(this, props); + } + + componentDidUpdate() { + const props = { ...this.props }; + Object.assign(this.editor, props); + sub(this, props); + } + + componentWillUnmount() { + if (!this.editor) return; + unsub(this); + this.editor.destroy(); + this.editor = undefined; + } + + render() { + return React.createElement('div', { + className: `PinturaRootWrapper ${ + this.props.className ? this.props.className : '' + }`.trim(), + ref: this.elementRef, + }); + } +} + +export default PinturaEditorOverlay; diff --git a/src/components/@pqina/react-pintura/README.md b/src/components/@pqina/react-pintura/README.md new file mode 100644 index 0000000..d0241d4 --- /dev/null +++ b/src/components/@pqina/react-pintura/README.md @@ -0,0 +1,10 @@ +# Pintura React Components + +This package exports a selection of React components to make it easier to use Pintura with React. + +Visit https://pqina.nl/pintura for more details. + +React example projects: + +- https://github.com/pqina/pintura-example-react +- https://github.com/pqina/pintura-example-nextjs diff --git a/src/components/@pqina/react-pintura/events.js b/src/components/@pqina/react-pintura/events.js new file mode 100644 index 0000000..e7a937c --- /dev/null +++ b/src/components/@pqina/react-pintura/events.js @@ -0,0 +1,25 @@ +const isEvent = (key) => /^on[A-Z]/.test(key); + +const getEventsFromProps = (props) => Object.keys(props).filter(isEvent).map(getEventFromKey); + +const getEventFromKey = (key) => key.substr(2).toLowerCase(); + +export const unsub = (component, events = undefined) => { + (component.unsubs || []) + // events not supplied, or event is in events list + .filter(([event]) => !events || events.includes(event)) + .forEach(([, unsub]) => unsub()); +}; + +export const sub = (component, props) => { + // unsub existing subscriptions + unsub(component, getEventsFromProps(props)); + + // subscribe + component.unsubs = Object.keys(props) + .filter(isEvent) + .map((key) => { + const type = getEventFromKey(key); + return [type, component.editor.on(type, props[key])]; + }); +}; diff --git a/src/components/@pqina/react-pintura/index.js b/src/components/@pqina/react-pintura/index.js new file mode 100644 index 0000000..73c5e02 --- /dev/null +++ b/src/components/@pqina/react-pintura/index.js @@ -0,0 +1,3 @@ +export { default as PinturaEditor } from './PinturaEditor'; +export { default as PinturaEditorModal } from './PinturaEditorModal'; +export { default as PinturaEditorOverlay } from './PinturaEditorOverlay'; diff --git a/src/components/@pqina/react-pintura/package.json b/src/components/@pqina/react-pintura/package.json new file mode 100644 index 0000000..2633d28 --- /dev/null +++ b/src/components/@pqina/react-pintura/package.json @@ -0,0 +1,15 @@ +{ + "version": "9.0.3", + "name": "@pqina/react-pintura", + "description": "Pintura Image Editor Components for use with React", + "author": "Rik Schennink at PQINA", + "homepage": "https://pqina.nl/pintura/", + "license": "https://pqina.nl/pintura/license/", + "browser": "index.js", + "main": "index.js", + "module": "index.js", + "types": "react-pintura.d.ts", + "peerDependencies": { + "@pqina/pintura": "^8.x" + } +} diff --git a/src/components/@pqina/react-pintura/react-pintura.d.ts b/src/components/@pqina/react-pintura/react-pintura.d.ts new file mode 100644 index 0000000..3d91cbf --- /dev/null +++ b/src/components/@pqina/react-pintura/react-pintura.d.ts @@ -0,0 +1,89 @@ + export declare module '@pqina/react-pintura' { + import { + PinturaEditorDefaultOptions, + PinturaEditorModalOptions, + PinturaDefaultImageReaderResult, + PinturaDefaultImageWriterResult, + PinturaReadState, + PinturaWriteState, + PinturaImageState, + PinturaEditor as PinturaEditorInstance, + PinturaEditorModal as PinturaEditorModalInstance, + Shape, + Vector, + } from '../../@pqina/pintura'; + + import * as React from 'react'; + + interface PinturaComponentEvents { + onInit?: (detail: PinturaEditorInstance) => void; + onLoadstart?: () => void; + onLoadabort?: (detail: PinturaReadState) => void; + onLoaderror?: (detail: PinturaReadState) => void; + onLoadprogress?: (detail: PinturaReadState) => void; + onLoad?: (detail: PinturaDefaultImageReaderResult) => void; + onProcessstart?: () => void; + onProcessabort?: (detail: PinturaWriteState) => void; + onProcesserror?: (detail: PinturaWriteState) => void; + onProcessprogress?: (detail: PinturaWriteState) => void; + onProcess?: (detail: PinturaDefaultImageWriterResult) => void; + onLoadpreview?: (detail: ImageData | ImageBitmap) => void; + onReady?: () => void; + onUpdate?: (detail: PinturaImageState) => void; + onUndo?: (detail: number) => void; + onRedo?: (detail: number) => void; + onRevert?: () => void; + onWritehistory?: () => void; + onClose?: () => void; + onDestroy?: () => void; + onAddshape?: (detail: Shape) => void; + onSelectshape?: (detail: Shape) => void; + onUpdateshape?: (detail: Shape) => void; + onRemoveshape?: (detail: Shape) => void; + onMarkuptap?: (detail: { target?: Shape; position: Vector }) => void; + onMarkupzoom?: (detail: number) => void; + onMarkuppan?: (detail: Vector) => void; + onZoom?: (detail: number) => void; + onPan?: (detail: Vector) => void; + onSelectstyle?: (detail: { [key: string]: unknown }) => void; + onSelectutil?: (detail: string) => void; + onSelectcontrol?: (detail: string) => void; + onSelectiondown?: (detail: string) => void; + onSelectionup?: (detail: string) => void; + onSelectionchange?: (detail: string) => void; + } + + interface PinturaComponentModalEvents extends PinturaComponentEvents { + onShow?: () => void; + onHide?: () => void; + } + + export class PinturaEditor extends React.Component< + PinturaEditorDefaultOptions & PinturaComponentEvents & { className?: string }, + any + > { + editor: PinturaEditorInstance; + } + + export class PinturaEditorModal extends React.Component< + PinturaEditorDefaultOptions & + PinturaEditorModalOptions & + PinturaComponentModalEvents & { className?: string }, + any + > { + editor: PinturaEditorModalInstance; + } + + export class PinturaEditorOverlay extends React.Component< + PinturaEditorDefaultOptions & PinturaComponentEvents & { className?: string }, + any + > { + editor: PinturaEditorInstance; + } +} +export class PinturaEditor extends React.Component< + PinturaEditorDefaultOptions & PinturaComponentEvents & { className?: string }, + any + > { + editor: PinturaEditorInstance; + } \ No newline at end of file diff --git a/src/main.tsx b/src/main.tsx new file mode 100644 index 0000000..35f219e --- /dev/null +++ b/src/main.tsx @@ -0,0 +1,9 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import AppImage from './app-image.tsx' + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..a7fc6fb --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/tsconfig.node.json b/tsconfig.node.json new file mode 100644 index 0000000..42872c5 --- /dev/null +++ b/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..861b04b --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react-swc' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], +}) diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..f1736fc --- /dev/null +++ b/yarn.lock @@ -0,0 +1,2876 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@emotion/is-prop-valid@^1.2.1": + version "1.2.1" + resolved "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz" + integrity sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw== + dependencies: + "@emotion/memoize" "^0.8.1" + +"@emotion/memoize@^0.8.1": + version "0.8.1" + resolved "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz" + integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== + +"@emotion/unitless@^0.8.0": + version "0.8.1" + resolved "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz" + integrity sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ== + +"@esbuild/android-arm64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.7.tgz#646156aea43e8e6723de6e94a4ac07c5aed41be1" + integrity sha512-YEDcw5IT7hW3sFKZBkCAQaOCJQLONVcD4bOyTXMZz5fr66pTHnAet46XAtbXAkJRfIn2YVhdC6R9g4xa27jQ1w== + +"@esbuild/android-arm@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.7.tgz#0827b49aed813c33ea18ee257c1728cdc4a01030" + integrity sha512-YGSPnndkcLo4PmVl2tKatEn+0mlVMr3yEpOOT0BeMria87PhvoJb5dg5f5Ft9fbCVgtAz4pWMzZVgSEGpDAlww== + +"@esbuild/android-x64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.7.tgz#fa294ed5214d88219d519e0ab1bbb0253a89b864" + integrity sha512-jhINx8DEjz68cChFvM72YzrqfwJuFbfvSxZAk4bebpngGfNNRm+zRl4rtT9oAX6N9b6gBcFaJHFew5Blf6CvUw== + +"@esbuild/darwin-arm64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.7.tgz#e24d2ed545749ff251eabe8bce11fefa688892d3" + integrity sha512-dr81gbmWN//3ZnBIm6YNCl4p3pjnabg1/ZVOgz2fJoUO1a3mq9WQ/1iuEluMs7mCL+Zwv7AY5e3g1hjXqQZ9Iw== + +"@esbuild/darwin-x64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.7.tgz#02d1f8a572874c90d8f55dde8a859e5145bd06f6" + integrity sha512-Lc0q5HouGlzQEwLkgEKnWcSazqr9l9OdV2HhVasWJzLKeOt0PLhHaUHuzb8s/UIya38DJDoUm74GToZ6Wc7NGQ== + +"@esbuild/freebsd-arm64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.7.tgz#bc6a69b9a7915da278f0a5ebaec069c813982c22" + integrity sha512-+y2YsUr0CxDFF7GWiegWjGtTUF6gac2zFasfFkRJPkMAuMy9O7+2EH550VlqVdpEEchWMynkdhC9ZjtnMiHImQ== + +"@esbuild/freebsd-x64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.7.tgz#ec3708488625d70e565968ceea1355e7c8613865" + integrity sha512-CdXOxIbIzPJmJhrpmJTLx+o35NoiKBIgOvmvT+jeSadYiWJn0vFKsl+0bSG/5lwjNHoIDEyMYc/GAPR9jxusTA== + +"@esbuild/linux-arm64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.7.tgz#8e04b66c306858f92d4f90f8222775270755e88a" + integrity sha512-inHqdOVCkUhHNvuQPT1oCB7cWz9qQ/Cz46xmVe0b7UXcuIJU3166aqSunsqkgSGMtUCWOZw3+KMwI6otINuC9g== + +"@esbuild/linux-arm@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.7.tgz#12d5b65e089029ee1fe4c591b60969c9b1a85355" + integrity sha512-Y+SCmWxsJOdQtjcBxoacn/pGW9HDZpwsoof0ttL+2vGcHokFlfqV666JpfLCSP2xLxFpF1lj7T3Ox3sr95YXww== + +"@esbuild/linux-ia32@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.7.tgz#01eabc2a3ad9039e115db650268e4f48f910dbe2" + integrity sha512-2BbiL7nLS5ZO96bxTQkdO0euGZIUQEUXMTrqLxKUmk/Y5pmrWU84f+CMJpM8+EHaBPfFSPnomEaQiG/+Gmh61g== + +"@esbuild/linux-loong64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.7.tgz#70681113632970e6a5766607bbdb98aa18cf4d5f" + integrity sha512-BVFQla72KXv3yyTFCQXF7MORvpTo4uTA8FVFgmwVrqbB/4DsBFWilUm1i2Oq6zN36DOZKSVUTb16jbjedhfSHw== + +"@esbuild/linux-mips64el@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.7.tgz#f63c022a71a3d70c482d1943a27cb8997021e230" + integrity sha512-DzAYckIaK+pS31Q/rGpvUKu7M+5/t+jI+cdleDgUwbU7KdG2eC3SUbZHlo6Q4P1CfVKZ1lUERRFP8+q0ob9i2w== + +"@esbuild/linux-ppc64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.7.tgz#614eafd08b0c50212f287b948b3c08d6e60f221f" + integrity sha512-JQ1p0SmUteNdUaaiRtyS59GkkfTW0Edo+e0O2sihnY4FoZLz5glpWUQEKMSzMhA430ctkylkS7+vn8ziuhUugQ== + +"@esbuild/linux-riscv64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.7.tgz#31d3b63f92f65968268a8e61ba59872538e80e88" + integrity sha512-xGwVJ7eGhkprY/nB7L7MXysHduqjpzUl40+XoYDGC4UPLbnG+gsyS1wQPJ9lFPcxYAaDXbdRXd1ACs9AE9lxuw== + +"@esbuild/linux-s390x@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.7.tgz#be94974e0caa0783ae05f9477fd7170b9ac29cb0" + integrity sha512-U8Rhki5PVU0L0nvk+E8FjkV8r4Lh4hVEb9duR6Zl21eIEYEwXz8RScj4LZWA2i3V70V4UHVgiqMpszXvG0Yqhg== + +"@esbuild/linux-x64@0.19.7": + version "0.19.7" + resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.7.tgz" + integrity sha512-ZYZopyLhm4mcoZXjFt25itRlocKlcazDVkB4AhioiL9hOWhDldU9n38g62fhOI4Pth6vp+Mrd5rFKxD0/S+7aQ== + +"@esbuild/netbsd-x64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.7.tgz#98898ba8800374c9df9bb182ca4f69fcecaf4411" + integrity sha512-/yfjlsYmT1O3cum3J6cmGG16Fd5tqKMcg5D+sBYLaOQExheAJhqr8xOAEIuLo8JYkevmjM5zFD9rVs3VBcsjtQ== + +"@esbuild/openbsd-x64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.7.tgz#46dc4eda2adb51f16361b1ad10e9b3f4938c4573" + integrity sha512-MYDFyV0EW1cTP46IgUJ38OnEY5TaXxjoDmwiTXPjezahQgZd+j3T55Ht8/Q9YXBM0+T9HJygrSRGV5QNF/YVDQ== + +"@esbuild/sunos-x64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.7.tgz#1650d40dd88412ecc11490119cd23cbaf661a591" + integrity sha512-JcPvgzf2NN/y6X3UUSqP6jSS06V0DZAV/8q0PjsZyGSXsIGcG110XsdmuWiHM+pno7/mJF6fjH5/vhUz/vA9fw== + +"@esbuild/win32-arm64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.7.tgz#e61de6c4eb204d83fd912f3ae6812cc8c7d32d25" + integrity sha512-ZA0KSYti5w5toax5FpmfcAgu3ZNJxYSRm0AW/Dao5up0YV1hDVof1NvwLomjEN+3/GMtaWDI+CIyJOMTRSTdMw== + +"@esbuild/win32-ia32@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.7.tgz#3d9c159d42c67e37a433e44ef8217c661cb6f6d0" + integrity sha512-CTOnijBKc5Jpk6/W9hQMMvJnsSYRYgveN6O75DTACCY18RA2nqka8dTZR+x/JqXCRiKk84+5+bRKXUSbbwsS0A== + +"@esbuild/win32-x64@0.19.7": + version "0.19.7" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.7.tgz#02c4446f802706098d8e6ee70cf2b7aba96ded0b" + integrity sha512-gRaP2sk6hc98N734luX4VpF318l3w+ofrtTu9j5L8EQXF+FzQKV6alCOHMVoJJHvVK/mGbwBXfOL1HETQu9IGQ== + +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": + version "4.4.0" + resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": + version "4.10.0" + resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + +"@eslint/eslintrc@^2.1.3": + version "2.1.3" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz" + integrity sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@8.54.0": + version "8.54.0" + resolved "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz" + integrity sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ== + +"@humanwhocodes/config-array@^0.11.13": + version "0.11.13" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz" + integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== + dependencies: + "@humanwhocodes/object-schema" "^2.0.1" + debug "^4.1.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^2.0.1": + version "2.0.1" + resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz" + integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== + +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + +"@isaacs/string-locale-compare@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz#291c227e93fd407a96ecd59879a35809120e432b" + integrity sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ== + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": + version "1.2.8" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@npmcli/agent@^2.0.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.0.tgz#e81f00fdb2a670750ff7731bbefb47ecbf0ccf44" + integrity sha512-2yThA1Es98orMkpSLVqlDZAMPK3jHJhifP2gnNUdk1754uZ8yI5c+ulCoVG+WlntQA6MzhrURMXjSd9Z7dJ2/Q== + dependencies: + agent-base "^7.1.0" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.1" + lru-cache "^10.0.1" + socks-proxy-agent "^8.0.1" + +"@npmcli/arborist@^7.2.1": + version "7.3.0" + resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-7.3.0.tgz#ca716707053daf63bc320a917bfe317fca7b4dc6" + integrity sha512-ZElIE9L14fEYiL4KqgqRHmo8fRKiTSOFU3hVS1mNm0zJE7hu4FHmof+OFsA7fAAXfkNDJrDByvD0o7Le0ISHMw== + dependencies: + "@isaacs/string-locale-compare" "^1.1.0" + "@npmcli/fs" "^3.1.0" + "@npmcli/installed-package-contents" "^2.0.2" + "@npmcli/map-workspaces" "^3.0.2" + "@npmcli/metavuln-calculator" "^7.0.0" + "@npmcli/name-from-folder" "^2.0.0" + "@npmcli/node-gyp" "^3.0.0" + "@npmcli/package-json" "^5.0.0" + "@npmcli/query" "^3.0.1" + "@npmcli/run-script" "^7.0.2" + bin-links "^4.0.1" + cacache "^18.0.0" + common-ancestor-path "^1.0.1" + hosted-git-info "^7.0.1" + json-parse-even-better-errors "^3.0.0" + json-stringify-nice "^1.1.4" + minimatch "^9.0.0" + nopt "^7.0.0" + npm-install-checks "^6.2.0" + npm-package-arg "^11.0.1" + npm-pick-manifest "^9.0.0" + npm-registry-fetch "^16.0.0" + npmlog "^7.0.1" + pacote "^17.0.4" + parse-conflict-json "^3.0.0" + proc-log "^3.0.0" + promise-all-reject-late "^1.0.0" + promise-call-limit "^1.0.2" + read-package-json-fast "^3.0.2" + semver "^7.3.7" + ssri "^10.0.5" + treeverse "^3.0.0" + walk-up-path "^3.0.1" + +"@npmcli/config@^8.0.2": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/config/-/config-8.1.0.tgz#2c7f6f80d78b9c18d8a70ae7c5fdb481be727bb0" + integrity sha512-61LNEybTFaa9Z/f8y6X9s2Blc75aijZK67LxqC5xicBcfkw8M/88nYrRXGXxAUKm6GRlxTZ216dp1UK2+TbaYw== + dependencies: + "@npmcli/map-workspaces" "^3.0.2" + ci-info "^4.0.0" + ini "^4.1.0" + nopt "^7.0.0" + proc-log "^3.0.0" + read-package-json-fast "^3.0.2" + semver "^7.3.5" + walk-up-path "^3.0.1" + +"@npmcli/disparity-colors@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/disparity-colors/-/disparity-colors-3.0.0.tgz#60ea8c6eb5ba9de2d1950e15b06205b2c3ab7833" + integrity sha512-5R/z157/f20Fi0Ou4ZttL51V0xz0EdPEOauFtPCEYOLInDBRCj1/TxOJ5aGTrtShxEshN2d+hXb9ZKSi5RLBcg== + dependencies: + ansi-styles "^4.3.0" + +"@npmcli/fs@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.0.tgz#233d43a25a91d68c3a863ba0da6a3f00924a173e" + integrity sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w== + dependencies: + semver "^7.3.5" + +"@npmcli/git@^5.0.0", "@npmcli/git@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-5.0.4.tgz#d18c50f99649e6e89e8b427318134f582498700c" + integrity sha512-nr6/WezNzuYUppzXRaYu/W4aT5rLxdXqEFupbh6e/ovlYFQ8hpu1UUPV3Ir/YTl+74iXl2ZOMlGzudh9ZPUchQ== + dependencies: + "@npmcli/promise-spawn" "^7.0.0" + lru-cache "^10.0.1" + npm-pick-manifest "^9.0.0" + proc-log "^3.0.0" + promise-inflight "^1.0.1" + promise-retry "^2.0.1" + semver "^7.3.5" + which "^4.0.0" + +"@npmcli/installed-package-contents@^2.0.1", "@npmcli/installed-package-contents@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz#bfd817eccd9e8df200919e73f57f9e3d9e4f9e33" + integrity sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ== + dependencies: + npm-bundled "^3.0.0" + npm-normalize-package-bin "^3.0.0" + +"@npmcli/map-workspaces@^3.0.2", "@npmcli/map-workspaces@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@npmcli/map-workspaces/-/map-workspaces-3.0.4.tgz#15ad7d854292e484f7ba04bc30187a8320dba799" + integrity sha512-Z0TbvXkRbacjFFLpVpV0e2mheCh+WzQpcqL+4xp49uNJOxOnIAPZyXtUxZ5Qn3QBTGKA11Exjd9a5411rBrhDg== + dependencies: + "@npmcli/name-from-folder" "^2.0.0" + glob "^10.2.2" + minimatch "^9.0.0" + read-package-json-fast "^3.0.0" + +"@npmcli/metavuln-calculator@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/metavuln-calculator/-/metavuln-calculator-7.0.0.tgz#fb59245926d7f677db904177f9aca15ac883d6cb" + integrity sha512-Pw0tyX02VkpqlIQlG2TeiJNsdrecYeUU0ubZZa9pi3N37GCsxI+en43u4hYFdq+eSx1A9a9vwFAUyqEtKFsbHQ== + dependencies: + cacache "^18.0.0" + json-parse-even-better-errors "^3.0.0" + pacote "^17.0.0" + semver "^7.3.5" + +"@npmcli/name-from-folder@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz#c44d3a7c6d5c184bb6036f4d5995eee298945815" + integrity sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg== + +"@npmcli/node-gyp@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz#101b2d0490ef1aa20ed460e4c0813f0db560545a" + integrity sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA== + +"@npmcli/package-json@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/package-json/-/package-json-5.0.0.tgz#77d0f8b17096763ccbd8af03b7117ba6e34d6e91" + integrity sha512-OI2zdYBLhQ7kpNPaJxiflofYIpkNLi+lnGdzqUOfRmCF3r2l1nadcjtCYMJKv/Utm/ZtlffaUuTiAktPHbc17g== + dependencies: + "@npmcli/git" "^5.0.0" + glob "^10.2.2" + hosted-git-info "^7.0.0" + json-parse-even-better-errors "^3.0.0" + normalize-package-data "^6.0.0" + proc-log "^3.0.0" + semver "^7.5.3" + +"@npmcli/promise-spawn@^7.0.0", "@npmcli/promise-spawn@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-7.0.1.tgz#a836de2f42a2245d629cf6fbb8dd6c74c74c55af" + integrity sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg== + dependencies: + which "^4.0.0" + +"@npmcli/query@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@npmcli/query/-/query-3.0.1.tgz#77d63ceb7d27ed748da3cc8b50d45fc341448ed6" + integrity sha512-0jE8iHBogf/+bFDj+ju6/UMLbJ39c8h6nSe6qile+dB7PJ0iV3gNqcb2vtt6WWCBrxv9uAjzUT/8vroluulidA== + dependencies: + postcss-selector-parser "^6.0.10" + +"@npmcli/run-script@^7.0.0", "@npmcli/run-script@^7.0.2", "@npmcli/run-script@^7.0.3": + version "7.0.3" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-7.0.3.tgz#a803e05c4b58e2a7b3f801a9f2767f22822df457" + integrity sha512-ZMWGLHpzMq3rBGIwPyeaoaleaLMvrBrH8nugHxTi5ACkJZXTxXPtVuEH91ifgtss5hUwJQ2VDnzDBWPmz78rvg== + dependencies: + "@npmcli/node-gyp" "^3.0.0" + "@npmcli/promise-spawn" "^7.0.0" + node-gyp "^10.0.0" + read-package-json-fast "^3.0.0" + which "^4.0.0" + +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + +"@pqina/filepond-plugin-image-editor@^9.0.3": + version "9.0.3" + resolved "https://registry.yarnpkg.com/@pqina/filepond-plugin-image-editor/-/filepond-plugin-image-editor-9.0.3.tgz#c27bd134d5874679bbd64a0fa5636a904521e757" + integrity sha512-2V4biWpvkIG1AbtEcQdPay1jY68DEE2Sh8ovoxR27QV2+tof98YK2t6l7qiTiSlxhPooDzpUMWzjp45bogMSyA== + +"@pqina/pintura@^8.71.2": + version "8.71.2" + resolved "https://registry.yarnpkg.com/@pqina/pintura/-/pintura-8.71.2.tgz#820afa5fad7f0d00b0e92abfcc2fdb0a3df43b73" + integrity sha512-5dwkJCU992Q0LJWvwtZYJpchn73PJ2BF2b13QVIVPAIVRcwIiOVJvGVZ5z6Cm7wExl6KiZbMXyjvNgtdGgPMyg== + +"@pqina/react-pintura@^9.0.3": + version "9.0.3" + resolved "https://registry.yarnpkg.com/@pqina/react-pintura/-/react-pintura-9.0.3.tgz#30627ea94e5d46a7ad29657db15262479561e4c9" + integrity sha512-AYeiUUO1NFBBLH72XlMSX9gt9uGOGIkl0MysveH5Zg4GpXIAgyl4YMoNo7GQ/KvuY98lIxx1X+abF3vaeWAAPQ== + +"@rollup/rollup-android-arm-eabi@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.5.1.tgz#11bea66c013e5a88a0f53f315b2d49cfd663584e" + integrity sha512-YaN43wTyEBaMqLDYeze+gQ4ZrW5RbTEGtT5o1GVDkhpdNcsLTnLRcLccvwy3E9wiDKWg9RIhuoy3JQKDRBfaZA== + +"@rollup/rollup-android-arm64@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.5.1.tgz#cae505492204c018d1c6335f3b845319b15dc669" + integrity sha512-n1bX+LCGlQVuPlCofO0zOKe1b2XkFozAVRoczT+yxWZPGnkEAKTTYVOGZz8N4sKuBnKMxDbfhUsB1uwYdup/sw== + +"@rollup/rollup-darwin-arm64@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.5.1.tgz#5442ca442fca1a166e41e03b983b2f3e3235c17c" + integrity sha512-QqJBumdvfBqBBmyGHlKxje+iowZwrHna7pokj/Go3dV1PJekSKfmjKrjKQ/e6ESTGhkfPNLq3VXdYLAc+UtAQw== + +"@rollup/rollup-darwin-x64@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.5.1.tgz#e5140b0aaab0ea1424a4c8a1e76442105866290c" + integrity sha512-RrkDNkR/P5AEQSPkxQPmd2ri8WTjSl0RYmuFOiEABkEY/FSg0a4riihWQGKDJ4LnV9gigWZlTMx2DtFGzUrYQw== + +"@rollup/rollup-linux-arm-gnueabihf@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.5.1.tgz#501a336b1dc4cb350a1b8b4e24bba4d049902d74" + integrity sha512-ZFPxvUZmE+fkB/8D9y/SWl/XaDzNSaxd1TJUSE27XAKlRpQ2VNce/86bGd9mEUgL3qrvjJ9XTGwoX0BrJkYK/A== + +"@rollup/rollup-linux-arm64-gnu@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.5.1.tgz#bdb0c8552d167477d2624a4a6df0f71f128dc546" + integrity sha512-FEuAjzVIld5WVhu+M2OewLmjmbXWd3q7Zcx+Rwy4QObQCqfblriDMMS7p7+pwgjZoo9BLkP3wa9uglQXzsB9ww== + +"@rollup/rollup-linux-arm64-musl@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.5.1.tgz#f7e8036c2f771bb366ca0d8c79d2132cffb1d295" + integrity sha512-f5Gs8WQixqGRtI0Iq/cMqvFYmgFzMinuJO24KRfnv7Ohi/HQclwrBCYkzQu1XfLEEt3DZyvveq9HWo4bLJf1Lw== + +"@rollup/rollup-linux-x64-gnu@4.5.1": + version "4.5.1" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.5.1.tgz" + integrity sha512-CWPkPGrFfN2vj3mw+S7A/4ZaU3rTV7AkXUr08W9lNP+UzOvKLVf34tWCqrKrfwQ0NTk5GFqUr2XGpeR2p6R4gw== + +"@rollup/rollup-linux-x64-musl@4.5.1": + version "4.5.1" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.5.1.tgz" + integrity sha512-ZRETMFA0uVukUC9u31Ed1nx++29073goCxZtmZARwk5aF/ltuENaeTtRVsSQzFlzdd4J6L3qUm+EW8cbGt0CKQ== + +"@rollup/rollup-win32-arm64-msvc@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.5.1.tgz#df70597f6639549e79f0801004525d6a7a0075e4" + integrity sha512-ihqfNJNb2XtoZMSCPeoo0cYMgU04ksyFIoOw5S0JUVbOhafLot+KD82vpKXOurE2+9o/awrqIxku9MRR9hozHQ== + +"@rollup/rollup-win32-ia32-msvc@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.5.1.tgz#6f9e8b30a4d6b5c564bfe55cdf44a5b493139838" + integrity sha512-zK9MRpC8946lQ9ypFn4gLpdwr5a01aQ/odiIJeL9EbgZDMgbZjjT/XzTqJvDfTmnE1kHdbG20sAeNlpc91/wbg== + +"@rollup/rollup-win32-x64-msvc@4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.5.1.tgz#0e79117bacb5817ff9a88ab19cb59df839638d6d" + integrity sha512-5I3Nz4Sb9TYOtkRwlH0ow+BhMH2vnh38tZ4J4mggE48M/YyJyp/0sPSxhw1UeS1+oBgQ8q7maFtSeKpeRJu41Q== + +"@sigstore/bundle@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-2.1.0.tgz#c6140ca97b68815edf7c4fb7bdbf58d656525c39" + integrity sha512-89uOo6yh/oxaU8AeOUnVrTdVMcGk9Q1hJa7Hkvalc6G3Z3CupWk4Xe9djSgJm9fMkH69s0P0cVHUoKSOemLdng== + dependencies: + "@sigstore/protobuf-specs" "^0.2.1" + +"@sigstore/protobuf-specs@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz#be9ef4f3c38052c43bd399d3f792c97ff9e2277b" + integrity sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A== + +"@sigstore/sign@^2.1.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-2.2.0.tgz#4918207d8356877ab42d85d360d5729e9b3ec65a" + integrity sha512-AAbmnEHDQv6CSfrWA5wXslGtzLPtAtHZleKOgxdQYvx/s76Fk6T6ZVt7w2IGV9j1UrFeBocTTQxaXG2oRrDhYA== + dependencies: + "@sigstore/bundle" "^2.1.0" + "@sigstore/protobuf-specs" "^0.2.1" + make-fetch-happen "^13.0.0" + +"@sigstore/tuf@^2.1.0", "@sigstore/tuf@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-2.2.0.tgz#ef636239687e41af3f2ce10667ab88f5ca6165b3" + integrity sha512-KKATZ5orWfqd9ZG6MN8PtCIx4eevWSuGRKQvofnWXRpyMyUEpmrzg5M5BrCpjM+NfZ0RbNGOh5tCz/P2uoRqOA== + dependencies: + "@sigstore/protobuf-specs" "^0.2.1" + tuf-js "^2.1.0" + +"@swc/core-darwin-arm64@1.3.99": + version "1.3.99" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.99.tgz#def204349ac645b8de21a800fa784907642a6c91" + integrity sha512-Qj7Jct68q3ZKeuJrjPx7k8SxzWN6PqLh+VFxzA+KwLDpQDPzOlKRZwkIMzuFjLhITO4RHgSnXoDk/Syz0ZeN+Q== + +"@swc/core-darwin-x64@1.3.99": + version "1.3.99" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.99.tgz#2633f1ac1668ec569f34f86eb5250d56fcacd952" + integrity sha512-wR7m9QVJjgiBu1PSOHy7s66uJPa45Kf9bZExXUL+JAa9OQxt5y+XVzr+n+F045VXQOwdGWplgPnWjgbUUHEVyw== + +"@swc/core-linux-arm64-gnu@1.3.99": + version "1.3.99" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.99.tgz#871c2f049a3a5d88bcc7317ac004230517a08ba4" + integrity sha512-gcGv1l5t0DScEONmw5OhdVmEI/o49HCe9Ik38zzH0NtDkc+PDYaCcXU5rvfZP2qJFaAAr8cua8iJcOunOSLmnA== + +"@swc/core-linux-arm64-musl@1.3.99": + version "1.3.99" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.99.tgz#28ed1622e92bc13aab4b650f2af695af8695289b" + integrity sha512-XL1/eUsTO8BiKsWq9i3iWh7H99iPO61+9HYiWVKhSavknfj4Plbn+XyajDpxsauln5o8t+BRGitymtnAWJM4UQ== + +"@swc/core-linux-x64-gnu@1.3.99": + version "1.3.99" + resolved "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.99.tgz" + integrity sha512-fGrXYE6DbTfGNIGQmBefYxSk3rp/1lgbD0nVg4rl4mfFRQPi7CgGhrrqSuqZ/ezXInUIgoCyvYGWFSwjLXt/Qg== + +"@swc/core-linux-x64-musl@1.3.99": + version "1.3.99" + resolved "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.99.tgz" + integrity sha512-kvgZp/mqf3IJ806gUOL6gN6VU15+DfzM1Zv4Udn8GqgXiUAvbQehrtruid4Snn5pZTLj4PEpSCBbxgxK1jbssA== + +"@swc/core-win32-arm64-msvc@1.3.99": + version "1.3.99" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.99.tgz#6c9bf96dd4cb81b5960884906766dc47a49efb0d" + integrity sha512-yt8RtZ4W/QgFF+JUemOUQAkVW58cCST7mbfKFZ1v16w3pl3NcWd9OrtppFIXpbjU1rrUX2zp2R7HZZzZ2Zk/aQ== + +"@swc/core-win32-ia32-msvc@1.3.99": + version "1.3.99" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.99.tgz#6940a602b65137eee30f09ced7cd9fcb6e162b88" + integrity sha512-62p5fWnOJR/rlbmbUIpQEVRconICy5KDScWVuJg1v3GPLBrmacjphyHiJC1mp6dYvvoEWCk/77c/jcQwlXrDXw== + +"@swc/core-win32-x64-msvc@1.3.99": + version "1.3.99" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.99.tgz#7fcdfe6577f015604f7e69f71dda99822e946385" + integrity sha512-PdppWhkoS45VGdMBxvClVgF1hVjqamtvYd82Gab1i4IV45OSym2KinoDCKE1b6j3LwBLOn2J9fvChGSgGfDCHQ== + +"@swc/core@^1.3.96": + version "1.3.99" + resolved "https://registry.npmjs.org/@swc/core/-/core-1.3.99.tgz" + integrity sha512-8O996RfuPC4ieb4zbYMfbyCU9k4gSOpyCNnr7qBQ+o7IEmh8JCV6B8wwu+fT/Om/6Lp34KJe1IpJ/24axKS6TQ== + dependencies: + "@swc/counter" "^0.1.1" + "@swc/types" "^0.1.5" + optionalDependencies: + "@swc/core-darwin-arm64" "1.3.99" + "@swc/core-darwin-x64" "1.3.99" + "@swc/core-linux-arm64-gnu" "1.3.99" + "@swc/core-linux-arm64-musl" "1.3.99" + "@swc/core-linux-x64-gnu" "1.3.99" + "@swc/core-linux-x64-musl" "1.3.99" + "@swc/core-win32-arm64-msvc" "1.3.99" + "@swc/core-win32-ia32-msvc" "1.3.99" + "@swc/core-win32-x64-msvc" "1.3.99" + +"@swc/counter@^0.1.1": + version "0.1.2" + resolved "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz" + integrity sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw== + +"@swc/types@^0.1.5": + version "0.1.5" + resolved "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz" + integrity sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw== + +"@tufjs/canonical-json@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz#a52f61a3d7374833fca945b2549bc30a2dd40d0a" + integrity sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA== + +"@tufjs/models@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-2.0.0.tgz#c7ab241cf11dd29deb213d6817dabb8c99ce0863" + integrity sha512-c8nj8BaOExmZKO2DXhDfegyhSGcG9E/mPN3U13L+/PsoWm1uaGiHHjxqSHQiasDBQwDA3aHuw9+9spYAP1qvvg== + dependencies: + "@tufjs/canonical-json" "2.0.0" + minimatch "^9.0.3" + +"@types/json-schema@^7.0.12": + version "7.0.15" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/prop-types@*": + version "15.7.11" + resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz" + integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng== + +"@types/react-dom@^18.2.15": + version "18.2.17" + resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.17.tgz" + integrity sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg== + dependencies: + "@types/react" "*" + +"@types/react@*", "@types/react@^18.2.37": + version "18.2.38" + resolved "https://registry.npmjs.org/@types/react/-/react-18.2.38.tgz" + integrity sha512-cBBXHzuPtQK6wNthuVMV6IjHAFkdl/FOPFIlkd81/Cd1+IqkHu/A+w4g43kaQQoYHik/ruaQBDL72HyCy1vuMw== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/scheduler@*": + version "0.16.8" + resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz" + integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A== + +"@types/semver@^7.5.0": + version "7.5.6" + resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz" + integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== + +"@types/stylis@^4.0.2": + version "4.2.4" + resolved "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.4.tgz" + integrity sha512-36ZrGJ8fgtBr6nwNnuJ9jXIj+bn/pF6UoqmrQT7+Y99+tFFeHHsoR54+194dHdyhPjgbeoNz3Qru0oRt0l6ASQ== + +"@typescript-eslint/eslint-plugin@^6.10.0": + version "6.12.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.12.0.tgz" + integrity sha512-XOpZ3IyJUIV1b15M7HVOpgQxPPF7lGXgsfcEIu3yDxFPaf/xZKt7s9QO/pbk7vpWQyVulpJbu4E5LwpZiQo4kA== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.12.0" + "@typescript-eslint/type-utils" "6.12.0" + "@typescript-eslint/utils" "6.12.0" + "@typescript-eslint/visitor-keys" "6.12.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/parser@^6.10.0": + version "6.12.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz" + integrity sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg== + dependencies: + "@typescript-eslint/scope-manager" "6.12.0" + "@typescript-eslint/types" "6.12.0" + "@typescript-eslint/typescript-estree" "6.12.0" + "@typescript-eslint/visitor-keys" "6.12.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@6.12.0": + version "6.12.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.12.0.tgz" + integrity sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw== + dependencies: + "@typescript-eslint/types" "6.12.0" + "@typescript-eslint/visitor-keys" "6.12.0" + +"@typescript-eslint/type-utils@6.12.0": + version "6.12.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.12.0.tgz" + integrity sha512-WWmRXxhm1X8Wlquj+MhsAG4dU/Blvf1xDgGaYCzfvStP2NwPQh6KBvCDbiOEvaE0filhranjIlK/2fSTVwtBng== + dependencies: + "@typescript-eslint/typescript-estree" "6.12.0" + "@typescript-eslint/utils" "6.12.0" + debug "^4.3.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/types@6.12.0": + version "6.12.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.12.0.tgz" + integrity sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q== + +"@typescript-eslint/typescript-estree@6.12.0": + version "6.12.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.12.0.tgz" + integrity sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw== + dependencies: + "@typescript-eslint/types" "6.12.0" + "@typescript-eslint/visitor-keys" "6.12.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.12.0": + version "6.12.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.12.0.tgz" + integrity sha512-LywPm8h3tGEbgfyjYnu3dauZ0U7R60m+miXgKcZS8c7QALO9uWJdvNoP+duKTk2XMWc7/Q3d/QiCuLN9X6SWyQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.12.0" + "@typescript-eslint/types" "6.12.0" + "@typescript-eslint/typescript-estree" "6.12.0" + semver "^7.5.4" + +"@typescript-eslint/visitor-keys@6.12.0": + version "6.12.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.12.0.tgz" + integrity sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw== + dependencies: + "@typescript-eslint/types" "6.12.0" + eslint-visitor-keys "^3.4.1" + +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + +"@vitejs/plugin-react-swc@^3.5.0": + version "3.5.0" + resolved "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.5.0.tgz" + integrity sha512-1PrOvAaDpqlCV+Up8RkAh9qaiUjoDUcjtttyhXDKw53XA6Ve16SOp6cCOpRs8Dj8DqUQs6eTW5YkLcLJjrXAig== + dependencies: + "@swc/core" "^1.3.96" + +abbrev@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" + integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.9.0: + version "8.11.2" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== + +agent-base@^7.0.2, agent-base@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.0.tgz#536802b76bc0b34aa50195eb2442276d613e3434" + integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== + dependencies: + debug "^4.3.4" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + +"aproba@^1.0.3 || ^2.0.0", aproba@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + +archy@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== + +are-we-there-yet@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-4.0.2.tgz#aed25dd0eae514660d49ac2b2366b175c614785a" + integrity sha512-ncSWAawFhKMJDTdoAeOV+jyW1VCMj5QIAwULIBV0SSR7B/RLPPEQiknKcg/RIIZlUQrxELpsxMiTUoAQ4sIUyg== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +bin-links@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-4.0.3.tgz#9e4a3c5900830aee3d7f52178b65e01dcdde64a5" + integrity sha512-obsRaULtJurnfox/MDwgq6Yo9kzbv1CPTk/1/s7Z/61Lezc8IKkFCOXNeVLXz0456WRzBQmSsDWlai2tIhBsfA== + dependencies: + cmd-shim "^6.0.0" + npm-normalize-package-bin "^3.0.0" + read-cmd-shim "^4.0.0" + write-file-atomic "^5.0.0" + +binary-extensions@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +builtins@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== + dependencies: + semver "^7.0.0" + +cacache@^18.0.0, cacache@^18.0.2: + version "18.0.2" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.2.tgz#fd527ea0f03a603be5c0da5805635f8eef00c60c" + integrity sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw== + dependencies: + "@npmcli/fs" "^3.1.0" + fs-minipass "^3.0.0" + glob "^10.2.2" + lru-cache "^10.0.1" + minipass "^7.0.3" + minipass-collect "^2.0.1" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + p-map "^4.0.0" + ssri "^10.0.0" + tar "^6.1.11" + unique-filename "^3.0.0" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelize@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz" + integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ== + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + +ci-info@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2" + integrity sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg== + +cidr-regex@4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/cidr-regex/-/cidr-regex-4.0.3.tgz#07b52c9762d1ff546a50740e92fc2b5b13a6d871" + integrity sha512-HOwDIy/rhKeMf6uOzxtv7FAbrz8zPjmVKfSpM+U7/bNBXC5rtOyr758jxcptiSx6ZZn5LOhPJT5WWxPAGDV8dw== + dependencies: + ip-regex "^5.0.0" + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-columns@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-columns/-/cli-columns-4.0.0.tgz#9fe4d65975238d55218c41bd2ed296a7fa555646" + integrity sha512-XW2Vg+w+L9on9wtwKpyzluIPCWXjaBahI7mTcYjx+BVIYD9c3yqcv/yKC7CmdCZat4rq2yiE1UMSJC5ivKfMtQ== + dependencies: + string-width "^4.2.3" + strip-ansi "^6.0.1" + +cli-table3@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" + integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg== + dependencies: + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + +cmd-shim@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-6.0.2.tgz#435fd9e5c95340e61715e19f90209ed6fcd9e0a4" + integrity sha512-+FFYbB0YLaAkhkcrjkyNLYDiOsFSfRjwjY19LXk/psmMx1z00xlCv7hhQoTGXXIKi+YXHL/iiFo8NqMVQX9nOw== + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + +columnify@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.6.0.tgz#6989531713c9008bb29735e61e37acf5bd553cf3" + integrity sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q== + dependencies: + strip-ansi "^6.0.1" + wcwidth "^1.0.0" + +common-ancestor-path@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7" + integrity sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +console-control-strings@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== + +cross-spawn@^7.0.0, cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +css-color-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz" + integrity sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg== + +css-to-react-native@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz" + integrity sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ== + dependencies: + camelize "^1.0.0" + css-color-keywords "^1.0.0" + postcss-value-parser "^4.0.2" + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + +csstype@^3.0.2, csstype@^3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz" + integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== + +debug@4, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + +diff@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" + integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +encoding@^0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + +esbuild@^0.19.3: + version "0.19.7" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.19.7.tgz" + integrity sha512-6brbTZVqxhqgbpqBR5MzErImcpA0SQdoKOkcWK/U30HtQxnokIpG3TX2r0IJqbFUzqLjhU/zC1S5ndgakObVCQ== + optionalDependencies: + "@esbuild/android-arm" "0.19.7" + "@esbuild/android-arm64" "0.19.7" + "@esbuild/android-x64" "0.19.7" + "@esbuild/darwin-arm64" "0.19.7" + "@esbuild/darwin-x64" "0.19.7" + "@esbuild/freebsd-arm64" "0.19.7" + "@esbuild/freebsd-x64" "0.19.7" + "@esbuild/linux-arm" "0.19.7" + "@esbuild/linux-arm64" "0.19.7" + "@esbuild/linux-ia32" "0.19.7" + "@esbuild/linux-loong64" "0.19.7" + "@esbuild/linux-mips64el" "0.19.7" + "@esbuild/linux-ppc64" "0.19.7" + "@esbuild/linux-riscv64" "0.19.7" + "@esbuild/linux-s390x" "0.19.7" + "@esbuild/linux-x64" "0.19.7" + "@esbuild/netbsd-x64" "0.19.7" + "@esbuild/openbsd-x64" "0.19.7" + "@esbuild/sunos-x64" "0.19.7" + "@esbuild/win32-arm64" "0.19.7" + "@esbuild/win32-ia32" "0.19.7" + "@esbuild/win32-x64" "0.19.7" + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-plugin-react-hooks@^4.6.0: + version "4.6.0" + resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz" + integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== + +eslint-plugin-react-refresh@^0.4.4: + version "0.4.4" + resolved "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.4.tgz" + integrity sha512-eD83+65e8YPVg6603Om2iCIwcQJf/y7++MWm4tACtEswFLYMwxwVWAfwN+e19f5Ad/FOyyNg9Dfi5lXhH3Y3rA== + +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.53.0: + version "8.54.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz" + integrity sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.3" + "@eslint/js" "8.54.0" + "@humanwhocodes/config-array" "^0.11.13" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +exponential-backoff@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" + integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9: + version "3.3.2" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastest-levenshtein@^1.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + +fastq@^1.6.0: + version "1.15.0" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +filepond-plugin-file-poster@^2.x: + version "2.5.1" + resolved "https://registry.yarnpkg.com/filepond-plugin-file-poster/-/filepond-plugin-file-poster-2.5.1.tgz#8f899593660623b7967f26a7991d18de3e82a639" + integrity sha512-WMB6Iww//U7KJR9Yt/zZ3cxC7SVySXGTrWPnAQokYSFfDp4uD31JLtyjYAVJnEg6T+niJvNwH48jKn/X3o75og== + +filepond-plugin-file-validate-type@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/filepond-plugin-file-validate-type/-/filepond-plugin-file-validate-type-1.2.8.tgz#58ab1815a3f505f2189e6943263ae3b6cb314bd1" + integrity sha512-UBTqIWbk5+5R0GBELI8svu01MHWjFSLfc9DfCMvFtHKXLdJMxY1p37ChC4YKQjhfODaTuvLnNVRsukMGMFZBBg== + +filepond@^4.x: + version "4.30.6" + resolved "https://registry.yarnpkg.com/filepond/-/filepond-4.30.6.tgz#59ef22196f810be169c77f3f1fc1439931844a3a" + integrity sha512-gBsVKJgr5HFTkQSA/3R6utne4Qt6Pue0O3+k3IjjVBbaQxMgGMI0fXwoob9SdRRoULCs8BAhWjttM28hOAi/0w== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.2.0" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.3" + rimraf "^3.0.2" + +flatted@^3.2.9: + version "3.2.9" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== + +foreground-child@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" + integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + +fs-minipass@^3.0.0, fs-minipass@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.3.tgz#79a85981c4dc120065e96f62086bf6f9dc26cc54" + integrity sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw== + dependencies: + minipass "^7.0.3" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2, fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +gauge@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-5.0.1.tgz#1efc801b8ff076b86ef3e9a7a280a975df572112" + integrity sha512-CmykPMJGuNan/3S4kZOpvvPYSNqSHANiWnh9XcMU2pSjtBfF0XzZ2p1bFAxTbnFxyBuPxQYHhzwaoOmUdqzvxQ== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.3" + console-control-strings "^1.1.0" + has-unicode "^2.0.1" + signal-exit "^4.0.1" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.5" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^10.2.2, glob@^10.3.10: + version "10.3.10" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" + integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== + dependencies: + foreground-child "^3.1.0" + jackspeak "^2.3.5" + minimatch "^9.0.1" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-scurry "^1.10.1" + +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^13.19.0: + version "13.23.0" + resolved "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz" + integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== + dependencies: + type-fest "^0.20.2" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +graceful-fs@^4.2.11, graceful-fs@^4.2.6: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-unicode@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== + +hasown@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + dependencies: + function-bind "^1.1.2" + +hosted-git-info@^7.0.0, hosted-git-info@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-7.0.1.tgz#9985fcb2700467fecf7f33a4d4874e30680b5322" + integrity sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA== + dependencies: + lru-cache "^10.0.1" + +http-cache-semantics@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== + +http-proxy-agent@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz#e9096c5afd071a3fce56e6252bb321583c124673" + integrity sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +https-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz#e2645b846b90e96c6e6f347fb5b2e41f1590b09b" + integrity sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA== + dependencies: + agent-base "^7.0.2" + debug "4" + +i@^0.3.7: + version "0.3.7" + resolved "https://registry.yarnpkg.com/i/-/i-0.3.7.tgz#2a7437a923d59c14b17243dc63a549af24d85799" + integrity sha512-FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q== + +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +ignore-walk@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-6.0.4.tgz#89950be94b4f522225eb63a13c56badb639190e9" + integrity sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw== + dependencies: + minimatch "^9.0.0" + +ignore@^5.2.0, ignore@^5.2.4: + version "5.3.0" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz" + integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== + +import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@^4.1.0, ini@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ini/-/ini-4.1.1.tgz#d95b3d843b1e906e56d6747d5447904ff50ce7a1" + integrity sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g== + +init-package-json@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-6.0.0.tgz#7d4daeaacc72be300c616481e5c155d5048a18b4" + integrity sha512-AmXD+Aht5iZGo/y1KUtZSUQ1SltesXHxQuc7qeNz0eUGx/8WgkHeeQLSFdM8l9YpmnnamGIbAxVdAs2xoLRKRQ== + dependencies: + npm-package-arg "^11.0.0" + promzard "^1.0.0" + read "^2.0.0" + read-package-json "^7.0.0" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" + validate-npm-package-name "^5.0.0" + +ip-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-5.0.0.tgz#cd313b2ae9c80c07bd3851e12bf4fa4dc5480632" + integrity sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw== + +ip@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" + integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + +is-cidr@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/is-cidr/-/is-cidr-5.0.3.tgz#fcf817c0146dd4a318f27938af89e98a9b21bdd5" + integrity sha512-lKkM0tmz07dAxNsr8Ii9MGreExa9ZR34N9j8mTG5op824kcwBqinZPowNjcVWWc7j+jR8XAMMItOmBkniN0jOA== + dependencies: + cidr-regex "4.0.3" + +is-core-module@^2.8.1: + version "2.13.1" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isexe@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" + integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== + +jackspeak@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" + integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-parse-even-better-errors@^3.0.0, json-parse-even-better-errors@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz#02bb29fb5da90b5444581749c22cedd3597c6cb0" + integrity sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json-stringify-nice@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz#2c937962b80181d3f317dd39aa323e14f5a60a67" + integrity sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw== + +jsonparse@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== + +just-diff-apply@^5.2.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/just-diff-apply/-/just-diff-apply-5.5.0.tgz#771c2ca9fa69f3d2b54e7c3f5c1dfcbcc47f9f0f" + integrity sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw== + +just-diff@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-6.0.2.tgz#03b65908543ac0521caf6d8eb85035f7d27ea285" + integrity sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA== + +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +libnpmaccess@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-8.0.2.tgz#a13a72fd5b71a1063ea54973fa56d61ec38f718f" + integrity sha512-4K+nsg3OYt4rjryP/3D5zGWluLbZaKozwj6YdtvAyxNhLhUrjCoyxHVoL5AkTJcAnjsd6/ATei52QPVvpSX9Ug== + dependencies: + npm-package-arg "^11.0.1" + npm-registry-fetch "^16.0.0" + +libnpmdiff@^6.0.3: + version "6.0.5" + resolved "https://registry.yarnpkg.com/libnpmdiff/-/libnpmdiff-6.0.5.tgz#f4f9a8f7e499582c8f769b6c2e91dd8e3d5de29d" + integrity sha512-AplhlY7Ha/lzOcpmVpbQy8P12JSyIpDTgPsBmd4G7+wmLJLIYMclqY4I0lbWcwKua95vxgyp7j1gIYk1DP7ZTw== + dependencies: + "@npmcli/arborist" "^7.2.1" + "@npmcli/disparity-colors" "^3.0.0" + "@npmcli/installed-package-contents" "^2.0.2" + binary-extensions "^2.2.0" + diff "^5.1.0" + minimatch "^9.0.0" + npm-package-arg "^11.0.1" + pacote "^17.0.4" + tar "^6.2.0" + +libnpmexec@^7.0.4: + version "7.0.6" + resolved "https://registry.yarnpkg.com/libnpmexec/-/libnpmexec-7.0.6.tgz#9489ff1401135d595285feaa120e88ca395e6207" + integrity sha512-TWvtfKyBQ/UiWl54uG7ALuLAGE5s6H6FTQKs7bAH5H19jtEgpxujQz6+iNNVOIMw7Cfw3Oat6RZqL8ZfXmJA9g== + dependencies: + "@npmcli/arborist" "^7.2.1" + "@npmcli/run-script" "^7.0.2" + ci-info "^4.0.0" + npm-package-arg "^11.0.1" + npmlog "^7.0.1" + pacote "^17.0.4" + proc-log "^3.0.0" + read "^2.0.0" + read-package-json-fast "^3.0.2" + semver "^7.3.7" + walk-up-path "^3.0.1" + +libnpmfund@^5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/libnpmfund/-/libnpmfund-5.0.3.tgz#40235dffb1f610475c864702445020c4b3441199" + integrity sha512-Kb/fJZNAOG6uIHkhkUah+HfLYqqyuc3s65cPWiwGz1nta8ta79PaexzstGxvGrMA/JFfjZ0BMOejM6zB1aXA8g== + dependencies: + "@npmcli/arborist" "^7.2.1" + +libnpmhook@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/libnpmhook/-/libnpmhook-10.0.1.tgz#3cb9516645f0d6891b4a59c72ffe026bdbb9bd6b" + integrity sha512-FnXCweDpoAko6mnLPSW8qrRYicjfh+GrvY5PuYHQRPvaW4BFtHDUmK3K3aYx4yD3TeGAKpj4IigrEDfUfWuSkA== + dependencies: + aproba "^2.0.0" + npm-registry-fetch "^16.0.0" + +libnpmorg@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/libnpmorg/-/libnpmorg-6.0.2.tgz#6e5e37ecc5a391082e83c599512689c78e60dc70" + integrity sha512-zK4r6cjVsfXf7hWzWGB6R0LBJidVhKaeMWMZL/1eyZS6ixxAxVijfsPacoEnBRCFaXsNjAtwV3b2RCmYU6+usA== + dependencies: + aproba "^2.0.0" + npm-registry-fetch "^16.0.0" + +libnpmpack@^6.0.3: + version "6.0.5" + resolved "https://registry.yarnpkg.com/libnpmpack/-/libnpmpack-6.0.5.tgz#9b6de1ba4ca3e338b915f46bd34883096e6bf9c6" + integrity sha512-H6a8EDBwU765ogkcan1VEhjAZFflXgKVijbB7TDnbl2ce0MuJDLnmVzSg30/7zgIj1gNtxenaBigeQFQ1hxP9A== + dependencies: + "@npmcli/arborist" "^7.2.1" + "@npmcli/run-script" "^7.0.2" + npm-package-arg "^11.0.1" + pacote "^17.0.4" + +libnpmpublish@^9.0.2: + version "9.0.3" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-9.0.3.tgz#644ee50543687eee79bcf2a5bd759a2ff6e60a0d" + integrity sha512-XoF0QgT1Ph9RMBfTwiwZeRN4Rs5t4w1POaRxaoVoWCMUqysswwlAPu3ZZJDNbh7asXBWXcXTJziDWkInhpbiBg== + dependencies: + ci-info "^4.0.0" + normalize-package-data "^6.0.0" + npm-package-arg "^11.0.1" + npm-registry-fetch "^16.0.0" + proc-log "^3.0.0" + semver "^7.3.7" + sigstore "^2.1.0" + ssri "^10.0.5" + +libnpmsearch@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/libnpmsearch/-/libnpmsearch-7.0.1.tgz#8fa803a8e5837a33ce750a8cc1c70820d728b91d" + integrity sha512-XyKi6Y94t6PGd5Lk2Ma3+fgiHWD3KSCvXmHOrcLkAOEP7oUejbNjL0Bb/HUDZXgBj6gP1Qk7pJ6jZPFBc2hmXQ== + dependencies: + npm-registry-fetch "^16.0.0" + +libnpmteam@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/libnpmteam/-/libnpmteam-6.0.1.tgz#daa1b2e7e4ccef0469bdef661737ca823b53468b" + integrity sha512-1YytqVk1gSkKFNMe4kkCKN49y5rlABrRSx5TrYShQtt2Lb4uQaed49dGE7Ue8TJGxbIkHzvyyVtb3PBiGACVqw== + dependencies: + aproba "^2.0.0" + npm-registry-fetch "^16.0.0" + +libnpmversion@^5.0.1: + version "5.0.2" + resolved "https://registry.yarnpkg.com/libnpmversion/-/libnpmversion-5.0.2.tgz#aea7b09bc270c778cbc8be7bf02e4b60566989cf" + integrity sha512-6JBnLhd6SYgKRekJ4cotxpURLGbEtKxzw+a8p5o+wNwrveJPMH8yW/HKjeewyHzWmxzzwn9EQ3TkF2onkrwstA== + dependencies: + "@npmcli/git" "^5.0.3" + "@npmcli/run-script" "^7.0.2" + json-parse-even-better-errors "^3.0.0" + proc-log "^3.0.0" + semver "^7.3.7" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +loose-envify@^1.1.0: + version "1.4.0" + resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^10.0.1, "lru-cache@^9.1.1 || ^10.0.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.1.0.tgz#2098d41c2dc56500e6c88584aa656c84de7d0484" + integrity sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +make-fetch-happen@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz#705d6f6cbd7faecb8eac2432f551e49475bfedf0" + integrity sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A== + dependencies: + "@npmcli/agent" "^2.0.0" + cacache "^18.0.0" + http-cache-semantics "^4.1.1" + is-lambda "^1.0.1" + minipass "^7.0.2" + minipass-fetch "^3.0.0" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.3" + promise-retry "^2.0.1" + ssri "^10.0.0" + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^9.0.0, minimatch@^9.0.1, minimatch@^9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + +minipass-collect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" + integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== + dependencies: + minipass "^7.0.3" + +minipass-fetch@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.4.tgz#4d4d9b9f34053af6c6e597a64be8e66e42bf45b7" + integrity sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg== + dependencies: + minipass "^7.0.3" + minipass-sized "^1.0.3" + minizlib "^2.1.2" + optionalDependencies: + encoding "^0.1.13" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-json-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" + integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== + dependencies: + jsonparse "^1.3.1" + minipass "^3.0.0" + +minipass-pipeline@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + +minipass@^3.0.0: + version "3.3.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" + integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== + dependencies: + yallist "^4.0.0" + +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.0.4: + version "7.0.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" + integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== + +minizlib@^2.1.1, minizlib@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +mute-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" + integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== + +nanoid@^3.3.6: + version "3.3.7" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +negotiator@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +node-gyp@^10.0.0, node-gyp@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.0.1.tgz#205514fc19e5830fa991e4a689f9e81af377a966" + integrity sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg== + dependencies: + env-paths "^2.2.0" + exponential-backoff "^3.1.1" + glob "^10.3.10" + graceful-fs "^4.2.6" + make-fetch-happen "^13.0.0" + nopt "^7.0.0" + proc-log "^3.0.0" + semver "^7.3.5" + tar "^6.1.2" + which "^4.0.0" + +nopt@^7.0.0, nopt@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.0.tgz#067378c68116f602f552876194fd11f1292503d7" + integrity sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA== + dependencies: + abbrev "^2.0.0" + +normalize-package-data@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-6.0.0.tgz#68a96b3c11edd462af7189c837b6b1064a484196" + integrity sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg== + dependencies: + hosted-git-info "^7.0.0" + is-core-module "^2.8.1" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" + +npm-audit-report@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/npm-audit-report/-/npm-audit-report-5.0.0.tgz#83ac14aeff249484bde81eff53c3771d5048cf95" + integrity sha512-EkXrzat7zERmUhHaoren1YhTxFwsOu5jypE84k6632SXTHcQE1z8V51GC6GVZt8LxkC+tbBcKMUBZAgk8SUSbw== + +npm-bundled@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-3.0.0.tgz#7e8e2f8bb26b794265028491be60321a25a39db7" + integrity sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ== + dependencies: + npm-normalize-package-bin "^3.0.0" + +npm-install-checks@^6.0.0, npm-install-checks@^6.2.0, npm-install-checks@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.3.0.tgz#046552d8920e801fa9f919cad569545d60e826fe" + integrity sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw== + dependencies: + semver "^7.1.1" + +npm-normalize-package-bin@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz#25447e32a9a7de1f51362c61a559233b89947832" + integrity sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ== + +npm-package-arg@^11.0.0, npm-package-arg@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.1.tgz#f208b0022c29240a1c532a449bdde3f0a4708ebc" + integrity sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ== + dependencies: + hosted-git-info "^7.0.0" + proc-log "^3.0.0" + semver "^7.3.5" + validate-npm-package-name "^5.0.0" + +npm-packlist@^8.0.0: + version "8.0.2" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-8.0.2.tgz#5b8d1d906d96d21c85ebbeed2cf54147477c8478" + integrity sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA== + dependencies: + ignore-walk "^6.0.4" + +npm-pick-manifest@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-9.0.0.tgz#f87a4c134504a2c7931f2bb8733126e3c3bb7e8f" + integrity sha512-VfvRSs/b6n9ol4Qb+bDwNGUXutpy76x6MARw/XssevE0TnctIKcmklJZM5Z7nqs5z5aW+0S63pgCNbpkUNNXBg== + dependencies: + npm-install-checks "^6.0.0" + npm-normalize-package-bin "^3.0.0" + npm-package-arg "^11.0.0" + semver "^7.3.5" + +npm-profile@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-9.0.0.tgz#ffcfa4e3e1b1cb44b17c192f75b44b24b4aae645" + integrity sha512-qv43ixsJ7vndzfxD3XsPNu1Njck6dhO7q1efksTo+0DiOQysKSOsIhK/qDD1/xO2o+2jDOA4Rv/zOJ9KQFs9nw== + dependencies: + npm-registry-fetch "^16.0.0" + proc-log "^3.0.0" + +npm-registry-fetch@^16.0.0, npm-registry-fetch@^16.1.0: + version "16.1.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-16.1.0.tgz#10227b7b36c97bc1cf2902a24e4f710cfe62803c" + integrity sha512-PQCELXKt8Azvxnt5Y85GseQDJJlglTFM9L9U9gkv2y4e9s0k3GVDdOx3YoB6gm2Do0hlkzC39iCGXby+Wve1Bw== + dependencies: + make-fetch-happen "^13.0.0" + minipass "^7.0.2" + minipass-fetch "^3.0.0" + minipass-json-stream "^1.0.1" + minizlib "^2.1.2" + npm-package-arg "^11.0.0" + proc-log "^3.0.0" + +npm-user-validate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-2.0.0.tgz#7b69bbbff6f7992a1d9a8968d52fd6b6db5431b6" + integrity sha512-sSWeqAYJ2dUPStJB+AEj0DyLRltr/f6YNcvCA7phkB8/RMLMnVsQ41GMwHo/ERZLYNDsyB2wPm7pZo1mqPOl7Q== + +npm@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/npm/-/npm-10.3.0.tgz#554e1f13e4c09d581ad27cdc4a92f085ab74ce1a" + integrity sha512-9u5GFc1UqI2DLlGI7QdjkpIaBs3UhTtY8KoCqYJK24gV/j/tByaI4BA4R7RkOc+ASqZMzFPKt4Pj2Z8JcGo//A== + dependencies: + "@isaacs/string-locale-compare" "^1.1.0" + "@npmcli/arborist" "^7.2.1" + "@npmcli/config" "^8.0.2" + "@npmcli/fs" "^3.1.0" + "@npmcli/map-workspaces" "^3.0.4" + "@npmcli/package-json" "^5.0.0" + "@npmcli/promise-spawn" "^7.0.1" + "@npmcli/run-script" "^7.0.3" + "@sigstore/tuf" "^2.2.0" + abbrev "^2.0.0" + archy "~1.0.0" + cacache "^18.0.2" + chalk "^5.3.0" + ci-info "^4.0.0" + cli-columns "^4.0.0" + cli-table3 "^0.6.3" + columnify "^1.6.0" + fastest-levenshtein "^1.0.16" + fs-minipass "^3.0.3" + glob "^10.3.10" + graceful-fs "^4.2.11" + hosted-git-info "^7.0.1" + ini "^4.1.1" + init-package-json "^6.0.0" + is-cidr "^5.0.3" + json-parse-even-better-errors "^3.0.1" + libnpmaccess "^8.0.1" + libnpmdiff "^6.0.3" + libnpmexec "^7.0.4" + libnpmfund "^5.0.1" + libnpmhook "^10.0.0" + libnpmorg "^6.0.1" + libnpmpack "^6.0.3" + libnpmpublish "^9.0.2" + libnpmsearch "^7.0.0" + libnpmteam "^6.0.0" + libnpmversion "^5.0.1" + make-fetch-happen "^13.0.0" + minimatch "^9.0.3" + minipass "^7.0.4" + minipass-pipeline "^1.2.4" + ms "^2.1.2" + node-gyp "^10.0.1" + nopt "^7.2.0" + normalize-package-data "^6.0.0" + npm-audit-report "^5.0.0" + npm-install-checks "^6.3.0" + npm-package-arg "^11.0.1" + npm-pick-manifest "^9.0.0" + npm-profile "^9.0.0" + npm-registry-fetch "^16.1.0" + npm-user-validate "^2.0.0" + npmlog "^7.0.1" + p-map "^4.0.0" + pacote "^17.0.5" + parse-conflict-json "^3.0.1" + proc-log "^3.0.0" + qrcode-terminal "^0.12.0" + read "^2.1.0" + semver "^7.5.4" + spdx-expression-parse "^3.0.1" + ssri "^10.0.5" + strip-ansi "^7.1.0" + supports-color "^9.4.0" + tar "^6.2.0" + text-table "~0.2.0" + tiny-relative-date "^1.3.0" + treeverse "^3.0.0" + validate-npm-package-name "^5.0.0" + which "^4.0.0" + write-file-atomic "^5.0.1" + +npmlog@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-7.0.1.tgz#7372151a01ccb095c47d8bf1d0771a4ff1f53ac8" + integrity sha512-uJ0YFk/mCQpLBt+bxN88AKd+gyqZvZDbtiNxk6Waqcj2aPRyfVx8ITawkyQynxUagInjdYT1+qj4NfA5KJJUxg== + dependencies: + are-we-there-yet "^4.0.0" + console-control-strings "^1.1.0" + gauge "^5.0.0" + set-blocking "^2.0.0" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +pacote@^17.0.0, pacote@^17.0.4, pacote@^17.0.5: + version "17.0.5" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-17.0.5.tgz#e9854edee7a073635cdd36b0c07cd4f2ab1757b6" + integrity sha512-TAE0m20zSDMnchPja9vtQjri19X3pZIyRpm2TJVeI+yU42leJBBDTRYhOcWFsPhaMxf+3iwQkFiKz16G9AEeeA== + dependencies: + "@npmcli/git" "^5.0.0" + "@npmcli/installed-package-contents" "^2.0.1" + "@npmcli/promise-spawn" "^7.0.0" + "@npmcli/run-script" "^7.0.0" + cacache "^18.0.0" + fs-minipass "^3.0.0" + minipass "^7.0.2" + npm-package-arg "^11.0.0" + npm-packlist "^8.0.0" + npm-pick-manifest "^9.0.0" + npm-registry-fetch "^16.0.0" + proc-log "^3.0.0" + promise-retry "^2.0.1" + read-package-json "^7.0.0" + read-package-json-fast "^3.0.0" + sigstore "^2.0.0" + ssri "^10.0.0" + tar "^6.1.11" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-conflict-json@^3.0.0, parse-conflict-json@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/parse-conflict-json/-/parse-conflict-json-3.0.1.tgz#67dc55312781e62aa2ddb91452c7606d1969960c" + integrity sha512-01TvEktc68vwbJOtWZluyWeVGWjP+bZwXtPDMQVbBKzbJ/vZBif0L69KH1+cHv1SZ6e0FKLvjyHe8mqsIqYOmw== + dependencies: + json-parse-even-better-errors "^3.0.0" + just-diff "^6.0.0" + just-diff-apply "^5.2.0" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-scurry@^1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698" + integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ== + dependencies: + lru-cache "^9.1.1 || ^10.0.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +postcss-selector-parser@^6.0.10: + version "6.0.15" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz#11cc2b21eebc0b99ea374ffb9887174855a01535" + integrity sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss-value-parser@^4.0.2: + version "4.2.0" + resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== + +postcss@^8.4.31: + version "8.4.31" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz" + integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== + dependencies: + nanoid "^3.3.6" + picocolors "^1.0.0" + source-map-js "^1.0.2" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +proc-log@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8" + integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== + +promise-all-reject-late@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz#f8ebf13483e5ca91ad809ccc2fcf25f26f8643c2" + integrity sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw== + +promise-call-limit@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/promise-call-limit/-/promise-call-limit-1.0.2.tgz#f64b8dd9ef7693c9c7613e7dfe8d6d24de3031ea" + integrity sha512-1vTUnfI2hzui8AEIixbdAJlFY4LFDXqQswy/2eOlThAscXCY4It8FdVuI0fMJGAB2aWGbdQf/gv0skKYXmdrHA== + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== + +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + +promzard@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/promzard/-/promzard-1.0.0.tgz#3246f8e6c9895a77c0549cefb65828ac0f6c006b" + integrity sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig== + dependencies: + read "^2.0.0" + +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +qrcode-terminal@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" + integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +react-dom@^18.2.0: + version "18.2.0" + resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== + dependencies: + loose-envify "^1.1.0" + scheduler "^0.23.0" + +react@^18.2.0: + version "18.2.0" + resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== + dependencies: + loose-envify "^1.1.0" + +read-cmd-shim@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz#640a08b473a49043e394ae0c7a34dd822c73b9bb" + integrity sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q== + +read-package-json-fast@^3.0.0, read-package-json-fast@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz#394908a9725dc7a5f14e70c8e7556dff1d2b1049" + integrity sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw== + dependencies: + json-parse-even-better-errors "^3.0.0" + npm-normalize-package-bin "^3.0.0" + +read-package-json@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-7.0.0.tgz#d605c9dcf6bc5856da24204aa4e9518ee9714be0" + integrity sha512-uL4Z10OKV4p6vbdvIXB+OzhInYtIozl/VxUBPgNkBuUi2DeRonnuspmaVAMcrkmfjKGNmRndyQAbE7/AmzGwFg== + dependencies: + glob "^10.2.2" + json-parse-even-better-errors "^3.0.0" + normalize-package-data "^6.0.0" + npm-normalize-package-bin "^3.0.0" + +read@^2.0.0, read@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/read/-/read-2.1.0.tgz#69409372c54fe3381092bc363a00650b6ac37218" + integrity sha512-bvxi1QLJHcaywCAEsAk4DG3nVoqiY2Csps3qzWalhj5hFqRn1d/OixkFXtLO1PrgHUcAP0FNaSY/5GYNfENFFQ== + dependencies: + mute-stream "~1.0.0" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rollup@^4.2.0: + version "4.5.1" + resolved "https://registry.npmjs.org/rollup/-/rollup-4.5.1.tgz" + integrity sha512-0EQribZoPKpb5z1NW/QYm3XSR//Xr8BeEXU49Lc/mQmpmVVG5jPUVrpc2iptup/0WMrY9mzas0fxH+TjYvG2CA== + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.5.1" + "@rollup/rollup-android-arm64" "4.5.1" + "@rollup/rollup-darwin-arm64" "4.5.1" + "@rollup/rollup-darwin-x64" "4.5.1" + "@rollup/rollup-linux-arm-gnueabihf" "4.5.1" + "@rollup/rollup-linux-arm64-gnu" "4.5.1" + "@rollup/rollup-linux-arm64-musl" "4.5.1" + "@rollup/rollup-linux-x64-gnu" "4.5.1" + "@rollup/rollup-linux-x64-musl" "4.5.1" + "@rollup/rollup-win32-arm64-msvc" "4.5.1" + "@rollup/rollup-win32-ia32-msvc" "4.5.1" + "@rollup/rollup-win32-x64-msvc" "4.5.1" + fsevents "~2.3.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== + dependencies: + loose-envify "^1.1.0" + +semver@^7.0.0, semver@^7.1.1, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + +shallowequal@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +sigstore@^2.0.0, sigstore@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-2.1.0.tgz#c577b596642b3f360dc4135d476466e6edeb2364" + integrity sha512-kPIj+ZLkyI3QaM0qX8V/nSsweYND3W448pwkDgS6CQ74MfhEkIR8ToK5Iyx46KJYRjseVcD3Rp9zAmUAj6ZjPw== + dependencies: + "@sigstore/bundle" "^2.1.0" + "@sigstore/protobuf-specs" "^0.2.1" + "@sigstore/sign" "^2.1.0" + "@sigstore/tuf" "^2.1.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socks-proxy-agent@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz#5acbd7be7baf18c46a3f293a840109a430a640ad" + integrity sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g== + dependencies: + agent-base "^7.0.2" + debug "^4.3.4" + socks "^2.7.1" + +socks@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" + integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== + dependencies: + ip "^2.0.0" + smart-buffer "^4.2.0" + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +spdx-correct@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0, spdx-expression-parse@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.16" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz#a14f64e0954f6e25cc6587bd4f392522db0d998f" + integrity sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw== + +ssri@^10.0.0, ssri@^10.0.5: + version "10.0.5" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.5.tgz#e49efcd6e36385196cb515d3a2ad6c3f0265ef8c" + integrity sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A== + dependencies: + minipass "^7.0.3" + +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1, strip-ansi@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +styled-components@^6.1.1: + version "6.1.1" + resolved "https://registry.npmjs.org/styled-components/-/styled-components-6.1.1.tgz" + integrity sha512-cpZZP5RrKRIClBW5Eby4JM1wElLVP4NQrJbJ0h10TidTyJf4SIIwa3zLXOoPb4gJi8MsJ8mjq5mu2IrEhZIAcQ== + dependencies: + "@emotion/is-prop-valid" "^1.2.1" + "@emotion/unitless" "^0.8.0" + "@types/stylis" "^4.0.2" + css-to-react-native "^3.2.0" + csstype "^3.1.2" + postcss "^8.4.31" + shallowequal "^1.1.0" + stylis "^4.3.0" + tslib "^2.5.0" + +stylis@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/stylis/-/stylis-4.3.0.tgz" + integrity sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^9.4.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.4.0.tgz#17bfcf686288f531db3dea3215510621ccb55954" + integrity sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw== + +tar@^6.1.11, tar@^6.1.2, tar@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73" + integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + +text-table@^0.2.0, text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +tiny-relative-date@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07" + integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +treeverse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/treeverse/-/treeverse-3.0.0.tgz#dd82de9eb602115c6ebd77a574aae67003cb48c8" + integrity sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ== + +ts-api-utils@^1.0.1: + version "1.0.3" + resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== + +tslib@^2.5.0: + version "2.6.2" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + +tuf-js@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-2.2.0.tgz#4daaa8620ba7545501d04dfa933c98abbcc959b9" + integrity sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg== + dependencies: + "@tufjs/models" "2.0.0" + debug "^4.3.4" + make-fetch-happen "^13.0.0" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +typescript@^5.2.2: + version "5.3.2" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz" + integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== + +unique-filename@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" + integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== + dependencies: + unique-slug "^4.0.0" + +unique-slug@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" + integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== + dependencies: + imurmurhash "^0.1.4" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +validate-npm-package-license@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +validate-npm-package-name@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz#f16afd48318e6f90a1ec101377fa0384cfc8c713" + integrity sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ== + dependencies: + builtins "^5.0.0" + +vite@^5.0.0: + version "5.0.2" + resolved "https://registry.npmjs.org/vite/-/vite-5.0.2.tgz" + integrity sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g== + dependencies: + esbuild "^0.19.3" + postcss "^8.4.31" + rollup "^4.2.0" + optionalDependencies: + fsevents "~2.3.3" + +walk-up-path@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-3.0.1.tgz#c8d78d5375b4966c717eb17ada73dbd41490e886" + integrity sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA== + +wcwidth@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +which@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a" + integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== + dependencies: + isexe "^3.1.1" + +wide-align@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^5.0.0, write-file-atomic@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" + integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^4.0.1" + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==