diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..4ed04c5 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,19 @@ +module.exports = { + root: true, + env: { + node: true + }, + extends: ["plugin:vue/recommended", "@vue/prettier"], + rules: { + "no-console": process.env.NODE_ENV === "production" ? "error" : "off", + "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off" + }, + parserOptions: { + parser: "babel-eslint" + } +}; + +// "plugin:vue/recommended", +// "eslint:recommended", +// "prettier/vue", +// "plugin:prettier/recommended" diff --git a/.github/workflows/CLOSE_STALE.yml b/.github/workflows/CLOSE_STALE.yml new file mode 100644 index 0000000..2c15bb5 --- /dev/null +++ b/.github/workflows/CLOSE_STALE.yml @@ -0,0 +1,23 @@ +name: Close inactive issues +on: + schedule: + - cron: "0 8 * * *" + workflow_dispatch: + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v4 + with: + operations-per-run: '100' + days-before-issue-stale: 60 + days-before-issue-close: 7 + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for 60 days with no activity." + close-issue-message: "This issue was closed because it has been + inactive for 7 days since being marked as stale." + repo-token: ${{ secrets.GITHUB }} diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000..47f24e1 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,30 @@ +# This is a basic workflow that is manually triggered + +name: Manual workflow + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + name: + # Friendly description to be shown in the UI instead of 'name' + description: 'Person to greet' + # Default value if no value is explicitly provided + default: 'World' + # Input has to be provided for the workflow to run + required: true + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "greet" + greet: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Send greeting + run: echo "Hello ${{ github.event.inputs.name }}" diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index af377ad..c5bfa0b --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,31 @@ -.idea/ -node_modules/ -demo/ -.npmignore .DS_Store -npm-debug.log +node_modules +# public +dist/*.gz +dist/*.gz +dist/.DS_Store +coverage +docs/.vuepress/dist +# dist +# local env files +.env.local +.env.*.local -*.log -.DS_Store +# related test files +/tests/e2e/reports +/tests/e2e/videos +/tests/e2e/screenshots -# produced by vbuild -dist -dist-example +# editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw* +# Backups +.BACKUP +.STORAGE -example/cloudinary.vue +public-demos \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7ceeda1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "vetur.validation.template": false, + "workbench.colorCustomizations": {} +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..b3ada1c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,506 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [2.10.3](https://github.com/davidroyer/vue2-editor/compare/v2.10.2...v2.10.3) (2021-08-21) + + + +### [2.10.3-ssr.5](https://github.com/davidroyer/vue2-editor/compare/v2.10.3-ssr.4...v2.10.3-ssr.5) (2021-08-19) + + +### Improvements + +* improves code by using `const` instead of `let` ([68d825a](https://github.com/davidroyer/vue2-editor/commit/68d825a)) + + + +### [2.10.3-ssr.4](https://github.com/davidroyer/vue2-editor/compare/v2.10.3-ssr.3...v2.10.3-ssr.4) (2021-08-18) + + +### Refactoring + +* now using `npm` in script ([435e558](https://github.com/davidroyer/vue2-editor/commit/435e558)) +* reverts to original code ([e738762](https://github.com/davidroyer/vue2-editor/commit/e738762)) + + + +### [2.10.3-ssr.3](https://github.com/davidroyer/vue2-editor/compare/v2.10.3-ssr.2...v2.10.3-ssr.3) (2021-07-29) + + +### Bug Fixes + +* resolves badly merged code ([81185f7](https://github.com/davidroyer/vue2-editor/commit/81185f7)) + + + +### [2.10.3-ssr.2](https://github.com/davidroyer/vue2-editor/compare/v2.10.3-ssr.1...v2.10.3-ssr.2) (2021-07-29) + + + +### [2.10.3-ssr.1](https://github.com/davidroyer/vue2-editor/compare/v2.10.3-ssr.0...v2.10.3-ssr.1) (2021-07-29) + + + +### [2.10.3-ssr.0](https://github.com/davidroyer/vue2-editor/compare/v2.10.2...v2.10.3-ssr.0) (2021-07-29) + + +### Bug Fixes + +* fixes dev issue not working ([76d5701](https://github.com/davidroyer/vue2-editor/commit/76d5701)) + + + +### [2.10.2](https://github.com/davidroyer/vue2-editor/compare/v2.10.1...v2.10.2) (2019-08-23) + + + +### [2.10.1](https://github.com/davidroyer/vue2-editor/compare/v2.10.0...v2.10.1) (2019-08-23) + + +### Bug Fixes + +* Fixes emitted names. Closes [#152](https://github.com/davidroyer/vue2-editor/issues/152). ([6ef96c2](https://github.com/davidroyer/vue2-editor/commit/6ef96c2)) + + + +## [2.10.0](https://github.com/davidroyer/vue2-editor/compare/v2.9.1...v2.10.0) (2019-08-05) + + +### Features + +* **imageRemoved:** new emitter for deleted images ([eecc696](https://github.com/davidroyer/vue2-editor/commit/eecc696)) + + + +### [2.9.1](https://github.com/davidroyer/vue2-editor/compare/v2.9.0...v2.9.1) (2019-07-03) + + + +## [2.9.0](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.10...v2.9.0) (2019-07-03) + + + +## [2.9.0-next.10](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.9...v2.9.0-next.10) (2019-07-03) + + + +## [2.9.0-next.9](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.8...v2.9.0-next.9) (2019-06-30) + + + +## [2.9.0-next.8](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.7...v2.9.0-next.8) (2019-06-23) + + +### Bug Fixes + +* fixes build with update vplugin ([f7c0a23](https://github.com/davidroyer/vue2-editor/commit/f7c0a23)) + + + +## [2.9.0-next.7](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.6...v2.9.0-next.7) (2019-06-23) + + +### Refactoring + +* **releases:** updates scripts ([ef1aadb](https://github.com/davidroyer/vue2-editor/commit/ef1aadb)) + + + +## [2.9.0-next.6](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.5...v2.9.0-next.6) (2019-06-21) + + + +## [2.9.0-next.5](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.4...v2.9.0-next.5) (2019-06-21) + + +### Documentation + +* adds to notes ([0ebaf48](https://github.com/davidroyer/vue2-editor/commit/0ebaf48)) +* adds to notes ([86d5244](https://github.com/davidroyer/vue2-editor/commit/86d5244)) + + + +## [2.9.0-next.4](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.3...v2.9.0-next.4) (2019-06-21) + + + +## [2.9.0-next.3](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.2...v2.9.0-next.3) (2019-06-21) + + +### Documentation + +* **notes:** adds to `NOTES.md` ([d420988](https://github.com/davidroyer/vue2-editor/commit/d420988)) + + + +## [2.9.0-next.2](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.1...v2.9.0-next.2) (2019-06-21) + + +### Documentation + +* add NOTES and TODO's ([1c43b1c](https://github.com/davidroyer/vue2-editor/commit/1c43b1c)) + + + +## [2.9.0-next.1](https://github.com/davidroyer/vue2-editor/compare/v2.9.0-next.0...v2.9.0-next.1) (2019-06-21) + + +### Bug Fixes + +* **build:** updates build compand for modular ([f450a61](https://github.com/davidroyer/vue2-editor/commit/f450a61)) + + + +## [2.9.0-next.0](https://github.com/davidroyer/vue2-editor/compare/v2.8.1...v2.9.0-next.0) (2019-06-21) + + +### Documentation + +* :pencil: updates another example to import ([2e7fb3a](https://github.com/davidroyer/vue2-editor/commit/2e7fb3a)) + + +### Features + +* **modular build:** :zap: adds modular build ([75aa89d](https://github.com/davidroyer/vue2-editor/commit/75aa89d)) + + + +## [2.8.0-alpha.9](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.8...v2.8.0-alpha.9) (2019-06-12) + + + +### [2.8.1](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.8...v2.8.1) (2019-06-12) + + +## [2.8.0-alpha.9](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.8...v2.8.0-alpha.9) (2019-06-12) + +### Documentation + +* :pencil: moving examples to be imported ([6a49a96](https://github.com/davidroyer/vue2-editor/commit/6a49a96)) +* clean up `config.js` ([a02efbf](https://github.com/davidroyer/vue2-editor/commit/a02efbf)) +* fixes install command code ([3603060](https://github.com/davidroyer/vue2-editor/commit/3603060)) +* removes unused declarations ([60f1845](https://github.com/davidroyer/vue2-editor/commit/60f1845)) + +## [2.8.0-alpha.8](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.7...v2.8.0-alpha.8) (2019-06-12) + + +### Documentation + +* sets fenced code blocks to `vue` ([6f66647](https://github.com/davidroyer/vue2-editor/commit/6f66647)) + + + +## [2.8.0-alpha.7](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.6...v2.8.0-alpha.7) (2019-06-12) + + +### Bug Fixes + +* fixes analytics ([3dd8b8d](https://github.com/davidroyer/vue2-editor/commit/3dd8b8d)) +* **build:** removes `dist` from `.gitignore` ([c8747c6](https://github.com/davidroyer/vue2-editor/commit/c8747c6)) + + +### Documentation + +* fixes assets error ([7411501](https://github.com/davidroyer/vue2-editor/commit/7411501)) +* fixes styles ([4e97781](https://github.com/davidroyer/vue2-editor/commit/4e97781)) +* removes unwanted text ([c5b6ced](https://github.com/davidroyer/vue2-editor/commit/c5b6ced)) +* testing demo-code and snippets ([a42b0a0](https://github.com/davidroyer/vue2-editor/commit/a42b0a0)) +* updates docs to current version ([69e470d](https://github.com/davidroyer/vue2-editor/commit/69e470d)) + + + +## [2.8.0-alpha.6](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.5...v2.8.0-alpha.6) (2019-06-11) + + +### Refactoring + +* removes `src` from files property ([7d7f350](https://github.com/davidroyer/vue2-editor/commit/7d7f350)) + + + +## [2.8.0-alpha.5](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.4...v2.8.0-alpha.5) (2019-06-11) + + +### Documentation + +* :pencil: fixes docs ([5746f2c](https://github.com/davidroyer/vue2-editor/commit/5746f2c)) +* begins to bring in current content ([be246c0](https://github.com/davidroyer/vue2-editor/commit/be246c0)) + + + +## [2.8.0-alpha.4](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.3...v2.8.0-alpha.4) (2019-06-08) + + + +## [2.8.0-alpha.3](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.2...v2.8.0-alpha.3) (2019-06-08) + + +### Bug Fixes + +* :hammer: adds vplugin as dev dependency ([cfe874a](https://github.com/davidroyer/vue2-editor/commit/cfe874a)) + + +### Documentation + +* :books: adds initial customization ([0695594](https://github.com/davidroyer/vue2-editor/commit/0695594)) + + +### Improvements + +* :ballot_box_with_check: eslint config ([e6f8f84](https://github.com/davidroyer/vue2-editor/commit/e6f8f84)) + + +### Refactoring + +* adds vuepress to eslint and removes demo ([bb6eadd](https://github.com/davidroyer/vue2-editor/commit/bb6eadd)) + + + +## [2.8.0-alpha.2](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.1...v2.8.0-alpha.2) (2019-06-07) + + +### Build System + +* :wrench: scripts to better handle releases ([41d6968](https://github.com/davidroyer/vue2-editor/commit/41d6968)) + + + +## [2.8.0-alpha.1](https://github.com/davidroyer/vue2-editor/compare/v2.8.0-alpha.0...v2.8.0-alpha.1) (2019-06-07) + + + +## [2.8.0-alpha.0](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.21...v2.8.0-alpha.0) (2019-06-07) + + +### Features + +* :fire: uses Rollup for build ([f469753](https://github.com/davidroyer/vue2-editor/commit/f469753)) + +### [2.7.2](https://github.com/davidroyer/vue2-editor/compare/v2.7.1...v2.7.2) (2019-05-26) + + + +### [2.7.1](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.21...v2.7.1) (2019-05-26) + + + +## [2.7.0](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.21...v2.7.0) (2019-05-26) + + + +## [2.7.0-alpha.21](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.20...v2.7.0-alpha.21) (2019-05-26) + + +### Bug Fixes + +* removes wrong cli option for \`build:demos\`' ([ece166c](https://github.com/davidroyer/vue2-editor/commit/ece166c)) +* **demos:** removes ex. with 2 duplicate editors ([5948223](https://github.com/davidroyer/vue2-editor/commit/5948223)) + + + +## [2.7.0-alpha.20](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.19...v2.7.0-alpha.20) (2019-05-26) + + + +## [2.7.0-alpha.19](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.18...v2.7.0-alpha.19) (2019-05-26) + + + +## [2.7.0-alpha.18](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.17...v2.7.0-alpha.18) (2019-05-26) + + + +## [2.7.0-alpha.17](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.16...v2.7.0-alpha.17) (2019-05-26) + + + +## [2.7.0-alpha.16](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.15...v2.7.0-alpha.16) (2019-05-26) + + +### Bug Fixes + +* reduces bundle size ([bf1b8b8](https://github.com/davidroyer/vue2-editor/commit/bf1b8b8)) + + + +## [2.7.0-alpha.15](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.14...v2.7.0-alpha.15) (2019-05-26) + + +### Bug Fixes + +* **package.json:** removes src from files property ([108f1be](https://github.com/davidroyer/vue2-editor/commit/108f1be)) + + + +## [2.7.0-alpha.14](https://github.com/davidroyer/vue2-editor/compare/v2.7.1-alpha.0...v2.7.0-alpha.14) (2019-05-26) + + + +### [2.7.1-alpha.0](https://github.com/davidroyer/vue2-editor/compare/v2.7.0...v2.7.1-alpha.0) (2019-05-26) + + + +## [2.7.0](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.13...v2.7.0) (2019-05-26) + + +### Bug Fixes + +* removes unused and non-working config option ([61098d7](https://github.com/davidroyer/vue2-editor/commit/61098d7)) + + + +## [2.7.0-alpha.13](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.12...v2.7.0-alpha.13) (2019-05-24) + + +### Bug Fixes + +* **scripts:** removes unused config option ([09b303e](https://github.com/davidroyer/vue2-editor/commit/09b303e)) + + + +## [2.7.0-alpha.12](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.11...v2.7.0-alpha.12) (2019-05-24) + + +### Bug Fixes + +* fixes libraryName ([8cfb6fd](https://github.com/davidroyer/vue2-editor/commit/8cfb6fd)) + + + +## [2.7.0-alpha.11](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.10...v2.7.0-alpha.11) (2019-05-24) + + + +## [2.7.0-alpha.10](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.9...v2.7.0-alpha.10) (2019-05-24) + + + +## [2.7.0-alpha.9](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.8...v2.7.0-alpha.9) (2019-05-16) + + +### Bug Fixes + +* fixes changed package file names ([1209d94](https://github.com/davidroyer/vue2-editor/commit/1209d94)) + + + +## [2.7.0-alpha.8](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.7...v2.7.0-alpha.8) (2019-05-16) + + +### Bug Fixes + +* fixes name for browser field ([3851164](https://github.com/davidroyer/vue2-editor/commit/3851164)) + + + +## [2.7.0-alpha.7](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.6...v2.7.0-alpha.7) (2019-05-15) + + + +## [2.7.0-alpha.6](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.5...v2.7.0-alpha.6) (2019-05-15) + + +### Bug Fixes + +* adds `files` property ([11fd1ad](https://github.com/davidroyer/vue2-editor/commit/11fd1ad)) + + + +## [2.7.0-alpha.5](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.4...v2.7.0-alpha.5) (2019-05-15) + + + +## [2.7.0-alpha.4](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.3...v2.7.0-alpha.4) (2019-05-15) + + + +## [2.7.0-alpha.3](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.2...v2.7.0-alpha.3) (2019-05-15) + + + +## [2.7.0-alpha.2](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.1...v2.7.0-alpha.2) (2019-05-15) + + +### Bug Fixes + +* fixes README layout ([6f95733](https://github.com/davidroyer/vue2-editor/commit/6f95733)) + + +### Tests + +* **git:** testing new lines ([a312d19](https://github.com/davidroyer/vue2-editor/commit/a312d19)) + + + +## [2.7.0-alpha.1](https://github.com/davidroyer/vue2-editor/compare/v2.7.0-alpha.0...v2.7.0-alpha.1) (2019-05-15) + +## [2.7.0-alpha.0](https://github.com/davidroyer/vue2-editor/compare/v2.4.1...v2.7.0-alpha.0) (2019-05-14) + +### Features + +- **builds:** now using bili.js & standard-version ([fb9ebc8](https://github.com/davidroyer/vue2-editor/commit/fb9ebc8)) + +### 2.6.6 (2018-08-04) + +### Build System + +- **package.json:** Needed to add `publishConfig` property to _npm_ and set it as the `registry` ([63c066f](https://github.com/davidroyer/vue2-editor/commit/63c066f)) + +### 2.6.5 (2018-08-04) + +### 2.6.4 (2018-08-04) + +### 2.6.3 (2018-08-04) + +### 2.6.2 (2018-08-04) + +### Build System + +- **package.json:** Added `commitizen` and changelog dependencies ([a11f2d8](https://github.com/davidroyer/vue2-editor/commit/a11f2d8)) + +### 2.4.2 (2018-02-04) + + + +## [2.6.6](https://github.com/davidroyer/vue2-editor/compare/2.6.5...2.6.6) (2018-08-04) + + + +## [2.6.5](https://github.com/davidroyer/vue2-editor/compare/2.6.4...2.6.5) (2018-08-04) + + + +## [2.6.4](https://github.com/davidroyer/vue2-editor/compare/2.6.3...2.6.4) (2018-08-04) + + + +## [2.6.3](https://github.com/davidroyer/vue2-editor/compare/2.6.2...2.6.3) (2018-08-04) + + + +## [2.6.2](https://github.com/davidroyer/vue2-editor/compare/2.4.2...2.6.2) (2018-08-04) + + + +## [2.6.1](https://github.com/davidroyer/vue2-editor/compare/2.4.2...2.6.1) (2018-08-03) + + + +## [2.4.2](https://github.com/davidroyer/vue2-editor/compare/v2.4.1...2.4.2) (2018-02-04) + + + +## [2.4.1](https://github.com/davidroyer/vue2-editor/compare/v2.5.0...v2.4.1) (2018-02-04) + + + +# [2.5.0](https://github.com/davidroyer/vue2-editor/compare/2.4.0...v2.5.0) (2018-02-04) + + + +# [2.4.0](https://github.com/davidroyer/vue2-editor/compare/2.0.0...2.4.0) (2018-01-29) + + + +# 2.0.0 (2017-04-06) diff --git a/LICENSE b/LICENSE index 548517e..2b80834 100755 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,20 @@ The MIT License (MIT) -Copyright (c) 2017. David Royer +Copyright (c) 2019 David Royer -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index bc3f96c..21e6cb5 100644 --- a/README.md +++ b/README.md @@ -1,145 +1,188 @@ -# Vue2-Editor +# Vue2Editor -![Vue2Editor-Centered](https://www.dropbox.com/s/7com4d32zct44nc/Vue2Editor-Centered.png?raw=1) HTML Editor using Vue.js and Quilljs +> An easy-to-use but yet powerful and customizable rich text editor powered by Quill.js and Vue.js -[Vue.js](https://vuejs.org) +

