├── .gitignore ├── docs ├── fonts │ ├── Bowtie.woff2 │ └── Bowtie.css ├── SMention.css ├── index.html ├── global.css ├── main.js ├── Smention.css.map ├── SMention.js └── SMention.js.map ├── package.json ├── rollup.config.js ├── README.md └── src └── SMention.svelte /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | public/bundle.* 4 | package-lock.json 5 | yarn.lock 6 | .vs/**/* -------------------------------------------------------------------------------- /docs/fonts/Bowtie.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ANovokmet/svelte-mentions/HEAD/docs/fonts/Bowtie.woff2 -------------------------------------------------------------------------------- /docs/SMention.css: -------------------------------------------------------------------------------- 1 | .smentions-textarea.svelte-1x0ru93{width:800px;resize:none}.dropdown.svelte-1x0ru93{width:800px;box-sizing:border-box;border:1px solid #ccc}.dropdown.hidden.svelte-1x0ru93{display:none}.items.svelte-1x0ru93{list-style:none;margin:0;padding:0}.results.svelte-1x0ru93{padding:4px;height:24px;color:rgba(0,0,0,.55);font-size:14px;box-sizing:border-box} 2 | 3 | /*# sourceMappingURL=SMention.css.map */ -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Svelte-mentions 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Type e.g. "@A" or "#1"

16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "svelte-app", 3 | "version": "1.0.0", 4 | "devDependencies": { 5 | "npm-run-all": "^4.1.3", 6 | "rollup": "^0.66.2", 7 | "rollup-plugin-commonjs": "^9.1.8", 8 | "rollup-plugin-node-resolve": "^3.4.0", 9 | "rollup-plugin-svelte": "^5.2.3", 10 | "rollup-plugin-terser": "^3.0.0", 11 | "sirv-cli": "^0.2.2", 12 | "svelte": "^3.23.2" 13 | }, 14 | "scripts": { 15 | "build": "rollup -c", 16 | "autobuild": "rollup -c -w", 17 | "dev": "run-p start:dev autobuild", 18 | "start": "sirv docs", 19 | "start:dev": "sirv docs --dev" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import svelte from 'rollup-plugin-svelte'; 2 | import resolve from 'rollup-plugin-node-resolve'; 3 | import commonjs from 'rollup-plugin-commonjs'; 4 | import { terser } from 'rollup-plugin-terser'; 5 | 6 | const production = !process.env.ROLLUP_WATCH; 7 | 8 | export default { 9 | input: 'src/SMention.svelte', 10 | output: { 11 | sourcemap: true, 12 | format: 'iife', 13 | name: 'SMention', 14 | file: 'docs/SMention.js' 15 | }, 16 | plugins: [ 17 | svelte({ 18 | dev: !production, 19 | css: css => { 20 | css.write('docs/SMention.css'); 21 | } 22 | }), 23 | resolve(), 24 | commonjs(), 25 | production && terser() 26 | ] 27 | }; 28 | -------------------------------------------------------------------------------- /docs/global.css: -------------------------------------------------------------------------------- 1 | /* global styles */ 2 | html, body { 3 | position: relative; 4 | width: 100%; 5 | height: 100%; 6 | } 7 | 8 | body { 9 | color: #333; 10 | margin: 0; 11 | padding: 8px; 12 | box-sizing: border-box; 13 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 14 | } 15 | 16 | a { 17 | color: rgb(0,100,200); 18 | text-decoration: none; 19 | } 20 | 21 | a:hover { 22 | text-decoration: underline; 23 | } 24 | 25 | a:visited { 26 | color: rgb(0,80,160); 27 | } 28 | 29 | label { 30 | display: block; 31 | } 32 | 33 | input, button, select, textarea { 34 | font-family: inherit; 35 | font-size: inherit; 36 | box-sizing: border-box; 37 | border: 1px solid #ccc; 38 | border-radius: 2px; 39 | } 40 | 41 | input:disabled { 42 | color: #ccc; 43 | } 44 | 45 | input[type="range"] { 46 | height: 0; 47 | } 48 | 49 | button { 50 | background-color: #f4f4f4; 51 | outline: none; 52 | } 53 | 54 | button:active { 55 | background-color: #ddd; 56 | } 57 | 58 | button:focus { 59 | border-color: #666; 60 | } 61 | 62 | /* svelte-mentions styling */ 63 | .item { 64 | display: block; 65 | height: 40px; 66 | } 67 | 68 | 69 | .image { 70 | vertical-align: top; 71 | margin: 4px; 72 | float: left; 73 | height: 32px; 74 | width: 32px; 75 | border-radius: 16px; 76 | } 77 | 78 | .label { 79 | box-sizing: border-box; 80 | height: 40px; 81 | padding-bottom: 4px; 82 | padding-top: 4px; 83 | overflow: hidden; 84 | text-overflow: ellipsis; 85 | white-space: nowrap; 86 | word-wrap: normal; 87 | } 88 | 89 | .item .title { 90 | font-size: 12px; 91 | line-height: 12px; 92 | padding-top: 3px; 93 | padding-bottom: 2px; 94 | } 95 | 96 | .subtitle { 97 | font-size: 12px; 98 | color: rgba(0,0,0,.55); 99 | padding-bottom: 3px; 100 | line-height: 12px; 101 | } 102 | 103 | .item:hover, .task:hover { 104 | background-color: rgba(234,234,234,1); 105 | } 106 | 107 | .item.selected, .task.selected { 108 | background-color: rgba(222,236,249,1); 109 | } 110 | 111 | 112 | 113 | .task { 114 | display: block; 115 | /* height: 29px; */ 116 | padding: .2em .4em; 117 | line-height: 1.5; 118 | box-sizing: border-box; 119 | font-size: 14px; 120 | } 121 | 122 | .icon { 123 | color: rgb(242, 203, 29); 124 | margin-right: 3px; 125 | } 126 | 127 | .id { 128 | color: rgba(16,110,190,1); 129 | } 130 | 131 | .task .title { 132 | color: rgba(0,0,0,.9); 133 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # svelte-mentions 2 | 3 | Simple text-area that supports mentions and tags. Made with Svelte. 4 | 5 | ## Configuration 6 | 7 | See `./public/main.js` for an example how svelte-mentions is initialized and configured... 8 | 9 | ``` 10 | // configs, it is a list so multiple configurations (eg. mentions and tags) are supported 11 | configs: [ 12 | { 13 | // delimiter that triggers dropdown with suggestion 14 | delimiter: '@', 15 | // list of options 16 | options: [ 17 | { 18 | name: 'Ante Novokmet', 19 | email: 'ante.novokmet@gdi.net' 20 | }, 21 | { 22 | name: 'Ante Vujevic', 23 | email: 'ante.vujevic@mps.hr' 24 | }, 25 | { 26 | name: 'Anto Djapic', 27 | email: 'anto@gmail.com' 28 | } 29 | ], 30 | // when option is selected from dropdown this value is inserted 31 | encode: (item) => `@<${item.name}>`, 32 | // gets references to mentions from text 33 | decode: (text, options) => { 34 | const re = new RegExp('@<([\\w\\s]+)>', "g"); 35 | let m; 36 | const mentions = []; 37 | while (m = re.exec(text)) { 38 | const name = m[1]; 39 | const item = options.find(item => item.name === name); 40 | if(item){ 41 | mentions.push(item); 42 | } 43 | } 44 | console.log('mentioned: ', mentions); 45 | }, 46 | // creates dropdown template 47 | template: (item, query) => 48 | `
`+ 49 | `
`+ 50 | `
${getMentionHtml(item.name, query)}
`+ 51 | `
${item.email}
`+ 52 | `
`, 53 | // populates drop down after delimiter is entered 54 | filter: (options, query) => { 55 | return options.filter(o => o.name.toLowerCase().startsWith(query.toLowerCase())); 56 | }, 57 | // class applied to dropdown li element 58 | itemClass: 'item' 59 | } 60 | ] 61 | ``` 62 | 63 | ## Build from sources 64 | 65 | Install the dependencies... 66 | 67 | ```bash 68 | cd svelte-mentions 69 | npm install 70 | ``` 71 | 72 | ...then start [Rollup](https://rollupjs.org): 73 | 74 | ```bash 75 | npm run dev 76 | ``` 77 | 78 | Navigate to [localhost:5000](http://localhost:5000). Edit a component file in `src`, save it, and reload the page to see your changes. 79 | 80 | ## TBD 81 | 82 | - Usage with existing text inputs 83 | - Support for contenteditable="true" inputs 84 | 85 | 86 | -------------------------------------------------------------------------------- /docs/main.js: -------------------------------------------------------------------------------- 1 | 2 | function highlightMention(label, query) { 3 | return label.replace(new RegExp(`^(${query})`, 'gi'), function($0) { 4 | return `${$0}` 5 | }); 6 | } 7 | 8 | function highlightTag(label, query) { 9 | return label.replace(new RegExp(`(${query})`, 'gi'), function($0) { 10 | return `${$0}` 11 | }); 12 | } 13 | 14 | const dataInput = document.getElementById('data'); 15 | 16 | const smention = new SMention({ 17 | target: document.body, 18 | props: { 19 | configs: [ 20 | { 21 | delimiter: '@', 22 | options: [ 23 | { 24 | name: 'Ante Novokmet', 25 | email: 'ante.novokmet@gdi.net' 26 | }, 27 | { 28 | name: 'Ante Vujevic', 29 | email: 'ante.vujevic@mps.hr' 30 | }, 31 | { 32 | name: 'Anto Djapic', 33 | email: 'anto@gmail.com' 34 | } 35 | ], 36 | encode: (item) => `@<${item.name}>`, 37 | decode: (text, options) => { 38 | const re = new RegExp('@<([\\w\\s]+)>', "g"); 39 | let m; 40 | const mentions = []; 41 | while (m = re.exec(text)) { 42 | const name = m[1]; 43 | const item = options.find(item => item.name === name); 44 | if(item){ 45 | mentions.push(item); 46 | } 47 | } 48 | console.log('mentioned: ', mentions); 49 | }, 50 | template: (item, query) => 51 | `
`+ 52 | `
`+ 53 | `
${highlightMention(item.name, query)}
`+ 54 | `
${item.email}
`+ 55 | `
`, 56 | filter: (options, query) => { 57 | return options.filter(o => o.name.toLowerCase().startsWith(query.toLowerCase())); 58 | }, 59 | itemClass: 'item' 60 | }, 61 | { 62 | delimiter: '#', 63 | options: [ 64 | { 65 | code: '1234', 66 | name: 'Task 1234', 67 | desc: 'Do task and finish it. Another sentence.' 68 | }, 69 | { 70 | code: '1256', 71 | name: 'Bug 1256', 72 | desc: 'Fix very important and critical bug' 73 | } 74 | ], 75 | encode: (item) => `#${item.code}`, 76 | decode: (text, options) => { 77 | const re = new RegExp('#([0-9]+)', "g"); 78 | let m; 79 | const mentions = []; 80 | while (m = re.exec(text)) { 81 | const code = m[1]; 82 | const item = options.find(item => item.code === code); 83 | if(item){ 84 | mentions.push(item); 85 | } 86 | } 87 | console.log('mentioned: ', mentions); 88 | }, 89 | template: (item, query) => 90 | ``+ 91 | `${highlightTag(item.name, query)}: `+ 92 | `${item.desc}`, 93 | filter: (options, query) => { 94 | return options.filter(o => o.name.toLowerCase().includes(query.toLowerCase())); 95 | }, 96 | itemClass: 'task' 97 | } 98 | ], 99 | onChange: (value) => { 100 | dataInput.innerText = value; 101 | }, 102 | onSelected: (event) => { 103 | console.log('on:selected', event); 104 | } 105 | } 106 | }); -------------------------------------------------------------------------------- /src/SMention.svelte: -------------------------------------------------------------------------------- 1 | 100 | 101 | 107 | 125 | 126 | -------------------------------------------------------------------------------- /docs/Smention.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "file": "SMention.css", 4 | "sources": [ 5 | "..\\SMention.svelte" 6 | ], 7 | "sourcesContent": [ 8 | "\r\n\r\n\r\n
\r\n \r\n
\r\n Showing {matches.length} results.\r\n
\r\n
\r\n\r\n" 9 | ], 10 | "names": [], 11 | "mappings": "AA8HI,mBAAmB,eAAC,CAAC,AACjB,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,IAAI,AAChB,CAAC,AAED,SAAS,eAAC,CAAC,AACP,KAAK,CAAE,KAAK,CACZ,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,IAAI,AAC1B,CAAC,AAED,SAAS,OAAO,eAAC,CAAC,AACd,OAAO,CAAE,IAAI,AACjB,CAAC,AAED,MAAM,eAAC,CAAC,AACJ,UAAU,CAAE,IAAI,CAChB,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,AACd,CAAC,AAED,QAAQ,eAAC,CAAC,AACN,OAAO,CAAE,GAAG,CACZ,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CACtB,SAAS,CAAE,IAAI,CACf,UAAU,CAAE,UAAU,AAC1B,CAAC" 12 | } -------------------------------------------------------------------------------- /docs/fonts/Bowtie.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Bowtie'; 3 | src:url('Bowtie.eot?vqc4am'); 4 | src:url('Bowtie.eot?vqc4am#iefix') format('embedded-opentype'), 5 | url('Bowtie.woff2?vqc4am') format('woff2'), 6 | url('Bowtie.ttf?vqc4am') format('truetype'), 7 | url('Bowtie.woff?vqc4am') format('woff'), 8 | url('Bowtie.svg?vqc4am#Bowtie') format('svg'); 9 | font-weight: normal; 10 | font-style: normal; 11 | } 12 | 13 | i { 14 | font-family: 'Bowtie'; 15 | speak: none; 16 | font-style: normal; 17 | font-weight: normal; 18 | font-variant: normal; 19 | text-transform: none; 20 | line-height: 1; 21 | 22 | /* Better Font Rendering =========== */ 23 | -webkit-font-smoothing: antialiased; 24 | -moz-osx-font-smoothing: grayscale; 25 | } 26 | 27 | .bowtie-alert:before { 28 | content: "\e600"; 29 | } 30 | .bowtie-approve:before { 31 | content: "\e601"; 32 | } 33 | .bowtie-approve-disapprove:before { 34 | content: "\e602"; 35 | } 36 | .bowtie-arrow-down:before { 37 | content: "\e603"; 38 | } 39 | .bowtie-arrow-left:before { 40 | content: "\e604"; 41 | } 42 | .bowtie-arrow-right:before { 43 | content: "\e605"; 44 | } 45 | .bowtie-arrow-up:before { 46 | content: "\e606"; 47 | } 48 | .bowtie-attach:before { 49 | content: "\e607"; 50 | } 51 | .bowtie-azure-api-management:before { 52 | content: "\e608"; 53 | } 54 | .bowtie-azure-service-endpoint:before { 55 | content: "\e609"; 56 | } 57 | .bowtie-build:before { 58 | content: "\e60a"; 59 | } 60 | .bowtie-build-queue:before { 61 | content: "\e60b"; 62 | } 63 | .bowtie-build-queue-new:before { 64 | content: "\e60c"; 65 | } 66 | .bowtie-build-reason-checkin-shelveset:before { 67 | content: "\e60d"; 68 | } 69 | .bowtie-calendar:before { 70 | content: "\e60e"; 71 | } 72 | .bowtie-check:before { 73 | content: "\e60f"; 74 | } 75 | .bowtie-chevron-down:before { 76 | content: "\e610"; 77 | } 78 | .bowtie-chevron-left:before { 79 | content: "\e611"; 80 | } 81 | .bowtie-chevron-right:before { 82 | content: "\e612"; 83 | } 84 | .bowtie-chevron-up:before { 85 | content: "\e613"; 86 | } 87 | .bowtie-clone:before { 88 | content: "\e614"; 89 | } 90 | .bowtie-clone-to-desktop:before { 91 | content: "\e615"; 92 | } 93 | .bowtie-cloud:before { 94 | content: "\e616"; 95 | } 96 | .bowtie-comment:before { 97 | content: "\e617"; 98 | } 99 | .bowtie-comment-add:before { 100 | content: "\e618"; 101 | } 102 | .bowtie-comment-discussion:before { 103 | content: "\e619"; 104 | } 105 | .bowtie-comment-lines:before { 106 | content: "\e61a"; 107 | } 108 | .bowtie-comment-next:before { 109 | content: "\e61b"; 110 | } 111 | .bowtie-comment-outline:before { 112 | content: "\e61c"; 113 | } 114 | .bowtie-comment-previous:before { 115 | content: "\e61d"; 116 | } 117 | .bowtie-comment-urgent:before { 118 | content: "\e61e"; 119 | } 120 | .bowtie-dashboard:before { 121 | content: "\e61f"; 122 | } 123 | .bowtie-database:before { 124 | content: "\e620"; 125 | } 126 | .bowtie-diff-image:before { 127 | content: "\e621"; 128 | } 129 | .bowtie-diff-image-overlay:before { 130 | content: "\e622"; 131 | } 132 | .bowtie-diff-image-pixel:before { 133 | content: "\e623"; 134 | } 135 | .bowtie-diff-inline:before { 136 | content: "\e624"; 137 | } 138 | .bowtie-diff-side-by-side:before { 139 | content: "\e625"; 140 | } 141 | .bowtie-dot:before { 142 | content: "\e626"; 143 | } 144 | .bowtie-edit:before { 145 | content: "\e627"; 146 | } 147 | .bowtie-edit-copy:before { 148 | content: "\e628"; 149 | } 150 | .bowtie-edit-cut:before { 151 | content: "\e629"; 152 | } 153 | .bowtie-edit-delete:before { 154 | content: "\e62a"; 155 | } 156 | .bowtie-edit-paste:before { 157 | content: "\e62b"; 158 | } 159 | .bowtie-edit-redo:before { 160 | content: "\e62c"; 161 | } 162 | .bowtie-edit-remove:before { 163 | content: "\e62d"; 164 | } 165 | .bowtie-edit-rename:before { 166 | content: "\e62e"; 167 | } 168 | .bowtie-edit-undo:before { 169 | content: "\e62f"; 170 | } 171 | .bowtie-editor-list-bullet:before { 172 | content: "\e630"; 173 | } 174 | .bowtie-ellipsis:before { 175 | content: "\e631"; 176 | } 177 | .bowtie-ellipsis-vertical:before { 178 | content: "\e632"; 179 | } 180 | .bowtie-favorite:before { 181 | content: "\e633"; 182 | } 183 | .bowtie-favorite-outline:before { 184 | content: "\e634"; 185 | } 186 | .bowtie-feedback-negative:before { 187 | content: "\e635"; 188 | } 189 | .bowtie-feedback-positive:before { 190 | content: "\e636"; 191 | } 192 | .bowtie-file:before { 193 | content: "\e637"; 194 | } 195 | .bowtie-file-code:before { 196 | content: "\e638"; 197 | } 198 | .bowtie-file-comment:before { 199 | content: "\e639"; 200 | } 201 | .bowtie-file-content:before { 202 | content: "\e63a"; 203 | } 204 | .bowtie-file-image:before { 205 | content: "\e63b"; 206 | } 207 | .bowtie-file-preview:before { 208 | content: "\e63c"; 209 | } 210 | .bowtie-file-symlink:before { 211 | content: "\e63d"; 212 | } 213 | .bowtie-fold-less:before { 214 | content: "\e63e"; 215 | } 216 | .bowtie-fold-more:before { 217 | content: "\e63f"; 218 | } 219 | .bowtie-folder:before { 220 | content: "\e640"; 221 | } 222 | .bowtie-git:before { 223 | content: "\e641"; 224 | } 225 | .bowtie-heartbeat:before { 226 | content: "\e642"; 227 | } 228 | .bowtie-install:before { 229 | content: "\e643"; 230 | } 231 | .bowtie-link:before { 232 | content: "\e644"; 233 | } 234 | .bowtie-logo-visual-studio:before { 235 | content: "\e645"; 236 | } 237 | .bowtie-logo-windows:before { 238 | content: "\e646"; 239 | } 240 | .bowtie-mail-message:before { 241 | content: "\e647"; 242 | } 243 | .bowtie-math-minus:before { 244 | content: "\e648"; 245 | } 246 | .bowtie-math-minus-box:before { 247 | content: "\e649"; 248 | } 249 | .bowtie-math-minus-circle:before { 250 | content: "\e64a"; 251 | } 252 | .bowtie-math-multiply:before { 253 | content: "\e64b"; 254 | } 255 | .bowtie-math-plus:before { 256 | content: "\e64c"; 257 | } 258 | .bowtie-math-plus-box:before { 259 | content: "\e64d"; 260 | } 261 | .bowtie-math-plus-circle:before { 262 | content: "\e64e"; 263 | } 264 | .bowtie-math-plus-heavy:before { 265 | content: "\e64f"; 266 | } 267 | .bowtie-media-play:before { 268 | content: "\e650"; 269 | } 270 | .bowtie-menu:before { 271 | content: "\e651"; 272 | } 273 | .bowtie-navigate-back-circle:before { 274 | content: "\e652"; 275 | } 276 | .bowtie-navigate-back-disc:before { 277 | content: "\e653"; 278 | } 279 | .bowtie-navigate-close:before { 280 | content: "\e900"; 281 | } 282 | .bowtie-navigate-external:before { 283 | content: "\e654"; 284 | } 285 | .bowtie-navigate-forward-circle:before { 286 | content: "\e655"; 287 | } 288 | .bowtie-navigate-forward-disc:before { 289 | content: "\e656"; 290 | } 291 | .bowtie-navigate-history:before { 292 | content: "\e657"; 293 | } 294 | .bowtie-navigate-refresh:before { 295 | content: "\e658"; 296 | } 297 | .bowtie-navigate-reload:before { 298 | content: "\e659"; 299 | } 300 | .bowtie-package:before { 301 | content: "\e65a"; 302 | } 303 | .bowtie-pin:before { 304 | content: "\e65b"; 305 | } 306 | .bowtie-repo:before { 307 | content: "\e65c"; 308 | } 309 | .bowtie-repo-git:before { 310 | content: "\e65d"; 311 | } 312 | .bowtie-repo-tfvc:before { 313 | content: "\e65e"; 314 | } 315 | .bowtie-repository:before { 316 | content: "\e65f"; 317 | } 318 | .bowtie-repository-submodule:before { 319 | content: "\e660"; 320 | } 321 | .bowtie-save:before { 322 | content: "\e661"; 323 | } 324 | .bowtie-search:before { 325 | content: "\e662"; 326 | } 327 | .bowtie-search-filter:before { 328 | content: "\e663"; 329 | } 330 | .bowtie-security:before { 331 | content: "\e664"; 332 | } 333 | .bowtie-security-access:before { 334 | content: "\e665"; 335 | } 336 | .bowtie-security-lock:before { 337 | content: "\e666"; 338 | } 339 | .bowtie-security-unlock:before { 340 | content: "\e667"; 341 | } 342 | .bowtie-separator:before { 343 | content: "\e668"; 344 | } 345 | .bowtie-settings-gear:before { 346 | content: "\e669"; 347 | } 348 | .bowtie-settings-wrench:before { 349 | content: "\e66a"; 350 | } 351 | .bowtie-share:before { 352 | content: "\e66b"; 353 | } 354 | .bowtie-shop:before { 355 | content: "\e66c"; 356 | } 357 | .bowtie-social-facebook:before { 358 | content: "\e66d"; 359 | } 360 | .bowtie-social-twitter:before { 361 | content: "\e66e"; 362 | } 363 | .bowtie-sort-ascending:before { 364 | content: "\e66f"; 365 | } 366 | .bowtie-sort-descending:before { 367 | content: "\e670"; 368 | } 369 | .bowtie-square:before { 370 | content: "\e671"; 371 | } 372 | .bowtie-status-error:before { 373 | content: "\e672"; 374 | } 375 | .bowtie-status-failure:before { 376 | content: "\e673"; 377 | } 378 | .bowtie-status-help:before { 379 | content: "\e674"; 380 | } 381 | .bowtie-status-info:before { 382 | content: "\e675"; 383 | } 384 | .bowtie-status-info-outline:before { 385 | content: "\e676"; 386 | } 387 | .bowtie-status-success:before { 388 | content: "\e677"; 389 | } 390 | .bowtie-status-waiting:before { 391 | content: "\e678"; 392 | } 393 | .bowtie-status-warning:before { 394 | content: "\e679"; 395 | } 396 | .bowtie-switch:before { 397 | content: "\e67a"; 398 | } 399 | .bowtie-tag:before { 400 | content: "\e67b"; 401 | } 402 | .bowtie-tfvc-branch:before { 403 | content: "\e67c"; 404 | } 405 | .bowtie-tfvc-branch-locked:before { 406 | content: "\e67d"; 407 | } 408 | .bowtie-tfvc-change-list:before { 409 | content: "\e67e"; 410 | } 411 | .bowtie-tfvc-commit:before { 412 | content: "\e67f"; 413 | } 414 | .bowtie-tfvc-compare:before { 415 | content: "\e680"; 416 | } 417 | .bowtie-tfvc-merge:before { 418 | content: "\e681"; 419 | } 420 | .bowtie-tfvc-pull-request:before { 421 | content: "\e682"; 422 | } 423 | .bowtie-tfvc-raw-source:before { 424 | content: "\e683"; 425 | } 426 | .bowtie-tfvc-repo:before { 427 | content: "\e684"; 428 | } 429 | .bowtie-tfvc-shelveset:before { 430 | content: "\e685"; 431 | } 432 | .bowtie-toggle-collapse:before { 433 | content: "\e686"; 434 | } 435 | .bowtie-toggle-collapse-all:before { 436 | content: "\e687"; 437 | } 438 | .bowtie-toggle-expand:before { 439 | content: "\e688"; 440 | } 441 | .bowtie-toggle-expand-all:before { 442 | content: "\e689"; 443 | } 444 | .bowtie-toggle-tree-collapsed:before { 445 | content: "\e68a"; 446 | } 447 | .bowtie-toggle-tree-expanded:before { 448 | content: "\e68b"; 449 | } 450 | .bowtie-transfer-download:before { 451 | content: "\e68c"; 452 | } 453 | .bowtie-transfer-upload:before { 454 | content: "\e68d"; 455 | } 456 | .bowtie-triangle-down:before { 457 | content: "\e68e"; 458 | } 459 | .bowtie-triangle-left:before { 460 | content: "\e68f"; 461 | } 462 | .bowtie-triangle-right:before { 463 | content: "\e690"; 464 | } 465 | .bowtie-triangle-up:before { 466 | content: "\e691"; 467 | } 468 | .bowtie-user:before { 469 | content: "\e692"; 470 | } 471 | .bowtie-users:before { 472 | content: "\e693"; 473 | } 474 | .bowtie-view-full-screen:before { 475 | content: "\e694"; 476 | } 477 | .bowtie-view-full-screen-exit:before { 478 | content: "\e695"; 479 | } 480 | .bowtie-view-list:before { 481 | content: "\e696"; 482 | } 483 | .bowtie-view-list-group:before { 484 | content: "\e697"; 485 | } 486 | .bowtie-view-list-tree:before { 487 | content: "\e698"; 488 | } 489 | .bowtie-watch-eye:before { 490 | content: "\e699"; 491 | } 492 | .bowtie-work-item:before { 493 | content: "\e69a"; 494 | } 495 | .bowtie-work-item-bar:before { 496 | content: "\e69b"; 497 | } 498 | 499 | -------------------------------------------------------------------------------- /docs/SMention.js: -------------------------------------------------------------------------------- 1 | var SMention = (function () { 2 | 'use strict'; 3 | 4 | function noop() { } 5 | function add_location(element, file, line, column, char) { 6 | element.__svelte_meta = { 7 | loc: { file, line, column, char } 8 | }; 9 | } 10 | function run(fn) { 11 | return fn(); 12 | } 13 | function blank_object() { 14 | return Object.create(null); 15 | } 16 | function run_all(fns) { 17 | fns.forEach(run); 18 | } 19 | function is_function(thing) { 20 | return typeof thing === 'function'; 21 | } 22 | function safe_not_equal(a, b) { 23 | return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); 24 | } 25 | function null_to_empty(value) { 26 | return value == null ? '' : value; 27 | } 28 | 29 | function append(target, node) { 30 | target.appendChild(node); 31 | } 32 | function insert(target, node, anchor) { 33 | target.insertBefore(node, anchor || null); 34 | } 35 | function detach(node) { 36 | node.parentNode.removeChild(node); 37 | } 38 | function destroy_each(iterations, detaching) { 39 | for (let i = 0; i < iterations.length; i += 1) { 40 | if (iterations[i]) 41 | iterations[i].d(detaching); 42 | } 43 | } 44 | function element(name) { 45 | return document.createElement(name); 46 | } 47 | function text(data) { 48 | return document.createTextNode(data); 49 | } 50 | function space() { 51 | return text(' '); 52 | } 53 | function listen(node, event, handler, options) { 54 | node.addEventListener(event, handler, options); 55 | return () => node.removeEventListener(event, handler, options); 56 | } 57 | function attr(node, attribute, value) { 58 | if (value == null) 59 | node.removeAttribute(attribute); 60 | else if (node.getAttribute(attribute) !== value) 61 | node.setAttribute(attribute, value); 62 | } 63 | function children(element) { 64 | return Array.from(element.childNodes); 65 | } 66 | function set_input_value(input, value) { 67 | input.value = value == null ? '' : value; 68 | } 69 | function toggle_class(element, name, toggle) { 70 | element.classList[toggle ? 'add' : 'remove'](name); 71 | } 72 | function custom_event(type, detail) { 73 | const e = document.createEvent('CustomEvent'); 74 | e.initCustomEvent(type, false, false, detail); 75 | return e; 76 | } 77 | class HtmlTag { 78 | constructor(anchor = null) { 79 | this.a = anchor; 80 | this.e = this.n = null; 81 | } 82 | m(html, target, anchor = null) { 83 | if (!this.e) { 84 | this.e = element(target.nodeName); 85 | this.t = target; 86 | this.h(html); 87 | } 88 | this.i(anchor); 89 | } 90 | h(html) { 91 | this.e.innerHTML = html; 92 | this.n = Array.from(this.e.childNodes); 93 | } 94 | i(anchor) { 95 | for (let i = 0; i < this.n.length; i += 1) { 96 | insert(this.t, this.n[i], anchor); 97 | } 98 | } 99 | p(html) { 100 | this.d(); 101 | this.h(html); 102 | this.i(this.a); 103 | } 104 | d() { 105 | this.n.forEach(detach); 106 | } 107 | } 108 | 109 | let current_component; 110 | function set_current_component(component) { 111 | current_component = component; 112 | } 113 | 114 | const dirty_components = []; 115 | const binding_callbacks = []; 116 | const render_callbacks = []; 117 | const flush_callbacks = []; 118 | const resolved_promise = Promise.resolve(); 119 | let update_scheduled = false; 120 | function schedule_update() { 121 | if (!update_scheduled) { 122 | update_scheduled = true; 123 | resolved_promise.then(flush); 124 | } 125 | } 126 | function add_render_callback(fn) { 127 | render_callbacks.push(fn); 128 | } 129 | let flushing = false; 130 | const seen_callbacks = new Set(); 131 | function flush() { 132 | if (flushing) 133 | return; 134 | flushing = true; 135 | do { 136 | // first, call beforeUpdate functions 137 | // and update components 138 | for (let i = 0; i < dirty_components.length; i += 1) { 139 | const component = dirty_components[i]; 140 | set_current_component(component); 141 | update(component.$$); 142 | } 143 | dirty_components.length = 0; 144 | while (binding_callbacks.length) 145 | binding_callbacks.pop()(); 146 | // then, once components are updated, call 147 | // afterUpdate functions. This may cause 148 | // subsequent updates... 149 | for (let i = 0; i < render_callbacks.length; i += 1) { 150 | const callback = render_callbacks[i]; 151 | if (!seen_callbacks.has(callback)) { 152 | // ...so guard against infinite loops 153 | seen_callbacks.add(callback); 154 | callback(); 155 | } 156 | } 157 | render_callbacks.length = 0; 158 | } while (dirty_components.length); 159 | while (flush_callbacks.length) { 160 | flush_callbacks.pop()(); 161 | } 162 | update_scheduled = false; 163 | flushing = false; 164 | seen_callbacks.clear(); 165 | } 166 | function update($$) { 167 | if ($$.fragment !== null) { 168 | $$.update(); 169 | run_all($$.before_update); 170 | const dirty = $$.dirty; 171 | $$.dirty = [-1]; 172 | $$.fragment && $$.fragment.p($$.ctx, dirty); 173 | $$.after_update.forEach(add_render_callback); 174 | } 175 | } 176 | const outroing = new Set(); 177 | function transition_in(block, local) { 178 | if (block && block.i) { 179 | outroing.delete(block); 180 | block.i(local); 181 | } 182 | } 183 | function mount_component(component, target, anchor) { 184 | const { fragment, on_mount, on_destroy, after_update } = component.$$; 185 | fragment && fragment.m(target, anchor); 186 | // onMount happens before the initial afterUpdate 187 | add_render_callback(() => { 188 | const new_on_destroy = on_mount.map(run).filter(is_function); 189 | if (on_destroy) { 190 | on_destroy.push(...new_on_destroy); 191 | } 192 | else { 193 | // Edge case - component was destroyed immediately, 194 | // most likely as a result of a binding initialising 195 | run_all(new_on_destroy); 196 | } 197 | component.$$.on_mount = []; 198 | }); 199 | after_update.forEach(add_render_callback); 200 | } 201 | function destroy_component(component, detaching) { 202 | const $$ = component.$$; 203 | if ($$.fragment !== null) { 204 | run_all($$.on_destroy); 205 | $$.fragment && $$.fragment.d(detaching); 206 | // TODO null out other refs, including component.$$ (but need to 207 | // preserve final state?) 208 | $$.on_destroy = $$.fragment = null; 209 | $$.ctx = []; 210 | } 211 | } 212 | function make_dirty(component, i) { 213 | if (component.$$.dirty[0] === -1) { 214 | dirty_components.push(component); 215 | schedule_update(); 216 | component.$$.dirty.fill(0); 217 | } 218 | component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); 219 | } 220 | function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { 221 | const parent_component = current_component; 222 | set_current_component(component); 223 | const prop_values = options.props || {}; 224 | const $$ = component.$$ = { 225 | fragment: null, 226 | ctx: null, 227 | // state 228 | props, 229 | update: noop, 230 | not_equal, 231 | bound: blank_object(), 232 | // lifecycle 233 | on_mount: [], 234 | on_destroy: [], 235 | before_update: [], 236 | after_update: [], 237 | context: new Map(parent_component ? parent_component.$$.context : []), 238 | // everything else 239 | callbacks: blank_object(), 240 | dirty 241 | }; 242 | let ready = false; 243 | $$.ctx = instance 244 | ? instance(component, prop_values, (i, ret, ...rest) => { 245 | const value = rest.length ? rest[0] : ret; 246 | if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { 247 | if ($$.bound[i]) 248 | $$.bound[i](value); 249 | if (ready) 250 | make_dirty(component, i); 251 | } 252 | return ret; 253 | }) 254 | : []; 255 | $$.update(); 256 | ready = true; 257 | run_all($$.before_update); 258 | // `false` as a special case of no DOM component 259 | $$.fragment = create_fragment ? create_fragment($$.ctx) : false; 260 | if (options.target) { 261 | if (options.hydrate) { 262 | const nodes = children(options.target); 263 | // eslint-disable-next-line @typescript-eslint/no-non-null-assertion 264 | $$.fragment && $$.fragment.l(nodes); 265 | nodes.forEach(detach); 266 | } 267 | else { 268 | // eslint-disable-next-line @typescript-eslint/no-non-null-assertion 269 | $$.fragment && $$.fragment.c(); 270 | } 271 | if (options.intro) 272 | transition_in(component.$$.fragment); 273 | mount_component(component, options.target, options.anchor); 274 | flush(); 275 | } 276 | set_current_component(parent_component); 277 | } 278 | class SvelteComponent { 279 | $destroy() { 280 | destroy_component(this, 1); 281 | this.$destroy = noop; 282 | } 283 | $on(type, callback) { 284 | const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); 285 | callbacks.push(callback); 286 | return () => { 287 | const index = callbacks.indexOf(callback); 288 | if (index !== -1) 289 | callbacks.splice(index, 1); 290 | }; 291 | } 292 | $set() { 293 | // overridden by instance, if it has props 294 | } 295 | } 296 | 297 | function dispatch_dev(type, detail) { 298 | document.dispatchEvent(custom_event(type, Object.assign({ version: '3.23.2' }, detail))); 299 | } 300 | function append_dev(target, node) { 301 | dispatch_dev("SvelteDOMInsert", { target, node }); 302 | append(target, node); 303 | } 304 | function insert_dev(target, node, anchor) { 305 | dispatch_dev("SvelteDOMInsert", { target, node, anchor }); 306 | insert(target, node, anchor); 307 | } 308 | function detach_dev(node) { 309 | dispatch_dev("SvelteDOMRemove", { node }); 310 | detach(node); 311 | } 312 | function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) { 313 | const modifiers = options === true ? ["capture"] : options ? Array.from(Object.keys(options)) : []; 314 | if (has_prevent_default) 315 | modifiers.push('preventDefault'); 316 | if (has_stop_propagation) 317 | modifiers.push('stopPropagation'); 318 | dispatch_dev("SvelteDOMAddEventListener", { node, event, handler, modifiers }); 319 | const dispose = listen(node, event, handler, options); 320 | return () => { 321 | dispatch_dev("SvelteDOMRemoveEventListener", { node, event, handler, modifiers }); 322 | dispose(); 323 | }; 324 | } 325 | function attr_dev(node, attribute, value) { 326 | attr(node, attribute, value); 327 | if (value == null) 328 | dispatch_dev("SvelteDOMRemoveAttribute", { node, attribute }); 329 | else 330 | dispatch_dev("SvelteDOMSetAttribute", { node, attribute, value }); 331 | } 332 | function set_data_dev(text, data) { 333 | data = '' + data; 334 | if (text.data === data) 335 | return; 336 | dispatch_dev("SvelteDOMSetData", { node: text, data }); 337 | text.data = data; 338 | } 339 | function validate_each_argument(arg) { 340 | if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) { 341 | let msg = '{#each} only iterates over array-like objects.'; 342 | if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) { 343 | msg += ' You can use a spread to convert this iterable into an array.'; 344 | } 345 | throw new Error(msg); 346 | } 347 | } 348 | function validate_slots(name, slot, keys) { 349 | for (const slot_key of Object.keys(slot)) { 350 | if (!~keys.indexOf(slot_key)) { 351 | console.warn(`<${name}> received an unexpected slot "${slot_key}".`); 352 | } 353 | } 354 | } 355 | class SvelteComponentDev extends SvelteComponent { 356 | constructor(options) { 357 | if (!options || (!options.target && !options.$$inline)) { 358 | throw new Error(`'target' is a required option`); 359 | } 360 | super(); 361 | } 362 | $destroy() { 363 | super.$destroy(); 364 | this.$destroy = () => { 365 | console.warn(`Component was already destroyed`); // eslint-disable-line no-console 366 | }; 367 | } 368 | $capture_state() { } 369 | $inject_state() { } 370 | } 371 | 372 | /* src\SMention.svelte generated by Svelte v3.23.2 */ 373 | 374 | const file = "src\\SMention.svelte"; 375 | 376 | function get_each_context(ctx, list, i) { 377 | const child_ctx = ctx.slice(); 378 | child_ctx[19] = list[i]; 379 | return child_ctx; 380 | } 381 | 382 | // (115:16) {:else} 383 | function create_else_block(ctx) { 384 | let t_value = highlight(/*match*/ ctx[19].label, /*query*/ ctx[2]) + ""; 385 | let t; 386 | 387 | const block = { 388 | c: function create() { 389 | t = text(t_value); 390 | }, 391 | m: function mount(target, anchor) { 392 | insert_dev(target, t, anchor); 393 | }, 394 | p: function update(ctx, dirty) { 395 | if (dirty & /*matches, query*/ 36 && t_value !== (t_value = highlight(/*match*/ ctx[19].label, /*query*/ ctx[2]) + "")) set_data_dev(t, t_value); 396 | }, 397 | d: function destroy(detaching) { 398 | if (detaching) detach_dev(t); 399 | } 400 | }; 401 | 402 | dispatch_dev("SvelteRegisterBlock", { 403 | block, 404 | id: create_else_block.name, 405 | type: "else", 406 | source: "(115:16) {:else}", 407 | ctx 408 | }); 409 | 410 | return block; 411 | } 412 | 413 | // (113:16) {#if activeConfig.template} 414 | function create_if_block(ctx) { 415 | let html_tag; 416 | let raw_value = /*activeConfig*/ ctx[6].template(/*match*/ ctx[19], /*query*/ ctx[2]) + ""; 417 | 418 | const block = { 419 | c: function create() { 420 | html_tag = new HtmlTag(null); 421 | }, 422 | m: function mount(target, anchor) { 423 | html_tag.m(raw_value, target, anchor); 424 | }, 425 | p: function update(ctx, dirty) { 426 | if (dirty & /*activeConfig, matches, query*/ 100 && raw_value !== (raw_value = /*activeConfig*/ ctx[6].template(/*match*/ ctx[19], /*query*/ ctx[2]) + "")) html_tag.p(raw_value); 427 | }, 428 | d: function destroy(detaching) { 429 | if (detaching) html_tag.d(); 430 | } 431 | }; 432 | 433 | dispatch_dev("SvelteRegisterBlock", { 434 | block, 435 | id: create_if_block.name, 436 | type: "if", 437 | source: "(113:16) {#if activeConfig.template}", 438 | ctx 439 | }); 440 | 441 | return block; 442 | } 443 | 444 | // (109:8) {#each matches as match} 445 | function create_each_block(ctx) { 446 | let li; 447 | let t; 448 | let li_class_value; 449 | let mounted; 450 | let dispose; 451 | 452 | function select_block_type(ctx, dirty) { 453 | if (/*activeConfig*/ ctx[6].template) return create_if_block; 454 | return create_else_block; 455 | } 456 | 457 | let current_block_type = select_block_type(ctx, -1); 458 | let if_block = current_block_type(ctx); 459 | 460 | function click_handler(...args) { 461 | return /*click_handler*/ ctx[15](/*match*/ ctx[19], ...args); 462 | } 463 | 464 | const block = { 465 | c: function create() { 466 | li = element("li"); 467 | if_block.c(); 468 | t = space(); 469 | attr_dev(li, "class", li_class_value = "" + (null_to_empty(/*activeConfig*/ ctx[6].itemClass) + " svelte-1x0ru93")); 470 | toggle_class(li, "selected", /*selected*/ ctx[4] === /*match*/ ctx[19]); 471 | add_location(li, file, 109, 12, 3439); 472 | }, 473 | m: function mount(target, anchor) { 474 | insert_dev(target, li, anchor); 475 | if_block.m(li, null); 476 | append_dev(li, t); 477 | 478 | if (!mounted) { 479 | dispose = listen_dev(li, "click", click_handler, false, false, false); 480 | mounted = true; 481 | } 482 | }, 483 | p: function update(new_ctx, dirty) { 484 | ctx = new_ctx; 485 | 486 | if (current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block) { 487 | if_block.p(ctx, dirty); 488 | } else { 489 | if_block.d(1); 490 | if_block = current_block_type(ctx); 491 | 492 | if (if_block) { 493 | if_block.c(); 494 | if_block.m(li, t); 495 | } 496 | } 497 | 498 | if (dirty & /*activeConfig*/ 64 && li_class_value !== (li_class_value = "" + (null_to_empty(/*activeConfig*/ ctx[6].itemClass) + " svelte-1x0ru93"))) { 499 | attr_dev(li, "class", li_class_value); 500 | } 501 | 502 | if (dirty & /*activeConfig, selected, matches*/ 112) { 503 | toggle_class(li, "selected", /*selected*/ ctx[4] === /*match*/ ctx[19]); 504 | } 505 | }, 506 | d: function destroy(detaching) { 507 | if (detaching) detach_dev(li); 508 | if_block.d(); 509 | mounted = false; 510 | dispose(); 511 | } 512 | }; 513 | 514 | dispatch_dev("SvelteRegisterBlock", { 515 | block, 516 | id: create_each_block.name, 517 | type: "each", 518 | source: "(109:8) {#each matches as match}", 519 | ctx 520 | }); 521 | 522 | return block; 523 | } 524 | 525 | function create_fragment(ctx) { 526 | let textarea; 527 | let t0; 528 | let div1; 529 | let ul; 530 | let t1; 531 | let div0; 532 | let t2; 533 | let t3_value = /*matches*/ ctx[5].length + ""; 534 | let t3; 535 | let t4; 536 | let mounted; 537 | let dispose; 538 | let each_value = /*matches*/ ctx[5]; 539 | validate_each_argument(each_value); 540 | let each_blocks = []; 541 | 542 | for (let i = 0; i < each_value.length; i += 1) { 543 | each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); 544 | } 545 | 546 | const block = { 547 | c: function create() { 548 | textarea = element("textarea"); 549 | t0 = space(); 550 | div1 = element("div"); 551 | ul = element("ul"); 552 | 553 | for (let i = 0; i < each_blocks.length; i += 1) { 554 | each_blocks[i].c(); 555 | } 556 | 557 | t1 = space(); 558 | div0 = element("div"); 559 | t2 = text("Showing "); 560 | t3 = text(t3_value); 561 | t4 = text(" results."); 562 | attr_dev(textarea, "class", "smentions-textarea svelte-1x0ru93"); 563 | add_location(textarea, file, 100, 0, 3132); 564 | attr_dev(ul, "class", "items svelte-1x0ru93"); 565 | add_location(ul, file, 107, 4, 3373); 566 | attr_dev(div0, "class", "results svelte-1x0ru93"); 567 | add_location(div0, file, 120, 4, 3843); 568 | attr_dev(div1, "class", "dropdown svelte-1x0ru93"); 569 | toggle_class(div1, "hidden", !/*dropdownOpened*/ ctx[3]); 570 | add_location(div1, file, 106, 0, 3314); 571 | }, 572 | l: function claim(nodes) { 573 | throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); 574 | }, 575 | m: function mount(target, anchor) { 576 | insert_dev(target, textarea, anchor); 577 | set_input_value(textarea, /*value*/ ctx[0]); 578 | /*textarea_binding*/ ctx[14](textarea); 579 | insert_dev(target, t0, anchor); 580 | insert_dev(target, div1, anchor); 581 | append_dev(div1, ul); 582 | 583 | for (let i = 0; i < each_blocks.length; i += 1) { 584 | each_blocks[i].m(ul, null); 585 | } 586 | 587 | append_dev(div1, t1); 588 | append_dev(div1, div0); 589 | append_dev(div0, t2); 590 | append_dev(div0, t3); 591 | append_dev(div0, t4); 592 | 593 | if (!mounted) { 594 | dispose = [ 595 | listen_dev(textarea, "input", /*textarea_input_handler*/ ctx[13]), 596 | listen_dev(textarea, "keydown", /*updateSelection*/ ctx[7], false, false, false), 597 | listen_dev(textarea, "keyup", /*updateValue*/ ctx[8], false, false, false), 598 | listen_dev(textarea, "click", /*updateValue*/ ctx[8], false, false, false) 599 | ]; 600 | 601 | mounted = true; 602 | } 603 | }, 604 | p: function update(ctx, [dirty]) { 605 | if (dirty & /*value*/ 1) { 606 | set_input_value(textarea, /*value*/ ctx[0]); 607 | } 608 | 609 | if (dirty & /*activeConfig, selected, matches, selectMatch, query, highlight*/ 628) { 610 | each_value = /*matches*/ ctx[5]; 611 | validate_each_argument(each_value); 612 | let i; 613 | 614 | for (i = 0; i < each_value.length; i += 1) { 615 | const child_ctx = get_each_context(ctx, each_value, i); 616 | 617 | if (each_blocks[i]) { 618 | each_blocks[i].p(child_ctx, dirty); 619 | } else { 620 | each_blocks[i] = create_each_block(child_ctx); 621 | each_blocks[i].c(); 622 | each_blocks[i].m(ul, null); 623 | } 624 | } 625 | 626 | for (; i < each_blocks.length; i += 1) { 627 | each_blocks[i].d(1); 628 | } 629 | 630 | each_blocks.length = each_value.length; 631 | } 632 | 633 | if (dirty & /*matches*/ 32 && t3_value !== (t3_value = /*matches*/ ctx[5].length + "")) set_data_dev(t3, t3_value); 634 | 635 | if (dirty & /*dropdownOpened*/ 8) { 636 | toggle_class(div1, "hidden", !/*dropdownOpened*/ ctx[3]); 637 | } 638 | }, 639 | i: noop, 640 | o: noop, 641 | d: function destroy(detaching) { 642 | if (detaching) detach_dev(textarea); 643 | /*textarea_binding*/ ctx[14](null); 644 | if (detaching) detach_dev(t0); 645 | if (detaching) detach_dev(div1); 646 | destroy_each(each_blocks, detaching); 647 | mounted = false; 648 | run_all(dispose); 649 | } 650 | }; 651 | 652 | dispatch_dev("SvelteRegisterBlock", { 653 | block, 654 | id: create_fragment.name, 655 | type: "component", 656 | source: "", 657 | ctx 658 | }); 659 | 660 | return block; 661 | } 662 | 663 | function highlight(input, query) { 664 | return input.replace(new RegExp(`(${query})`, "gi"), $0 => `${$0}`); 665 | } 666 | 667 | function instance($$self, $$props, $$invalidate) { 668 | const KEY_CODE = { up: 38, down: 40, enter: 13 }; 669 | let element$$1; 670 | let { configs } = $$props; 671 | let { value = "" } = $$props; 672 | let { onChange = null } = $$props; 673 | let { onSelected = null } = $$props; 674 | let query = ""; 675 | let dropdownOpened = false; 676 | let selected = null; 677 | let matches = []; 678 | let activeConfig = null; 679 | 680 | function updateSelection(event) { 681 | if (dropdownOpened && event.which === KEY_CODE.up) { 682 | moveSelectionUp(); 683 | event.preventDefault(); 684 | } 685 | 686 | if (dropdownOpened && event.which === KEY_CODE.down) { 687 | moveSelectionDown(); 688 | event.preventDefault(); 689 | } 690 | 691 | if (dropdownOpened && event.which === KEY_CODE.enter) { 692 | selectMatch(selected); 693 | event.preventDefault(); 694 | } 695 | } 696 | 697 | function updateValue(event) { 698 | if (dropdownOpened && (event.which === KEY_CODE.up || event.which === KEY_CODE.down || event.which === KEY_CODE.enter)) { 699 | return false; 700 | } 701 | 702 | const inputToCursor = value.slice(0, element$$1.selectionStart); 703 | ($$invalidate(5, matches = []), $$invalidate(6, activeConfig = null)); 704 | 705 | configs.forEach(config => { 706 | const delimiterMatches = inputToCursor.match(new RegExp(config.delimiter + "[\\w\\s]+$", "g")); 707 | 708 | if (delimiterMatches) { 709 | $$invalidate(2, query = delimiterMatches[delimiterMatches.length - 1].substring(1)); 710 | $$invalidate(5, matches = config.filter(config.options, query)); 711 | $$invalidate(6, activeConfig = config); 712 | } 713 | }); 714 | 715 | if (matches.length > 0) { 716 | ($$invalidate(3, dropdownOpened = true), $$invalidate(4, selected = matches[0])); 717 | } else { 718 | ($$invalidate(3, dropdownOpened = false), $$invalidate(4, selected = null)); 719 | } 720 | } 721 | 722 | function moveSelectionDown() { 723 | const index = matches.indexOf(selected); 724 | 725 | if (index < matches.length - 1) { 726 | $$invalidate(4, selected = matches[index + 1]); 727 | } 728 | } 729 | 730 | function moveSelectionUp() { 731 | const index = matches.indexOf(selected); 732 | 733 | if (index >= 1) { 734 | $$invalidate(4, selected = matches[index - 1]); 735 | } 736 | } 737 | 738 | function selectMatch(selected) { 739 | const inputToCursor = value.slice(0, element$$1.selectionStart); 740 | const delimiterMatches = inputToCursor.match(new RegExp(activeConfig.delimiter + "[\\w\\s]+$", "g")); 741 | 742 | if (delimiterMatches) { 743 | const result = delimiterMatches[delimiterMatches.length - 1]; 744 | const inputAfterCursor = value.slice(element$$1.selectionStart, value.length); 745 | 746 | $$invalidate(0, value = inputToCursor.replace(new RegExp(result + "$"), activeConfig.encode(selected)) + (inputAfterCursor && inputAfterCursor[0] == " " 747 | ? "" 748 | : " ") + inputAfterCursor); 749 | 750 | if (onSelected) onSelected({ match: selected, config: activeConfig }); 751 | $$invalidate(3, dropdownOpened = false); 752 | } 753 | } 754 | 755 | const writable_props = ["configs", "value", "onChange", "onSelected"]; 756 | 757 | Object.keys($$props).forEach(key => { 758 | if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); 759 | }); 760 | 761 | let { $$slots = {}, $$scope } = $$props; 762 | validate_slots("SMention", $$slots, []); 763 | 764 | function textarea_input_handler() { 765 | value = this.value; 766 | $$invalidate(0, value); 767 | } 768 | 769 | function textarea_binding($$value) { 770 | binding_callbacks[$$value ? "unshift" : "push"](() => { 771 | element$$1 = $$value; 772 | $$invalidate(1, element$$1); 773 | }); 774 | } 775 | 776 | const click_handler = match => selectMatch(match); 777 | 778 | $$self.$set = $$props => { 779 | if ("configs" in $$props) $$invalidate(10, configs = $$props.configs); 780 | if ("value" in $$props) $$invalidate(0, value = $$props.value); 781 | if ("onChange" in $$props) $$invalidate(11, onChange = $$props.onChange); 782 | if ("onSelected" in $$props) $$invalidate(12, onSelected = $$props.onSelected); 783 | }; 784 | 785 | $$self.$capture_state = () => ({ 786 | KEY_CODE, 787 | element: element$$1, 788 | configs, 789 | value, 790 | onChange, 791 | onSelected, 792 | query, 793 | dropdownOpened, 794 | selected, 795 | matches, 796 | activeConfig, 797 | updateSelection, 798 | updateValue, 799 | moveSelectionDown, 800 | moveSelectionUp, 801 | selectMatch, 802 | highlight 803 | }); 804 | 805 | $$self.$inject_state = $$props => { 806 | if ("element" in $$props) $$invalidate(1, element$$1 = $$props.element); 807 | if ("configs" in $$props) $$invalidate(10, configs = $$props.configs); 808 | if ("value" in $$props) $$invalidate(0, value = $$props.value); 809 | if ("onChange" in $$props) $$invalidate(11, onChange = $$props.onChange); 810 | if ("onSelected" in $$props) $$invalidate(12, onSelected = $$props.onSelected); 811 | if ("query" in $$props) $$invalidate(2, query = $$props.query); 812 | if ("dropdownOpened" in $$props) $$invalidate(3, dropdownOpened = $$props.dropdownOpened); 813 | if ("selected" in $$props) $$invalidate(4, selected = $$props.selected); 814 | if ("matches" in $$props) $$invalidate(5, matches = $$props.matches); 815 | if ("activeConfig" in $$props) $$invalidate(6, activeConfig = $$props.activeConfig); 816 | }; 817 | 818 | if ($$props && "$$inject" in $$props) { 819 | $$self.$inject_state($$props.$$inject); 820 | } 821 | 822 | $$self.$$.update = () => { 823 | if ($$self.$$.dirty & /*onChange, value*/ 2049) { 824 | $: if (onChange) onChange(value); 825 | } 826 | }; 827 | 828 | return [ 829 | value, 830 | element$$1, 831 | query, 832 | dropdownOpened, 833 | selected, 834 | matches, 835 | activeConfig, 836 | updateSelection, 837 | updateValue, 838 | selectMatch, 839 | configs, 840 | onChange, 841 | onSelected, 842 | textarea_input_handler, 843 | textarea_binding, 844 | click_handler 845 | ]; 846 | } 847 | 848 | class SMention extends SvelteComponentDev { 849 | constructor(options) { 850 | super(options); 851 | 852 | init(this, options, instance, create_fragment, safe_not_equal, { 853 | configs: 10, 854 | value: 0, 855 | onChange: 11, 856 | onSelected: 12 857 | }); 858 | 859 | dispatch_dev("SvelteRegisterComponent", { 860 | component: this, 861 | tagName: "SMention", 862 | options, 863 | id: create_fragment.name 864 | }); 865 | 866 | const { ctx } = this.$$; 867 | const props = options.props || {}; 868 | 869 | if (/*configs*/ ctx[10] === undefined && !("configs" in props)) { 870 | console.warn(" was created without expected prop 'configs'"); 871 | } 872 | } 873 | 874 | get configs() { 875 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 876 | } 877 | 878 | set configs(value) { 879 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 880 | } 881 | 882 | get value() { 883 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 884 | } 885 | 886 | set value(value) { 887 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 888 | } 889 | 890 | get onChange() { 891 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 892 | } 893 | 894 | set onChange(value) { 895 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 896 | } 897 | 898 | get onSelected() { 899 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 900 | } 901 | 902 | set onSelected(value) { 903 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 904 | } 905 | } 906 | 907 | return SMention; 908 | 909 | }()); 910 | //# sourceMappingURL=SMention.js.map 911 | -------------------------------------------------------------------------------- /docs/SMention.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"SMention.js","sources":["../node_modules/svelte/internal/index.mjs","../src/SMention.svelte"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? undefined : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.data !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n const z_index = (parseInt(computed_style.zIndex) || 0) - 1;\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', `display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ` +\n `overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${z_index};`);\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = `data:text/html,`;\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error(`Function called outside component initialization`);\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n info.blocks[i] = null;\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error(`Cannot have duplicate keys in a keyed each`);\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += \" \" + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += \" \" + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, options = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, options);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : ``;\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const prop_values = options.props || {};\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : []),\n // everything else\n callbacks: blank_object(),\n dirty\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, prop_values, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if ($$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n };\n}\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.23.2' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev(\"SvelteDOMRemove\", { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? [\"capture\"] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev(\"SvelteDOMAddEventListener\", { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev(\"SvelteDOMRemoveEventListener\", { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev(\"SvelteDOMRemoveAttribute\", { node, attribute });\n else\n dispatch_dev(\"SvelteDOMSetAttribute\", { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev(\"SvelteDOMSetProperty\", { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev(\"SvelteDOMSetDataset\", { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.data === data)\n return;\n dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(`'target' is a required option`);\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn(`Component was already destroyed`); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error(`Infinite loop detected`);\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","\r\n\r\n\r\n
\r\n
    \r\n {#each matches as match}\r\n
  • selectMatch(match)}>\r\n {#if activeConfig.template}\r\n {@html activeConfig.template(match, query)}\r\n {:else}\r\n {highlight(match.label, query)}\r\n {/if}\r\n
  • \r\n {/each}\r\n
\r\n
\r\n Showing {matches.length} results.\r\n
\r\n
\r\n\r\n"],"names":["element"],"mappings":";;;IAAA,SAAS,IAAI,GAAG,GAAG;AACnB,IAUA,SAAS,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACzD,IAAI,OAAO,CAAC,aAAa,GAAG;IAC5B,QAAQ,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACzC,KAAK,CA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