+ +

View Docs

+ +

-[Quill](http://quilljs.com/) +![Vue2Editor-Centered](https://www.dropbox.com/s/7com4d32zct44nc/Vue2Editor-Centered.png?raw=1) - +[📖 **Release Notes**](./CHANGELOG.md) + + + + + + + +## Install -# Install _You can use Yarn or NPM_ ```bash -$ npm install --save vue2-editor +npm install vue2-editor ``` + **OR** + ```bash yarn add vue2-editor ``` -# Usage +## Usage ```javascript -import { VueEditor } from 'vue2-editor' +// Basic Use - Covers most scenarios +import { VueEditor } from "vue2-editor"; -//... your code +// Advanced Use - Hook into Quill's API for Custom Functionality +import { VueEditor, Quill } from "vue2-editor"; ``` -# Props +## Nuxt.js -Name | Type | Default | Description --------------- | ------ | -------------------------------------------------- | ---------------------------------------------------------------------- -id | String | quill-container | Set the id (necessary if multiple editors in the same view) -v-model | String | - | Set v-model to the the content or data property you wish to bind it to -useCustomImageHandler | Boolean | false | Handle image uploading instead of using default conversion to Base64 -placeholder | String | - | Placeholder text for the editor -disabled | Boolean | false | Set to true to disable editor -editorToolbar | Array | ** _Too long for table. See toolbar example below_ | Use a custom toolbar +Add `vue2-editor/nuxt` to modules section of `nuxt.config.js` -# Events -Name | Parameters | Description --------------- | ------------ | ---------------------------------------------------------------------- -imageAdded | file, Editor, cursorLocation | Emitted when useCustomImageHandler is true and photo is being added to the editor - +```javascript +{ + modules: ["vue2-editor/nuxt"]; +} +``` -## Example -**_Basic Setup_** +To avoid seeing warnings from Vue about a mismatch in content, you'll need to +wrap the `VueEditor` component with the `client-only` component Nuxt provides as +shown here: ```html + + + +``` + +## Props + +| Name | Type | Default | Description | +| --------------------- | ------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------- | +| customModules | Array | - | Declare Quill modules to register | Use a custom toolbar | +| disabled | Boolean | false | Set to true to disable editor | +| editorOptions | Object | - | Offers object for merging into default config (add formats, custom Quill modules, ect) | +| editorToolbar | Array | \*\* _Too long for table. See toolbar example below_ | Use a custom toolbar | +| id | String | quill-container | Set the id (necessary if multiple editors in the same view) | +| placeholder | String | - | Placeholder text for the editor | +| useCustomImageHandler | Boolean | false | Handle image uploading instead of using default conversion to Base64 | +| v-model | String | - | Set v-model to the the content or data property you wish to bind it to | + +## Events + +| Name | Parameters | Description | +| ---------------- | ---------------------------- | ----------------------------------------------------------------------------------- | +| blur | quill | Emitted on `blur` event | +| focus | quill | Emitted on `focus` event | +| image-added | file, Editor, cursorLocation | Emitted when `useCustomImageHandler` is true and photo is being added to the editor | +| image-removed | file, Editor, cursorLocation | Emitted when `useCustomImageHandler` is true and photo has been deleted | +| selection-change | range, oldRange, source | Emitted on Quill's `selection-change` event | +| text-change | delta, oldDelta, source | Emitted on Quill's `text-change` event | + +## Examples + +### Example - Basic Setup + +```vue +
+ +
+ - + data() { + return { + content: "

Some initial content

" + }; + } +}; + ``` -## Example - -**_Upload image to server and use returned url instead of data URL_** +### Example - Custom Image Handler If you choose to use the custom image handler, an event is emitted when a a photo is selected. You can see below that 3 parameters are passed. + 1. It passes the file to be handled however you need 2. The Editor instance -4. The cursor position at the time of upload so the image can be inserted at the correct position on success +3. The cursor position at the time of upload so the image can be inserted at the correct position on success -**NOTE** In addition to this example, I have created a [new example repo](https://github.com/davidroyer/vue2editor-images) demonstrating this new feature with an actual server. +**NOTE** In addition to this example, I have created a [example repo](https://github.com/davidroyer/vue2editor-images) demonstrating this new feature with an actual server. -```html +```vue ``` -## Example +### Example - Set Contents After Page Load -**_Set Contents After Page Load_** - -```html +```vue ``` -## Example +### Example - Using Multiple Editors -**_Using Multiple Editors_** - -```html +```vue ``` +### Example - Custom Toolbar -## Example -**_Custom Toolbar_** - -```html +```vue ``` +### Example - Saving The Content -### Example -**_Saving the Content_** -```html +```vue ``` -## Example -**_Use a Live Preview_** +### Example - Use a Live Preview -```html +```vue +``` + +### How To Use Custom Quill Modules + +There are two ways of using custom modules with Vue2Editor. This is partly because there have been cases in which errors are thrown when importing and attempting to declare custom modules, and partly because I believe it actually separates the concerns nicely. + +#### Version 1 - **_Import and Register Yourself_** + +Vue2Editor now exports Quill to assist in this process. + +1. When importing VueEditor, also import Quill. +2. Import your custom modules +3. Register the custom modules with Quill +4. Add the necessary configuration to the `editorOptions` object + +```vue + + + ``` +#### Version 2 - **_You Import | Vue2Editor Registers_** + +**_(Recommended way)_** -# Folder structure +1. Import your custom modules +2. Use the `customModules` prop to declare an array of module(s). +3. Add the necessary configuration for those modules in the `editorOptions` object under modules as seen below -- `src/`: Source files for this component +```vue + - - `Vue2Editor.vue` The component itself + +``` - - `index.js`: Entry for the example - - `App.vue`: The root component which we use to load this component +--- -- `vbuild.example.js`: Config file for your example -- `vbuild.component.js`: Config file for your component -- `package.json`: App manifest -- `.editorconfig`: Ensure consistent editor behaivor -- `.gitignore`: Ignore files we don't need to push +## Development -# Development +Vue2Editor now uses [Poi](https://github.com/egoist/poi) for development -- `yarn example`: Run example in development mode -- `yarn deploy`: Deploy example to gh-pages -- `yarn build:cjs`: Build component in commonjs format -- `yarn build:umd`: Build component in umd format +- `yarn dev`: Run example in development mode +- `yarn docs`: Development for Docs - `yarn build`: Build component in both format - `yarn lint`: Run eslint -Check out your npm scripts, it's using [vbuild](https://github.com/egoist/vbuild) under the hood. + -# License +## License MIT diff --git a/TODO b/TODO new file mode 100644 index 0000000..42932bf --- /dev/null +++ b/TODO @@ -0,0 +1,7 @@ + +Todo: + ✔ Need to fix build so regular builds are including `CSS` @done(19-06-23 00:01) + + ✔ Figure out Rollup CSS - NEED TO UPDATE CSS BUILD SO IT ONLY OUTPUTS YOUR CUSTOM CSS AND THEN THE USER CAN IMPORT QUILL'S STYLES ON THEIR OWN @done(19-06-23 01:08) + + ✔ Change it `import 'vue2-editor/dist/vue2-editor.core.js'` @done(19-06-28 23:40) \ No newline at end of file diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..e90fc07 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: [["@vue/app", { useBuiltIns: false }]] +}; diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..661d895 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,3 @@ +module.exports = { + extends: ["@commitlint/config-conventional"] +}; diff --git a/demo/Demo.vue b/demo/Demo.vue new file mode 100644 index 0000000..f79ee65 --- /dev/null +++ b/demo/Demo.vue @@ -0,0 +1,15 @@ + + + + + diff --git a/demo/index.html b/demo/index.html new file mode 100644 index 0000000..cc8fde9 --- /dev/null +++ b/demo/index.html @@ -0,0 +1,10 @@ + + + + + Vue Plugin Demo + + +
+ + diff --git a/demo/main.js b/demo/main.js new file mode 100644 index 0000000..dc2955c --- /dev/null +++ b/demo/main.js @@ -0,0 +1,13 @@ +import Vue from 'vue' +import App from '~entry' +import plugin from '../src/index' + +Vue.use(plugin) + +Vue.config.productionTip = false + +new Vue({ + // NOTE: if you need to inject as option, you can set here! + // plugin, + render: h => h(App) +}).$mount('#app') diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index eb4eada..0000000 --- a/dist/index.js +++ /dev/null @@ -1 +0,0 @@ -(function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Vue2Editor=e():t.Vue2Editor=e()})(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=20)}([function(t,e,n){(function(e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e){var i=r(o),l=o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"});return[n].concat(l).concat([i]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+new e(JSON.stringify(t)).toString("base64")+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;on.parts.length&&(r.parts.length=n.parts.length)}else{for(var l=[],o=0;o=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function y(t){return+t!=t&&(t=0),i.alloc(+t)}function b(t,e){if(i.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(t).length;default:if(r)return Y(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,n);case"utf8":case"utf-8":return j(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return P(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function m(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=i.from(e,r)),i.isBuffer(e))return 0===e.length?-1:q(t,e,n,r,o);if("number"==typeof e)return e&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):q(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function q(t,e,n,r,o){function i(t,e){return 1===l?t[e]:t.readUInt16BE(e*l)}var l=1,a=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;l=2,a/=2,s/=2,n/=2}var u;if(o){var c=-1;for(u=n;ua&&(n=a-s),u=n;u>=0;u--){for(var f=!0,d=0;do&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var l=0;l239?4:i>223?3:i>191?2:1;if(o+a<=n){var s,u,c,f;switch(a){case 1:i<128&&(l=i);break;case 2:s=t[o+1],128==(192&s)&&(f=(31&i)<<6|63&s)>127&&(l=f);break;case 3:s=t[o+1],u=t[o+2],128==(192&s)&&128==(192&u)&&(f=(15&i)<<12|(63&s)<<6|63&u)>2047&&(f<55296||f>57343)&&(l=f);break;case 4:s=t[o+1],u=t[o+2],c=t[o+3],128==(192&s)&&128==(192&u)&&128==(192&c)&&(f=(15&i)<<18|(63&s)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(l=f)}}null===l?(l=65533,a=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=a}return N(r)}function N(t){var e=t.length;if(e<=J)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var o="",i=e;in)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,o,l){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function M(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o>>8*(r?o:1-o)}function I(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o>>8*(r?o:3-o)&255}function B(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(t,e,n,r,o){return o||B(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,n,r,23,4),n+4}function D(t,e,n,r,o){return o||B(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,n,r,52,8),n+8}function z(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function Y(t,e){e=e||1/0;for(var n,r=t.length,o=null,i=[],l=0;l55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(l+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function K(t){for(var e=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function V(t){return $.toByteArray(z(t))}function W(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function G(t){return t!==t}var $=n(5),X=n(9),Q=n(10);e.Buffer=i,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=r(),i.poolSize=8192,i._augment=function(t){return t.__proto__=i.prototype,t},i.from=function(t,e,n){return l(null,t,e,n)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(t,e,n){return s(null,t,e,n)},i.allocUnsafe=function(t){return u(null,t)},i.allocUnsafeSlow=function(t){return u(null,t)},i.isBuffer=function(t){return!(null==t||!t._isBuffer)},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,l=Math.min(n,r);o0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},i.prototype.compare=function(t,e,n,r,o){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,o>>>=0,this===t)return 0;for(var l=o-r,a=n-e,s=Math.min(l,a),u=this.slice(r,o),c=t.slice(e,n),f=0;fo)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return k(this,t,e,n);case"latin1":case"binary":return O(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;i.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(o*=256);)r+=this[t+--e]*o;return r},i.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],o=1,i=0;++i=o&&(r-=Math.pow(2,8*e)),r},i.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},i.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),X.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),X.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),X.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),X.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){R(this,t,e,n,Math.pow(2,8*n)-1,0)}var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+n},i.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},i.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},i.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):I(this,t,e,!0),e+4},i.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},i.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);R(this,t,e,n,o-1,-o)}var i=0,l=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+n},i.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);R(this,t,e,n,o-1,-o)}var i=n-1,l=1,a=0;for(this[e+i]=255&t;--i>=0&&(l*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/l>>0)-a&255;return e+n},i.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},i.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},i.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):I(this,t,e,!0),e+4},i.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},i.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},i.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},i.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},i.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},i.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--o)t[o+e]=this[o+n];else if(l<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var l;if("number"==typeof t)for(l=e;l0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function o(t){return 3*t.length/4-r(t)}function i(t){var e,n,o,i,l,a,s=t.length;l=r(t),a=new f(3*s/4-l),o=l>0?s-4:s;var u=0;for(e=0,n=0;e>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===l?(i=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[u++]=255&i):1===l&&(i=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}function l(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function a(t,e,n){for(var r,o=[],i=e;is?s:l+16383));return 1===r?(e=t[n-1],o+=u[e>>2],o+=u[e<<4&63],o+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],o+=u[e>>10],o+=u[e>>4&63],o+=u[e<<2&63],o+="="),i.push(o),i.join("")}e.byteLength=o,e.toByteArray=i,e.fromByteArray=s;for(var u=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,h=d.length;pli:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;cursor:text;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"\\2022"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"\\2611"}.ql-editor ul[data-checked=false]>li:before{content:"\\2610"}.ql-editor li:before{display:inline-block;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em}.ql-editor ol li,.ql-editor ul li{padding-left:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-num}.ql-editor ol li:before{content:counter(list-num,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;pointer-events:none;position:absolute}',""])},function(t,e,n){e=t.exports=n(0)(void 0),e.push([t.i,'/*!\n * Quill Editor v1.2.3\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;cursor:text;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"\\2022"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"\\2611"}.ql-editor ul[data-checked=false]>li:before{content:"\\2610"}.ql-editor li:before{display:inline-block;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em}.ql-editor ol li,.ql-editor ul li{padding-left:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-num}.ql-editor ol li:before{content:counter(list-num,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;pointer-events:none;position:absolute}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover{color:#06c}.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter{stroke:#06c}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-stroke.ql-thin,.ql-snow .ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding-bottom:2px;padding-top:2px}.ql-snow .ql-editor code:after,.ql-snow .ql-editor code:before{content:"\\A0";letter-spacing:-2px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-item:before,.ql-snow .ql-picker.ql-header .ql-picker-label:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-item:before,.ql-snow .ql-picker.ql-font .ql-picker-label:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-item:before,.ql-snow .ql-picker.ql-size .ql-picker-label:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:0 2px 8px rgba(0,0,0,.2)}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}',""])},function(t,e,n){e=t.exports=n(0)(void 0),e.push([t.i,"#quill-container{height:400px}",""])},function(t,e){e.read=function(t,e,n,r,o){var i,l,a=8*o-r-1,s=(1<>1,c=-7,f=n?o-1:0,d=n?-1:1,p=t[e+f];for(f+=d,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[e+f],f+=d,c-=8);for(l=i&(1<<-c)-1,i>>=-c,c+=r;c>0;l=256*l+t[e+f],f+=d,c-=8);if(0===i)i=1-u;else{if(i===s)return l?NaN:1/0*(p?-1:1);l+=Math.pow(2,r),i-=u}return(p?-1:1)*l*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var l,a,s,u=8*i-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,l=c):(l=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-l))<1&&(l--,s*=2),e+=l+f>=1?d/s:d*Math.pow(2,1-f),e*s>=2&&(l++,s/=2),l+f>=c?(a=0,l=c):l+f>=1?(a=(e*s-1)*Math.pow(2,o),l+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),l=0));o>=8;t[n+p]=255&a,p+=h,a/=256,o-=8);for(l=l<0;t[n+p]=255&l,p+=h,l/=256,u-=8);t[n+p-h]|=128*y}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(e){(function(e,n){t.exports=n()})(0,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=136)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(21),o=n(22),i=n(23),l=n(59),a=n(58),s=n(56),u=n(57),c=n(60),f=n(13),d=n(31),p=n(33),h=n(32),y=n(1),b={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:r.default,Format:o.default,Leaf:i.default,Embed:u.default,Scroll:l.default,Block:s.default,Inline:a.default,Text:c.default,Attributor:{Attribute:f.default,Class:d.default,Style:p.default,Store:h.default}};e.default=b},function(t,e,n){"use strict";function r(t,e){var n=i(t);if(null==n)throw new s("Unable to create "+t+" blot");var r=n;return new r(t instanceof Node?t:r.create(e),e)}function o(t,n){return void 0===n&&(n=!1),null==t?null:null!=t[e.DATA_KEY]?t[e.DATA_KEY].blot:n?o(t.parentNode,n):null}function i(t,e){void 0===e&&(e=p.ANY);var n;if("string"==typeof t)n=d[t]||u[t];else if(t instanceof Text)n=d.text;else if("number"==typeof t)t&p.LEVEL&p.BLOCK?n=d.block:t&p.LEVEL&p.INLINE&&(n=d.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=c[r[o]])break;n=n||f[t.tagName]}return null==n?null:e&p.LEVEL&n.scope&&e&p.TYPE&n.scope?n:null}function l(){for(var t=[],e=0;e1)return t.map(function(t){return l(t)});var n=t[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new s("Invalid definition");if("abstract"===n.blotName)throw new s("Cannot register abstract class");if(d[n.blotName||n.attrName]=n,"string"==typeof n.keyName)u[n.keyName]=n;else if(null!=n.className&&(c[n.className]=n),null!=n.tagName){Array.isArray(n.tagName)?n.tagName=n.tagName.map(function(t){return t.toUpperCase()}):n.tagName=n.tagName.toUpperCase();var r=Array.isArray(n.tagName)?n.tagName:[n.tagName];r.forEach(function(t){null!=f[t]&&null!=n.className||(f[t]=n)})}return n}var a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=this;return e="[Parchment] "+e,n=t.call(this,e)||this,n.message=e,n.name=n.constructor.name,n}return a(e,t),e}(Error);e.ParchmentError=s;var u={},c={},f={},d={};e.DATA_KEY="__blot";var p;(function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"})(p=e.Scope||(e.Scope={})),e.create=r,e.find=o,e.query=i,e.register=l},function(t,e,n){var r=n(54),o=n(11),i=n(3),l=n(20),a=String.fromCharCode(0),s=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};s.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},s.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},s.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},s.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},s.prototype.filter=function(t){return this.ops.filter(t)},s.prototype.forEach=function(t){this.ops.forEach(t)},s.prototype.map=function(t){return this.ops.map(t)},s.prototype.partition=function(t){var e=[],n=[];return this.forEach(function(r){(t(r)?e:n).push(r)}),[e,n]},s.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},s.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},s.prototype.length=function(){return this.reduce(function(t,e){return t+l.length(e)},0)},s.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=l.iterator(this.ops),o=0;o0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},s.prototype.diff=function(t,e){if(this.ops===t.ops)return new s;var n=[this,t].map(function(e){return e.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;var r=e===t?"on":"with";throw new Error("diff() called "+r+" non-document")}).join("")}),i=new s,u=r(n[0],n[1],e),c=l.iterator(this.ops),f=l.iterator(t.ops);return u.forEach(function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var a=c.next(n),s=f.next(n);o(a.insert,s.insert)?i.retain(n,l.attributes.diff(a.attributes,s.attributes)):i.push(s).delete(n)}e-=n}}),i.chop()},s.prototype.eachLine=function(t,e){e=e||"\n";for(var n=l.iterator(this.ops),r=new s,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),a=l.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(e,a)-a:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===t(r,n.next(1).attributes||{},o))return;o+=1,r=new s}}r.length()>0&&t(r,{},o)},s.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=l.iterator(this.ops),r=l.iterator(t.ops),o=new s;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),a=n.next(i),u=r.next(i);if(a.delete)continue;u.delete?o.push(u):o.retain(i,l.attributes.transform(a.attributes,u.attributes,e))}else o.retain(l.length(n.next()));return o.chop()},s.prototype.transformPosition=function(t,e){e=!!e;for(var n=l.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,f.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:a(t.parent,e))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var s=function(){function t(t,e){for(var n=0;n0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(y.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[w.default,m.default,k.default],e.bubbleFormats=a,e.BlockEmbed=O,e.default=x},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0){var a,s=[g.default.events.TEXT_CHANGE,l,i,e];if((a=this.emitter).emit.apply(a,[g.default.events.EDITOR_CHANGE].concat(s)),e!==g.default.sources.SILENT){var c;(c=this.emitter).emit.apply(c,s)}}return l}function s(t,e,n,r,o){var i={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":c(n))?(i=n,o=r):"string"==typeof n&&(null!=r?i[n]=r:o=n),o=o||g.default.sources.API,[t,e,i,o]}function u(t,e,n,r){if(null==t)return null;var o=void 0,i=void 0;if(e instanceof h.default){var l=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,r===g.default.sources.USER)}),a=f(l,2);o=a[0],i=a[1]}else{var s=[t.index,t.index+t.length].map(function(t){return t=0?t+n:Math.max(e,t+n)}),u=f(s,2);o=u[0],i=u[1]}return new k.Range(o,i-o)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,t),this.options=l(e,r),this.container=this.options.container,null==this.container)return P.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new g.default,this.scroll=_.default.create(this.root,{emitter:this.emitter,scrollingContainer:this.scrollingContainer,whitelist:this.options.formats}),this.editor=new b.default(this.scroll),this.selection=new O.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(g.default.events.EDITOR_CHANGE,function(t){t===g.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(g.default.events.SCROLL_UPDATE,function(t,e){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;a.call(n,function(){return n.editor.update(null,e,o)},t)});var s=this.clipboard.convert("
"+o+"


");this.setContents(s),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return d(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),j.default.level(t)}},{key:"find",value:function(t){return t.__quill||_.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&P.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var o=t.attrName||t.blotName;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach(function(r){n.register(r,t[r],e)})}else null==this.imports[t]||r||P.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?_.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),d(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;t=document.createElement("div"),t.classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,o=s(t,e,n),i=f(o,4);return t=i[0],e=i[1],n=i[3],a.call(this,function(){return r.editor.deleteText(t,e)},n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.selection.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g.default.sources.API;return a.call(this,function(){var r=n.getSelection(!0),i=new h.default;if(null==r)return i;if(_.default.query(t,_.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,o({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,o({},t,e))}return n.setSelection(r,g.default.sources.SILENT),i},r)}},{key:"formatLine",value:function(t,e,n,r,o){var i=this,l=void 0,u=s(t,e,n,r,o),c=f(u,4);return t=c[0],e=c[1],l=c[2],o=c[3],a.call(this,function(){return i.editor.formatLine(t,e,l)},o,t,0)}},{key:"formatText",value:function(t,e,n,r,o){var i=this,l=void 0,u=s(t,e,n,r,o),c=f(u,4);return t=c[0],e=c[1],l=c[2],o=c[3],a.call(this,function(){return i.editor.formatText(t,e,l)},o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=s(t,e),r=f(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=s(t,e),r=f(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return a.call(this,function(){return o.editor.insertEmbed(e,n,r)},i,e)}},{key:"insertText",value:function(t,e,n,r,o){var i=this,l=void 0,u=s(t,0,n,r,o),c=f(u,4);return t=c[0],l=c[2],o=c[3],a.call(this,function(){return i.editor.insertText(t,e,l)},o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,o=s(t,e,n),i=f(o,4);return t=i[0],e=i[1],n=i[3],a.call(this,function(){return r.editor.removeFormat(t,e)},n,t)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return a.call(this,function(){t=new h.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),i=o.ops[o.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),o.delete(1)),r.compose(o)},n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=s(e,n,r),i=f(o,4);e=i[0],n=i[1],r=i[3],this.selection.setRange(new k.Range(e,n),r)}r!==g.default.sources.SILENT&&this.selection.scrollIntoView()}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API,n=(new h.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return a.call(this,function(){return t=new h.default(t),e.editor.applyDelta(t,n)},n,!0)}}]),t}();S.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},S.events=g.default.events,S.sources=g.default.sources,S.version="1.2.3",S.imports={delta:h.default,parchment:_.default,"core/module":q.default,"core/theme":T.default},e.expandConfig=l,e.overload=s,e.default=S},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(l),s=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),e}(a.default.Embed);e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0){var t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),o=e.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.quill=e,this.options=n};o.DEFAULTS={},e.default=o},function(t,e,n){"use strict";function r(t){if(i.indexOf(t)<=i.indexOf(l)){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0&&"number"!=typeof t[0]))}function i(t,e,n){var i,c;if(r(t)||r(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return!!s(e)&&(t=l.call(t),e=l.call(e),u(t,e,n));if(o(t)){if(!o(e))return!1;if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(f[i]!=d[i])return!1;for(i=f.length-1;i>=0;i--)if(c=f[i],!u(t[c],e[c],n))return!1;return typeof t==typeof e}var l=Array.prototype.slice,a=n(52),s=n(51),u=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:i(t,e,n))}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(l),s=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),e}(a.default.Text);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||this.whitelist.indexOf(e)>-1)},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)?e:""},t}();e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return Object.keys(e).reduce(function(n,r){return null==t[r]?n:(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]],n)},{})}function a(t){return t.reduce(function(t,e){if(1===e.insert){var n=(0,O.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||(e=(0,O.default)(e),e.attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)},new d.default)}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function t(t,e){for(var n=0;n=r&&!a.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,a);var c=e.scroll.line(t),f=u(c,2),d=f[0],p=f[1],y=(0,j.default)({},(0,w.bubbleFormats)(d));if(d instanceof _.default){var v=d.descendant(b.default.Leaf,p),g=u(v,1),m=g[0];y=(0,j.default)(y,(0,w.bubbleFormats)(m))}l=h.default.attributes.diff(y,l)||{}}else if("object"===s(o.insert)){var q=Object.keys(o.insert)[0];if(null==q)return t;e.scroll.insertAt(t,q,o.insert[q])}r+=i}return Object.keys(l).forEach(function(n){e.scroll.formatAt(t,i,n,l[n])}),t+i},0),t.reduce(function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batch=!1,this.scroll.optimize(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new d.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(t,Math.max(e,1)),l=e;i.forEach(function(e){var i=e.length();if(e instanceof g.default){var a=t-e.offset(n.scroll),s=e.newlineIndex(a+l)-a+1;e.formatAt(a,s,o,r[o])}else e.format(o,r[o]);l-=i})}}),this.scroll.optimize(),this.update((new d.default).retain(t).retain(e,(0,O.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e,o,r[o])}),this.update((new d.default).retain(t).retain(e,(0,O.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new d.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach(function(t){var e=u(t,1),o=e[0];o instanceof _.default?n.push(o):o instanceof b.default.Leaf&&r.push(o)}):(n=this.scroll.lines(t,e),r=this.scroll.descendants(b.default.Leaf,t,e));var o=[n,r].map(function(t){if(0===t.length)return{};for(var e=(0,w.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=l((0,w.bubbleFormats)(n),e)}return e});return j.default.apply(j.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter(function(t){return"string"==typeof t.insert}).map(function(t){return t.insert}).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new d.default).retain(t).insert(o({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e.length,o,r[o])}),this.update((new d.default).retain(t).insert(e,(0,O.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.length()<=1&&0==Object.keys(t.formats()).length}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),o=u(r,2),i=o[0],l=o[1],a=0,s=new d.default;null!=i&&(a=i instanceof g.default?i.newlineIndex(l)-l+1:i.length()-l,s=i.delta().slice(l,l+a-1).insert("\n"));var c=this.getContents(t,e+a),f=c.diff((new d.default).insert(n).concat(s)),p=(new d.default).retain(t).concat(f);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&b.default.find(e[0].target)){var o=b.default.find(e[0].target),i=(0,w.bubbleFormats)(o),l=o.offset(this.scroll),a=e[0].oldValue.replace(q.default.CONTENTS,""),s=(new d.default).insert(a),u=(new d.default).insert(o.value());t=(new d.default).retain(l).concat(s.diff(u,n)).reduce(function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)},new d.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,E.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();e.default=N},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1&&void 0!==arguments[1]?arguments[1]:0;i(this,t),this.index=e,this.length=n},w=function(){function t(e,n){var r=this;i(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.root=this.scroll.domNode,this.root.addEventListener("compositionstart",function(){r.composing=!0}),this.root.addEventListener("compositionend",function(){r.composing=!1}),this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new q(0,0),["keyup","mouseup","mouseleave","touchend","touchleave","focus","blur"].forEach(function(t){r.root.addEventListener(t,function(){setTimeout(r.update.bind(r,b.default.sources.USER),100)})}),this.emitter.on(b.default.events.EDITOR_CHANGE,function(t,e){t===b.default.events.TEXT_CHANGE&&e.length()>0&&r.update(b.default.sources.SILENT)}),this.emitter.on(b.default.events.SCROLL_BEFORE_UPDATE,function(){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(b.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}})}),this.update(b.default.sources.SILENT)}return s(t,[{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!c.default.query(t,c.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=c.default.find(n.start.node,!1);if(null==r)return;if(r instanceof c.default.Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=this.scroll.leaf(t),i=a(o,2),l=i[0],s=i[1];if(null==l)return null;var u=l.position(s,!0),c=a(u,2);r=c[0],s=c[1];var f=document.createRange();if(e>0){f.setStart(r,s);var d=this.scroll.leaf(t+e),p=a(d,2);if(l=p[0],s=p[1],null==l)return null;var h=l.position(s,!0),y=a(h,2);return r=y[0],s=y[1],f.setEnd(r,s),f.getBoundingClientRect()}var b="left",v=void 0;return r instanceof Text?(s0&&(b="right")),{bottom:v.top+v.height,height:v.height,left:v[b],right:v[b],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;if(!l(this.root,e.startContainer)||!e.collapsed&&!l(this.root,e.endContainer))return null;var n={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[n.start,n.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),m.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this,e=this.getNativeRange();if(null==e)return[null,null];var n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var r=n.map(function(e){var n=a(e,2),r=n[0],o=n[1],i=c.default.find(r,!0),l=i.offset(t.scroll);return 0===o?l:i instanceof c.default.Container?l+i.length():l+i.index(r,o)}),i=Math.min.apply(Math,o(r)),l=Math.max.apply(Math,o(r));return l=Math.min(l,this.scroll.length()-1),[new q(i,l-i),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"scrollIntoView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastRange;if(null!=t){var e=this.getBounds(t.index,t.length);if(null!=e){var n=this.scroll.length()-1,r=this.scroll.line(Math.min(t.index,n)),o=a(r,1),i=o[0],l=i;if(t.length>0){var s=this.scroll.line(Math.min(t.index+t.length,n));l=a(s,1)[0]}if(null!=i&&null!=l){var u=this.scroll.scrollingContainer,c=u.getBoundingClientRect();e.topc.bottom&&(u.scrollTop+=e.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(m.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native;if(null==l||o||t!==l.startContainer||e!==l.startOffset||n!==l.endContainer||r!==l.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,r),i.removeAllRanges(),i.addRange(a)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b.default.sources.API;if("string"==typeof n&&(r=n,n=!1),m.info("setRange",t),null!=t){var i=t.collapsed?[t.index]:[t.index,t.index+t.length],l=[],s=this.scroll.length();i.forEach(function(t,n){t=Math.min(s-1,t);var r=void 0,o=e.scroll.leaf(t),i=a(o,2),u=i[0],c=i[1],f=u.position(c,0!==n),d=a(f,2);r=d[0],c=d[1],l.push(r,c)}),l.length<2&&(l=l.concat(l)),this.setNativeRange.apply(this,o(l).concat([n]))}else this.setNativeRange(null);this.update(r)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b.default.sources.USER,e=this.lastRange,n=this.getRange(),r=a(n,2),o=r[0],i=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,h.default)(e,this.lastRange)){var l;!this.composing&&null!=i&&i.native.collapsed&&i.start.node!==this.cursor.textNode&&this.cursor.restore();var s=[b.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(e),t];if((l=this.emitter).emit.apply(l,[b.default.events.EDITOR_CHANGE].concat(s)),t!==b.default.sources.SILENT){var u;(u=this.emitter).emit.apply(u,s)}}}}]),t}();e.Range=q,e.default=w},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var n=0;n=t+n)){var l=this.newlineIndex(t,!0)+1,a=i-l+1,s=this.isolate(l,a),u=s.next;s.format(r,o),u instanceof e&&u.formatAt(0,t-l+n-a,r,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(m.default,t),o=a(r,2),i=o[0],l=o[1];i.insertAt(l,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(){this.domNode.textContent.endsWith("\n")||this.appendChild(p.default.create("text","\n")),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this);var t=this.next;null!=t&&t.prev===this&&t.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===t.statics.formats(t.domNode)&&(t.optimize(),t.moveChildren(this),t.remove())}},{key:"replace",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=p.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof p.default.Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(y.default);w.blotName="code-block",w.tagName="PRE",w.TAB=" ",e.Code=q,e.default=w},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n0&&!(i instanceof y.BlockEmbed)&&!(f instanceof y.BlockEmbed)){f instanceof _.default&&f.deleteAt(f.length()-1,1);var d=f.children.head instanceof g.default?null:f.children.head;i.moveChildren(f,d),i.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,o){(null==this.whitelist||this.whitelist[r])&&(c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==d.default.query(n,d.default.Scope.BLOCK)){var o=d.default.create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var i=d.default.create(n,r);this.appendChild(i)}else c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===d.default.Scope.INLINE_BLOT){var r=d.default.create(this.statics.defaultChild);r.appendChild(t),t=r}c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(a,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return function t(e,n,r){var o=[],i=r;return e.children.forEachAt(n,r,function(e,n,r){a(e)?o.push(e):e instanceof d.default.Container&&(o=o.concat(t(e,n,i))),i-=r}),o}(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!0!==this.batch&&(c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),t.length>0&&this.emitter.emit(h.default.events.SCROLL_OPTIMIZE,t))}},{key:"path",value:function(t){return c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=h.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE,n,t),c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(h.default.events.SCROLL_UPDATE,n,t)}}}]),e}(d.default.Scroll);k.blotName="scroll",k.className="ql-editor",k.tagName="DIV",k.defaultChild="block",k.allowedChildren=[b.default,y.BlockEmbed,q.default],e.default=k},function(t,n){var r=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}function n(r,o,i,l,f){function d(r,i){if(null===r)return null;if(0===i)return r;var b,v;if("object"!=typeof r)return r;if(t(r,s))b=new s;else if(t(r,u))b=new u;else if(t(r,c))b=new c(function(t,e){r.then(function(e){t(d(e,i-1))},function(t){e(d(t,i-1))})});else if(n.__isArray(r))b=[];else if(n.__isRegExp(r))b=new RegExp(r.source,a(r)),r.lastIndex&&(b.lastIndex=r.lastIndex);else if(n.__isDate(r))b=new Date(r.getTime());else{if(y&&e.isBuffer(r))return b=new e(r.length),r.copy(b),b;t(r,Error)?b=Object.create(r):void 0===l?(v=Object.getPrototypeOf(r),b=Object.create(v)):(b=Object.create(l),v=l)}if(o){var g=p.indexOf(r);if(-1!=g)return h[g];p.push(r),h.push(b)}t(r,s)&&r.forEach(function(t,e){var n=d(e,i-1),r=d(t,i-1);b.set(n,r)}),t(r,u)&&r.forEach(function(t){var e=d(t,i-1);b.add(e)});for(var m in r){var q;v&&(q=Object.getOwnPropertyDescriptor(v,m)),q&&null==q.set||(b[m]=d(r[m],i-1))}if(Object.getOwnPropertySymbols)for(var w=Object.getOwnPropertySymbols(r),m=0;m0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,r){return o(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new r(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=l.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},t.exports=l},function(t,e,n){"use strict";function r(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(61),l=n(34),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){var e=this;t.prototype.attach.call(this),this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=r(t);e.insertBefore(n,e.children.head)}catch(t){if(t instanceof a.ParchmentError)return;throw t}})},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1];return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,function(n,r,l){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&o.push(n),n instanceof e&&(o=o.concat(n.descendants(t,r,i))),i-=l}),o},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,function(t,e,o){t.formatAt(e,o,n,r)})},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1];if(o)o.insertAt(i,e,n);else{var l=null==n?a.create("text",e):a.create(e,n);this.appendChild(l)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(){if(t.prototype.optimize.call(this),0===this.children.length)if(null!=this.statics.defaultChild){var e=a.create(this.statics.defaultChild);this.appendChild(e),e.optimize()}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),o=r[0],i=r[1],l=[[this,t]];return o instanceof e?l.concat(o.path(i,n)):(null!=o&&l.push([o,i]),l)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,r,o){t=t.split(r,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t){var e=this,n=[],o=[];t.forEach(function(t){t.target===e.domNode&&"childList"===t.type&&(n.push.apply(n,t.addedNodes),o.push.apply(o,t.removedNodes))}),o.forEach(function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var n=a.find(t);null!=n&&(null!=n.domNode.parentNode&&n.domNode.parentNode!==e.domNode||n.detach())}}),n.filter(function(t){return t.parentNode==e.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var n=null;null!=t.nextSibling&&(n=a.find(t.nextSibling));var o=r(t);o.next==n&&null!=o.next||(null!=o.parent&&o.parent.removeChild(e),e.insertBefore(o,n))})},e}(l.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(13),i=n(32),l=n(21),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.attach=function(){t.prototype.attach.call(this),this.attributes=new i.default(this.domNode)},e.prototype.format=function(t,e){var n=a.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e){var n=this;t.prototype.update.call(this,e),e.some(function(t){return t.target===n.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,r){var o=t.prototype.wrap.call(this,n,r);return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},e}(l.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(34),i=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return t!==this.domNode?-1:Math.min(e,1)},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return t={},t[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e}(o.default);l.scope=i.Scope.INLINE_BLOT,e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),s=r(a),u=n(4),c=r(u),f=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(s.default.Container);f.allowedChildren=[c.default,u.BlockEmbed,f],e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=function(){function t(t,e){for(var n=0;n-1}Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var a=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":o(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n0&&this.quill.formatLine(t.index-s,s,i,j.default.sources.USER),this.quill.selection.scrollIntoView()}}function s(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;t.index>=this.quill.getLength()-n||this.quill.deleteText(t.index,n,j.default.sources.USER)}function u(t){this.quill.deleteText(t,j.default.sources.USER),this.quill.setSelection(t.index,j.default.sources.SILENT),this.quill.selection.scrollIntoView()}function c(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce(function(t,n){return E.default.query(n,E.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",r,j.default.sources.USER),this.quill.setSelection(t.index+1,j.default.sources.SILENT),this.quill.selection.scrollIntoView(),Object.keys(e.format).forEach(function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],j.default.sources.USER))})}function f(t){return{key:R.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=E.default.query("code-block"),r=e.index,o=e.length,i=this.quill.scroll.descendant(n,r),l=y(i,2),a=l[0],s=l[1];if(null!=a){var u=this.quill.getIndex(a),c=a.newlineIndex(s,!0)+1,f=a.newlineIndex(u+s+o),d=a.domNode.textContent.slice(c,f).split("\n");s=0,d.forEach(function(e,i){t?(a.insertAt(c+s,n.TAB),s+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(a.deleteAt(c+s,n.TAB.length),s-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),s+=e.length+1}),this.quill.update(j.default.sources.USER),this.quill.setSelection(r,o,j.default.sources.SILENT)}}}}function d(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],j.default.sources.USER)}}}function p(t){if("string"==typeof t||"number"==typeof t)return p({key:t});if("object"===(void 0===t?"undefined":h(t))&&(t=(0,g.default)(t,!1)),"string"==typeof t.key)if(null!=R.keys[t.key.toUpperCase()])t.key=R.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[L]=t.shortKey,delete t.shortKey),t}Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=p(t);if(null==r||null==r.key)return C.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,_.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,o=(t.bindings[r]||[]).filter(function(t){return e.match(n,t)});if(0!==o.length){var i=t.quill.getSelection();if(null!=i&&t.quill.hasFocus()){var l=t.quill.getLine(i.index),a=y(l,2),s=a[0],u=a[1],c=t.quill.getLeaf(i.index),f=y(c,2),d=f[0],p=f[1],b=0===i.length?[d,p]:t.quill.getLeaf(i.index+i.length),v=y(b,2),g=v[0],m=v[1],w=d instanceof E.default.Text?d.value().slice(0,p):"",_=g instanceof E.default.Text?g.value().slice(m):"",k={collapsed:0===i.length,empty:0===i.length&&s.length()<=1,format:t.quill.getFormat(i),offset:u,prefix:w,suffix:_};o.some(function(e){if(null!=e.collapsed&&e.collapsed!==k.collapsed)return!1;if(null!=e.empty&&e.empty!==k.empty)return!1;if(null!=e.offset&&e.offset!==k.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==k.format[t]}))return!1}else if("object"===h(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=k.format[t]:!1===e.format[t]?null==k.format[t]:(0,q.default)(e.format[t],k.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(k.prefix))&&(!(null!=e.suffix&&!e.suffix.test(k.suffix))&&!0!==e.handler.call(t,i,k))})&&n.preventDefault()}}}})}}]),e}(S.default);R.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},R.DEFAULTS={bindings:{bold:d("bold"),italic:d("italic"),underline:d("underline"),indent:{key:R.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",j.default.sources.USER)}},outdent:{key:R.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",j.default.sources.USER)}},"outdent backspace":{key:R.keys.BACKSPACE,collapsed:!0,format:["blockquote","indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",j.default.sources.USER):null!=e.format.blockquote?this.quill.format("blockquote",!1,j.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,j.default.sources.USER)}},"indent code-block":f(!0),"outdent code-block":f(!1),"remove tab":{key:R.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,j.default.sources.USER)}},tab:{key:R.keys.TAB,handler:function(t,e){e.collapsed||this.quill.scroll.deleteAt(t.index,t.length),this.quill.insertText(t.index,"\t",j.default.sources.USER),this.quill.setSelection(t.index+1,j.default.sources.SILENT)}},"list empty enter":{key:R.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,j.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,j.default.sources.USER)}},"checklist enter":{key:R.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){this.quill.scroll.insertAt(t.index,"\n");var e=this.quill.getLine(t.index+1);y(e,1)[0].format("list","unchecked"),this.quill.update(j.default.sources.USER),this.quill.setSelection(t.index+1,j.default.sources.SILENT),this.quill.selection.scrollIntoView()}},"header enter":{key:R.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t){this.quill.scroll.insertAt(t.index,"\n"),this.quill.formatText(t.index+1,1,"header",!1,j.default.sources.USER),this.quill.setSelection(t.index+1,j.default.sources.SILENT),this.quill.selection.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(1\.|-|\[ \]|\[x\])$/,handler:function(t,e){if(null!=this.quill.scroll.whitelist&&!this.quill.scroll.whitelist.list)return!0;var n=e.prefix.length,r=void 0;switch(e.prefix.trim()){case"[ ]":r="unchecked";break;case"[x]":r="checked";break;case"-":r="bullet";break;default:r="ordered"}this.quill.scroll.deleteAt(t.index-n,n),this.quill.formatLine(t.index-n,1,"list",r,j.default.sources.USER),this.quill.setSelection(t.index-n,j.default.sources.SILENT)}},"code exit":{key:R.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){this.quill.format("code-block",!1,j.default.sources.USER),this.quill.deleteText(t.index-2,1,j.default.sources.USER)}}}},e.default=R,e.SHORTKEY=L},function(t,e,n){"use strict";function r(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(13),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){r(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=r(t,this.keyName)[0]||"",n=e.slice(this.keyName.length+1);return this.canAdd(t,n)?n:""},e}(i.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(13),o=n(31),i=n(33),l=n(1),a=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),a=i.default.keys(this.domNode);e.concat(n).concat(a).forEach(function(e){var n=l.query(e,l.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();e.default=a},function(t,e,n){"use strict";function r(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(13),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){return t.split(":")[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[r(this.keyName)];return this.canAdd(t,e)?e:""},e}(i.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t){this.domNode=t,this.attach()}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){this.domNode[r.DATA_KEY]={blot:this}},t.prototype.clone=function(){var t=this.domNode.cloneNode();return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var l=r.create(this.statics.scope);i.wrap(l),l.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){if(null!=this.parent&&this.parent.children.remove(this),t.children.insertBefore(this,e),null!=e)var n=e.domNode;null!=this.next&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,void 0!==n?n:null),this.parent=t},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t){void 0===t&&(t=[])},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t}();o.blotName="abstract",e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=n(0),i=r(o),l=n(6),a=r(l),s=n(4),u=r(s),c=n(17),f=r(c),d=n(24),p=r(d),h=n(25),y=r(h),b=n(7),v=r(b),g=n(8),m=r(g),q=n(18),w=r(q),_=n(12),k=r(_),O=n(45),x=r(O),E=n(42),A=r(E),j=n(30),N=r(j);a.default.register({"blots/block":u.default,"blots/block/embed":s.BlockEmbed,"blots/break":f.default,"blots/container":p.default,"blots/cursor":y.default,"blots/embed":v.default,"blots/inline":m.default,"blots/scroll":w.default,"blots/text":k.default,"modules/clipboard":x.default,"modules/history":A.default,"modules/keyboard":N.default}),i.default.register(u.default,f.default,y.default,m.default,w.default,k.default),t.exports=a.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var r=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(r),i={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},l=new o.default.Attributor.Attribute("align","align",i),a=new o.default.Attributor.Class("align","ql-align",i),s=new o.default.Attributor.Style("align","text-align",i);e.AlignAttribute=l,e.AlignClass=a,e.AlignStyle=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var r=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(r),i=n(26),l=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),a=new i.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});e.BackgroundClass=l,e.BackgroundStyle=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var r=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(r),i={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},l=new o.default.Attributor.Attribute("direction","dir",i),a=new o.default.Attributor.Class("direction","ql-direction",i),s=new o.default.Attributor.Style("direction","direction",i);e.DirectionAttribute=l,e.DirectionClass=a,e.DirectionStyle=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var l=function(){function t(t,e){for(var n=0;nr&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(y.default);b.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=b,e.getLastChangeIndex=s},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:o.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i=0&&n.length-1}function d(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce(function(e,n){return n(t,e)},new x.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],function(r,o){var i=d(o,e,n);return o.nodeType===t.ELEMENT_NODE&&(i=e.reduce(function(t,e){return e(o,t)},i),i=(o[z]||[]).reduce(function(t,e){return e(o,t)},i)),r.concat(i)},new x.default):new x.default}function p(t,e,n){return n.compose((new x.default).retain(n.length(),o({},t,!0)))}function h(t,e){var n=A.default.Attributor.Attribute.keys(t),r=A.default.Attributor.Class.keys(t),o=A.default.Attributor.Style.keys(t),i={};return n.concat(r).concat(o).forEach(function(e){var n=A.default.query(e,A.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(null!=H[e]&&(n=H[e],i[n.attrName]=n.value(t)||void 0),null!=Y[e]&&(n=Y[e],i[n.attrName]=n.value(t)||void 0))}),Object.keys(i).length>0&&(e=e.compose((new x.default).retain(e.length(),i))),e}function y(t,e){var n=A.default.query(t);if(null==n)return e;if(n.prototype instanceof A.default.Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new x.default).insert(r,n.formats(t)))}else if("function"==typeof n.formats){var l=o({},n.blotName,n.formats(t));e=e.compose((new x.default).retain(e.length(),l))}return e}function b(t,e){return c(e,"\n")||e.insert("\n"),e}function v(){return new x.default}function g(t,e){return f(t)&&!c(e,"\n")&&e.insert("\n"),e}function m(t,e){if(f(t)&&null!=t.nextElementSibling&&!c(e,"\n\n")){var n=t.offsetHeight+parseFloat(u(t).marginTop)+parseFloat(u(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function q(t,e){var n={},r=t.style||{};return r.fontStyle&&"italic"===u(t).fontStyle&&(n.italic=!0),r.fontWeight&&"bold"===u(t).fontWeight&&(n.bold=!0),Object.keys(n).length>0&&(e=e.compose((new x.default).retain(e.length(),n))),parseFloat(r.textIndent||0)>0&&(e=(new x.default).insert("\t").concat(e)),e}function w(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(!u(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return e=e.replace(/[^\u00a0]/g,""),e.length<1&&t?" ":e};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&f(t.parentNode)||null!=t.previousSibling&&f(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&f(t.parentNode)||null!=t.nextSibling&&f(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var _=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),k=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:N.default.sources.API;if("string"==typeof t)return this.quill.setContents(this.convert(t),e);var r=this.convert(e);return this.quill.updateContents((new x.default).retain(t).concat(r),n)}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new x.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),setTimeout(function(){e.quill.selection.update(N.default.sources.SILENT),r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,N.default.sources.USER),e.quill.setSelection(r.length()-n.length,N.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=o,e.quill.selection.scrollIntoView()},1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach(function(r){var o=_(r,2),i=o[0],l=o[1];switch(i){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:e.push(l);break;default:[].forEach.call(t.container.querySelectorAll(i),function(t){t[z]=t[z]||[],t[z].push(l)})}}),[e,n]}}]),e}(C.default);K.DEFAULTS={matchers:[]},e.default=K,e.matchAttributor=h,e.matchBlot=y,e.matchNewline=g,e.matchSpacing=m,e.matchText=w},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function u(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach(function(t){if("string"==typeof t)s(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?c(n,e,r):s(n,e,r)}}),t.appendChild(n)})}function c(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach(function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)}),t.appendChild(r)}Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var f=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2];e.forEach(function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,y.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,y.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":var n=t.match(/^(https?):\/\/(www\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(https?):\/\/(www\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);n?t=n[1]+"://www.youtube.com/embed/"+n[3]+"?showinfo=0":(n=t.match(/^(https?):\/\/(www\.)?vimeo\.com\/(\d+)/))&&(t=n[1]+"://player.vimeo.com/video/"+n[3]+"/");case"formula":if(!t)break;var r=this.quill.getSelection(!0),o=r.index+r.length;null!=r&&(this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),t,y.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",y.default.sources.USER),this.quill.setSelection(o+2,y.default.sources.USER))}this.textbox.value="",this.hide()}}]),e}(A.default);e.BaseTooltip=L,e.default=C},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;nr.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.leftr.bottom){var l=o.bottom-o.top,a=t.bottom-t.top+l;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e){function n(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function r(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=o?n:r,e.supported=n,e.unsupported=r},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}e=t.exports="function"==typeof Object.keys?Object.keys:n,e.shim=n},function(t,e){"use strict";function n(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){this._events=new n,this._eventsCount=0}var i=Object.prototype.hasOwnProperty,l="~";Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(l=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(l?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t,e){var n=l?l+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);oe.length?t:e,l=t.length>e.length?e:t,a=i.indexOf(l);if(-1!=a)return r=[[h,i.substring(0,a)],[y,l],[h,i.substring(a+l.length)]],t.length>e.length&&(r[0][0]=r[2][0]=p),r;if(1==l.length)return[[p,t],[h,e]];var u=s(t,e);if(u){var c=u[0],f=u[1],d=u[2],b=u[3],v=u[4],g=n(c,d),m=n(f,b);return g.concat([[y,v]],m)}return o(t,e)}function o(t,e){for(var n=t.length,r=e.length,o=Math.ceil((n+r)/2),l=o,a=2*o,s=new Array(a),u=new Array(a),c=0;cn)b+=2;else if(k>r)y+=2;else if(d){var O=l+f-q;if(O>=0&&O=x)return i(t,e,w,k)}}}for(var E=-m+v;E<=m-g;E+=2){var x,O=l+E;x=E==-m||E!=m&&u[O-1]n)g+=2;else if(A>r)v+=2;else if(!d){var _=l+f-E;if(_>=0&&_=x)return i(t,e,w,k)}}}}return[[p,t],[h,e]]}function i(t,e,r,o){var i=t.substring(0,r),l=e.substring(0,o),a=t.substring(r),s=e.substring(o),u=n(i,l),c=n(a,s);return u.concat(c)}function l(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n=t.length?[r,o,i,s,f]:null}var r=t.length>e.length?t:e,o=t.length>e.length?e:t;if(r.length<4||2*o.lengthu[4].length?s:u:s;var c,f,d,p;return t.length>e.length?(c=i[0],f=i[1],d=i[2],p=i[3]):(d=i[0],p=i[1],c=i[2],f=i[3]),[c,f,d,p,i[4]]}function u(t){t.push([y,""]);for(var e,n=0,r=0,o=0,i="",s="";n1?(0!==r&&0!==o&&(e=l(s,i),0!==e&&(n-r-o>0&&t[n-r-o-1][0]==y?t[n-r-o-1][1]+=s.substring(0,e):(t.splice(0,0,[y,s.substring(0,e)]),n++),s=s.substring(e),i=i.substring(e)),0!==(e=a(s,i))&&(t[n][1]=s.substring(s.length-e)+t[n][1],s=s.substring(0,s.length-e),i=i.substring(0,i.length-e))),0===r?t.splice(n-o,r+o,[h,s]):0===o?t.splice(n-r,r+o,[p,i]):t.splice(n-r-o,r+o,[p,i],[h,s]),n=n-r-o+(r?1:0)+(o?1:0)+1):0!==n&&t[n-1][0]==y?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,i="",s=""}""===t[t.length-1][1]&&t.pop();var c=!1;for(n=1;n0&&r.splice(o+2,0,[l[0],a]),d(r,o,3)}return t}function d(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1 '},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(22),i=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var r=i.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=i.query(n,i.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,o){null!=i.query(r,i.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=i.query(n,i.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),l=i.create(n,r);o.parent.insertBefore(l,o)}},e.prototype.update=function(e){navigator.userAgent.match(/Trident/)?this.attach():t.prototype.update.call(this,e)},e}(o.default);l.blotName="block",l.scope=i.Scope.BLOCK_BLOT,l.tagName="P",e.default=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(23),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(o.default);e.default=i},function(t,e,n){"use strict";function r(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(22),l=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach(function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){if(null!=this.formats()[r]||l.query(r,l.Scope.ATTRIBUTE)){this.isolate(e,n).format(r,o)}else t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.optimize=function(){t.prototype.optimize.call(this);var n=this.formats();if(0===Object.keys(n).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&r(n,o.formats())&&(o.moveChildren(this),o.remove())},e}(i.default);a.blotName="inline",a.scope=l.Scope.INLINE_BLOT,a.tagName="SPAN",e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(21),i=n(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=null,n.observer=new MutationObserver(function(t){n.update(t)}),n.observer.observe(n.domNode,l),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e){var n=this;void 0===e&&(e=[]),t.prototype.optimize.call(this);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var l=function(t,e){void 0===e&&(e=!0),null!=t&&t!==n&&null!=t.domNode.parentNode&&(null==t.domNode[i.DATA_KEY].mutations&&(t.domNode[i.DATA_KEY].mutations=[]),e&&l(t.parent))},a=function(t){null!=t.domNode[i.DATA_KEY]&&null!=t.domNode[i.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(a),t.optimize())},s=e,u=0;s.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(s.forEach(function(t){var e=i.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(l(i.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=i.find(t,!1);l(e,!1),e instanceof o.default&&e.children.forEach(function(t){l(t,!1)})})):"attributes"===t.type&&l(e.prev)),l(e))}),this.children.forEach(a),s=[].slice.call(this.observer.takeRecords()),r=s.slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e){var n=this;e=e||this.observer.takeRecords(),e.map(function(t){var e=i.find(t.target,!0);if(null!=e)return null==e.domNode[i.DATA_KEY].mutations?(e.domNode[i.DATA_KEY].mutations=[t],e):(e.domNode[i.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==n&&null!=t.domNode[i.DATA_KEY]&&t.update(t.domNode[i.DATA_KEY].mutations||[])}),null!=this.domNode[i.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[i.DATA_KEY].mutations),this.optimize(e)},e}(o.default);a.blotName="scroll",a.defaultChild="block",a.scope=i.Scope.BLOCK_BLOT,a.tagName="DIV",e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(23),i=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){return t.data},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(){t.prototype.optimize.call(this),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=i.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t){var e=this;t.some(function(t){return"characterData"===t.type&&t.target===e.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e}(o.default);l.blotName="text",l.scope=i.Scope.INLINE_BLOT,e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=void 0,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=void 0,this.head=this.tail=t),this.length+=1},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(ta?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=n(35),i=r(o),l=n(36),a=n(38),s=n(67),u=n(64),c=r(u),f=n(65),d=r(f),p=n(69),h=r(p),y=n(37),b=n(26),v=n(39),g=n(40),m=n(44),q=r(m),w=n(68),_=r(w),k=n(27),O=r(k),x=n(70),E=r(x),A=n(71),j=r(A),N=n(72),T=r(N),P=n(66),S=r(P),C=n(73),L=r(C),R=n(16),M=r(R),I=n(74),B=r(I),U=n(75),D=r(U),z=n(46),F=r(z),H=n(41),Y=r(H),K=n(28),Z=r(K),V=n(48),W=r(V),G=n(49),$=r(G),X=n(50),Q=r(X),J=n(76),tt=r(J),et=n(63),nt=r(et);i.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":b.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":v.FontClass,"attributors/class/size":g.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":b.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":v.FontStyle,"attributors/style/size":g.SizeStyle},!0),i.default.register({"formats/align":l.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":s.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":b.ColorStyle,"formats/font":v.FontClass,"formats/size":g.SizeClass,"formats/blockquote":c.default,"formats/code-block":M.default,"formats/header":d.default,"formats/list":h.default,"formats/bold":q.default,"formats/code":R.Code,"formats/italic":_.default,"formats/link":O.default,"formats/script":E.default,"formats/strike":j.default,"formats/underline":T.default,"formats/image":S.default,"formats/video":L.default,"formats/list/item":p.ListItem,"modules/formula":B.default,"modules/syntax":D.default,"modules/toolbar":F.default,"themes/bubble":tt.default,"themes/snow":nt.default,"ui/icons":Y.default,"ui/picker":Z.default,"ui/icon-picker":$.default,"ui/color-picker":W.default,"ui/tooltip":Q.default},!0),t.exports=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=_},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(4),a=function(t){return t&&t.__esModule?t:{default:t}}(l),s=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),e}(a.default);s.blotName="blockquote",s.tagName="blockquote",e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,c.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(u.default);d.blotName="image",d.tagName="IMG",e.default=d},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var l=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return o({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,n){if(t instanceof b)u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this);var t=this.next;null!=t&&t.prev===this&&t.statics.blotName===this.statics.blotName&&t.domNode.tagName===this.domNode.tagName&&t.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(t.moveChildren(this),t.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=f.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(y.default);v.blotName="list",v.scope=f.default.Scope.BLOCK_BLOT,v.tagName=["OL","UL"],v.defaultChild="list-item",v.allowedChildren=[b],e.ListItem=b,e.default=v},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"sanitize",value:function(t){return c.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.BlockEmbed);d.blotName="video",d.className="ql-video",d.tagName="IFRAME",e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var a=function(){function t(t,e){for(var n=0;n0||null==this.cachedHTML)&&(this.domNode.innerHTML=t(e),this.attach()),this.cachedHTML=this.domNode.innerHTML}}}]),e}(b.default);v.className="ql-syntax";var g=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),m=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var l=null;return r.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){null==l&&(l=setTimeout(function(){r.highlight(),l=null},100))}),r.highlight(),r}return l(e,t),a(e,null,[{key:"register",value:function(){d.default.register(g,!0),d.default.register(v,!0)}}]),a(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){var e=this.quill.getSelection();this.quill.scroll.descendants(v).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(d.default.sources.SILENT),null!=e&&this.quill.setSelection(e,d.default.sources.SILENT)}}}]),e}(h.default);m.DEFAULTS={highlight:function(){return null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value}}()},e.CodeBlock=v,e.CodeToken=g,e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var a=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},s=function(){function t(t,e){for(var n=0;n0&&o===d.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(e.index,e.length);if(1===i.length)r.position(r.quill.getBounds(e));else{var l=i[i.length-1],a=r.quill.getIndex(l),s=Math.min(l.length()-1,e.index+e.length-a),u=r.quill.getBounds(new y.Range(a,s));r.position(u)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return l(e,t),s(e,[{key:"listen",value:function(){var t=this;a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){t.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(p.BaseTooltip);q.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=q,e.default=m},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(62)}])})}).call(e,n(2).Buffer)},function(t,e,n){n(17);var r=n(13)(n(4),n(14),null,null);t.exports=r.exports},function(t,e){t.exports=function(t,e,n,r){var o,i=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(o=t,i=t.default);var a="function"==typeof i?i.options:i;if(e&&(a.render=e.render,a.staticRenderFns=e.staticRenderFns),n&&(a._scopeId=n),r){var s=Object.create(a.computed||null);Object.keys(r).forEach(function(t){var e=r[t];s[t]=function(){return e}}),a.computed=s}return{esModule:o,exports:i,options:a}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"quillWrapper"},[n("div",{ref:"quillContainer",attrs:{id:t.id}}),t._v(" "),t.useCustomImageHandler?n("input",{ref:"fileInput",staticStyle:{display:"none"},attrs:{id:"file-upload",type:"file"},on:{change:function(e){t.emitImageInfo(e)}}}):t._e()])},staticRenderFns:[]}},function(t,e,n){var r=n(6);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(1)("3a8079a0",r,!0)},function(t,e,n){var r=n(7);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(1)("d22a7388",r,!0)},function(t,e,n){var r=n(8);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(1)("1cdebd1c",r,!0)},function(t,e){t.exports=function(t,e){for(var n=[],r={},o=0;o)\s/g, + action: function action(_text, selection) { + // Need to defer this action https://github.com/quilljs/quill/issues/1134 + setTimeout(function () { + _this.quill.formatLine(selection.index, 1, "blockquote", true); + + _this.quill.deleteText(selection.index - 2, 2); + }, 0); + } + }, { + name: "code-block", + pattern: /^`{3}(?:\s|\n)/g, + action: function action(_text, selection) { + // Need to defer this action https://github.com/quilljs/quill/issues/1134 + setTimeout(function () { + _this.quill.formatLine(selection.index, 1, "code-block", true); + + _this.quill.deleteText(selection.index - 4, 4); + }, 0); + } + }, { + name: "bolditalic", + pattern: /(?:\*|_){3}(.+?)(?:\*|_){3}/g, + action: function action(text, _selection, pattern, lineStart) { + var match = pattern.exec(text); + var annotatedText = match[0]; + var matchedText = match[1]; + var startIndex = lineStart + match.index; + if (text.match(/^([*_ \n]+)$/g)) return; + setTimeout(function () { + _this.quill.deleteText(startIndex, annotatedText.length); + + _this.quill.insertText(startIndex, matchedText, { + bold: true, + italic: true + }); + + _this.quill.format("bold", false); + }, 0); + } + }, { + name: "bold", + pattern: /(?:\*|_){2}(.+?)(?:\*|_){2}/g, + action: function action(text, _selection, pattern, lineStart) { + var match = pattern.exec(text); + var annotatedText = match[0]; + var matchedText = match[1]; + var startIndex = lineStart + match.index; + if (text.match(/^([*_ \n]+)$/g)) return; + setTimeout(function () { + _this.quill.deleteText(startIndex, annotatedText.length); + + _this.quill.insertText(startIndex, matchedText, { + bold: true + }); + + _this.quill.format("bold", false); + }, 0); + } + }, { + name: "italic", + pattern: /(?:\*|_){1}(.+?)(?:\*|_){1}/g, + action: function action(text, _selection, pattern, lineStart) { + var match = pattern.exec(text); + var annotatedText = match[0]; + var matchedText = match[1]; + var startIndex = lineStart + match.index; + if (text.match(/^([*_ \n]+)$/g)) return; + setTimeout(function () { + _this.quill.deleteText(startIndex, annotatedText.length); + + _this.quill.insertText(startIndex, matchedText, { + italic: true + }); + + _this.quill.format("italic", false); + }, 0); + } + }, { + name: "strikethrough", + pattern: /(?:~~)(.+?)(?:~~)/g, + action: function action(text, _selection, pattern, lineStart) { + var match = pattern.exec(text); + var annotatedText = match[0]; + var matchedText = match[1]; + var startIndex = lineStart + match.index; + if (text.match(/^([*_ \n]+)$/g)) return; + setTimeout(function () { + _this.quill.deleteText(startIndex, annotatedText.length); + + _this.quill.insertText(startIndex, matchedText, { + strike: true + }); + + _this.quill.format("strike", false); + }, 0); + } + }, { + name: "code", + pattern: /(?:`)(.+?)(?:`)/g, + action: function action(text, _selection, pattern, lineStart) { + var match = pattern.exec(text); + var annotatedText = match[0]; + var matchedText = match[1]; + var startIndex = lineStart + match.index; + if (text.match(/^([*_ \n]+)$/g)) return; + setTimeout(function () { + _this.quill.deleteText(startIndex, annotatedText.length); + + _this.quill.insertText(startIndex, matchedText, { + code: true + }); + + _this.quill.format("code", false); + + _this.quill.insertText(_this.quill.getSelection(), " "); + }, 0); + } + }, { + name: "hr", + pattern: /^([-*]\s?){3}/g, + action: function action(text, selection) { + var startIndex = selection.index - text.length; + setTimeout(function () { + _this.quill.deleteText(startIndex, text.length); + + _this.quill.insertEmbed(startIndex + 1, "hr", true, Quill.sources.USER); + + _this.quill.insertText(startIndex + 2, "\n", Quill.sources.SILENT); + + _this.quill.setSelection(startIndex + 2, Quill.sources.SILENT); + }, 0); + } + }, { + name: "asterisk-ul", + pattern: /^(\*|\+)\s$/g, + // eslint-disable-next-line no-unused-vars + action: function action(_text, selection, _pattern) { + setTimeout(function () { + _this.quill.formatLine(selection.index, 1, "list", "unordered"); + + _this.quill.deleteText(selection.index - 2, 2); + }, 0); + } + }, { + name: "image", + pattern: /(?:!\[(.+?)\])(?:\((.+?)\))/g, + action: function action(text, selection, pattern) { + var startIndex = text.search(pattern); + var matchedText = text.match(pattern)[0]; // const hrefText = text.match(/(?:!\[(.*?)\])/g)[0] + + var hrefLink = text.match(/(?:\((.*?)\))/g)[0]; + var start = selection.index - matchedText.length - 1; + + if (startIndex !== -1) { + setTimeout(function () { + _this.quill.deleteText(start, matchedText.length); + + _this.quill.insertEmbed(start, "image", hrefLink.slice(1, hrefLink.length - 1)); + }, 0); + } + } + }, { + name: "link", + pattern: /(?:\[(.+?)\])(?:\((.+?)\))/g, + action: function action(text, selection, pattern) { + var startIndex = text.search(pattern); + var matchedText = text.match(pattern)[0]; + var hrefText = text.match(/(?:\[(.*?)\])/g)[0]; + var hrefLink = text.match(/(?:\((.*?)\))/g)[0]; + var start = selection.index - matchedText.length - 1; + + if (startIndex !== -1) { + setTimeout(function () { + _this.quill.deleteText(start, matchedText.length); + + _this.quill.insertText(start, hrefText.slice(1, hrefText.length - 1), "link", hrefLink.slice(1, hrefLink.length - 1)); + }, 0); + } + } + }]; // Handler that looks for insert deltas that match specific characters + // eslint-disable-next-line no-unused-vars + + this.quill.on("text-change", function (delta, _oldContents, _source) { + for (var i = 0; i < delta.ops.length; i++) { + if (delta.ops[i].hasOwnProperty("insert")) { + if (delta.ops[i].insert === " ") { + _this.onSpace(); + } else if (delta.ops[i].insert === "\n") { + _this.onEnter(); + } + } + } + }); + } + + _createClass(MarkdownShortcuts, [{ + key: "isValid", + value: function isValid(text, tagName) { + return typeof text !== "undefined" && text && this.ignoreTags.indexOf(tagName) === -1; + } + }, { + key: "onSpace", + value: function onSpace() { + var selection = this.quill.getSelection(); + if (!selection) return; + + var _this$quill$getLine = this.quill.getLine(selection.index), + _this$quill$getLine2 = _slicedToArray(_this$quill$getLine, 2), + line = _this$quill$getLine2[0], + offset = _this$quill$getLine2[1]; + + var text = line.domNode.textContent; + var lineStart = selection.index - offset; + + if (this.isValid(text, line.domNode.tagName)) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this.matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var match = _step.value; + var matchedText = text.match(match.pattern); + + if (matchedText) { + // We need to replace only matched text not the whole line + console.log("matched:", match.name, text); + match.action(text, selection, match.pattern, lineStart); + return; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + } + }, { + key: "onEnter", + value: function onEnter() { + var selection = this.quill.getSelection(); + if (!selection) return; + + var _this$quill$getLine3 = this.quill.getLine(selection.index), + _this$quill$getLine4 = _slicedToArray(_this$quill$getLine3, 2), + line = _this$quill$getLine4[0], + offset = _this$quill$getLine4[1]; + + var text = line.domNode.textContent + " "; + var lineStart = selection.index - offset; + selection.length = selection.index++; + + if (this.isValid(text, line.domNode.tagName)) { + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = this.matches[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var match = _step2.value; + var matchedText = text.match(match.pattern); + + if (matchedText) { + console.log("matched", match.name, text); + match.action(text, selection, match.pattern, lineStart); + return; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } + }]); + + return MarkdownShortcuts; +}(); // module.exports = MarkdownShortcuts; + +// +var script = { + name: "VueEditor", + mixins: [oldApi], + props: { + id: { + type: String, + default: "quill-container" + }, + placeholder: { + type: String, + default: "" + }, + value: { + type: String, + default: "" + }, + disabled: { + type: Boolean + }, + editorToolbar: { + type: Array, + default: function _default() { + return []; + } + }, + editorOptions: { + type: Object, + required: false, + default: function _default() { + return {}; + } + }, + useCustomImageHandler: { + type: Boolean, + default: false + }, + useMarkdownShortcuts: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + quill: null + }; + }, + watch: { + value: function value(val) { + if (val != this.quill.root.innerHTML && !this.quill.hasFocus()) { + this.quill.root.innerHTML = val; + } + }, + disabled: function disabled(status) { + this.quill.enable(!status); + } + }, + mounted: function mounted() { + this.registerCustomModules(Quill); + this.registerPrototypes(); + this.initializeEditor(); + }, + beforeDestroy: function beforeDestroy() { + this.quill = null; + delete this.quill; + }, + methods: { + initializeEditor: function initializeEditor() { + this.setupQuillEditor(); + this.checkForCustomImageHandler(); + this.handleInitialContent(); + this.registerEditorEventListeners(); + this.$emit("ready", this.quill); + }, + setupQuillEditor: function setupQuillEditor() { + var editorConfig = { + debug: false, + modules: this.setModules(), + theme: "snow", + placeholder: this.placeholder ? this.placeholder : "", + readOnly: this.disabled ? this.disabled : false + }; + this.prepareEditorConfig(editorConfig); + this.quill = new Quill(this.$refs.quillContainer, editorConfig); + }, + setModules: function setModules() { + var modules = { + toolbar: this.editorToolbar.length ? this.editorToolbar : defaultToolbar + }; + + if (this.useMarkdownShortcuts) { + Quill.register("modules/markdownShortcuts", MarkdownShortcuts, true); + modules["markdownShortcuts"] = {}; + } + + return modules; + }, + prepareEditorConfig: function prepareEditorConfig(editorConfig) { + if (Object.keys(this.editorOptions).length > 0 && this.editorOptions.constructor === Object) { + if (this.editorOptions.modules && typeof this.editorOptions.modules.toolbar !== "undefined") { + // We don't want to merge default toolbar with provided toolbar. + delete editorConfig.modules.toolbar; + } + + mergeDeep(editorConfig, this.editorOptions); + } + }, + registerPrototypes: function registerPrototypes() { + Quill.prototype.getHTML = function () { + return this.container.querySelector(".ql-editor").innerHTML; + }; + + Quill.prototype.getWordCount = function () { + return this.container.querySelector(".ql-editor").innerText.length; + }; + }, + registerEditorEventListeners: function registerEditorEventListeners() { + this.quill.on("text-change", this.handleTextChange); + this.quill.on("selection-change", this.handleSelectionChange); + this.listenForEditorEvent("text-change"); + this.listenForEditorEvent("selection-change"); + this.listenForEditorEvent("editor-change"); + }, + listenForEditorEvent: function listenForEditorEvent(type) { + var _this = this; + + this.quill.on(type, function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this.$emit.apply(_this, [type].concat(args)); + }); + }, + handleInitialContent: function handleInitialContent() { + if (this.value) this.quill.root.innerHTML = this.value; // Set initial editor content + }, + handleSelectionChange: function handleSelectionChange(range, oldRange) { + if (!range && oldRange) this.$emit("blur", this.quill);else if (range && !oldRange) this.$emit("focus", this.quill); + }, + handleTextChange: function handleTextChange(delta, oldContents) { + var editorContent = this.quill.getHTML() === "


" ? "" : this.quill.getHTML(); + this.$emit("input", editorContent); + if (this.useCustomImageHandler) this.handleImageRemoved(delta, oldContents); + }, + handleImageRemoved: function handleImageRemoved(delta, oldContents) { + var _this2 = this; + + var currrentContents = this.quill.getContents(); + var deletedContents = currrentContents.diff(oldContents); + var operations = deletedContents.ops; + operations.map(function (operation) { + if (operation.insert && operation.insert.hasOwnProperty("image")) { + var image = operation.insert.image; + + _this2.$emit("image-removed", image); + } + }); + }, + checkForCustomImageHandler: function checkForCustomImageHandler() { + this.useCustomImageHandler === true ? this.setupCustomImageHandler() : ""; + }, + setupCustomImageHandler: function setupCustomImageHandler() { + var toolbar = this.quill.getModule("toolbar"); + toolbar.addHandler("image", this.customImageHandler); + }, + customImageHandler: function customImageHandler() { + this.$refs.fileInput.click(); + }, + emitImageInfo: function emitImageInfo($event) { + var resetUploader = function resetUploader() { + var uploader = document.getElementById("file-upload"); + uploader.value = ""; + }; + + var file = $event.target.files[0]; + var Editor = this.quill; + var range = Editor.getSelection(); + var cursorLocation = range.index; + this.$emit("image-added", file, Editor, cursorLocation, resetUploader); + } + } +}; + +function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier +/* server only */ +, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { + if (typeof shadowMode !== 'boolean') { + createInjectorSSR = createInjector; + createInjector = shadowMode; + shadowMode = false; + } // Vue.extend constructor export interop. + + + var options = typeof script === 'function' ? script.options : script; // render functions + + if (template && template.render) { + options.render = template.render; + options.staticRenderFns = template.staticRenderFns; + options._compiled = true; // functional template + + if (isFunctionalTemplate) { + options.functional = true; + } + } // scopedId + + + if (scopeId) { + options._scopeId = scopeId; + } + + var hook; + + if (moduleIdentifier) { + // server build + hook = function hook(context) { + // 2.3 injection + context = context || // cached call + this.$vnode && this.$vnode.ssrContext || // stateful + this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional + // 2.2 with runInNewContext: true + + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__; + } // inject component styles + + + if (style) { + style.call(this, createInjectorSSR(context)); + } // register component module identifier for async chunk inference + + + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier); + } + }; // used by ssr in case component is cached and beforeCreate + // never gets called + + + options._ssrRegister = hook; + } else if (style) { + hook = shadowMode ? function () { + style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); + } : function (context) { + style.call(this, createInjector(context)); + }; + } + + if (hook) { + if (options.functional) { + // register for functional component in vue file + var originalRender = options.render; + + options.render = function renderWithStyleInjection(h, context) { + hook.call(context); + return originalRender(h, context); + }; + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate; + options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; + } + } + + return script; +} + +var normalizeComponent_1 = normalizeComponent; + +var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()); + +function createInjector(context) { + return function (id, style) { + return addStyle(id, style); + }; +} + +var HEAD; +var styles = {}; + +function addStyle(id, css) { + var group = isOldIE ? css.media || 'default' : id; + var style = styles[group] || (styles[group] = { + ids: new Set(), + styles: [] + }); + + if (!style.ids.has(id)) { + style.ids.add(id); + var code = css.source; + + if (css.map) { + // https://developer.chrome.com/devtools/docs/javascript-debugging + // this makes source maps inside style tags work properly in Chrome + code += '\n/*# sourceURL=' + css.map.sources[0] + ' */'; // http://stackoverflow.com/a/26603875 + + code += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) + ' */'; + } + + if (!style.element) { + style.element = document.createElement('style'); + style.element.type = 'text/css'; + if (css.media) style.element.setAttribute('media', css.media); + + if (HEAD === undefined) { + HEAD = document.head || document.getElementsByTagName('head')[0]; + } + + HEAD.appendChild(style.element); + } + + if ('styleSheet' in style.element) { + style.styles.push(code); + style.element.styleSheet.cssText = style.styles.filter(Boolean).join('\n'); + } else { + var index = style.ids.size - 1; + var textNode = document.createTextNode(code); + var nodes = style.element.childNodes; + if (nodes[index]) style.element.removeChild(nodes[index]); + if (nodes.length) style.element.insertBefore(textNode, nodes[index]);else style.element.appendChild(textNode); + } + } +} + +var browser = createInjector; + +/* script */ +const __vue_script__ = script; + +/* template */ +var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"quillWrapper"},[_vm._t("toolbar"),_vm._v(" "),_c('div',{ref:"quillContainer",attrs:{"id":_vm.id}}),_vm._v(" "),(_vm.useCustomImageHandler)?_c('input',{ref:"fileInput",staticStyle:{"display":"none"},attrs:{"id":"file-upload","type":"file","accept":"image/*"},on:{"change":function($event){return _vm.emitImageInfo($event)}}}):_vm._e()],2)}; +var __vue_staticRenderFns__ = []; + + /* style */ + const __vue_inject_styles__ = function (inject) { + if (!inject) return + inject("data-v-776e788e_0", { source: "/*!\n * Quill Editor v1.3.6\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li::before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:0;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li::before{content:'\\2022'}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li::before,.ql-editor ul[data-checked=true]>li::before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li::before{content:'\\2611'}.ql-editor ul[data-checked=false]>li::before{content:'\\2610'}.ql-editor li::before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl)::before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl::before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) '. '}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) '. '}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) '. '}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) '. '}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) '. '}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) '. '}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) '. '}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) '. '}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) '. '}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) '. '}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank::before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow .ql-toolbar:after,.ql-snow.ql-toolbar:after{clear:both;content:'';display:table}.ql-snow .ql-toolbar button,.ql-snow.ql-toolbar button{background:0 0;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow .ql-toolbar button svg,.ql-snow.ql-toolbar button svg{float:left;height:100%}.ql-snow .ql-toolbar button:active:hover,.ql-snow.ql-toolbar button:active:hover{outline:0}.ql-snow .ql-toolbar input.ql-image[type=file],.ql-snow.ql-toolbar input.ql-image[type=file]{display:none}.ql-snow .ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar button.ql-active,.ql-snow .ql-toolbar button:focus,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar button.ql-active,.ql-snow.ql-toolbar button:focus,.ql-snow.ql-toolbar button:hover{color:#06c}.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill{fill:#06c}.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter{stroke:#06c}@media (pointer:coarse){.ql-snow .ql-toolbar button:hover:not(.ql-active),.ql-snow.ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow{box-sizing:border-box}.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:'';display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-stroke.ql-thin,.ql-snow .ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label::before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-item::before,.ql-snow .ql-picker.ql-header .ql-picker-label::before{content:'Normal'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]::before{content:'Heading 1'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]::before{content:'Heading 2'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]::before{content:'Heading 3'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]::before{content:'Heading 4'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]::before{content:'Heading 5'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]::before{content:'Heading 6'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-item::before,.ql-snow .ql-picker.ql-font .ql-picker-label::before{content:'Sans Serif'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before{content:'Serif'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before{content:'Monospace'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-item::before,.ql-snow .ql-picker.ql-size .ql-picker-label::before{content:'Normal'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before{content:'Small'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before{content:'Large'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before{content:'Huge'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:rgba(0,0,0,.2) 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label{border-color:#ccc}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip::before{content:\"Visit URL:\";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action::after{border-right:1px solid #ccc;content:'Edit';margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove::before{content:'Remove';margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action::after{border-right:0;content:'Save';padding-right:0}.ql-snow .ql-tooltip[data-mode=link]::before{content:\"Enter link:\"}.ql-snow .ql-tooltip[data-mode=formula]::before{content:\"Enter formula:\"}.ql-snow .ql-tooltip[data-mode=video]::before{content:\"Enter video:\"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}", map: undefined, media: undefined }) +,inject("data-v-776e788e_1", { source: ".ql-editor{min-height:200px;font-size:16px}.ql-snow .ql-stroke.ql-thin,.ql-snow .ql-thin{stroke-width:1px!important}.quillWrapper .ql-snow.ql-toolbar{padding-top:8px;padding-bottom:4px}.quillWrapper .ql-snow.ql-toolbar .ql-formats{margin-bottom:10px}.ql-snow .ql-toolbar button svg,.quillWrapper .ql-snow.ql-toolbar button svg{width:22px;height:22px}.quillWrapper .ql-editor ul[data-checked=false]>li::before,.quillWrapper .ql-editor ul[data-checked=true]>li::before{font-size:1.35em;vertical-align:baseline;bottom:-.065em;font-weight:900;color:#222}.quillWrapper .ql-snow .ql-stroke{stroke:rgba(63,63,63,.95);stroke-linecap:square;stroke-linejoin:initial;stroke-width:1.7px}.quillWrapper .ql-picker-label{font-size:15px}.quillWrapper .ql-snow .ql-active .ql-stroke{stroke-width:2.25px}.quillWrapper .ql-toolbar.ql-snow .ql-formats{vertical-align:top}.ql-picker:not(.ql-background){position:relative;top:2px}.ql-picker.ql-color-picker svg{width:22px!important;height:22px!important}.quillWrapper .imageResizeActive img{display:block;cursor:pointer}.quillWrapper .imageResizeActive~div svg{cursor:pointer}", map: undefined, media: undefined }); + + }; + /* scoped */ + const __vue_scope_id__ = undefined; + /* module identifier */ + const __vue_module_identifier__ = undefined; + /* functional template */ + const __vue_is_functional_template__ = false; + /* style inject SSR */ + + + + var VueEditor = normalizeComponent_1( + { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, + __vue_inject_styles__, + __vue_script__, + __vue_scope_id__, + __vue_is_functional_template__, + __vue_module_identifier__, + browser, + undefined + ); + +var version = "2.10.3"; // Declare install function executed by Vue.use() + +function install(Vue) { + if (install.installed) return; + install.installed = true; + Vue.component("VueEditor", VueEditor); +} +var VPlugin = { + install: install, + version: version, + Quill: Quill, + VueEditor: VueEditor +}; // Auto-install when vue is found (eg. in browser via diff --git a/docs/.vuepress/code-examples/source/custom-image-handler.vue b/docs/.vuepress/code-examples/source/custom-image-handler.vue new file mode 100644 index 0000000..96fe517 --- /dev/null +++ b/docs/.vuepress/code-examples/source/custom-image-handler.vue @@ -0,0 +1,15 @@ + + + diff --git a/docs/.vuepress/code-examples/source/custom-modules.vue b/docs/.vuepress/code-examples/source/custom-modules.vue new file mode 100644 index 0000000..96fe517 --- /dev/null +++ b/docs/.vuepress/code-examples/source/custom-modules.vue @@ -0,0 +1,15 @@ + + + diff --git a/docs/.vuepress/code-examples/source/custom-toolbar.vue b/docs/.vuepress/code-examples/source/custom-toolbar.vue new file mode 100644 index 0000000..e59ae4c --- /dev/null +++ b/docs/.vuepress/code-examples/source/custom-toolbar.vue @@ -0,0 +1,20 @@ + + + diff --git a/docs/.vuepress/code-examples/source/event-listening.vue b/docs/.vuepress/code-examples/source/event-listening.vue new file mode 100644 index 0000000..765d34c --- /dev/null +++ b/docs/.vuepress/code-examples/source/event-listening.vue @@ -0,0 +1,34 @@ + + + diff --git a/docs/.vuepress/code-examples/source/live-preview.vue b/docs/.vuepress/code-examples/source/live-preview.vue new file mode 100644 index 0000000..14daacd --- /dev/null +++ b/docs/.vuepress/code-examples/source/live-preview.vue @@ -0,0 +1,18 @@ + + + diff --git a/docs/.vuepress/code-examples/source/multiple-editors.vue b/docs/.vuepress/code-examples/source/multiple-editors.vue new file mode 100644 index 0000000..96fe517 --- /dev/null +++ b/docs/.vuepress/code-examples/source/multiple-editors.vue @@ -0,0 +1,15 @@ + + + diff --git a/docs/.vuepress/code-examples/source/save-content.vue b/docs/.vuepress/code-examples/source/save-content.vue new file mode 100644 index 0000000..23741e0 --- /dev/null +++ b/docs/.vuepress/code-examples/source/save-content.vue @@ -0,0 +1,55 @@ + + + + + + + diff --git a/docs/.vuepress/code-examples/source/set-contents.vue b/docs/.vuepress/code-examples/source/set-contents.vue new file mode 100644 index 0000000..c4d9e29 --- /dev/null +++ b/docs/.vuepress/code-examples/source/set-contents.vue @@ -0,0 +1,24 @@ + + + diff --git a/docs/.vuepress/code-examples/source/set-focus.vue b/docs/.vuepress/code-examples/source/set-focus.vue new file mode 100644 index 0000000..6882d7b --- /dev/null +++ b/docs/.vuepress/code-examples/source/set-focus.vue @@ -0,0 +1,24 @@ + + + diff --git a/docs/.vuepress/components/BasicExample.vue b/docs/.vuepress/components/BasicExample.vue new file mode 100644 index 0000000..32a431d --- /dev/null +++ b/docs/.vuepress/components/BasicExample.vue @@ -0,0 +1,22 @@ + + + diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js new file mode 100644 index 0000000..6c7d886 --- /dev/null +++ b/docs/.vuepress/config.js @@ -0,0 +1,74 @@ +// const path = require("path"); +const { version } = require("../../package.json"); + +module.exports = { + head: [ + // [ + // "script", + // { + // src: "https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js" + // } + // ], + [ + "script", + { + src: "https://cdn.jsdelivr.net/npm/@babel/standalone/babel.min.js" + } + ], + [ + "script", + { + src: "https://unpkg.com/quill" + } + ], + [ + "script", + { + src: `https://unpkg.com/vue2-editor@${version}` + } + ] + ], + plugins: [ + require("./plugin.js"), + // "live", + // "demo-block", + [ + "@vuepress/google-analytics", + { + ga: "UA-12345678-9" + } + ] + ], + locales: { + "/": { + lang: "en-US", + title: "Vue2Editor", + description: + "Your Vue.js editor for rich text editing built with Vue.js and Quill.js" + } + }, + themeConfig: { + repo: "davidroyer/vue2-editor", + docsDir: "docs", + locales: { + "/": { + label: "English", + selectText: "Languages", + editLinkText: "Edit this page on GitHub", + nav: [ + { + text: "Release Notes", + link: "https://github.com/davidroyer/vue2-editor/releases" + } + ], + sidebar: [ + // "/installation.md", + "/guide.md", + "/examples/", + "/api.md" + // "/notes.md" + ] + } + } + } +}; diff --git a/docs/.vuepress/enhanceApp.js b/docs/.vuepress/enhanceApp.js new file mode 100644 index 0000000..1438b4c --- /dev/null +++ b/docs/.vuepress/enhanceApp.js @@ -0,0 +1,10 @@ +export default ({ Vue }) => { + if (typeof window !== "undefined") { + Vue.use(window.Vue2Editor); + } + Vue.mixin({ + data: () => ({ + editorContent: "Content From Mixin" + }) + }); +}; diff --git a/docs/.vuepress/plugin.js b/docs/.vuepress/plugin.js new file mode 100644 index 0000000..9b4a113 --- /dev/null +++ b/docs/.vuepress/plugin.js @@ -0,0 +1,21 @@ +const { version } = require("../../package.json"); + +module.exports = (/*options, ctx*/) => ({ + async enhanceAppFiles() { + const code = `export default ({ Vue }) => { + Vue.mixin({ + computed: { + $version () { + return '${version}' + } + } + }) +}`; + return [ + { + name: "vuepress-plugin-vue-cli-plugin-p11n", + content: code + } + ]; + } +}); diff --git a/docs/.vuepress/public/hero-home.png b/docs/.vuepress/public/hero-home.png new file mode 100755 index 0000000..d0268b5 Binary files /dev/null and b/docs/.vuepress/public/hero-home.png differ diff --git a/docs/.vuepress/public/hero.png b/docs/.vuepress/public/hero.png new file mode 100755 index 0000000..edc0fe9 Binary files /dev/null and b/docs/.vuepress/public/hero.png differ diff --git a/docs/.vuepress/snippets/modular.vue b/docs/.vuepress/snippets/modular.vue new file mode 100644 index 0000000..fa33a72 --- /dev/null +++ b/docs/.vuepress/snippets/modular.vue @@ -0,0 +1,16 @@ + + + diff --git a/docs/.vuepress/styles/palette.styl b/docs/.vuepress/styles/palette.styl new file mode 100755 index 0000000..87a2900 --- /dev/null +++ b/docs/.vuepress/styles/palette.styl @@ -0,0 +1,32 @@ +a.router-link-active { + border-bottom: none !important; +} +a.router-link-active.router-link-exact-active { + border-bottom: 2px solid #42b983 !important; +} + +.hero img { + max-width: 100%; +} + +img { + max-width: 100%; +} + +.theme-container .sidebar { + overflow-y: scroll !important; + -webkit-overflow-scrolling: touch !important; +} + +.home .feature { + text-align: center; +} + +@media (max-width: 719px) { + .home .features { + align-items: center; + } +} + +.vuepress-plugin-demo-block__wrapper .vuepress-plugin-demo-block__code + overflow: scroll diff --git a/docs/README.md b/docs/README.md new file mode 100755 index 0000000..4f05ca2 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,14 @@ +--- +home: true +heroImage: /hero-home.png +actionText: Get Started → +actionLink: /guide.md +features: + - title: Easy To Use + details: Simple setup so you can get started quickly + - title: Quality Foundation + details: Built on top of Vue.js & Quill.js + - title: Customizable + details: Offers the options you need for more complex scenarios +footer: MIT Licensed | Copyright © 2016-present David Royer +--- diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 0000000..b7cc102 --- /dev/null +++ b/docs/api.md @@ -0,0 +1,37 @@ +# API + +## Props + +| Name | Type | Default | Description | +| --------------------- | ------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------- | +| id | String | quill-container | Set the id (necessary if multiple editors in the same view) | +| v-model | String | - | Set v-model to the the content or data property you wish to bind it to | +| useCustomImageHandler | Boolean | false | Handle image uploading instead of using default conversion to Base64 | +| placeholder | String | - | Placeholder text for the editor | +| disabled | Boolean | false | Set to true to disable editor | +| customModules | Array | - | Declare Quill modules to register | Use a custom toolbar | +| editorToolbar | Array | \*\* _Too long for table. See toolbar example below_ | Use a custom toolbar | +| editorOptions | Object | - | Offers object for merging into default config (add formats, custom Quill modules, ect) | + + + +## Events + +| Name | Parameters | Description | +| ---------------- | ---------------------------- | ----------------------------------------------------------------------------------- | +| focus | quill | Emitted on `focus` event | +| blur | quill | Emitted on `blur` event | +| selection-change | range, oldRange, source | Emitted on Quill's `selection-change` event | +| text-change | delta, oldDelta, source | Emitted on Quill's `text-change` event | +| image-added | file, Editor, cursorLocation | Emitted when `useCustomImageHandler` is true and photo is being added to the editor | +| image-removed | image | Emitted when `useCustomImageHandler` is true and photo has been deleted | + + diff --git a/docs/examples/README.md b/docs/examples/README.md new file mode 100755 index 0000000..4d2dd84 --- /dev/null +++ b/docs/examples/README.md @@ -0,0 +1,264 @@ +--- +# sidebar: auto +--- + +# Examples + +## Basic Setup + +<<< @/docs/.vuepress/code-examples/source/basic.vue + +
+ +## Custom Image Handler + +If you choose to use the custom image handler, an event is emitted when a a photo is selected. +You can see below that 3 parameters are passed. + +1. It passes the file to be handled however you need +2. The Editor instance +3. The cursor position at the time of upload so the image can be inserted at the correct position on success + +**NOTE** In addition to this example, I have created a [example repo](https://github.com/davidroyer/vue2editor-images) demonstrating this new feature with an actual server. + +```vue + + + +``` + +
+ +## Set Contents After Page Load + +<<< @/docs/.vuepress/code-examples/source/set-contents.vue + +
+ +## Using Multiple Editors + + + +```vue + + + + + +``` + +## Custom Toolbar + +<<< @/docs/.vuepress/code-examples/source/custom-toolbar.vue + +
+ +## Saving The Content + +<<< @/docs/.vuepress/code-examples/source/custom-toolbar.vue + +
+ +## Use a Live Preview + +<<< @/docs/.vuepress/code-examples/source/live-preview.vue + +
+ +## How To Use Custom Quill Modules + +There are two ways of using custom modules with Vue2Editor. This is partly because there have been cases in which errors are thrown when importing and attempting to declare custom modules, and partly because I believe it actually separates the concerns nicely. + +::: tip TIP +_If you have errors when using custom modules, +try adding this to your webpack config_ + +```js +new webpack.ProvidePlugin({ + "window.Quill": "quill/dist/quill.js", + Quill: "quill/dist/quill.js" +}); +``` + +::: + +### Version 1 - **_Import and Register Yourself_** + +**_(Recommended way)_** + +Vue2Editor now exports Quill to assist in this process. + +1. When importing VueEditor, also import Quill. +2. Import your custom modules +3. Register the custom modules with Quill +4. Add the necessary configuration to the `editorOptions` object + +```vue + + + +``` + +
+ +### Version 2 - **_You Import | Vue2Editor Registers_** + +1. Import your custom modules +2. Use the `customModules` prop to declare an array of module(s). +3. Add the necessary configuration for those modules in the `editorOptions` object under modules as seen below + +```vue + + + +``` + +
+ +## Setting Focus on Editor Programmatically + +Give the editor instance a `ref` property + +<<< @/docs/.vuepress/code-examples/source/set-focus.vue + +
+ +## Listening For Events + +<<< @/docs/.vuepress/code-examples/source/event-listening.vue diff --git a/docs/guide.md b/docs/guide.md new file mode 100644 index 0000000..333200a --- /dev/null +++ b/docs/guide.md @@ -0,0 +1,90 @@ +# Guide + +## Installation + +### Using CDN + +The plugin will automatically install itself as a Vue plugin. + + + + + +```html + + +``` + +### NPM + +```sh +npm install vue2-editor +``` + +### Yarn + +```sh +yarn add vue2-editor +``` + +
+ +## Usage + +There are two ways setup and use Vue2Editor. You can either set it up globally as a Vue plugin or import the `VueEditor` component to locally register and use it. Examples of both way are below. + +### Globally + +```js +import Vue from "vue"; +import Vue2Editor from "vue2-editor"; + +Vue.use(Vue2Editor); +``` + +### Local Import + + + +```js +// Basic Use - Covers most scenarios +import { VueEditor } from "vue2-editor"; + +// Advanced Use - Hook into Quill's API for Custom Functionality +import { VueEditor, Quill } from "vue2-editor"; +``` + +
+ +## Modular Version + +As of version 2.9, you can use the modular version which includes only the JavaScript. +This allows for more control and customization. Also, this allows for other Quill themes to be used such as Bubble. + +<<< @/docs/.vuepress/snippets/modular.vue + +## Nuxt.js + +Add `vue2-editor/nuxt` to modules section of `nuxt.config.js` + +```javascript +{ + modules: ["vue2-editor/nuxt"]; +} +``` + +To avoid seeing warnings from Vue about a mismatch in content, you'll need to +wrap the `VueEditor` component with the `client-only` component Nuxt provides as +shown here: + +```html + + + +``` + + diff --git a/docs/notes.md b/docs/notes.md new file mode 100644 index 0000000..d234159 --- /dev/null +++ b/docs/notes.md @@ -0,0 +1,30 @@ +# Notes + +## Accessing Quill's Functionality + +All of Quill's functionality referenced in their docs is available by providing the `VueEditor` component a `ref` attribute and then accessing `quill` from that reference. + +**For example:** + +```vue + + + +``` diff --git a/docs/playground.md b/docs/playground.md new file mode 100644 index 0000000..bb5f8b3 --- /dev/null +++ b/docs/playground.md @@ -0,0 +1,17 @@ +# Playground For Testing + +**Input** + +```md +<<< @/../@vuepress/markdown/**tests**/fragments/snippet.js{2} +``` + +**Output** + +<<< @/docs/.vuepress/code-examples/source/basic.vue + +<<< @/docs/snippets/snippet-1.vue + +Demo + + diff --git a/example/App.vue b/example/App.vue deleted file mode 100644 index f04622b..0000000 --- a/example/App.vue +++ /dev/null @@ -1,205 +0,0 @@ - - - - - diff --git a/example/index.js b/example/index.js deleted file mode 100644 index 9301598..0000000 --- a/example/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import Vue from 'vue' -import App from './App.vue' -require('spectre.css/dist/spectre.min.css') -require('spectre.css/dist/spectre-exp.min.css') -require('spectre.css/dist/spectre-icons.min.css') - -new Vue({ - el: '#app', - render: h => h(App) -}) diff --git a/index.html b/index.html deleted file mode 100644 index 3ffa46e..0000000 --- a/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Vue2Editor - - - -
- - - diff --git a/nuxt/index.js b/nuxt/index.js new file mode 100644 index 0000000..c7165cc --- /dev/null +++ b/nuxt/index.js @@ -0,0 +1,11 @@ +const { resolve } = require("path"); + +export default function nuxtVue2Editor() { + this.addPlugin({ + mode: "client", + src: resolve(__dirname, "plugin.js"), + fileName: "vue2-editor.js" + }); +} + +module.exports.meta = require("../package.json"); diff --git a/nuxt/plugin.js b/nuxt/plugin.js new file mode 100644 index 0000000..2617d8a --- /dev/null +++ b/nuxt/plugin.js @@ -0,0 +1,4 @@ +import Vue from "vue"; +import Vue2Editor from "vue2-editor"; + +Vue.use(Vue2Editor); diff --git a/package.json b/package.json index 32af1bf..d834263 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,116 @@ { "name": "vue2-editor", - "version": "2.0.26", + "version": "2.10.3", "description": "HTML editor using Vue.js 2, and Quill.js, an open source editor", + "author": { + "name": "David Royer", + "email": "droyer01@gmail.com" + }, + "license": "MIT", + "scripts": { + "lint": "vue-cli-service lint", + "build": "BUILD_TYPE=modular vue-cli-service build", + "build:modular": "BUILD_TYPE=modular vue-cli-service build", + "demo": "vue-cli-service demo", + "dev": "vue-cli-service serve", + "docs": "vue-cli-service docs --mode serve", + "docs:build": "vue-cli-service docs --mode build", + "docs:preview": "http-server docs/.vuepress/dist", + "release": "standard-version && git push --follow-tags && npm publish", + "release:next": "standard-version --prerelease next && git push --follow-tags origin dev && npm publish --tag next", + "release:ssr": "standard-version --prerelease ssr && git push --follow-tags origin ssr && npm publish --tag ssr", + "update:vp": "yarn upgrade vue-cli-plugin-vplugin" + }, + "standard-version": { + "scripts": { + "postbump": "npm run build && git add dist && git commit -m 'chore: new build'" + }, + "types": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "chore", + "hidden": true + }, + { + "type": "docs", + "hidden": true + }, + { + "type": "imp", + "section": "Improvements" + }, + { + "type": "style", + "hidden": true + }, + { + "type": "refactor", + "section": "Refactoring" + }, + { + "type": "perf", + "hidden": true + }, + { + "type": "test", + "hidden": true + } + ] + }, + "main": "dist/vue2-editor.common.js", + "module": "dist/vue2-editor.esm.js", + "unpkg": "dist/vue2-editor.umd.min.js", + "files": [ + "dist", + "nuxt" + ], + "dependencies": { + "quill": "^1.3.6" + }, + "devDependencies": { + "@commitlint/cli": "^7.6.1", + "@commitlint/config-conventional": "^7.6.0", + "@vue/cli-plugin-babel": "^3.7.0", + "@vue/cli-plugin-eslint": "^3.7.0", + "@vue/cli-service": "^3.7.0", + "@vue/eslint-config-prettier": "^4.0.1", + "@vuepress/plugin-google-analytics": "^1.0.0-rc.1", + "axios": "^0.21.1", + "babel-eslint": "^10.0.1", + "eslint": "^5.16.0", + "eslint-plugin-prettier": "^3.1.0", + "eslint-plugin-vue": "^5.0.0", + "highlight.js": "^9.15.6", + "http-server": "^0.11.1", + "node-sass": "^4.12.0", + "querystringify": "^2.1.1", + "quill-image-drop-module": "^1.0.3", + "quill-image-resize-module": "^3.0.0", + "sass": "^1.21.0", + "sass-loader": "^7.1.0", + "standard-version": "^6.0.1", + "vue": "^2.6.10", + "vue-cli-plugin-vplugin": "latest", + "vue-router": "^3.0.6", + "vue-template-compiler": "^2.5.21", + "vuepress-plugin-demo-block": "^0.7.2", + "vuepress-plugin-live": "^1.1.0" + }, + "peerDependencies": {}, + "eslintIgnore": [ + "/dist", + "/node_modules", + "/demo", + "!.vuepress" + ], + "jsdelivr": "dist/vue2-editor.umd.min.js", "keywords": [ "vue", "vue-component", @@ -9,34 +118,13 @@ "html editor", "text editor" ], - "author": "David Royer ", + "productName": "Vue2Editor", + "publishConfig": { + "registry": "https://registry.npmjs.org/" + }, "repository": { "type": "git", - "url": "https://github.com/davidroyer/vue2-editor" - }, - "main": "dist/index.js", - "files": [ - "dist" - ], - "scripts": { - "test": "echo lol", - "lint": "vbuild -c vbuild.example.js --eslint", - "build": "npm run build:cjs && npm run build:umd", - "build:cjs": "vbuild -c vbuild.component.js --format cjs", - "build:umd": "vbuild -c vbuild.component.js --format umd", - "example": "vbuild -c vbuild.example.js -d", - "deploy": "vbuild -c vbuild.example.js && gh-pages -d dist-example" - }, - "devDependencies": { - "gh-pages": "^0.12.0", - "node-sass": "^4.5.2", - "sass-loader": "^6.0.3", - "spectre.css": "^0.2.12", - "vbuild": "^6.0.0" + "url": "https://github.com/davidroyer/vue2-editor.git" }, - "license": "MIT", - "dependencies": { - "axios": "^0.16.2", - "quill": "^1.2.3" - } + "sideeffects": false } diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..036ea92 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/src/VueEditor.vue b/src/VueEditor.vue deleted file mode 100644 index c248d8a..0000000 --- a/src/VueEditor.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..f3d2503 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/assets/md-toolbar.scss b/src/assets/md-toolbar.scss new file mode 100755 index 0000000..313dc55 --- /dev/null +++ b/src/assets/md-toolbar.scss @@ -0,0 +1,41 @@ +svg { + width: 24px !important; + height: 24px !important; + fill: rgba(65, 65, 65, 0.9); + +} + +button.ql-active svg { + fill: white; + fill: rgba(97, 97, 97, 0.98) !important; +} + +.quillWrapper .ql-snow.ql-toolbar button { + margin: 1px 2px; + display: flex; + padding: 3px; + justify-content: center; + align-items: center; +} + +.ql-snow.ql-toolbar button, .ql-snow .ql-toolbar button { + display: flex; + padding: 3px; + margin: 1px 3px !important; + justify-content: center; + width: 30px !important; + height: 30px !important; + border-radius: 3px; +} + +.ql-toolbar button.ql-active { + background: rgba(85, 85, 97, 0.9) !important; + background: rgba(203, 201, 201, 0.9) !important; +} + +.quillWrapper .ql-toolbar { + padding-bottom: 4px; + display: flex; + align-items: center; + flex-flow: row wrap; +} diff --git a/src/assets/vue2-editor.scss b/src/assets/vue2-editor.scss new file mode 100755 index 0000000..e4266c9 --- /dev/null +++ b/src/assets/vue2-editor.scss @@ -0,0 +1,81 @@ +.ql-editor { + min-height: 200px; + font-size: 16px; +} + +.ql-snow .ql-stroke.ql-thin, +.ql-snow .ql-thin { + stroke-width: 1px !important; +} + +.quillWrapper .ql-snow.ql-toolbar { + padding-top: 8px; + padding-bottom: 4px; +} +/* .quillWrapper .ql-snow.ql-toolbar button { + margin: 1px 4px; +} */ +.quillWrapper .ql-snow.ql-toolbar .ql-formats { + margin-bottom: 10px; +} + +.ql-snow .ql-toolbar button svg, +.quillWrapper .ql-snow.ql-toolbar button svg { + width: 22px; + height: 22px; +} + +.quillWrapper .ql-editor ul[data-checked=false] > li::before, +.quillWrapper .ql-editor ul[data-checked=true] > li::before { + font-size: 1.35em; + vertical-align: baseline; + bottom: -0.065em; + font-weight: 900; + color: #222; +} + +.quillWrapper .ql-snow .ql-stroke { + stroke: rgba(63, 63, 63, 0.95); + stroke-linecap: square; + stroke-linejoin: initial; + stroke-width: 1.7px; +} + +.quillWrapper .ql-picker-label { + font-size: 15px; +} + +.quillWrapper .ql-snow .ql-active .ql-stroke { + stroke-width: 2.25px; +} + +.quillWrapper .ql-toolbar.ql-snow .ql-formats { + vertical-align: top; +} + +.ql-picker { + &:not(.ql-background) { + position: relative; + top: 2px; + } + + &.ql-color-picker { + svg { + width: 22px !important; + height: 22px !important; + } + } +} + +.quillWrapper { + & .imageResizeActive { + img { + display: block; + cursor: pointer; + } + + & ~ div svg { + cursor: pointer; + } + } +} diff --git a/src/components/VueEditor.vue b/src/components/VueEditor.vue new file mode 100755 index 0000000..7ff111d --- /dev/null +++ b/src/components/VueEditor.vue @@ -0,0 +1,220 @@ + + + + + + diff --git a/src/helpers/axios.js b/src/helpers/axios.js new file mode 100644 index 0000000..0bfedee --- /dev/null +++ b/src/helpers/axios.js @@ -0,0 +1,24 @@ +import axios from "axios"; +const CLIENT_ID = "993793b1d8d3e2e"; + +// We create our own axios instance and set a custom base URL. +// Note that if we wouldn't set any config here we do not need +// a named export, as we could just `import axios from 'axios'` +export const axiosInstance = axios.create({ + baseURL: `https://api.imgur.com/3/`, + headers: { Authorization: "Client-ID " + CLIENT_ID } +}); +// export default ({ Vue }) => { +// Vue.prototype.$axios = axiosInstance; +// }; + +// Here we define a named export +// that we can later use inside .js files: +// export default axiosInstance; + +// axios({ +// url: "https://api.imgur.com/3/image", +// method: "POST", +// headers: { Authorization: "Client-ID " + CLIENT_ID }, + +// }); diff --git a/src/helpers/default-toolbar.js b/src/helpers/default-toolbar.js new file mode 100755 index 0000000..8540209 --- /dev/null +++ b/src/helpers/default-toolbar.js @@ -0,0 +1,17 @@ +const defaultToolbar = [ + [{ header: [false, 1, 2, 3, 4, 5, 6] }], + ["bold", "italic", "underline", "strike"], // toggled buttons + [ + { align: "" }, + { align: "center" }, + { align: "right" }, + { align: "justify" } + ], + ["blockquote", "code-block"], + [{ list: "ordered" }, { list: "bullet" }, { list: "check" }], + [{ indent: "-1" }, { indent: "+1" }], // outdent/indent + [{ color: [] }, { background: [] }], // dropdown with defaults from theme + ["link", "image", "video"], + ["clean"] // remove formatting button +]; +export default defaultToolbar; diff --git a/src/helpers/fullToolbar.js b/src/helpers/fullToolbar.js new file mode 100755 index 0000000..2cdc3ec --- /dev/null +++ b/src/helpers/fullToolbar.js @@ -0,0 +1,35 @@ +var fullToolbar = [ + [{ font: [] }], + + [{ header: [false, 1, 2, 3, 4, 5, 6] }], + + [{ size: ["small", false, "large", "huge"] }], + + ["bold", "italic", "underline", "strike"], + + [ + { align: "" }, + { align: "center" }, + { align: "right" }, + { align: "justify" } + ], + + [{ header: 1 }, { header: 2 }], + + ["blockquote", "code-block"], + + [{ list: "ordered" }, { list: "bullet" }, { list: "check" }], + + [{ script: "sub" }, { script: "super" }], + + [{ indent: "-1" }, { indent: "+1" }], + + [{ color: [] }, { background: [] }], + + ["link", "image", "video", "formula"], + + [{ direction: "rtl" }], + ["clean"] +]; + +export default fullToolbar; diff --git a/src/helpers/markdown-shortcuts.js b/src/helpers/markdown-shortcuts.js new file mode 100755 index 0000000..d8ee89c --- /dev/null +++ b/src/helpers/markdown-shortcuts.js @@ -0,0 +1,288 @@ +import Quill from "quill"; +const BlockEmbed = Quill.import("blots/block/embed"); +class HorizontalRule extends BlockEmbed {} +HorizontalRule.blotName = "hr"; +HorizontalRule.tagName = "hr"; +Quill.register("formats/horizontal", HorizontalRule); + +class MarkdownShortcuts { + constructor(quill, options) { + this.quill = quill; + this.options = options; + + this.ignoreTags = ["PRE"]; + this.matches = [ + { + name: "header", + pattern: /^(#){1,6}\s/g, + action: (text, selection, pattern) => { + var match = pattern.exec(text); + if (!match) return; + const size = match[0].length; + // Need to defer this action https://github.com/quilljs/quill/issues/1134 + setTimeout(() => { + this.quill.formatLine(selection.index, 0, "header", size - 1); + this.quill.deleteText(selection.index - size, size); + }, 0); + } + }, + { + name: "blockquote", + pattern: /^(>)\s/g, + action: (_text, selection) => { + // Need to defer this action https://github.com/quilljs/quill/issues/1134 + setTimeout(() => { + this.quill.formatLine(selection.index, 1, "blockquote", true); + this.quill.deleteText(selection.index - 2, 2); + }, 0); + } + }, + { + name: "code-block", + pattern: /^`{3}(?:\s|\n)/g, + action: (_text, selection) => { + // Need to defer this action https://github.com/quilljs/quill/issues/1134 + setTimeout(() => { + this.quill.formatLine(selection.index, 1, "code-block", true); + this.quill.deleteText(selection.index - 4, 4); + }, 0); + } + }, + { + name: "bolditalic", + pattern: /(?:\*|_){3}(.+?)(?:\*|_){3}/g, + action: (text, _selection, pattern, lineStart) => { + const match = pattern.exec(text); + + const annotatedText = match[0]; + const matchedText = match[1]; + const startIndex = lineStart + match.index; + + if (text.match(/^([*_ \n]+)$/g)) return; + + setTimeout(() => { + this.quill.deleteText(startIndex, annotatedText.length); + this.quill.insertText(startIndex, matchedText, { + bold: true, + italic: true + }); + this.quill.format("bold", false); + }, 0); + } + }, + { + name: "bold", + pattern: /(?:\*|_){2}(.+?)(?:\*|_){2}/g, + action: (text, _selection, pattern, lineStart) => { + const match = pattern.exec(text); + + const annotatedText = match[0]; + const matchedText = match[1]; + const startIndex = lineStart + match.index; + + if (text.match(/^([*_ \n]+)$/g)) return; + + setTimeout(() => { + this.quill.deleteText(startIndex, annotatedText.length); + this.quill.insertText(startIndex, matchedText, { bold: true }); + this.quill.format("bold", false); + }, 0); + } + }, + { + name: "italic", + pattern: /(?:\*|_){1}(.+?)(?:\*|_){1}/g, + action: (text, _selection, pattern, lineStart) => { + const match = pattern.exec(text); + + const annotatedText = match[0]; + const matchedText = match[1]; + const startIndex = lineStart + match.index; + + if (text.match(/^([*_ \n]+)$/g)) return; + + setTimeout(() => { + this.quill.deleteText(startIndex, annotatedText.length); + this.quill.insertText(startIndex, matchedText, { italic: true }); + this.quill.format("italic", false); + }, 0); + } + }, + { + name: "strikethrough", + pattern: /(?:~~)(.+?)(?:~~)/g, + action: (text, _selection, pattern, lineStart) => { + const match = pattern.exec(text); + + const annotatedText = match[0]; + const matchedText = match[1]; + const startIndex = lineStart + match.index; + + if (text.match(/^([*_ \n]+)$/g)) return; + + setTimeout(() => { + this.quill.deleteText(startIndex, annotatedText.length); + this.quill.insertText(startIndex, matchedText, { strike: true }); + this.quill.format("strike", false); + }, 0); + } + }, + { + name: "code", + pattern: /(?:`)(.+?)(?:`)/g, + action: (text, _selection, pattern, lineStart) => { + const match = pattern.exec(text); + + const annotatedText = match[0]; + const matchedText = match[1]; + const startIndex = lineStart + match.index; + + if (text.match(/^([*_ \n]+)$/g)) return; + + setTimeout(() => { + this.quill.deleteText(startIndex, annotatedText.length); + this.quill.insertText(startIndex, matchedText, { code: true }); + this.quill.format("code", false); + this.quill.insertText(this.quill.getSelection(), " "); + }, 0); + } + }, + { + name: "hr", + pattern: /^([-*]\s?){3}/g, + action: (text, selection) => { + const startIndex = selection.index - text.length; + setTimeout(() => { + this.quill.deleteText(startIndex, text.length); + + this.quill.insertEmbed( + startIndex + 1, + "hr", + true, + Quill.sources.USER + ); + this.quill.insertText(startIndex + 2, "\n", Quill.sources.SILENT); + this.quill.setSelection(startIndex + 2, Quill.sources.SILENT); + }, 0); + } + }, + { + name: "asterisk-ul", + pattern: /^(\*|\+)\s$/g, + // eslint-disable-next-line no-unused-vars + action: (_text, selection, _pattern) => { + setTimeout(() => { + this.quill.formatLine(selection.index, 1, "list", "unordered"); + this.quill.deleteText(selection.index - 2, 2); + }, 0); + } + }, + { + name: "image", + pattern: /(?:!\[(.+?)\])(?:\((.+?)\))/g, + action: (text, selection, pattern) => { + const startIndex = text.search(pattern); + const matchedText = text.match(pattern)[0]; + // const hrefText = text.match(/(?:!\[(.*?)\])/g)[0] + const hrefLink = text.match(/(?:\((.*?)\))/g)[0]; + const start = selection.index - matchedText.length - 1; + if (startIndex !== -1) { + setTimeout(() => { + this.quill.deleteText(start, matchedText.length); + this.quill.insertEmbed( + start, + "image", + hrefLink.slice(1, hrefLink.length - 1) + ); + }, 0); + } + } + }, + { + name: "link", + pattern: /(?:\[(.+?)\])(?:\((.+?)\))/g, + action: (text, selection, pattern) => { + const startIndex = text.search(pattern); + const matchedText = text.match(pattern)[0]; + const hrefText = text.match(/(?:\[(.*?)\])/g)[0]; + const hrefLink = text.match(/(?:\((.*?)\))/g)[0]; + const start = selection.index - matchedText.length - 1; + if (startIndex !== -1) { + setTimeout(() => { + this.quill.deleteText(start, matchedText.length); + this.quill.insertText( + start, + hrefText.slice(1, hrefText.length - 1), + "link", + hrefLink.slice(1, hrefLink.length - 1) + ); + }, 0); + } + } + } + ]; + + // Handler that looks for insert deltas that match specific characters + // eslint-disable-next-line no-unused-vars + this.quill.on("text-change", (delta, _oldContents, _source) => { + for (let i = 0; i < delta.ops.length; i++) { + if (delta.ops[i].hasOwnProperty("insert")) { + if (delta.ops[i].insert === " ") { + this.onSpace(); + } else if (delta.ops[i].insert === "\n") { + this.onEnter(); + } + } + } + }); + } + + isValid(text, tagName) { + return ( + typeof text !== "undefined" && + text && + this.ignoreTags.indexOf(tagName) === -1 + ); + } + + onSpace() { + const selection = this.quill.getSelection(); + if (!selection) return; + const [line, offset] = this.quill.getLine(selection.index); + const text = line.domNode.textContent; + const lineStart = selection.index - offset; + if (this.isValid(text, line.domNode.tagName)) { + for (let match of this.matches) { + const matchedText = text.match(match.pattern); + if (matchedText) { + // We need to replace only matched text not the whole line + console.log("matched:", match.name, text); + match.action(text, selection, match.pattern, lineStart); + return; + } + } + } + } + + onEnter() { + const selection = this.quill.getSelection(); + if (!selection) return; + const [line, offset] = this.quill.getLine(selection.index); + const text = line.domNode.textContent + " "; + const lineStart = selection.index - offset; + selection.length = selection.index++; + if (this.isValid(text, line.domNode.tagName)) { + for (let match of this.matches) { + const matchedText = text.match(match.pattern); + if (matchedText) { + console.log("matched", match.name, text); + match.action(text, selection, match.pattern, lineStart); + return; + } + } + } + } +} + +// module.exports = MarkdownShortcuts; +export default MarkdownShortcuts; diff --git a/src/helpers/merge-deep.js b/src/helpers/merge-deep.js new file mode 100644 index 0000000..248e9c8 --- /dev/null +++ b/src/helpers/merge-deep.js @@ -0,0 +1,28 @@ +/** + * Performs a deep merge of `source` into `target`. + * Mutates `target` only but not its objects and arrays. + * + */ + +export default function mergeDeep(target, source) { + const isObject = obj => obj && typeof obj === "object"; + + if (!isObject(target) || !isObject(source)) { + return source; + } + + Object.keys(source).forEach(key => { + const targetValue = target[key]; + const sourceValue = source[key]; + + if (Array.isArray(targetValue) && Array.isArray(sourceValue)) { + target[key] = targetValue.concat(sourceValue); + } else if (isObject(targetValue) && isObject(sourceValue)) { + target[key] = mergeDeep(Object.assign({}, targetValue), sourceValue); + } else { + target[key] = sourceValue; + } + }); + + return target; +} diff --git a/src/helpers/old-api.js b/src/helpers/old-api.js new file mode 100755 index 0000000..a8c5f69 --- /dev/null +++ b/src/helpers/old-api.js @@ -0,0 +1,14 @@ +export default { + props: { + customModules: Array + }, + methods: { + registerCustomModules(Quill) { + if (this.customModules !== undefined) { + this.customModules.forEach(customModule => { + Quill.register("modules/" + customModule.alias, customModule.module); + }); + } + } + } +}; diff --git a/src/icons/background.svg b/src/icons/background.svg deleted file mode 100644 index a55a258..0000000 --- a/src/icons/background.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/icons/code.svg b/src/icons/code.svg deleted file mode 100644 index bcf49bc..0000000 --- a/src/icons/code.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/color.svg b/src/icons/color.svg deleted file mode 100644 index b88d2ee..0000000 --- a/src/icons/color.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/icons/ic_format_align_center_black_36px.svg b/src/icons/ic_format_align_center_black_36px.svg deleted file mode 100644 index b42af1d..0000000 --- a/src/icons/ic_format_align_center_black_36px.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/ic_format_align_left_black_36px.svg b/src/icons/ic_format_align_left_black_36px.svg deleted file mode 100644 index 2324311..0000000 --- a/src/icons/ic_format_align_left_black_36px.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/ic_format_align_right_black_36px.svg b/src/icons/ic_format_align_right_black_36px.svg deleted file mode 100644 index c02cb20..0000000 --- a/src/icons/ic_format_align_right_black_36px.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/ic_format_clear_black_36px.svg b/src/icons/ic_format_clear_black_36px.svg deleted file mode 100644 index cb84225..0000000 --- a/src/icons/ic_format_clear_black_36px.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/ic_format_list_bulleted_black_36px.svg b/src/icons/ic_format_list_bulleted_black_36px.svg deleted file mode 100644 index b460e14..0000000 --- a/src/icons/ic_format_list_bulleted_black_36px.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/ic_format_quote_black_36px.svg b/src/icons/ic_format_quote_black_36px.svg deleted file mode 100644 index 40239af..0000000 --- a/src/icons/ic_format_quote_black_36px.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/ic_format_size_black_36px.svg b/src/icons/ic_format_size_black_36px.svg deleted file mode 100644 index 0925d57..0000000 --- a/src/icons/ic_format_size_black_36px.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/ic_insert_photo_black_36px.svg b/src/icons/ic_insert_photo_black_36px.svg deleted file mode 100644 index b15104a..0000000 --- a/src/icons/ic_insert_photo_black_36px.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/ic_title_black_36px.svg b/src/icons/ic_title_black_36px.svg deleted file mode 100644 index 068fb13..0000000 --- a/src/icons/ic_title_black_36px.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/icons.js b/src/icons/icons.js deleted file mode 100644 index baaf9a0..0000000 --- a/src/icons/icons.js +++ /dev/null @@ -1,90 +0,0 @@ -import Quill from 'quill' -var icons = Quill.import('ui/icons'); - -icons['bold'] = - ` - - -`; - -icons['italic'] = - ` - - -`; - -icons['underline'] = - ` - - -`; - -icons['strike'] = - ` - - - - - - - - `; - - -icons['blockquote'] = - ` - - -`; - -icons['code-block'] = - ` - - - `; - - -icons['indent']['+1'] = - ` - - - `; - -icons['list']['ordered'] = - ` - - -`; - -icons['list']['bullet'] = - ` - - -`; - -icons['indent']['-1'] = - ` - - -`; - -icons['indent']['+1'] = - ` - - - `; - - icons['color'] = - ` - - - - `; - - - icons['background'] = - ` - - - - `; diff --git a/src/icons/indent.minus1.svg b/src/icons/indent.minus1.svg deleted file mode 100644 index 0545992..0000000 --- a/src/icons/indent.minus1.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/indent.plus1.svg b/src/icons/indent.plus1.svg deleted file mode 100644 index da73430..0000000 --- a/src/icons/indent.plus1.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/italic.svg b/src/icons/italic.svg deleted file mode 100644 index a3aee21..0000000 --- a/src/icons/italic.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/list.ordered.svg b/src/icons/list.ordered.svg deleted file mode 100644 index 67bb50b..0000000 --- a/src/icons/list.ordered.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/icons/strike.svg b/src/icons/strike.svg deleted file mode 100644 index e0e829e..0000000 --- a/src/icons/strike.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/strikethrough.svg b/src/icons/strikethrough.svg deleted file mode 100644 index 84430cc..0000000 --- a/src/icons/strikethrough.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/icons/underline.svg b/src/icons/underline.svg deleted file mode 100644 index de5fd7f..0000000 --- a/src/icons/underline.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/index.js b/src/index.js index 4f4ec93..f813cd0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,14 +1,35 @@ -/** - * Vue2-Editor - */ -import VueEditor from './VueEditor.vue' - -const Vue2Editor = { - VueEditor, - install: function(Vue) { - Vue.component(VueEditor.name, VueEditor) - } +import Quill from "quill"; +import VueEditor from "@/components/VueEditor.vue"; + +const version = "__VERSION__"; + +// Declare install function executed by Vue.use() +export function install(Vue) { + if (install.installed) return; + install.installed = true; + + Vue.component("VueEditor", VueEditor); +} + +const VPlugin = { + install, + version, + Quill, + VueEditor +}; + +// Auto-install when vue is found (eg. in browser via