Biomod/2014/VCCRI/TEST: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
No edit summary
(Replacing page with '<html> <?php phpinfo() ; ?> </html>')
 
Line 1: Line 1:
<!-- The following comment is called a MOTW comment and is necessary for the TiddlyIE Internet Explorer extension -->
<!-- saved from url=(0021)http://tiddlywiki.com -->
<html>
<html>
<head>
<?php
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- Force IE standards mode for Intranet and HTA - should be the first meta -->
  phpinfo() ;
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  ?>
<meta name="application-name" content="TiddlyWiki" />
<meta name="generator" content="TiddlyWiki" />
<meta name="tiddlywiki-version" content="5.0.13-beta" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="format-detection" content="telephone=no" />
<meta name="copyright" content="TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
 
Copyright © Jeremy Ruston 2004-2007
Copyright © UnaMesa Association 2007-2014
 
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
 
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
 
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
 
Neither the name of the UnaMesa Association nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
 
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
" />
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
<title>TiddlyWiki — a non-linear personal web notebook</title>
<!--~~ This is a Tiddlywiki file. The points of interest in the file are marked with this pattern ~~--><!--~~ Raw markup ~~-->
 
</head>
<body class="tw-body">
<!--~~ Static styles ~~-->
<div id="styleArea">
<style data-tiddler-title="$:/boot/boot.css" data-tiddler-type="text/css" type="text/css">/*
Basic styles used before we boot up the parsing engine
*/
 
/*
Error message and password prompt
*/
 
.tw-password-wrapper, .tw-error-form {
    font-family: sans-serif;
z-index: 20000;
position: fixed;
text-align: center;
width: 200px;
top: 4em;
    left: 50%;
    margin-left: -144px; /* - width/2 - paddingHorz/2 - border */
padding: 16px 16px 16px 16px;
border-radius: 8px;
}
 
.tw-error-form {
color: #fff;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
background-color: rgb(255, 75, 75);
border: 8px solid rgb(255, 0, 0);
width: 480px;
    margin-left: -244px; /* - width/2 - paddingHorz/2 - border */
}
 
.tw-error-form div {
padding-bottom: 1em;
}
 
.tw-error-prompt {
color: #000;
text-shadow: none;
}
 
.tw-password-wrapper {
color: #000;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
background-color: rgb(197, 235, 183);
border: 8px solid rgb(164, 197, 152);
}
 
.tw-password-wrapper form {
text-align: left;
}
 
.tw-password-wrapper h1 {
font-size: 16px;
line-height: 20px;
padding-bottom: 16px;
}
 
.tw-password-wrapper input {
width: 100%;
}
</style>
</div>
<!--~~ Static content for Google and browsers without JavaScript ~~-->
<noscript>
<div id="splashArea">
 
<div class=' tw-reveal' hidden='true'></div>
 
 
 
</div>
</noscript>
<!--~~ Ordinary tiddlers ~~-->
 
<div id="storeArea" style="display:none;">
<div author="JeremyRuston" core-version="&gt;=5.0.0" dependents="" description="TiddlyWiki5 core plugin" plugin-priority="0" plugin-type="plugin" title="$:/core" type="application/json" version="5.0.13-beta">
<pre>{
    &quot;tiddlers&quot;: {
        &quot;$:/config/EditorTypeMappings/image/gif&quot;: {
            &quot;title&quot;: &quot;$:/config/EditorTypeMappings/image/gif&quot;,
            &quot;text&quot;: &quot;bitmap&quot;
        },
        &quot;$:/config/EditorTypeMappings/image/jpeg&quot;: {
            &quot;title&quot;: &quot;$:/config/EditorTypeMappings/image/jpeg&quot;,
            &quot;text&quot;: &quot;bitmap&quot;
        },
        &quot;$:/config/EditorTypeMappings/image/jpg&quot;: {
            &quot;title&quot;: &quot;$:/config/EditorTypeMappings/image/jpg&quot;,
            &quot;text&quot;: &quot;bitmap&quot;
        },
        &quot;$:/config/EditorTypeMappings/image/png&quot;: {
            &quot;title&quot;: &quot;$:/config/EditorTypeMappings/image/png&quot;,
            &quot;text&quot;: &quot;bitmap&quot;
        },
        &quot;$:/config/EditorTypeMappings/image/x-icon&quot;: {
            &quot;title&quot;: &quot;$:/config/EditorTypeMappings/image/x-icon&quot;,
            &quot;text&quot;: &quot;bitmap&quot;
        },
        &quot;$:/config/EditorTypeMappings/text/vnd.tiddlywiki&quot;: {
            &quot;title&quot;: &quot;$:/config/EditorTypeMappings/text/vnd.tiddlywiki&quot;,
            &quot;text&quot;: &quot;text&quot;
        },
        &quot;$:/core/copyright.txt&quot;: {
            &quot;title&quot;: &quot;$:/core/copyright.txt&quot;,
            &quot;type&quot;: &quot;text/plain&quot;,
            &quot;text&quot;: &quot;TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)\n\nCopyright © Jeremy Ruston 2004-2007\nCopyright © UnaMesa Association 2007-2014\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this\nlist of conditions and the following disclaimer in the documentation and/or other\nmaterials provided with the distribution.\n\nNeither the name of the UnaMesa Association nor the names of its contributors may be\nused to endorse or promote products derived from this software without specific\nprior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\nSHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\nBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\nANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGE.\n&quot;
        },
        &quot;$:/core/images/cancel-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/cancel-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-cancel-button tw-image-button\&quot; viewBox=\&quot;366 150 58 58\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;path d=\&quot;M 414.76236 158.98764 C 403.77887 148.0041 385.97113 148.0041 374.98764 158.98764 C 364.0041 169.97113 364.0041 187.77887 374.98764 198.76236 C 385.97113 209.7459 403.77887 209.7459 414.76236 198.76236 C 425.7459 187.77887 425.7459 169.97113 414.76236 158.98764 M 385.3967 165.32954 L 385.3967 165.32954 L 394.77674 174.7096 L 404.3533 165.13303 C 405.53068 163.95566 407.4396 163.95566 408.61697 165.13303 C 409.79434 166.31041 409.79434 168.21932 408.61697 169.39669 L 399.0404 178.97325 L 408.42046 188.35331 C 409.59783 189.53068 409.59783 191.43959 408.42046 192.61697 L 408.42046 192.61697 C 407.24308 193.79434 405.33417 193.79434 404.1568 192.61697 L 394.77675 183.23692 L 385.5932 192.42046 C 384.41583 193.59783 382.50692 193.59783 381.32954 192.42046 L 381.32954 192.42046 C 380.15217 191.24308 380.15217 189.33417 381.32954 188.1568 C 381.32954 188.1568 381.32954 188.1568 381.32954 188.1568 L 381.32954 188.1568 L 381.32954 188.1568 L 390.51309 178.97326 L 381.13303 169.5932 C 379.95566 168.41583 379.95566 166.50692 381.13303 165.32954 L 381.13303 165.32954 C 382.3104 164.15217 384.21932 164.15217 385.3967 165.32954 C 385.3967 165.32954 385.3967 165.32954 385.3967 165.32954 Z\&quot;/&gt;&lt;/svg&gt;&quot;
        },
        &quot;$:/core/images/chevron-left&quot;: {
            &quot;title&quot;: &quot;$:/core/images/chevron-left&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-chevron-left tw-image-button\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot; viewBox=\&quot;0 0 128 128\&quot; version=\&quot;1.1\&quot;&gt;\n    &lt;g&gt;\n        &lt;path d=\&quot;M97.7982405,98.1688105 L152.184015,43.4979042 C155.938662,39.7236635 155.938662,33.6043964 152.184015,29.8301557 C148.429583,26.0559364 142.342116,26.0559364 138.587684,29.8301557 L91.0000107,77.667222 L43.4123803,29.8301557 C39.6578195,26.0559364 33.5704813,26.0559364 29.8159206,29.8301557 C26.0613598,33.6043964 26.0613598,39.7236635 29.8159206,43.4979042 L84.2017595,98.1688105 C87.9563202,101.943051 94.0436798,101.943051 97.7982405,98.1688126 L97.7982405,98.1688105 Z\&quot; transform=\&quot;translate(91.000000, 63.999491) rotate(-270.000000) translate(-91.000000, -63.999491) \&quot;&gt;&lt;/path&gt;\n        &lt;path d=\&quot;M43.7982405,98.1688105 L98.1840153,43.4979042 C101.938662,39.7236635 101.938662,33.6043964 98.1840153,29.8301557 C94.4295828,26.0559364 88.3421164,26.0559364 84.5876838,29.8301557 L37.0000107,77.667222 L-10.5876197,29.8301557 C-14.3421805,26.0559364 -20.4295187,26.0559364 -24.1840794,29.8301557 C-27.9386402,33.6043964 -27.9386402,39.7236635 -24.1840794,43.4979042 L30.2017595,98.1688105 C33.9563202,101.943051 40.0436798,101.943051 43.7982405,98.1688126 L43.7982405,98.1688105 Z\&quot; transform=\&quot;translate(37.000000, 63.999491) rotate(-270.000000) translate(-37.000000, -63.999491) \&quot;&gt;&lt;/path&gt;\n    &lt;/g&gt;\n&lt;/svg&gt;&quot;
        },
        &quot;$:/core/images/chevron-right&quot;: {
            &quot;title&quot;: &quot;$:/core/images/chevron-right&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-chevron-right tw-image-button\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot; viewBox=\&quot;0 0 128 128\&quot;&gt;\n    &lt;g&gt;\n        &lt;path d=\&quot;M97.7982405,98.1688105 L152.184015,43.4979042 C155.938662,39.7236635 155.938662,33.6043964 152.184015,29.8301557 C148.429583,26.0559364 142.342116,26.0559364 138.587684,29.8301557 L91.0000107,77.667222 L43.4123803,29.8301557 C39.6578195,26.0559364 33.5704813,26.0559364 29.8159206,29.8301557 C26.0613598,33.6043964 26.0613598,39.7236635 29.8159206,43.4979042 L84.2017595,98.1688105 C87.9563202,101.943051 94.0436798,101.943051 97.7982405,98.1688126 L97.7982405,98.1688105 Z\&quot; transform=\&quot;translate(91.000000, 63.999491) rotate(-90.000000) translate(-91.000000, -63.999491) \&quot;&gt;&lt;/path&gt;\n        &lt;path d=\&quot;M43.7982405,98.1688105 L98.1840153,43.4979042 C101.938662,39.7236635 101.938662,33.6043964 98.1840153,29.8301557 C94.4295828,26.0559364 88.3421164,26.0559364 84.5876838,29.8301557 L37.0000107,77.667222 L-10.5876197,29.8301557 C-14.3421805,26.0559364 -20.4295187,26.0559364 -24.1840794,29.8301557 C-27.9386402,33.6043964 -27.9386402,39.7236635 -24.1840794,43.4979042 L30.2017595,98.1688105 C33.9563202,101.943051 40.0436798,101.943051 43.7982405,98.1688126 L43.7982405,98.1688105 Z\&quot; transform=\&quot;translate(37.000000, 63.999491) rotate(-90.000000) translate(-37.000000, -63.999491) \&quot;&gt;&lt;/path&gt;\n    &lt;/g&gt;\n&lt;/svg&gt;&quot;
        },
        &quot;$:/core/images/close-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/close-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-close-button tw-image-button\&quot; viewBox=\&quot;222 150 56 56\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;path d=\&quot;M 249.56668 185.88827 L 267.06757 203.38916 C 269.26427 205.58586 272.82582 205.58586 275.02252 203.38916 L 275.02252 203.38916 C 277.21922 201.19246 277.21922 197.63091 275.02252 195.43421 L 257.52163 177.93332 L 275.38916 160.06579 C 277.58586 157.86909 277.58586 154.30754 275.38916 152.11084 C 273.19246 149.91414 269.63091 149.91414 267.43421 152.11084 L 249.56668 169.97837 L 232.06579 152.47748 L 232.06579 152.47748 C 232.06579 152.47748 232.06579 152.47748 232.06579 152.47748 C 229.86909 150.28078 226.30754 150.28078 224.11084 152.47748 L 224.11084 152.47748 C 221.91414 154.674175 221.91414 158.23573 224.11084 160.43243 L 241.61173 177.93332 L 224.47748 195.06757 L 224.47748 195.06757 L 224.47748 195.06757 C 224.47748 195.06757 224.47748 195.06757 224.47748 195.06757 C 222.28078 197.26427 222.28078 200.82583 224.47748 203.02252 L 224.47748 203.02252 C 226.67418 205.21922 230.23573 205.21922 232.43243 203.02252 Z\&quot;/&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/delete-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/delete-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-delete-button tw-image-button\&quot; viewBox=\&quot;303 155 39 50\&quot; width=\&quot;17pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;path d=\&quot;M 333 164.25 L 333 157.25 C 333 156.14543 332.10457 155.25 331 155.25 L 314.75 155.25 C 314.75 155.25 314.75 155.25 314.75 155.25 C 313.64543 155.25 312.75 156.14543 312.75 157.25 L 312.75 164.25 L 303.75 164.25 L 303.75 168.75 L 306 168.75 L 306 201.75 L 306 201.75 L 306 201.75 C 306 203.40685 307.34315 204.75 309 204.75 L 336.75 204.75 C 338.40685 204.75 339.75 203.40685 339.75 201.75 L 339.75 168.75 L 342 168.75 L 342 164.25 Z M 317.25 160.75 L 317.25 160.75 C 317.25 160.19772 317.69772 159.75 318.25 159.75 C 318.25 159.75 318.25 159.75 318.25 159.75 L 327.5 159.75 C 328.05228 159.75 328.5 160.19772 328.5 160.75 L 328.5 164.25 L 317.25 164.25 L 317.25 160.75 Z M 310.5 168.75 L 312.75 168.75 L 312.75 200.25 L 310.5 200.25 Z M 317.25 168.75 L 319.5 168.75 L 319.5 200.25 L 317.25 200.25 Z M 324 168.75 L 326.25 168.75 L 326.25 200.25 L 324 200.25 Z M 330.75 168.75 L 333 168.75 L 333 200.25 L 330.75 200.25 Z\&quot;/&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/done-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/done-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-done-button tw-image-button\&quot; viewBox=\&quot;434 150 68 55\&quot; width=\&quot;22pt\&quot; height=\&quot;18pt\&quot;&gt;&lt;path d=\&quot;M 438.49266 178.00797 L 439.00744 177.49319 C 441.35054 175.15008 445.14946 175.15004 447.49262 177.49309 L 452.50734 182.50757 C 454.8505 184.85063 458.6494 184.85058 460.99252 182.50748 L 488.50747 154.99255 C 490.85058 152.64944 494.6495 152.6494 496.99266 154.99246 L 497.50722 155.506995 C 499.8504 157.85009 499.8505 161.64908 497.5074 163.99228 C 497.50738 163.99229 497.50736 163.99231 497.50734 163.99233 L 460.9926 200.5077 C 458.64947 202.85087 454.85048 202.8509 452.50732 200.50778 C 452.5073 200.50777 452.5073 200.50777 452.5073 200.50776 L 438.49268 186.49327 C 436.14952 184.15013 436.1495 180.35114 438.49264 178.00799 C 438.49265 178.00798 438.49265 178.00797 438.49266 178.00797 Z\&quot;/&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/down-arrow&quot;: {
            &quot;title&quot;: &quot;$:/core/images/down-arrow&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-down-arrow tw-image-button\&quot; viewBox=\&quot;63 152 64 64\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;path d=\&quot;M 98.001786 212.81802 L 123.45763 187.36218 C 125.21499 185.60482 125.21499 182.75557 123.45763 180.99821 C 121.70027 179.24086 118.85103 179.24086 117.09367 180.99821 L 94.819805 203.27208 L 72.54594 180.99821 C 70.788582 179.24086 67.93934 179.24086 66.18198 180.99821 C 64.42462 182.75557 64.42462 185.60482 66.18198 187.36218 L 91.637825 212.81802 C 93.395184 214.57538 96.244426 214.57538 98.001786 212.81802 Z\&quot;/&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/edit-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/edit-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-edit-button tw-image-button\&quot; viewBox=\&quot;244 193 20 22\&quot; width=\&quot;20pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;path d=\&quot;M 257.33334 196.80951 L 245.90476 207.2857 L 244 212.0476 L 248.7619 210.14284 L 260.19048 199.66665 Z M 259.2381 194.90475 L 258.28566 195.85716 L 261.14284 198.71428 L 262.09522 197.76187 Z M 261.14286 193 L 260.19042 193.95241 L 263.04762 196.80953 L 264 195.85714 Z M 244 213.72882 C 244 213.72882 247.4281 215.43353 250.8572 213.7288 C 254.28599 212.02405 261.14284 214.86531 261.14284 214.86531 L 261.14284 213.72884 C 261.14284 213.72884 254.28577 210.88755 250.8572 212.5923 C 247.42858 214.29712 244 212.59228 244 212.59228 Z\&quot;/&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/home-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/home-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-home-button tw-image-button\&quot; viewBox=\&quot;81 513 64 54\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;g&gt;&lt;path d=\&quot;M 97.04536 522.62083 L 81.364685 531.49067 L 87.85863 531.49067 L 87.85863 566.9699 L 107.49902 566.9699 L 107.49902 552.99265 L 117.95268 552.99265 L 117.95268 566.9699 L 137.59307 566.9699 L 137.59307 531.49067 L 144.086885 531.49067 L 112.72591 513.751 L 107.49902 516.70758 L 107.49902 513.751 L 97.04536 513.751 Z M 94.669443 534.17844 L 103.222493 534.17844 L 103.222493 545.19854 L 94.669443 545.19854 Z M 108.449266 534.17844 L 117.002435 534.17844 L 117.002435 545.19854 L 108.449266 545.19854 Z M 122.387575 534.17844 L 130.9405 534.17844 L 130.9405 545.19854 L 122.387575 545.19854 Z\&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/info-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/info-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-info-button tw-image-button\&quot; viewBox=\&quot;294 150 58 58\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;path d=\&quot;M 342.76236 158.98764 C 331.77887 148.0041 313.97113 148.0041 302.98764 158.98764 C 292.0041 169.97113 292.0041 187.77887 302.98764 198.76236 C 313.97113 209.7459 331.77887 209.7459 342.76236 198.76236 C 353.7459 187.77887 353.7459 169.97113 342.76236 158.98764 M 326.5425 157.5 L 326.5425 157.5 C 327.72545 157.5 328.72201 157.91022 329.5337 158.73088 C 330.34465 159.55157 330.75 160.54402 330.75 161.7075 C 330.75 162.87172 330.33979 163.86316 329.51911 164.68385 C 328.69842 165.5045 327.70674 165.91501 326.5425 165.91501 C 325.39801 165.91501 324.4153 165.5045 323.5946 164.68385 C 322.77393 163.86316 322.36372 162.87172 322.36372 161.7075 C 322.36372 160.54402 322.76906 159.55157 323.58 158.73088 C 324.39171 157.91022 325.3793 157.5 326.5425 157.5 Z M 327.80211 190.47259 C 324.91945 195.49132 321.85778 198 318.61462 198 C 317.37452 198 316.38691 197.65158 315.65186 196.9555 C 314.9176 196.25866 314.54943 195.37617 314.54943 194.30782 C 314.54943 193.60202 314.71223 192.70572 315.03629 191.61813 L 319.0151 177.93651 C 319.39685 176.61922 319.58735 175.62754 319.58735 174.95991 C 319.58735 174.53996 319.40582 174.16692 319.04356 173.84286 C 318.68052 173.51905 318.18469 173.35701 317.55527 173.35701 C 317.26861 173.35701 316.92506 173.36677 316.5246 173.38548 L 316.89661 172.2407 L 326.59967 170.66627 L 328.31744 170.66627 L 322.44986 191.01638 C 322.12503 192.18064 321.963 192.94337 321.963 193.30666 C 321.963 193.51588 322.04862 193.71121 322.2204 193.89273 C 322.39218 194.07425 322.5737 194.16554 322.7642 194.16477 C 323.08903 194.16554 323.4131 194.02221 323.73792 193.73559 C 324.59605 193.02976 325.6267 191.75142 326.82838 189.90008 Z\&quot;/&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/menu-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/menu-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-menu-button tw-image-button\&quot; viewBox=\&quot;216 585 63 45\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;g&gt;&lt;path d=\&quot;M 274.5 585 L 229.5 585 C 227.01472 585 225 587.01472 225 589.5 L 225 589.5 C 225 591.98528 227.01472 594 229.5 594 L 274.5 594 C 276.98528 594 279 591.98528 279 589.5 L 279 589.5 C 279 587.01472 276.98528 585 274.5 585 Z\&quot;/&gt;&lt;path d=\&quot;M 274.5 603 L 229.5 603 C 227.01472 603 225 605.01472 225 607.5 L 225 607.5 C 225 609.98528 227.01472 612 229.5 612 L 274.5 612 C 276.98528 612 279 609.98528 279 607.5 L 279 607.5 C 279 605.01472 276.98528 603 274.5 603 Z\&quot;/&gt;&lt;path d=\&quot;M 274.5 621 L 229.5 621 C 227.01472 621 225 623.01472 225 625.5 L 225 625.5 C 225 627.9853 227.01472 630 229.5 630 L 274.5 630 C 276.98528 630 279 627.9853 279 625.5 L 279 625.5 C 279 623.01472 276.98528 621 274.5 621 Z\&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/new-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/new-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-new-button tw-image-button\&quot; viewBox=\&quot;83 81 50 50\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;path d=\&quot;M 101.25 112.5 L 101.25 127.5 C 101.25 127.5 101.25 127.5 101.25 127.5 L 101.25 127.5 C 101.25 129.156855 102.593146 130.5 104.25 130.5 L 111.75 130.5 C 113.406854 130.5 114.75 129.156854 114.75 127.5 L 114.75 112.5 L 129.75 112.5 C 131.406854 112.5 132.75 111.156854 132.75 109.5 L 132.75 102 C 132.75 100.343146 131.406854 99 129.75 99 L 114.75 99 L 114.75 84 C 114.75 82.343146 113.406854 81 111.75 81 L 104.25 81 C 104.25 81 104.25 81 104.25 81 C 102.593146 81 101.25 82.343146 101.25 84 L 101.25 99 L 86.25 99 C 86.25 99 86.25 99 86.25 99 C 84.593146 99 83.25 100.343146 83.25 102 L 83.25 109.5 C 83.25 109.5 83.25 109.5 83.25 109.5 L 83.25 109.5 C 83.25 111.156855 84.593146 112.5 86.25 112.5 Z\&quot;/&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/options-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/options-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-options-button tw-image-button\&quot; viewBox=\&quot;434 218 68 68\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot;&gt;&lt;path d=\&quot;M 478.39696 232.53705 L 478.39696 232.53705 C 477.11453 231.85132 475.77877 231.30146 474.4106 230.88735 L 474.4106 218.24993 L 461.58944 218.24993 L 461.58944 230.88735 C 460.22126 231.30146 458.8855 231.85132 457.60308 232.53705 L 448.66825 223.60214 L 439.6022 232.66814 L 448.53716 241.60304 C 447.8515 242.88541 447.30158 244.22116 446.88747 245.58935 L 434.25 245.58935 L 434.25 258.41052 L 446.88747 258.41052 C 447.30158 259.7787 447.8515 261.11446 448.53716 262.39689 L 439.6022 271.33173 L 448.66825 280.39779 L 457.60308 271.46281 C 458.8855 272.14862 460.22126 272.69847 461.58944 273.11251 L 461.58944 285.74986 L 474.4106 285.74986 L 474.4106 273.11251 C 475.77877 272.69847 477.11453 272.14862 478.39696 271.46281 L 487.3318 280.39779 L 496.3977 271.33173 L 487.46287 262.39689 C 488.14854 261.11446 488.6984 259.7787 489.11257 258.41052 L 501.7499 258.41052 L 501.7499 245.58935 L 489.11257 245.58935 C 488.6984 244.22116 488.14854 242.88541 487.46287 241.60304 L 496.3977 232.66814 L 487.3318 223.60214 Z M 475.3328 244.66714 C 479.38253 248.71698 479.38253 255.2829 475.3328 259.33273 C 471.28297 263.3826 464.71706 263.3826 460.66723 259.33273 C 456.61737 255.2829 456.61737 248.71698 460.66723 244.66714 C 464.71706 240.61734 471.28297 240.61734 475.3328 244.66714\&quot;/&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/core/images/right-arrow&quot;: {
            &quot;title&quot;: &quot;$:/core/images/right-arrow&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-right-arrow tw-image-button\&quot; width=\&quot;22pt\&quot; height=\&quot;22pt\&quot; viewBox=\&quot;0 0 128 128\&quot;&gt;&lt;path d=\&quot;M72.7982405,98.6541105 L127.184015,43.9832042 C130.938662,40.2089635 130.938662,34.0896964 127.184015,30.3154557 C123.429583,26.5412364 117.342116,26.5412364 113.587684,30.3154557 L66.0000107,78.152522 L18.4123803,30.3154557 C14.6578195,26.5412364 8.57048132,26.5412364 4.81592057,30.3154557 C1.06135981,34.0896964 1.06135981,40.2089635 4.81592057,43.9832042 L59.2017595,98.6541105 C62.9563202,102.428351 69.0436798,102.428351 72.7982405,98.6541126 L72.7982405,98.6541105 Z\&quot; transform=\&quot;translate(66.000000, 64.484791) rotate(-90.000000) translate(-66.000000, -64.484791) \&quot;/&gt;&lt;/svg&gt;&quot;
        },
        &quot;$:/core/images/save-button&quot;: {
            &quot;title&quot;: &quot;$:/core/images/save-button&quot;,
            &quot;tags&quot;: &quot;$:/tags/Image&quot;,
            &quot;text&quot;: &quot;&lt;svg class=\&quot;tw-image-save-button tw-image-button\&quot; viewBox=\&quot;4 512 64 60\&quot; width=\&quot;22pt\&quot; height=\&quot;21pt\&quot;&gt;&lt;path d=\&quot;M 13.5 537.75 L 11.5 537.75 C 11.5 537.75 11.5 537.75 11.5 537.75 C 7.6340064 537.75 4.4999994 540.884 4.5 544.75 L 4.5 564.5 L 4.5 564.5 C 4.5 564.5 4.5 564.5 4.5 564.5 L 4.5 564.5 C 4.5000006 568.366 7.634007 571.5 11.5 571.5 L 60.5 571.5 C 64.365993 571.5 67.5 568.366 67.5 564.5 L 67.5 544.75 C 67.5 540.884 64.365993 537.75 60.5 537.75 L 58.5 537.75 L 49.5 546.75 L 50 546.75 C 52.20914 546.75 54 548.54086 54 550.75 L 54 556.25 C 54 558.45914 52.20914 560.25 50 560.25 L 36 560.25 L 22 560.25 C 19.790861 560.25 18 558.45914 18 556.25 L 18 556.25 C 18 556.25 18 556.25 18 556.25 L 18 550.75 C 18 548.54086 19.790861 546.75 22 546.75 C 22 546.75 22 546.75 22 546.75 L 22.5 546.75 Z\&quot;/&gt;&lt;path d=\&quot;M 16.37132 533.87132 L 33.87868 551.37868 C 35.050253 552.55025 36.949747 552.55025 38.12132 551.37868 L 55.62868 533.87132 C 56.800252 532.69975 56.800252 530.80025 55.62868 529.62868 C 55.06607 529.06607 54.30301 528.75 53.50736 528.75 L 48 528.75 C 46.343146 528.75 45 527.40685 45 525.75 L 45 516 C 45 514.34315 43.656854 513 42 513 L 30 513 C 28.343146 513 27 514.34315 27 516 L 27 525.75 C 27 527.40685 25.656854 528.75 24 528.75 L 18.492641 528.75 C 16.835786 528.75 15.492641 530.09315 15.492641 531.75 C 15.492641 532.54565 15.808711 533.3087 16.37132 533.87132 Z\&quot;/&gt;&lt;/svg&gt;\n&quot;
        },
        &quot;$:/language/Buttons/AdvancedSearch/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/AdvancedSearch/Caption&quot;,
            &quot;text&quot;: &quot;advanced search&quot;
        },
        &quot;$:/language/Buttons/AdvancedSearch/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/AdvancedSearch/Hint&quot;,
            &quot;text&quot;: &quot;Advanced search&quot;
        },
        &quot;$:/language/Buttons/Cancel/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Cancel/Caption&quot;,
            &quot;text&quot;: &quot;cancel&quot;
        },
        &quot;$:/language/Buttons/Cancel/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Cancel/Hint&quot;,
            &quot;text&quot;: &quot;Cancel editing this tiddler&quot;
        },
        &quot;$:/language/Buttons/Close/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Close/Caption&quot;,
            &quot;text&quot;: &quot;close&quot;
        },
        &quot;$:/language/Buttons/Close/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Close/Hint&quot;,
            &quot;text&quot;: &quot;Close this tiddler&quot;
        },
        &quot;$:/language/Buttons/ControlPanel/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/ControlPanel/Caption&quot;,
            &quot;text&quot;: &quot;control panel&quot;
        },
        &quot;$:/language/Buttons/ControlPanel/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/ControlPanel/Hint&quot;,
            &quot;text&quot;: &quot;Open control panel&quot;
        },
        &quot;$:/language/Buttons/Delete/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Delete/Caption&quot;,
            &quot;text&quot;: &quot;delete&quot;
        },
        &quot;$:/language/Buttons/Delete/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Delete/Hint&quot;,
            &quot;text&quot;: &quot;Delete this tiddler&quot;
        },
        &quot;$:/language/Buttons/Edit/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Edit/Caption&quot;,
            &quot;text&quot;: &quot;edit&quot;
        },
        &quot;$:/language/Buttons/Edit/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Edit/Hint&quot;,
            &quot;text&quot;: &quot;Edit this tiddler&quot;
        },
        &quot;$:/language/Buttons/Info/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Info/Caption&quot;,
            &quot;text&quot;: &quot;info&quot;
        },
        &quot;$:/language/Buttons/Info/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Info/Hint&quot;,
            &quot;text&quot;: &quot;Show information for this tiddler&quot;
        },
        &quot;$:/language/Buttons/NewTiddler/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/NewTiddler/Caption&quot;,
            &quot;text&quot;: &quot;new tiddler&quot;
        },
        &quot;$:/language/Buttons/NewTiddler/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/NewTiddler/Hint&quot;,
            &quot;text&quot;: &quot;Create a new tiddler&quot;
        },
        &quot;$:/language/Buttons/Save/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Save/Caption&quot;,
            &quot;text&quot;: &quot;save&quot;
        },
        &quot;$:/language/Buttons/Save/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/Save/Hint&quot;,
            &quot;text&quot;: &quot;Save this tiddler&quot;
        },
        &quot;$:/language/Buttons/SaveWiki/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/SaveWiki/Caption&quot;,
            &quot;text&quot;: &quot;save changes&quot;
        },
        &quot;$:/language/Buttons/SaveWiki/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/SaveWiki/Hint&quot;,
            &quot;text&quot;: &quot;Save changes&quot;
        },
        &quot;$:/language/Buttons/HideSideBar/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/HideSideBar/Caption&quot;,
            &quot;text&quot;: &quot;hide sidebar&quot;
        },
        &quot;$:/language/Buttons/HideSideBar/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/HideSideBar/Hint&quot;,
            &quot;text&quot;: &quot;Hide sidebar&quot;
        },
        &quot;$:/language/Buttons/ShowSideBar/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/ShowSideBar/Caption&quot;,
            &quot;text&quot;: &quot;show sidebar&quot;
        },
        &quot;$:/language/Buttons/ShowSideBar/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Buttons/ShowSideBar/Hint&quot;,
            &quot;text&quot;: &quot;Show sidebar&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Caption&quot;,
            &quot;text&quot;: &quot;Advanced&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/EditorTypes/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/EditorTypes/Caption&quot;,
            &quot;text&quot;: &quot;Editor Types&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/EditorTypes/Editor/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/EditorTypes/Editor/Caption&quot;,
            &quot;text&quot;: &quot;Editor&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/EditorTypes/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/EditorTypes/Hint&quot;,
            &quot;text&quot;: &quot;These tiddlers determine which editor is used to edit specific tiddler types.&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/EditorTypes/Type/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/EditorTypes/Type/Caption&quot;,
            &quot;text&quot;: &quot;Type&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Hint&quot;,
            &quot;text&quot;: &quot;Internal information about this TiddlyWiki&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/LoadedModules/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/LoadedModules/Caption&quot;,
            &quot;text&quot;: &quot;Loaded Modules&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/LoadedModules/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/LoadedModules/Hint&quot;,
            &quot;text&quot;: &quot;These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process.&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/Caption&quot;,
            &quot;text&quot;: &quot;Settings&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/Hint&quot;,
            &quot;text&quot;: &quot;These advanced settings let you customise the behaviour of TiddlyWiki.&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/Caption&quot;,
            &quot;text&quot;: &quot;Navigation Address Bar&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/Hint&quot;,
            &quot;text&quot;: &quot;Behaviour of the browser address bar when navigating to a tiddler:&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/No/Description&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/No/Description&quot;,
            &quot;text&quot;: &quot;Do not update the address bar&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/Permalink/Description&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/Permalink/Description&quot;,
            &quot;text&quot;: &quot;Include the target tiddler&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/Permaview/Description&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/Permaview/Description&quot;,
            &quot;text&quot;: &quot;Include the target tiddler and the current story sequence&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/NavigationHistory/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/NavigationHistory/Caption&quot;,
            &quot;text&quot;: &quot;Navigation History&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/NavigationHistory/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/NavigationHistory/Hint&quot;,
            &quot;text&quot;: &quot;Update browser history when navigating to a tiddler:&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/NavigationHistory/No/Description&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/NavigationHistory/No/Description&quot;,
            &quot;text&quot;: &quot;Do not update history&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/Settings/NavigationHistory/Yes/Description&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/Settings/NavigationHistory/Yes/Description&quot;,
            &quot;text&quot;: &quot;Update history&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/TiddlerFields/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/TiddlerFields/Caption&quot;,
            &quot;text&quot;: &quot;Tiddler Fields&quot;
        },
        &quot;$:/language/ControlPanel/Advanced/TiddlerFields/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Advanced/TiddlerFields/Hint&quot;,
            &quot;text&quot;: &quot;This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers).&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Caption&quot;,
            &quot;text&quot;: &quot;Appearance&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Hint&quot;,
            &quot;text&quot;: &quot;Ways to customise the appearance of your TiddlyWiki.&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Palette/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Palette/Caption&quot;,
            &quot;text&quot;: &quot;Palette&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Clone/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Clone/Caption&quot;,
            &quot;text&quot;: &quot;clone&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Clone/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Clone/Prompt&quot;,
            &quot;text&quot;: &quot;It is recommended that you clone this shadow palette before editing it&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Prompt/Modified&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Prompt/Modified&quot;,
            &quot;text&quot;: &quot;This shadow palette has been modified&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Prompt&quot;,
            &quot;text&quot;: &quot;Editing&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Reset/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Palette/Editor/Reset/Caption&quot;,
            &quot;text&quot;: &quot;reset&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Palette/HideEditor/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Palette/HideEditor/Caption&quot;,
            &quot;text&quot;: &quot;hide editor&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Palette/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Palette/Prompt&quot;,
            &quot;text&quot;: &quot;Current palette:&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Palette/ShowEditor/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Palette/ShowEditor/Caption&quot;,
            &quot;text&quot;: &quot;show editor&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/StoryView/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/StoryView/Caption&quot;,
            &quot;text&quot;: &quot;Story View&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/StoryView/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/StoryView/Prompt&quot;,
            &quot;text&quot;: &quot;Current view:&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Theme/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Theme/Caption&quot;,
            &quot;text&quot;: &quot;Theme&quot;
        },
        &quot;$:/language/ControlPanel/Appearance/Theme/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Appearance/Theme/Prompt&quot;,
            &quot;text&quot;: &quot;Current theme:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/AnimDuration/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/AnimDuration/Prompt&quot;,
            &quot;text&quot;: &quot;Animation duration:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/Caption&quot;,
            &quot;text&quot;: &quot;Basics&quot;
        },
        &quot;$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint&quot;,
            &quot;text&quot;: &quot;Use &amp;#91;&amp;#91;double square brackets&amp;#93;&amp;#93; for titles with spaces. Or you can choose to &lt;$button set=\&quot;$:/DefaultTiddlers\&quot; setTo=\&quot;[list[$:/StoryList]]\&quot;&gt;retain story ordering&lt;/$button&gt;&quot;
        },
        &quot;$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt&quot;,
            &quot;text&quot;: &quot;Default tiddlers:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint&quot;,
            &quot;text&quot;: &quot;Choose which tiddlers are displayed at startup:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/Language/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/Language/Prompt&quot;,
            &quot;text&quot;: &quot;Hello! Current language:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt&quot;,
            &quot;text&quot;: &quot;Number of overridden shadow tiddlers:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt&quot;,
            &quot;text&quot;: &quot;Number of shadow tiddlers:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/Subtitle/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/Subtitle/Prompt&quot;,
            &quot;text&quot;: &quot;Subtitle:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/SystemTiddlers/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/SystemTiddlers/Prompt&quot;,
            &quot;text&quot;: &quot;Number of system tiddlers:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/Tags/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/Tags/Prompt&quot;,
            &quot;text&quot;: &quot;Number of tags:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/Tiddlers/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/Tiddlers/Prompt&quot;,
            &quot;text&quot;: &quot;Number of tiddlers:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/Title/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/Title/Prompt&quot;,
            &quot;text&quot;: &quot;Title of this ~TiddlyWiki:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/Username/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/Username/Prompt&quot;,
            &quot;text&quot;: &quot;Username for signing edits:&quot;
        },
        &quot;$:/language/ControlPanel/Basics/Version/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Basics/Version/Prompt&quot;,
            &quot;text&quot;: &quot;~TiddlyWiki version:&quot;
        },
        &quot;$:/language/ControlPanel/Plugins/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Plugins/Caption&quot;,
            &quot;text&quot;: &quot;Plugins&quot;
        },
        &quot;$:/language/ControlPanel/Plugins/Fields/Description&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Plugins/Fields/Description&quot;,
            &quot;text&quot;: &quot;Description&quot;
        },
        &quot;$:/language/ControlPanel/Plugins/Fields/Title&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Plugins/Fields/Title&quot;,
            &quot;text&quot;: &quot;Title&quot;
        },
        &quot;$:/language/ControlPanel/Plugins/Fields/Version&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Plugins/Fields/Version&quot;,
            &quot;text&quot;: &quot;Version&quot;
        },
        &quot;$:/language/ControlPanel/Plugins/Language/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Plugins/Language/Prompt&quot;,
            &quot;text&quot;: &quot;Languages&quot;
        },
        &quot;$:/language/ControlPanel/Plugins/Plugin/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Plugins/Plugin/Prompt&quot;,
            &quot;text&quot;: &quot;Plugins&quot;
        },
        &quot;$:/language/ControlPanel/Plugins/Theme/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Plugins/Theme/Prompt&quot;,
            &quot;text&quot;: &quot;Themes&quot;
        },
        &quot;$:/language/ControlPanel/Saving/AutoSave/Disabled/Button&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/AutoSave/Disabled/Button&quot;,
            &quot;text&quot;: &quot;enable&quot;
        },
        &quot;$:/language/ControlPanel/Saving/AutoSave/Disabled/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/AutoSave/Disabled/Prompt&quot;,
            &quot;text&quot;: &quot;Autosave is currently disabled&quot;
        },
        &quot;$:/language/ControlPanel/Saving/AutoSave/Enabled/Button&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/AutoSave/Enabled/Button&quot;,
            &quot;text&quot;: &quot;disable&quot;
        },
        &quot;$:/language/ControlPanel/Saving/AutoSave/Enabled/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/AutoSave/Enabled/Prompt&quot;,
            &quot;text&quot;: &quot;Autosave is currently enabled&quot;
        },
        &quot;$:/language/ControlPanel/Saving/AutoSave&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/AutoSave&quot;,
            &quot;text&quot;: &quot;Autosave&quot;
        },
        &quot;$:/language/ControlPanel/Saving/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/Caption&quot;,
            &quot;text&quot;: &quot;Saving&quot;
        },
        &quot;$:/language/ControlPanel/Saving/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/Heading&quot;,
            &quot;text&quot;: &quot;Saving&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading&quot;,
            &quot;text&quot;: &quot;Advanced Settings&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/BackupDir&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/BackupDir&quot;,
            &quot;text&quot;: &quot;Backup Directory&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/Backups&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/Backups&quot;,
            &quot;text&quot;: &quot;Backups&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/Filename&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/Filename&quot;,
            &quot;text&quot;: &quot;Upload Filename&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/Heading&quot;,
            &quot;text&quot;: &quot;~TiddlySpot&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/Hint&quot;,
            &quot;text&quot;: &quot;//The server URL defaults to `http://&lt;wikiname&gt;.tiddlyspot.com/store.cgi` and can be changed to use a custom server address//&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/Password&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/Password&quot;,
            &quot;text&quot;: &quot;Password&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/ServerURL&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/ServerURL&quot;,
            &quot;text&quot;: &quot;Server URL&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/UploadDir&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/UploadDir&quot;,
            &quot;text&quot;: &quot;Upload Directory&quot;
        },
        &quot;$:/language/ControlPanel/Saving/TiddlySpot/UserName&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Saving/TiddlySpot/UserName&quot;,
            &quot;text&quot;: &quot;Wiki Name&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Caption&quot;,
            &quot;text&quot;: &quot;Tools&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Download/Full/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Download/Full/Caption&quot;,
            &quot;text&quot;: &quot;Download full wiki&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Encryption/ChangePassword/Button&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Encryption/ChangePassword/Button&quot;,
            &quot;text&quot;: &quot;change password&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Encryption/ClearPassword/Button&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Encryption/ClearPassword/Button&quot;,
            &quot;text&quot;: &quot;clear password&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Encryption/Disabled/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Encryption/Disabled/Prompt&quot;,
            &quot;text&quot;: &quot;This wiki is not encrypted&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Encryption/Enabled/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Encryption/Enabled/Prompt&quot;,
            &quot;text&quot;: &quot;This wiki is encrypted&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Encryption/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Encryption/Heading&quot;,
            &quot;text&quot;: &quot;Encryption&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Encryption/SetPassword/Button&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Encryption/SetPassword/Button&quot;,
            &quot;text&quot;: &quot;set password&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Export/AllAsStaticHTML/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Export/AllAsStaticHTML/Caption&quot;,
            &quot;text&quot;: &quot;Download all tiddlers as static HTML&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Export/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Export/Heading&quot;,
            &quot;text&quot;: &quot;Export&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Import/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Import/Heading&quot;,
            &quot;text&quot;: &quot;Import&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Import/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Import/Hint&quot;,
            &quot;text&quot;: &quot;Browse for files on your computer to import their contents (the individual tiddlers within TiddlyWiki HTML files are imported separately). You can also drag and drop files directly to the browser window.&quot;
        },
        &quot;$:/language/ControlPanel/Tools/Import/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/ControlPanel/Tools/Import/Prompt&quot;,
            &quot;text&quot;: &quot;Import:&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/animation&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/animation&quot;,
            &quot;text&quot;: &quot;Animations that may be used with the RevealWidget.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/command&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/command&quot;,
            &quot;text&quot;: &quot;Commands that can be executed under Node.js.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/config&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/config&quot;,
            &quot;text&quot;: &quot;Data to be inserted into `$tw.config`.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/filteroperator&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/filteroperator&quot;,
            &quot;text&quot;: &quot;Individual filter operator methods.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/global&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/global&quot;,
            &quot;text&quot;: &quot;Global data to be inserted into `$tw`.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/isfilteroperator&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/isfilteroperator&quot;,
            &quot;text&quot;: &quot;Operands for the ''is'' filter operator.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/macro&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/macro&quot;,
            &quot;text&quot;: &quot;JavaScript macro definitions.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/parser&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/parser&quot;,
            &quot;text&quot;: &quot;Parsers for different content types.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/saver&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/saver&quot;,
            &quot;text&quot;: &quot;Savers handle different methods for saving files from the browser.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/startup&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/startup&quot;,
            &quot;text&quot;: &quot;Startup functions.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/storyview&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/storyview&quot;,
            &quot;text&quot;: &quot;Story views customise the animation and behaviour of list widgets.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/tiddlerdeserializer&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/tiddlerdeserializer&quot;,
            &quot;text&quot;: &quot;Converts different content types into tiddlers.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/tiddlerfield&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/tiddlerfield&quot;,
            &quot;text&quot;: &quot;Defines the behaviour of an individual tiddler field.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/tiddlermethod&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/tiddlermethod&quot;,
            &quot;text&quot;: &quot;Adds methods to the `$tw.Tiddler` prototype.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/utils&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/utils&quot;,
            &quot;text&quot;: &quot;Adds methods to `$tw.utils`.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/utils-node&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/utils-node&quot;,
            &quot;text&quot;: &quot;Adds Node.js-specific methods to `$tw.utils`.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/widget&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/widget&quot;,
            &quot;text&quot;: &quot;Widgets encapsulate DOM rendering and refreshing.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/wikimethod&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/wikimethod&quot;,
            &quot;text&quot;: &quot;Adds methods to `$tw.Wiki`.&quot;
        },
        &quot;$:/language/Docs/ModuleTypes/wikirule&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/ModuleTypes/wikirule&quot;,
            &quot;text&quot;: &quot;Individual parser rules for the main WikiText parser.&quot;
        },
        &quot;$:/language/Docs/PaletteColours/alert-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/alert-background&quot;,
            &quot;text&quot;: &quot;Alert background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/alert-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/alert-border&quot;,
            &quot;text&quot;: &quot;Alert border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/alert-highlight&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/alert-highlight&quot;,
            &quot;text&quot;: &quot;Alert highlight&quot;
        },
        &quot;$:/language/Docs/PaletteColours/alert-muted-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/alert-muted-foreground&quot;,
            &quot;text&quot;: &quot;Alert muted foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/background&quot;,
            &quot;text&quot;: &quot;General background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/blockquote-bar&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/blockquote-bar&quot;,
            &quot;text&quot;: &quot;Blockquote bar&quot;
        },
        &quot;$:/language/Docs/PaletteColours/code-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/code-background&quot;,
            &quot;text&quot;: &quot;Code background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/code-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/code-border&quot;,
            &quot;text&quot;: &quot;Code border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/code-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/code-foreground&quot;,
            &quot;text&quot;: &quot;Code foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/download-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/download-background&quot;,
            &quot;text&quot;: &quot;Download button background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/download-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/download-foreground&quot;,
            &quot;text&quot;: &quot;Download button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/dragger-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/dragger-background&quot;,
            &quot;text&quot;: &quot;Dragger background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/dragger-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/dragger-foreground&quot;,
            &quot;text&quot;: &quot;Dragger foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/dropdown-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/dropdown-background&quot;,
            &quot;text&quot;: &quot;Dropdown background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/dropdown-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/dropdown-border&quot;,
            &quot;text&quot;: &quot;Dropdown border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/dropdown-tab-background-selected&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/dropdown-tab-background-selected&quot;,
            &quot;text&quot;: &quot;Dropdown tab background for selected tabs&quot;
        },
        &quot;$:/language/Docs/PaletteColours/dropdown-tab-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/dropdown-tab-background&quot;,
            &quot;text&quot;: &quot;Dropdown tab background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/dropzone-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/dropzone-background&quot;,
            &quot;text&quot;: &quot;Dropzone background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/external-link-background-hover&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/external-link-background-hover&quot;,
            &quot;text&quot;: &quot;External link background hover&quot;
        },
        &quot;$:/language/Docs/PaletteColours/external-link-background-visited&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/external-link-background-visited&quot;,
            &quot;text&quot;: &quot;External link background visited&quot;
        },
        &quot;$:/language/Docs/PaletteColours/external-link-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/external-link-background&quot;,
            &quot;text&quot;: &quot;External link background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/external-link-foreground-hover&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/external-link-foreground-hover&quot;,
            &quot;text&quot;: &quot;External link foreground hover&quot;
        },
        &quot;$:/language/Docs/PaletteColours/external-link-foreground-visited&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/external-link-foreground-visited&quot;,
            &quot;text&quot;: &quot;External link foreground visited&quot;
        },
        &quot;$:/language/Docs/PaletteColours/external-link-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/external-link-foreground&quot;,
            &quot;text&quot;: &quot;External link foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/foreground&quot;,
            &quot;text&quot;: &quot;General foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/message-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/message-background&quot;,
            &quot;text&quot;: &quot;Message box background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/message-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/message-border&quot;,
            &quot;text&quot;: &quot;Message box border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/message-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/message-foreground&quot;,
            &quot;text&quot;: &quot;Message box foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/modal-backdrop&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/modal-backdrop&quot;,
            &quot;text&quot;: &quot;Modal backdrop&quot;
        },
        &quot;$:/language/Docs/PaletteColours/modal-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/modal-background&quot;,
            &quot;text&quot;: &quot;Modal background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/modal-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/modal-border&quot;,
            &quot;text&quot;: &quot;Modal border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/modal-footer-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/modal-footer-background&quot;,
            &quot;text&quot;: &quot;Modal footer background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/modal-footer-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/modal-footer-border&quot;,
            &quot;text&quot;: &quot;Modal footer border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/modal-header-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/modal-header-border&quot;,
            &quot;text&quot;: &quot;Modal header border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/muted-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/muted-foreground&quot;,
            &quot;text&quot;: &quot;General muted foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/notification-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/notification-background&quot;,
            &quot;text&quot;: &quot;Notification background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/notification-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/notification-border&quot;,
            &quot;text&quot;: &quot;Notification border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/page-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/page-background&quot;,
            &quot;text&quot;: &quot;Page background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/pre-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/pre-background&quot;,
            &quot;text&quot;: &quot;Preformatted code background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/pre-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/pre-border&quot;,
            &quot;text&quot;: &quot;Preformatted code border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/primary&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/primary&quot;,
            &quot;text&quot;: &quot;General primary&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-button-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-button-foreground&quot;,
            &quot;text&quot;: &quot;Sidebar button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-controls-foreground-hover&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-controls-foreground-hover&quot;,
            &quot;text&quot;: &quot;Sidebar controls foreground hover&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-controls-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-controls-foreground&quot;,
            &quot;text&quot;: &quot;Sidebar controls foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-foreground-shadow&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-foreground-shadow&quot;,
            &quot;text&quot;: &quot;Sidebar foreground shadow&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-foreground&quot;,
            &quot;text&quot;: &quot;Sidebar foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-muted-foreground-hover&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-muted-foreground-hover&quot;,
            &quot;text&quot;: &quot;Sidebar muted foreground hover&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-muted-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-muted-foreground&quot;,
            &quot;text&quot;: &quot;Sidebar muted foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-tab-background-selected&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-tab-background-selected&quot;,
            &quot;text&quot;: &quot;Sidebar tab background for selected tabs&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-tab-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-tab-background&quot;,
            &quot;text&quot;: &quot;Sidebar tab background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-tab-border-selected&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-tab-border-selected&quot;,
            &quot;text&quot;: &quot;Sidebar tab border for selected tabs&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-tab-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-tab-border&quot;,
            &quot;text&quot;: &quot;Sidebar tab border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-tab-divider&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-tab-divider&quot;,
            &quot;text&quot;: &quot;Sidebar tab divider&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-tab-foreground-selected&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-tab-foreground-selected&quot;,
            &quot;text&quot;: &quot;Sidebar tab foreground for selected tabs&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-tab-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-tab-foreground&quot;,
            &quot;text&quot;: &quot;Sidebar tab foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground-hover&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground-hover&quot;,
            &quot;text&quot;: &quot;Sidebar tiddler link foreground hover&quot;
        },
        &quot;$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground&quot;,
            &quot;text&quot;: &quot;Sidebar tiddler link foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/static-alert-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/static-alert-foreground&quot;,
            &quot;text&quot;: &quot;Static alert foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tab-background-selected&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tab-background-selected&quot;,
            &quot;text&quot;: &quot;Tab background for selected tabs&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tab-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tab-background&quot;,
            &quot;text&quot;: &quot;Tab background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tab-border-selected&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tab-border-selected&quot;,
            &quot;text&quot;: &quot;Tab border for selected tabs&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tab-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tab-border&quot;,
            &quot;text&quot;: &quot;Tab border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tab-divider&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tab-divider&quot;,
            &quot;text&quot;: &quot;Tab divider&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tab-foreground-selected&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tab-foreground-selected&quot;,
            &quot;text&quot;: &quot;Tab foreground for selected tabs&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tab-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tab-foreground&quot;,
            &quot;text&quot;: &quot;Tab foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/table-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/table-border&quot;,
            &quot;text&quot;: &quot;Table border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/table-footer-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/table-footer-background&quot;,
            &quot;text&quot;: &quot;Table footer background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/table-header-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/table-header-background&quot;,
            &quot;text&quot;: &quot;Table header background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tag-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tag-background&quot;,
            &quot;text&quot;: &quot;Tag background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tag-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tag-foreground&quot;,
            &quot;text&quot;: &quot;Tag foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-background&quot;,
            &quot;text&quot;: &quot;Tiddler background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-border&quot;,
            &quot;text&quot;: &quot;Tiddler border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-controls-foreground-hover&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-controls-foreground-hover&quot;,
            &quot;text&quot;: &quot;Tiddler controls foreground hover&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-controls-foreground-selected&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-controls-foreground-selected&quot;,
            &quot;text&quot;: &quot;Tiddler controls foreground for selected controls&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-controls-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-controls-foreground&quot;,
            &quot;text&quot;: &quot;Tiddler controls foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-editor-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-editor-background&quot;,
            &quot;text&quot;: &quot;Tiddler editor background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-editor-border-image&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-editor-border-image&quot;,
            &quot;text&quot;: &quot;Tiddler editor border image&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-editor-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-editor-border&quot;,
            &quot;text&quot;: &quot;Tiddler editor border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-editor-fields-even&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-editor-fields-even&quot;,
            &quot;text&quot;: &quot;Tiddler editor background for even fields&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-editor-fields-odd&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-editor-fields-odd&quot;,
            &quot;text&quot;: &quot;Tiddler editor background for odd fields&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-info-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-info-background&quot;,
            &quot;text&quot;: &quot;Tiddler info panel background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-info-border&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-info-border&quot;,
            &quot;text&quot;: &quot;Tiddler info panel border&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-info-tab-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-info-tab-background&quot;,
            &quot;text&quot;: &quot;Tiddler info panel tab background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-link-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-link-background&quot;,
            &quot;text&quot;: &quot;Tiddler link background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-link-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-link-foreground&quot;,
            &quot;text&quot;: &quot;Tiddler link foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-subtitle-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-subtitle-foreground&quot;,
            &quot;text&quot;: &quot;Tiddler subtitle foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/tiddler-title-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/tiddler-title-foreground&quot;,
            &quot;text&quot;: &quot;Tiddler title foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/toolbar-new-button&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/toolbar-new-button&quot;,
            &quot;text&quot;: &quot;Toolbar 'new tiddler' button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/toolbar-options-button&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/toolbar-options-button&quot;,
            &quot;text&quot;: &quot;Toolbar 'options' button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/toolbar-save-button&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/toolbar-save-button&quot;,
            &quot;text&quot;: &quot;Toolbar 'save' button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/toolbar-info-button&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/toolbar-info-button&quot;,
            &quot;text&quot;: &quot;Toolbar 'info' button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/toolbar-edit-button&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/toolbar-edit-button&quot;,
            &quot;text&quot;: &quot;Toolbar 'edit' button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/toolbar-close-button&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/toolbar-close-button&quot;,
            &quot;text&quot;: &quot;Toolbar 'close' button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/toolbar-delete-button&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/toolbar-delete-button&quot;,
            &quot;text&quot;: &quot;Toolbar 'delete' button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/toolbar-cancel-button&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/toolbar-cancel-button&quot;,
            &quot;text&quot;: &quot;Toolbar 'cancel' button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/toolbar-done-button&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/toolbar-done-button&quot;,
            &quot;text&quot;: &quot;Toolbar 'done' button foreground&quot;
        },
        &quot;$:/language/Docs/PaletteColours/untagged-background&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/untagged-background&quot;,
            &quot;text&quot;: &quot;Untagged pill background&quot;
        },
        &quot;$:/language/Docs/PaletteColours/very-muted-foreground&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/PaletteColours/very-muted-foreground&quot;,
            &quot;text&quot;: &quot;Very muted foreground&quot;
        },
        &quot;$:/language/EditTemplate/Body/External/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Body/External/Hint&quot;,
            &quot;text&quot;: &quot;This is an external tiddler stored outside of the main TiddlyWiki file. You can edit the tags and fields but cannot directly edit the content itself&quot;
        },
        &quot;$:/language/EditTemplate/Body/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Body/Hint&quot;,
            &quot;text&quot;: &quot;Use [[wiki text|http://tiddlywiki.com/static/WikiText.html]] to add formatting, images, and dynamic features&quot;
        },
        &quot;$:/language/EditTemplate/Body/Placeholder&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Body/Placeholder&quot;,
            &quot;text&quot;: &quot;Type the text for this tiddler&quot;
        },
        &quot;$:/language/EditTemplate/Body/Preview/Button/Hide&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Body/Preview/Button/Hide&quot;,
            &quot;text&quot;: &quot;hide preview&quot;
        },
        &quot;$:/language/EditTemplate/Body/Preview/Button/Show&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Body/Preview/Button/Show&quot;,
            &quot;text&quot;: &quot;show preview&quot;
        },
        &quot;$:/language/EditTemplate/Fields/Add/Button&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Fields/Add/Button&quot;,
            &quot;text&quot;: &quot;add&quot;
        },
        &quot;$:/language/EditTemplate/Fields/Add/Name/Placeholder&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Fields/Add/Name/Placeholder&quot;,
            &quot;text&quot;: &quot;field name&quot;
        },
        &quot;$:/language/EditTemplate/Fields/Add/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Fields/Add/Prompt&quot;,
            &quot;text&quot;: &quot;Add a new field:&quot;
        },
        &quot;$:/language/EditTemplate/Fields/Add/Value/Placeholder&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Fields/Add/Value/Placeholder&quot;,
            &quot;text&quot;: &quot;field value&quot;
        },
        &quot;$:/language/EditTemplate/Shadow/Warning&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Shadow/Warning&quot;,
            &quot;text&quot;: &quot;This is a shadow tiddler. Any changes will override the default version&quot;
        },
        &quot;$:/language/EditTemplate/Shadow/OverriddenWarning&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Shadow/OverriddenWarning&quot;,
            &quot;text&quot;: &quot;This is a modified shadow tiddler. You can revert to the default version by deleting this tiddler&quot;
        },
        &quot;$:/language/EditTemplate/Tags/Add/Button&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Tags/Add/Button&quot;,
            &quot;text&quot;: &quot;add&quot;
        },
        &quot;$:/language/EditTemplate/Tags/Add/Placeholder&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Tags/Add/Placeholder&quot;,
            &quot;text&quot;: &quot;tag name&quot;
        },
        &quot;$:/language/EditTemplate/Type/Placeholder&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Type/Placeholder&quot;,
            &quot;text&quot;: &quot;content type&quot;
        },
        &quot;$:/language/EditTemplate/Type/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/EditTemplate/Type/Prompt&quot;,
            &quot;text&quot;: &quot;Type:&quot;
        },
        &quot;$:/language/Docs/Fields/_canonical_uri&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/_canonical_uri&quot;,
            &quot;text&quot;: &quot;The full URI of an external image tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/bag&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/bag&quot;,
            &quot;text&quot;: &quot;The name of the bag from which a tiddler came&quot;
        },
        &quot;$:/language/Docs/Fields/caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/caption&quot;,
            &quot;text&quot;: &quot;The text to be displayed on a tab or button&quot;
        },
        &quot;$:/language/Docs/Fields/color&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/color&quot;,
            &quot;text&quot;: &quot;The CSS color value associated with a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/component&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/component&quot;,
            &quot;text&quot;: &quot;The name of the component responsible for an [[alert tiddler|AlertMechanism]]&quot;
        },
        &quot;$:/language/Docs/Fields/current-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/current-tiddler&quot;,
            &quot;text&quot;: &quot;Used to cache the top tiddler in a [[history list|HistoryMechanism]]&quot;
        },
        &quot;$:/language/Docs/Fields/created&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/created&quot;,
            &quot;text&quot;: &quot;The date a tiddler was created&quot;
        },
        &quot;$:/language/Docs/Fields/creator&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/creator&quot;,
            &quot;text&quot;: &quot;The name of the person who created a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/dependents&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/dependents&quot;,
            &quot;text&quot;: &quot;For a plugin, lists the dependent plugin titles&quot;
        },
        &quot;$:/language/Docs/Fields/description&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/description&quot;,
            &quot;text&quot;: &quot;The descriptive text for a plugin, or a modal dialogue&quot;
        },
        &quot;$:/language/Docs/Fields/draft.of&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/draft.of&quot;,
            &quot;text&quot;: &quot;For draft tiddlers, contains the title of the tiddler of which this is a draft&quot;
        },
        &quot;$:/language/Docs/Fields/draft.title&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/draft.title&quot;,
            &quot;text&quot;: &quot;For draft tiddlers, contains the proposed new title of the tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/footer&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/footer&quot;,
            &quot;text&quot;: &quot;The footer text for a wizard&quot;
        },
        &quot;$:/language/Docs/Fields/hack-to-give-us-something-to-compare-against&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/hack-to-give-us-something-to-compare-against&quot;,
            &quot;text&quot;: &quot;A temporary storage field used in [[$:/core/templates/static.content]]&quot;
        },
        &quot;$:/language/Docs/Fields/icon&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/icon&quot;,
            &quot;text&quot;: &quot;The title of the tiddler containing the icon associated with a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/library&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/library&quot;,
            &quot;text&quot;: &quot;If set to \&quot;yes\&quot; indicates that a tiddler should be saved as a JavaScript library&quot;
        },
        &quot;$:/language/Docs/Fields/list&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/list&quot;,
            &quot;text&quot;: &quot;An ordered list of tiddler titles associated with a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/list-before&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/list-before&quot;,
            &quot;text&quot;: &quot;If set, the title of a tiddler before which this tiddler should be added to the ordered list of tiddler titles, or at the start of the list if this field is present but empty&quot;
        },
        &quot;$:/language/Docs/Fields/list-after&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/list-after&quot;,
            &quot;text&quot;: &quot;If set, the title of the tiddler after which this tiddler should be added to the ordered list of tiddler titles&quot;
        },
        &quot;$:/language/Docs/Fields/modified&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/modified&quot;,
            &quot;text&quot;: &quot;The date and time at which a tiddler was last modified&quot;
        },
        &quot;$:/language/Docs/Fields/modifier&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/modifier&quot;,
            &quot;text&quot;: &quot;The tiddler title associated with the person who last modified a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/name&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/name&quot;,
            &quot;text&quot;: &quot;The human readable name associated with a plugin tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/plugin-priority&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/plugin-priority&quot;,
            &quot;text&quot;: &quot;A numerical value indicating the priority of a plugin tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/plugin-type&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/plugin-type&quot;,
            &quot;text&quot;: &quot;The type of plugin in a plugin tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/revision&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/revision&quot;,
            &quot;text&quot;: &quot;The revision of the tiddler held at the server&quot;
        },
        &quot;$:/language/Docs/Fields/released&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/released&quot;,
            &quot;text&quot;: &quot;Date of a TiddlyWiki release&quot;
        },
        &quot;$:/language/Docs/Fields/source&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/source&quot;,
            &quot;text&quot;: &quot;The source URL associated with a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/subtitle&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/subtitle&quot;,
            &quot;text&quot;: &quot;The subtitle text for a wizard&quot;
        },
        &quot;$:/language/Docs/Fields/tags&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/tags&quot;,
            &quot;text&quot;: &quot;A list of tags associated with a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/text&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/text&quot;,
            &quot;text&quot;: &quot;The body text of a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/title&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/title&quot;,
            &quot;text&quot;: &quot;The unique name of a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/type&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/type&quot;,
            &quot;text&quot;: &quot;The content type of a tiddler&quot;
        },
        &quot;$:/language/Docs/Fields/version&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Fields/version&quot;,
            &quot;text&quot;: &quot;Version information for a plugin&quot;
        },
        &quot;$:/language/Filters/AllTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/AllTiddlers&quot;,
            &quot;text&quot;: &quot;All tiddlers except system tiddlers&quot;
        },
        &quot;$:/language/Filters/RecentTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/RecentTiddlers&quot;,
            &quot;text&quot;: &quot;Recently modified tiddlers&quot;
        },
        &quot;$:/language/Filters/AllTags&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/AllTags&quot;,
            &quot;text&quot;: &quot;All tags except system tags&quot;
        },
        &quot;$:/language/Filters/Missing&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/Missing&quot;,
            &quot;text&quot;: &quot;Missing tiddlers&quot;
        },
        &quot;$:/language/Filters/Drafts&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/Drafts&quot;,
            &quot;text&quot;: &quot;Draft tiddlers&quot;
        },
        &quot;$:/language/Filters/Orphans&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/Orphans&quot;,
            &quot;text&quot;: &quot;Orphan tiddlers&quot;
        },
        &quot;$:/language/Filters/SystemTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/SystemTiddlers&quot;,
            &quot;text&quot;: &quot;System tiddlers&quot;
        },
        &quot;$:/language/Filters/ShadowTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/ShadowTiddlers&quot;,
            &quot;text&quot;: &quot;Shadow tiddlers&quot;
        },
        &quot;$:/language/Filters/OverriddenShadowTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/OverriddenShadowTiddlers&quot;,
            &quot;text&quot;: &quot;Overridden shadow tiddlers&quot;
        },
        &quot;$:/language/Filters/SystemTags&quot;: {
            &quot;title&quot;: &quot;$:/language/Filters/SystemTags&quot;,
            &quot;text&quot;: &quot;System tags&quot;
        },
        &quot;GettingStarted&quot;: {
            &quot;title&quot;: &quot;GettingStarted&quot;,
            &quot;text&quot;: &quot;Welcome to TiddlyWiki, the non-linear personal web notebook.\n\nTo get started, first verify that you can save changes successfully - see http://tiddlywiki.com/ for detailed instructions.\n\nThen you can:\n\n* Create new tiddlers using the 'plus' button in the sidebar\n* Visit the [[control panel|$:/ControlPanel]] using the 'cog' button in the sidebar to customise your wiki\n** Stop this message appearing by changing the default tiddlers under the ''Basics'' tab\n* Save changes using the 'download' button in the sidebar\n* Learn more about [[WikiText|http://tiddlywiki.com/static/WikiText.html]]\n&quot;
        },
        &quot;$:/language/Help/build&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/build&quot;,
            &quot;description&quot;: &quot;Automatically run configured commands&quot;,
            &quot;text&quot;: &quot;Build the specified build targets for the current wiki. If no build targets are specified then all available targets will be built.\n\n```\n--build &lt;target&gt; [&lt;target&gt; ...]\n```\n\nBuild targets are defined in the `tiddlywiki.info` file of a wiki folder.\n\n&quot;
        },
        &quot;$:/language/Help/clearpassword&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/clearpassword&quot;,
            &quot;description&quot;: &quot;Clear a password for subsequent crypto operations&quot;,
            &quot;text&quot;: &quot;Clear the password for subsequent crypto operations\n\n```\n--clearpassword\n```\n&quot;
        },
        &quot;$:/language/Help/default&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/default&quot;,
            &quot;text&quot;: &quot;\\define commandTitle()\n$:/language/Help/$(command)$\n\\end\n```\nusage: tiddlywiki [&lt;wikifolder&gt;] [--&lt;command&gt; [&lt;args&gt;...]...]\n```\n\nAvailable commands:\n\n&lt;ul&gt;\n&lt;$list filter=\&quot;[commands[]sort[title]]\&quot; variable=\&quot;command\&quot;&gt;\n&lt;li&gt;&lt;$link to=&lt;&lt;commandTitle&gt;&gt;&gt;&lt;$macrocall $name=\&quot;command\&quot; $type=\&quot;text/plain\&quot; $output=\&quot;text/plain\&quot;/&gt;&lt;/$link&gt;: &lt;$transclude tiddler=&lt;&lt;commandTitle&gt;&gt; field=\&quot;description\&quot;/&gt;&lt;/li&gt;\n&lt;/$list&gt;\n&lt;/ul&gt;\n\nTo get detailed help on a command:\n\n```\ntiddlywiki --help &lt;command&gt;\n```\n&quot;
        },
        &quot;$:/language/Help/help&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/help&quot;,
            &quot;description&quot;: &quot;Display help for TiddlyWiki commands&quot;,
            &quot;text&quot;: &quot;Displays help text for a command:\n\n```\n--help [&lt;command&gt;]\n```\n\nIf the command name is omitted then a list of available commands is displayed.\n&quot;
        },
        &quot;$:/language/Help/init&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/init&quot;,
            &quot;description&quot;: &quot;Initialise a new wiki folder&quot;,
            &quot;text&quot;: &quot;Initialise an empty [[WikiFolder|WikiFolders]] with a copy of the specified edition.\n\n```\n--init &lt;edition&gt; [&lt;edition&gt; ...]\n```\n\nFor example:\n\n```\ntiddlywiki ./MyWikiFolder --init empty\n```\n\nNote:\n\n* The wiki folder directory will be created if necessary\n* The \&quot;edition\&quot; defaults to ''empty''\n* The init command will fail if the wiki folder is not empty\n* The init command removes any `includeWikis` definitions in the edition's `tiddlywiki.info` file\n* When multiple editions are specified, editions initialised later will overwrite any files shared with earlier editions (so, the final `tiddlywiki.info` file will be copied from the last edition)\n* `--help editions` returns a list of available editions\n&quot;
        },
        &quot;$:/language/Help/load&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/load&quot;,
            &quot;description&quot;: &quot;Load tiddlers from a file&quot;,
            &quot;text&quot;: &quot;Load tiddlers from 2.x.x TiddlyWiki files (`.html`), `.tiddler`, `.tid`, `.json` or other files \n\n```\n--load &lt;filepath&gt;\n```\n\nTo load tiddlers from an encrypted TiddlyWiki file you should first specify the password with the PasswordCommand. For example:\n\n```\ntiddlywiki ./MyWiki --password pa55w0rd --load my_encrypted_wiki.html\n```\n\nNote that TiddlyWiki will not load an older version of an already loaded plugin.\n&quot;
        },
        &quot;$:/language/Help/notfound&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/notfound&quot;,
            &quot;text&quot;: &quot;No such help item&quot;
        },
        &quot;$:/language/Help/output&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/output&quot;,
            &quot;description&quot;: &quot;Set the base output directory for subsequent commands&quot;,
            &quot;text&quot;: &quot;Sets the base output directory for subsequent commands. The default output directory is the `output` subdirectory of the edition directory.\n\n```\n--output &lt;pathname&gt;\n```\n\nIf the specified pathname is relative then it is resolved relative to the current working directory.\n&quot;
        },
        &quot;$:/language/Help/password&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/password&quot;,
            &quot;description&quot;: &quot;Set a password for subsequent crypto operations&quot;,
            &quot;text&quot;: &quot;Set a password for subsequent crypto operations\n\n```\n--password &lt;password&gt;\n```\n\n&quot;
        },
        &quot;$:/language/Help/rendertiddler&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/rendertiddler&quot;,
            &quot;description&quot;: &quot;Render an individual tiddler as a specified ContentType&quot;,
            &quot;text&quot;: &quot;Render an individual tiddler as a specified ContentType, defaults to `text/html` and save it to the specified filename:\n\n```\n--rendertiddler &lt;title&gt; &lt;filename&gt; [&lt;type&gt;]\n```\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the path to the filename are automatically created.\n&quot;
        },
        &quot;$:/language/Help/rendertiddlers&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/rendertiddlers&quot;,
            &quot;description&quot;: &quot;Render tiddlers matching a filter to a specified ContentType&quot;,
            &quot;text&quot;: &quot;Render a set of tiddlers matching a filter to separate files of a specified ContentType (defaults to `text/html`) and extension (defaults to `.html`).\n\n```\n--rendertiddlers &lt;filter&gt; &lt;template&gt; &lt;pathname&gt; [&lt;type&gt;] [&lt;extension&gt;]\n```\n\nFor example:\n\n```\n--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain\n```\n\nBy default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny files in the target directory are deleted. The target directory is recursively created if it is missing.\n&quot;
        },
        &quot;$:/language/Help/savetiddler&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/savetiddler&quot;,
            &quot;description&quot;: &quot;Saves a raw tiddler to a file&quot;,
            &quot;text&quot;: &quot;Saves an individual tiddler in its raw text or binary format to the specified filename. \n\n```\n--savetiddler &lt;title&gt; &lt;filename&gt;\n```\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the path to the filename are automatically created.\n&quot;
        },
        &quot;$:/language/Help/savetiddlers&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/savetiddlers&quot;,
            &quot;description&quot;: &quot;Saves a group of raw tiddlers to a directory&quot;,
            &quot;text&quot;: &quot;Saves a group of tiddlers in their raw text or binary format to the specified directory. \n\n```\n--savetiddlers &lt;filter&gt; &lt;pathname&gt;\n```\n\nBy default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the pathname are automatically created.\n&quot;
        },
        &quot;$:/language/Help/server&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/server&quot;,
            &quot;description&quot;: &quot;Provides an HTTP server interface to TiddlyWiki&quot;,
            &quot;text&quot;: &quot;The server built in to TiddlyWiki5 is very simple. Although compatible with TiddlyWeb it doesn't support many of the features needed for robust Internet-facing usage.\n\nAt the root, it serves a rendering of a specified tiddler. Away from the root, it serves individual tiddlers encoded in JSON, and supports the basic HTTP operations for `GET`, `PUT` and `DELETE`.\n\n```\n--server &lt;port&gt; &lt;roottiddler&gt; &lt;rendertype&gt; &lt;servetype&gt; &lt;username&gt; &lt;password&gt; &lt;host&gt; &lt;pathprefix&gt;\n```\n\nThe parameters are:\n\n* ''port'' - port number to serve from (defaults to \&quot;8080\&quot;)\n* ''roottiddler'' - the tiddler to serve at the root (defaults to \&quot;$:/core/save/all\&quot;) \n* ''rendertype'' - the content type to which the root tiddler should be rendered (defaults to \&quot;text/plain\&quot;)\n* ''servetype'' - the content type with which the root tiddler should be served (defaults to \&quot;text/html\&quot;)\n* ''username'' - the default username for signing edits\n* ''password'' - optional password for basic authentication\n* ''host'' - optional hostname to serve from (defaults to \&quot;127.0.0.1\&quot; aka \&quot;localhost\&quot;)\n* ''pathprefix'' - optional prefix for paths\n\nIf the password parameter is specified then the browser will prompt the user for the username and password. Note that the password is transmitted in plain text so this implementation isn't suitable for general use.\n\nFor example:\n\n```\n--server 8080 $:/core/save/all text/plain text/html MyUserName passw0rd\n```\n\nTo run multiple TiddlyWiki servers at the same time you'll need to put each one on a different port.\n&quot;
        },
        &quot;$:/language/Help/setfield&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/setfield&quot;,
            &quot;description&quot;: &quot;Prepares external tiddlers for use&quot;,
            &quot;text&quot;: &quot;//Note that this command is experimental and may change or be replaced during the TiddlyWiki version 5 beta//\n\nSets the specified field of a group of tiddlers to the result of wikifying a template tiddler with the `currentTiddler` variable set to the tiddler.\n\n```\n--setfield &lt;filter&gt; &lt;fieldname&gt; &lt;templatetitle&gt; &lt;rendertype&gt;\n```\n\nThe parameters are:\n\n* ''filter'' - filter identifying the tiddlers to be affected\n* ''fieldname'' - the field to modify (defaults to \&quot;text\&quot;)\n* ''templatetitle'' - the tiddler to wikify into the specified field. If blank or missing then the specified field is deleted\n* ''type'' - the text type to render (defaults to \&quot;text/plain\&quot;; \&quot;text/html\&quot; can be used to include HTML tags)\n\n&quot;
        },
        &quot;$:/language/Help/verbose&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/verbose&quot;,
            &quot;description&quot;: &quot;Triggers verbose output mode&quot;,
            &quot;text&quot;: &quot;Triggers verbose output, useful for debugging \n\n```\n--verbose\n```\n&quot;
        },
        &quot;$:/language/Help/version&quot;: {
            &quot;title&quot;: &quot;$:/language/Help/version&quot;,
            &quot;description&quot;: &quot;Displays the version number of TiddlyWiki&quot;,
            &quot;text&quot;: &quot;Displays the version number of TiddlyWiki.\n\n```\n--version\n```\n&quot;
        },
        &quot;$:/language/BinaryWarning/Prompt&quot;: {
            &quot;title&quot;: &quot;$:/language/BinaryWarning/Prompt&quot;,
            &quot;text&quot;: &quot;This tiddler contains binary data&quot;
        },
        &quot;$:/language/ClassicWarning/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/ClassicWarning/Hint&quot;,
            &quot;text&quot;: &quot;This tiddler is written in TiddlyWiki Classic wiki text format, which is not fully compatible with TiddlyWiki version 5. See http://tiddlywiki.com/static/Upgrading.html for more details. &quot;
        },
        &quot;$:/language/ClassicWarning/Upgrade/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/ClassicWarning/Upgrade/Caption&quot;,
            &quot;text&quot;: &quot;upgrade&quot;
        },
        &quot;$:/language/CloseAll/Button&quot;: {
            &quot;title&quot;: &quot;$:/language/CloseAll/Button&quot;,
            &quot;text&quot;: &quot;close all&quot;
        },
        &quot;$:/language/ConfirmCancelTiddler&quot;: {
            &quot;title&quot;: &quot;$:/language/ConfirmCancelTiddler&quot;,
            &quot;text&quot;: &quot;Do you wish to discard changes to the tiddler \&quot;&lt;$text text=&lt;&lt;title&gt;&gt;/&gt;\&quot;?&quot;
        },
        &quot;$:/language/ConfirmDeleteTiddler&quot;: {
            &quot;title&quot;: &quot;$:/language/ConfirmDeleteTiddler&quot;,
            &quot;text&quot;: &quot;Do you wish to delete the tiddler \&quot;&lt;$text text=&lt;&lt;title&gt;&gt;/&gt;\&quot;?&quot;
        },
        &quot;$:/language/ConfirmOverwriteTiddler&quot;: {
            &quot;title&quot;: &quot;$:/language/ConfirmOverwriteTiddler&quot;,
            &quot;text&quot;: &quot;Do you wish to overwrite the tiddler \&quot;&lt;$text text=&lt;&lt;title&gt;&gt;/&gt;\&quot;?&quot;
        },
        &quot;$:/language/ConfirmEditShadowTiddler&quot;: {
            &quot;title&quot;: &quot;$:/language/ConfirmEditShadowTiddler&quot;,
            &quot;text&quot;: &quot;You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit \&quot;&lt;$text text=&lt;&lt;title&gt;&gt;/&gt;\&quot;?&quot;
        },
        &quot;$:/language/InvalidFieldName&quot;: {
            &quot;title&quot;: &quot;$:/language/InvalidFieldName&quot;,
            &quot;text&quot;: &quot;Illegal characters in field name \&quot;&lt;$text text=&lt;&lt;fieldName&gt;&gt;/&gt;\&quot;. Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`)&quot;
        },
        &quot;$:/language/MissingTiddler/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/MissingTiddler/Hint&quot;,
            &quot;text&quot;: &quot;Missing tiddler \&quot;&lt;$text text=&lt;&lt;currentTiddler&gt;&gt;/&gt;\&quot; - click {{$:/core/images/edit-button}} to create&quot;
        },
        &quot;$:/language/RecentChanges/DateFormat&quot;: {
            &quot;title&quot;: &quot;$:/language/RecentChanges/DateFormat&quot;,
            &quot;text&quot;: &quot;DDth MMM YYYY&quot;
        },
        &quot;$:/language/RelativeDate/Future/Days&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Future/Days&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; days from now&quot;
        },
        &quot;$:/language/RelativeDate/Future/Hours&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Future/Hours&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; hours from now&quot;
        },
        &quot;$:/language/RelativeDate/Future/Minutes&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Future/Minutes&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; minutes from now&quot;
        },
        &quot;$:/language/RelativeDate/Future/Months&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Future/Months&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; months from now&quot;
        },
        &quot;$:/language/RelativeDate/Future/Second&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Future/Second&quot;,
            &quot;text&quot;: &quot;1 second from now&quot;
        },
        &quot;$:/language/RelativeDate/Future/Seconds&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Future/Seconds&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; seconds from now&quot;
        },
        &quot;$:/language/RelativeDate/Future/Years&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Future/Years&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; years from now&quot;
        },
        &quot;$:/language/RelativeDate/Past/Days&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Past/Days&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; days ago&quot;
        },
        &quot;$:/language/RelativeDate/Past/Hours&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Past/Hours&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; hours ago&quot;
        },
        &quot;$:/language/RelativeDate/Past/Minutes&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Past/Minutes&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; minutes ago&quot;
        },
        &quot;$:/language/RelativeDate/Past/Months&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Past/Months&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; months ago&quot;
        },
        &quot;$:/language/RelativeDate/Past/Second&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Past/Second&quot;,
            &quot;text&quot;: &quot;1 second ago&quot;
        },
        &quot;$:/language/RelativeDate/Past/Seconds&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Past/Seconds&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; seconds ago&quot;
        },
        &quot;$:/language/RelativeDate/Past/Years&quot;: {
            &quot;title&quot;: &quot;$:/language/RelativeDate/Past/Years&quot;,
            &quot;text&quot;: &quot;&lt;&lt;period&gt;&gt; years ago&quot;
        },
        &quot;$:/language/SystemTiddler/Tooltip&quot;: {
            &quot;title&quot;: &quot;$:/language/SystemTiddler/Tooltip&quot;,
            &quot;text&quot;: &quot;This is a system tiddler&quot;
        },
        &quot;$:/language/TagManager/Colour/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/TagManager/Colour/Heading&quot;,
            &quot;text&quot;: &quot;Colour&quot;
        },
        &quot;$:/language/TagManager/Count/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/TagManager/Count/Heading&quot;,
            &quot;text&quot;: &quot;Count&quot;
        },
        &quot;$:/language/TagManager/Icon/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/TagManager/Icon/Heading&quot;,
            &quot;text&quot;: &quot;Icon&quot;
        },
        &quot;$:/language/TagManager/Tag/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/TagManager/Tag/Heading&quot;,
            &quot;text&quot;: &quot;Tag&quot;
        },
        &quot;$:/language/Modals/Download&quot;: {
            &quot;title&quot;: &quot;$:/language/Modals/Download&quot;,
            &quot;type&quot;: &quot;text/vnd.tiddlywiki&quot;,
            &quot;subtitle&quot;: &quot;Download changes&quot;,
            &quot;footer&quot;: &quot;&lt;$button message=\&quot;tw-close-tiddler\&quot; class=\&quot;btn btn-primary\&quot;&gt;Close&lt;/$button&gt;&quot;,
            &quot;help&quot;: &quot;http://tiddlywiki.com/static/DownloadingChanges.html&quot;,
            &quot;text&quot;: &quot;Your browser only supports manual saving.\n\nTo save your modified wiki, right click on the download link below and select \&quot;Download file\&quot; or \&quot;Save file\&quot;, and then choose the folder and filename.\n\n//You can marginally speed things up by clicking the link with the control key (Windows) or the options/alt key (Mac OS X). You will not be prompted for the folder or filename, but your browser is likely to give it an unrecognisable name -- you may need to rename the file to include an `.html` extension before you can do anything useful with it.//\n\nOn smartphones that do not allow files to be downloaded you can instead bookmark the link, and then sync your bookmarks to a desktop computer from where the wiki can be saved normally.\n&quot;
        },
        &quot;$:/language/Modals/SaveInstructions&quot;: {
            &quot;title&quot;: &quot;$:/language/Modals/SaveInstructions&quot;,
            &quot;type&quot;: &quot;text/vnd.tiddlywiki&quot;,
            &quot;subtitle&quot;: &quot;Save your work&quot;,
            &quot;footer&quot;: &quot;&lt;$button message=\&quot;tw-close-tiddler\&quot; class=\&quot;btn btn-primary\&quot;&gt;Close&lt;/$button&gt;&quot;,
            &quot;help&quot;: &quot;http://tiddlywiki.com/static/SavingChanges.html&quot;,
            &quot;text&quot;: &quot;Your changes to this wiki need to be saved as a ~TiddlyWiki HTML file.\n\n!!! Desktop browsers\n\n# Select ''Save As'' from the ''File'' menu\n# Choose a filename and location\n#* Some browsers also require you to explicitly specify the file saving format as ''Webpage, HTML only'' or similar\n# Close this tab\n\n!!! Smartphone browsers\n\n# Create a bookmark to this page\n#* If you've got iCloud or Google Sync set up then the bookmark will automatically sync to your desktop where you can open it and save it as above\n# Close this tab\n\n//If you open the bookmark again in Mobile Safari you will see this message again. If you want to go ahead and use the file, just click the ''close'' button below//\n&quot;
        },
        &quot;$:/language/Notifications/Save/Done&quot;: {
            &quot;title&quot;: &quot;$:/language/Notifications/Save/Done&quot;,
            &quot;text&quot;: &quot;Saved wiki&quot;
        },
        &quot;$:/language/Notifications/Save/Starting&quot;: {
            &quot;title&quot;: &quot;$:/language/Notifications/Save/Starting&quot;,
            &quot;text&quot;: &quot;Starting to save wiki&quot;
        },
        &quot;$:/language/Search/Filter/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Filter/Caption&quot;,
            &quot;text&quot;: &quot;Filter&quot;
        },
        &quot;$:/language/Search/Filter/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Filter/Hint&quot;,
            &quot;text&quot;: &quot;Search via a [[filter expression|http://tiddlywiki.com/static/TiddlerFilters.html]]&quot;
        },
        &quot;$:/language/Search/Filter/Matches&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Filter/Matches&quot;,
            &quot;text&quot;: &quot;//&lt;small&gt;&lt;$count filter={{$:/temp/advancedsearch}}/&gt; matches&lt;/small&gt;//&quot;
        },
        &quot;$:/language/Search/Matches&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Matches&quot;,
            &quot;text&quot;: &quot;//&lt;small&gt;&lt;$count filter=\&quot;[!is[system]search{$:/temp/search}]\&quot;/&gt; matches&lt;/small&gt;//&quot;
        },
        &quot;$:/language/Search/Shadows/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Shadows/Caption&quot;,
            &quot;text&quot;: &quot;Shadows&quot;
        },
        &quot;$:/language/Search/Shadows/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Shadows/Hint&quot;,
            &quot;text&quot;: &quot;Search for shadow tiddlers&quot;
        },
        &quot;$:/language/Search/Shadows/Matches&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Shadows/Matches&quot;,
            &quot;text&quot;: &quot;//&lt;small&gt;&lt;$count filter=\&quot;[all[shadows]search{$:/temp/advancedsearch}]\&quot;/&gt; matches&lt;/small&gt;//&quot;
        },
        &quot;$:/language/Search/Standard/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Standard/Caption&quot;,
            &quot;text&quot;: &quot;Standard&quot;
        },
        &quot;$:/language/Search/Standard/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Standard/Hint&quot;,
            &quot;text&quot;: &quot;Search for standard tiddlers&quot;
        },
        &quot;$:/language/Search/Standard/Matches&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/Standard/Matches&quot;,
            &quot;text&quot;: &quot;//&lt;small&gt;&lt;$count filter=\&quot;[!is[system]search{$:/temp/advancedsearch}]\&quot;/&gt; matches&lt;/small&gt;//&quot;
        },
        &quot;$:/language/Search/System/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/System/Caption&quot;,
            &quot;text&quot;: &quot;System&quot;
        },
        &quot;$:/language/Search/System/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/System/Hint&quot;,
            &quot;text&quot;: &quot;Search for system tiddlers&quot;
        },
        &quot;$:/language/Search/System/Matches&quot;: {
            &quot;title&quot;: &quot;$:/language/Search/System/Matches&quot;,
            &quot;text&quot;: &quot;//&lt;small&gt;&lt;$count filter=\&quot;[is[system]search{$:/temp/advancedsearch}]\&quot;/&gt; matches&lt;/small&gt;//&quot;
        },
        &quot;$:/language/SideBar/All/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/All/Caption&quot;,
            &quot;text&quot;: &quot;All&quot;
        },
        &quot;$:/language/SideBar/Contents/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Contents/Caption&quot;,
            &quot;text&quot;: &quot;Contents&quot;
        },
        &quot;$:/language/SideBar/Drafts/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Drafts/Caption&quot;,
            &quot;text&quot;: &quot;Drafts&quot;
        },
        &quot;$:/language/SideBar/Missing/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Missing/Caption&quot;,
            &quot;text&quot;: &quot;Missing&quot;
        },
        &quot;$:/language/SideBar/More/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/More/Caption&quot;,
            &quot;text&quot;: &quot;More&quot;
        },
        &quot;$:/language/SideBar/Open/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Open/Caption&quot;,
            &quot;text&quot;: &quot;Open&quot;
        },
        &quot;$:/language/SideBar/Orphans/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Orphans/Caption&quot;,
            &quot;text&quot;: &quot;Orphans&quot;
        },
        &quot;$:/language/SideBar/Recent/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Recent/Caption&quot;,
            &quot;text&quot;: &quot;Recent&quot;
        },
        &quot;$:/language/SideBar/Shadows/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Shadows/Caption&quot;,
            &quot;text&quot;: &quot;Shadows&quot;
        },
        &quot;$:/language/SideBar/System/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/System/Caption&quot;,
            &quot;text&quot;: &quot;System&quot;
        },
        &quot;$:/language/SideBar/Tags/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Tags/Caption&quot;,
            &quot;text&quot;: &quot;Tags&quot;
        },
        &quot;$:/language/SideBar/Tags/TagManager/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Tags/TagManager/Caption&quot;,
            &quot;text&quot;: &quot;Tag Manager&quot;
        },
        &quot;$:/language/SideBar/Tags/Untagged/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Tags/Untagged/Caption&quot;,
            &quot;text&quot;: &quot;untagged&quot;
        },
        &quot;$:/language/SideBar/Tools/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Tools/Caption&quot;,
            &quot;text&quot;: &quot;Tools&quot;
        },
        &quot;$:/language/SideBar/Types/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/SideBar/Types/Caption&quot;,
            &quot;text&quot;: &quot;Types&quot;
        },
        &quot;$:/SiteSubtitle&quot;: {
            &quot;title&quot;: &quot;$:/SiteSubtitle&quot;,
            &quot;text&quot;: &quot;a non-linear personal web notebook&quot;
        },
        &quot;$:/SiteTitle&quot;: {
            &quot;title&quot;: &quot;$:/SiteTitle&quot;,
            &quot;text&quot;: &quot;My ~TiddlyWiki&quot;
        },
        &quot;$:/language/TiddlerInfo/Advanced/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Advanced/Caption&quot;,
            &quot;text&quot;: &quot;Advanced&quot;
        },
        &quot;$:/language/TiddlerInfo/Advanced/PluginInfo/Empty/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Advanced/PluginInfo/Empty/Hint&quot;,
            &quot;text&quot;: &quot;none&quot;
        },
        &quot;$:/language/TiddlerInfo/Advanced/PluginInfo/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Advanced/PluginInfo/Heading&quot;,
            &quot;text&quot;: &quot;Plugin Details&quot;
        },
        &quot;$:/language/TiddlerInfo/Advanced/PluginInfo/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Advanced/PluginInfo/Hint&quot;,
            &quot;text&quot;: &quot;This plugin contains the following shadow tiddlers:&quot;
        },
        &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/Heading&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/Heading&quot;,
            &quot;text&quot;: &quot;Shadow Status&quot;
        },
        &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/NotShadow/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/NotShadow/Hint&quot;,
            &quot;text&quot;: &quot;The tiddler &lt;$link to=&lt;&lt;infoTiddler&gt;&gt;&gt;&lt;$text text=&lt;&lt;infoTiddler&gt;&gt;/&gt;&lt;/$link&gt; is not a shadow tiddler&quot;
        },
        &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Hint&quot;,
            &quot;text&quot;: &quot;The tiddler &lt;$link to=&lt;&lt;infoTiddler&gt;&gt;&gt;&lt;$text text=&lt;&lt;infoTiddler&gt;&gt;/&gt;&lt;/$link&gt; is a shadow tiddler&quot;
        },
        &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Source&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Source&quot;,
            &quot;text&quot;: &quot;It is defined in the plugin &lt;$link to=&lt;&lt;pluginTiddler&gt;&gt;&gt;&lt;$text text=&lt;&lt;pluginTiddler&gt;&gt;/&gt;&lt;/$link&gt;&quot;
        },
        &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/OverriddenShadow/Hint&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Advanced/ShadowInfo/OverriddenShadow/Hint&quot;,
            &quot;text&quot;: &quot;It is overridden by an ordinary tiddler&quot;
        },
        &quot;$:/language/TiddlerInfo/Fields/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Fields/Caption&quot;,
            &quot;text&quot;: &quot;Fields&quot;
        },
        &quot;$:/language/TiddlerInfo/List/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/List/Caption&quot;,
            &quot;text&quot;: &quot;List&quot;
        },
        &quot;$:/language/TiddlerInfo/List/Empty&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/List/Empty&quot;,
            &quot;text&quot;: &quot;This tiddler does not have a list&quot;
        },
        &quot;$:/language/TiddlerInfo/Listed/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Listed/Caption&quot;,
            &quot;text&quot;: &quot;Listed&quot;
        },
        &quot;$:/language/TiddlerInfo/Listed/Empty&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Listed/Empty&quot;,
            &quot;text&quot;: &quot;This tiddler is not listed by any others&quot;
        },
        &quot;$:/language/TiddlerInfo/References/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/References/Caption&quot;,
            &quot;text&quot;: &quot;References&quot;
        },
        &quot;$:/language/TiddlerInfo/References/Empty&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/References/Empty&quot;,
            &quot;text&quot;: &quot;No tiddlers link to this one&quot;
        },
        &quot;$:/language/TiddlerInfo/Tagging/Caption&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Tagging/Caption&quot;,
            &quot;text&quot;: &quot;Tagging&quot;
        },
        &quot;$:/language/TiddlerInfo/Tagging/Empty&quot;: {
            &quot;title&quot;: &quot;$:/language/TiddlerInfo/Tagging/Empty&quot;,
            &quot;text&quot;: &quot;No tiddlers are tagged with this one&quot;
        },
        &quot;$:/language/Docs/Types/application/javascript&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/application/javascript&quot;,
            &quot;description&quot;: &quot;JavaScript code&quot;,
            &quot;name&quot;: &quot;application/javascript&quot;,
            &quot;group&quot;: &quot;Developer&quot;
        },
        &quot;$:/language/Docs/Types/application/json&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/application/json&quot;,
            &quot;description&quot;: &quot;JSON data&quot;,
            &quot;name&quot;: &quot;application/json&quot;,
            &quot;group&quot;: &quot;Developer&quot;
        },
        &quot;$:/language/Docs/Types/application/x-tiddler-dictionary&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/application/x-tiddler-dictionary&quot;,
            &quot;description&quot;: &quot;Data dictionary&quot;,
            &quot;name&quot;: &quot;application/x-tiddler-dictionary&quot;,
            &quot;group&quot;: &quot;Developer&quot;
        },
        &quot;$:/language/Docs/Types/image/gif&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/image/gif&quot;,
            &quot;description&quot;: &quot;GIF image&quot;,
            &quot;name&quot;: &quot;image/gif&quot;,
            &quot;group&quot;: &quot;Image&quot;
        },
        &quot;$:/language/Docs/Types/image/jpeg&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/image/jpeg&quot;,
            &quot;description&quot;: &quot;JPEG image&quot;,
            &quot;name&quot;: &quot;image/jpeg&quot;,
            &quot;group&quot;: &quot;Image&quot;
        },
        &quot;$:/language/Docs/Types/image/png&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/image/png&quot;,
            &quot;description&quot;: &quot;PNG image&quot;,
            &quot;name&quot;: &quot;image/png&quot;,
            &quot;group&quot;: &quot;Image&quot;
        },
        &quot;$:/language/Docs/Types/image/svg+xml&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/image/svg+xml&quot;,
            &quot;description&quot;: &quot;Structured Vector Graphics image&quot;,
            &quot;name&quot;: &quot;image/svg+xml&quot;,
            &quot;group&quot;: &quot;Image&quot;
        },
        &quot;$:/language/Docs/Types/image/x-icon&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/image/x-icon&quot;,
            &quot;description&quot;: &quot;ICO format icon file&quot;,
            &quot;name&quot;: &quot;image/x-icon&quot;,
            &quot;group&quot;: &quot;Image&quot;
        },
        &quot;$:/language/Docs/Types/text/css&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/text/css&quot;,
            &quot;description&quot;: &quot;Static stylesheet&quot;,
            &quot;name&quot;: &quot;text/css&quot;,
            &quot;group&quot;: &quot;Developer&quot;
        },
        &quot;$:/language/Docs/Types/text/html&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/text/html&quot;,
            &quot;description&quot;: &quot;HTML markup&quot;,
            &quot;name&quot;: &quot;text/html&quot;,
            &quot;group&quot;: &quot;Text&quot;
        },
        &quot;$:/language/Docs/Types/text/plain&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/text/plain&quot;,
            &quot;description&quot;: &quot;Plain text&quot;,
            &quot;name&quot;: &quot;text/plain&quot;,
            &quot;group&quot;: &quot;Text&quot;
        },
        &quot;$:/language/Docs/Types/text/vnd.tiddlywiki&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/text/vnd.tiddlywiki&quot;,
            &quot;description&quot;: &quot;TiddlyWiki 5&quot;,
            &quot;name&quot;: &quot;text/vnd.tiddlywiki&quot;,
            &quot;group&quot;: &quot;Text&quot;
        },
        &quot;$:/language/Docs/Types/text/x-tiddlywiki&quot;: {
            &quot;title&quot;: &quot;$:/language/Docs/Types/text/x-tiddlywiki&quot;,
            &quot;description&quot;: &quot;TiddlyWiki Classic&quot;,
            &quot;name&quot;: &quot;text/x-tiddlywiki&quot;,
            &quot;group&quot;: &quot;Text&quot;
        },
        &quot;$:/languages/en-GB&quot;: {
            &quot;title&quot;: &quot;$:/languages/en-GB&quot;,
            &quot;name&quot;: &quot;en-GB&quot;,
            &quot;description&quot;: &quot;English (British)&quot;,
            &quot;author&quot;: &quot;JeremyRuston&quot;,
            &quot;core-version&quot;: &quot;&gt;=5.0.0\&quot;&quot;,
            &quot;text&quot;: &quot;Stub pseudo-plugin for the default language&quot;
        },
        &quot;$:/core/modules/commander.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commander.js\ntype: application/javascript\nmodule-type: global\n\nThe $tw.Commander class is a command interpreter\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nParse a sequence of commands\n\tcommandTokens: an array of command string tokens\n\twiki: reference to the wiki store object\n\tstreams: {output:, error:}, each of which has a write(string) method\n\tcallback: a callback invoked as callback(err) where err is null if there was no error\n*/\nvar Commander = function(commandTokens,callback,wiki,streams) {\n\tvar path = require(\&quot;path\&quot;);\n\tthis.commandTokens = commandTokens;\n\tthis.nextToken = 0;\n\tthis.callback = callback;\n\tthis.wiki = wiki;\n\tthis.streams = streams;\n\tthis.outputPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiOutputSubDir);\n};\n\n/*\nAdd a string of tokens to the command queue\n*/\nCommander.prototype.addCommandTokens = function(commandTokens) {\n\tArray.prototype.push.apply(this.commandTokens,commandTokens);\n};\n\n/*\nExecute the sequence of commands and invoke a callback on completion\n*/\nCommander.prototype.execute = function() {\n\tthis.executeNextCommand();\n};\n\n/*\nExecute the next command in the sequence\n*/\nCommander.prototype.executeNextCommand = function() {\n\tvar self = this;\n\t// Invoke the callback if there are no more commands\n\tif(this.nextToken &gt;= this.commandTokens.length) {\n\t\tthis.callback(null);\n\t} else {\n\t\t// Get and check the command token\n\t\tvar commandName = this.commandTokens[this.nextToken++];\n\t\tif(commandName.substr(0,2) !== \&quot;--\&quot;) {\n\t\t\tthis.callback(\&quot;Missing command\&quot;);\n\t\t} else {\n\t\t\tcommandName = commandName.substr(2); // Trim off the --\n\t\t\t// Accumulate the parameters to the command\n\t\t\tvar params = [];\n\t\t\twhile(this.nextToken &lt; this.commandTokens.length &amp;&amp; \n\t\t\t\tthis.commandTokens[this.nextToken].substr(0,2) !== \&quot;--\&quot;) {\n\t\t\t\tparams.push(this.commandTokens[this.nextToken++]);\n\t\t\t}\n\t\t\t// Get the command info\n\t\t\tvar command = $tw.commands[commandName],\n\t\t\t\tc,err;\n\t\t\tif(!command) {\n\t\t\t\tthis.callback(\&quot;Unknown command: \&quot; + commandName);\n\t\t\t} else {\n\t\t\t\tif(this.verbose) {\n\t\t\t\t\tthis.streams.output.write(\&quot;Executing command: \&quot; + commandName + \&quot; \&quot; + params.join(\&quot; \&quot;) + \&quot;\\n\&quot;);\n\t\t\t\t}\n\t\t\t\tif(command.info.synchronous) {\n\t\t\t\t\t// Synchronous command\n\t\t\t\t\tc = new command.Command(params,this);\n\t\t\t\t\terr = c.execute();\n\t\t\t\t\tif(err) {\n\t\t\t\t\t\tthis.callback(err);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.executeNextCommand();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Asynchronous command\n\t\t\t\t\tc = new command.Command(params,this,function(err) {\n\t\t\t\t\t\tif(err) {\n\t\t\t\t\t\t\tself.callback(err);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself.executeNextCommand();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\terr = c.execute();\n\t\t\t\t\tif(err) {\n\t\t\t\t\t\tthis.callback(err);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nCommander.initCommands = function(moduleType) {\n\tmoduleType = moduleType || \&quot;command\&quot;;\n\t$tw.commands = {};\n\t$tw.modules.forEachModuleOfType(moduleType,function(title,module) {\n\t\tvar c = $tw.commands[module.info.name] = {};\n\t\t// Add the methods defined by the module\n\t\tfor(var f in module) {\n\t\t\tif($tw.utils.hop(module,f)) {\n\t\t\t\tc[f] = module[f];\n\t\t\t}\n\t\t}\n\t});\n};\n\nexports.Commander = Commander;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commander.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;global&quot;
        },
        &quot;$:/core/modules/commands/build.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/build.js\ntype: application/javascript\nmodule-type: command\n\nCommand to build a build target\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;build\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\t// Get the build targets defined in the wiki\n\tvar buildTargets = $tw.boot.wikiInfo.build;\n\tif(!buildTargets) {\n\t\treturn \&quot;No build targets defined\&quot;\n\t}\n\t// Loop through each of the specified targets\n\tvar targets;\n\tif(this.params.length &gt; 0) {\n\t\ttargets = this.params;\n\t} else {\n\t\ttargets = Object.keys(buildTargets);\n\t}\n\tfor(var targetIndex=0; targetIndex&lt;targets.length; targetIndex++) {\n\t\tvar target = targets[targetIndex],\n\t\t\tcommands = buildTargets[target];\n\t\tif(!commands) {\n\t\t\treturn \&quot;Build target '\&quot; + target + \&quot;' not found\&quot;;\n\t\t}\n\t\t// Add the commands to the queue\n\t\tthis.commander.addCommandTokens(commands);\n\t}\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/build.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/clearpassword.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/clearpassword.js\ntype: application/javascript\nmodule-type: command\n\nClear password for crypto operations\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;clearpassword\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\t$tw.crypto.setPassword(null);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/clearpassword.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/help.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/help.js\ntype: application/javascript\nmodule-type: command\n\nHelp command\n\n\\*/\n(function(){\n\n/*jshint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;help\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tvar subhelp = this.params[0] || \&quot;default\&quot;,\n\t\thelpBase = \&quot;$:/language/Help/\&quot;,\n\t\ttext;\n\tif(!this.commander.wiki.getTiddler(helpBase + subhelp)) {\n\t\tsubhelp = \&quot;notfound\&quot;;\n\t}\n\t// Wikify the help as formatted text (ie block elements generate newlines)\n\ttext = this.commander.wiki.renderTiddler(\&quot;text/plain-formatted\&quot;,helpBase + subhelp);\n\t// Remove any leading linebreaks\n\ttext = text.replace(/^(\\r?\\n)*/g,\&quot;\&quot;);\n\tthis.commander.streams.output.write(text);\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/help.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/init.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/init.js\ntype: application/javascript\nmodule-type: command\n\nCommand to initialise an empty wiki folder\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;init\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tvar fs = require(\&quot;fs\&quot;),\n\t\tpath = require(\&quot;path\&quot;);\n\t// Check that we don't already have a valid wiki folder\n\tif($tw.boot.wikiTiddlersPath) {\n\t\treturn \&quot;Wiki folder is not empty\&quot;;\n\t}\n\t// Loop through each of the specified editions\n\tvar editions = this.params.length &gt; 0 ? this.params : [\&quot;empty\&quot;];\n\tfor(var editionIndex=0; editionIndex&lt;editions.length; editionIndex++) {\n\t\tvar editionName = editions[editionIndex];\n\t\t// Check the edition exists\n\t\tvar editionPath = $tw.findLibraryItem(editionName,$tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar));\n\t\tif(!$tw.utils.isDirectory(editionPath)) {\n\t\t\treturn \&quot;Edition '\&quot; + editionName + \&quot;' not found\&quot;;\n\t\t}\n\t\t// Copy the edition content\n\t\tvar err = $tw.utils.copyDirectory(editionPath,$tw.boot.wikiPath);\n\t\tif(!err) {\n\t\t\tthis.commander.streams.output.write(\&quot;Copied edition '\&quot; + editionName + \&quot;' to \&quot; + $tw.boot.wikiPath + \&quot;\\n\&quot;);\n\t\t} else {\n\t\t\treturn err;\n\t\t}\n\t}\n\t// Tweak the tiddlywiki.info to remove any included wikis\n\tvar packagePath = $tw.boot.wikiPath + \&quot;/tiddlywiki.info\&quot;,\n\t\tpackageJson = JSON.parse(fs.readFileSync(packagePath));\n\tdelete packageJson.includeWikis;\n\tfs.writeFileSync(packagePath,JSON.stringify(packageJson,null,$tw.config.preferences.jsonSpaces));\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/init.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/load.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/load.js\ntype: application/javascript\nmodule-type: command\n\nCommand to load tiddlers from a file\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;load\&quot;,\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tvar self = this,\n\t\tfs = require(\&quot;fs\&quot;),\n\t\tpath = require(\&quot;path\&quot;);\n\tif(this.params.length &lt; 1) {\n\t\treturn \&quot;Missing filename\&quot;;\n\t}\n\tvar ext = path.extname(self.params[0]);\n\tfs.readFile(this.params[0],$tw.utils.getTypeEncoding(ext),function(err,data) {\n\t\tif (err) {\n\t\t\tself.callback(err);\n\t\t} else {\n\t\t\tvar fields = {title: self.params[0]},\n\t\t\t\ttype = path.extname(self.params[0]);\n\t\t\tvar tiddlers = self.commander.wiki.deserializeTiddlers(type,data,fields);\n\t\t\tif(!tiddlers) {\n\t\t\t\tself.callback(\&quot;No tiddlers found in file \\\&quot;\&quot; + self.params[0] + \&quot;\\\&quot;\&quot;);\n\t\t\t} else {\n\t\t\t\tfor(var t=0; t&lt;tiddlers.length; t++) {\n\t\t\t\t\tself.commander.wiki.importTiddler(new $tw.Tiddler(tiddlers[t]));\n\t\t\t\t}\n\t\t\t\tself.callback(null);\t\n\t\t\t}\n\t\t}\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/load.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/output.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/output.js\ntype: application/javascript\nmodule-type: command\n\nCommand to set the default output location (defaults to current working directory)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;output\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tvar fs = require(\&quot;fs\&quot;),\n\t\tpath = require(\&quot;path\&quot;);\n\tif(this.params.length &lt; 1) {\n\t\treturn \&quot;Missing output path\&quot;;\n\t}\n\tthis.commander.outputPath = path.resolve(process.cwd(),this.params[0]);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/output.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/password.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/password.js\ntype: application/javascript\nmodule-type: command\n\nSave password for crypto operations\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;password\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length &lt; 1) {\n\t\treturn \&quot;Missing password\&quot;;\n\t}\n\t$tw.crypto.setPassword(this.params[0]);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/password.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/rendertiddler.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/rendertiddler.js\ntype: application/javascript\nmodule-type: command\n\nCommand to render a tiddler and save it to a file\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;rendertiddler\&quot;,\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length &lt; 2) {\n\t\treturn \&quot;Missing filename\&quot;;\n\t}\n\tvar self = this,\n\t\tfs = require(\&quot;fs\&quot;),\n\t\tpath = require(\&quot;path\&quot;),\n\t\ttitle = this.params[0],\n\t\tfilename = path.resolve(this.commander.outputPath,this.params[1]),\n\t\ttype = this.params[2] || \&quot;text/html\&quot;;\n\t$tw.utils.createFileDirectories(filename);\n\tfs.writeFile(filename,this.commander.wiki.renderTiddler(type,title),\&quot;utf8\&quot;,function(err) {\n\t\tself.callback(err);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/rendertiddler.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/rendertiddlers.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/rendertiddlers.js\ntype: application/javascript\nmodule-type: command\n\nCommand to render several tiddlers to a folder of files\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;);\n\nexports.info = {\n\tname: \&quot;rendertiddlers\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length &lt; 2) {\n\t\treturn \&quot;Missing filename\&quot;;\n\t}\n\tvar self = this,\n\t\tfs = require(\&quot;fs\&quot;),\n\t\tpath = require(\&quot;path\&quot;),\n\t\twiki = this.commander.wiki,\n\t\tfilter = this.params[0],\n\t\ttemplate = this.params[1],\n\t\tpathname = path.resolve(this.commander.outputPath,this.params[2]),\n\t\ttype = this.params[3] || \&quot;text/html\&quot;,\n\t\textension = this.params[4] || \&quot;.html\&quot;,\n\t\ttiddlers = wiki.filterTiddlers(filter);\n\t$tw.utils.deleteDirectory(pathname);\n\t$tw.utils.createDirectory(pathname);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar parser = wiki.parseTiddler(template),\n\t\t\twidgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});\n\t\tvar container = $tw.fakeDocument.createElement(\&quot;div\&quot;);\n\t\twidgetNode.render(container,null);\n\t\tvar text = type === \&quot;text/html\&quot; ? container.innerHTML : container.textContent;\n\t\tfs.writeFileSync(path.resolve(pathname,encodeURIComponent(title) + extension),text,\&quot;utf8\&quot;);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/rendertiddlers.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/savetiddler.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/savetiddler.js\ntype: application/javascript\nmodule-type: command\n\nCommand to save the content of a tiddler to a file\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;savetiddler\&quot;,\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length &lt; 2) {\n\t\treturn \&quot;Missing filename\&quot;;\n\t}\n\tvar self = this,\n\t\tfs = require(\&quot;fs\&quot;),\n\t\tpath = require(\&quot;path\&quot;),\n\t\ttitle = this.params[0],\n\t\tfilename = path.resolve(this.commander.outputPath,this.params[1]),\n\t\ttiddler = this.commander.wiki.getTiddler(title),\n\t\ttype = tiddler.fields.type || \&quot;text/vnd.tiddlywiki\&quot;,\n\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \&quot;utf8\&quot;};\n\t$tw.utils.createFileDirectories(filename);\n\tfs.writeFile(filename,tiddler.fields.text,contentTypeInfo.encoding,function(err) {\n\t\tself.callback(err);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/savetiddler.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/savetiddlers.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/savetiddlers.js\ntype: application/javascript\nmodule-type: command\n\nCommand to save several tiddlers to a folder of files\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;);\n\nexports.info = {\n\tname: \&quot;savetiddlers\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length &lt; 1) {\n\t\treturn \&quot;Missing filename\&quot;;\n\t}\n\tvar self = this,\n\t\tfs = require(\&quot;fs\&quot;),\n\t\tpath = require(\&quot;path\&quot;),\n\t\twiki = this.commander.wiki,\n\t\tfilter = this.params[0],\n\t\tpathname = path.resolve(this.commander.outputPath,this.params[1]),\n\t\ttiddlers = wiki.filterTiddlers(filter);\n\t$tw.utils.deleteDirectory(pathname);\n\t$tw.utils.createDirectory(pathname);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.commander.wiki.getTiddler(title),\n\t\t\ttype = tiddler.fields.type || \&quot;text/vnd.tiddlywiki\&quot;,\n\t\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \&quot;utf8\&quot;},\n\t\t\tfilename = path.resolve(pathname,encodeURIComponent(title));\n\t\tfs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/savetiddlers.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/server.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/server.js\ntype: application/javascript\nmodule-type: command\n\nServe tiddlers over http\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nif(!$tw.browser) {\n\tvar util = require(\&quot;util\&quot;),\n\t\tfs = require(\&quot;fs\&quot;),\n\t\turl = require(\&quot;url\&quot;),\n\t\tpath = require(\&quot;path\&quot;),\n\t\thttp = require(\&quot;http\&quot;);\t\n}\n\nexports.info = {\n\tname: \&quot;server\&quot;,\n\tsynchronous: true\n};\n\n/*\nA simple HTTP server with regexp-based routes\n*/\nfunction SimpleServer(options) {\n\tthis.routes = options.routes || [];\n\tthis.wiki = options.wiki;\n\tthis.variables = options.variables || {};\n}\n\nSimpleServer.prototype.set = function(obj) {\n\tvar self = this;\n\t$tw.utils.each(obj,function(value,name) {\n\t\tself.variables[name] = value;\n\t});\n};\n\nSimpleServer.prototype.get = function(name) {\n\treturn this.variables[name];\n};\n\nSimpleServer.prototype.addRoute = function(route) {\n\tthis.routes.push(route);\n};\n\nSimpleServer.prototype.findMatchingRoute = function(request,state) {\n\tvar pathprefix = this.get(\&quot;pathprefix\&quot;) || \&quot;\&quot;;\n\tfor(var t=0; t&lt;this.routes.length; t++) {\n\t\tvar potentialRoute = this.routes[t],\n\t\t\tpathRegExp = potentialRoute.path,\n\t\t\tpathname = state.urlInfo.pathname,\n\t\t\tmatch;\n\t\tif(pathprefix) {\n\t\t\tif(pathname.substr(0,pathprefix.length) === pathprefix) {\n\t\t\t\tpathname = pathname.substr(pathprefix.length);\n\t\t\t\tmatch = potentialRoute.path.exec(pathname);\n\t\t\t} else {\n\t\t\t\tmatch = false;\n\t\t\t}\n\t\t} else {\n\t\t\tmatch = potentialRoute.path.exec(pathname);\n\t\t}\n\t\tif(match &amp;&amp; request.method === potentialRoute.method) {\n\t\t\tstate.params = [];\n\t\t\tfor(var p=1; p&lt;match.length; p++) {\n\t\t\t\tstate.params.push(match[p]);\n\t\t\t}\n\t\t\treturn potentialRoute;\n\t\t}\n\t}\n\treturn null;\n};\n\nSimpleServer.prototype.checkCredentials = function(request,incomingUsername,incomingPassword) {\n\tvar header = request.headers[\&quot;authorization\&quot;] || \&quot;\&quot;,\n\t\ttoken = header.split(/\\s+/).pop() || \&quot;\&quot;,\n\t\tauth = $tw.utils.base64Decode(token),\n\t\tparts = auth.split(/:/),\n\t\tusername = parts[0],\n\t\tpassword = parts[1];\n\tif(incomingUsername === username &amp;&amp; incomingPassword === password) {\n\t\treturn \&quot;ALLOWED\&quot;;\n\t} else {\n\t\treturn \&quot;DENIED\&quot;;\n\t}\n}\n\nSimpleServer.prototype.listen = function(port,host) {\n\tvar self = this;\n\thttp.createServer(function(request,response) {\n\t\t// Compose the state object\n\t\tvar state = {};\n\t\tstate.wiki = self.wiki;\n\t\tstate.server = self;\n\t\tstate.urlInfo = url.parse(request.url);\n\t\t// Find the route that matches this path\n\t\tvar route = self.findMatchingRoute(request,state);\n\t\t// Check for the username and password if we've got one\n\t\tvar username = self.get(\&quot;username\&quot;),\n\t\t\tpassword = self.get(\&quot;password\&quot;);\n\t\tif(username &amp;&amp; password) {\n\t\t\t// Check they match\n\t\t\tif(self.checkCredentials(request,username,password) !== \&quot;ALLOWED\&quot;) {\n\t\t\t\tvar servername = state.wiki.getTiddlerText(\&quot;$:/SiteTitle\&quot;) || \&quot;TiddlyWiki5\&quot;;\n\t\t\t\tresponse.writeHead(401,\&quot;Authentication required\&quot;,{\n\t\t\t\t\t\&quot;WWW-Authenticate\&quot;: 'Basic realm=\&quot;Please provide your username and password to login to ' + servername + '\&quot;'\n\t\t\t\t});\n\t\t\t\tresponse.end();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// Return a 404 if we didn't find a route\n\t\tif(!route) {\n\t\t\tresponse.writeHead(404);\n\t\t\tresponse.end();\n\t\t\treturn;\n\t\t}\n\t\t// Set the encoding for the incoming request\n\t\t// TODO: Presumably this would need tweaking if we supported PUTting binary tiddlers\n\t\trequest.setEncoding(\&quot;utf8\&quot;);\n\t\t// Dispatch the appropriate method\n\t\tswitch(request.method) {\n\t\t\tcase \&quot;GET\&quot;: // Intentional fall-through\n\t\t\tcase \&quot;DELETE\&quot;:\n\t\t\t\troute.handler(request,response,state);\n\t\t\t\tbreak;\n\t\t\tcase \&quot;PUT\&quot;:\n\t\t\t\tvar data = \&quot;\&quot;;\n\t\t\t\trequest.on(\&quot;data\&quot;,function(chunk) {\n\t\t\t\t\tdata += chunk.toString();\n\t\t\t\t});\n\t\t\t\trequest.on(\&quot;end\&quot;,function() {\n\t\t\t\t\tstate.data = data;\n\t\t\t\t\troute.handler(request,response,state);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t}).listen(port,host);\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n\t// Set up server\n\tthis.server = new SimpleServer({\n\t\twiki: this.commander.wiki\n\t});\n\t// Add route handlers\n\tthis.server.addRoute({\n\t\tmethod: \&quot;PUT\&quot;,\n\t\tpath: /^\\/recipes\\/default\\/tiddlers\\/(.+)$/,\n\t\thandler: function(request,response,state) {\n\t\t\tvar title = decodeURIComponent(state.params[0]),\n\t\t\t\tfields = JSON.parse(state.data);\n\t\t\t// Pull up any subfields in the `fields` object\n\t\t\tif(fields.fields) {\n\t\t\t\t$tw.utils.each(fields.fields,function(field,name) {\n\t\t\t\t\tfields[name] = field;\n\t\t\t\t});\n\t\t\t\tdelete fields.fields;\n\t\t\t}\n\t\t\t// Remove any revision field\n\t\t\tif(fields[\&quot;revision\&quot;]) {\n\t\t\t\tdelete fields[\&quot;revision\&quot;];\n\t\t\t}\n\t\t\tstate.wiki.addTiddler(new $tw.Tiddler(state.wiki.getCreationFields(),fields,{title: title}));\n\t\t\tvar changeCount = state.wiki.getChangeCount(title).toString();\n\t\t\tresponse.writeHead(204, \&quot;OK\&quot;,{\n\t\t\t\tEtag: \&quot;\\\&quot;default/\&quot; + encodeURIComponent(title) + \&quot;/\&quot; + changeCount + \&quot;:\\\&quot;\&quot;,\n\t\t\t\t\&quot;Content-Type\&quot;: \&quot;text/plain\&quot;\n\t\t\t});\n\t\t\tresponse.end();\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \&quot;DELETE\&quot;,\n\t\tpath: /^\\/bags\\/default\\/tiddlers\\/(.+)$/,\n\t\thandler: function(request,response,state) {\n\t\t\tvar title = decodeURIComponent(state.params[0]);\n\t\t\tstate.wiki.deleteTiddler(title);\n\t\t\tresponse.writeHead(204, \&quot;OK\&quot;, {\n\t\t\t\t\&quot;Content-Type\&quot;: \&quot;text/plain\&quot;\n\t\t\t});\n\t\t\tresponse.end();\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \&quot;GET\&quot;,\n\t\tpath: /^\\/$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\&quot;Content-Type\&quot;: state.server.get(\&quot;serveType\&quot;)});\n\t\t\tvar text = state.wiki.renderTiddler(state.server.get(\&quot;renderType\&quot;),state.server.get(\&quot;rootTiddler\&quot;));\n\t\t\tresponse.end(text,\&quot;utf8\&quot;);\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \&quot;GET\&quot;,\n\t\tpath: /^\\/status$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\&quot;Content-Type\&quot;: \&quot;application/json\&quot;});\n\t\t\tvar text = JSON.stringify({\n\t\t\t\tusername: state.server.get(\&quot;username\&quot;),\n\t\t\t\tspace: {\n\t\t\t\t\trecipe: \&quot;default\&quot;\n\t\t\t\t},\n\t\t\t\ttiddlywiki_version: $tw.version\n\t\t\t});\n\t\t\tresponse.end(text,\&quot;utf8\&quot;);\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \&quot;GET\&quot;,\n\t\tpath: /^\\/favicon.ico$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\&quot;Content-Type\&quot;: \&quot;image/x-icon\&quot;});\n\t\t\tvar buffer = state.wiki.getTiddlerText(\&quot;$:/favicon.ico\&quot;,\&quot;\&quot;);\n\t\t\tresponse.end(buffer,\&quot;base64\&quot;);\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \&quot;GET\&quot;,\n\t\tpath: /^\\/recipes\\/default\\/tiddlers.json$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\&quot;Content-Type\&quot;: \&quot;application/json\&quot;});\n\t\t\tvar tiddlers = [];\n\t\t\tstate.wiki.forEachTiddler({sortField: \&quot;title\&quot;},function(title,tiddler) {\n\t\t\t\tvar tiddlerFields = {};\n\t\t\t\t$tw.utils.each(tiddler.fields,function(field,name) {\n\t\t\t\t\tif(name !== \&quot;text\&quot;) {\n\t\t\t\t\t\ttiddlerFields[name] = tiddler.getFieldString(name);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttiddlerFields[\&quot;revision\&quot;] = state.wiki.getChangeCount(title);\n\t\t\t\ttiddlerFields.type = tiddlerFields.type || \&quot;text/vnd.tiddlywiki\&quot;;\n\t\t\t\ttiddlers.push(tiddlerFields);\n\t\t\t});\n\t\t\tvar text = JSON.stringify(tiddlers);\n\t\t\tresponse.end(text,\&quot;utf8\&quot;);\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \&quot;GET\&quot;,\n\t\tpath: /^\\/recipes\\/default\\/tiddlers\\/(.+)$/,\n\t\thandler: function(request,response,state) {\n\t\t\tvar title = decodeURIComponent(state.params[0]),\n\t\t\t\ttiddler = state.wiki.getTiddler(title),\n\t\t\t\ttiddlerFields = {},\n\t\t\t\tknownFields = [\n\t\t\t\t\t\&quot;bag\&quot;, \&quot;created\&quot;, \&quot;creator\&quot;, \&quot;modified\&quot;, \&quot;modifier\&quot;, \&quot;permissions\&quot;, \&quot;recipe\&quot;, \&quot;revision\&quot;, \&quot;tags\&quot;, \&quot;text\&quot;, \&quot;title\&quot;, \&quot;type\&quot;, \&quot;uri\&quot;\n\t\t\t\t];\n\t\t\tif(tiddler) {\n\t\t\t\t$tw.utils.each(tiddler.fields,function(field,name) {\n\t\t\t\t\tvar value = tiddler.getFieldString(name);\n\t\t\t\t\tif(knownFields.indexOf(name) !== -1) {\n\t\t\t\t\t\ttiddlerFields[name] = value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttiddlerFields.fields = tiddlerFields.fields || {};\n\t\t\t\t\t\ttiddlerFields.fields[name] = value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttiddlerFields[\&quot;revision\&quot;] = state.wiki.getChangeCount(title);\n\t\t\t\ttiddlerFields.type = tiddlerFields.type || \&quot;text/vnd.tiddlywiki\&quot;;\n\t\t\t\tresponse.writeHead(200, {\&quot;Content-Type\&quot;: \&quot;application/json\&quot;});\n\t\t\t\tresponse.end(JSON.stringify(tiddlerFields),\&quot;utf8\&quot;);\n\t\t\t} else {\n\t\t\t\tresponse.writeHead(404);\n\t\t\t\tresponse.end();\n\t\t\t}\n\t\t}\n\t});\n};\n\nCommand.prototype.execute = function() {\n\tvar port = this.params[0] || \&quot;8080\&quot;,\n\t\trootTiddler = this.params[1] || \&quot;$:/core/save/all\&quot;,\n\t\trenderType = this.params[2] || \&quot;text/plain\&quot;,\n\t\tserveType = this.params[3] || \&quot;text/html\&quot;,\n\t\tusername = this.params[4],\n\t\tpassword = this.params[5],\n\t\thost = this.params[6] || \&quot;127.0.0.1\&quot;,\n\t\tpathprefix = this.params[7];\n\tthis.server.set({\n\t\trootTiddler: rootTiddler,\n\t\trenderType: renderType,\n\t\tserveType: serveType,\n\t\tusername: username,\n\t\tpassword: password,\n\t\tpathprefix: pathprefix\n\t});\n\tthis.server.listen(port,host);\n\tconsole.log(\&quot;Serving on \&quot; + host + \&quot;:\&quot; + port);\n\tconsole.log(\&quot;(press ctrl-C to exit)\&quot;);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/server.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/setfield.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/setfield.js\ntype: application/javascript\nmodule-type: command\n\nCommand to modify selected tiddlers to set a field to the text of a template tiddler that has been wikified with the selected tiddler as the current tiddler.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;);\n\nexports.info = {\n\tname: \&quot;setfield\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length &lt; 4) {\n\t\treturn \&quot;Missing parameters\&quot;;\n\t}\n\tvar self = this,\n\t\twiki = this.commander.wiki,\n\t\tfilter = this.params[0],\n\t\tfieldname = this.params[1] || \&quot;text\&quot;,\n\t\ttemplatetitle = this.params[2],\n\t\trendertype = this.params[3] || \&quot;text/plain\&quot;,\n\t\ttiddlers = wiki.filterTiddlers(filter);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar parser = wiki.parseTiddler(templatetitle),\n\t\t\tnewFields = {},\n\t\t\ttiddler = wiki.getTiddler(title);\n\t\tif(parser) {\n\t\t\tvar widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});\n\t\t\tvar container = $tw.fakeDocument.createElement(\&quot;div\&quot;);\n\t\t\twidgetNode.render(container,null);\n\t\t\tnewFields[fieldname] = rendertype === \&quot;text/html\&quot; ? container.innerHTML : container.textContent;\n\t\t} else {\n\t\t\tnewFields[fieldname] = undefined;\n\t\t}\n\t\twiki.addTiddler(new $tw.Tiddler(tiddler,newFields));\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/setfield.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/verbose.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/verbose.js\ntype: application/javascript\nmodule-type: command\n\nVerbose command\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;verbose\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tthis.commander.verbose = true;\n\t// Output the boot message log\n\tthis.commander.streams.output.write(\&quot;Boot log:\\n  \&quot; + $tw.boot.logMessages.join(\&quot;\\n  \&quot;) + \&quot;\\n\&quot;);\n\treturn null; // No error\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/verbose.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/commands/version.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/commands/version.js\ntype: application/javascript\nmodule-type: command\n\nVersion command\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.info = {\n\tname: \&quot;version\&quot;,\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tthis.commander.streams.output.write($tw.version + \&quot;\\n\&quot;);\n\treturn null; // No error\n};\n\nexports.Command = Command;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/commands/version.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;command&quot;
        },
        &quot;$:/core/modules/config.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/config.js\ntype: application/javascript\nmodule-type: config\n\nCore configuration constants\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.preferences = {};\n\nexports.preferences.notificationDuration = 3 * 1000;\nexports.preferences.jsonSpaces = 4;\n\nexports.dateFormats = {\n\tmonths: [\&quot;January\&quot;, \&quot;February\&quot;, \&quot;March\&quot;, \&quot;April\&quot;, \&quot;May\&quot;, \&quot;June\&quot;, \&quot;July\&quot;, \&quot;August\&quot;, \&quot;September\&quot;, \&quot;October\&quot;, \&quot;November\&quot;,\&quot;December\&quot;],\n\tdays: [\&quot;Sunday\&quot;, \&quot;Monday\&quot;, \&quot;Tuesday\&quot;, \&quot;Wednesday\&quot;, \&quot;Thursday\&quot;, \&quot;Friday\&quot;, \&quot;Saturday\&quot;],\n\tshortMonths: [\&quot;Jan\&quot;, \&quot;Feb\&quot;, \&quot;Mar\&quot;, \&quot;Apr\&quot;, \&quot;May\&quot;, \&quot;Jun\&quot;, \&quot;Jul\&quot;, \&quot;Aug\&quot;, \&quot;Sep\&quot;, \&quot;Oct\&quot;, \&quot;Nov\&quot;, \&quot;Dec\&quot;],\n\tshortDays: [\&quot;Sun\&quot;, \&quot;Mon\&quot;, \&quot;Tue\&quot;, \&quot;Wed\&quot;, \&quot;Thu\&quot;, \&quot;Fri\&quot;, \&quot;Sat\&quot;],\n// suffixes for dates, eg \&quot;1st\&quot;,\&quot;2nd\&quot;,\&quot;3rd\&quot;...\&quot;30th\&quot;,\&quot;31st\&quot;\n\tdaySuffixes: [\&quot;st\&quot;,\&quot;nd\&quot;,\&quot;rd\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\n\t\t\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\n\t\t\&quot;st\&quot;,\&quot;nd\&quot;,\&quot;rd\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\&quot;th\&quot;,\n\t\t\&quot;st\&quot;],\n\tam: \&quot;am\&quot;,\n\tpm: \&quot;pm\&quot;\n};\n\nexports.htmlEntities = {quot:34, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };\n\nexports.htmlVoidElements = \&quot;area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr\&quot;.split(\&quot;,\&quot;);\n\nexports.htmlBlockElements = \&quot;address,article,aside,audio,blockquote,canvas,dd,div,dl,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,noscript,ol,output,p,pre,section,table,tfoot,ul,video\&quot;.split(\&quot;,\&quot;);\n\nexports.htmlUnsafeElements = \&quot;script\&quot;.split(\&quot;,\&quot;);\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/config.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;config&quot;
        },
        &quot;$:/core/modules/deserializers.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/deserializers.js\ntype: application/javascript\nmodule-type: tiddlerdeserializer\n\nFunctions to deserialise tiddlers from a block of text\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nUtility function to parse an old-style tiddler DIV in a *.tid file. It looks like this:\n\n&lt;div title=\&quot;Title\&quot; creator=\&quot;JoeBloggs\&quot; modifier=\&quot;JoeBloggs\&quot; created=\&quot;201102111106\&quot; modified=\&quot;201102111310\&quot; tags=\&quot;myTag [[my long tag]]\&quot;&gt;\n&lt;pre&gt;The text of the tiddler (without the expected HTML encoding).\n&lt;/pre&gt;\n&lt;/div&gt;\n\nNote that the field attributes are HTML encoded, but that the body of the &lt;PRE&gt; tag is not encoded.\n\nWhen these tiddler DIVs are encountered within a TiddlyWiki HTML file then the body is encoded in the usual way.\n*/\nvar parseTiddlerDiv = function(text /* [,fields] */) {\n\t// Slot together the default results\n\tvar result = {};\n\tif(arguments.length &gt; 1) {\n\t\tfor(var f=1; f&lt;arguments.length; f++) {\n\t\t\tvar fields = arguments[f];\n\t\t\tfor(var t in fields) {\n\t\t\t\tresult[t] = fields[t];\t\t\n\t\t\t}\n\t\t}\n\t}\n\t// Parse the DIV body\n\tvar startRegExp = /^\\s*&lt;div\\s+([^&gt;]*)&gt;(\\s*&lt;pre&gt;)?/gi,\n\t\tendRegExp,\n\t\tmatch = startRegExp.exec(text);\n\tif(match) {\n\t\t// Old-style DIVs don't have the &lt;pre&gt; tag\n\t\tif(match[2]) {\n\t\t\tendRegExp = /&lt;\\/pre&gt;\\s*&lt;\\/div&gt;\\s*$/gi;\n\t\t} else {\n\t\t\tendRegExp = /&lt;\\/div&gt;\\s*$/gi;\n\t\t}\n\t\tvar endMatch = endRegExp.exec(text);\n\t\tif(endMatch) {\n\t\t\t// Extract the text\n\t\t\tresult.text = text.substring(match.index + match[0].length,endMatch.index);\n\t\t\t// Process the attributes\n\t\t\tvar attrRegExp = /\\s*([^=\\s]+)\\s*=\\s*(?:\&quot;([^\&quot;]*)\&quot;|'([^']*)')/gi,\n\t\t\t\tattrMatch;\n\t\t\tdo {\n\t\t\t\tattrMatch = attrRegExp.exec(match[1]);\n\t\t\t\tif(attrMatch) {\n\t\t\t\t\tvar name = attrMatch[1];\n\t\t\t\t\tvar value = attrMatch[2] !== undefined ? attrMatch[2] : attrMatch[3];\n\t\t\t\t\tresult[name] = value;\n\t\t\t\t}\n\t\t\t} while(attrMatch);\n\t\t\treturn result;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nexports[\&quot;application/x-tiddler-html-div\&quot;] = function(text,fields) {\n\treturn [parseTiddlerDiv(text,fields)];\n};\n\nexports[\&quot;application/json\&quot;] = function(text,fields) {\n\tvar tiddlers = JSON.parse(text),\n\t\tresult = [],\n\t\tgetKnownFields = function(tid) {\n\t\t\tvar fields = {};\n\t\t\t\&quot;title text created creator modified modifier type tags\&quot;.split(\&quot; \&quot;).forEach(function(value) {\n\t\t\t\tif(tid[value] !== null) {\n\t\t\t\t\tfields[value] = tid[value];\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn fields;\n\t\t};\n\tfor(var t=0; t&lt;tiddlers.length; t++) {\n\t\tresult.push(getKnownFields(tiddlers[t]));\n\t}\n\treturn result;\n};\n\n/*\nParse an HTML file into tiddlers. There are three possibilities:\n# A TiddlyWiki classic HTML file containing `text/x-tiddlywiki` tiddlers\n# A TiddlyWiki5 HTML file containing `text/vnd.tiddlywiki` tiddlers\n# An ordinary HTML file\n*/\nexports[\&quot;text/html\&quot;] = function(text,fields) {\n\t// Check if we've got a store area\n\tvar storeAreaMarkerRegExp = /&lt;div id=[\&quot;']?storeArea['\&quot;]?( style=[\&quot;']?display:none;[\&quot;']?)?&gt;/gi,\n\t\tmatch = storeAreaMarkerRegExp.exec(text);\n\tif(match) {\n\t\t// If so, it's either a classic TiddlyWiki file or an unencrypted TW5 file\n\t\t// First read the normal tiddlers\n\t\tvar results = deserializeTiddlyWikiFile(text,storeAreaMarkerRegExp.lastIndex,!!match[1],fields);\n\t\t// Then any system tiddlers\n\t\tvar systemAreaMarkerRegExp = /&lt;div id=[\&quot;']?systemArea['\&quot;]?( style=[\&quot;']?display:none;[\&quot;']?)?&gt;/gi,\n\t\t\tsysMatch = systemAreaMarkerRegExp.exec(text);\n\t\tif(sysMatch) {\n\t\t\tresults.push.apply(results,deserializeTiddlyWikiFile(text,systemAreaMarkerRegExp.lastIndex,!!sysMatch[1],fields));\n\t\t}\n\t\treturn results\n\t} else {\n\t\t// Check whether we've got an encrypted file\n\t\tvar encryptedStoreArea = $tw.utils.extractEncryptedStoreArea(text);\n\t\tif(encryptedStoreArea) {\n\t\t\t// If so, attempt to decrypt it using the current password\n\t\t\treturn $tw.utils.decryptStoreArea(encryptedStoreArea);\n\t\t} else {\n\t\t\t// It's not a TiddlyWiki so we'll return the entire HTML file as a tiddler\n\t\t\treturn deserializeHtmlFile(text,fields);\n\t\t}\n\t}\n};\n\nfunction deserializeHtmlFile(text,fields) {\n\tvar result = {};\n\t$tw.utils.each(fields,function(value,name) {\n\t\tresult[name] = value;\n\t});\n\tresult.text = text;\n\tresult.type = \&quot;text/html\&quot;;\n\treturn [result];\n}\n\nfunction deserializeTiddlyWikiFile(text,storeAreaEnd,isTiddlyWiki5,fields) {\n\tvar results = [],\n\t\tendOfDivRegExp = /(&lt;\\/div&gt;\\s*)/gi,\n\t\tstartPos = storeAreaEnd,\n\t\tdefaultType = isTiddlyWiki5 ? undefined : \&quot;text/x-tiddlywiki\&quot;;\n\tendOfDivRegExp.lastIndex = startPos;\n\tvar match = endOfDivRegExp.exec(text);\n\twhile(match) {\n\t\tvar endPos = endOfDivRegExp.lastIndex,\n\t\t\ttiddlerFields = parseTiddlerDiv(text.substring(startPos,endPos),fields,{type: defaultType});\n\t\tif(!tiddlerFields) {\n\t\t\tbreak;\n\t\t}\n\t\t$tw.utils.each(tiddlerFields,function(value,name) {\n\t\t\tif(typeof value === \&quot;string\&quot;) {\n\t\t\t\ttiddlerFields[name] = $tw.utils.htmlDecode(value);\n\t\t\t}\n\t\t});\n\t\tif(tiddlerFields.text !== null) {\n\t\t\tresults.push(tiddlerFields);\n\t\t}\n\t\tstartPos = endPos;\n\t\tmatch = endOfDivRegExp.exec(text);\n\t}\n\treturn results;\n}\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/deserializers.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;tiddlerdeserializer&quot;
        },
        &quot;$:/core/modules/filters/after.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/after.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler from the current list that is after the tiddler named in the operand.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.after = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\tvar index = results.indexOf(operator.operand);\n\tif(index === -1 || index &gt; (results.length - 2)) {\n\t\treturn [];\n\t} else {\n\t\treturn [results[index + 1]];\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/after.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/all/current.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/all/current.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[current]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.current = function(source,prefix,options) {\n\tvar currTiddlerTitle = options.widget &amp;&amp; options.widget.getVariable(\&quot;currentTiddler\&quot;);\n\tif(currTiddlerTitle) {\n\t\treturn [currTiddlerTitle];\n\t} else {\n\t\treturn [];\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/all/current.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;allfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/all/missing.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/all/missing.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[missing]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.missing = function(source,prefix,options) {\n\treturn options.wiki.getMissingTitles();\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/all/missing.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;allfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/all/orphans.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/all/orphans.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[orphans]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.orphans = function(source,prefix,options) {\n\treturn options.wiki.getOrphanTitles();\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/all/orphans.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;allfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/all/shadows.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/all/shadows.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[shadows]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.shadows = function(source,prefix,options) {\n\treturn options.wiki.allShadowTitles();\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/all/shadows.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;allfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/all/tiddlers.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/all/tiddlers.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[tiddlers]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.tiddlers = function(source,prefix,options) {\n\treturn options.wiki.allTitles();\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/all/tiddlers.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;allfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/all.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/all.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for selecting tiddlers\n\n[all[shadows+tiddlers]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar allFilterOperators;\n\nfunction getAllFilterOperators() {\n\tif(!allFilterOperators) {\n\t\tallFilterOperators = {};\n\t\t$tw.modules.applyMethods(\&quot;allfilteroperator\&quot;,allFilterOperators);\n\t}\n\treturn allFilterOperators;\n}\n\n/*\nExport our filter function\n*/\nexports.all = function(source,operator,options) {\n\t// Get our suboperators\n\tvar allFilterOperators = getAllFilterOperators();\n\t// Cycle through the suboperators accumulating their results\n\tvar results = [],\n\t\tsubops = operator.operand.split(\&quot;+\&quot;);\n\t// Check for common optimisations\n\tif(subops.length === 1 &amp;&amp; subops[0] === \&quot;tiddlers\&quot;) {\n\t\treturn options.wiki.each;\n\t} else if(subops.length === 1 &amp;&amp; subops[0] === \&quot;shadows\&quot;) {\n\t\treturn options.wiki.eachShadow;\n\t} else if(subops.length === 2 &amp;&amp; subops[0] === \&quot;tiddlers\&quot; &amp;&amp; subops[1] === \&quot;shadows\&quot;) {\n\t\treturn options.wiki.eachTiddlerPlusShadows;\n\t} else if(subops.length === 2 &amp;&amp; subops[0] === \&quot;shadows\&quot; &amp;&amp; subops[1] === \&quot;tiddlers\&quot;) {\n\t\treturn options.wiki.eachShadowPlusTiddlers;\n\t}\n\t// Do it the hard way\n\tfor(var t=0; t&lt;subops.length; t++) {\n\t\tvar subop = allFilterOperators[subops[t]];\n\t\tif(subop) {\n\t\t\t$tw.utils.pushTop(results,subop(source,operator.prefix,options));\n\t\t}\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/all.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/backlinks.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/backlinks.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning all the backlinks from a tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.backlinks = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlerBacklinks(title));\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/backlinks.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/before.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/before.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler from the current list that is before the tiddler named in the operand.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.before = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\tvar index = results.indexOf(operator.operand);\n\tif(index &lt;= 0) {\n\t\treturn [];\n\t} else {\n\t\treturn [results[index - 1]];\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/before.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/commands.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/commands.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the commands available in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.commands = function(source,operator,options) {\n\tvar results = [];\n\t$tw.utils.each($tw.commands,function(commandInfo,name) {\n\t\tresults.push(name);\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/commands.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/each.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/each.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects one tiddler for each unique value of the specified field\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.each = function(source,operator,options) {\n\tvar results = [],\n\t\tvalues = {};\n\tsource(function(tiddler,title) {\n\t\tif(tiddler) {\n\t\t\tvar value = tiddler.getFieldString(operator.operand);\n\t\t\tif(!$tw.utils.hop(values,value)) {\n\t\t\t\tvalues[value] = true;\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/each.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/eachday.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/eachday.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects one tiddler for each unique day covered by the specified date field\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.eachday = function(source,operator,options) {\n\tvar results = [],\n\t\tvalues = [];\n\t// Function to convert a date/time to a date integer\n\tvar toDate = function(value) {\n\t\tvalue = (new Date(value)).setHours(0,0,0,0);\n\t\treturn value+0;\n\t};\n\tsource(function(tiddler,title) {\n\t\tif(tiddler &amp;&amp; tiddler.fields[operator.operand]) {\n\t\t\tvar value = toDate(tiddler.fields[operator.operand]);\n\t\t\tif(values.indexOf(value) === -1) {\n\t\t\t\tvalues.push(value);\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/eachday.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/field.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/field.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for comparing fields for equality\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.field = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldname = (operator.suffix || operator.operator || \&quot;title\&quot;).toLowerCase();\n\tif(operator.prefix === \&quot;!\&quot;) {\n\t\tif(operator.regexp) {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null &amp;&amp; !operator.regexp.exec(text)) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null &amp;&amp; text !== operator.operand) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t} else {\n\t\tif(operator.regexp) {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null &amp;&amp; !!operator.regexp.exec(text)) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null &amp;&amp; text === operator.operand) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/field.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/fields.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/fields.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the fields on the selected tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.fields = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(tiddler) {\n\t\t\tfor(var fieldName in tiddler.fields) {\n\t\t\t\t$tw.utils.pushTop(results,fieldName);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/fields.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/get.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/get.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for replacing tiddler titles by the value of the field specified in the operand.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.get = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(tiddler) {\n\t\t\tvar value = tiddler.getFieldString(operator.operand);\n\t\t\tif(value) {\n\t\t\t\tresults.push(value);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/get.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/has.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/has.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking if a tiddler has the specified field\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.has = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler &amp;&amp; (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === \&quot;\&quot;)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler &amp;&amp; $tw.utils.hop(tiddler.fields,operator.operand) &amp;&amp; tiddler.fields[operator.operand] !== \&quot;\&quot;) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/has.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/indexes.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/indexes.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the indexes of a data tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.indexes = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar data = options.wiki.getTiddlerData(title);\n\t\tif(data) {\n\t\t\t$tw.utils.pushTop(results,Object.keys(data));\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/indexes.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/is/current.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/is/current.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[current]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.current = function(source,prefix,options) {\n\tvar results = [],\n\t\tcurrTiddlerTitle = options.widget &amp;&amp; options.widget.getVariable(\&quot;currentTiddler\&quot;);\n\tif(prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title !== currTiddlerTitle) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title === currTiddlerTitle) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/is/current.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;isfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/is/image.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/is/image.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[image]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.image = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.isImageTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.isImageTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/is/image.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;isfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/is/missing.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/is/missing.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[missing]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.missing = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/is/missing.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;isfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/is/orphan.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/is/orphan.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[orphan]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.orphan = function(source,prefix,options) {\n\tvar results = [],\n\t\torphanTitles = options.wiki.getOrphanTitles();\n\tif(prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(orphanTitles.indexOf(title) === -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(orphanTitles.indexOf(title) !== -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/is/orphan.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;isfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/is/shadow.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/is/shadow.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[shadow]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.shadow = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.isShadowTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.isShadowTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/is/shadow.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;isfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/is/system.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/is/system.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[system]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.system = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.isSystemTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.isSystemTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/is/system.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;isfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/is/tag.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/is/tag.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[tag]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.tag = function(source,prefix,options) {\n\tvar results = [],\n\t\ttagMap = options.wiki.getTagMap();\n\tif(prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!$tw.utils.hop(tagMap,title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif($tw.utils.hop(tagMap,title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/is/tag.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;isfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/is/tiddler.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/is/tiddler.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[tiddler]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.tiddler = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/is/tiddler.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;isfilteroperator&quot;
        },
        &quot;$:/core/modules/filters/is.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/is.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking tiddler properties\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar isFilterOperators;\n\nfunction getIsFilterOperators() {\n\tif(!isFilterOperators) {\n\t\tisFilterOperators = {};\n\t\t$tw.modules.applyMethods(\&quot;isfilteroperator\&quot;,isFilterOperators);\n\t}\n\treturn isFilterOperators;\n};\n\n/*\nExport our filter function\n*/\nexports.is = function(source,operator,options) {\n\t// Dispatch to the correct isfilteroperator\n\tvar isFilterOperators = getIsFilterOperators();\n\tvar isFilterOperator = isFilterOperators[operator.operand];\n\tif(isFilterOperator) {\n\t\treturn isFilterOperator(source,operator.prefix,options);\n\t} else {\n\t\treturn [\&quot;Filter Error: Unknown operand for the 'is' filter operator\&quot;];\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/is.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/limit.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/limit.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for chopping the results to a specified maximum number of entries\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.limit = function(source,operator,options) {\n\tvar results = [];\n\t// Convert to an array\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\t// Slice the array if necessary\n\tvar limit = Math.min(results.length,parseInt(operator.operand,10));\n\tif(operator.prefix === \&quot;!\&quot;) {\n\t\tresults = results.slice(-limit);\n\t} else {\n\t\tresults = results.slice(0,limit);\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/limit.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/links.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/links.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning all the links from a tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.links = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlerLinks(title));\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/links.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/list.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/list.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddlers whose title is listed in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.list = function(source,operator,options) {\n\tvar results = [],\n\t\ttr = $tw.utils.parseTextReference(operator.operand),\n\t\tcurrTiddlerTitle = options.widget &amp;&amp; options.widget.getVariable(\&quot;currentTiddler\&quot;),\n\t\tlist = options.wiki.getTiddlerList(tr.title || currTiddlerTitle,tr.field,tr.index);\n\tif(operator.prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(list.indexOf(title) === -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tresults = list;\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/list.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/listed.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/listed.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all tiddlers that have the selected tiddlers in a list\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.listed = function(source,operator,options) {\n\tvar field = operator.operand || \&quot;list\&quot;,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.findListingsOfTiddler(title,field));\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/listed.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/listops.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/listops.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operators for manipulating the current selection list\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nReverse list\n*/\nexports.reverse = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.unshift(title);\n\t});\n\treturn results;\n};\n\n/*\nFirst entry/entries in list\n*/\nexports.first = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(0,count);\n};\n\n/*\nLast entry/entries in list\n*/\nexports.last = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(-count);\n};\n\n/*\nAll but the first entry/entries of the list\n*/\nexports.rest = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(count);\n};\nexports.butfirst = exports.rest;\nexports.bf = exports.rest;\n\n/*\nAll but the last entry/entries of the list\n*/\nexports.butlast = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(0,-count);\n};\nexports.bl = exports.butlast;\n\n/*\nThe nth member of the list\n*/\nexports.nth = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(count - 1,count);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/listops.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/modules.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/modules.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the titles of the modules of a given type in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.modules = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.each($tw.modules.types[title],function(moduleInfo,moduleName) {\n\t\t\tresults.push(moduleName);\n\t\t});\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/modules.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/moduletypes.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/moduletypes.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the module types in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.moduletypes = function(source,operator,options) {\n\tvar results = [];\n\t$tw.utils.each($tw.modules.types,function(moduleInfo,type) {\n\t\tresults.push(type);\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/moduletypes.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/next.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/next.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler whose title occurs next in the list supplied in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.next = function(source,operator,options) {\n\tvar results = [],\n\t\tlist = options.wiki.getTiddlerList(operator.operand);\n\tsource(function(tiddler,title) {\n\t\tvar match = list.indexOf(title);\n\t\t// increment match and then test if result is in range\n\t\tmatch++;\n\t\tif(match &gt; 0 &amp;&amp; match &lt; list.length) {\n\t\t\tresults.push(list[match]);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/next.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/plugintiddlers.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/plugintiddlers.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the titles of the shadow tiddlers within a plugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.plugintiddlers = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n \t\tvar pluginInfo = options.wiki.getPluginInfo(title);\n \t\tif(pluginInfo) {\n \t\t\t$tw.utils.each(pluginInfo.tiddlers,function(fields,title) {\n \t\t\t\tresults.push(title);\n \t\t\t});\n \t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/plugintiddlers.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/prefix.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/prefix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking if a title starts with a prefix\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.prefix = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(0,operator.operand.length).toLowerCase() !== operator.operand.toLowerCase()) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/prefix.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/previous.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/previous.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler whose title occurs immediately prior in the list supplied in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.previous = function(source,operator,options) {\n\tvar results = [],\n\t\tlist = options.wiki.getTiddlerList(operator.operand);\n\tsource(function(tiddler,title) {\n\t\tvar match = list.indexOf(title);\n\t\t// increment match and then test if result is in range\n\t\tmatch--;\n\t\tif(match &gt;= 0) {\n\t\t\tresults.push(list[match]);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/previous.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/removeprefix.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/removeprefix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for removing a prefix from each title in the list. Titles that do not start with the prefix are removed.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.removeprefix = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) {\n\t\t\tresults.push(title.substr(operator.operand.length));\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/removeprefix.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/sameday.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/sameday.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects tiddlers with a modified date field on the same day as the provided value.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.sameday = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldName = operator.suffix || \&quot;modified\&quot;,\n\t\ttargetDate = (new Date($tw.utils.parseDate(operator.operand))).setHours(0,0,0,0);\n\t// Function to convert a date/time to a date integer\n\tvar isSameDay = function(dateField) {\n\t\t\treturn (new Date(dateField)).setHours(0,0,0,0) === targetDate;\n\t\t};\n\tsource(function(tiddler,title) {\n\t\tif(tiddler &amp;&amp; tiddler.fields[fieldName]) {\n\t\t\tif(isSameDay(tiddler.fields[fieldName])) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/sameday.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/search.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/search.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for searching for the text in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.search = function(source,operator,options) {\n\tvar invert = operator.prefix === \&quot;!\&quot;;\n\treturn options.wiki.search(operator.operand,{\n\t\tsource: source,\n\t\tinvert: invert\n\t});\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/search.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/shadowsource.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/shadowsource.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the source plugins for shadow tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.shadowsource = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar source = options.wiki.getShadowSource(title);\n \t\tif(source) {\n\t\t\t$tw.utils.pushTop(results,source);\n \t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/shadowsource.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/sort.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/sort.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for sorting\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.sort = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \&quot;title\&quot;,operator.prefix === \&quot;!\&quot;,false,false);\n\treturn results;\n};\n\nexports.nsort = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \&quot;title\&quot;,operator.prefix === \&quot;!\&quot;,false,true);\n\treturn results;\n};\n\nexports.sortcs = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \&quot;title\&quot;,operator.prefix === \&quot;!\&quot;,true,false);\n\treturn results;\n};\n\nexports.nsortcs = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \&quot;title\&quot;,operator.prefix === \&quot;!\&quot;,true,true);\n\treturn results;\n};\n\nvar prepare_results = function (source) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results;\n}\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/sort.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/storyviews.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/storyviews.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the story views in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.storyviews = function(source,operator,options) {\n\tvar results = [],\n\t\tstoryviews = {};\n\t$tw.modules.applyMethods(\&quot;storyview\&quot;,storyviews);\n\t$tw.utils.each(storyviews,function(info,name) {\n\t\tresults.push(name);\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/storyviews.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/tag.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/tag.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking for the presence of a tag\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.tag = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler &amp;&amp; !tiddler.hasTag(operator.operand)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler &amp;&amp; tiddler.hasTag(operator.operand)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t\tresults = options.wiki.sortByList(results,operator.operand);\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/tag.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/tagging.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/tagging.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all tiddlers that are tagged with the selected tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.tagging = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title));\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/tagging.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/tags.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/tags.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all the tags of the selected tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.tags = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(tiddler &amp;&amp; tiddler.fields.tags) {\n\t\t\t$tw.utils.pushTop(results,tiddler.fields.tags);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/tags.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/title.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/title.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for comparing title fields for equality\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.title = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler &amp;&amp; tiddler.fields.title !== operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tresults.push(operator.operand);\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/title.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters/untagged.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters/untagged.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all the selected tiddlers that are untagged\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nExport our filter function\n*/\nexports.untagged = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \&quot;!\&quot;) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler &amp;&amp; $tw.utils.isArray(tiddler.fields.tags) &amp;&amp; tiddler.fields.tags.length &gt; 0) {\n\t\t\t\t$tw.utils.pushTop(results,title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!tiddler || !tiddler.hasField(\&quot;tags\&quot;) || ($tw.utils.isArray(tiddler.fields.tags) &amp;&amp; tiddler.fields.tags.length === 0)) {\n\t\t\t\t$tw.utils.pushTop(results,title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters/untagged.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;filteroperator&quot;
        },
        &quot;$:/core/modules/filters.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/filters.js\ntype: application/javascript\nmodule-type: wikimethod\n\nAdds tiddler filtering methods to the $tw.Wiki object.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nParses an operation within a filter string\n\tresults: Array of array of operator nodes into which results should be inserted\n\tfilterString: filter string\n\tp: start position within the string\nReturns the new start position, after the parsed operation\n*/\nfunction parseFilterOperation(operators,filterString,p) {\n\tvar operator, operand, bracketPos, curlyBracketPos;\n\t// Skip the starting square bracket\n\tif(filterString.charAt(p++) !== \&quot;[\&quot;) {\n\t\tthrow \&quot;Missing [ in filter expression\&quot;;\n\t}\n\t// Process each operator in turn\n\tdo {\n\t\toperator = {};\n\t\t// Check for an operator prefix\n\t\tif(filterString.charAt(p) === \&quot;!\&quot;) {\n\t\t\toperator.prefix = filterString.charAt(p++);\n\t\t}\n\t\t// Get the operator name\n\t\tvar nextBracketPos = filterString.substring(p).search(/[\\[\\{\\/]/);\n\t\tif(nextBracketPos === -1) {\n\t\t\tthrow \&quot;Missing [ in filter expression\&quot;;\n\t\t}\n\t\tnextBracketPos += p;\n\t\tvar bracket = filterString.charAt(nextBracketPos);\n\t\toperator.operator = filterString.substring(p,nextBracketPos);\n\t\t\n\t\t// Any suffix?\n\t\tvar colon = operator.operator.indexOf(':');\n\t\tif(colon &gt; -1) {\n\t\t\toperator.suffix = operator.operator.substring(colon + 1);\n\t\t\toperator.operator = operator.operator.substring(0,colon) || \&quot;field\&quot;;\n\t\t}\n\t\t// Empty operator means: title\n\t\telse if(operator.operator === \&quot;\&quot;) {\n\t\t\toperator.operator = \&quot;title\&quot;;\n\t\t}\n\n\t\tp = nextBracketPos + 1;\n\t\tswitch (bracket) {\n\t\tcase '{': // Curly brackets\n\t\t\toperator.indirect = true;\n\t\t\tnextBracketPos = filterString.indexOf('}',p);\n\t\t\tbreak;\n\t\tcase '[': // Square brackets\n\t\t\tnextBracketPos = filterString.indexOf(']',p);\n\t\t\tbreak;\n\t\tcase '/': // regexp brackets\n\t\t\tvar rex = /^((?:[^\\\\\\/]*|\\\\.)*)\\/(?:\\(([mygi]+)\\))?/g,\n\t\t\t\trexMatch = rex.exec(filterString.substring(p));\n\t\t\tif(rexMatch) {\n\t\t\t\toperator.regexp = new RegExp(rexMatch[1], rexMatch[2]);\n\t\t\t\tnextBracketPos = p + rex.lastIndex - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow \&quot;Unterminated regular expression in filter expression\&quot;;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif(nextBracketPos === -1) {\n\t\t\tthrow \&quot;Missing closing bracket in filter expression\&quot;;\n\t\t}\n\t\tif(!operator.regexp) {\n\t\t\toperator.operand = filterString.substring(p,nextBracketPos);\n\t\t}\n\t\tp = nextBracketPos + 1;\n\t\t\t\n\t\t// Push this operator\n\t\toperators.push(operator);\n\t} while(filterString.charAt(p) !== \&quot;]\&quot;);\n\t// Skip the ending square bracket\n\tif(filterString.charAt(p++) !== \&quot;]\&quot;) {\n\t\tthrow \&quot;Missing ] in filter expression\&quot;;\n\t}\n\t// Return the parsing position\n\treturn p;\n}\n\n/*\nParse a filter string\n*/\nexports.parseFilter = function(filterString) {\n\tfilterString = filterString || \&quot;\&quot;;\n\tvar results = [], // Array of arrays of operator nodes {operator:,operand:}\n\t\tp = 0, // Current position in the filter string\n\t\tmatch;\n\tvar whitespaceRegExp = /(\\s+)/mg,\n\t\toperandRegExp = /((?:\\+|\\-)?)(?:(\\[)|(\&quot;(?:[^\&quot;])*\&quot;)|('(?:[^'])*')|([^\\s\\[\\]]+))/mg;\n\twhile(p &lt; filterString.length) {\n\t\t// Skip any whitespace\n\t\twhitespaceRegExp.lastIndex = p;\n\t\tmatch = whitespaceRegExp.exec(filterString);\n\t\tif(match &amp;&amp; match.index === p) {\n\t\t\tp = p + match[0].length;\n\t\t}\n\t\t// Match the start of the operation\n\t\tif(p &lt; filterString.length) {\n\t\t\toperandRegExp.lastIndex = p;\n\t\t\tmatch = operandRegExp.exec(filterString);\n\t\t\tif(!match || match.index !== p) {\n\t\t\t\tthrow \&quot;Syntax error in filter expression\&quot;;\n\t\t\t}\n\t\t\tvar operation = {\n\t\t\t\tprefix: \&quot;\&quot;,\n\t\t\t\toperators: []\n\t\t\t};\n\t\t\tif(match[1]) {\n\t\t\t\toperation.prefix = match[1];\n\t\t\t\tp++;\n\t\t\t}\n\t\t\tif(match[2]) { // Opening square bracket\n\t\t\t\tp = parseFilterOperation(operation.operators,filterString,p);\n\t\t\t} else {\n\t\t\t\tp = match.index + match[0].length;\n\t\t\t}\n\t\t\tif(match[3] || match[4] || match[5]) { // Double quoted string, single quoted string or unquoted title\n\t\t\t\toperation.operators.push(\n\t\t\t\t\t{operator: \&quot;title\&quot;, operand: match[3] || match[4] || match[5]}\n\t\t\t\t);\n\t\t\t}\n\t\t\tresults.push(operation);\n\t\t}\n\t}\n\treturn results;\n};\n\nexports.getFilterOperators = function() {\n\tif(!this.filterOperators) {\n\t\t$tw.Wiki.prototype.filterOperators = {};\n\t\t$tw.modules.applyMethods(\&quot;filteroperator\&quot;,this.filterOperators);\n\t}\n\treturn this.filterOperators;\n};\n\nexports.filterTiddlers = function(filterString,widget,source) {\n\tvar fn = this.compileFilter(filterString);\n\treturn fn.call(this,source,widget);\n};\n\n/*\nCompile a filter into a function with the signature fn(source,widget) where:\nsource: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)\nwidget: an optional widget node for retrieving the current tiddler etc.\n*/\nexports.compileFilter = function(filterString) {\n\tvar filterParseTree;\n\ttry {\n\t\tfilterParseTree = this.parseFilter(filterString);\n\t} catch(e) {\n\t\treturn function(source,widget) {\n\t\t\treturn [\&quot;Filter error: \&quot; + e];\n\t\t};\n\t}\n\t// Get the hashmap of filter operator functions\n\tvar filterOperators = this.getFilterOperators();\n\t// Assemble array of functions, one for each operation\n\tvar operationFunctions = [];\n\t// Step through the operations\n\tvar self = this;\n\t$tw.utils.each(filterParseTree,function(operation) {\n\t\t// Create a function for the chain of operators in the operation\n\t\tvar operationSubFunction = function(source,widget) {\n\t\t\tvar accumulator = source,\n\t\t\t\tresults = [],\n\t\t\t\tcurrTiddlerTitle = widget &amp;&amp; widget.getVariable(\&quot;currentTiddler\&quot;);\n\t\t\t$tw.utils.each(operation.operators,function(operator) {\n\t\t\t\tvar operand = operator.operand,\n\t\t\t\t\toperatorFunction;\n\t\t\t\tif(!operator.operator) {\n\t\t\t\t\toperatorFunction = filterOperators.title;\n\t\t\t\t} else if(!filterOperators[operator.operator]) {\n\t\t\t\t\toperatorFunction = filterOperators.field;\n\t\t\t\t} else {\n\t\t\t\t\toperatorFunction = filterOperators[operator.operator];\n\t\t\t\t}\n\t\t\t\tif(operator.indirect) {\n\t\t\t\t\toperand = self.getTextReference(operator.operand,\&quot;\&quot;,currTiddlerTitle);\n\t\t\t\t}\n\t\t\t\tresults = operatorFunction(accumulator,{\n\t\t\t\t\t\t\toperator: operator.operator,\n\t\t\t\t\t\t\toperand: operand,\n\t\t\t\t\t\t\tprefix: operator.prefix,\n\t\t\t\t\t\t\tsuffix: operator.suffix,\n\t\t\t\t\t\t\tregexp: operator.regexp\n\t\t\t\t\t\t},{\n\t\t\t\t\t\t\twiki: self,\n\t\t\t\t\t\t\twidget: widget\n\t\t\t\t\t\t});\n\t\t\t\tif($tw.utils.isArray(results)) {\n\t\t\t\t\taccumulator = self.makeTiddlerIterator(results);\n\t\t\t\t} else {\n\t\t\t\t\taccumulator = results;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif($tw.utils.isArray(results)) {\n\t\t\t\treturn results;\n\t\t\t} else {\n\t\t\t\tvar resultArray = [];\n\t\t\t\tresults(function(tiddler,title) {\n\t\t\t\t\tresultArray.push(title);\n\t\t\t\t});\n\t\t\t\treturn resultArray;\n\t\t\t}\n\t\t};\n\t\t// Wrap the operator functions in a wrapper function that depends on the prefix\n\t\toperationFunctions.push((function() {\n\t\t\tswitch(operation.prefix || \&quot;\&quot;) {\n\t\t\t\tcase \&quot;\&quot;: // No prefix means that the operation is unioned into the result\n\t\t\t\t\treturn function(results,source,widget) {\n\t\t\t\t\t\t$tw.utils.pushTop(results,operationSubFunction(source,widget));\n\t\t\t\t\t};\n\t\t\t\tcase \&quot;-\&quot;: // The results of this operation are removed from the main result\n\t\t\t\t\treturn function(results,source,widget) {\n\t\t\t\t\t\t$tw.utils.removeArrayEntries(results,operationSubFunction(source,widget));\n\t\t\t\t\t};\n\t\t\t\tcase \&quot;+\&quot;: // This operation is applied to the main results so far\n\t\t\t\t\treturn function(results,source,widget) {\n\t\t\t\t\t\t// This replaces all the elements of the array, but keeps the actual array so that references to it are preserved\n\t\t\t\t\t\tsource = self.makeTiddlerIterator(results);\n\t\t\t\t\t\tresults.splice(0,results.length);\n\t\t\t\t\t\t$tw.utils.pushTop(results,operationSubFunction(source,widget));\n\t\t\t\t\t};\n\t\t\t}\n\t\t})());\n\t});\n\t// Return a function that applies the operations to a source iterator of tiddler titles\n\treturn $tw.perf.measure(\&quot;filter\&quot;,function filterFunction(source,widget) {\n\t\tif(!source) {\n\t\t\tsource = self.each;\n\t\t} else if(typeof source === \&quot;object\&quot;) { // Array or hashmap\n\t\t\tsource = self.makeTiddlerIterator(source);\n\t\t}\n\t\tvar results = [];\n\t\t$tw.utils.each(operationFunctions,function(operationFunction) {\n\t\t\toperationFunction(results,source,widget);\n\t\t});\n\t\treturn results;\n\t});\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/filters.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikimethod&quot;
        },
        &quot;$:/core/modules/language.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/language.js\ntype: application/javascript\nmodule-type: global\n\nThe $tw.Language() manages translateable strings\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nCreate an instance of the language manager. Options include:\nwiki: wiki from which to retrieve translation tiddlers\n*/\nfunction Language(options) {\n\toptions = options || \&quot;\&quot;;\n\tthis.wiki = options.wiki || $tw.wiki;\n}\n\n/*\nReturn a single translateable string. The title is automatically prefixed with \&quot;$:/language/\&quot;\nOptions include:\nvariables: optional hashmap of variables to supply to the language wikification\n*/\nLanguage.prototype.getString = function(title,options) {\n\toptions = options || {};\n\ttitle = \&quot;$:/language/\&quot; + title;\n\treturn this.wiki.renderTiddler(\&quot;text/plain\&quot;,title,{variables: options.variables});\n};\n\nexports.Language = Language;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/language.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;global&quot;
        },
        &quot;$:/core/modules/macros/changecount.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/macros/changecount.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to return the changecount for the current tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nInformation about this macro\n*/\n\nexports.name = \&quot;changecount\&quot;;\n\nexports.params = [];\n\n/*\nRun the macro\n*/\nexports.run = function() {\n\treturn this.wiki.getChangeCount(this.getVariable(\&quot;currentTiddler\&quot;)) + \&quot;\&quot;;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/macros/changecount.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;macro&quot;
        },
        &quot;$:/core/modules/macros/makedatauri.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/macros/makedatauri.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to convert the content of a tiddler to a data URI\n\n&lt;&lt;makedatauri text:\&quot;Text to be converted\&quot; type:\&quot;text/vnd.tiddlywiki\&quot;&gt;&gt;\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nInformation about this macro\n*/\n\nexports.name = \&quot;makedatauri\&quot;;\n\nexports.params = [\n\t{name: \&quot;text\&quot;},\n\t{name: \&quot;type\&quot;}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(text,type) {\n\ttype = type || \&quot;text/vnd.tiddlywiki\&quot;;\n\tvar typeInfo = $tw.config.contentTypeInfo[type] || $tw.config.contentTypeInfo[\&quot;text/plain\&quot;],\n\t\tisBase64 = typeInfo.encoding === \&quot;base64\&quot;,\n\t\tparts = [];\n\tparts.push(\&quot;data:\&quot;);\n\tparts.push(type);\n\tparts.push(isBase64 ? \&quot;;base64\&quot; : \&quot;\&quot;);\n\tparts.push(\&quot;,\&quot;);\n\tparts.push(isBase64 ? text : encodeURIComponent(text));\n\treturn parts.join(\&quot;\&quot;);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/macros/makedatauri.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;macro&quot;
        },
        &quot;$:/core/modules/macros/qualify.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/macros/qualify.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to qualify a state tiddler title according\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nInformation about this macro\n*/\n\nexports.name = \&quot;qualify\&quot;;\n\nexports.params = [\n\t{name: \&quot;title\&quot;}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(title) {\n\treturn title + \&quot;-\&quot; + this.getStateQualifier();\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/macros/qualify.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;macro&quot;
        },
        &quot;$:/core/modules/macros/version.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/macros/version.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to return the TiddlyWiki core version number\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nInformation about this macro\n*/\n\nexports.name = \&quot;version\&quot;;\n\nexports.params = [];\n\n/*\nRun the macro\n*/\nexports.run = function() {\n\treturn $tw.version;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/macros/version.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;macro&quot;
        },
        &quot;$:/core/modules/parsers/csvparser.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/csvparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe CSV text parser processes CSV files into a table wrapped in a scrollable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar CsvParser = function(type,text,options) {\n\t// Table framework\n\tthis.tree = [{\n\t\t\&quot;type\&quot;: \&quot;scrollable\&quot;, \&quot;children\&quot;: [{\n\t\t\t\&quot;type\&quot;: \&quot;element\&quot;, \&quot;tag\&quot;: \&quot;table\&quot;, \&quot;children\&quot;: [{\n\t\t\t\t\&quot;type\&quot;: \&quot;element\&quot;, \&quot;tag\&quot;: \&quot;tbody\&quot;, \&quot;children\&quot;: []\n\t\t\t}], \&quot;attributes\&quot;: {\n\t\t\t\t\&quot;class\&quot;: {\&quot;type\&quot;: \&quot;string\&quot;, \&quot;value\&quot;: \&quot;tw-csv-table\&quot;}\n\t\t\t}\n\t\t}]\n\t}];\n\t// Split the text into lines\n\tvar lines = text.split(/\\r?\\n/mg),\n\t\ttag = \&quot;th\&quot;;\n\tfor(var line=0; line&lt;lines.length; line++) {\n\t\tvar lineText = lines[line];\n\t\tif(lineText) {\n\t\t\tvar row = {\n\t\t\t\t\t\&quot;type\&quot;: \&quot;element\&quot;, \&quot;tag\&quot;: \&quot;tr\&quot;, \&quot;children\&quot;: []\n\t\t\t\t};\n\t\t\tvar columns = lineText.split(\&quot;,\&quot;);\n\t\t\tfor(var column=0; column&lt;columns.length; column++) {\n\t\t\t\trow.children.push({\n\t\t\t\t\t\t\&quot;type\&quot;: \&quot;element\&quot;, \&quot;tag\&quot;: tag, \&quot;children\&quot;: [{\n\t\t\t\t\t\t\t\&quot;type\&quot;: \&quot;text\&quot;,\n\t\t\t\t\t\t\t\&quot;text\&quot;: columns[column]\n\t\t\t\t\t\t}]\n\t\t\t\t\t});\n\t\t\t}\n\t\t\ttag = \&quot;td\&quot;;\n\t\t\tthis.tree[0].children[0].children[0].children.push(row);\n\t\t}\n\t}\n};\n\nexports[\&quot;text/csv\&quot;] = CsvParser;\n\n})();\n\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/csvparser.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;parser&quot;
        },
        &quot;$:/core/modules/parsers/htmlparser.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/htmlparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe HTML parser displays text as raw HTML\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar HtmlParser = function(type,text,options) {\n\tvar src;\n\tif(options._canonical_uri) {\n\t\tsrc = options._canonical_uri;\n\t} else if(text) {\n\t\tsrc = \&quot;data:text/html,\&quot; + encodeURIComponent(text);\n\t}\n\tthis.tree = [{\n\t\ttype: \&quot;element\&quot;,\n\t\ttag: \&quot;iframe\&quot;,\n\t\tattributes: {\n\t\t\tsrc: {type: \&quot;string\&quot;, value: src}\n\t\t}\n\t}];\n};\n\nexports[\&quot;text/html\&quot;] = HtmlParser;\n\n})();\n\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/htmlparser.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;parser&quot;
        },
        &quot;$:/core/modules/parsers/imageparser.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/imageparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe image parser parses an image into an embeddable HTML element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar ImageParser = function(type,text,options) {\n\tvar element = {\n\t\t\ttype: \&quot;element\&quot;,\n\t\t\ttag: \&quot;img\&quot;,\n\t\t\tattributes: {}\n\t\t},\n\t\tsrc;\n\tif(options._canonical_uri) {\n\t\telement.attributes.src = {type: \&quot;string\&quot;, value: options._canonical_uri};\n\t\tif(type === \&quot;application/pdf\&quot; || type === \&quot;.pdf\&quot;) {\n\t\t\telement.tag = \&quot;embed\&quot;;\n\t\t}\n\t} else if(text) {\n\t\tif(type === \&quot;application/pdf\&quot; || type === \&quot;.pdf\&quot;) {\n\t\t\telement.attributes.src = {type: \&quot;string\&quot;, value: \&quot;data:application/pdf;base64,\&quot; + text};\n\t\t\telement.tag = \&quot;embed\&quot;;\n\t\t} else if(type === \&quot;image/svg+xml\&quot; || type === \&quot;.svg\&quot;) {\n\t\t\telement.attributes.src = {type: \&quot;string\&quot;, value: \&quot;data:image/svg+xml,\&quot; + encodeURIComponent(text)};\n\t\t} else {\n\t\t\telement.attributes.src = {type: \&quot;string\&quot;, value: \&quot;data:\&quot; + type + \&quot;;base64,\&quot; + text};\n\t\t}\n\t}\n\tthis.tree = [element];\n};\n\nexports[\&quot;image/svg+xml\&quot;] = ImageParser;\nexports[\&quot;image/jpg\&quot;] = ImageParser;\nexports[\&quot;image/jpeg\&quot;] = ImageParser;\nexports[\&quot;image/png\&quot;] = ImageParser;\nexports[\&quot;image/gif\&quot;] = ImageParser;\nexports[\&quot;application/pdf\&quot;] = ImageParser;\nexports[\&quot;image/x-icon\&quot;] = ImageParser;\n\n})();\n\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/imageparser.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;parser&quot;
        },
        &quot;$:/core/modules/utils/parseutils.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/parseutils.js\ntype: application/javascript\nmodule-type: utils\n\nUtility functions concerned with parsing text into tokens.\n\nMost functions have the following pattern:\n\n* The parameters are:\n** `source`: the source string being parsed\n** `pos`: the current parse position within the string\n** Any further parameters are used to identify the token that is being parsed\n* The return value is:\n** null if the token was not found at the specified position\n** an object representing the token with the following standard fields:\n*** `type`: string indicating the type of the token\n*** `start`: start position of the token in the source string\n*** `end`: end position of the token in the source string\n*** Any further fields required to describe the token\n\nThe exception is `skipWhiteSpace`, which just returns the position after the whitespace.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nLook for a whitespace token. Returns null if not found, otherwise returns {type: \&quot;whitespace\&quot;, start:, end:,}\n*/\nexports.parseWhiteSpace = function(source,pos) {\n\tvar node = {\n\t\ttype: \&quot;whitespace\&quot;,\n\t\tstart: pos\n\t};\n\tvar re = /(\\s)+/g;\n\tre.lastIndex = pos;\n\tvar match = re.exec(source);\n\tif(match &amp;&amp; match.index === pos) {\n\t\tnode.end = pos + match[0].length;\n\t\treturn node;\n\t}\n\treturn null;\n};\n\n/*\nConvenience wrapper for parseWhiteSpace. Returns the position after the whitespace\n*/\nexports.skipWhiteSpace = function(source,pos) {\n\tvar whitespace = $tw.utils.parseWhiteSpace(source,pos);\n\tif(whitespace) {\n\t\treturn whitespace.end;\n\t}\n\treturn pos;\n};\n\n/*\nLook for a given string token. Returns null if not found, otherwise returns {type: \&quot;token\&quot;, value:, start:, end:,}\n*/\nexports.parseTokenString = function(source,pos,token) {\n\tvar match = source.indexOf(token,pos) === pos;\n\tif(match) {\n\t\treturn {\n\t\t\ttype: \&quot;token\&quot;,\n\t\t\tvalue: token,\n\t\t\tstart: pos,\n\t\t\tend: pos + token.length\n\t\t};\n\t}\n\treturn null;\n};\n\n/*\nLook for a token matching a regex. Returns null if not found, otherwise returns {type: \&quot;regexp\&quot;, match:, start:, end:,}\n*/\nexports.parseTokenRegExp = function(source,pos,reToken) {\n\tvar node = {\n\t\ttype: \&quot;regexp\&quot;,\n\t\tstart: pos\n\t};\n\treToken.lastIndex = pos;\n\tnode.match = reToken.exec(source);\n\tif(node.match &amp;&amp; node.match.index === pos) {\n\t\tnode.end = pos + node.match[0].length;\n\t\treturn node;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nLook for a string literal. Returns null if not found, otherwise returns {type: \&quot;string\&quot;, value:, start:, end:,}\n*/\nexports.parseStringLiteral = function(source,pos) {\n\tvar node = {\n\t\ttype: \&quot;string\&quot;,\n\t\tstart: pos\n\t};\n\tvar reString = /(?:\&quot;\&quot;\&quot;([\\s\\S]*?)\&quot;\&quot;\&quot;|\&quot;([^\&quot;]*)\&quot;)|(?:'([^']*)')/g;\n\treString.lastIndex = pos;\n\tvar match = reString.exec(source);\n\tif(match &amp;&amp; match.index === pos) {\n\t\tnode.value = match[1] !== undefined ? match[1] :(\n\t\t\tmatch[2] !== undefined ? match[2] : match[3] \n\t\t\t\t\t);\n\t\tnode.end = pos + match[0].length;\n\t\treturn node;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nLook for a macro invocation parameter. Returns null if not found, or {type: \&quot;macro-parameter\&quot;, name:, value:, start:, end:}\n*/\nexports.parseMacroParameter = function(source,pos) {\n\tvar node = {\n\t\ttype: \&quot;macro-parameter\&quot;,\n\t\tstart: pos\n\t};\n\t// Define our regexp\n\tvar reMacroParameter = /(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\&quot;\&quot;\&quot;([\\s\\S]*?)\&quot;\&quot;\&quot;|\&quot;([^\&quot;]*)\&quot;|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\\s&gt;\&quot;'=]+)))/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the parameter\n\tvar token = $tw.utils.parseTokenRegExp(source,pos,reMacroParameter);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Get the parameter details\n\tnode.value = token.match[2] !== undefined ? token.match[2] : (\n\t\t\t\t\ttoken.match[3] !== undefined ? token.match[3] : (\n\t\t\t\t\t\ttoken.match[4] !== undefined ? token.match[4] : (\n\t\t\t\t\t\t\ttoken.match[5] !== undefined ? token.match[5] : (\n\t\t\t\t\t\t\t\ttoken.match[6] !== undefined ? token.match[6] : (\n\t\t\t\t\t\t\t\t\t\&quot;\&quot;\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\tif(token.match[1]) {\n\t\tnode.name = token.match[1];\n\t}\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n/*\nLook for a macro invocation. Returns null if not found, or {type: \&quot;macrocall\&quot;, name:, parameters:, start:, end:}\n*/\nexports.parseMacroInvocation = function(source,pos) {\n\tvar node = {\n\t\ttype: \&quot;macrocall\&quot;,\n\t\tstart: pos,\n\t\tparams: []\n\t};\n\t// Define our regexps\n\tvar reMacroName = /([^\\s&gt;\&quot;'=]+)/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a double less than sign\n\tvar token = $tw.utils.parseTokenString(source,pos,\&quot;&lt;&lt;\&quot;);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Get the macro name\n\tvar name = $tw.utils.parseTokenRegExp(source,pos,reMacroName);\n\tif(!name) {\n\t\treturn null;\n\t}\n\tnode.name = name.match[1];\n\tpos = name.end;\n\t// Process parameters\n\tvar parameter = $tw.utils.parseMacroParameter(source,pos);\n\twhile(parameter) {\n\t\tnode.params.push(parameter);\n\t\tpos = parameter.end;\n\t\t// Get the next parameter\n\t\tparameter = $tw.utils.parseMacroParameter(source,pos);\n\t}\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a double greater than sign\n\ttoken = $tw.utils.parseTokenString(source,pos,\&quot;&gt;&gt;\&quot;);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n/*\nLook for an HTML attribute definition. Returns null if not found, otherwise returns {type: \&quot;attribute\&quot;, name:, valueType: \&quot;string|indirect|macro\&quot;, value:, start:, end:,}\n*/\nexports.parseAttribute = function(source,pos) {\n\tvar node = {\n\t\tstart: pos\n\t};\n\t// Define our regexps\n\tvar reAttributeName = /([^\\/\\s&gt;\&quot;'=]+)/g,\n\t\treUnquotedAttribute = /([^\\/\\s&lt;&gt;\&quot;'=]+)/g,\n\t\treIndirectValue = /\\{\\{([^\\}]+)\\}\\}/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Get the attribute name\n\tvar name = $tw.utils.parseTokenRegExp(source,pos,reAttributeName);\n\tif(!name) {\n\t\treturn null;\n\t}\n\tnode.name = name.match[1];\n\tpos = name.end;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for an equals sign\n\tvar token = $tw.utils.parseTokenString(source,pos,\&quot;=\&quot;);\n\tif(token) {\n\t\tpos = token.end;\n\t\t// Skip whitespace\n\t\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t\t// Look for a string literal\n\t\tvar stringLiteral = $tw.utils.parseStringLiteral(source,pos);\n\t\tif(stringLiteral) {\n\t\t\tpos = stringLiteral.end;\n\t\t\tnode.type = \&quot;string\&quot;;\n\t\t\tnode.value = stringLiteral.value;\n\t\t} else {\n\t\t\t// Look for an indirect value\n\t\t\tvar indirectValue = $tw.utils.parseTokenRegExp(source,pos,reIndirectValue);\n\t\t\tif(indirectValue) {\n\t\t\t\tpos = indirectValue.end;\n\t\t\t\tnode.type = \&quot;indirect\&quot;;\n\t\t\t\tnode.textReference = indirectValue.match[1];\n\t\t\t} else {\n\t\t\t\t// Look for a unquoted value\n\t\t\t\tvar unquotedValue = $tw.utils.parseTokenRegExp(source,pos,reUnquotedAttribute);\n\t\t\t\tif(unquotedValue) {\n\t\t\t\t\tpos = unquotedValue.end;\n\t\t\t\t\tnode.type = \&quot;string\&quot;;\n\t\t\t\t\tnode.value = unquotedValue.match[1];\n\t\t\t\t} else {\n\t\t\t\t\t// Look for a macro invocation value\n\t\t\t\t\tvar macroInvocation = $tw.utils.parseMacroInvocation(source,pos);\n\t\t\t\t\tif(macroInvocation) {\n\t\t\t\t\t\tpos = macroInvocation.end;\n\t\t\t\t\t\tnode.type = \&quot;macro\&quot;;\n\t\t\t\t\t\tnode.value = macroInvocation;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode.type = \&quot;string\&quot;;\n\t\t\t\t\t\tnode.value = \&quot;true\&quot;;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tnode.type = \&quot;string\&quot;;\n\t\tnode.value = \&quot;true\&quot;;\n\t}\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/parseutils.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/parsers/textparser.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/textparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe plain text parser processes blocks of source text into a degenerate parse tree consisting of a single text node\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar TextParser = function(type,text,options) {\n\tthis.tree = [{\n\t\ttype: \&quot;codeblock\&quot;,\n\t\tattributes: {\n\t\t\tcode: {type: \&quot;string\&quot;, value: text},\n\t\t\tlanguage: {type: \&quot;string\&quot;, value: type}\n\t\t}\n\t}];\n};\n\nexports[\&quot;text/plain\&quot;] = TextParser;\nexports[\&quot;text/x-tiddlywiki\&quot;] = TextParser;\nexports[\&quot;application/javascript\&quot;] = TextParser;\nexports[\&quot;application/json\&quot;] = TextParser;\nexports[\&quot;text/css\&quot;] = TextParser;\nexports[\&quot;application/x-tiddler-dictionary\&quot;] = TextParser;\n\n})();\n\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/textparser.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;parser&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/codeblock.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/codeblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for code blocks. For example:\n\n```\n\t```\n\tThis text will not be //wikified//\n\t```\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;codeblock\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match and get language if defined\n\tthis.matchRegExp = /```([\\w-]*)\\r?\\n/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /(\\r?\\n```$)/mg;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Look for the end of the block\n\treEnd.lastIndex = this.parser.pos;\n\tvar match = reEnd.exec(this.parser.source),\n\t\ttext;\n\t// Process the block\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\t// Return the $codeblock widget\n\treturn [{\n\t\t\ttype: \&quot;codeblock\&quot;,\n\t\t\tattributes: {\n\t\t\t\t\tcode: {type: \&quot;string\&quot;, value: text},\n\t\t\t\t\tlanguage: {type: \&quot;string\&quot;, value: this.match[1]}\n\t\t\t}\n\t}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/codeblock.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/codeinline.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/codeinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for code runs. For example:\n\n```\n\tThis is a `code run`.\n\tThis is another ``code run``\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;codeinline\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(``?)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar reEnd = new RegExp(this.match[1], \&quot;mg\&quot;);\n\t// Look for the end marker\n\treEnd.lastIndex = this.parser.pos;\n\tvar match = reEnd.exec(this.parser.source),\n\t\ttext;\n\t// Process the text\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\treturn [{\n\t\ttype: \&quot;element\&quot;,\n\t\ttag: \&quot;code\&quot;,\n\t\tchildren: [{\n\t\t\ttype: \&quot;text\&quot;,\n\t\t\ttext: text\n\t\t}]\n\t}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/codeinline.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/commentblock.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/commentblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for HTML comments. For example:\n\n```\n&lt;!-- This is a comment --&gt;\n```\n\nNote that the syntax for comments is simplified to an opening \&quot;&lt;!--\&quot; sequence and a closing \&quot;--&gt;\&quot; sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;commentblock\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\tthis.matchRegExp = /\\&lt;!--/mg;\n\tthis.endMatchRegExp = /--\\&gt;/mg;\n};\n\nexports.findNextMatch = function(startPos) {\n\tthis.matchRegExp.lastIndex = startPos;\n\tthis.match = this.matchRegExp.exec(this.parser.source);\n\tif(this.match) {\n\t\tthis.endMatchRegExp.lastIndex = startPos + this.match[0].length;\n\t\tthis.endMatch = this.endMatchRegExp.exec(this.parser.source);\n\t\tif(this.endMatch) {\n\t\t\treturn this.match.index;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.endMatchRegExp.lastIndex;\n\t// Don't return any elements\n\treturn [];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/commentblock.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/commentinline.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/commentinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for HTML comments. For example:\n\n```\n&lt;!-- This is a comment --&gt;\n```\n\nNote that the syntax for comments is simplified to an opening \&quot;&lt;!--\&quot; sequence and a closing \&quot;--&gt;\&quot; sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;commentinline\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\tthis.matchRegExp = /\\&lt;!--/mg;\n\tthis.endMatchRegExp = /--\\&gt;/mg;\n};\n\nexports.findNextMatch = function(startPos) {\n\tthis.matchRegExp.lastIndex = startPos;\n\tthis.match = this.matchRegExp.exec(this.parser.source);\n\tif(this.match) {\n\t\tthis.endMatchRegExp.lastIndex = startPos + this.match[0].length;\n\t\tthis.endMatch = this.endMatchRegExp.exec(this.parser.source);\n\t\tif(this.endMatch) {\n\t\t\treturn this.match.index;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.endMatchRegExp.lastIndex;\n\t// Don't return any elements\n\treturn [];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/commentinline.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/dash.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/dash.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for dashes. For example:\n\n```\nThis is an en-dash: --\n\nThis is an em-dash: ---\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;dash\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /-{2,3}(?!-)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar dash = this.match[0].length === 2 ? \&quot;&amp;ndash;\&quot; : \&quot;&amp;mdash;\&quot;;\n\treturn [{\n\t\ttype: \&quot;entity\&quot;,\n\t\tentity: dash\n\t}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/dash.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/emphasis.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis. For example:\n\n```\n\tThis is ''bold'' text\n\n\tThis is //italic// text\n\n\tThis is __underlined__ text\n\n\tThis is ^^superscript^^ text\n\n\tThis is ,,subscript,, text\n\n\tThis is ~~strikethrough~~ text\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;emphasis\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /''|\\/\\/|__|\\^\\^|,,|~~/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Figure out which element and closing regexp to use\n\tvar tag,reEnd;\n\tswitch(this.match[0]) {\n\t\tcase \&quot;''\&quot;: // Bold\n\t\t\ttag = \&quot;strong\&quot;;\n\t\t\treEnd = /''/mg;\n\t\t\tbreak;\n\t\tcase \&quot;//\&quot;: // Italics\n\t\t\ttag = \&quot;em\&quot;;\n\t\t\treEnd = /\\/\\//mg;\n\t\t\tbreak;\n\t\tcase \&quot;__\&quot;: // Underline\n\t\t\ttag = \&quot;u\&quot;;\n\t\t\treEnd = /__/mg;\n\t\t\tbreak;\n\t\tcase \&quot;^^\&quot;: // Superscript\n\t\t\ttag = \&quot;sup\&quot;;\n\t\t\treEnd = /\\^\\^/mg;\n\t\t\tbreak;\n\t\tcase \&quot;,,\&quot;: // Subscript\n\t\t\ttag = \&quot;sub\&quot;;\n\t\t\treEnd = /,,/mg;\n\t\t\tbreak;\n\t\tcase \&quot;~~\&quot;: // Strikethrough\n\t\t\ttag = \&quot;strike\&quot;;\n\t\t\treEnd = /~~/mg;\n\t\t\tbreak;\n\t}\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(reEnd,{eatTerminator: true});\n\t// Return the classed span\n\treturn [{\n\t\ttype: \&quot;element\&quot;,\n\t\ttag: tag,\n\t\tchildren: tree\n\t}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/emphasis.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/entity.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/entity.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for HTML entities. For example:\n\n```\n\tThis is a copyright symbol: &amp;copy;\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;entity\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(&amp;#?[a-zA-Z0-9]{2,8};)/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar entityString = this.match[1];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Return the entity\n\treturn [{type: \&quot;entity\&quot;, entity: this.match[0]}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/entity.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/extlink.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/extlink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for external links. For example:\n\n```\nAn external link: http://www.tiddlywiki.com/\n\nA suppressed external link: ~http://www.tiddlyspace.com/\n```\n\nExternal links can be suppressed by preceding them with `~`.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;extlink\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /~?(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\\s&lt;&gt;{}\\[\\]`|'\&quot;\\\\^~]+(?:\\/|\\b)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Create the link unless it is suppressed\n\tif(this.match[0].substr(0,1) === \&quot;~\&quot;) {\n\t\treturn [{type: \&quot;text\&quot;, text: this.match[0].substr(1)}];\n\t} else {\n\t\treturn [{\n\t\t\ttype: \&quot;element\&quot;,\n\t\t\ttag: \&quot;a\&quot;,\n\t\t\tattributes: {\n\t\t\t\thref: {type: \&quot;string\&quot;, value: this.match[0]},\n\t\t\t\t\&quot;class\&quot;: {type: \&quot;string\&quot;, value: \&quot;tw-tiddlylink-external\&quot;},\n\t\t\t\ttarget: {type: \&quot;string\&quot;, value: \&quot;_blank\&quot;}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \&quot;text\&quot;, text: this.match[0]\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/extlink.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for block-level filtered transclusion. For example:\n\n```\n{{{ [tag[docs]] }}}\n{{{ [tag[docs]] |tooltip}}}\n{{{ [tag[docs]] ||TemplateTitle}}}\n{{{ [tag[docs]] |tooltip||TemplateTitle}}}\n{{{ [tag[docs]] }}width:40;height:50;}.class.class\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;filteredtranscludeblock\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{\\{([^\\|]+?)(?:\\|([^\\|\\{\\}]+))?(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}([^\\}]*)\\}(?:\\.(\\S+))?(?:\\r?\\n|$)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar filter = this.match[1],\n\t\ttooltip = this.match[2],\n\t\ttemplate = $tw.utils.trim(this.match[3]),\n\t\tstyle = this.match[4],\n\t\tclasses = this.match[5];\n\t// Return the list widget\n\tvar node = {\n\t\ttype: \&quot;list\&quot;,\n\t\tattributes: {\n\t\t\tfilter: {type: \&quot;string\&quot;, value: filter}\n\t\t},\n\t\tisBlock: true\n\t};\n\tif(tooltip) {\n\t\tnode.attributes.tooltip = {type: \&quot;string\&quot;, value: tooltip};\n\t}\n\tif(template) {\n\t\tnode.attributes.template = {type: \&quot;string\&quot;, value: template};\n\t}\n\tif(style) {\n\t\tnode.attributes.style = {type: \&quot;string\&quot;, value: style};\n\t}\n\tif(classes) {\n\t\tnode.attributes[\&quot;itemClass\&quot;] = {type: \&quot;string\&quot;, value: classes.split(\&quot;.\&quot;).join(\&quot; \&quot;)};\n\t}\n\treturn [node];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for inline filtered transclusion. For example:\n\n```\n{{{ [tag[docs]] }}}\n{{{ [tag[docs]] |tooltip}}}\n{{{ [tag[docs]] ||TemplateTitle}}}\n{{{ [tag[docs]] |tooltip||TemplateTitle}}}\n{{{ [tag[docs]] }}width:40;height:50;}.class.class\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;filteredtranscludeinline\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{\\{([^\\|]+?)(?:\\|([^\\|\\{\\}]+))?(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}([^\\}]*)\\}(?:\\.(\\S+))?/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar filter = this.match[1],\n\t\ttooltip = this.match[2],\n\t\ttemplate = $tw.utils.trim(this.match[3]),\n\t\tstyle = this.match[4],\n\t\tclasses = this.match[5];\n\t// Return the list widget\n\tvar node = {\n\t\ttype: \&quot;list\&quot;,\n\t\tattributes: {\n\t\t\tfilter: {type: \&quot;string\&quot;, value: filter}\n\t\t}\n\t};\n\tif(tooltip) {\n\t\tnode.attributes.tooltip = {type: \&quot;string\&quot;, value: tooltip};\n\t}\n\tif(template) {\n\t\tnode.attributes.template = {type: \&quot;string\&quot;, value: template};\n\t}\n\tif(style) {\n\t\tnode.attributes.style = {type: \&quot;string\&quot;, value: style};\n\t}\n\tif(classes) {\n\t\tnode.attributes[\&quot;itemClass\&quot;] = {type: \&quot;string\&quot;, value: classes.split(\&quot;.\&quot;).join(\&quot; \&quot;)};\n\t}\n\treturn [node];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for marking areas with hard line breaks. For example:\n\n```\n\&quot;\&quot;\&quot;\nThis is some text\nThat is set like\nIt is a Poem\nWhen it is\nClearly\nNot\n\&quot;\&quot;\&quot;\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;hardlinebreaks\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\&quot;\&quot;\&quot;(?:\\r?\\n)?/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /(\&quot;\&quot;\&quot;)|(\\r?\\n)/mg,\n\t\ttree = [];\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tdo {\n\t\t// Parse the run up to the terminator\n\t\ttree.push.apply(tree,this.parser.parseInlineRun(reEnd,{eatTerminator: false}));\n\t\t// Redo the terminator match\n\t\treEnd.lastIndex = this.parser.pos;\n\t\tvar match = reEnd.exec(this.parser.source);\n\t\tif(match) {\n\t\t\tthis.parser.pos = reEnd.lastIndex;\n\t\t\t// Add a line break if the terminator was a line break\n\t\t\tif(match[2]) {\n\t\t\t\ttree.push({type: \&quot;element\&quot;, tag: \&quot;br\&quot;});\n\t\t\t}\n\t\t}\n\t} while(match &amp;&amp; !match[1]);\n\t// Return the nodes\n\treturn tree;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/heading.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/heading.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for headings\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;heading\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(!{1,6})/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar headingLevel = this.match[1].length;\n\t// Move past the !s\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse any classes, whitespace and then the heading itself\n\tvar classes = this.parser.parseClasses();\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\tvar tree = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t// Return the heading\n\treturn [{\n\t\ttype: \&quot;element\&quot;,\n\t\ttag: \&quot;h\&quot; + headingLevel, \n\t\tattributes: {\n\t\t\t\&quot;class\&quot;: {type: \&quot;string\&quot;, value: classes.join(\&quot; \&quot;)}\n\t\t},\n\t\tchildren: tree\n\t}];\n};\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/heading.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/horizrule.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/horizrule.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for rules. For example:\n\n```\n---\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;horizrule\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /-{3,}\\r?(?:\\n|$)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\treturn [{type: \&quot;element\&quot;, tag: \&quot;hr\&quot;}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/horizrule.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/html.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/html.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki rule for HTML elements and widgets. For example:\n\n{{{\n&lt;aside&gt;\nThis is an HTML5 aside element\n&lt;/aside&gt;\n\n&lt;$slider target=\&quot;MyTiddler\&quot;&gt;\nThis is a widget invocation\n&lt;/$slider&gt;\n\n}}}\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;html\&quot;;\nexports.types = {inline: true, block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n};\n\nexports.findNextMatch = function(startPos) {\n\t// Find the next tag\n\tthis.nextTag = this.findNextTag(this.parser.source,startPos,{\n\t\trequireLineBreak: this.is.block\n\t});\n\treturn this.nextTag ? this.nextTag.start : undefined;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Retrieve the most recent match so that recursive calls don't overwrite it\n\tvar tag = this.nextTag;\n\tthis.nextTag = null;\n\t// Advance the parser position to past the tag\n\tthis.parser.pos = tag.end;\n\t// Check for an immediately following double linebreak\n\tvar hasLineBreak = !tag.isSelfClosing &amp;&amp; !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\\S\\n]*\\r?\\n(?:[^\\S\\n]*\\r?\\n|$))/g);\n\t// Set whether we're in block mode\n\ttag.isBlock = this.is.block || hasLineBreak;\n\t// Parse the body if we need to\n\tif(!tag.isSelfClosing &amp;&amp; $tw.config.htmlVoidElements.indexOf(tag.tag) === -1) {\n\t\t\tvar reEndString = \&quot;&lt;/\&quot; + $tw.utils.escapeRegExp(tag.tag) + \&quot;&gt;\&quot;,\n\t\t\t\treEnd = new RegExp(\&quot;(\&quot; + reEndString + \&quot;)\&quot;,\&quot;mg\&quot;);\n\t\tif(hasLineBreak) {\n\t\t\ttag.children = this.parser.parseBlocks(reEndString);\n\t\t} else {\n\t\t\ttag.children = this.parser.parseInlineRun(reEnd);\n\t\t}\n\t\treEnd.lastIndex = this.parser.pos;\n\t\tvar endMatch = reEnd.exec(this.parser.source);\n\t\tif(endMatch &amp;&amp; endMatch.index === this.parser.pos) {\n\t\t\tthis.parser.pos = endMatch.index + endMatch[0].length;\n\t\t}\n\t}\n\t// Return the tag\n\treturn [tag];\n};\n\n/*\nLook for an HTML tag. Returns null if not found, otherwise returns {type: \&quot;element\&quot;, name:, attributes: [], isSelfClosing:, start:, end:,}\n*/\nexports.parseTag = function(source,pos,options) {\n\toptions = options || {};\n\tvar token,\n\t\tnode = {\n\t\t\ttype: \&quot;element\&quot;,\n\t\t\tstart: pos,\n\t\t\tattributes: {}\n\t\t};\n\t// Define our regexps\n\tvar reTagName = /([a-zA-Z0-9\\-\\$]+)/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a less than sign\n\ttoken = $tw.utils.parseTokenString(source,pos,\&quot;&lt;\&quot;);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Get the tag name\n\ttoken = $tw.utils.parseTokenRegExp(source,pos,reTagName);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tnode.tag = token.match[1];\n\tif(node.tag.charAt(0) === \&quot;$\&quot;) {\n\t\tnode.type = node.tag.substr(1);\n\t}\n\tpos = token.end;\n\t// Process attributes\n\tvar attribute = $tw.utils.parseAttribute(source,pos);\n\twhile(attribute) {\n\t\tnode.attributes[attribute.name] = attribute;\n\t\tpos = attribute.end;\n\t\t// Get the next attribute\n\t\tattribute = $tw.utils.parseAttribute(source,pos);\n\t}\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a closing slash\n\ttoken = $tw.utils.parseTokenString(source,pos,\&quot;/\&quot;);\n\tif(token) {\n\t\tpos = token.end;\n\t\tnode.isSelfClosing = true;\n\t}\n\t// Look for a greater than sign\n\ttoken = $tw.utils.parseTokenString(source,pos,\&quot;&gt;\&quot;);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Check for a required line break\n\tif(options.requireLineBreak) {\n\t\ttoken = $tw.utils.parseTokenRegExp(source,pos,/([^\\S\\n]*\\r?\\n(?:[^\\S\\n]*\\r?\\n|$))/g);\n\t\tif(!token) {\n\t\t\treturn null;\n\t\t}\n\t}\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\nexports.findNextTag = function(source,pos,options) {\n\t// A regexp for finding candidate HTML tags\n\tvar reLookahead = /&lt;([a-zA-Z\\-\\$]+)/g;\n\t// Find the next candidate\n\treLookahead.lastIndex = pos;\n\tvar match = reLookahead.exec(source);\n\twhile(match) {\n\t\t// Try to parse the candidate as a tag\n\t\tvar tag = this.parseTag(source,match.index,options);\n\t\t// Return success\n\t\tif(tag &amp;&amp; this.isLegalTag(tag)) {\n\t\t\treturn tag;\n\t\t}\n\t\t// Look for the next match\n\t\treLookahead.lastIndex = match.index + 1;\n\t\tmatch = reLookahead.exec(source);\n\t}\n\t// Failed\n\treturn null;\n};\n\nexports.isLegalTag = function(tag) {\n\t// Widgets are always OK\n\tif(tag.type !== \&quot;element\&quot;) {\n\t\treturn true;\n\t// If it's an HTML tag that starts with a dash then it's not legal\n\t} else if(tag.tag.charAt(0) === \&quot;-\&quot;) {\n\t\treturn false;\n\t} else {\n\t\t// Otherwise it's OK\n\t\treturn true;\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/html.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/image.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/image.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for embedding images. For example:\n\n```\n[img[http://tiddlywiki.com/fractalveg.jpg]]\n[img width=23 height=24 [http://tiddlywiki.com/fractalveg.jpg]]\n[img width={{!!width}} height={{!!height}} [http://tiddlywiki.com/fractalveg.jpg]]\n[img[Description of image|http://tiddlywiki.com/fractalveg.jpg]]\n[img[TiddlerTitle]]\n[img[Description of image|TiddlerTitle]]\n```\n\nGenerates the `&lt;$image&gt;` widget.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;image\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n};\n\nexports.findNextMatch = function(startPos) {\n\t// Find the next tag\n\tthis.nextImage = this.findNextImage(this.parser.source,startPos);\n\treturn this.nextImage ? this.nextImage.start : undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.nextImage.end;\n\tvar node = {\n\t\ttype: \&quot;image\&quot;,\n\t\tattributes: this.nextImage.attributes\n\t};\n\treturn [node];\n};\n\n/*\nFind the next image from the current position\n*/\nexports.findNextImage = function(source,pos) {\n\t// A regexp for finding candidate HTML tags\n\tvar reLookahead = /(\\[img)/g;\n\t// Find the next candidate\n\treLookahead.lastIndex = pos;\n\tvar match = reLookahead.exec(source);\n\twhile(match) {\n\t\t// Try to parse the candidate as a tag\n\t\tvar tag = this.parseImage(source,match.index);\n\t\t// Return success\n\t\tif(tag) {\n\t\t\treturn tag;\n\t\t}\n\t\t// Look for the next match\n\t\treLookahead.lastIndex = match.index + 1;\n\t\tmatch = reLookahead.exec(source);\n\t}\n\t// Failed\n\treturn null;\n};\n\n/*\nLook for an image at the specified position. Returns null if not found, otherwise returns {type: \&quot;image\&quot;, attributes: [], isSelfClosing:, start:, end:,}\n*/\nexports.parseImage = function(source,pos) {\n\tvar token,\n\t\tnode = {\n\t\t\ttype: \&quot;image\&quot;,\n\t\t\tstart: pos,\n\t\t\tattributes: {}\n\t\t};\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the `[img`\n\ttoken = $tw.utils.parseTokenString(source,pos,\&quot;[img\&quot;);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Process attributes\n\tif(source.charAt(pos) !== \&quot;[\&quot;) {\n\t\tvar attribute = $tw.utils.parseAttribute(source,pos);\n\t\twhile(attribute) {\n\t\t\tnode.attributes[attribute.name] = attribute;\n\t\t\tpos = attribute.end;\n\t\t\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t\t\tif(source.charAt(pos) !== \&quot;[\&quot;) {\n\t\t\t\t// Get the next attribute\n\t\t\t\tattribute = $tw.utils.parseAttribute(source,pos);\n\t\t\t} else {\n\t\t\t\tattribute = null;\n\t\t\t}\n\t\t}\n\t}\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the `[` after the attributes\n\ttoken = $tw.utils.parseTokenString(source,pos,\&quot;[\&quot;);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Get the source up to the terminating `]]`\n\ttoken = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\\]]*?)\\|)?([^\\]]+?)\\]\\]/g);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\tif(token.match[1]) {\n\t\tnode.attributes.tooltip = {type: \&quot;string\&quot;, value: token.match[1].trim()};\n\t}\n\tnode.attributes.source = {type: \&quot;string\&quot;, value: (token.match[2] || \&quot;\&quot;).trim()};\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/image.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/list.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/list.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for lists. For example:\n\n```\n* This is an unordered list\n* It has two items\n\n# This is a numbered list\n## With a subitem\n# And a third item\n\n; This is a term that is being defined\n: This is the definition of that term\n```\n\nNote that lists can be nested arbitrarily:\n\n```\n#** One\n#* Two\n#** Three\n#**** Four\n#**# Five\n#**## Six\n## Seven\n### Eight\n## Nine\n```\n\nA CSS class can be applied to a list item as follows:\n\n```\n* List item one\n*.active List item two has the class `active`\n* List item three\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;list\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /([\\*#;:&gt;]+)/mg;\n};\n\nvar listTypes = {\n\t\&quot;*\&quot;: {listTag: \&quot;ul\&quot;, itemTag: \&quot;li\&quot;},\n\t\&quot;#\&quot;: {listTag: \&quot;ol\&quot;, itemTag: \&quot;li\&quot;},\n\t\&quot;;\&quot;: {listTag: \&quot;dl\&quot;, itemTag: \&quot;dt\&quot;},\n\t\&quot;:\&quot;: {listTag: \&quot;dl\&quot;, itemTag: \&quot;dd\&quot;},\n\t\&quot;&gt;\&quot;: {listTag: \&quot;blockquote\&quot;, itemTag: \&quot;p\&quot;}\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Array of parse tree nodes for the previous row of the list\n\tvar listStack = [];\n\t// Cycle through the items in the list\n\twhile(true) {\n\t\t// Match the list marker\n\t\tvar reMatch = /([\\*#;:&gt;]+)/mg;\n\t\treMatch.lastIndex = this.parser.pos;\n\t\tvar match = reMatch.exec(this.parser.source);\n\t\tif(!match || match.index !== this.parser.pos) {\n\t\t\tbreak;\n\t\t}\n\t\t// Check whether the list type of the top level matches\n\t\tvar listInfo = listTypes[match[0].charAt(0)];\n\t\tif(listStack.length &gt; 0 &amp;&amp; listStack[0].tag !== listInfo.listTag) {\n\t\t\tbreak;\n\t\t}\n\t\t// Move past the list marker\n\t\tthis.parser.pos = match.index + match[0].length;\n\t\t// Walk through the list markers for the current row\n\t\tfor(var t=0; t&lt;match[0].length; t++) {\n\t\t\tlistInfo = listTypes[match[0].charAt(t)];\n\t\t\t// Remove any stacked up element if we can't re-use it because the list type doesn't match\n\t\t\tif(listStack.length &gt; t &amp;&amp; listStack[t].tag !== listInfo.listTag) {\n\t\t\t\tlistStack.splice(t,listStack.length - t);\n\t\t\t}\n\t\t\t// Construct the list element or reuse the previous one at this level\n\t\t\tif(listStack.length &lt;= t) {\n\t\t\t\tvar listElement = {type: \&quot;element\&quot;, tag: listInfo.listTag, children: [\n\t\t\t\t\t{type: \&quot;element\&quot;, tag: listInfo.itemTag, children: []}\n\t\t\t\t]};\n\t\t\t\t// Link this list element into the last child item of the parent list item\n\t\t\t\tif(t) {\n\t\t\t\t\tvar prevListItem = listStack[t-1].children[listStack[t-1].children.length-1];\n\t\t\t\t\tprevListItem.children.push(listElement);\n\t\t\t\t}\n\t\t\t\t// Save this element in the stack\n\t\t\t\tlistStack[t] = listElement;\n\t\t\t} else if(t === (match[0].length - 1)) {\n\t\t\t\tlistStack[t].children.push({type: \&quot;element\&quot;, tag: listInfo.itemTag, children: []});\n\t\t\t}\n\t\t}\n\t\tif(listStack.length &gt; match[0].length) {\n\t\t\tlistStack.splice(match[0].length,listStack.length - match[0].length);\n\t\t}\n\t\t// Process the body of the list item into the last list item\n\t\tvar lastListChildren = listStack[listStack.length-1].children,\n\t\t\tlastListItem = lastListChildren[lastListChildren.length-1],\n\t\t\tclasses = this.parser.parseClasses();\n\t\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\t\tvar tree = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t\tlastListItem.children.push.apply(lastListItem.children,tree);\n\t\tif(classes.length &gt; 0) {\n\t\t\t$tw.utils.addClassToParseTreeNode(lastListItem,classes.join(\&quot; \&quot;));\n\t\t}\n\t\t// Consume any whitespace following the list item\n\t\tthis.parser.skipWhitespace();\n\t}\n\t// Return the root element of the list\n\treturn [listStack[0]];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/list.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/macrocallblock.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/macrocallblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki rule for block macro calls\n\n```\n&lt;&lt;name value value2&gt;&gt;\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;macrocallblock\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /&lt;&lt;([^&gt;\\s]+)(?:\\s*)((?:[^&gt;]|(?:&gt;(?!&gt;)))*?)&gt;&gt;(?:\\r?\\n|$)/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar macroName = this.match[1],\n\t\tparamString = this.match[2];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar params = [],\n\t\treParam = /\\s*(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\&quot;\&quot;\&quot;([\\s\\S]*?)\&quot;\&quot;\&quot;|\&quot;([^\&quot;]*)\&quot;|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\&quot;'\\s]+)))/mg,\n\t\tparamMatch = reParam.exec(paramString);\n\twhile(paramMatch) {\n\t\t// Process this parameter\n\t\tvar paramInfo = {\n\t\t\tvalue: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6]\n\t\t};\n\t\tif(paramMatch[1]) {\n\t\t\tparamInfo.name = paramMatch[1];\n\t\t}\n\t\tparams.push(paramInfo);\n\t\t// Find the next match\n\t\tparamMatch = reParam.exec(paramString);\n\t}\n\treturn [{\n\t\ttype: \&quot;macrocall\&quot;,\n\t\tname: macroName,\n\t\tparams: params,\n\t\tisBlock: true\n\t}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/macrocallblock.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/macrocallinline.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/macrocallinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki rule for macro calls\n\n```\n&lt;&lt;name value value2&gt;&gt;\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;macrocallinline\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /&lt;&lt;([^\\s&gt;]+)\\s*([\\s\\S]*?)&gt;&gt;/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar macroName = this.match[1],\n\t\tparamString = this.match[2];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar params = [],\n\t\treParam = /\\s*(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\&quot;\&quot;\&quot;([\\s\\S]*?)\&quot;\&quot;\&quot;|\&quot;([^\&quot;]*)\&quot;|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\&quot;'\\s]+)))/mg,\n\t\tparamMatch = reParam.exec(paramString);\n\twhile(paramMatch) {\n\t\t// Process this parameter\n\t\tvar paramInfo = {\n\t\t\tvalue: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5]|| paramMatch[6]\n\t\t};\n\t\tif(paramMatch[1]) {\n\t\t\tparamInfo.name = paramMatch[1];\n\t\t}\n\t\tparams.push(paramInfo);\n\t\t// Find the next match\n\t\tparamMatch = reParam.exec(paramString);\n\t}\n\treturn [{\n\t\ttype: \&quot;macrocall\&quot;,\n\t\tname: macroName,\n\t\tparams: params\n\t}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/macrocallinline.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/macrodef.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/macrodef.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki pragma rule for macro definitions\n\n```\n\\define name(param:defaultvalue,param2:defaultvalue)\ndefinition text, including $param$ markers\n\\end\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;macrodef\&quot;;\nexports.types = {pragma: true};\n\n/*\nInstantiate parse rule\n*/\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\\\define\\s+([^(\\s]+)\\(\\s*([^)]*)\\)(\\r?\\n)?/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Move past the macro name and parameters\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse the parameters\n\tvar paramString = this.match[2],\n\t\tparams = [];\n\tif(paramString !== \&quot;\&quot;) {\n\t\tvar reParam = /\\s*([A-Za-z0-9\\-_]+)(?:\\s*:\\s*(?:\&quot;\&quot;\&quot;([\\s\\S]*?)\&quot;\&quot;\&quot;|\&quot;([^\&quot;]*)\&quot;|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\&quot;'\\s]+)))?/mg,\n\t\t\tparamMatch = reParam.exec(paramString);\n\t\twhile(paramMatch) {\n\t\t\t// Save the parameter details\n\t\t\tvar paramInfo = {name: paramMatch[1]},\n\t\t\t\tdefaultValue = paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6];\n\t\t\tif(defaultValue) {\n\t\t\t\tparamInfo[\&quot;default\&quot;] = defaultValue;\n\t\t\t}\n\t\t\tparams.push(paramInfo);\n\t\t\t// Look for the next parameter\n\t\t\tparamMatch = reParam.exec(paramString);\n\t\t}\n\t}\n\t// Is this a multiline definition?\n\tvar reEnd;\n\tif(this.match[3]) {\n\t\t// If so, the end of the body is marked with \\end\n\t\treEnd = /(\\r?\\n\\\\end\\r?\\n)/mg;\n\t} else {\n\t\t// Otherwise, the end of the definition is marked by the end of the line\n\t\treEnd = /(\\r?\\n)/mg;\n\t}\n\t// Find the end of the definition\n\treEnd.lastIndex = this.parser.pos;\n\tvar text,\n\t\tendMatch = reEnd.exec(this.parser.source);\n\tif(endMatch) {\n\t\ttext = this.parser.source.substring(this.parser.pos,endMatch.index);\n\t\tthis.parser.pos = endMatch.index + endMatch[0].length;\n\t} else {\n\t\t// We didn't find the end of the definition, so we'll make it blank\n\t\ttext = \&quot;\&quot;;\n\t}\n\t// Save the macro definition\n\treturn [{\n\t\ttype: \&quot;macrodef\&quot;,\n\t\tname: this.match[1],\n\t\tparams: params,\n\t\ttext: text\n\t}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/macrodef.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/prettyextlink.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/prettyextlink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for external links. For example:\n\n```\n[ext[http://tiddlywiki.com/fractalveg.jpg]]\n[ext[Tooltip|http://tiddlywiki.com/fractalveg.jpg]]\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;prettyextlink\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n};\n\nexports.findNextMatch = function(startPos) {\n\t// Find the next tag\n\tthis.nextLink = this.findNextLink(this.parser.source,startPos);\n\treturn this.nextLink ? this.nextLink.start : undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.nextLink.end;\n\treturn [this.nextLink];\n};\n\n/*\nFind the next link from the current position\n*/\nexports.findNextLink = function(source,pos) {\n\t// A regexp for finding candidate links\n\tvar reLookahead = /(\\[ext\\[)/g;\n\t// Find the next candidate\n\treLookahead.lastIndex = pos;\n\tvar match = reLookahead.exec(source);\n\twhile(match) {\n\t\t// Try to parse the candidate as a link\n\t\tvar link = this.parseLink(source,match.index);\n\t\t// Return success\n\t\tif(link) {\n\t\t\treturn link;\n\t\t}\n\t\t// Look for the next match\n\t\treLookahead.lastIndex = match.index + 1;\n\t\tmatch = reLookahead.exec(source);\n\t}\n\t// Failed\n\treturn null;\n};\n\n/*\nLook for an link at the specified position. Returns null if not found, otherwise returns {type: \&quot;element\&quot;, tag: \&quot;a\&quot;, attributes: [], isSelfClosing:, start:, end:,}\n*/\nexports.parseLink = function(source,pos) {\n\tvar token,\n\t\ttextNode = {\n\t\t\ttype: \&quot;text\&quot;\n\t\t},\n\t\tnode = {\n\t\t\ttype: \&quot;element\&quot;,\n\t\t\ttag: \&quot;a\&quot;,\n\t\t\tstart: pos,\n\t\t\tattributes: {\n\t\t\t\t\&quot;class\&quot;: {type: \&quot;string\&quot;, value: \&quot;tw-tiddlylink-external\&quot;},\n\t\t\t},\n\t\t\tchildren: [textNode]\n\t\t};\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the `[ext[`\n\ttoken = $tw.utils.parseTokenString(source,pos,\&quot;[ext[\&quot;);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Look ahead for the terminating `]]`\n\tvar closePos = source.indexOf(\&quot;]]\&quot;,pos);\n\tif(closePos === -1) {\n\t\treturn null;\n\t}\n\t// Look for a `|` separating the tooltip\n\tvar splitPos = source.indexOf(\&quot;|\&quot;,pos);\n\tif(splitPos === -1 || splitPos &gt; closePos) {\n\t\tsplitPos = null;\n\t}\n\t// Pull out the tooltip and URL\n\tvar tooltip, URL;\n\tif(splitPos) {\n\t\tURL = source.substring(splitPos + 1,closePos).trim();\n\t\ttextNode.text = source.substring(pos,splitPos).trim();\n\t} else {\n\t\tURL = source.substring(pos,closePos).trim();\n\t\ttextNode.text = URL;\n\t}\n\tnode.attributes.href = {type: \&quot;string\&quot;, value: URL};\n\tnode.attributes.target = {type: \&quot;string\&quot;, value: \&quot;_blank\&quot;};\n\t// Update the end position\n\tnode.end = closePos + 2;\n\treturn node;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/prettyextlink.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/prettylink.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/prettylink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for pretty links. For example:\n\n```\n[[Introduction]]\n\n[[Link description|TiddlerTitle]]\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;prettylink\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\[\\[(.*?)(?:\\|(.*?))?\\]\\]/mg;\n};\n\nvar isLinkExternal = function(to) {\n\tvar externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\\s&lt;&gt;{}\\[\\]`|'\&quot;\\\\^~]+(?:\\/|\\b)/i;\n\treturn externalRegExp.test(to);\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Process the link\n\tvar text = this.match[1],\n\t\tlink = this.match[2] || text;\n\tif(isLinkExternal(link)) {\n\t\treturn [{\n\t\t\ttype: \&quot;element\&quot;,\n\t\t\ttag: \&quot;a\&quot;,\n\t\t\tattributes: {\n\t\t\t\thref: {type: \&quot;string\&quot;, value: link},\n\t\t\t\t\&quot;class\&quot;: {type: \&quot;string\&quot;, value: \&quot;tw-tiddlylink-external\&quot;},\n\t\t\t\ttarget: {type: \&quot;string\&quot;, value: \&quot;_blank\&quot;}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \&quot;text\&quot;, text: text\n\t\t\t}]\n\t\t}];\n\t} else {\n\t\treturn [{\n\t\t\ttype: \&quot;link\&quot;,\n\t\t\tattributes: {\n\t\t\t\tto: {type: \&quot;string\&quot;, value: link}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \&quot;text\&quot;, text: text\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/prettylink.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/quoteblock.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/quoteblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for quote blocks. For example:\n\n```\n\t&lt;&lt;&lt;.optionalClass(es) optional cited from\n\ta quote\n\t&lt;&lt;&lt;\n\t\n\t&lt;&lt;&lt;.optionalClass(es)\n\ta quote\n\t&lt;&lt;&lt; optional cited from\n```\n\nQuotes can be quoted by putting more &lt;s\n\n```\n\t&lt;&lt;&lt;\n\tQuote Level 1\n\t\n\t&lt;&lt;&lt;&lt;\n\tQuoteLevel 2\n\t&lt;&lt;&lt;&lt;\n\t\n\t&lt;&lt;&lt;\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;quoteblock\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(&lt;&lt;&lt;+)/mg;\n};\n\nexports.parse = function() {\n\tvar classes = [\&quot;tw-quote\&quot;];\n\t// Get all the details of the match\n\tvar reEndString = \&quot;^\&quot; + this.match[1] + \&quot;(?!&lt;)\&quot;;\n\t// Move past the &lt;s\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t\n\t// Parse any classes, whitespace and then the optional cite itself\n\tclasses.push.apply(classes, this.parser.parseClasses());\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\tvar cite = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\n\t// before handling the cite, parse the body of the quote\n\tvar tree= this.parser.parseBlocks(reEndString);\n\t// If we got a cite, put it before the text\n\tif(cite.length &gt; 0) {\n\t\ttree.unshift({\n\t\t\ttype: \&quot;element\&quot;,\n\t\t\ttag: \&quot;cite\&quot;,\n\t\t\tchildren: cite\n\t\t});\n\t}\n\n\t// Parse any optional cite\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\tvar cite = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t// If we got a cite, push it\n\tif(cite.length &gt; 0) {\n\t\ttree.push({\n\t\t\ttype: \&quot;element\&quot;,\n\t\t\ttag: \&quot;cite\&quot;,\n\t\t\tchildren: cite\n\t\t});\n\t}\n\n\t// Return the blockquote element\n\treturn [{\n\t\ttype: \&quot;element\&quot;,\n\t\ttag: \&quot;blockquote\&quot;,\n\t\tattributes: {\n\t\t\tclass: { type: \&quot;string\&quot;, value: classes.join(\&quot; \&quot;) },\n\t\t},\n\t\tchildren: tree\n\t}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/quoteblock.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/rules.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/rules.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki pragma rule for rules specifications\n\n```\n\\rules except ruleone ruletwo rulethree\n\\rules only ruleone ruletwo rulethree\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;rules\&quot;;\nexports.types = {pragma: true};\n\n/*\nInstantiate parse rule\n*/\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\\\rules[^\\S\\n]/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Move past the pragma invocation\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse whitespace delimited tokens terminated by a line break\n\tvar reMatch = /[^\\S\\n]*(\\S+)|(\\r?\\n)/mg,\n\t\ttokens = [];\n\treMatch.lastIndex = this.parser.pos;\n\tvar match = reMatch.exec(this.parser.source);\n\twhile(match &amp;&amp; match.index === this.parser.pos) {\n\t\tthis.parser.pos = reMatch.lastIndex;\n\t\t// Exit if we've got the line break\n\t\tif(match[2]) {\n\t\t\tbreak;\n\t\t}\n\t\t// Process the token\n\t\tif(match[1]) {\n\t\t\ttokens.push(match[1]);\n\t\t}\n\t\t// Match the next token\n\t\tmatch = reMatch.exec(this.parser.source);\n\t}\n\t// Process the tokens\n\tif(tokens.length &gt; 0) {\n\t\tthis.parser.amendRules(tokens[0],tokens.slice(1));\n\t}\n\t// No parse tree nodes to return\n\treturn [];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/rules.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/styleblock.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/styleblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for assigning styles and classes to paragraphs and other blocks. For example:\n\n```\n@@.myClass\n@@background-color:red;\nThis paragraph will have the CSS class `myClass`.\n\n* The `&lt;ul&gt;` around this list will also have the class `myClass`\n* List item 2\n\n@@\n```\n\nNote that classes and styles can be mixed subject to the rule that styles must precede classes. For example\n\n```\n@@.myFirstClass.mySecondClass\n@@width:100px;.myThirdClass\nThis is a paragraph\n@@\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;styleblock\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /@@((?:[^\\.\\r\\n\\s:]+:[^\\r\\n;]+;)+)?(?:\\.([^\\r\\n\\s]+))?\\r?\\n/mg;\n};\n\nexports.parse = function() {\n\tvar reEndString = \&quot;^@@(?:\\\\r?\\\\n)?\&quot;;\n\tvar classes = [], styles = [];\n\tdo {\n\t\t// Get the class and style\n\t\tif(this.match[1]) {\n\t\t\tstyles.push(this.match[1]);\n\t\t}\n\t\tif(this.match[2]) {\n\t\t\tclasses.push(this.match[2].split(\&quot;.\&quot;).join(\&quot; \&quot;));\n\t\t}\n\t\t// Move past the match\n\t\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t\t// Look for another line of classes and styles\n\t\tthis.match = this.matchRegExp.exec(this.parser.source);\n\t} while(this.match &amp;&amp; this.match.index === this.parser.pos);\n\t// Parse the body\n\tvar tree = this.parser.parseBlocks(reEndString);\n\tfor(var t=0; t&lt;tree.length; t++) {\n\t\tif(classes.length &gt; 0) {\n\t\t\t$tw.utils.addClassToParseTreeNode(tree[t],classes.join(\&quot; \&quot;));\n\t\t}\n\t\tif(styles.length &gt; 0) {\n\t\t\t$tw.utils.addAttributeToParseTreeNode(tree[t],\&quot;style\&quot;,styles.join(\&quot;\&quot;));\n\t\t}\n\t}\n\treturn tree;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/styleblock.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/styleinline.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/styleinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for assigning styles and classes to inline runs. For example:\n\n```\n@@.myClass This is some text with a class@@\n@@background-color:red;This is some text with a background colour@@\n@@width:100px;.myClass This is some text with a class and a width@@\n```\n\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;styleinline\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /@@((?:[^\\.\\r\\n\\s:]+:[^\\r\\n;]+;)+)?(\\.(?:[^\\r\\n\\s]+)\\s+)?/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /@@/g;\n\t// Get the styles and class\n\tvar stylesString = this.match[1],\n\t\tclassString = this.match[2] ? this.match[2].split(\&quot;.\&quot;).join(\&quot; \&quot;) : undefined;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse the run up to the terminator\n\tvar tree = this.parser.parseInlineRun(reEnd,{eatTerminator: true});\n\t// Return the classed span\n\tvar node = {\n\t\ttype: \&quot;element\&quot;,\n\t\ttag: \&quot;span\&quot;,\n\t\tattributes: {\n\t\t\t\&quot;class\&quot;: {type: \&quot;string\&quot;, value: \&quot;tw-inline-style\&quot;}\n\t\t},\n\t\tchildren: tree\n\t};\n\tif(classString) {\n\t\t$tw.utils.addClassToParseTreeNode(node,classString);\n\t}\n\tif(stylesString) {\n\t\t$tw.utils.addAttributeToParseTreeNode(node,\&quot;style\&quot;,stylesString);\n\t}\n\treturn [node];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/styleinline.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/table.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/table.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for tables.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;table\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\|(?:[^\\n]*)\\|(?:[fhck]?)\\r?(?:\\n|$)/mg;\n};\n\nvar processRow = function(prevColumns) {\n\tvar cellRegExp = /(?:\\|([^\\n\\|]*)\\|)|(\\|[fhck]?\\r?(?:\\n|$))/mg,\n\t\tcellTermRegExp = /((?:\\x20*)\\|)/mg,\n\t\ttree = [],\n\t\tcol = 0,\n\t\tcolSpanCount = 1,\n\t\tprevCell;\n\t// Match a single cell\n\tcellRegExp.lastIndex = this.parser.pos;\n\tvar cellMatch = cellRegExp.exec(this.parser.source);\n\twhile(cellMatch &amp;&amp; cellMatch.index === this.parser.pos) {\n\t\tif(cellMatch[1] === \&quot;~\&quot;) {\n\t\t\t// Rowspan\n\t\t\tvar last = prevColumns[col];\n\t\t\tif(last) {\n\t\t\t\tlast.rowSpanCount++;\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\&quot;rowspan\&quot;,last.rowSpanCount);\n\t\t\t\tvar vAlign = $tw.utils.getAttributeValueFromParseTreeNode(last.element,\&quot;valign\&quot;,\&quot;center\&quot;);\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\&quot;valign\&quot;,vAlign);\n\t\t\t\tif(colSpanCount &gt; 1) {\n\t\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\&quot;colspan\&quot;,colSpanCount);\n\t\t\t\t\tcolSpanCount = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Move to just before the `|` terminating the cell\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t} else if(cellMatch[1] === \&quot;&gt;\&quot;) {\n\t\t\t// Colspan\n\t\t\tcolSpanCount++;\n\t\t\t// Move to just before the `|` terminating the cell\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t} else if(cellMatch[1] === \&quot;&lt;\&quot; &amp;&amp; prevCell) {\n\t\t\tcolSpanCount = 1 + $tw.utils.getAttributeValueFromParseTreeNode(prevCell,\&quot;colspan\&quot;,1);\n\t\t\t$tw.utils.addAttributeToParseTreeNode(prevCell,\&quot;colspan\&quot;,colSpanCount);\n\t\t\tcolSpanCount = 1;\n\t\t\t// Move to just before the `|` terminating the cell\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t} else if(cellMatch[2]) {\n\t\t\t// End of row\n\t\t\tif(prevCell &amp;&amp; colSpanCount &gt; 1) {\n\t\t\t\tif(prevCell.attributes &amp;&amp; prevCell.attributes &amp;&amp; prevCell.attributes.colspan) {\n\t\t\t\t\t\tcolSpanCount += prevCell.attributes.colspan.value;\n\t\t\t\t} else {\n\t\t\t\t\tcolSpanCount -= 1;\n\t\t\t\t}\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(prevCell,\&quot;colspan\&quot;,colSpanCount);\n\t\t\t}\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t\tbreak;\n\t\t} else {\n\t\t\t// For ordinary cells, step beyond the opening `|`\n\t\t\tthis.parser.pos++;\n\t\t\t// Look for a space at the start of the cell\n\t\t\tvar spaceLeft = false,\n\t\t\t\tvAlign = null;\n\t\t\tif(this.parser.source.substr(this.parser.pos).search(/^\\^([^\\^]|\\^\\^)/) === 0) {\n\t\t\t\tvAlign = \&quot;top\&quot;;\n\t\t\t} else if(this.parser.source.substr(this.parser.pos).search(/^,([^,]|,,)/) === 0) {\n\t\t\t\tvAlign = \&quot;bottom\&quot;;\n\t\t\t}\n\t\t\tif(vAlign) {\n\t\t\t\tthis.parser.pos++;\n\t\t\t}\n\t\t\tvar chr = this.parser.source.substr(this.parser.pos,1);\n\t\t\twhile(chr === \&quot; \&quot;) {\n\t\t\t\tspaceLeft = true;\n\t\t\t\tthis.parser.pos++;\n\t\t\t\tchr = this.parser.source.substr(this.parser.pos,1);\n\t\t\t}\n\t\t\t// Check whether this is a heading cell\n\t\t\tvar cell;\n\t\t\tif(chr === \&quot;!\&quot;) {\n\t\t\t\tthis.parser.pos++;\n\t\t\t\tcell = {type: \&quot;element\&quot;, tag: \&quot;th\&quot;, children: []};\n\t\t\t} else {\n\t\t\t\tcell = {type: \&quot;element\&quot;, tag: \&quot;td\&quot;, children: []};\n\t\t\t}\n\t\t\ttree.push(cell);\n\t\t\t// Record information about this cell\n\t\t\tprevCell = cell;\n\t\t\tprevColumns[col] = {rowSpanCount:1,element:cell};\n\t\t\t// Check for a colspan\n\t\t\tif(colSpanCount &gt; 1) {\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\&quot;colspan\&quot;,colSpanCount);\n\t\t\t\tcolSpanCount = 1;\n\t\t\t}\n\t\t\t// Parse the cell\n\t\t\tcell.children = this.parser.parseInlineRun(cellTermRegExp,{eatTerminator: true});\n\t\t\t// Set the alignment for the cell\n\t\t\tif(vAlign) {\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\&quot;valign\&quot;,vAlign);\n\t\t\t}\n\t\t\tif(this.parser.source.substr(this.parser.pos - 2,1) === \&quot; \&quot;) { // spaceRight\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\&quot;align\&quot;,spaceLeft ? \&quot;center\&quot; : \&quot;left\&quot;);\n\t\t\t} else if(spaceLeft) {\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\&quot;align\&quot;,\&quot;right\&quot;);\n\t\t\t}\n\t\t\t// Move back to the closing `|`\n\t\t\tthis.parser.pos--;\n\t\t}\n\t\tcol++;\n\t\tcellRegExp.lastIndex = this.parser.pos;\n\t\tcellMatch = cellRegExp.exec(this.parser.source);\n\t}\n\treturn tree;\n};\n\nexports.parse = function() {\n\tvar rowContainerTypes = {\&quot;c\&quot;:\&quot;caption\&quot;, \&quot;h\&quot;:\&quot;thead\&quot;, \&quot;\&quot;:\&quot;tbody\&quot;, \&quot;f\&quot;:\&quot;tfoot\&quot;},\n\t\ttable = {type: \&quot;element\&quot;, tag: \&quot;table\&quot;, children: []},\n\t\trowRegExp = /^\\|([^\\n]*)\\|([fhck]?)\\r?(?:\\n|$)/mg,\n\t\trowTermRegExp = /(\\|(?:[fhck]?)\\r?(?:\\n|$))/mg,\n\t\tprevColumns = [],\n\t\tcurrRowType,\n\t\trowContainer,\n\t\trowCount = 0;\n\t// Match the row\n\trowRegExp.lastIndex = this.parser.pos;\n\tvar rowMatch = rowRegExp.exec(this.parser.source);\n\twhile(rowMatch &amp;&amp; rowMatch.index === this.parser.pos) {\n\t\tvar rowType = rowMatch[2];\n\t\t// Check if it is a class assignment\n\t\tif(rowType === \&quot;k\&quot;) {\n\t\t\t$tw.utils.addClassToParseTreeNode(table,rowMatch[1]);\n\t\t\tthis.parser.pos = rowMatch.index + rowMatch[0].length;\n\t\t} else {\n\t\t\t// Otherwise, create a new row if this one is of a different type\n\t\t\tif(rowType !== currRowType) {\n\t\t\t\trowContainer = {type: \&quot;element\&quot;, tag: rowContainerTypes[rowType], children: []};\n\t\t\t\ttable.children.push(rowContainer);\n\t\t\t\tcurrRowType = rowType;\n\t\t\t}\n\t\t\t// Is this a caption row?\n\t\t\tif(currRowType === \&quot;c\&quot;) {\n\t\t\t\t// If so, move past the opening `|` of the row\n\t\t\t\tthis.parser.pos++;\n\t\t\t\t// Move the caption to the first row if it isn't already\n\t\t\t\tif(table.children.length !== 1) {\n\t\t\t\t\ttable.children.pop(); // Take rowContainer out of the children array\n\t\t\t\t\ttable.children.splice(0,0,rowContainer); // Insert it at the bottom\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// Set the alignment - TODO: figure out why TW did this\n//\t\t\t\trowContainer.attributes.align = rowCount === 0 ? \&quot;top\&quot; : \&quot;bottom\&quot;;\n\t\t\t\t// Parse the caption\n\t\t\t\trowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true});\n\t\t\t} else {\n\t\t\t\t// Create the row\n\t\t\t\tvar theRow = {type: \&quot;element\&quot;, tag: \&quot;tr\&quot;, children: []};\n\t\t\t\t$tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? \&quot;oddRow\&quot; : \&quot;evenRow\&quot;);\n\t\t\t\trowContainer.children.push(theRow);\n\t\t\t\t// Process the row\n\t\t\t\ttheRow.children = processRow.call(this,prevColumns);\n\t\t\t\tthis.parser.pos = rowMatch.index + rowMatch[0].length;\n\t\t\t\t// Increment the row count\n\t\t\t\trowCount++;\n\t\t\t}\n\t\t}\n\t\trowMatch = rowRegExp.exec(this.parser.source);\n\t}\n\treturn [table];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/table.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/transcludeblock.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/transcludeblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for block-level transclusion. For example:\n\n```\n{{MyTiddler}}\n{{MyTiddler||TemplateTitle}}\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;transcludeblock\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{([^\\{\\}\\|]*)(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}(?:\\r?\\n|$)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar template = $tw.utils.trim(this.match[2]),\n\t\ttextRef = $tw.utils.trim(this.match[1]);\n\t// Prepare the transclude widget\n\tvar transcludeNode = {\n\t\t\ttype: \&quot;transclude\&quot;,\n\t\t\tattributes: {},\n\t\t\tisBlock: true\n\t\t};\n\t// Prepare the tiddler widget\n\tif(textRef) {\n\t\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\t\ttargetTitle = tr.title,\n\t\t\ttargetField = tr.field,\n\t\t\ttargetIndex = tr.index,\n\t\t\ttiddlerNode = {\n\t\t\t\ttype: \&quot;tiddler\&quot;,\n\t\t\t\tattributes: {\n\t\t\t\t\ttiddler: {type: \&quot;string\&quot;, value: targetTitle}\n\t\t\t\t},\n\t\t\t\tisBlock: true,\n\t\t\t\tchildren: [transcludeNode]\n\t\t\t};\n\t}\n\tif(template) {\n\t\ttranscludeNode.attributes.tiddler = {type: \&quot;string\&quot;, value: template};\n\t\tif(textRef) {\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t} else {\n\t\tif(textRef) {\n\t\t\ttranscludeNode.attributes.tiddler = {type: \&quot;string\&quot;, value: targetTitle};\n\t\t\tif(targetField) {\n\t\t\t\ttranscludeNode.attributes.field = {type: \&quot;string\&quot;, value: targetField};\n\t\t\t}\n\t\t\tif(targetIndex) {\n\t\t\t\ttranscludeNode.attributes.index = {type: \&quot;string\&quot;, value: targetIndex};\n\t\t\t}\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/transcludeblock.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/transcludeinline.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/transcludeinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for inline-level transclusion. For example:\n\n```\n{{MyTiddler}}\n{{MyTiddler||TemplateTitle}}\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;transcludeinline\&quot;;\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{([^\\{\\}\\|]*)(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar template = $tw.utils.trim(this.match[2]),\n\t\ttextRef = $tw.utils.trim(this.match[1]);\n\t// Prepare the transclude widget\n\tvar transcludeNode = {\n\t\t\ttype: \&quot;transclude\&quot;,\n\t\t\tattributes: {}\n\t\t};\n\t// Prepare the tiddler widget\n\tif(textRef) {\n\t\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\t\ttargetTitle = tr.title,\n\t\t\ttargetField = tr.field,\n\t\t\ttargetIndex = tr.index,\n\t\t\ttiddlerNode = {\n\t\t\t\ttype: \&quot;tiddler\&quot;,\n\t\t\t\tattributes: {\n\t\t\t\t\ttiddler: {type: \&quot;string\&quot;, value: targetTitle}\n\t\t\t\t},\n\t\t\t\tchildren: [transcludeNode]\n\t\t\t};\n\t}\n\tif(template) {\n\t\ttranscludeNode.attributes.tiddler = {type: \&quot;string\&quot;, value: template};\n\t\tif(textRef) {\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t} else {\n\t\tif(textRef) {\n\t\t\ttranscludeNode.attributes.tiddler = {type: \&quot;string\&quot;, value: targetTitle};\n\t\t\tif(targetField) {\n\t\t\t\ttranscludeNode.attributes.field = {type: \&quot;string\&quot;, value: targetField};\n\t\t\t}\n\t\t\tif(targetIndex) {\n\t\t\t\ttranscludeNode.attributes.index = {type: \&quot;string\&quot;, value: targetIndex};\n\t\t\t}\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/transcludeinline.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/typedblock.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/typedblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for typed blocks. For example:\n\n```\n$$$.js\nThis will be rendered as JavaScript\n$$$\n\n$$$.svg\n&lt;svg xmlns=\&quot;http://www.w3.org/2000/svg\&quot; width=\&quot;150\&quot; height=\&quot;100\&quot;&gt;\n  &lt;circle cx=\&quot;100\&quot; cy=\&quot;50\&quot; r=\&quot;40\&quot; stroke=\&quot;black\&quot; stroke-width=\&quot;2\&quot; fill=\&quot;red\&quot; /&gt;\n&lt;/svg&gt;\n$$$\n\n$$$text/vnd.tiddlywiki&gt;text/html\nThis will be rendered as an //HTML representation// of WikiText\n$$$\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;);\n\nexports.name = \&quot;typedblock\&quot;;\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\$\\$\\$([^ &gt;\\r\\n]*)(?: *&gt; *([^ \\r\\n]+))?\\r?\\n/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /\\r?\\n\\$\\$\\$\\r?(?:\\n|$)/mg;\n\t// Save the type\n\tvar parseType = this.match[1],\n\t\trenderType = this.match[2];\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Look for the end of the block\n\treEnd.lastIndex = this.parser.pos;\n\tvar match = reEnd.exec(this.parser.source),\n\t\ttext;\n\t// Process the block\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\t// Parse the block according to the specified type\n\tvar parser = this.parser.wiki.parseText(parseType,text,{defaultType: \&quot;text/plain\&quot;});\n\t// If there's no render type, just return the parse tree\n\tif(!renderType) {\n\t\treturn parser.tree;\n\t} else {\n\t\t// Otherwise, render to the rendertype and return in a &lt;PRE&gt; tag\n\t\tvar widgetNode = this.parser.wiki.makeWidget(parser),\n\t\t\tcontainer = $tw.fakeDocument.createElement(\&quot;div\&quot;);\n\t\twidgetNode.render(container,null);\n\t\tvar text = renderType === \&quot;text/html\&quot; ? container.innerHTML : container.textContent;\n\t\treturn [{\n\t\t\ttype: \&quot;element\&quot;,\n\t\t\ttag: \&quot;pre\&quot;,\n\t\t\tchildren: [{\n\t\t\t\ttype: \&quot;text\&quot;,\n\t\t\t\ttext: text\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/typedblock.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/wikilink.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/wikilink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for wiki links. For example:\n\n```\nAWikiLink\nAnotherLink\n~SuppressedLink\n```\n\nPrecede a camel case word with `~` to prevent it from being recognised as a link.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.name = \&quot;wikilink\&quot;;\nexports.types = {inline: true};\n\nvar textPrimitives = {\n\tupperLetter: \&quot;[A-Z\\u00c0-\\u00de\\u0150\\u0170]\&quot;,\n\tlowerLetter: \&quot;[a-z0-9_\\\\-\\u00df-\\u00ff\\u0151\\u0171]\&quot;,\n\tanyLetter:  \&quot;[A-Za-z0-9_\\\\-\\u00c0-\\u00de\\u00df-\\u00ff\\u0150\\u0170\\u0151\\u0171]\&quot;,\n\tanyLetterStrict: \&quot;[A-Za-z0-9\\u00c0-\\u00de\\u00df-\\u00ff\\u0150\\u0170\\u0151\\u0171]\&quot;\n};\n\ntextPrimitives.unWikiLink = \&quot;~\&quot;;\ntextPrimitives.wikiLink = textPrimitives.upperLetter + \&quot;+\&quot; +\n\ttextPrimitives.lowerLetter + \&quot;+\&quot; +\n\ttextPrimitives.upperLetter +\n\ttextPrimitives.anyLetter + \&quot;*\&quot;;\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = new RegExp(textPrimitives.unWikiLink + \&quot;?\&quot; + textPrimitives.wikiLink,\&quot;mg\&quot;);\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get the details of the match\n\tvar linkText = this.match[0];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// If the link starts with the unwikilink character then just output it as plain text\n\tif(linkText.substr(0,1) === textPrimitives.unWikiLink) {\n\t\treturn [{type: \&quot;text\&quot;, text: linkText.substr(1)}];\n\t}\n\t// If the link has been preceded with a letter then don't treat it as a link\n\tif(this.match.index &gt; 0) {\n\t\tvar preRegExp = new RegExp(textPrimitives.anyLetterStrict,\&quot;mg\&quot;);\n\t\tpreRegExp.lastIndex = this.match.index-1;\n\t\tvar preMatch = preRegExp.exec(this.parser.source);\n\t\tif(preMatch &amp;&amp; preMatch.index === this.match.index-1) {\n\t\t\treturn [{type: \&quot;text\&quot;, text: linkText}];\n\t\t}\n\t}\n\treturn [{\n\t\ttype: \&quot;link\&quot;,\n\t\tattributes: {\n\t\t\tto: {type: \&quot;string\&quot;, value: linkText}\n\t\t},\n\t\tchildren: [{\n\t\t\ttype: \&quot;text\&quot;,\n\t\t\ttext: linkText\n\t\t}]\n\t}];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/wikilink.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikirule&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/wikiparser.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/wikiparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe wiki text parser processes blocks of source text into a parse tree.\n\nThe parse tree is made up of nested arrays of these JavaScript objects:\n\n\t{type: \&quot;element\&quot;, tag: &lt;string&gt;, attributes: {}, children: []} - an HTML element\n\t{type: \&quot;text\&quot;, text: &lt;string&gt;} - a text node\n\t{type: \&quot;entity\&quot;, value: &lt;string&gt;} - an entity\n\t{type: \&quot;raw\&quot;, html: &lt;string&gt;} - raw HTML\n\nAttributes are stored as hashmaps of the following objects:\n\n\t{type: \&quot;string\&quot;, value: &lt;string&gt;} - literal string\n\t{type: \&quot;indirect\&quot;, textReference: &lt;textReference&gt;} - indirect through a text reference\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar WikiParser = function(type,text,options) {\n\tthis.wiki = options.wiki;\n\t// Initialise the classes if we don't have them already\n\tif(!this.pragmaRuleClasses) {\n\t\tWikiParser.prototype.pragmaRuleClasses = $tw.modules.createClassesFromModules(\&quot;wikirule\&quot;,\&quot;pragma\&quot;,$tw.WikiRuleBase);\n\t}\n\tif(!this.blockRuleClasses) {\n\t\tWikiParser.prototype.blockRuleClasses = $tw.modules.createClassesFromModules(\&quot;wikirule\&quot;,\&quot;block\&quot;,$tw.WikiRuleBase);\n\t}\n\tif(!this.inlineRuleClasses) {\n\t\tWikiParser.prototype.inlineRuleClasses = $tw.modules.createClassesFromModules(\&quot;wikirule\&quot;,\&quot;inline\&quot;,$tw.WikiRuleBase);\n\t}\n\t// Save the parse text\n\tthis.type = type || \&quot;text/vnd.tiddlywiki\&quot;;\n\tthis.source = text || \&quot;\&quot;;\n\tthis.sourceLength = this.source.length;\n\t// Set current parse position\n\tthis.pos = 0;\n\t// Instantiate the pragma parse rules\n\tthis.pragmaRules = this.instantiateRules(this.pragmaRuleClasses,\&quot;pragma\&quot;,0);\n\t// Instantiate the parser block and inline rules\n\tthis.blockRules = this.instantiateRules(this.blockRuleClasses,\&quot;block\&quot;,0);\n\tthis.inlineRules = this.instantiateRules(this.inlineRuleClasses,\&quot;inline\&quot;,0);\n\t// Parse any pragmas\n\tthis.tree = this.parsePragmas();\n\t// Parse the text into inline runs or blocks\n\tif(options.parseAsInline) {\n\t\tthis.tree.push.apply(this.tree,this.parseInlineRun());\n\t} else {\n\t\tthis.tree.push.apply(this.tree,this.parseBlocks());\n\t}\n\t// Return the parse tree\n};\n\n/*\nInstantiate an array of parse rules\n*/\nWikiParser.prototype.instantiateRules = function(classes,type,startPos) {\n\tvar rulesInfo = [],\n\t\tself = this;\n\t$tw.utils.each(classes,function(RuleClass) {\n\t\t// Instantiate the rule\n\t\tvar rule = new RuleClass(self);\n\t\trule.is = {};\n\t\trule.is[type] = true;\n\t\trule.init(self);\n\t\tvar matchIndex = rule.findNextMatch(startPos);\n\t\tif(matchIndex !== undefined) {\n\t\t\trulesInfo.push({\n\t\t\t\trule: rule,\n\t\t\t\tmatchIndex: matchIndex\n\t\t\t});\n\t\t}\n\t});\n\treturn rulesInfo;\n};\n\n/*\nSkip any whitespace at the current position. Options are:\n\ttreatNewlinesAsNonWhitespace: true if newlines are NOT to be treated as whitespace\n*/\nWikiParser.prototype.skipWhitespace = function(options) {\n\toptions = options || {};\n\tvar whitespaceRegExp = options.treatNewlinesAsNonWhitespace ? /([^\\S\\n]+)/mg : /(\\s+)/mg;\n\twhitespaceRegExp.lastIndex = this.pos;\n\tvar whitespaceMatch = whitespaceRegExp.exec(this.source);\n\tif(whitespaceMatch &amp;&amp; whitespaceMatch.index === this.pos) {\n\t\tthis.pos = whitespaceRegExp.lastIndex;\n\t}\n};\n\n/*\nGet the next match out of an array of parse rule instances\n*/\nWikiParser.prototype.findNextMatch = function(rules,startPos) {\n\t// Find the best matching rule by finding the closest match position\n\tvar matchingRule = undefined,\n\t\tmatchingRulePos = this.sourceLength;\n\t// Step through each rule\n\tfor(var t=0; t&lt;rules.length; t++) {\n\t\tvar ruleInfo = rules[t];\n\t\t// Ask the rule to get the next match if we've moved past the current one\n\t\tif(ruleInfo.matchIndex !== undefined  &amp;&amp; ruleInfo.matchIndex &lt; startPos) {\n\t\t\truleInfo.matchIndex = ruleInfo.rule.findNextMatch(startPos);\n\t\t}\n\t\t// Adopt this match if it's closer than the current best match\n\t\tif(ruleInfo.matchIndex !== undefined &amp;&amp; ruleInfo.matchIndex &lt;= matchingRulePos) {\n\t\t\tmatchingRule = ruleInfo;\n\t\t\tmatchingRulePos = ruleInfo.matchIndex;\n\t\t}\n\t}\n\treturn matchingRule;\n};\n\n/*\nParse any pragmas at the beginning of a block of parse text\n*/\nWikiParser.prototype.parsePragmas = function() {\n\tvar tree = [];\n\twhile(true) {\n\t\t// Skip whitespace\n\t\tthis.skipWhitespace();\n\t\t// Check for the end of the text\n\t\tif(this.pos &gt;= this.sourceLength) {\n\t\t\tbreak;\n\t\t}\n\t\t// Check if we've arrived at a pragma rule match\n\t\tvar nextMatch = this.findNextMatch(this.pragmaRules,this.pos);\n\t\t// If not, just exit\n\t\tif(!nextMatch || nextMatch.matchIndex !== this.pos) {\n\t\t\tbreak;\n\t\t}\n\t\t// Process the pragma rule\n\t\ttree.push.apply(tree,nextMatch.rule.parse());\n\t}\n\treturn tree;\n};\n\n/*\nParse a block from the current position\n\tterminatorRegExpString: optional regular expression string that identifies the end of plain paragraphs. Must not include capturing parenthesis\n*/\nWikiParser.prototype.parseBlock = function(terminatorRegExpString) {\n\tvar terminatorRegExp = terminatorRegExpString ? new RegExp(\&quot;(\&quot; + terminatorRegExpString + \&quot;|\\\\r?\\\\n\\\\r?\\\\n)\&quot;,\&quot;mg\&quot;) : /(\\r?\\n\\r?\\n)/mg;\n\tthis.skipWhitespace();\n\tif(this.pos &gt;= this.sourceLength) {\n\t\treturn [];\n\t}\n\t// Look for a block rule that applies at the current position\n\tvar nextMatch = this.findNextMatch(this.blockRules,this.pos);\n\tif(nextMatch &amp;&amp; nextMatch.matchIndex === this.pos) {\n\t\treturn nextMatch.rule.parse();\n\t}\n\t// Treat it as a paragraph if we didn't find a block rule\n\treturn [{type: \&quot;element\&quot;, tag: \&quot;p\&quot;, children: this.parseInlineRun(terminatorRegExp)}];\n};\n\n/*\nParse a series of blocks of text until a terminating regexp is encountered or the end of the text\n\tterminatorRegExpString: terminating regular expression\n*/\nWikiParser.prototype.parseBlocks = function(terminatorRegExpString) {\n\tif(terminatorRegExpString) {\n\t\treturn this.parseBlocksTerminated(terminatorRegExpString);\n\t} else {\n\t\treturn this.parseBlocksUnterminated();\n\t}\n};\n\n/*\nParse a block from the current position to the end of the text\n*/\nWikiParser.prototype.parseBlocksUnterminated = function() {\n\tvar tree = [];\n\twhile(this.pos &lt; this.sourceLength) {\n\t\ttree.push.apply(tree,this.parseBlock());\n\t}\n\treturn tree;\n};\n\n/*\nParse blocks of text until a terminating regexp is encountered\n*/\nWikiParser.prototype.parseBlocksTerminated = function(terminatorRegExpString) {\n\tvar terminatorRegExp = new RegExp(\&quot;(\&quot; + terminatorRegExpString + \&quot;)\&quot;,\&quot;mg\&quot;),\n\t\ttree = [];\n\t// Skip any whitespace\n\tthis.skipWhitespace();\n\t//  Check if we've got the end marker\n\tterminatorRegExp.lastIndex = this.pos;\n\tvar match = terminatorRegExp.exec(this.source);\n\t// Parse the text into blocks\n\twhile(this.pos &lt; this.sourceLength &amp;&amp; !(match &amp;&amp; match.index === this.pos)) {\n\t\tvar blocks = this.parseBlock(terminatorRegExpString);\n\t\ttree.push.apply(tree,blocks);\n\t\t// Skip any whitespace\n\t\tthis.skipWhitespace();\n\t\t//  Check if we've got the end marker\n\t\tterminatorRegExp.lastIndex = this.pos;\n\t\tmatch = terminatorRegExp.exec(this.source);\n\t}\n\tif(match &amp;&amp; match.index === this.pos) {\n\t\tthis.pos = match.index + match[0].length;\n\t}\n\treturn tree;\n};\n\n/*\nParse a run of text at the current position\n\tterminatorRegExp: a regexp at which to stop the run\n\toptions: see below\nOptions available:\n\teatTerminator: move the parse position past any encountered terminator (default false)\n*/\nWikiParser.prototype.parseInlineRun = function(terminatorRegExp,options) {\n\tif(terminatorRegExp) {\n\t\treturn this.parseInlineRunTerminated(terminatorRegExp,options);\n\t} else {\n\t\treturn this.parseInlineRunUnterminated(options);\n\t}\n};\n\nWikiParser.prototype.parseInlineRunUnterminated = function(options) {\n\tvar tree = [];\n\t// Find the next occurrence of an inline rule\n\tvar nextMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t// Loop around the matches until we've reached the end of the text\n\twhile(this.pos &lt; this.sourceLength &amp;&amp; nextMatch) {\n\t\t// Process the text preceding the run rule\n\t\tif(nextMatch.matchIndex &gt; this.pos) {\n\t\t\ttree.push({type: \&quot;text\&quot;, text: this.source.substring(this.pos,nextMatch.matchIndex)});\n\t\t\tthis.pos = nextMatch.matchIndex;\n\t\t}\n\t\t// Process the run rule\n\t\ttree.push.apply(tree,nextMatch.rule.parse());\n\t\t// Look for the next run rule\n\t\tnextMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t}\n\t// Process the remaining text\n\tif(this.pos &lt; this.sourceLength) {\n\t\ttree.push({type: \&quot;text\&quot;, text: this.source.substr(this.pos)});\n\t}\n\tthis.pos = this.sourceLength;\n\treturn tree;\n};\n\nWikiParser.prototype.parseInlineRunTerminated = function(terminatorRegExp,options) {\n\toptions = options || {};\n\tvar tree = [];\n\t// Find the next occurrence of the terminator\n\tterminatorRegExp.lastIndex = this.pos;\n\tvar terminatorMatch = terminatorRegExp.exec(this.source);\n\t// Find the next occurrence of a inlinerule\n\tvar inlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t// Loop around until we've reached the end of the text\n\twhile(this.pos &lt; this.sourceLength &amp;&amp; (terminatorMatch || inlineRuleMatch)) {\n\t\t// Return if we've found the terminator, and it precedes any inline rule match\n\t\tif(terminatorMatch) {\n\t\t\tif(!inlineRuleMatch || inlineRuleMatch.matchIndex &gt;= terminatorMatch.index) {\n\t\t\t\tif(terminatorMatch.index &gt; this.pos) {\n\t\t\t\t\ttree.push({type: \&quot;text\&quot;, text: this.source.substring(this.pos,terminatorMatch.index)});\n\t\t\t\t}\n\t\t\t\tthis.pos = terminatorMatch.index;\n\t\t\t\tif(options.eatTerminator) {\n\t\t\t\t\tthis.pos += terminatorMatch[0].length;\n\t\t\t\t}\n\t\t\t\treturn tree;\n\t\t\t}\n\t\t}\n\t\t// Process any inline rule, along with the text preceding it\n\t\tif(inlineRuleMatch) {\n\t\t\t// Preceding text\n\t\t\tif(inlineRuleMatch.matchIndex &gt; this.pos) {\n\t\t\t\ttree.push({type: \&quot;text\&quot;, text: this.source.substring(this.pos,inlineRuleMatch.matchIndex)});\n\t\t\t\tthis.pos = inlineRuleMatch.matchIndex;\n\t\t\t}\n\t\t\t// Process the inline rule\n\t\t\ttree.push.apply(tree,inlineRuleMatch.rule.parse());\n\t\t\t// Look for the next inline rule\n\t\t\tinlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t\t\t// Look for the next terminator match\n\t\t\tterminatorRegExp.lastIndex = this.pos;\n\t\t\tterminatorMatch = terminatorRegExp.exec(this.source);\n\t\t}\n\t}\n\t// Process the remaining text\n\tif(this.pos &lt; this.sourceLength) {\n\t\ttree.push({type: \&quot;text\&quot;, text: this.source.substr(this.pos)});\n\t}\n\tthis.pos = this.sourceLength;\n\treturn tree;\n};\n\n/*\nParse zero or more class specifiers `.classname`\n*/\nWikiParser.prototype.parseClasses = function() {\n\tvar classRegExp = /\\.([^\\s\\.]+)/mg,\n\t\tclassNames = [];\n\tclassRegExp.lastIndex = this.pos;\n\tvar match = classRegExp.exec(this.source);\n\twhile(match &amp;&amp; match.index === this.pos) {\n\t\tthis.pos = match.index + match[0].length;\n\t\tclassNames.push(match[1]);\n\t\tvar match = classRegExp.exec(this.source);\n\t}\n\treturn classNames;\n};\n\n/*\nAmend the rules used by this instance of the parser\n\ttype: `only` keeps just the named rules, `except` keeps all but the named rules\n\tnames: array of rule names\n*/\nWikiParser.prototype.amendRules = function(type,names) {\n\tnames = names || [];\n\t// Define the filter function\n\tvar keepFilter;\n\tif(type === \&quot;only\&quot;) {\n\t\tkeepFilter = function(name) {\n\t\t\treturn names.indexOf(name) !== -1;\n\t\t};\n\t} else if(type === \&quot;except\&quot;) {\n\t\tkeepFilter = function(name) {\n\t\t\treturn names.indexOf(name) === -1;\n\t\t};\n\t} else {\n\t\treturn;\n\t}\n\t// Define a function to process each of our rule arrays\n\tvar processRuleArray = function(ruleArray) {\n\t\tfor(var t=ruleArray.length-1; t&gt;=0; t--) {\n\t\t\tif(!keepFilter(ruleArray[t].rule.name)) {\n\t\t\t\truleArray.splice(t,1);\n\t\t\t}\n\t\t}\n\t};\n\t// Process each rule array\n\tprocessRuleArray(this.pragmaRules);\n\tprocessRuleArray(this.blockRules);\n\tprocessRuleArray(this.inlineRules);\n}\n\nexports[\&quot;text/vnd.tiddlywiki\&quot;] = WikiParser;\n\n})();\n\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/wikiparser.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;parser&quot;
        },
        &quot;$:/core/modules/parsers/wikiparser/rules/wikirulebase.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/wikirulebase.js\ntype: application/javascript\nmodule-type: global\n\nBase class for wiki parser rules\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nThis constructor is always overridden with a blank constructor, and so shouldn't be used\n*/\nvar WikiRuleBase = function() {\n};\n\n/*\nTo be overridden by individual rules\n*/\nWikiRuleBase.prototype.init = function(parser) {\n\tthis.parser = parser;\n};\n\n/*\nDefault implementation of findNextMatch uses RegExp matching\n*/\nWikiRuleBase.prototype.findNextMatch = function(startPos) {\n\tthis.matchRegExp.lastIndex = startPos;\n\tthis.match = this.matchRegExp.exec(this.parser.source);\n\treturn this.match ? this.match.index : undefined;\n};\n\nexports.WikiRuleBase = WikiRuleBase;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/parsers/wikiparser/rules/wikirulebase.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;global&quot;
        },
        &quot;$:/core/modules/pluginswitcher.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/pluginswitcher.js\ntype: application/javascript\nmodule-type: global\n\nManages switching plugins for themes and languages.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\noptions:\nwiki: wiki store to be used\npluginType: type of plugin to be switched\ncontrollerTitle: title of tiddler used to control switching of this resource\ndefaultPlugins: array of default plugins to be used if nominated plugin isn't found\n*/\nfunction PluginSwitcher(options) {\n\tthis.wiki = options.wiki;\n\tthis.pluginType = options.pluginType;\n\tthis.controllerTitle = options.controllerTitle;\n\tthis.defaultPlugins = options.defaultPlugins || [];\n\t// Switch to the current plugin\n\tthis.switchPlugins();\n\t// Listen for changes to the selected plugin\n\tvar self = this;\n\tthis.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\tif($tw.utils.hop(changes,self.controllerTitle)) {\n\t\t\tself.switchPlugins();\n\t\t}\n\t});\n}\n\nPluginSwitcher.prototype.switchPlugins = function() {\n\t// Get the name of the current theme\n\tvar selectedPluginTitle = this.wiki.getTiddlerText(this.controllerTitle);\n\t// If it doesn't exist, then fallback to one of the default themes\n\tvar index = 0;\n\twhile(!this.wiki.getTiddler(selectedPluginTitle) &amp;&amp; index &lt; this.defaultPlugins.length) {\n\t\tselectedPluginTitle = this.defaultPlugins[index++];\n\t}\n\t// Accumulate the titles of the plugins that we need to load\n\tvar plugins = [],\n\t\tself = this,\n\t\taccumulatePlugin = function(title) {\n\t\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\t\tif(tiddler &amp;&amp; tiddler.isPlugin() &amp;&amp; plugins.indexOf(title) === -1) {\n\t\t\t\tplugins.push(title);\n\t\t\t\tvar pluginInfo = JSON.parse(self.wiki.getTiddlerText(title)),\n\t\t\t\t\tdependents = $tw.utils.parseStringArray(tiddler.fields.dependents || \&quot;\&quot;);\n\t\t\t\t$tw.utils.each(dependents,function(title) {\n\t\t\t\t\taccumulatePlugin(title);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\taccumulatePlugin(selectedPluginTitle);\n\t// Unregister any existing theme tiddlers\n\tvar unregisteredTiddlers = $tw.wiki.unregisterPluginTiddlers(this.pluginType);\n\t// Accumulate the titles of shadow tiddlers that have changed as a result of this switch\n\tvar changedTiddlers = {};\n\tthis.wiki.eachShadow(function(tiddler,title) {\n\t\tvar source = self.wiki.getShadowSource(title);\n\t\tif(unregisteredTiddlers.indexOf(source) !== -1) {\n\t\t\tchangedTiddlers[title] = true; // isDeleted?\n\t\t}\n\t});\n\t// Register any new theme tiddlers\n\tvar registeredTiddlers = $tw.wiki.registerPluginTiddlers(this.pluginType,plugins);\n\t// Unpack the current theme tiddlers\n\t$tw.wiki.unpackPluginTiddlers();\n\t// Accumulate the affected shadow tiddlers\n\tthis.wiki.eachShadow(function(tiddler,title) {\n\t\tvar source = self.wiki.getShadowSource(title);\n\t\tif(registeredTiddlers.indexOf(source) !== -1) {\n\t\t\tchangedTiddlers[title] = false; // isDeleted?\n\t\t}\n\t});\n\t// Issue change events for the modified tiddlers\n\t$tw.utils.each(changedTiddlers,function(status,title) {\n\t\tself.wiki.enqueueTiddlerEvent(title,status);\n\t});\n};\n\nexports.PluginSwitcher = PluginSwitcher;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/pluginswitcher.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;global&quot;
        },
        &quot;$:/core/modules/savers/andtidwiki.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/savers/andtidwiki.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via the AndTidWiki Android app\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, netscape: false, Components: false */\n\&quot;use strict\&quot;;\n\nvar AndTidWiki = function(wiki) {\n};\n\nAndTidWiki.prototype.save = function(text,method,callback) {\n\t// Get the pathname of this document\n\tvar pathname = decodeURIComponent(document.location.toString().split(\&quot;#\&quot;)[0]);\n\t// Strip the file://\n\tif(pathname.indexOf(\&quot;file://\&quot;) === 0) {\n\t\tpathname = pathname.substr(7);\n\t}\n\t// Strip any query or location part\n\tvar p = pathname.indexOf(\&quot;?\&quot;);\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\tp = pathname.indexOf(\&quot;#\&quot;);\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\t// Save the file\n\twindow.twi.saveFile(pathname,text)\n\t// Call the callback\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nAndTidWiki.prototype.info = {\n\tname: \&quot;andtidwiki\&quot;,\n\tpriority: 1600,\n\tcapabilities: [\&quot;save\&quot;, \&quot;autosave\&quot;]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn !!window.twi &amp;&amp; !!window.twi.saveFile;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new AndTidWiki(wiki);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/savers/andtidwiki.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;saver&quot;
        },
        &quot;$:/core/modules/savers/download.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/savers/download.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via HTML5's download APIs\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar DownloadSaver = function(wiki) {\n};\n\nDownloadSaver.prototype.save = function(text,method,callback) {\n\t// Get the current filename\n\tvar filename = \&quot;tiddlywiki.html\&quot;,\n\t\tp = document.location.pathname.lastIndexOf(\&quot;/\&quot;);\n\tif(p !== -1) {\n\t\tfilename = document.location.pathname.substr(p+1);\n\t}\n\t// Set up the link\n\tvar link = document.createElement(\&quot;a\&quot;);\n\tlink.setAttribute(\&quot;target\&quot;,\&quot;_blank\&quot;);\n\tif(Blob !== undefined) {\n\t\tvar blob = new Blob([text], {type: \&quot;text/html\&quot;});\n\t\tlink.setAttribute(\&quot;href\&quot;, URL.createObjectURL(blob));\n\t} else {\n\t\tlink.setAttribute(\&quot;href\&quot;,\&quot;data:text/html,\&quot; + encodeURIComponent(text));\n\t}\n\tlink.setAttribute(\&quot;download\&quot;,filename);\n\tdocument.body.appendChild(link);\n\tlink.click();\n\tdocument.body.removeChild(link);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nDownloadSaver.prototype.info = {\n\tname: \&quot;download\&quot;,\n\tpriority: 100,\n\tcapabilities: [\&quot;save\&quot;, \&quot;download\&quot;]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn document.createElement(\&quot;a\&quot;).download !== undefined;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new DownloadSaver(wiki);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/savers/download.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;saver&quot;
        },
        &quot;$:/core/modules/savers/fsosaver.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/savers/fsosaver.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via MS FileSystemObject ActiveXObject\n\nNote: Since TiddlyWiki's markup contains the MOTW, the FileSystemObject normally won't be available. \nHowever, if the wiki is loaded as an .HTA file (Windows HTML Applications) then the FSO can be used.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar FSOSaver = function(wiki) {\n};\n\nFSOSaver.prototype.save = function(text,method,callback) {\n\t// Get the pathname of this document\n\tvar pathname = unescape(document.location.pathname);\n\t// Test for a Windows path of the form /x:\\blah...\n\tif(/^\\/[A-Z]\\:\\\\[^\\\\]+/i.test(pathname)) {\t// ie: ^/[a-z]:/[^/]+\n\t\t// Remove the leading slash\n\t\tpathname = pathname.substr(1);\n\t} else if(document.location.hostname !== \&quot;\&quot; &amp;&amp; /^\\/\\\\[^\\\\]+\\\\[^\\\\]+/i.test(pathname)) {\t// test for \\\\server\\share\\blah... - ^/[^/]+/[^/]+\n\t\t// Remove the leading slash\n\t\tpathname = pathname.substr(1);\n\t\t// reconstruct UNC path\n\t\tpathname = \&quot;\\\\\\\\\&quot; + document.location.hostname + pathname;\n\t} else return false;\n\t\n\t// Save the file (as UTF-16)\n\tvar fso = new ActiveXObject(\&quot;Scripting.FileSystemObject\&quot;);\n\tvar file = fso.OpenTextFile(pathname,2,-1,-1);\n\t\n\tfile.Write(text);\n\tfile.Close();\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nFSOSaver.prototype.info = {\n\tname: \&quot;FSOSaver\&quot;,\n\tpriority: 120,\n\tcapabilities: [\&quot;save\&quot;, \&quot;autosave\&quot;]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\ttry {\n\t\treturn (window.location.protocol === \&quot;file:\&quot;) &amp;&amp; !!(new ActiveXObject(\&quot;Scripting.FileSystemObject\&quot;));\n\t} catch(e) { return false; }\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new FSOSaver(wiki);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/savers/fsosaver.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;saver&quot;
        },
        &quot;$:/core/modules/savers/manualdownload.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/savers/manualdownload.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via HTML5's download APIs\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Title of the tiddler containing the download message\nvar downloadInstructionsTitle = \&quot;$:/language/Modals/Download\&quot;;\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar ManualDownloadSaver = function(wiki) {\n};\n\nManualDownloadSaver.prototype.save = function(text,method,callback) {\n\t$tw.modal.display(downloadInstructionsTitle,{\n\t\tdownloadLink: \&quot;data:text/html,\&quot; + encodeURIComponent(text)\n\t});\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nManualDownloadSaver.prototype.info = {\n\tname: \&quot;manualdownload\&quot;,\n\tpriority: 0,\n\tcapabilities: [\&quot;save\&quot;, \&quot;download\&quot;]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new ManualDownloadSaver(wiki);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/savers/manualdownload.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;saver&quot;
        },
        &quot;$:/core/modules/savers/msdownload.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/savers/msdownload.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via window.navigator.msSaveBlob()\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar MsDownloadSaver = function(wiki) {\n};\n\nMsDownloadSaver.prototype.save = function(text,method,callback) {\n\t// Get the current filename\n\tvar filename = \&quot;tiddlywiki.html\&quot;,\n\t\tp = document.location.pathname.lastIndexOf(\&quot;/\&quot;);\n\tif(p !== -1) {\n\t\tfilename = document.location.pathname.substr(p+1);\n\t}\n\t// Set up the link\n\tvar blob = new Blob([text], {type: \&quot;text/html\&quot;});\n\twindow.navigator.msSaveBlob(blob,filename);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nMsDownloadSaver.prototype.info = {\n\tname: \&quot;msdownload\&quot;,\n\tpriority: 110,\n\tcapabilities: [\&quot;save\&quot;, \&quot;download\&quot;]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn !!window.navigator.msSaveBlob;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new MsDownloadSaver(wiki);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/savers/msdownload.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;saver&quot;
        },
        &quot;$:/core/modules/savers/tiddlyfox.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/savers/tiddlyfox.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via the TiddlyFox file extension\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, netscape: false, Components: false */\n\&quot;use strict\&quot;;\n\nvar TiddlyFoxSaver = function(wiki) {\n};\n\nTiddlyFoxSaver.prototype.save = function(text,method,callback) {\n\tvar messageBox = document.getElementById(\&quot;tiddlyfox-message-box\&quot;);\n\tif(messageBox) {\n\t\t// Get the pathname of this document\n\t\tvar pathname = document.location.toString().split(\&quot;#\&quot;)[0];\n\t\t// Replace file://localhost/ with file:///\n\t\tif(pathname.indexOf(\&quot;file://localhost/\&quot;) == 0) {\n\t\t\tpathname = \&quot;file://\&quot; + pathname.substr(16);\n\t\t}\n\t\t// Windows path file:///x:/blah/blah --&gt; x:\\blah\\blah\n\t\tif(/^file\\:\\/\\/\\/[A-Z]\\:\\//i.test(pathname)) {\n\t\t\t// Remove the leading slash and convert slashes to backslashes\n\t\t\tpathname = pathname.substr(8).replace(/\\//g,\&quot;\\\\\&quot;);\n\t\t// Firefox Windows network path file://///server/share/blah/blah --&gt; //server/share/blah/blah\n\t\t} else if(pathname.indexOf(\&quot;file://///\&quot;) === 0) {\n\t\t\tpathname = \&quot;\\\\\\\\\&quot; + unescape(pathname.substr(10)).replace(/\\//g,\&quot;\\\\\&quot;);\n\t\t// Mac/Unix local path file:///path/path --&gt; /path/path\n\t\t} else if(pathname.indexOf(\&quot;file:///\&quot;) == 0) {\n\t\t\tpathname = unescape(pathname.substr(7));\n\t\t// Mac/Unix local path file:/path/path --&gt; /path/path\n\t\t} else if(pathname.indexOf(\&quot;file:/\&quot;) == 0) {\n\t\t\tpathname = unescape(pathname.substr(5));\n\t\t// Otherwise Windows networth path file://server/share/path/path --&gt; \\\\server\\share\\path\\path\n\t\t} else {\n\t\t\tpathname = \&quot;\\\\\\\\\&quot; + unescape(pathname.substr(7)).replace(new RegExp(\&quot;/\&quot;,\&quot;g\&quot;),\&quot;\\\\\&quot;);\n\t\t}\n\t\t// Create the message element and put it in the message box\n\t\tvar message = document.createElement(\&quot;div\&quot;);\nconsole.log(\&quot;Pathname\&quot;,pathname);\n\t\tmessage.setAttribute(\&quot;data-tiddlyfox-path\&quot;,decodeURIComponent(pathname));\n\t\tmessage.setAttribute(\&quot;data-tiddlyfox-content\&quot;,text);\n\t\tmessageBox.appendChild(message);\n\t\t// Add an event handler for when the file has been saved\n\t\tmessage.addEventListener(\&quot;tiddlyfox-have-saved-file\&quot;,function(event) {\n\t\t\tcallback(null);\n\t\t}, false);\n\t\t// Create and dispatch the custom event to the extension\n\t\tvar event = document.createEvent(\&quot;Events\&quot;);\n\t\tevent.initEvent(\&quot;tiddlyfox-save-file\&quot;,true,false);\n\t\tmessage.dispatchEvent(event);\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n};\n\n/*\nInformation about this saver\n*/\nTiddlyFoxSaver.prototype.info = {\n\tname: \&quot;tiddlyfox\&quot;,\n\tpriority: 1500,\n\tcapabilities: [\&quot;save\&quot;, \&quot;autosave\&quot;]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn (window.location.protocol === \&quot;file:\&quot;);\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TiddlyFoxSaver(wiki);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/savers/tiddlyfox.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;saver&quot;
        },
        &quot;$:/core/modules/savers/tiddlyie.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/savers/tiddlyie.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via Internet Explorer BHO extenion (TiddlyIE)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar TiddlyIESaver = function(wiki) {\n};\n\nTiddlyIESaver.prototype.save = function(text,method,callback) {\n\t// Check existence of TiddlyIE BHO extension (note: only works after document is complete)\n\tif(typeof(window.TiddlyIE) != \&quot;undefined\&quot;) {\n\t\t// Get the pathname of this document\n\t\tvar pathname = unescape(document.location.pathname);\n\t\t// Test for a Windows path of the form /x:/blah...\n\t\tif(/^\\/[A-Z]\\:\\/[^\\/]+/i.test(pathname)) {\t// ie: ^/[a-z]:/[^/]+ (is this better?: ^/[a-z]:/[^/]+(/[^/]+)*\\.[^/]+ )\n\t\t\t// Remove the leading slash\n\t\t\tpathname = pathname.substr(1);\n\t\t\t// Convert slashes to backslashes\n\t\t\tpathname = pathname.replace(/\\//g,\&quot;\\\\\&quot;);\n\t\t} else if(document.hostname !== \&quot;\&quot; &amp;&amp; /^\\/[^\\/]+\\/[^\\/]+/i.test(pathname)) {\t// test for \\\\server\\share\\blah... - ^/[^/]+/[^/]+\n\t\t\t// Convert slashes to backslashes\n\t\t\tpathname = pathname.replace(/\\//g,\&quot;\\\\\&quot;);\n\t\t\t// reconstruct UNC path\n\t\t\tpathname = \&quot;\\\\\\\\\&quot; + document.location.hostname + pathname;\n\t\t} else return false;\n\t\t\n\t\t// Prompt the user to save the file\n\t\twindow.TiddlyIE.save(pathname, text);\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n};\n\n/*\nInformation about this saver\n*/\nTiddlyIESaver.prototype.info = {\n\tname: \&quot;tiddlyiesaver\&quot;,\n\tpriority: 1500,\n\tcapabilities: [\&quot;save\&quot;]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn (window.location.protocol === \&quot;file:\&quot;);\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TiddlyIESaver(wiki);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/savers/tiddlyie.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;saver&quot;
        },
        &quot;$:/core/modules/savers/twedit.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/savers/twedit.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via the TWEdit iOS app\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, netscape: false, Components: false */\n\&quot;use strict\&quot;;\n\nvar TWEditSaver = function(wiki) {\n};\n\nTWEditSaver.prototype.save = function(text,method,callback) {\n\t// Bail if we're not running under TWEdit\n\tif(typeof DeviceInfo !== \&quot;object\&quot;) {\n\t\treturn false;\n\t}\n\t// Get the pathname of this document\n\tvar pathname = decodeURIComponent(document.location.pathname);\n\t// Strip any query or location part\n\tvar p = pathname.indexOf(\&quot;?\&quot;);\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\tp = pathname.indexOf(\&quot;#\&quot;);\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\t// Remove the leading \&quot;/Documents\&quot; from path\n\tvar prefix = \&quot;/Documents\&quot;;\n\tif(pathname.indexOf(prefix) === 0) {\n\t\tpathname = pathname.substr(prefix.length);\n\t}\n\t// Error handler\n\tvar errorHandler = function(event) {\n    \t// Error\n    \tcallback(\&quot;Error saving to TWEdit: \&quot; + event.target.error.code);\n    };\n\t// Get the file system\n    window.requestFileSystem(LocalFileSystem.PERSISTENT,0,function(fileSystem) {\n    \t// Now we've got the filesystem, get the fileEntry\n        fileSystem.root.getFile(pathname, {create: true}, function(fileEntry) {\n        \t// Now we've got the fileEntry, create the writer\n        \tfileEntry.createWriter(function(writer) {\n\t\t        writer.onerror = errorHandler;\n\t\t        writer.onwrite = function() {\n\t\t        \tcallback(null);\n\t\t        };\n\t\t        writer.position = 0;\n\t\t        writer.write(text);\n        \t},errorHandler);\n        }, errorHandler);\n    }, errorHandler);\n    return true;\n};\n\n/*\nInformation about this saver\n*/\nTWEditSaver.prototype.info = {\n\tname: \&quot;twedit\&quot;,\n\tpriority: 1600,\n\tcapabilities: [\&quot;save\&quot;, \&quot;autosave\&quot;]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TWEditSaver(wiki);\n};\n\n/////////////////////////// Hack\n// HACK: This ensures that TWEdit recognises us as a TiddlyWiki document\nif($tw.browser) {\n\twindow.version = {title: \&quot;TiddlyWiki\&quot;};\n}\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/savers/twedit.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;saver&quot;
        },
        &quot;$:/core/modules/savers/upload.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/savers/upload.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via upload to a server.\n\nDesigned to be compatible with BidiX's UploadPlugin at http://tiddlywiki.bidix.info/#UploadPlugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar UploadSaver = function(wiki) {\n\tthis.wiki = wiki;\n};\n\nUploadSaver.prototype.save = function(text,method,callback) {\n\t// Get the various parameters we need\n\tvar backupDir = this.wiki.getTextReference(\&quot;$:/UploadBackupDir\&quot;) || \&quot;.\&quot;,\n\t\tusername = this.wiki.getTextReference(\&quot;$:/UploadName\&quot;),\n\t\tpassword = $tw.utils.getPassword(\&quot;upload\&quot;),\n\t\tuploadDir = this.wiki.getTextReference(\&quot;$:/UploadDir\&quot;) || \&quot;.\&quot;,\n\t\tuploadFilename = this.wiki.getTextReference(\&quot;$:/UploadFilename\&quot;) || \&quot;index.html\&quot;,\n\t\turl = this.wiki.getTextReference(\&quot;$:/UploadURL\&quot;);\n\t// Bail out if we don't have the bits we need\n\tif(!username || username.toString().trim() === \&quot;\&quot; || !password || password.toString().trim() === \&quot;\&quot;) {\n\t\treturn false;\n\t}\n\t// Construct the url if not provided\n\tif(!url) {\n\t\turl = \&quot;http://\&quot; + username + \&quot;.tiddlyspot.com/store.cgi\&quot;;\n\t}\n\t// Assemble the header\n\tvar boundary = \&quot;---------------------------\&quot; + \&quot;AaB03x\&quot;;\t\n\tvar uploadFormName = \&quot;UploadPlugin\&quot;;\n\tvar head = [];\n\thead.push(\&quot;--\&quot; + boundary + \&quot;\\r\\nContent-disposition: form-data; name=\\\&quot;UploadPlugin\\\&quot;\\r\\n\&quot;);\n\thead.push(\&quot;backupDir=\&quot; + backupDir + \&quot;;user=\&quot; + username + \&quot;;password=\&quot; + password + \&quot;;uploaddir=\&quot; + uploadDir + \&quot;;;\&quot;); \n\thead.push(\&quot;\\r\\n\&quot; + \&quot;--\&quot; + boundary);\n\thead.push(\&quot;Content-disposition: form-data; name=\\\&quot;userfile\\\&quot;; filename=\\\&quot;\&quot; + uploadFilename + \&quot;\\\&quot;\&quot;);\n\thead.push(\&quot;Content-Type: text/html;charset=UTF-8\&quot;);\n\thead.push(\&quot;Content-Length: \&quot; + text.length + \&quot;\\r\\n\&quot;);\n\thead.push(\&quot;\&quot;);\n\t// Assemble the tail and the data itself\n\tvar tail = \&quot;\\r\\n--\&quot; + boundary + \&quot;--\\r\\n\&quot;,\n\t\tdata = head.join(\&quot;\\r\\n\&quot;) + text + tail;\n\t// Do the HTTP post\n\tvar http = new XMLHttpRequest();\n\thttp.open(\&quot;POST\&quot;,url,true,username,password);\n\thttp.setRequestHeader(\&quot;Content-Type\&quot;,\&quot;multipart/form-data; ;charset=UTF-8; boundary=\&quot; + boundary);\n\thttp.onreadystatechange = function() {\n\t\tif(http.readyState == 4 &amp;&amp; http.status == 200) {\n\t\t\tif(http.responseText.substr(0,4) === \&quot;0 - \&quot;) {\n\t\t\t\tcallback(null);\n\t\t\t} else {\n\t\t\t\tcallback(http.responseText);\n\t\t\t}\n\t\t}\n\t};\n\thttp.send(data);\n\t$tw.notifier.display(\&quot;$:/language/Notifications/Save/Starting\&quot;);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nUploadSaver.prototype.info = {\n\tname: \&quot;upload\&quot;,\n\tpriority: 2000,\n\tcapabilities: [\&quot;save\&quot;, \&quot;autosave\&quot;]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new UploadSaver(wiki);\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/savers/upload.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;saver&quot;
        },
        &quot;$:/core/modules/startup/commands.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/startup/commands.js\ntype: application/javascript\nmodule-type: startup\n\nCommand processing\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;commands\&quot;;\nexports.platforms = [\&quot;node\&quot;];\nexports.after = [\&quot;story\&quot;];\nexports.synchronous = false;\n\nexports.startup = function(callback) {\n\t// On the server, start a commander with the command line arguments\n\tvar commander = new $tw.Commander(\n\t\t$tw.boot.argv,\n\t\tfunction(err) {\n\t\t\tif(err) {\n\t\t\t\tconsole.log(\&quot;Error: \&quot; + err);\n\t\t\t}\n\t\t\tcallback();\n\t\t},\n\t\t$tw.wiki,\n\t\t{output: process.stdout, error: process.stderr}\n\t);\n\tcommander.execute();\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/startup/commands.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        },
        &quot;$:/core/modules/startup/favicon.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/startup/favicon.js\ntype: application/javascript\nmodule-type: startup\n\nFavicon handling\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;favicon\&quot;;\nexports.platforms = [\&quot;browser\&quot;];\nexports.after = [\&quot;startup\&quot;];\nexports.synchronous = true;\n\t\t\n// Favicon tiddler\nvar FAVICON_TITLE = \&quot;$:/favicon.ico\&quot;;\n\nexports.startup = function() {\n\t// Set up the favicon\n\tsetFavicon();\n\t// Reset the favicon when the tiddler changes\n\t$tw.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\tif($tw.utils.hop(changes,FAVICON_TITLE)) {\n\t\t\tsetFavicon();\n\t\t}\n\t});\n};\n\nfunction setFavicon() {\n\tvar tiddler = $tw.wiki.getTiddler(FAVICON_TITLE);\n\tif(tiddler) {\n\t\tvar faviconLink = document.getElementById(\&quot;faviconLink\&quot;);\n\t\tfaviconLink.setAttribute(\&quot;href\&quot;,\&quot;data:\&quot; + tiddler.fields.type + \&quot;;base64,\&quot; + tiddler.fields.text);\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/startup/favicon.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        },
        &quot;$:/core/modules/startup/load-modules.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/startup/load-modules.js\ntype: application/javascript\nmodule-type: startup\n\nLoad core modules\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;load-modules\&quot;;\nexports.synchronous = true;\n\nexports.startup = function() {\n\t// Load modules\n\t$tw.modules.applyMethods(\&quot;utils\&quot;,$tw.utils);\n\tif($tw.node &amp;&amp; !$tw.browser) {\n\t\t$tw.modules.applyMethods(\&quot;utils-node\&quot;,$tw.utils);\n\t}\n\t$tw.modules.applyMethods(\&quot;global\&quot;,$tw);\n\t$tw.modules.applyMethods(\&quot;config\&quot;,$tw.config);\n\t$tw.Tiddler.fieldModules = $tw.modules.getModulesByTypeAsHashmap(\&quot;tiddlerfield\&quot;);\n\t$tw.modules.applyMethods(\&quot;tiddlermethod\&quot;,$tw.Tiddler.prototype);\n\t$tw.modules.applyMethods(\&quot;wikimethod\&quot;,$tw.Wiki.prototype);\n\t$tw.modules.applyMethods(\&quot;tiddlerdeserializer\&quot;,$tw.Wiki.tiddlerDeserializerModules);\n\t$tw.macros = $tw.modules.getModulesByTypeAsHashmap(\&quot;macro\&quot;);\n\t$tw.wiki.initParsers();\n\t$tw.Commander.initCommands();\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/startup/load-modules.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        },
        &quot;$:/core/modules/startup/password.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/startup/password.js\ntype: application/javascript\nmodule-type: startup\n\nPassword handling\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;password\&quot;;\nexports.platforms = [\&quot;browser\&quot;];\nexports.after = [\&quot;rootwidget\&quot;];\nexports.synchronous = true;\n\nexports.startup = function() {\n\t$tw.rootWidget.addEventListener(\&quot;tw-set-password\&quot;,function(event) {\n\t\t$tw.passwordPrompt.createPrompt({\n\t\t\tserviceName: \&quot;Set a new password for this TiddlyWiki\&quot;,\n\t\t\tnoUserName: true,\n\t\t\tsubmitText: \&quot;Set password\&quot;,\n\t\t\tcanCancel: true,\n\t\t\tcallback: function(data) {\n\t\t\t\tif(data) {\n\t\t\t\t\t$tw.crypto.setPassword(data.password);\n\t\t\t\t}\n\t\t\t\treturn true; // Get rid of the password prompt\n\t\t\t}\n\t\t});\n\t});\n\t$tw.rootWidget.addEventListener(\&quot;tw-clear-password\&quot;,function(event) {\n\t\t$tw.crypto.setPassword(null);\n\t});\n\t// Ensure that $:/isEncrypted is maintained properly\n\t$tw.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\tif($tw.utils.hop(changes,\&quot;$:/isEncrypted\&quot;)) {\n\t\t\t$tw.crypto.updateCryptoStateTiddler();\n\t\t}\n\t});\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/startup/password.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        },
        &quot;$:/core/modules/startup/render.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/startup/render.js\ntype: application/javascript\nmodule-type: startup\n\nTitle, stylesheet and page rendering\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;render\&quot;;\nexports.platforms = [\&quot;browser\&quot;];\nexports.after = [\&quot;story\&quot;];\nexports.synchronous = true;\n\n// Default story and history lists\nvar PAGE_TITLE_TITLE = \&quot;$:/core/wiki/title\&quot;\nvar PAGE_STYLESHEET_TITLE = \&quot;$:/core/ui/PageStylesheet\&quot;;\nvar PAGE_TEMPLATE_TITLE = \&quot;$:/core/ui/PageTemplate\&quot;;\n\n// Time (in ms) that we defer refreshing changes to draft tiddlers\nvar DRAFT_TIDDLER_TIMEOUT = 400;\n\nexports.startup = function() {\n\t// Set up the title\n\t$tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE,{document: $tw.fakeDocument, parseAsInline: true});\n\t$tw.titleContainer = $tw.fakeDocument.createElement(\&quot;div\&quot;);\n\t$tw.titleWidgetNode.render($tw.titleContainer,null);\n\tdocument.title = $tw.titleContainer.textContent;\n\t$tw.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\tif($tw.titleWidgetNode.refresh(changes,$tw.titleContainer,null)) {\n\t\t\tdocument.title = $tw.titleContainer.textContent;\n\t\t}\n\t});\n\t// Set up the styles\n\t$tw.styleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_STYLESHEET_TITLE,{document: $tw.fakeDocument});\n\t$tw.styleContainer = $tw.fakeDocument.createElement(\&quot;style\&quot;);\n\t$tw.styleWidgetNode.render($tw.styleContainer,null);\n\t$tw.styleElement = document.createElement(\&quot;style\&quot;);\n\t$tw.styleElement.innerHTML = $tw.styleContainer.textContent;\n\tdocument.head.insertBefore($tw.styleElement,document.head.firstChild);\n\t$tw.wiki.addEventListener(\&quot;change\&quot;,$tw.perf.report(\&quot;styleRefresh\&quot;,function(changes) {\n\t\tif($tw.styleWidgetNode.refresh(changes,$tw.styleContainer,null)) {\n\t\t\t$tw.styleElement.innerHTML = $tw.styleContainer.textContent;\n\t\t}\n\t}));\n\t// Display the $:/core/ui/PageTemplate tiddler to kick off the display\n\t$tw.perf.report(\&quot;mainRender\&quot;,function() {\n\t\t$tw.pageWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TEMPLATE_TITLE,{document: document, parentWidget: $tw.rootWidget});\n\t\t$tw.pageContainer = document.createElement(\&quot;div\&quot;);\n\t\t$tw.utils.addClass($tw.pageContainer,\&quot;tw-page-container-wrapper\&quot;);\n\t\tdocument.body.insertBefore($tw.pageContainer,document.body.firstChild);\n\t\t$tw.pageWidgetNode.render($tw.pageContainer,null);\n\t})();\n\t// Prepare refresh mechanism\n\tvar deferredChanges = Object.create(null),\n\t\ttimerId;\n\tfunction refresh() {\n\t\t// Process the refresh\n\t\t$tw.pageWidgetNode.refresh(deferredChanges,$tw.pageContainer,null);\n\t\tdeferredChanges = Object.create(null);\n\t}\n\t// Add the change event handler\n\t$tw.wiki.addEventListener(\&quot;change\&quot;,$tw.perf.report(\&quot;mainRefresh\&quot;,function(changes) {\n\t\t// Check if only drafts have changed\n\t\tvar onlyDraftsHaveChanged = true;\n\t\tfor(var title in changes) {\n\t\t\tvar tiddler = $tw.wiki.getTiddler(title);\n\t\t\tif(!tiddler || !tiddler.hasField(\&quot;draft.of\&quot;)) {\n\t\t\t\tonlyDraftsHaveChanged = false;\n\t\t\t}\n\t\t}\n\t\t// Defer the change if only drafts have changed\n\t\tif(timerId) {\n\t\t\tclearTimeout(timerId);\n\t\t}\n\t\ttimerId = null;\n\t\tif(onlyDraftsHaveChanged) {\n\t\t\ttimerId = setTimeout(refresh,DRAFT_TIDDLER_TIMEOUT);\n\t\t\t$tw.utils.extend(deferredChanges,changes);\n\t\t} else {\n\t\t\t$tw.utils.extend(deferredChanges,changes);\n\t\t\trefresh();\n\t\t}\n\t}));\n\t// Fix up the link between the root widget and the page container\n\t$tw.rootWidget.domNodes = [$tw.pageContainer];\n\t$tw.rootWidget.children = [$tw.pageWidgetNode];\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/startup/render.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        },
        &quot;$:/core/modules/startup/rootwidget.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/startup/rootwidget.js\ntype: application/javascript\nmodule-type: startup\n\nSetup the root widget and the core root widget handlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;rootwidget\&quot;;\nexports.platforms = [\&quot;browser\&quot;];\nexports.after = [\&quot;load-modules\&quot;];\nexports.before = [\&quot;story\&quot;];\nexports.synchronous = true;\n\nvar widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;);\n\nexports.startup = function() {\n\t// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers\n\t$tw.rootWidget = new widget.widget({\n\t\ttype: \&quot;widget\&quot;,\n\t\tchildren: []\n\t},{\n\t\twiki: $tw.wiki,\n\t\tdocument: document\n\t});\n\t// Install the modal message mechanism\n\t$tw.modal = new $tw.utils.Modal($tw.wiki);\n\t$tw.rootWidget.addEventListener(\&quot;tw-modal\&quot;,function(event) {\n\t\t$tw.modal.display(event.param);\n\t});\n\t// Install the notification  mechanism\n\t$tw.notifier = new $tw.utils.Notifier($tw.wiki);\n\t$tw.rootWidget.addEventListener(\&quot;tw-notify\&quot;,function(event) {\n\t\t$tw.notifier.display(event.param);\n\t});\n\t// Install the scroller\n\t$tw.pageScroller = new $tw.utils.PageScroller();\n\t$tw.rootWidget.addEventListener(\&quot;tw-scroll\&quot;,function(event) {\n\t\t$tw.pageScroller.handleEvent(event);\n\t});\n\t// Install the save action handlers\n\t$tw.rootWidget.addEventListener(\&quot;tw-save-wiki\&quot;,function(event) {\n\t\t$tw.syncer.saveWiki({\n\t\t\ttemplate: event.param,\n\t\t\tdownloadType: \&quot;text/plain\&quot;\n\t\t});\n\t});\n\t$tw.rootWidget.addEventListener(\&quot;tw-auto-save-wiki\&quot;,function(event) {\n\t\t$tw.syncer.saveWiki({\n\t\t\tmethod: \&quot;autosave\&quot;,\n\t\t\ttemplate: event.param,\n\t\t\tdownloadType: \&quot;text/plain\&quot;\n\t\t});\n\t});\n\t$tw.rootWidget.addEventListener(\&quot;tw-download-file\&quot;,function(event) {\n\t\t$tw.syncer.saveWiki({\n\t\t\tmethod: \&quot;download\&quot;,\n\t\t\ttemplate: event.param,\n\t\t\tdownloadType: \&quot;text/plain\&quot;\n\t\t});\n\t});\n\t// If we're being viewed on a data: URI then give instructions for how to save\n\tif(document.location.protocol === \&quot;data:\&quot;) {\n\t\t$tw.rootWidget.dispatchEvent({\n\t\t\ttype: \&quot;tw-modal\&quot;,\n\t\t\tparam: \&quot;$:/language/Modals/SaveInstructions\&quot;\n\t\t});\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/startup/rootwidget.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        },
        &quot;$:/core/modules/startup/story.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/startup/story.js\ntype: application/javascript\nmodule-type: startup\n\nLoad core modules\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;story\&quot;;\nexports.after = [\&quot;startup\&quot;];\nexports.synchronous = true;\n\n// Default story and history lists\nvar DEFAULT_STORY_TITLE = \&quot;$:/StoryList\&quot;;\nvar DEFAULT_HISTORY_TITLE = \&quot;$:/HistoryList\&quot;;\n\n// Default tiddlers\nvar DEFAULT_TIDDLERS_TITLE = \&quot;$:/DefaultTiddlers\&quot;;\n\n// Config\nvar CONFIG_UPDATE_ADDRESS_BAR = \&quot;$:/config/Navigation/UpdateAddressBar\&quot;; // Can be \&quot;no\&quot;, \&quot;permalink\&quot;, \&quot;permaview\&quot;\nvar CONFIG_UPDATE_HISTORY = \&quot;$:/config/Navigation/UpdateHistory\&quot;; // Can be \&quot;yes\&quot; or \&quot;no\&quot;\n\nexports.startup = function() {\n\t// Open startup tiddlers\n\topenStartupTiddlers();\n\tif($tw.browser) {\n\t\t// Set up location hash update\n\t\t$tw.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\t\tif($tw.utils.hop(changes,DEFAULT_STORY_TITLE) || $tw.utils.hop(changes,DEFAULT_HISTORY_TITLE)) {\n\t\t\t\tupdateLocationHash();\n\t\t\t}\n\t\t});\n\t\t// Listen for changes to the browser location hash\n\t\twindow.addEventListener(\&quot;hashchange\&quot;,function() {\n\t\t\tvar hash = $tw.utils.getLocationHash();\n\t\t\tif(hash !== $tw.locationHash) {\n\t\t\t\t$tw.locationHash = hash;\n\t\t\t\topenStartupTiddlers({defaultToCurrentStory: true});\n\t\t\t}\n\t\t},false)\n\t\t// Listen for the tw-home message\n\t\t$tw.rootWidget.addEventListener(\&quot;tw-home\&quot;,function(event) {\n\t\t\tvar storyFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE),\n\t\t\t\tstoryList = $tw.wiki.filterTiddlers(storyFilter);\n\t\t\t$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: \&quot;\&quot;, list: storyList},$tw.wiki.getModificationFields());\n\t\t});\n\t}\n};\n\n/*\nProcess the location hash to open the specified tiddlers. Options:\ndefaultToCurrentStory: If true, the current story is retained as the default, instead of opening the default tiddlers\n*/\nfunction openStartupTiddlers(options) {\n\toptions = options || {};\n\t// Work out the target tiddler and the story filter. \&quot;null\&quot; means \&quot;unspecified\&quot;\n\tvar target = null,\n\t\tstoryFilter = null;\n\tif($tw.locationHash.length &gt; 1) {\n\t\tvar hash = $tw.locationHash.substr(1),\n\t\t\tsplit = hash.indexOf(\&quot;:\&quot;);\n\t\tif(split === -1) {\n\t\t\ttarget = decodeURIComponent(hash.trim());\n\t\t} else {\n\t\t\ttarget = decodeURIComponent(hash.substr(0,split).trim());\n\t\t\tstoryFilter = decodeURIComponent(hash.substr(split + 1).trim());\n\t\t}\n\t}\n\t// If the story wasn't specified use the current tiddlers or a blank story\n\tif(storyFilter === null) {\n\t\tif(options.defaultToCurrentStory) {\n\t\t\tvar currStoryList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE);\n\t\t\tstoryFilter = $tw.utils.stringifyList(currStoryList);\n\t\t} else {\n\t\t\tif(target &amp;&amp; target !== \&quot;\&quot;) {\n\t\t\t\tstoryFilter = \&quot;\&quot;;\n\t\t\t} else {\n\t\t\t\tstoryFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE);\n\t\t\t}\n\t\t}\n\t}\n\t// Process the story filter to get the story list\n\tvar storyList = $tw.wiki.filterTiddlers(storyFilter);\n\t// If the target tiddler isn't included then splice it in at the top\n\tif(target &amp;&amp; storyList.indexOf(target) === -1) {\n\t\tstoryList.unshift(target);\n\t}\n\t// Save the story list\n\t$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: \&quot;\&quot;, list: storyList},$tw.wiki.getModificationFields());\n\t// If a target tiddler was specified add it to the history stack\n\tif(target &amp;&amp; target !== \&quot;\&quot;) {\n\t\t// The target tiddler doesn't need double square brackets, but we'll silently remove them if they're present\n\t\tif(target.indexOf(\&quot;[[\&quot;) === 0 &amp;&amp; target.substr(-2) === \&quot;]]\&quot;) {\n\t\t\ttarget = target.substr(2,target.length - 4);\n\t\t}\n\t\t$tw.wiki.addToHistory(target);\n\t} else if(storyList.length &gt; 0) {\n\t\t$tw.wiki.addToHistory(storyList[0]);\n\t}\n}\n\nfunction updateLocationHash() {\n\tvar updateAddressBar = $tw.wiki.getTiddlerText(CONFIG_UPDATE_ADDRESS_BAR,\&quot;permaview\&quot;).trim();\n\tif(updateAddressBar !== \&quot;no\&quot;) {\n\t\t// Get the story and the history stack\n\t\tvar storyList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE),\n\t\t\thistoryList = $tw.wiki.getTiddlerData(DEFAULT_HISTORY_TITLE,[]);\n\t\t\tvar targetTiddler = \&quot;\&quot;;\n\t\t// The target tiddler is the one at the top of the stack\n\t\tif(historyList.length &gt; 0) {\n\t\t\ttargetTiddler = historyList[historyList.length-1].title;\n\t\t}\n\t\t// Blank the target tiddler if it isn't present in the story\n\t\tif(storyList.indexOf(targetTiddler) === -1) {\n\t\t\ttargetTiddler = \&quot;\&quot;;\n\t\t}\n\t\t// Assemble the location hash\n\t\tif(updateAddressBar === \&quot;permalink\&quot;) {\n\t\t\t$tw.locationHash = \&quot;#\&quot; + encodeURIComponent(targetTiddler)\n\t\t} else {\n\t\t\t$tw.locationHash = \&quot;#\&quot; + encodeURIComponent(targetTiddler) + \&quot;:\&quot; + encodeURIComponent($tw.utils.stringifyList(storyList));\n\t\t}\n\t\t// Only change the location hash if we must, thus avoiding unnecessary onhashchange events\n\t\tif($tw.utils.getLocationHash() !== $tw.locationHash) {\n\t\t\tif($tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\&quot;no\&quot;).trim() === \&quot;yes\&quot;) {\n\t\t\t\t// Assign the location hash so that history is updated\n\t\t\t\twindow.location.hash = $tw.locationHash;\n\t\t\t} else {\n\t\t\t\t// We use replace so that browser history isn't affected\n\t\t\t\twindow.location.replace(window.location.toString().split(\&quot;#\&quot;)[0] + $tw.locationHash);\n\t\t\t}\n\t\t}\n\t}\n}\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/startup/story.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        },
        &quot;$:/core/modules/startup/syncer-browser.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/startup/syncer-browser.js\ntype: application/javascript\nmodule-type: startup\n\nStartup handling\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;syncer-browser\&quot;;\nexports.platforms = [\&quot;browser\&quot;];\nexports.after = [\&quot;rootwidget\&quot;];\nexports.synchronous = true;\n\nexports.startup = function() {\n\t// Listen out for login/logout/refresh events in the browser\n\t$tw.rootWidget.addEventListener(\&quot;tw-login\&quot;,function() {\n\t\t$tw.syncer.handleLoginEvent();\n\t});\n\t$tw.rootWidget.addEventListener(\&quot;tw-logout\&quot;,function() {\n\t\t$tw.syncer.handleLogoutEvent();\n\t});\n\t$tw.rootWidget.addEventListener(\&quot;tw-server-refresh\&quot;,function() {\n\t\t$tw.syncer.handleRefreshEvent();\n\t});\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/startup/syncer-browser.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        },
        &quot;$:/core/modules/startup.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/startup.js\ntype: application/javascript\nmodule-type: startup\n\nThis is the main application logic for both the client and server\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;startup\&quot;;\nexports.after = [\&quot;load-modules\&quot;];\nexports.synchronous = true;\n\n// Set to `true` to enable performance instrumentation\nvar PERFORMANCE_INSTRUMENTATION = false;\n\nexports.startup = function() {\n\tvar modules,n,m,f;\n\tif($tw.browser) {\n\t\t$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));\n\t}\n\t$tw.version = $tw.utils.extractVersionInfo();\n\t// Set up the performance framework\n\t$tw.perf = new $tw.Performance(PERFORMANCE_INSTRUMENTATION);\n\t// Kick off the language manager and switcher\n\t$tw.language = new $tw.Language();\n\t$tw.languageSwitcher = new $tw.PluginSwitcher({\n\t\twiki: $tw.wiki,\n\t\tpluginType: \&quot;language\&quot;,\n\t\tcontrollerTitle: \&quot;$:/language\&quot;,\n\t\tdefaultPlugins: [\n\t\t\t\&quot;$:/languages/en-US\&quot;\n\t\t]\n\t});\n\t// Kick off the theme manager\n\t$tw.themeManager = new $tw.PluginSwitcher({\n\t\twiki: $tw.wiki,\n\t\tpluginType: \&quot;theme\&quot;,\n\t\tcontrollerTitle: \&quot;$:/theme\&quot;,\n\t\tdefaultPlugins: [\n\t\t\t\&quot;$:/themes/tiddlywiki/snowwhite\&quot;,\n\t\t\t\&quot;$:/themes/tiddlywiki/vanilla\&quot;\n\t\t]\n\t});\n\t// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup\n\t$tw.wiki.clearTiddlerEventQueue();\n\t// Set up the syncer object\n\t$tw.syncer = new $tw.Syncer({wiki: $tw.wiki});\n\t// Host-specific startup\n\tif($tw.browser) {\n\t\t// Set up our beforeunload handler\n\t\twindow.addEventListener(\&quot;beforeunload\&quot;,function(event) {\n\t\t\tvar confirmationMessage = undefined;\n\t\t\tif($tw.syncer.isDirty()) {\n\t\t\t\tconfirmationMessage = \&quot;You have unsaved changes in TiddlyWiki\&quot;;\n\t\t\t\tevent.returnValue = confirmationMessage; // Gecko\n\t\t\t}\n\t\t\treturn confirmationMessage;\n\t\t});\n\t\t// Install the popup manager\n\t\t$tw.popup = new $tw.utils.Popup({\n\t\t\trootElement: document.body\n\t\t});\n\t\t// Install the animator\n\t\t$tw.anim = new $tw.utils.Animator();\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/startup.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        },
        &quot;$:/core/modules/storyviews/classic.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/storyviews/classic.js\ntype: application/javascript\nmodule-type: storyview\n\nViews the story as a linear sequence\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar ClassicStoryView = function(listWidget) {\n\tthis.listWidget = listWidget;\n}\n\nClassicStoryView.prototype.navigateTo = function(historyInfo) {\n\tvar listElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Scroll the node into view\n\tthis.listWidget.dispatchEvent({type: \&quot;tw-scroll\&quot;, target: targetElement});\n};\n\nClassicStoryView.prototype.insert = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Get the current height of the tiddler\n\tvar computedStyle = window.getComputedStyle(targetElement),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrHeight = targetElement.offsetHeight + currMarginTop;\n\t// Reset the margin once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(targetElement,[\n\t\t\t{transition: \&quot;none\&quot;},\n\t\t\t{marginBottom: \&quot;\&quot;}\n\t\t]);\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \&quot;none\&quot;},\n\t\t{marginBottom: (-currHeight) + \&quot;px\&quot;},\n\t\t{opacity: \&quot;0.0\&quot;}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t// Transition to the final position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \&quot;opacity \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;margin-bottom \&quot; + duration + \&quot;ms ease-in-out\&quot;},\n\t\t{marginBottom: currMarginBottom + \&quot;px\&quot;},\n\t\t{opacity: \&quot;1.0\&quot;}\n\t]);\n};\n\nClassicStoryView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Get the current height of the tiddler\n\tvar currWidth = targetElement.offsetWidth,\n\t\tcomputedStyle = window.getComputedStyle(targetElement),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrHeight = targetElement.offsetHeight + currMarginTop;\n\t// Remove the dom nodes of the widget at the end of the transition\n\tsetTimeout(function() {\n\t\twidget.removeChildDomNodes();\n\t},duration);\n\t// Animate the closure\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \&quot;none\&quot;},\n\t\t{transform: \&quot;translateX(0px)\&quot;},\n\t\t{marginBottom:  currMarginBottom + \&quot;px\&quot;},\n\t\t{opacity: \&quot;1.0\&quot;}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\&quot;transform\&quot;) + \&quot; \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;opacity \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;margin-bottom \&quot; + duration + \&quot;ms ease-in-out\&quot;},\n\t\t{transform: \&quot;translateX(-\&quot; + currWidth + \&quot;px)\&quot;},\n\t\t{marginBottom: (-currHeight) + \&quot;px\&quot;},\n\t\t{opacity: \&quot;0.0\&quot;}\n\t]);\n};\n\nexports.classic = ClassicStoryView;\n\n})();&quot;,
            &quot;title&quot;: &quot;$:/core/modules/storyviews/classic.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;storyview&quot;
        },
        &quot;$:/core/modules/storyviews/pop.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/storyviews/pop.js\ntype: application/javascript\nmodule-type: storyview\n\nAnimates list insertions and removals\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar PopStoryView = function(listWidget) {\n\tthis.listWidget = listWidget;\n}\n\nPopStoryView.prototype.navigateTo = function(historyInfo) {\n\tvar listElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Scroll the node into view\n\tthis.listWidget.dispatchEvent({type: \&quot;tw-scroll\&quot;, target: targetElement});\n};\n\nPopStoryView.prototype.insert = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Reset once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(targetElement,[\n\t\t\t{transition: \&quot;none\&quot;},\n\t\t\t{transform: \&quot;none\&quot;}\n\t\t]);\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \&quot;none\&quot;},\n\t\t{transform: \&quot;scale(2)\&quot;},\n\t\t{opacity: \&quot;0.0\&quot;}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t// Transition to the final position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\&quot;transform\&quot;) + \&quot; \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;opacity \&quot; + duration + \&quot;ms ease-in-out\&quot;},\n\t\t{transform: \&quot;scale(1)\&quot;},\n\t\t{opacity: \&quot;1.0\&quot;}\n\t]);\n};\n\nPopStoryView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Remove the element at the end of the transition\n\tsetTimeout(function() {\n\t\tif(targetElement.parentNode) {\n\t\t\twidget.removeChildDomNodes();\n\t\t}\n\t},duration);\n\t// Animate the closure\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \&quot;none\&quot;},\n\t\t{transform: \&quot;scale(1)\&quot;},\n\t\t{opacity: \&quot;1.0\&quot;}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\&quot;transform\&quot;) + \&quot; \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;opacity \&quot; + duration + \&quot;ms ease-in-out\&quot;},\n\t\t{transform: \&quot;scale(0.1)\&quot;},\n\t\t{opacity: \&quot;0.0\&quot;}\n\t]);\n};\n\nexports.pop = PopStoryView;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/storyviews/pop.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;storyview&quot;
        },
        &quot;$:/core/modules/storyviews/zoomin.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/storyviews/zoomin.js\ntype: application/javascript\nmodule-type: storyview\n\nZooms between individual tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar ZoominListView = function(listWidget) {\n\tvar self = this;\n\tthis.listWidget = listWidget;\n\t// Get the index of the tiddler that is at the top of the history\n\tvar history = this.listWidget.wiki.getTiddlerData(this.listWidget.historyTitle,[]),\n\t\ttargetTiddler;\n\tif(history.length &gt; 0) {\n\t\ttargetTiddler = history[history.length-1].title;\n\t}\n\t// Make all the tiddlers position absolute, and hide all but the top (or first) one\n\t$tw.utils.each(this.listWidget.children,function(itemWidget,index) {\n\t\tvar domNode = itemWidget.findFirstDomNode();\n\t\tif(targetTiddler !== itemWidget.parseTreeNode.itemTitle || (!targetTiddler &amp;&amp; index)) {\n\t\t\tdomNode.style.display = \&quot;none\&quot;;\n\t\t} else {\n\t\t\tself.currentTiddlerDomNode = domNode;\n\t\t}\n\t\tdomNode.style.position = \&quot;absolute\&quot;;\n\t});\n};\n\nZoominListView.prototype.navigateTo = function(historyInfo) {\n\tvar duration = $tw.utils.getAnimationDuration(),\n\t\tlistElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Make the new tiddler be position absolute and visible so that we can measure it\n\t$tw.utils.setStyle(targetElement,[\n\t\t{position: \&quot;absolute\&quot;},\n\t\t{display: \&quot;block\&quot;},\n\t\t{transformOrigin: \&quot;0 0\&quot;},\n\t\t{transform: \&quot;translateX(0px) translateY(0px) scale(1)\&quot;},\n\t\t{transition: \&quot;none\&quot;},\n\t\t{opacity: \&quot;0.0\&quot;}\n\t]);\n\t// Get the position of the source node, or use the centre of the window as the source position\n\tvar sourceBounds = historyInfo.fromPageRect || {\n\t\t\tleft: window.innerWidth/2 - 2,\n\t\t\ttop: window.innerHeight/2 - 2,\n\t\t\twidth: window.innerWidth/8,\n\t\t\theight: window.innerHeight/8\n\t\t};\n\t// Try to find the title node in the target tiddler\n\tvar titleDomNode = findTitleDomNode(listItemWidget) || listItemWidget.findFirstDomNode(),\n\t\tzoomBounds = titleDomNode.getBoundingClientRect();\n\t// Compute the transform for the target tiddler to make the title lie over the source rectange\n\tvar targetBounds = targetElement.getBoundingClientRect(),\n\t\tscale = sourceBounds.width / zoomBounds.width,\n\t\tx = sourceBounds.left - targetBounds.left - (zoomBounds.left - targetBounds.left) * scale,\n\t\ty = sourceBounds.top - targetBounds.top - (zoomBounds.top - targetBounds.top) * scale;\n\t// Transform the target tiddler to its starting position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transform: \&quot;translateX(\&quot; + x + \&quot;px) translateY(\&quot; + y + \&quot;px) scale(\&quot; + scale + \&quot;)\&quot;}\n\t]);\n\t// Force layout\n\t$tw.utils.forceLayout(targetElement);\n\t// Apply the ending transitions with a timeout to ensure that the previously applied transformations are applied first\n\tvar self = this,\n\t\tprevCurrentTiddler = this.currentTiddlerDomNode;\n\tthis.currentTiddlerDomNode = targetElement;\n\t// Transform the target tiddler to its natural size\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\&quot;transform\&quot;) + \&quot; \&quot; + duration + \&quot;ms ease-in, opacity \&quot; + duration + \&quot;ms ease-in\&quot;},\n\t\t{opacity: \&quot;1.0\&quot;},\n\t\t{transform: \&quot;translateX(0px) translateY(0px) scale(1)\&quot;},\n\t\t{zIndex: \&quot;500\&quot;},\n\t]);\n\t// Transform the previous tiddler out of the way and then hide it\n\tif(prevCurrentTiddler &amp;&amp; prevCurrentTiddler !== targetElement) {\n\t\tvar scale = zoomBounds.width / sourceBounds.width;\n\t\tx =  zoomBounds.left - targetBounds.left - (sourceBounds.left - targetBounds.left) * scale;\n\t\ty =  zoomBounds.top - targetBounds.top - (sourceBounds.top - targetBounds.top) * scale;\n\t\t$tw.utils.setStyle(prevCurrentTiddler,[\n\t\t\t{transition: $tw.utils.roundTripPropertyName(\&quot;transform\&quot;) + \&quot; \&quot; + duration + \&quot;ms ease-in, opacity \&quot; + duration + \&quot;ms ease-in\&quot;},\n\t\t\t{opacity: \&quot;0.0\&quot;},\n\t\t\t{transformOrigin: \&quot;0 0\&quot;},\n\t\t\t{transform: \&quot;translateX(\&quot; + x + \&quot;px) translateY(\&quot; + y + \&quot;px) scale(\&quot; + scale + \&quot;)\&quot;},\n\t\t\t{zIndex: \&quot;0\&quot;}\n\t\t]);\n\t\t// Hide the tiddler when the transition has finished\n\t\tsetTimeout(function() {\n\t\t\tif(self.currentTiddlerDomNode !== prevCurrentTiddler) {\n\t\t\t\tprevCurrentTiddler.style.display = \&quot;none\&quot;;\n\t\t\t}\n\t\t},duration);\n\t}\n\t// Scroll the target into view\n//\t$tw.pageScroller.scrollIntoView(targetElement);\n};\n\n/*\nFind the first child DOM node of a widget that has the class \&quot;title\&quot;\n*/\nfunction findTitleDomNode(widget,targetClass) {\n\ttargetClass = targetClass || \&quot;title\&quot;;\n\tvar domNode = widget.findFirstDomNode();\n\tif(domNode &amp;&amp; domNode.querySelector) {\n\t\treturn domNode.querySelector(\&quot;.\&quot; + targetClass);\n\t}\n\treturn null;\n}\n\nZoominListView.prototype.insert = function(widget) {\n\tvar targetElement = widget.findFirstDomNode();\n\t// Make the newly inserted node position absolute and hidden\n\t$tw.utils.setStyle(targetElement,[\n\t\t{display: \&quot;none\&quot;},\n\t\t{position: \&quot;absolute\&quot;}\n\t]);\n};\n\nZoominListView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Set up the tiddler that is being closed\n\t$tw.utils.setStyle(targetElement,[\n\t\t{position: \&quot;absolute\&quot;},\n\t\t{display: \&quot;block\&quot;},\n\t\t{transformOrigin: \&quot;50% 50%\&quot;},\n\t\t{transform: \&quot;translateX(0px) translateY(0px) scale(1)\&quot;},\n\t\t{transition: \&quot;none\&quot;},\n\t\t{zIndex: \&quot;0\&quot;}\n\t]);\n\t// We'll move back to the previous or next element in the story\n\tvar toWidget = widget.previousSibling();\n\tif(!toWidget) {\n\t\ttoWidget = widget.nextSibling();\n\t}\n\tvar toWidgetDomNode = toWidget &amp;&amp; toWidget.findFirstDomNode();\n\t// Set up the tiddler we're moving back in\n\tif(toWidgetDomNode) {\n\t\t$tw.utils.setStyle(toWidgetDomNode,[\n\t\t\t{position: \&quot;absolute\&quot;},\n\t\t\t{display: \&quot;block\&quot;},\n\t\t\t{transformOrigin: \&quot;50% 50%\&quot;},\n\t\t\t{transform: \&quot;translateX(0px) translateY(0px) scale(10)\&quot;},\n\t\t\t{transition: $tw.utils.roundTripPropertyName(\&quot;transform\&quot;) + \&quot; \&quot; + duration + \&quot;ms ease-in, opacity \&quot; + duration + \&quot;ms ease-in\&quot;},\n\t\t\t{opacity: \&quot;0\&quot;},\n\t\t\t{zIndex: \&quot;500\&quot;}\n\t\t]);\n\t\tthis.currentTiddlerDomNode = toWidgetDomNode;\n\t}\n\t// Animate them both\n\t// Force layout\n\t$tw.utils.forceLayout(this.listWidget.parentDomNode);\n\t// First, the tiddler we're closing\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transformOrigin: \&quot;50% 50%\&quot;},\n\t\t{transform: \&quot;translateX(0px) translateY(0px) scale(0.1)\&quot;},\n\t\t{transition: $tw.utils.roundTripPropertyName(\&quot;transform\&quot;) + \&quot; \&quot; + duration + \&quot;ms ease-in, opacity \&quot; + duration + \&quot;ms ease-in\&quot;},\n\t\t{opacity: \&quot;0\&quot;},\n\t\t{zIndex: \&quot;0\&quot;}\n\t]);\n\tsetTimeout(function() {\n\t\t// Delete the DOM node when the transition is over\n\t\twidget.removeChildDomNodes();\n\t},duration);\n\t// Now the tiddler we're going back to\n\tif(toWidgetDomNode) {\n\t\t$tw.utils.setStyle(toWidgetDomNode,[\n\t\t\t{transform: \&quot;translateX(0px) translateY(0px) scale(1)\&quot;},\n\t\t\t{opacity: \&quot;1\&quot;}\n\t\t]);\n\t}\n\treturn true; // Indicate that we'll delete the DOM node\n};\n\nexports.zoomin = ZoominListView;\n\n})();&quot;,
            &quot;title&quot;: &quot;$:/core/modules/storyviews/zoomin.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;storyview&quot;
        },
        &quot;$:/core/modules/syncer.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/syncer.js\ntype: application/javascript\nmodule-type: global\n\nThe syncer tracks changes to the store. If a syncadaptor is used then individual tiddlers are synchronised through it. If there is no syncadaptor then the entire wiki is saved via saver modules.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nInstantiate the syncer with the following options:\nwiki: wiki to be synced\n*/\nfunction Syncer(options) {\n\tvar self = this;\n\tthis.wiki = options.wiki;\n\t// Make a logger\n\tthis.logger = new $tw.utils.Logger(\&quot;syncer\&quot; + ($tw.browser ? \&quot;-browser\&quot; : \&quot;\&quot;) + ($tw.node ? \&quot;-server\&quot; : \&quot;\&quot;));\n\t// Find a working syncadaptor\n\tthis.syncadaptor = undefined;\n\t$tw.modules.forEachModuleOfType(\&quot;syncadaptor\&quot;,function(title,module) {\n\t\tif(!self.syncadaptor &amp;&amp; module.adaptorClass) {\n\t\t\tself.syncadaptor = new module.adaptorClass(self);\n\t\t}\n\t});\n\t// Initialise our savers\n\tif($tw.browser) {\n\t\tthis.initSavers();\n\t}\n\t// Compile the dirty tiddler filter\n\tthis.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));\n\t// Record information for known tiddlers\n\tthis.readTiddlerInfo();\n\t// Tasks are {type: \&quot;load\&quot;/\&quot;save\&quot;/\&quot;delete\&quot;, title:, queueTime:, lastModificationTime:}\n\tthis.taskQueue = {}; // Hashmap of tasks yet to be performed\n\tthis.taskInProgress = {}; // Hash of tasks in progress\n\tthis.taskTimerId = null; // Timer for task dispatch\n\tthis.pollTimerId = null; // Timer for polling server\n\t// Listen out for changes to tiddlers\n\tthis.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\tself.syncToServer(changes);\n\t});\n\t// Listen out for lazyLoad events\n\tif(this.syncadaptor) {\n\t\tthis.wiki.addEventListener(\&quot;lazyLoad\&quot;,function(title) {\n\t\t\tself.handleLazyLoadEvent(title);\n\t\t});\n\t}\n\t// Get the login status\n\tthis.getStatus(function (err,isLoggedIn) {\n\t\t// Do a sync from the server\n\t\tself.syncFromServer();\n\t});\n}\n\n/*\nConstants\n*/\nSyncer.prototype.titleIsLoggedIn = \&quot;$:/status/IsLoggedIn\&quot;;\nSyncer.prototype.titleUserName = \&quot;$:/status/UserName\&quot;;\nSyncer.prototype.titleSyncFilter = \&quot;$:/config/SyncFilter\&quot;;\nSyncer.prototype.titleAutoSave = \&quot;$:/config/AutoSave\&quot;;\nSyncer.prototype.titleSavedNotification = \&quot;$:/language/Notifications/Save/Done\&quot;;\nSyncer.prototype.taskTimerInterval = 1 * 1000; // Interval for sync timer\nSyncer.prototype.throttleInterval = 1 * 1000; // Defer saving tiddlers if they've changed in the last 1s...\nSyncer.prototype.fallbackInterval = 10 * 1000; // Unless the task is older than 10s\nSyncer.prototype.pollTimerInterval = 60 * 1000; // Interval for polling for changes from the adaptor\n\n/*\nRead (or re-read) the latest tiddler info from the store\n*/\nSyncer.prototype.readTiddlerInfo = function() {\n\t// Hashmap by title of {revision:,changeCount:,adaptorInfo:}\n\tthis.tiddlerInfo = {};\n\t// Record information for known tiddlers\n\tvar self = this,\n\t\ttiddlers = this.filterFn.call(this.wiki);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\tself.tiddlerInfo[title] = {\n\t\t\trevision: tiddler.fields[\&quot;revision\&quot;],\n\t\t\tadaptorInfo: self.syncadaptor &amp;&amp; self.syncadaptor.getTiddlerInfo(tiddler),\n\t\t\tchangeCount: self.wiki.getChangeCount(title)\n\t\t}\n\t});\n};\n\n/*\nSelect the appropriate saver modules and set them up\n*/\nSyncer.prototype.initSavers = function(moduleType) {\n\tmoduleType = moduleType || \&quot;saver\&quot;;\n\t// Instantiate the available savers\n\tthis.savers = [];\n\tvar self = this;\n\t$tw.modules.forEachModuleOfType(moduleType,function(title,module) {\n\t\tif(module.canSave(self)) {\n\t\t\tself.savers.push(module.create(self.wiki));\n\t\t}\n\t});\n\t// Sort the savers into priority order\n\tthis.savers.sort(function(a,b) {\n\t\tif(a.info.priority &lt; b.info.priority) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\tif(a.info.priority &gt; b.info.priority) {\n\t\t\t\treturn +1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\nSave the wiki contents. Options are:\n\tmethod: \&quot;save\&quot; or \&quot;download\&quot;\n\ttemplate: the tiddler containing the template to save\n\tdownloadType: the content type for the saved file\n*/\nSyncer.prototype.saveWiki = function(options) {\n\toptions = options || {};\n\tvar self = this,\n\t\tmethod = options.method || \&quot;save\&quot;,\n\t\ttemplate = options.template || \&quot;$:/core/save/all\&quot;,\n\t\tdownloadType = options.downloadType || \&quot;text/plain\&quot;,\n\t\ttext = this.wiki.renderTiddler(downloadType,template),\n\t\tcallback = function(err) {\n\t\t\tif(err) {\n\t\t\t\talert(\&quot;Error while saving:\\n\\n\&quot; + err);\n\t\t\t} else {\n\t\t\t\t$tw.notifier.display(self.titleSavedNotification);\n\t\t\t\tif(options.callback) {\n\t\t\t\t\toptions.callback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t// Ignore autosave if we've got a syncadaptor or autosave is disabled\n\tif(method === \&quot;autosave\&quot;) {\n\t\tif(this.syncadaptor || this.wiki.getTiddlerText(this.titleAutoSave,\&quot;yes\&quot;) !== \&quot;yes\&quot;) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Call the highest priority saver that supports this method\n\tfor(var t=this.savers.length-1; t&gt;=0; t--) {\n\t\tvar saver = this.savers[t];\n\t\tif(saver.info.capabilities.indexOf(method) !== -1 &amp;&amp; saver.save(text,method,callback)) {\n\t\t\tthis.logger.log(\&quot;Saving wiki with method\&quot;,method,\&quot;through saver\&quot;,saver.info.name);\n\t\t\t// Clear the task queue if we're saving (rather than downloading)\n\t\t\tif(method !== \&quot;download\&quot;) {\n\t\t\t\tthis.readTiddlerInfo();\n\t\t\t\tthis.taskQueue = {};\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n\n/*\nChecks whether the wiki is dirty (ie the window shouldn't be closed)\n*/\nSyncer.prototype.isDirty = function() {\n\treturn (this.numTasksInQueue() &gt; 0) || (this.numTasksInProgress() &gt; 0);\n};\n\n/*\nSave an incoming tiddler in the store, and updates the associated tiddlerInfo\n*/\nSyncer.prototype.storeTiddler = function(tiddlerFields) {\n\t// Save the tiddler\n\tvar tiddler = new $tw.Tiddler(this.wiki.getTiddler(tiddlerFields.title),tiddlerFields);\n\tthis.wiki.addTiddler(tiddler);\n\t// Save the tiddler revision and changeCount details\n\tthis.tiddlerInfo[tiddlerFields.title] = {\n\t\trevision: tiddlerFields.revision,\n\t\tadaptorInfo: this.syncadaptor.getTiddlerInfo(tiddler),\n\t\tchangeCount: this.wiki.getChangeCount(tiddlerFields.title)\n\t};\n};\n\nSyncer.prototype.getStatus = function(callback) {\n\tvar self = this;\n\t// Check if the adaptor supports getStatus()\n\tif(this.syncadaptor &amp;&amp; this.syncadaptor.getStatus) {\n\t\t// Mark us as not logged in\n\t\tthis.wiki.addTiddler({title: this.titleIsLoggedIn,text: \&quot;no\&quot;});\n\t\t// Get login status\n\t\tthis.syncadaptor.getStatus(function(err,isLoggedIn,username) {\n\t\t\tif(err) {\n\t\t\t\tself.logger.alert(err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Set the various status tiddlers\n\t\t\tself.wiki.addTiddler({title: self.titleIsLoggedIn,text: isLoggedIn ? \&quot;yes\&quot; : \&quot;no\&quot;});\n\t\t\tif(isLoggedIn) {\n\t\t\t\tself.wiki.addTiddler({title: self.titleUserName,text: username || \&quot;\&quot;});\n\t\t\t} else {\n\t\t\t\tself.wiki.deleteTiddler(self.titleUserName);\n\t\t\t}\n\t\t\t// Invoke the callback\n\t\t\tif(callback) {\n\t\t\t\tcallback(err,isLoggedIn,username);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tcallback(null,true,\&quot;UNAUTHENTICATED\&quot;);\n\t}\n};\n\n/*\nSynchronise from the server by reading the skinny tiddler list and queuing up loads for any tiddlers that we don't already have up to date\n*/\nSyncer.prototype.syncFromServer = function() {\n\tif(this.syncadaptor &amp;&amp; this.syncadaptor.getSkinnyTiddlers) {\n\t\tthis.logger.log(\&quot;Retrieving skinny tiddler list\&quot;);\n\t\tvar self = this;\n\t\tif(this.pollTimerId) {\n\t\t\tclearTimeout(this.pollTimerId);\n\t\t\tthis.pollTimerId = null;\n\t\t}\n\t\tthis.syncadaptor.getSkinnyTiddlers(function(err,tiddlers) {\n\t\t\t// Trigger another sync\n\t\t\tself.pollTimerId = setTimeout(function() {\n\t\t\t\tself.pollTimerId = null;\n\t\t\t\tself.syncFromServer.call(self);\n\t\t\t},self.pollTimerInterval);\n\t\t\t// Check for errors\n\t\t\tif(err) {\n\t\t\t\tself.logger.alert(\&quot;Error retrieving skinny tiddler list:\&quot;,err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Process each incoming tiddler\n\t\t\tfor(var t=0; t&lt;tiddlers.length; t++) {\n\t\t\t\t// Get the incoming tiddler fields, and the existing tiddler\n\t\t\t\tvar tiddlerFields = tiddlers[t],\n\t\t\t\t\tincomingRevision = tiddlerFields.revision + \&quot;\&quot;,\n\t\t\t\t\ttiddler = self.wiki.getTiddler(tiddlerFields.title),\n\t\t\t\t\ttiddlerInfo = self.tiddlerInfo[tiddlerFields.title],\n\t\t\t\t\tcurrRevision = tiddlerInfo ? tiddlerInfo.revision : null;\n\t\t\t\t// Ignore the incoming tiddler if it's the same as the revision we've already got\n\t\t\t\tif(currRevision !== incomingRevision) {\n\t\t\t\t\t// Do a full load if we've already got a fat version of the tiddler\n\t\t\t\t\tif(tiddler &amp;&amp; tiddler.fields.text !== undefined) {\n\t\t\t\t\t\t// Do a full load of this tiddler\n\t\t\t\t\t\tself.enqueueSyncTask({\n\t\t\t\t\t\t\ttype: \&quot;load\&quot;,\n\t\t\t\t\t\t\ttitle: tiddlerFields.title\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Load the skinny version of the tiddler\n\t\t\t\t\t\tself.storeTiddler(tiddlerFields);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\nSynchronise a set of changes to the server\n*/\nSyncer.prototype.syncToServer = function(changes) {\n\tvar self = this,\n\t\tnow = Date.now(),\n\t\tfilteredChanges = this.filterFn.call(this.wiki,function(callback) {\n\t\t\t$tw.utils.each(changes,function(change,title) {\n\t\t\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\t\t\tcallback(tiddler,title);\n\t\t\t});\n\t\t});\n\t$tw.utils.each(changes,function(change,title,object) {\n\t\t// Process the change if it is a deletion of a tiddler we're already syncing, or is on the filtered change list\n\t\tif((change.deleted &amp;&amp; $tw.utils.hop(self.tiddlerInfo,title)) || filteredChanges.indexOf(title) !== -1) {\n\t\t\t// Queue a task to sync this tiddler\n\t\t\tself.enqueueSyncTask({\n\t\t\t\ttype: change.deleted ? \&quot;delete\&quot; : \&quot;save\&quot;,\n\t\t\t\ttitle: title\n\t\t\t});\n\t\t}\n\t});\n};\n\n/*\nLazily load a skinny tiddler if we can\n*/\nSyncer.prototype.handleLazyLoadEvent = function(title) {\n\t// Queue up a sync task to load this tiddler\n\tthis.enqueueSyncTask({\n\t\ttype: \&quot;load\&quot;,\n\t\ttitle: title\n\t});\n};\n\n/*\nDispay a password prompt and allow the user to login\n*/\nSyncer.prototype.handleLoginEvent = function() {\n\tvar self = this;\n\tthis.getStatus(function(err,isLoggedIn,username) {\n\t\tif(!isLoggedIn) {\n\t\t\t$tw.passwordPrompt.createPrompt({\n\t\t\t\tserviceName: \&quot;Login to TiddlySpace\&quot;,\n\t\t\t\tcallback: function(data) {\n\t\t\t\t\tself.login(data.username,data.password,function(err,isLoggedIn) {\n\t\t\t\t\t\tself.syncFromServer();\n\t\t\t\t\t});\n\t\t\t\t\treturn true; // Get rid of the password prompt\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n};\n\n/*\nAttempt to login to TiddlyWeb.\n\tusername: username\n\tpassword: password\n\tcallback: invoked with arguments (err,isLoggedIn)\n*/\nSyncer.prototype.login = function(username,password,callback) {\n\tthis.logger.log(\&quot;Attempting to login as\&quot;,username);\n\tvar self = this;\n\tif(this.syncadaptor.login) {\n\t\tthis.syncadaptor.login(username,password,function(err) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\tself.getStatus(function(err,isLoggedIn,username) {\n\t\t\t\tif(callback) {\n\t\t\t\t\tcallback(null,isLoggedIn);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t} else {\n\t\tcallback(null,true);\n\t}\n};\n\n/*\nAttempt to log out of TiddlyWeb\n*/\nSyncer.prototype.handleLogoutEvent = function() {\n\tthis.logger.log(\&quot;Attempting to logout\&quot;);\n\tvar self = this;\n\tif(this.syncadaptor.logout) {\n\t\tthis.syncadaptor.logout(function(err) {\n\t\t\tif(err) {\n\t\t\t\tself.logger.alert(err);\n\t\t\t} else {\n\t\t\t\tself.getStatus();\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\nImmediately refresh from the server\n*/\nSyncer.prototype.handleRefreshEvent = function() {\n\tthis.syncFromServer();\n};\n\n/*\nQueue up a sync task. If there is already a pending task for the tiddler, just update the last modification time\n*/\nSyncer.prototype.enqueueSyncTask = function(task) {\n\tvar self = this,\n\t\tnow = Date.now();\n\t// Set the timestamps on this task\n\ttask.queueTime = now;\n\ttask.lastModificationTime = now;\n\t// Fill in some tiddlerInfo if the tiddler is one we haven't seen before\n\tif(!$tw.utils.hop(this.tiddlerInfo,task.title)) {\n\t\tthis.tiddlerInfo[task.title] = {\n\t\t\trevision: null,\n\t\t\tadaptorInfo: {},\n\t\t\tchangeCount: -1\n\t\t}\n\t}\n\t// Bail if this is a save and the tiddler is already at the changeCount that the server has\n\tif(task.type === \&quot;save\&quot; &amp;&amp; this.wiki.getChangeCount(task.title) &lt;= this.tiddlerInfo[task.title].changeCount) {\n\t\treturn;\n\t}\n\t// Check if this tiddler is already in the queue\n\tif($tw.utils.hop(this.taskQueue,task.title)) {\n\t\t// this.logger.log(\&quot;Re-queueing up sync task with type:\&quot;,task.type,\&quot;title:\&quot;,task.title);\n\t\tvar existingTask = this.taskQueue[task.title];\n\t\t// If so, just update the last modification time\n\t\texistingTask.lastModificationTime = task.lastModificationTime;\n\t\t// If the new task is a save then we upgrade the existing task to a save. Thus a pending load is turned into a save if the tiddler changes locally in the meantime. But a pending save is not modified to become a load\n\t\tif(task.type === \&quot;save\&quot; || task.type === \&quot;delete\&quot;) {\n\t\t\texistingTask.type = task.type;\n\t\t}\n\t} else {\n\t\t// this.logger.log(\&quot;Queuing up sync task with type:\&quot;,task.type,\&quot;title:\&quot;,task.title);\n\t\t// If it is not in the queue, insert it\n\t\tthis.taskQueue[task.title] = task;\n\t}\n\t// Process the queue\n\tif(this.syncadaptor) {\n\t\t$tw.utils.nextTick(function() {self.processTaskQueue.call(self);});\n\t}\n};\n\n/*\nReturn the number of tasks in progress\n*/\nSyncer.prototype.numTasksInProgress = function() {\n\treturn $tw.utils.count(this.taskInProgress);\n};\n\n/*\nReturn the number of tasks in the queue\n*/\nSyncer.prototype.numTasksInQueue = function() {\n\treturn $tw.utils.count(this.taskQueue);\n};\n\n/*\nTrigger a timeout if one isn't already outstanding\n*/\nSyncer.prototype.triggerTimeout = function() {\n\tvar self = this;\n\tif(!this.taskTimerId) {\n\t\tthis.taskTimerId = setTimeout(function() {\n\t\t\tself.taskTimerId = null;\n\t\t\tself.processTaskQueue.call(self);\n\t\t},self.taskTimerInterval);\n\t}\n};\n\n/*\nProcess the task queue, performing the next task if appropriate\n*/\nSyncer.prototype.processTaskQueue = function() {\n\tvar self = this;\n\t// Only process a task if we're not already performing a task. If we are already performing a task then we'll dispatch the next one when it completes\n\tif(this.numTasksInProgress() === 0) {\n\t\t// Choose the next task to perform\n\t\tvar task = this.chooseNextTask();\n\t\t// Perform the task if we had one\n\t\tif(task) {\n\t\t\t// Remove the task from the queue and add it to the in progress list\n\t\t\tdelete this.taskQueue[task.title];\n\t\t\tthis.taskInProgress[task.title] = task;\n\t\t\t// Dispatch the task\n\t\t\tthis.dispatchTask(task,function(err) {\n\t\t\t\tif(err) {\n\t\t\t\t\tself.logger.alert(\&quot;Sync error while processing '\&quot; + task.title + \&quot;':\\n\&quot; + err);\n\t\t\t\t}\n\t\t\t\t// Mark that this task is no longer in progress\n\t\t\t\tdelete self.taskInProgress[task.title];\n\t\t\t\t// Process the next task\n\t\t\t\tself.processTaskQueue.call(self);\n\t\t\t});\n\t\t} else {\n\t\t\t// Make sure we've set a time if there wasn't a task to perform, but we've still got tasks in the queue\n\t\t\tif(this.numTasksInQueue() &gt; 0) {\n\t\t\t\tthis.triggerTimeout();\n\t\t\t}\n\t\t}\n\t}\n};\n\n/*\nChoose the next applicable task\n*/\nSyncer.prototype.chooseNextTask = function() {\n\tvar self = this,\n\t\tcandidateTask = null,\n\t\tnow = Date.now();\n\t// Select the best candidate task\n\t$tw.utils.each(this.taskQueue,function(task,title) {\n\t\t// Exclude the task if there's one of the same name in progress\n\t\tif($tw.utils.hop(self.taskInProgress,title)) {\n\t\t\treturn;\n\t\t}\n\t\t// Exclude the task if it is a save and the tiddler has been modified recently, but not hit the fallback time\n\t\tif(task.type === \&quot;save\&quot; &amp;&amp; (now - task.lastModificationTime) &lt; self.throttleInterval &amp;&amp;\n\t\t\t(now - task.queueTime) &lt; self.fallbackInterval) {\n\t\t\treturn;\t\n\t\t}\n\t\t// Exclude the task if it is newer than the current best candidate\n\t\tif(candidateTask &amp;&amp; candidateTask.queueTime &lt; task.queueTime) {\n\t\t\treturn;\n\t\t}\n\t\t// Now this is our best candidate\n\t\tcandidateTask = task;\n\t});\n\treturn candidateTask;\n};\n\n/*\nDispatch a task and invoke the callback\n*/\nSyncer.prototype.dispatchTask = function(task,callback) {\n\tvar self = this;\n\tif(task.type === \&quot;save\&quot;) {\n\t\tvar changeCount = this.wiki.getChangeCount(task.title),\n\t\t\ttiddler = this.wiki.getTiddler(task.title);\n\t\tthis.logger.log(\&quot;Dispatching 'save' task:\&quot;,task.title);\n\t\tif(tiddler) {\n\t\t\tthis.syncadaptor.saveTiddler(tiddler,function(err,adaptorInfo,revision) {\n\t\t\t\tif(err) {\n\t\t\t\t\treturn callback(err);\n\t\t\t\t}\n\t\t\t\t// Adjust the info stored about this tiddler\n\t\t\t\tself.tiddlerInfo[task.title] = {\n\t\t\t\t\tchangeCount: changeCount,\n\t\t\t\t\tadaptorInfo: adaptorInfo,\n\t\t\t\t\trevision: revision\n\t\t\t\t};\n\t\t\t\t// Invoke the callback\n\t\t\t\tcallback(null);\n\t\t\t});\n\t\t} else {\n\t\t\tthis.logger.log(\&quot; Not Dispatching 'save' task:\&quot;,task.title,\&quot;tiddler does not exist\&quot;);\n\t\t\treturn callback(null);\n\t\t}\n\t} else if(task.type === \&quot;load\&quot;) {\n\t\t// Load the tiddler\n\t\tthis.logger.log(\&quot;Dispatching 'load' task:\&quot;,task.title);\n\t\tthis.syncadaptor.loadTiddler(task.title,function(err,tiddlerFields) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\t// Store the tiddler\n\t\t\tif(tiddlerFields) {\n\t\t\t\tself.storeTiddler(tiddlerFields);\n\t\t\t}\n\t\t\t// Invoke the callback\n\t\t\tcallback(null);\n\t\t});\n\t} else if(task.type === \&quot;delete\&quot;) {\n\t\t// Delete the tiddler\n\t\tthis.logger.log(\&quot;Dispatching 'delete' task:\&quot;,task.title);\n\t\tthis.syncadaptor.deleteTiddler(task.title,function(err) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\t// Invoke the callback\n\t\t\tcallback(null);\n\t\t});\n\t}\n};\n\nexports.Syncer = Syncer;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/syncer.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;global&quot;
        },
        &quot;$:/core/modules/tiddler.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/tiddler.js\ntype: application/javascript\nmodule-type: tiddlermethod\n\nExtension methods for the $tw.Tiddler object (constructor and methods required at boot time are in boot/boot.js)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.hasTag = function(tag) {\n\treturn this.fields.tags &amp;&amp; this.fields.tags.indexOf(tag) !== -1;\n};\n\nexports.isPlugin = function() {\n\treturn this.fields.type === \&quot;application/json\&quot; &amp;&amp; this.hasField(\&quot;plugin-type\&quot;);\n};\n\nexports.isDraft = function() {\n\treturn this.hasField(\&quot;draft.of\&quot;);\n};\n\nexports.getFieldString = function(field) {\n\tvar value = this.fields[field];\n\t// Check for a missing field\n\tif(value === undefined || value === null) {\n\t\treturn \&quot;\&quot;;\n\t}\n\t// Parse the field with the associated module (if any)\n\tvar fieldModule = $tw.Tiddler.fieldModules[field];\n\tif(fieldModule &amp;&amp; fieldModule.stringify) {\n\t\treturn fieldModule.stringify.call(this,value);\n\t} else {\n\t\treturn value.toString();\n\t}\n};\n\n/*\nGet all the fields as a name:value block. Options:\n\texclude: an array of field names to exclude\n*/\nexports.getFieldStringBlock = function(options) {\n\toptions = options || {};\n\tvar exclude = options.exclude || [];\n\tvar fields = [];\n\tfor(var field in this.fields) {\n\t\tif($tw.utils.hop(this.fields,field)) {\n\t\t\tif(exclude.indexOf(field) === -1) {\n\t\t\t\tfields.push(field + \&quot;: \&quot; + this.getFieldString(field));\n\t\t\t}\n\t\t}\n\t}\n\treturn fields.join(\&quot;\\n\&quot;);\n};\n\n/*\nCompare two tiddlers for equality\ntiddler: the tiddler to compare\nexcludeFields: array of field names to exclude from the comparison\n*/\nexports.isEqual = function(tiddler,excludeFields) {\n\texcludeFields = excludeFields || [];\n\tvar self = this,\n\t\tdifferences = []; // Fields that have differences\n\t// Add to the differences array\n\tfunction addDifference(fieldName) {\n\t\t// Check for this field being excluded\n\t\tif(excludeFields.indexOf(fieldName) === -1) {\n\t\t\t// Save the field as a difference\n\t\t\t$tw.utils.pushTop(differences,fieldName);\n\t\t}\n\t}\n\t// Returns true if the two values of this field are equal\n\tfunction isFieldValueEqual(fieldName) {\n\t\tvar valueA = self.fields[fieldName],\n\t\t\tvalueB = tiddler.fields[fieldName];\n\t\t// Check for identical string values\n\t\tif(typeof(valueA) === \&quot;string\&quot; &amp;&amp; typeof(valueB) === \&quot;string\&quot; &amp;&amp; valueA === valueB) {\n\t\t\treturn true;\n\t\t}\n\t\t// Check for identical array values\n\t\tif($tw.utils.isArray(valueA) &amp;&amp; $tw.utils.isArray(valueB) &amp;&amp; $tw.utils.isArrayEqual(valueA,valueB)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Otherwise the fields must be different\n\t\treturn false;\n\t}\n\t// Compare our fields\n\tfor(var fieldName in this.fields) {\n\t\tif(!isFieldValueEqual(fieldName)) {\n\t\t\taddDifference(fieldName);\n\t\t}\n\t}\n\t// There's a difference for every field in the other tiddler that we don't have\n\tfor(fieldName in tiddler.fields) {\n\t\tif(!(fieldName in this.fields)) {\n\t\t\taddDifference(fieldName);\n\t\t}\n\t}\n\t// Return whether there were any differences\n\treturn differences.length === 0;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/tiddler.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;tiddlermethod&quot;
        },
        &quot;$:/core/modules/utils/crypto.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/crypto.js\ntype: application/javascript\nmodule-type: utils\n\nUtility functions related to crypto.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nLook for an encrypted store area in the text of a TiddlyWiki file\n*/\nexports.extractEncryptedStoreArea = function(text) {\n\tvar encryptedStoreAreaStartMarker = \&quot;&lt;pre id=\\\&quot;encryptedStoreArea\\\&quot; type=\\\&quot;text/plain\\\&quot; style=\\\&quot;display:none;\\\&quot;&gt;\&quot;,\n\t\tencryptedStoreAreaStart = text.indexOf(encryptedStoreAreaStartMarker);\n\tif(encryptedStoreAreaStart !== -1) {\n\t\tvar encryptedStoreAreaEnd = text.indexOf(\&quot;&lt;/pre&gt;\&quot;,encryptedStoreAreaStart);\n\t\tif(encryptedStoreAreaEnd !== -1) {\n\t\t\treturn $tw.utils.htmlDecode(text.substring(encryptedStoreAreaStart + encryptedStoreAreaStartMarker.length,encryptedStoreAreaEnd-1));\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nAttempt to extract the tiddlers from an encrypted store area using the current password. If the password is not provided then the password in the password store will be used\n*/\nexports.decryptStoreArea = function(encryptedStoreArea,password) {\n\tvar decryptedText = $tw.crypto.decrypt(encryptedStoreArea,password);\n\tif(decryptedText) {\n\t\tvar json = JSON.parse(decryptedText),\n\t\t\ttiddlers = [];\n\t\tfor(var title in json) {\n\t\t\tif(title !== \&quot;$:/isEncrypted\&quot;) {\n\t\t\t\ttiddlers.push(json[title]);\n\t\t\t}\n\t\t}\n\t\treturn tiddlers;\n\t} else {\n\t\treturn null;\n\t}\n};\n\nexports.decryptStoreAreaInteractive = function(encryptedStoreArea,callback) {\n\t// Try to decrypt with the current password\n\tvar tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea);\n\tif(tiddlers) {\n\t\tcallback(tiddlers);\n\t} else {\n\t\t// Prompt for a new password and keep trying\n\t\t$tw.passwordPrompt.createPrompt({\n\t\t\tserviceName: \&quot;Enter a password to decrypt the imported TiddlyWiki\&quot;,\n\t\t\tnoUserName: true,\n\t\t\tcanCancel: true,\n\t\t\tsubmitText: \&quot;Decrypt\&quot;,\n\t\t\tcallback: function(data) {\n\t\t\t\t// Exit if the user cancelled\n\t\t\t\tif(!data) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// Attempt to decrypt the tiddlers\n\t\t\t\tvar tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea,data.password);\n\t\t\t\tif(tiddlers) {\n\t\t\t\t\tcallback(tiddlers);\n\t\t\t\t\t// Exit and remove the password prompt\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t// We didn't decrypt everything, so continue to prompt for password\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/crypto.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/dom/animations/slide.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom/animations/slide.js\ntype: application/javascript\nmodule-type: animation\n\nA simple slide animation that varies the height of the element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nfunction slideOpen(domNode,options) {\n\toptions = options || {};\n\tvar duration = options.duration || $tw.utils.getAnimationDuration();\n\t// Get the current height of the domNode\n\tvar computedStyle = window.getComputedStyle(domNode),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrPaddingBottom = parseInt(computedStyle.paddingBottom,10),\n\t\tcurrPaddingTop = parseInt(computedStyle.paddingTop,10),\n\t\tcurrHeight = domNode.offsetHeight;\n\t// Reset the margin once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(domNode,[\n\t\t\t{transition: \&quot;none\&quot;},\n\t\t\t{marginBottom: \&quot;\&quot;},\n\t\t\t{marginTop: \&quot;\&quot;},\n\t\t\t{paddingBottom: \&quot;\&quot;},\n\t\t\t{paddingTop: \&quot;\&quot;},\n\t\t\t{height: \&quot;auto\&quot;},\n\t\t\t{opacity: \&quot;\&quot;}\n\t\t]);\n\t\tif(options.callback) {\n\t\t\toptions.callback();\n\t\t}\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(domNode,[\n\t\t{transition: \&quot;none\&quot;},\n\t\t{marginTop: \&quot;0px\&quot;},\n\t\t{marginBottom: \&quot;0px\&quot;},\n\t\t{paddingTop: \&quot;0px\&quot;},\n\t\t{paddingBottom: \&quot;0px\&quot;},\n\t\t{height: \&quot;0px\&quot;},\n\t\t{opacity: \&quot;0\&quot;}\n\t]);\n\t$tw.utils.forceLayout(domNode);\n\t// Transition to the final position\n\t$tw.utils.setStyle(domNode,[\n\t\t{transition: \&quot;margin-top \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;margin-bottom \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;padding-top \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;padding-bottom \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;height \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;opacity \&quot; + duration + \&quot;ms ease-in-out\&quot;},\n\t\t{marginBottom: currMarginBottom + \&quot;px\&quot;},\n\t\t{marginTop: currMarginTop + \&quot;px\&quot;},\n\t\t{paddingBottom: currPaddingBottom + \&quot;px\&quot;},\n\t\t{paddingTop: currPaddingTop + \&quot;px\&quot;},\n\t\t{height: currHeight + \&quot;px\&quot;},\n\t\t{opacity: \&quot;1\&quot;}\n\t]);\n}\n\nfunction slideClosed(domNode,options) {\n\toptions = options || {};\n\tvar duration = options.duration || $tw.utils.getAnimationDuration(),\n\t\tcurrHeight = domNode.offsetHeight;\n\t// Clear the properties we've set when the animation is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(domNode,[\n\t\t\t{transition: \&quot;none\&quot;},\n\t\t\t{marginBottom: \&quot;\&quot;},\n\t\t\t{marginTop: \&quot;\&quot;},\n\t\t\t{paddingBottom: \&quot;\&quot;},\n\t\t\t{paddingTop: \&quot;\&quot;},\n\t\t\t{height: \&quot;auto\&quot;},\n\t\t\t{opacity: \&quot;\&quot;}\n\t\t]);\n\t\tif(options.callback) {\n\t\t\toptions.callback();\n\t\t}\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(domNode,[\n\t\t{height: currHeight + \&quot;px\&quot;},\n\t\t{opacity: \&quot;1\&quot;}\n\t]);\n\t$tw.utils.forceLayout(domNode);\n\t// Transition to the final position\n\t$tw.utils.setStyle(domNode,[\n\t\t{transition: \&quot;margin-top \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;margin-bottom \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;padding-top \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;padding-bottom \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;height \&quot; + duration + \&quot;ms ease-in-out, \&quot; +\n\t\t\t\t\t\&quot;opacity \&quot; + duration + \&quot;ms ease-in-out\&quot;},\n\t\t{marginTop: \&quot;0px\&quot;},\n\t\t{marginBottom: \&quot;0px\&quot;},\n\t\t{paddingTop: \&quot;0px\&quot;},\n\t\t{paddingBottom: \&quot;0px\&quot;},\n\t\t{height: \&quot;0px\&quot;},\n\t\t{opacity: \&quot;0\&quot;}\n\t]);\n}\n\nexports.slide = {\n\topen: slideOpen,\n\tclose: slideClosed\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom/animations/slide.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;animation&quot;
        },
        &quot;$:/core/modules/utils/dom/animator.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom/animator.js\ntype: application/javascript\nmodule-type: utils\n\nOrchestrates animations and transitions\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nfunction Animator() {\n\t// Get the registered animation modules\n\tthis.animations = {};\n\t$tw.modules.applyMethods(\&quot;animation\&quot;,this.animations);\n}\n\nAnimator.prototype.perform = function(type,domNode,options) {\n\toptions = options || {};\n\t// Find an animation that can handle this type\n\tvar chosenAnimation;\n\t$tw.utils.each(this.animations,function(animation,name) {\n\t\tif($tw.utils.hop(animation,type)) {\n\t\t\tchosenAnimation = animation[type];\n\t\t}\n\t});\n\tif(!chosenAnimation) {\n\t\tchosenAnimation = function(domNode,options) {\n\t\t\tif(options.callback) {\n\t\t\t\toptions.callback();\n\t\t\t}\n\t\t};\n\t}\n\t// Call the animation\n\tchosenAnimation(domNode,options);\n};\n\nexports.Animator = Animator;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom/animator.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/dom/browser.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom/browser.js\ntype: application/javascript\nmodule-type: utils\n\nBrowser feature detection\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nSet style properties of an element\n\telement: dom node\n\tstyles: ordered array of {name: value} pairs\n*/\nexports.setStyle = function(element,styles) {\n\tif(element.nodeType === 1) { // Element.ELEMENT_NODE\n\t\tfor(var t=0; t&lt;styles.length; t++) {\n\t\t\tfor(var styleName in styles[t]) {\n\t\t\t\telement.style[$tw.utils.convertStyleNameToPropertyName(styleName)] = styles[t][styleName];\n\t\t\t}\n\t\t}\n\t}\n};\n\n/*\nConverts a standard CSS property name into the local browser-specific equivalent. For example:\n\t\&quot;background-color\&quot; --&gt; \&quot;backgroundColor\&quot;\n\t\&quot;transition\&quot; --&gt; \&quot;webkitTransition\&quot;\n*/\n\nvar styleNameCache = {}; // We'll cache the style name conversions\n\nexports.convertStyleNameToPropertyName = function(styleName) {\n\t// Return from the cache if we can\n\tif(styleNameCache[styleName]) {\n\t\treturn styleNameCache[styleName];\n\t}\n\t// Convert it by first removing any hyphens\n\tvar propertyName = $tw.utils.unHyphenateCss(styleName);\n\t// Then check if it needs a prefix\n\tif(document.body.style[propertyName] === undefined) {\n\t\tvar prefixes = [\&quot;O\&quot;,\&quot;MS\&quot;,\&quot;Moz\&quot;,\&quot;webkit\&quot;];\n\t\tfor(var t=0; t&lt;prefixes.length; t++) {\n\t\t\tvar prefixedName = prefixes[t] + propertyName.substr(0,1).toUpperCase() + propertyName.substr(1);\n\t\t\tif(document.body.style[prefixedName] !== undefined) {\n\t\t\t\tpropertyName = prefixedName;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t// Put it in the cache too\n\tstyleNameCache[styleName] = propertyName;\n\treturn propertyName;\n};\n\n/*\nConverts a JS format CSS property name back into the dashed form used in CSS declarations. For example:\n\t\&quot;backgroundColor\&quot; --&gt; \&quot;background-color\&quot;\n\t\&quot;webkitTransform\&quot; --&gt; \&quot;-webkit-transform\&quot;\n*/\nexports.convertPropertyNameToStyleName = function(propertyName) {\n\t// Rehyphenate the name\n\tvar styleName = $tw.utils.hyphenateCss(propertyName);\n\t// If there's a webkit prefix, add a dash (other browsers have uppercase prefixes, and so get the dash automatically)\n\tif(styleName.indexOf(\&quot;webkit\&quot;) === 0) {\n\t\tstyleName = \&quot;-\&quot; + styleName;\n\t} else if(styleName.indexOf(\&quot;-m-s\&quot;) === 0) {\n\t\tstyleName = \&quot;-ms\&quot; + styleName.substr(4);\n\t}\n\treturn styleName;\n};\n\n/*\nRound trip a stylename to a property name and back again. For example:\n\t\&quot;transform\&quot; --&gt; \&quot;webkitTransform\&quot; --&gt; \&quot;-webkit-transform\&quot;\n*/\nexports.roundTripPropertyName = function(propertyName) {\n\treturn $tw.utils.convertPropertyNameToStyleName($tw.utils.convertStyleNameToPropertyName(propertyName));\n};\n\n/*\nConverts a standard event name into the local browser specific equivalent. For example:\n\t\&quot;animationEnd\&quot; --&gt; \&quot;webkitAnimationEnd\&quot;\n*/\n\nvar eventNameCache = {}; // We'll cache the conversions\n\nvar eventNameMappings = {\n\t\&quot;transitionEnd\&quot;: {\n\t\tcorrespondingCssProperty: \&quot;transition\&quot;,\n\t\tmappings: {\n\t\t\ttransition: \&quot;transitionend\&quot;,\n\t\t\tOTransition: \&quot;oTransitionEnd\&quot;,\n\t\t\tMSTransition: \&quot;msTransitionEnd\&quot;,\n\t\t\tMozTransition: \&quot;transitionend\&quot;,\n\t\t\twebkitTransition: \&quot;webkitTransitionEnd\&quot;\n\t\t}\n\t},\n\t\&quot;animationEnd\&quot;: {\n\t\tcorrespondingCssProperty: \&quot;animation\&quot;,\n\t\tmappings: {\n\t\t\tanimation: \&quot;animationend\&quot;,\n\t\t\tOAnimation: \&quot;oAnimationEnd\&quot;,\n\t\t\tMSAnimation: \&quot;msAnimationEnd\&quot;,\n\t\t\tMozAnimation: \&quot;animationend\&quot;,\n\t\t\twebkitAnimation: \&quot;webkitAnimationEnd\&quot;\n\t\t}\n\t}\n};\n\nexports.convertEventName = function(eventName) {\n\tif(eventNameCache[eventName]) {\n\t\treturn eventNameCache[eventName];\n\t}\n\tvar newEventName = eventName,\n\t\tmappings = eventNameMappings[eventName];\n\tif(mappings) {\n\t\tvar convertedProperty = $tw.utils.convertStyleNameToPropertyName(mappings.correspondingCssProperty);\n\t\tif(mappings.mappings[convertedProperty]) {\n\t\t\tnewEventName = mappings.mappings[convertedProperty];\n\t\t}\n\t}\n\t// Put it in the cache too\n\teventNameCache[eventName] = newEventName;\n\treturn newEventName;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom/browser.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/dom.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom.js\ntype: application/javascript\nmodule-type: utils\n\nVarious static DOM-related utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nDetermines whether element 'a' contains element 'b'\nCode thanks to John Resig, http://ejohn.org/blog/comparing-document-position/\n*/\nexports.domContains = function(a,b) {\n\treturn a.contains ?\n\t\ta !== b &amp;&amp; a.contains(b) :\n\t\t!!(a.compareDocumentPosition(b) &amp; 16);\n};\n\nexports.removeChildren = function(node) {\n\twhile(node.hasChildNodes()) {\n\t\tnode.removeChild(node.firstChild);\n\t}\n};\n\nexports.hasClass = function(el,className) {\n\treturn el &amp;&amp; el.className &amp;&amp; el.className.split(\&quot; \&quot;).indexOf(className) !== -1;\n};\n\nexports.addClass = function(el,className) {\n\tvar c = el.className.split(\&quot; \&quot;);\n\tif(c.indexOf(className) === -1) {\n\t\tc.push(className);\n\t}\n\tel.className = c.join(\&quot; \&quot;);\n};\n\nexports.removeClass = function(el,className) {\n\tvar c = el.className.split(\&quot; \&quot;),\n\t\tp = c.indexOf(className);\n\tif(p !== -1) {\n\t\tc.splice(p,1);\n\t\tel.className = c.join(\&quot; \&quot;);\n\t}\n};\n\nexports.toggleClass = function(el,className,status) {\n\tif(status === undefined) {\n\t\tstatus = !exports.hasClass(el,className);\n\t}\n\tif(status) {\n\t\texports.addClass(el,className);\n\t} else {\n\t\texports.removeClass(el,className);\n\t}\n};\n\n/*\nGet the scroll position of the viewport\nReturns:\n\t{\n\t\tx: horizontal scroll position in pixels,\n\t\ty: vertical scroll position in pixels\n\t}\n*/\nexports.getScrollPosition = function() {\n\tif(\&quot;scrollX\&quot; in window) {\n\t\treturn {x: window.scrollX, y: window.scrollY};\n\t} else {\n\t\treturn {x: document.documentElement.scrollLeft, y: document.documentElement.scrollTop};\n\t}\n};\n\n/*\nGets the bounding rectangle of an element in absolute page coordinates\n*/\nexports.getBoundingPageRect = function(element) {\n\tvar scrollPos = $tw.utils.getScrollPosition(),\n\t\tclientRect = element.getBoundingClientRect();\n\treturn {\n\t\tleft: clientRect.left + scrollPos.x,\n\t\twidth: clientRect.width,\n\t\tright: clientRect.right + scrollPos.x,\n\t\ttop: clientRect.top + scrollPos.y,\n\t\theight: clientRect.height,\n\t\tbottom: clientRect.bottom + scrollPos.y\n\t};\n};\n\n/*\nSaves a named password in the browser\n*/\nexports.savePassword = function(name,password) {\n\tif(window.localStorage) {\n\t\tlocalStorage.setItem(\&quot;tw5-password-\&quot; + name,password);\n\t}\n};\n\n/*\nRetrieve a named password from the browser\n*/\nexports.getPassword = function(name) {\n\treturn window.localStorage ? localStorage.getItem(\&quot;tw5-password-\&quot; + name) : \&quot;\&quot;;\n};\n\n/*\nForce layout of a dom node and its descendents\n*/\nexports.forceLayout = function(element) {\n\tvar dummy = element.offsetWidth;\n};\n\n/*\nPulse an element for debugging purposes\n*/\nexports.pulseElement = function(element) {\n\t// Event handler to remove the class at the end\n\telement.addEventListener($tw.browser.animationEnd,function handler(event) {\n\t\telement.removeEventListener($tw.browser.animationEnd,handler,false);\n\t\t$tw.utils.removeClass(element,\&quot;pulse\&quot;);\n\t},false);\n\t// Apply the pulse class\n\t$tw.utils.removeClass(element,\&quot;pulse\&quot;);\n\t$tw.utils.forceLayout(element);\n\t$tw.utils.addClass(element,\&quot;pulse\&quot;);\n};\n\n/*\nAttach specified event handlers to a DOM node\ndomNode: where to attach the event handlers\nevents: array of event handlers to be added (see below)\nEach entry in the events array is an object with these properties:\nhandlerFunction: optional event handler function\nhandlerObject: optional event handler object\nhandlerMethod: optionally specifies object handler method name (defaults to `handleEvent`)\n*/\nexports.addEventListeners = function(domNode,events) {\n\t$tw.utils.each(events,function(eventInfo) {\n\t\tvar handler;\n\t\tif(eventInfo.handlerFunction) {\n\t\t\thandler = eventInfo.handlerFunction;\n\t\t} else if(eventInfo.handlerObject) {\n\t\t\tif(eventInfo.handlerMethod) {\n\t\t\t\thandler = function(event) {\n\t\t\t\t\teventInfo.handlerObject[eventInfo.handlerMethod].call(eventInfo.handlerObject,event);\n\t\t\t\t};\t\n\t\t\t} else {\n\t\t\t\thandler = eventInfo.handlerObject;\n\t\t\t}\n\t\t}\n\t\tdomNode.addEventListener(eventInfo.name,handler,false);\n\t});\n};\n\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/dom/http.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom/http.js\ntype: application/javascript\nmodule-type: utils\n\nBrowser HTTP support\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nA quick and dirty HTTP function; to be refactored later. Options are:\n\turl: URL to retrieve\n\ttype: GET, PUT, POST etc\n\tcallback: function invoked with (err,data)\n*/\nexports.httpRequest = function(options) {\n\tvar type = options.type || \&quot;GET\&quot;,\n\t\theaders = options.headers || {accept: \&quot;application/json\&quot;},\n\t\trequest = new XMLHttpRequest(),\n\t\tdata = \&quot;\&quot;,\n\t\tf,results;\n\t// Massage the data hashmap into a string\n\tif(options.data) {\n\t\tif(typeof options.data === \&quot;string\&quot;) { // Already a string\n\t\t\tdata = options.data;\n\t\t} else { // A hashmap of strings\n\t\t\tresults = [];\n\t\t\t$tw.utils.each(options.data,function(dataItem,dataItemTitle) {\n\t\t\t\tresults.push(dataItemTitle + \&quot;=\&quot; + encodeURIComponent(dataItem));\n\t\t\t});\n\t\t\tdata = results.join(\&quot;&amp;\&quot;);\n\t\t}\n\t}\n\t// Set up the state change handler\n\trequest.onreadystatechange = function() {\n\t\tif(this.readyState === 4) {\n\t\t\tif(this.status === 200 || this.status === 204) {\n\t\t\t\t// Success!\n\t\t\t\toptions.callback(null,this.responseText,this);\n\t\t\t\treturn;\n\t\t\t}\n\t\t// Something went wrong\n\t\toptions.callback(\&quot;XMLHttpRequest error code: \&quot; + this.status);\n\t\t}\n\t};\n\t// Make the request\n\trequest.open(type,options.url,true);\n\tif(headers) {\n\t\t$tw.utils.each(headers,function(header,headerTitle,object) {\n\t\t\trequest.setRequestHeader(headerTitle,header);\n\t\t});\n\t}\n\tif(data &amp;&amp; !$tw.utils.hop(headers,\&quot;Content-type\&quot;)) {\n\t\trequest.setRequestHeader(\&quot;Content-type\&quot;,\&quot;application/x-www-form-urlencoded; charset=UTF-8\&quot;);\n\t}\n\trequest.send(data);\n\treturn request;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom/http.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/dom/keyboard.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom/keyboard.js\ntype: application/javascript\nmodule-type: utils\n\nKeyboard utilities\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar namedKeys = {\n\t\&quot;backspace\&quot;: 8,\n\t\&quot;tab\&quot;: 9,\n\t\&quot;enter\&quot;: 13,\n\t\&quot;escape\&quot;: 27\n};\n\n/*\nParses a key descriptor into the structure:\n{\n\tkeyCode: numeric keycode\n\tshiftKey: boolean\n\taltKey: boolean\n\tctrlKey: boolean\n}\nKey descriptors have the following format:\n\tctrl+enter\n\tctrl+shift+alt+A\n*/\nexports.parseKeyDescriptor = function(keyDescriptor) {\n\tvar components = keyDescriptor.split(\&quot;+\&quot;),\n\t\tinfo = {\n\t\t\tkeyCode: 0,\n\t\t\tshiftKey: false,\n\t\t\taltKey: false,\n\t\t\tctrlKey: false\n\t\t};\n\tfor(var t=0; t&lt;components.length; t++) {\n\t\tvar s = components[t].toLowerCase();\n\t\t// Look for modifier keys\n\t\tif(s === \&quot;ctrl\&quot;) {\n\t\t\tinfo.ctrlKey = true;\n\t\t} else if(s === \&quot;shift\&quot;) {\n\t\t\tinfo.shiftKey = true;\n\t\t} else if(s === \&quot;alt\&quot;) {\n\t\t\tinfo.altKey = true;\n\t\t}\n\t\t// Replace named keys with their code\n\t\tif(namedKeys[s]) {\n\t\t\tinfo.keyCode = namedKeys[s];\n\t\t}\n\t}\n\treturn info;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom/keyboard.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/dom/modal.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom/modal.js\ntype: application/javascript\nmodule-type: utils\n\nModal message mechanism\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;);\n\nvar Modal = function(wiki) {\n\tthis.wiki = wiki;\n\tthis.modalCount = 0;\n};\n\n/*\nDisplay a modal dialogue\n\ttitle: Title of tiddler to display\n\toptions: see below\nOptions include:\n\tdownloadLink: Text of a big download link to include\n*/\nModal.prototype.display = function(title,options) {\n\toptions = options || {};\n\tvar self = this,\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\ttiddler = this.wiki.getTiddler(title);\n\t// Don't do anything if the tiddler doesn't exist\n\tif(!tiddler) {\n\t\treturn;\n\t}\n\t// Create the wrapper divs\n\tvar wrapper = document.createElement(\&quot;div\&quot;),\n\t\tmodalBackdrop = document.createElement(\&quot;div\&quot;),\n\t\tmodalWrapper = document.createElement(\&quot;div\&quot;),\n\t\tmodalHeader = document.createElement(\&quot;div\&quot;),\n\t\theaderTitle = document.createElement(\&quot;h3\&quot;),\n\t\tmodalBody = document.createElement(\&quot;div\&quot;),\n\t\tmodalLink = document.createElement(\&quot;a\&quot;),\n\t\tmodalFooter = document.createElement(\&quot;div\&quot;),\n\t\tmodalFooterHelp = document.createElement(\&quot;span\&quot;),\n\t\tmodalFooterButtons = document.createElement(\&quot;span\&quot;);\n\t// Up the modal count and adjust the body class\n\tthis.modalCount++;\n\tthis.adjustPageClass();\n\t// Add classes\n\t$tw.utils.addClass(wrapper,\&quot;modal-wrapper\&quot;);\n\t$tw.utils.addClass(modalBackdrop,\&quot;modal-backdrop\&quot;);\n\t$tw.utils.addClass(modalWrapper,\&quot;modal\&quot;);\n\t$tw.utils.addClass(modalHeader,\&quot;modal-header\&quot;);\n\t$tw.utils.addClass(modalBody,\&quot;modal-body\&quot;);\n\t$tw.utils.addClass(modalLink,\&quot;btn btn-large btn-block btn-success\&quot;);\n\t$tw.utils.addClass(modalFooter,\&quot;modal-footer\&quot;);\n\t// Join them together\n\twrapper.appendChild(modalBackdrop);\n\twrapper.appendChild(modalWrapper);\n\tmodalHeader.appendChild(headerTitle);\n\tmodalWrapper.appendChild(modalHeader);\n\tmodalWrapper.appendChild(modalBody);\n\tmodalFooter.appendChild(modalFooterHelp);\n\tmodalFooter.appendChild(modalFooterButtons);\n\tmodalWrapper.appendChild(modalFooter);\n\t// Render the title of the message\n\tvar titleText;\n\tif(tiddler &amp;&amp; tiddler.fields &amp;&amp; tiddler.fields.subtitle) {\n\t\ttitleText = tiddler.fields.subtitle;\n\t} else {\n\t\ttitleText = title;\n\t}\n\tvar headerParser = this.wiki.parseText(\&quot;text/vnd.tiddlywiki\&quot;,titleText,{parseAsInline: true}),\n\t\theaderWidgetNode = this.wiki.makeWidget(headerParser,{parentWidget: $tw.rootWidget, document: document});\n\theaderWidgetNode.render(headerTitle,null);\n\tthis.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\theaderWidgetNode.refresh(changes,modalHeader,null);\n\t});\n\t// Render the body of the message\n\tvar bodyWidgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document});\n\tbodyWidgetNode.render(modalBody,null);\n\tthis.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\tbodyWidgetNode.refresh(changes,modalBody,null);\n\t});\n\t// Setup the link if present\n\tif(options.downloadLink) {\n\t\tmodalLink.href = options.downloadLink\n\t\tmodalLink.appendChild(document.createTextNode(\&quot;Right-click to save changes\&quot;));\n\t\tmodalBody.appendChild(modalLink);\n\t}\n\t// Render the footer of the message\n\tif(tiddler &amp;&amp; tiddler.fields &amp;&amp; tiddler.fields.help) {\n\t\tvar link = document.createElement(\&quot;a\&quot;);\n\t\tlink.setAttribute(\&quot;href\&quot;,tiddler.fields.help);\n\t\tlink.setAttribute(\&quot;target\&quot;,\&quot;_blank\&quot;);\n\t\tlink.appendChild(document.createTextNode(\&quot;Help\&quot;));\n\t\tmodalFooterHelp.appendChild(link);\n\t\tmodalFooterHelp.style.float = \&quot;left\&quot;;\n\t}\n\tvar footerText;\n\tif(tiddler &amp;&amp; tiddler.fields &amp;&amp; tiddler.fields.footer) {\n\t\tfooterText = tiddler.fields.footer;\n\t} else {\n\t\tfooterText = '&lt;$button message=\&quot;tw-close-tiddler\&quot; class=\&quot;btn btn-primary\&quot;&gt;Close&lt;/$button&gt;';\n\t}\n\tvar footerParser = this.wiki.parseText(\&quot;text/vnd.tiddlywiki\&quot;,footerText,{parseAsInline: true}),\n\t\tfooterWidgetNode = this.wiki.makeWidget(footerParser,{parentWidget: $tw.rootWidget, document: document});\n\tfooterWidgetNode.render(modalFooterButtons,null);\n\tthis.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\tfooterWidgetNode.refresh(changes,modalFooterButtons,null);\n\t});\n\t// Add the close event handler\n\tvar closeHandler = function(event) {\n\t\t// Decrease the modal count and adjust the body class\n\t\tself.modalCount--;\n\t\tself.adjustPageClass();\n\t\t// Force layout and animate the modal message away\n\t\t$tw.utils.forceLayout(modalBackdrop);\n\t\t$tw.utils.forceLayout(modalWrapper);\n\t\t$tw.utils.setStyle(modalBackdrop,[\n\t\t\t{opacity: \&quot;0\&quot;}\n\t\t]);\n\t\t$tw.utils.setStyle(modalWrapper,[\n\t\t\t{transform: \&quot;translateY(\&quot; + window.innerHeight + \&quot;px)\&quot;}\n\t\t]);\n\t\t// Set up an event for the transition end\n\t\twindow.setTimeout(function() {\n\t\t\tif(wrapper.parentNode) {\n\t\t\t\t// Remove the modal message from the DOM\n\t\t\t\tdocument.body.removeChild(wrapper);\n\t\t\t}\n\t\t},duration);\n\t\t// Don't let anyone else handle the tw-close-tiddler message\n\t\treturn false;\n\t};\n\theaderWidgetNode.addEventListener(\&quot;tw-close-tiddler\&quot;,closeHandler,false);\n\tbodyWidgetNode.addEventListener(\&quot;tw-close-tiddler\&quot;,closeHandler,false);\n\tfooterWidgetNode.addEventListener(\&quot;tw-close-tiddler\&quot;,closeHandler,false);\n\t// Set the initial styles for the message\n\t$tw.utils.setStyle(modalBackdrop,[\n\t\t{opacity: \&quot;0\&quot;}\n\t]);\n\t$tw.utils.setStyle(modalWrapper,[\n\t\t{transformOrigin: \&quot;0% 0%\&quot;},\n\t\t{transform: \&quot;translateY(\&quot; + (-window.innerHeight) + \&quot;px)\&quot;}\n\t]);\n\t// Put the message into the document\n\tdocument.body.appendChild(wrapper);\n\t// Set up animation for the styles\n\t$tw.utils.setStyle(modalBackdrop,[\n\t\t{transition: \&quot;opacity \&quot; + duration + \&quot;ms ease-out\&quot;}\n\t]);\n\t$tw.utils.setStyle(modalWrapper,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\&quot;transform\&quot;) + \&quot; \&quot; + duration + \&quot;ms ease-in-out\&quot;}\n\t]);\n\t// Force layout\n\t$tw.utils.forceLayout(modalBackdrop);\n\t$tw.utils.forceLayout(modalWrapper);\n\t// Set final animated styles\n\t$tw.utils.setStyle(modalBackdrop,[\n\t\t{opacity: \&quot;0.7\&quot;}\n\t]);\n\t$tw.utils.setStyle(modalWrapper,[\n\t\t{transform: \&quot;translateY(0px)\&quot;}\n\t]);\n};\n\nModal.prototype.adjustPageClass = function() {\n\tif($tw.pageContainer) {\n\t\t$tw.utils.toggleClass($tw.pageContainer,\&quot;tw-modal-displayed\&quot;,this.modalCount &gt; 0);\n\t}\n};\n\nexports.Modal = Modal;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom/modal.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/dom/notifier.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom/notifier.js\ntype: application/javascript\nmodule-type: utils\n\nNotifier mechanism\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;);\n\nvar Notifier = function(wiki) {\n\tthis.wiki = wiki;\n};\n\n/*\nDisplay a notification\n\ttitle: Title of tiddler containing the notification text\n\toptions: see below\nOptions include:\n*/\nNotifier.prototype.display = function(title,options) {\n\toptions = options || {};\n\t// Create the wrapper divs\n\tvar notification = document.createElement(\&quot;div\&quot;),\n\t\ttiddler = this.wiki.getTiddler(title),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Don't do anything if the tiddler doesn't exist\n\tif(!tiddler) {\n\t\treturn;\n\t}\n\t// Add classes\n\t$tw.utils.addClass(notification,\&quot;tw-notification\&quot;);\n\t// Render the body of the notification\n\tvar widgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document});\n\twidgetNode.render(notification,null);\n\tthis.wiki.addEventListener(\&quot;change\&quot;,function(changes) {\n\t\twidgetNode.refresh(changes,notification,null);\n\t});\n\t// Set the initial styles for the notification\n\t$tw.utils.setStyle(notification,[\n\t\t{opacity: \&quot;0\&quot;},\n\t\t{transformOrigin: \&quot;0% 0%\&quot;},\n\t\t{transform: \&quot;translateY(\&quot; + (-window.innerHeight) + \&quot;px)\&quot;},\n\t\t{transition: \&quot;opacity \&quot; + duration + \&quot;ms ease-out, \&quot; + $tw.utils.roundTripPropertyName(\&quot;transform\&quot;) + \&quot; \&quot; + duration + \&quot;ms ease-in-out\&quot;}\n\t]);\n\t// Add the notification to the DOM\n\tdocument.body.appendChild(notification);\n\t// Force layout\n\t$tw.utils.forceLayout(notification);\n\t// Set final animated styles\n\t$tw.utils.setStyle(notification,[\n\t\t{opacity: \&quot;1.0\&quot;},\n\t\t{transform: \&quot;translateY(0px)\&quot;}\n\t]);\n\t// Set a timer to remove the notification\n\twindow.setTimeout(function() {\n\t\t// Force layout and animate the notification away\n\t\t$tw.utils.forceLayout(notification);\n\t\t$tw.utils.setStyle(notification,[\n\t\t\t{opacity: \&quot;0.0\&quot;},\n\t\t\t{transform: \&quot;translateX(\&quot; + (notification.offsetWidth) + \&quot;px)\&quot;}\n\t\t]);\n\t\t// Remove the modal message from the DOM once the transition ends\n\t\tsetTimeout(function() {\n\t\t\tif(notification.parentNode) {\n\t\t\t\tdocument.body.removeChild(notification);\n\t\t\t}\n\t\t},duration);\n\t},$tw.config.preferences.notificationDuration);\n};\n\nexports.Notifier = Notifier;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom/notifier.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/dom/popup.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom/popup.js\ntype: application/javascript\nmodule-type: utils\n\nModule that creates a $tw.utils.Popup object prototype that manages popups in the browser\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nCreates a Popup object with these options:\n\trootElement: the DOM element to which the popup zapper should be attached\n*/\nvar Popup = function(options) {\n\toptions = options || {};\n\tthis.rootElement = options.rootElement || document.body;\n};\n\nPopup.prototype.show = function(options) {\n\tthis.cancel();\n\tthis.title = options.title;\n\tthis.wiki = options.wiki;\n\tthis.anchorDomNode = options.domNode;\n\t$tw.utils.addClass(this.anchorDomNode,\&quot;tw-popup\&quot;);\n\tthis.rootElement.addEventListener(\&quot;click\&quot;,this,false);\n};\n\nPopup.prototype.handleEvent = function(event) {\n\t// Dismiss the popup if we get a click on an element that doesn't have .tw-popup class\n\tif(event.type === \&quot;click\&quot;) {\n\t\tvar node = event.target;\n\t\twhile(node &amp;&amp; !$tw.utils.hasClass(node,\&quot;tw-popup\&quot;)) {\n\t\t\tnode = node.parentNode;\n\t\t}\n\t\tif(!node) {\n\t\t\tthis.cancel();\n\t\t}\n\t}\n};\n\nPopup.prototype.cancel = function() {\n\tif(this.anchorDomNode) {\n\t\t$tw.utils.removeClass(this.anchorDomNode,\&quot;tw-popup\&quot;);\n\t\tthis.anchorDomNode = null;\t\t\n\t}\n\tthis.rootElement.removeEventListener(\&quot;click\&quot;,this,false);\n\tif(this.title) {\n\t\tthis.wiki.deleteTiddler(this.title);\n\t\tthis.title = null;\n\t}\n};\n\n/*\nTrigger a popup open or closed. Parameters are in a hashmap:\n\ttitle: title of the tiddler where the popup details are stored\n\tdomNode: dom node to which the popup will be positioned\n\twiki: wiki\n\tforce: if specified, forces the popup state to true or false\n*/\nPopup.prototype.triggerPopup = function(options) {\n\t// Get the current popup state tiddler\n\tvar value = options.wiki.getTextReference(options.title,\&quot;\&quot;);\n\t// Check if the popup is open by checking whether it matches \&quot;(&lt;x&gt;,&lt;y&gt;)\&quot;\n\tvar state = !this.readPopupState(options.title,value);\n\tif(\&quot;force\&quot; in options) {\n\t\tstate = options.force;\n\t}\n\tif(state) {\n\t\t// Set the position if we're opening it\n\t\tthis.cancel();\n\t\toptions.wiki.setTextReference(options.title,\n\t\t\t\&quot;(\&quot; + options.domNode.offsetLeft + \&quot;,\&quot; + options.domNode.offsetTop + \&quot;,\&quot; + \n\t\t\t\toptions.domNode.offsetWidth + \&quot;,\&quot; + options.domNode.offsetHeight + \&quot;)\&quot;);\n\t\tthis.show(options);\n\t} else {\n\t\tthis.cancel();\n\t}\n};\n\n/*\nReturns true if the specified title and text identifies an active popup\n*/\nPopup.prototype.readPopupState = function(title,text) {\n\tvar popupLocationRegExp = /^\\((-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+)\\)$/,\n\t\tresult = false;\n\tif(this.title === title) {\n\t\tresult = popupLocationRegExp.test(text);\n\t}\n\treturn result;\n};\n\nexports.Popup = Popup;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom/popup.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/dom/scroller.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/dom/scroller.js\ntype: application/javascript\nmodule-type: utils\n\nModule that creates a $tw.utils.Scroller object prototype that manages scrolling in the browser\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nEvent handler for when the `tw-scroll` event hits the document body\n*/\nvar PageScroller = function() {\n\tthis.idRequestFrame = null;\n\tthis.requestAnimationFrame = window.requestAnimationFrame ||\n\t\twindow.webkitRequestAnimationFrame ||\n\t\twindow.mozRequestAnimationFrame ||\n\t\tfunction(callback) {\n\t\t\treturn window.setTimeout(callback, 1000/60);\n\t\t};\n\tthis.cancelAnimationFrame = window.cancelAnimationFrame ||\n\t\twindow.webkitCancelAnimationFrame ||\n\t\twindow.webkitCancelRequestAnimationFrame ||\n\t\twindow.mozCancelAnimationFrame ||\n\t\twindow.mozCancelRequestAnimationFrame ||\n\t\tfunction(id) {\n\t\t\twindow.clearTimeout(id);\n\t\t};\n};\n\nPageScroller.prototype.cancelScroll = function() {\n\tif(this.idRequestFrame) {\n\t\tthis.cancelAnimationFrame.call(window,this.idRequestFrame);\n\t\tthis.idRequestFrame = null;\n\t}\n};\n\n/*\nHandle an event\n*/\nPageScroller.prototype.handleEvent = function(event) {\n\tif(event.type === \&quot;tw-scroll\&quot;) {\n\t\treturn this.scrollIntoView(event.target);\n\t}\n\treturn true;\n};\n\n/*\nHandle a scroll event hitting the page document\n*/\nPageScroller.prototype.scrollIntoView = function(element) {\n\tvar duration = $tw.utils.getAnimationDuration();\n\t// Now get ready to scroll the body\n\tthis.cancelScroll();\n\tthis.startTime = Date.now();\n\tvar scrollPosition = $tw.utils.getScrollPosition();\n\t// Get the client bounds of the element and adjust by the scroll position\n\tvar clientBounds = element.getBoundingClientRect(),\n\t\tbounds = {\n\t\t\tleft: clientBounds.left + scrollPosition.x,\n\t\t\ttop: clientBounds.top + scrollPosition.y,\n\t\t\twidth: clientBounds.width,\n\t\t\theight: clientBounds.height\n\t\t};\n\t// We'll consider the horizontal and vertical scroll directions separately via this function\n\tvar getEndPos = function(targetPos,targetSize,currentPos,currentSize) {\n\t\t\t// If the target is above/left of the current view, then scroll to it's top/left\n\t\t\tif(targetPos &lt;= currentPos) {\n\t\t\t\treturn targetPos;\n\t\t\t// If the target is smaller than the window and the scroll position is too far up, then scroll till the target is at the bottom of the window\n\t\t\t} else if(targetSize &lt; currentSize &amp;&amp; currentPos &lt; (targetPos + targetSize - currentSize)) {\n\t\t\t\treturn targetPos + targetSize - currentSize;\n\t\t\t// If the target is big, then just scroll to the top\n\t\t\t} else if(currentPos &lt; targetPos) {\n\t\t\t\treturn targetPos;\n\t\t\t// Otherwise, stay where we are\n\t\t\t} else {\n\t\t\t\treturn currentPos;\n\t\t\t}\n\t\t},\n\t\tendX = getEndPos(bounds.left,bounds.width,scrollPosition.x,window.innerWidth),\n\t\tendY = getEndPos(bounds.top,bounds.height,scrollPosition.y,window.innerHeight);\n\t// Only scroll if necessary\n\tif(endX !== scrollPosition.x || endY !== scrollPosition.y) {\n\t\tvar self = this,\n\t\t\tdrawFrame;\n\t\tdrawFrame = function () {\n\t\t\tvar t;\n\t\t\tif(duration &lt;= 0) {\n\t\t\t\tt = 1;\n\t\t\t} else {\n\t\t\t\tt = ((Date.now()) - self.startTime) / duration;\t\n\t\t\t}\n\t\t\tif(t &gt;= 1) {\n\t\t\t\tself.cancelScroll();\n\t\t\t\tt = 1;\n\t\t\t}\n\t\t\tt = $tw.utils.slowInSlowOut(t);\n\t\t\twindow.scrollTo(scrollPosition.x + (endX - scrollPosition.x) * t,scrollPosition.y + (endY - scrollPosition.y) * t);\n\t\t\tif(t &lt; 1) {\n\t\t\t\tself.idRequestFrame = self.requestAnimationFrame.call(window,drawFrame);\n\t\t\t}\n\t\t};\n\t\tdrawFrame();\n\t}\n};\n\nexports.PageScroller = PageScroller;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/dom/scroller.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/fakedom.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/fakedom.js\ntype: application/javascript\nmodule-type: global\n\nA barebones implementation of DOM interfaces needed by the rendering mechanism.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Sequence number used to enable us to track objects for testing\nvar sequenceNumber = null;\n\nvar bumpSequenceNumber = function(object) {\n\tif(sequenceNumber !== null) {\n\t\tobject.sequenceNumber = sequenceNumber++;\n\t}\n}\n\nvar TW_TextNode = function(text) {\n\tbumpSequenceNumber(this);\n\tthis.textContent = text;\n};\n\nObject.defineProperty(TW_TextNode.prototype, \&quot;formattedTextContent\&quot;, {\n\tget: function() {\n\t\treturn this.textContent.replace(/(\\r?\\n)/g,\&quot;\&quot;);\n\t}\n});\n\nvar TW_Element = function(tag,namespace) {\n\tbumpSequenceNumber(this);\n\tthis.isTiddlyWikiFakeDom = true;\n\tthis.tag = tag;\n\tthis.attributes = {};\n\tthis.isRaw = false;\n\tthis.children = [];\n\tthis.namespaceURI = namespace || \&quot;http://www.w3.org/1999/xhtml\&quot;;\n};\n\nTW_Element.prototype.setAttribute = function(name,value) {\n\tif(this.isRaw) {\n\t\tthrow \&quot;Cannot setAttribute on a raw TW_Element\&quot;;\n\t}\n\tthis.attributes[name] = value;\n};\n\nTW_Element.prototype.setAttributeNS = function(namespace,name,value) {\n\tthis.setAttribute(name,value);\n};\n\nTW_Element.prototype.removeAttribute = function(name) {\n\tif(this.isRaw) {\n\t\tthrow \&quot;Cannot removeAttribute on a raw TW_Element\&quot;;\n\t}\n\tif($tw.utils.hop(this.attributes,name)) {\n\t\tdelete this.attributes[name];\n\t}\n};\n\nTW_Element.prototype.appendChild = function(node) {\n\tthis.children.push(node);\n\tnode.parentNode = this;\n};\n\nTW_Element.prototype.insertBefore = function(node,nextSibling) {\n\tif(nextSibling) {\n\t\tvar p = this.children.indexOf(nextSibling);\n\t\tif(p !== -1) {\n\t\t\tthis.children.splice(p,0,node);\n\t\t\tnode.parentNode = this;\n\t\t} else {\n\t\t\tthis.appendChild(node);\n\t\t}\n\t} else {\n\t\tthis.appendChild(node);\n\t}\n}\n\nTW_Element.prototype.removeChild = function(node) {\n\tvar p = this.children.indexOf(node);\n\tif(p !== -1) {\n\t\tthis.children.splice(p,1);\n\t}\n};\n\nTW_Element.prototype.hasChildNodes = function() {\n\treturn !!this.children.length;\n};\n\nObject.defineProperty(TW_Element.prototype, \&quot;firstChild\&quot;, {\n    get: function() {\n    \treturn this.children[0];\n    }\n});\n\nTW_Element.prototype.addEventListener = function(type,listener,useCapture) {\n\t// Do nothing\n};\n\nObject.defineProperty(TW_Element.prototype, \&quot;className\&quot;, {\n\tget: function() {\n\t\treturn this.attributes[\&quot;class\&quot;] || \&quot;\&quot;;\n\t},\n    set: function(value) {\n    \tthis.attributes[\&quot;class\&quot;] = value;\n    }\n});\n\nObject.defineProperty(TW_Element.prototype, \&quot;value\&quot;, {\n\tget: function() {\n\t\treturn this.attributes[\&quot;value\&quot;] || \&quot;\&quot;;\n\t},\n    set: function(value) {\n    \tthis.attributes[\&quot;value\&quot;] = value;\n    }\n});\n\nObject.defineProperty(TW_Element.prototype, \&quot;outerHTML\&quot;, {\n    get: function() {\n\t\tvar output = [],attr,a,v;\n\t\toutput.push(\&quot;&lt;\&quot;,this.tag);\n\t\tif(this.attributes) {\n\t\t\tattr = [];\n\t\t\tfor(a in this.attributes) {\n\t\t\t\tattr.push(a);\n\t\t\t}\n\t\t\tattr.sort();\n\t\t\tfor(a=0; a&lt;attr.length; a++) {\n\t\t\t\tv = this.attributes[attr[a]];\n\t\t\t\tif(v !== undefined) {\n\t\t\t\t\toutput.push(\&quot; \&quot;,attr[a],\&quot;='\&quot;,$tw.utils.htmlEncode(v),\&quot;'\&quot;);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\toutput.push(\&quot;&gt;\&quot;);\n\t\tif($tw.config.htmlVoidElements.indexOf(this.tag) === -1) {\n\t\t\toutput.push(this.innerHTML);\n\t\t\toutput.push(\&quot;&lt;/\&quot;,this.tag,\&quot;&gt;\&quot;);\n\t\t}\n\t\treturn output.join(\&quot;\&quot;);\n    }\n});\n\nObject.defineProperty(TW_Element.prototype, \&quot;innerHTML\&quot;, {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\treturn this.rawHTML;\n\t\t} else {\n\t\t\tvar b = [];\n\t\t\t$tw.utils.each(this.children,function(node) {\n\t\t\t\tif(node instanceof TW_Element) {\n\t\t\t\t\tb.push(node.outerHTML);\n\t\t\t\t} else if(node instanceof TW_TextNode) {\n\t\t\t\t\tb.push($tw.utils.htmlEncode(node.textContent));\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn b.join(\&quot;\&quot;);\n\t\t}\n\t},\n    set: function(value) {\n    \tthis.isRaw = true;\n    \tthis.rawHTML = value;\n    }\n});\n\nObject.defineProperty(TW_Element.prototype, \&quot;textContent\&quot;, {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\tthrow \&quot;Cannot get textContent on a raw TW_Element\&quot;;\n\t\t} else {\n\t\t\tvar b = [];\n\t\t\t$tw.utils.each(this.children,function(node) {\n\t\t\t\tb.push(node.textContent);\n\t\t\t});\n\t\t\treturn b.join(\&quot;\&quot;);\n\t\t}\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \&quot;formattedTextContent\&quot;, {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\tthrow \&quot;Cannot get formattedTextContent on a raw TW_Element\&quot;;\n\t\t} else {\n\t\t\tvar b = [],\n\t\t\t\tisBlock = $tw.config.htmlBlockElements.indexOf(this.tag) !== -1;\n\t\t\tif(isBlock) {\n\t\t\t\tb.push(\&quot;\\n\&quot;);\n\t\t\t}\n\t\t\tif(this.tag === \&quot;li\&quot;) {\n\t\t\t\tb.push(\&quot;* \&quot;)\n\t\t\t}\n\t\t\t$tw.utils.each(this.children,function(node) {\n\t\t\t\tb.push(node.formattedTextContent);\n\t\t\t});\n\t\t\tif(isBlock) {\n\t\t\t\tb.push(\&quot;\\n\&quot;);\n\t\t\t}\n\t\t\treturn b.join(\&quot;\&quot;);\n\t\t}\n\t}\n});\n\nvar document = {\n\tsetSequenceNumber: function(value) {\n\t\tsequenceNumber = value;\n\t},\n\tcreateElementNS: function(namespace,tag) {\n\t\treturn new TW_Element(tag,namespace);\n\t},\n\tcreateElement: function(tag) {\n\t\treturn new TW_Element(tag);\n\t},\n\tcreateTextNode: function(text) {\n\t\treturn new TW_TextNode(text);\n\t},\n\tisTiddlyWikiFakeDom: true\n};\n\nexports.fakeDocument = document;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/fakedom.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;global&quot;
        },
        &quot;$:/core/modules/utils/filesystem.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/filesystem.js\ntype: application/javascript\nmodule-type: utils-node\n\nFile system utilities\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar fs = require(\&quot;fs\&quot;),\n\tpath = require(\&quot;path\&quot;);\n\n/*\nRecursively (and synchronously) copy a directory and all its content\n*/\nexports.copyDirectory = function(srcPath,dstPath) {\n\t// Remove any trailing path separators\n\tsrcPath = $tw.utils.removeTrailingSeparator(srcPath);\n\tdstPath = $tw.utils.removeTrailingSeparator(dstPath);\n\t// Create the destination directory\n\tvar err = $tw.utils.createDirectory(dstPath);\n\tif(err) {\n\t\treturn err;\n\t}\n\t// Function to copy a folder full of files\n\tvar copy = function(srcPath,dstPath) {\n\t\tvar srcStats = fs.lstatSync(srcPath),\n\t\t\tdstExists = fs.existsSync(dstPath);\n\t\tif(srcStats.isFile()) {\n\t\t\t$tw.utils.copyFile(srcPath,dstPath);\n\t\t} else if(srcStats.isDirectory()) {\n\t\t\tvar items = fs.readdirSync(srcPath);\n\t\t\tfor(var t=0; t&lt;items.length; t++) {\n\t\t\t\tvar item = items[t],\n\t\t\t\t\terr = copy(srcPath + path.sep + item,dstPath + path.sep + item);\n\t\t\t\tif(err) {\n\t\t\t\t\treturn err;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n\tcopy(srcPath,dstPath);\n\treturn null;\n};\n\n/*\nCopy a file\n*/\nvar FILE_BUFFER_LENGTH = 64 * 1024,\n\tfileBuffer = $tw.node &amp;&amp; new Buffer(FILE_BUFFER_LENGTH);\n\nexports.copyFile = function(srcPath,dstPath) {\n\t// Create any directories in the destination\n\t$tw.utils.createDirectory(path.dirname(dstPath));\n\t// Copy the file\n\tvar srcFile = fs.openSync(srcPath,\&quot;r\&quot;),\n\t\tdstFile = fs.openSync(dstPath,\&quot;w\&quot;),\n\t\tbytesRead = 1,\n\t\tpos = 0;\n\twhile (bytesRead &gt; 0) {\n\t\tbytesRead = fs.readSync(srcFile,fileBuffer,0,FILE_BUFFER_LENGTH,pos);\n\t\tfs.writeSync(dstFile,fileBuffer,0,bytesRead);\n\t\tpos += bytesRead;\n\t}\n\tfs.closeSync(srcFile);\n\tfs.closeSync(dstFile);\n\treturn null;\n}\n\n/*\nRemove trailing path separator\n*/\nexports.removeTrailingSeparator = function(dirPath) {\n\tvar len = dirPath.length;\n\tif(dirPath.charAt(len-1) === path.sep) {\n\t\tdirPath = dirPath.substr(0,len-1);\n\t}\n\treturn dirPath;\n};\n\n/*\nRecursively create a directory\n*/\nexports.createDirectory = function(dirPath) {\n\tif(dirPath.substr(dirPath.length-1,1) !== path.sep) {\n\t\tdirPath = dirPath + path.sep;\n\t}\n\tvar pos = 1;\n\tpos = dirPath.indexOf(path.sep,pos);\n\twhile(pos !== -1) {\n\t\tvar subDirPath = dirPath.substr(0,pos);\n\t\tif(!$tw.utils.isDirectory(subDirPath)) {\n\t\t\ttry {\n\t\t\t\tfs.mkdirSync(subDirPath);\n\t\t\t} catch(e) {\n\t\t\t\treturn \&quot;Error creating directory '\&quot; + subDirPath + \&quot;'\&quot;;\n\t\t\t}\n\t\t}\n\t\tpos = dirPath.indexOf(path.sep,pos + 1);\n\t}\n\treturn null;\n};\n\n/*\nRecursively create directories needed to contain a specified file\n*/\nexports.createFileDirectories = function(filePath) {\n\treturn $tw.utils.createDirectory(path.dirname(filePath));\n};\n\n/*\nRecursively delete a directory\n*/\nexports.deleteDirectory = function(dirPath) {\n\tif(fs.existsSync(dirPath)) {\n\t\tvar entries = fs.readdirSync(dirPath);\n\t\tfor(var entryIndex=0; entryIndex&lt;entries.length; entryIndex++) {\n\t\t\tvar currPath = dirPath + path.sep + entries[entryIndex];\n\t\t\tif(fs.lstatSync(currPath).isDirectory()) {\n\t\t\t\t$tw.utils.deleteDirectory(currPath);\n\t\t\t} else {\n\t\t\t\tfs.unlinkSync(currPath);\n\t\t\t}\n\t\t}\n\tfs.rmdirSync(dirPath);\n\t}\n\treturn null;\n};\n\n/*\nCheck if a path identifies a directory\n*/\nexports.isDirectory = function(dirPath) {\n\treturn fs.existsSync(dirPath) &amp;&amp; fs.statSync(dirPath).isDirectory();\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/filesystem.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils-node&quot;
        },
        &quot;$:/core/modules/utils/logger.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/logger.js\ntype: application/javascript\nmodule-type: utils\n\nA basic logging implementation\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar ALERT_TAG = \&quot;$:/tags/Alert\&quot;;\n\n/*\nMake a new logger\n*/\nfunction Logger(componentName) {\n\tthis.componentName = componentName || \&quot;\&quot;;\n}\n\n/*\nLog a message\n*/\nLogger.prototype.log = function(/* args */) {\n\tif(console !== undefined &amp;&amp; console.log !== undefined) {\n\t\treturn Function.apply.call(console.log, console, [this.componentName + \&quot;:\&quot;].concat(Array.prototype.slice.call(arguments,0)));\n\t}\n};\n\n/*\nAlert a message\n*/\nLogger.prototype.alert = function(/* args */) {\n\t// Prepare the text of the alert\n\tvar text = Array.prototype.join.call(arguments,\&quot; \&quot;);\n\t// Check if there is an existing alert with the same text and the same component\n\tvar existingAlerts = $tw.wiki.getTiddlersWithTag(ALERT_TAG),\n\t\talertFields,\n\t\texistingCount,\n\t\tself = this;\n\t$tw.utils.each(existingAlerts,function(title) {\n\t\tvar tiddler = $tw.wiki.getTiddler(title);\n\t\tif(tiddler.fields.text === text &amp;&amp; tiddler.fields.component === self.componentName &amp;&amp; tiddler.fields.modified &amp;&amp; (!alertFields || tiddler.fields.modified &lt; alertFields.modified)) {\n\t\t\t\talertFields = $tw.utils.extend({},tiddler.fields);\n\t\t}\n\t});\n\tif(alertFields) {\n\t\texistingCount = alertFields.count || 1;\n\t} else {\n\t\talertFields = {\n\t\t\ttitle: $tw.wiki.generateNewTitle(\&quot;$:/temp/alerts/alert\&quot;,{prefix: \&quot;\&quot;}),\n\t\t\ttext: text,\n\t\t\ttags: [ALERT_TAG],\n\t\t\tcomponent: this.componentName\n\t\t};\n\t\texistingCount = 0;\n\t}\n\talertFields.modified = new Date();\n\tif(++existingCount &gt; 1) {\n\t\talertFields.count = existingCount;\n\t} else {\n\t\talertFields.count = undefined;\n\t}\n\t$tw.wiki.addTiddler(new $tw.Tiddler(alertFields));\n\t// Log it too\n\tthis.log.apply(this,Array.prototype.slice.call(arguments,0));\n};\n\nexports.Logger = Logger;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/logger.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/parsetree.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/parsetree.js\ntype: application/javascript\nmodule-type: utils\n\nParse tree utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nexports.addAttributeToParseTreeNode = function(node,name,value) {\n\tnode.attributes = node.attributes || {};\n\tnode.attributes[name] = {type: \&quot;string\&quot;, value: value};\n};\n\nexports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {\n\tif(node.attributes &amp;&amp; node.attributes[name] &amp;&amp; node.attributes[name].value !== undefined) {\n\t\treturn node.attributes[name].value;\n\t}\n\treturn defaultValue;\n};\n\nexports.addClassToParseTreeNode = function(node,classString) {\n\tvar classes = [];\n\tnode.attributes = node.attributes || {};\n\tnode.attributes[\&quot;class\&quot;] = node.attributes[\&quot;class\&quot;] || {type: \&quot;string\&quot;, value: \&quot;\&quot;};\n\tif(node.attributes[\&quot;class\&quot;].type === \&quot;string\&quot;) {\n\t\tif(node.attributes[\&quot;class\&quot;].value !== \&quot;\&quot;) {\n\t\t\tclasses = node.attributes[\&quot;class\&quot;].value.split(\&quot; \&quot;);\n\t\t}\n\t\tif(classString !== \&quot;\&quot;) {\n\t\t\t$tw.utils.pushTop(classes,classString.split(\&quot; \&quot;));\n\t\t}\n\t\tnode.attributes[\&quot;class\&quot;].value = classes.join(\&quot; \&quot;);\n\t}\n};\n\nexports.addStyleToParseTreeNode = function(node,name,value) {\n\t\tnode.attributes = node.attributes || {};\n\t\tnode.attributes[\&quot;style\&quot;] = node.attributes[\&quot;style\&quot;] || {type: \&quot;string\&quot;, value: \&quot;\&quot;};\n\t\tif(node.attributes[\&quot;style\&quot;].type === \&quot;string\&quot;) {\n\t\t\tnode.attributes[\&quot;style\&quot;].value += name + \&quot;:\&quot; + value + \&quot;;\&quot;;\n\t\t}\n};\n\nexports.findParseTreeNode = function(nodeArray,search) {\n\tfor(var t=0; t&lt;nodeArray.length; t++) {\n\t\tif(nodeArray[t].type === search.type &amp;&amp; nodeArray[t].tag === search.tag) {\n\t\t\treturn nodeArray[t];\n\t\t}\n\t}\n\treturn undefined;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/parsetree.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/performance.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/performance.js\ntype: application/javascript\nmodule-type: global\n\nPerformance measurement.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nfunction Performance(enabled) {\n\tthis.enabled = !!enabled;\n\tthis.measures = {}; // Hashmap of current values of measurements\n\tthis.logger = new $tw.utils.Logger(\&quot;performance\&quot;);\n}\n\n/*\nWrap performance reporting around a top level function\n*/\nPerformance.prototype.report = function(name,fn) {\n\tvar self = this;\n\tif(this.enabled) {\n\t\treturn function() {\n\t\t\tself.measures = {};\n\t\t\tvar startTime = $tw.utils.timer(),\n\t\t\t\tresult = fn.apply(this,arguments);\n\t\t\tself.logger.log(name + \&quot;: \&quot; + $tw.utils.timer(startTime) + \&quot;ms\&quot;);\n\t\t\tfor(var m in self.measures) {\n\t\t\t\tself.logger.log(\&quot;+\&quot; + m + \&quot;: \&quot; + self.measures[m] + \&quot;ms\&quot;);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\treturn fn;\n\t}\n};\n\n/*\nWrap performance measurements around a subfunction\n*/\nPerformance.prototype.measure = function(name,fn) {\n\tvar self = this;\n\tif(this.enabled) {\n\t\treturn function() {\n\t\t\tvar startTime = $tw.utils.timer(),\n\t\t\t\tresult = fn.apply(this,arguments),\n\t\t\t\tvalue = self.measures[name] || 0;\n\t\t\tself.measures[name] = value + $tw.utils.timer(startTime);\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\treturn fn;\n\t}\n};\n\nexports.Performance = Performance;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/performance.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;global&quot;
        },
        &quot;$:/core/modules/utils/pluginmaker.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/pluginmaker.js\ntype: application/javascript\nmodule-type: utils\n\nA quick and dirty way to pack up plugins within the browser.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nRepack a plugin, and then delete any non-shadow payload tiddlers\n*/\nexports.repackPlugin = function(title,additionalTiddlers,excludeTiddlers) {\n\tadditionalTiddlers = additionalTiddlers || [];\n\texcludeTiddlers = excludeTiddlers || [];\n\t// Get the plugin tiddler\n\tvar pluginTiddler = $tw.wiki.getTiddler(title);\n\tif(!pluginTiddler) {\n\t\tthrow \&quot;No such tiddler as \&quot; + title;\n\t}\n\t// Extract the JSON\n\ttry {\n\t\tvar jsonPluginTiddler = JSON.parse(pluginTiddler.fields.text);\n\t} catch(e) {\n\t\tthrow \&quot;Cannot parse plugin tiddler \&quot; + title + \&quot;\\nError: \&quot; + e;\n\t}\n\t// Get the list of tiddlers\n\tvar tiddlers = Object.keys(jsonPluginTiddler.tiddlers);\n\t// Add the additional tiddlers\n\t$tw.utils.pushTop(tiddlers,additionalTiddlers)\n\t// Remove any excluded tiddlers\n\tfor(var t=tiddlers.length-1; t&gt;=0; t--) {\n\t\tif(excludeTiddlers.indexOf(tiddlers[t]) !== -1) {\n\t\t\ttiddlers.splice(t,1);\n\t\t}\n\t}\n\t// Pack up the tiddlers into a block of JSON\n\tvar plugins = {};\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = $tw.wiki.getTiddler(title),\n\t\t\tfields = {};\n\t\t$tw.utils.each(tiddler.fields,function (value,name) {\n\t\t\tfields[name] = tiddler.getFieldString(name);\n\t\t});\n\t\tplugins[title] = fields;\n\t});\n\t// Retrieve and bump the version number\n\tvar pluginVersion = $tw.utils.parseVersion(pluginTiddler.getFieldString(\&quot;version\&quot;) || \&quot;0.0.0\&quot;) || {\n\t\t\tmajor: \&quot;0\&quot;,\n\t\t\tminor: \&quot;0\&quot;,\n\t\t\tpatch: \&quot;0\&quot;\n\t\t};\n\tpluginVersion.patch++;\n\tvar version = pluginVersion.major + \&quot;.\&quot; + pluginVersion.minor + \&quot;.\&quot; + pluginVersion.patch;\n\tif(pluginVersion.prerelease) {\n\t\tversion += \&quot;-\&quot; + pluginVersion.prerelease;\n\t}\n\tif(pluginVersion.build) {\n\t\tversion += \&quot;+\&quot; + pluginVersion.build;\n\t}\n\t// Save the tiddler\n\t$tw.wiki.addTiddler(new $tw.Tiddler(pluginTiddler,{text: JSON.stringify({tiddlers: plugins},null,4), version: version}));\n\t// Delete any non-shadow constituent tiddlers\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tif($tw.wiki.tiddlerExists(title)) {\n\t\t\t$tw.wiki.deleteTiddler(title);\n\t\t}\n\t});\n\t// Trigger an autosave\n\t$tw.rootWidget.dispatchEvent({type: \&quot;tw-auto-save-wiki\&quot;});\n\t// Return a heartwarming confirmation\n\treturn \&quot;Plugin \&quot; + title + \&quot; successfully saved\&quot;;\n}\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/pluginmaker.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/utils/utils.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/utils/utils.js\ntype: application/javascript\nmodule-type: utils\n\nVarious static utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nTrim whitespace from the start and end of a string\nThanks to Steven Levithan, http://blog.stevenlevithan.com/archives/faster-trim-javascript\n*/\nexports.trim = function(str) {\n\tif(typeof str === \&quot;string\&quot;) {\n\t\treturn str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n\t} else {\n\t\treturn str;\n\t}\n};\n\n/*\nReturn the number of keys in an object\n*/\nexports.count = function(object) {\n\tvar s = 0;\n\t$tw.utils.each(object,function() {s++;});\n\treturn s;\n};\n\n/*\nCheck if an array is equal by value and by reference.\n*/\nexports.isArrayEqual = function(array1,array2) {\n\tif(array1 === array2) {\n\t\treturn true;\n\t}\n\tarray1 = array1 || [];\n\tarray2 = array2 || [];\n\tif(array1.length !== array2.length) {\n\t\treturn false;\n\t}\n\treturn array1.every(function(value,index) {\n\t\treturn value === array2[index];\n\t});\n};\n\n/*\nPush entries onto an array, removing them first if they already exist in the array\n\tarray: array to modify (assumed to be free of duplicates)\n\tvalue: a single value to push or an array of values to push\n*/\nexports.pushTop = function(array,value) {\n\tvar t,p;\n\tif($tw.utils.isArray(value)) {\n\t\t// Remove any array entries that are duplicated in the new values\n\t\tif(value.length !== 0) {\n\t\t\tif(array.length !== 0) {\n\t\t\t\tif(value.length &lt; array.length) {\n\t\t\t\t\tfor(t=0; t&lt;value.length; t++) {\n\t\t\t\t\t\tp = array.indexOf(value[t]);\n\t\t\t\t\t\tif(p !== -1) {\n\t\t\t\t\t\t\tarray.splice(p,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor(t=array.length-1; t&gt;=0; t--) {\n\t\t\t\t\t\tp = value.indexOf(array[t]);\n\t\t\t\t\t\tif(p !== -1) {\n\t\t\t\t\t\t\tarray.splice(t,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Push the values on top of the main array\n\t\t\tarray.push.apply(array,value);\n\t\t}\n\t} else {\n\t\tp = array.indexOf(value);\n\t\tif(p !== -1) {\n\t\t\tarray.splice(p,1);\n\t\t}\n\t\tarray.push(value);\n\t}\n};\n\n/*\nRemove entries from an array\n\tarray: array to modify\n\tvalue: a single value to remove, or an array of values to remove\n*/\nexports.removeArrayEntries = function(array,value) {\n\tvar t,p;\n\tif($tw.utils.isArray(value)) {\n\t\tfor(t=0; t&lt;value.length; t++) {\n\t\t\tp = array.indexOf(value[t]);\n\t\t\tif(p !== -1) {\n\t\t\t\tarray.splice(p,1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tp = array.indexOf(value);\n\t\tif(p !== -1) {\n\t\t\tarray.splice(p,1);\n\t\t}\n\t}\n};\n\n/*\nCheck whether any members of a hashmap are present in another hashmap\n*/\nexports.checkDependencies = function(dependencies,changes) {\n\tvar hit = false;\n\t$tw.utils.each(changes,function(change,title) {\n\t\tif($tw.utils.hop(dependencies,title)) {\n\t\t\thit = true;\n\t\t}\n\t});\n\treturn hit;\n};\n\nexports.extend = function(object /* [, src] */) {\n\t$tw.utils.each(Array.prototype.slice.call(arguments, 1), function(source) {\n\t\tif(source) {\n\t\t\tfor(var property in source) {\n\t\t\t\tobject[property] = source[property];\n\t\t\t}\n\t\t}\n\t});\n\treturn object;\n};\n\nexports.deepCopy = function(object) {\n\tvar result,t;\n\tif($tw.utils.isArray(object)) {\n\t\t// Copy arrays\n\t\tresult = object.slice(0);\n\t} else if(typeof object === \&quot;object\&quot;) {\n\t\tresult = {};\n\t\tfor(t in object) {\n\t\t\tif(object[t] !== undefined) {\n\t\t\t\tresult[t] = $tw.utils.deepCopy(object[t]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tresult = object;\n\t}\n\treturn result;\n};\n\nexports.extendDeepCopy = function(object,extendedProperties) {\n\tvar result = $tw.utils.deepCopy(object),t;\n\tfor(t in extendedProperties) {\n\t\tif(extendedProperties[t] !== undefined) {\n\t\t\tresult[t] = $tw.utils.deepCopy(extendedProperties[t]);\n\t\t}\n\t}\n\treturn result;\n};\n\nexports.slowInSlowOut = function(t) {\n\treturn (1 - ((Math.cos(t * Math.PI) + 1) / 2));\n};\n\nexports.formatDateString = function (date,template) {\n\tvar t = template.replace(/0hh12/g,$tw.utils.pad($tw.utils.getHours12(date)));\n\tt = t.replace(/hh12/g,$tw.utils.getHours12(date));\n\tt = t.replace(/0hh/g,$tw.utils.pad(date.getHours()));\n\tt = t.replace(/hh/g,date.getHours());\n\tt = t.replace(/mmm/g,$tw.config.dateFormats.shortMonths[date.getMonth()]);\n\tt = t.replace(/0mm/g,$tw.utils.pad(date.getMinutes()));\n\tt = t.replace(/mm/g,date.getMinutes());\n\tt = t.replace(/0ss/g,$tw.utils.pad(date.getSeconds()));\n\tt = t.replace(/ss/g,date.getSeconds());\n\tt = t.replace(/[ap]m/g,$tw.utils.getAmPm(date).toLowerCase());\n\tt = t.replace(/[AP]M/g,$tw.utils.getAmPm(date).toUpperCase());\n\tt = t.replace(/wYYYY/g,$tw.utils.getYearForWeekNo(date));\n\tt = t.replace(/wYY/g,$tw.utils.pad($tw.utils.getYearForWeekNo(date)-2000));\n\tt = t.replace(/YYYY/g,date.getFullYear());\n\tt = t.replace(/YY/g,$tw.utils.pad(date.getFullYear()-2000));\n\tt = t.replace(/MMM/g,$tw.config.dateFormats.months[date.getMonth()]);\n\tt = t.replace(/0MM/g,$tw.utils.pad(date.getMonth()+1));\n\tt = t.replace(/MM/g,date.getMonth()+1);\n\tt = t.replace(/0WW/g,$tw.utils.pad($tw.utils.getWeek(date)));\n\tt = t.replace(/WW/g,$tw.utils.getWeek(date));\n\tt = t.replace(/DDD/g,$tw.config.dateFormats.days[date.getDay()]);\n\tt = t.replace(/ddd/g,$tw.config.dateFormats.shortDays[date.getDay()]);\n\tt = t.replace(/0DD/g,$tw.utils.pad(date.getDate()));\n\tt = t.replace(/DDth/g,date.getDate()+$tw.utils.getDaySuffix(date));\n\tt = t.replace(/DD/g,date.getDate());\n\tvar tz = date.getTimezoneOffset();\n\tvar atz = Math.abs(tz);\n\tt = t.replace(/TZD/g,(tz &lt; 0 ? '+' : '-') + $tw.utils.pad(Math.floor(atz / 60)) + ':' + $tw.utils.pad(atz % 60));\n\tt = t.replace(/\\\\(.)/g,\&quot;$1\&quot;);\n\treturn t;\n};\n\nexports.getAmPm = function(date) {\n\treturn date.getHours() &gt;= 12 ? $tw.config.dateFormats.pm : $tw.config.dateFormats.am;\n};\n\nexports.getDaySuffix = function(date) {\n\treturn $tw.config.dateFormats.daySuffixes[date.getDate()-1];\n};\n\nexports.getWeek = function(date) {\n\tvar dt = new Date(date.getTime());\n\tvar d = dt.getDay();\n\tif(d === 0) d=7;// JavaScript Sun=0, ISO Sun=7\n\tdt.setTime(dt.getTime()+(4-d)*86400000);// shift day to Thurs of same week to calculate weekNo\n\tvar n = Math.floor((dt.getTime()-new Date(dt.getFullYear(),0,1)+3600000)/86400000);\n\treturn Math.floor(n/7)+1;\n};\n\nexports.getYearForWeekNo = function(date) {\n\tvar dt = new Date(date.getTime());\n\tvar d = dt.getDay();\n\tif(d === 0) d=7;// JavaScript Sun=0, ISO Sun=7\n\tdt.setTime(dt.getTime()+(4-d)*86400000);// shift day to Thurs of same week\n\treturn dt.getFullYear();\n};\n\nexports.getHours12 = function(date) {\n\tvar h = date.getHours();\n\treturn h &gt; 12 ? h-12 : ( h &gt; 0 ? h : 12 );\n};\n\n/*\nConvert a date delta in milliseconds into a string representation of \&quot;23 seconds ago\&quot;, \&quot;27 minutes ago\&quot; etc.\n\tdelta: delta in milliseconds\nReturns an object with these members:\n\tdescription: string describing the delta period\n\tupdatePeriod: time in millisecond until the string will be inaccurate\n*/\nexports.getRelativeDate = function(delta) {\n\tvar futurep = false;\n\tif(delta &lt; 0) {\n\t\tdelta = -1 * delta;\n\t\tfuturep = true;\n\t}\n\tvar units = [\n\t\t{name: \&quot;Years\&quot;,  duration:      365 * 24 * 60 * 60 * 1000},\n\t\t{name: \&quot;Months\&quot;,  duration: (365/12) * 24 * 60 * 60 * 1000},\n\t\t{name: \&quot;Days\&quot;,    duration:            24 * 60 * 60 * 1000},\n\t\t{name: \&quot;Hours\&quot;,  duration:                60 * 60 * 1000},\n\t\t{name: \&quot;Minutes\&quot;, duration:                      60 * 1000},\n\t\t{name: \&quot;Seconds\&quot;, duration:                          1000}\n\t];\n\tfor(var t=0; t&lt;units.length; t++) {\n\t\tvar result = Math.floor(delta / units[t].duration);\n\t\tif(result &gt;= 2) {\n\t\t\treturn {\n\t\t\t\tdelta: delta,\n\t\t\t\tdescription: $tw.language.getString(\n\t\t\t\t\t\&quot;RelativeDate/\&quot; + (futurep ? \&quot;Future\&quot; : \&quot;Past\&quot;) + \&quot;/\&quot; + units[t].name,\n\t\t\t\t\t{variables:\n\t\t\t\t\t\t{period: result.toString()}\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t\tupdatePeriod: units[t].duration\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tdelta: delta,\n\t\tdescription: $tw.language.getString(\n\t\t\t\&quot;RelativeDate/\&quot; + (futurep ? \&quot;Future\&quot; : \&quot;Past\&quot;) + \&quot;/Second\&quot;,\n\t\t\t{variables:\n\t\t\t\t{period: \&quot;1\&quot;}\n\t\t\t}\n\t\t),\n\t\tupdatePeriod: 1000\n\t};\n};\n\n// Convert &amp; to \&quot;&amp;amp;\&quot;, &lt; to \&quot;&amp;lt;\&quot;, &gt; to \&quot;&amp;gt;\&quot; and \&quot; to \&quot;&amp;quot;\&quot;\nexports.htmlEncode = function(s) {\n\tif(s) {\n\t\treturn s.toString().replace(/&amp;/mg,\&quot;&amp;amp;\&quot;).replace(/&lt;/mg,\&quot;&amp;lt;\&quot;).replace(/&gt;/mg,\&quot;&amp;gt;\&quot;).replace(/\\\&quot;/mg,\&quot;&amp;quot;\&quot;);\n\t} else {\n\t\treturn \&quot;\&quot;;\n\t}\n};\n\n// Converts all HTML entities to their character equivalents\nexports.entityDecode = function(s) {\n\tvar e = s.substr(1,s.length-2); // Strip the &amp; and the ;\n\tif(e.charAt(0) === \&quot;#\&quot;) {\n\t\tif(e.charAt(1) === \&quot;x\&quot; || e.charAt(1) === \&quot;X\&quot;) {\n\t\t\treturn String.fromCharCode(parseInt(e.substr(2),16));\t\n\t\t} else {\n\t\t\treturn String.fromCharCode(parseInt(e.substr(1),10));\n\t\t}\n\t} else {\n\t\tvar c = $tw.config.htmlEntities[e];\n\t\tif(c) {\n\t\t\treturn String.fromCharCode(c);\n\t\t} else {\n\t\t\treturn s; // Couldn't convert it as an entity, just return it raw\n\t\t}\n\t}\n};\n\nexports.unescapeLineBreaks = function(s) {\n\treturn s.replace(/\\\\n/mg,\&quot;\\n\&quot;).replace(/\\\\b/mg,\&quot; \&quot;).replace(/\\\\s/mg,\&quot;\\\\\&quot;).replace(/\\r/mg,\&quot;\&quot;);\n};\n\n/*\n * Returns an escape sequence for given character. Uses \\x for characters &lt;=\n * 0xFF to save space, \\u for the rest.\n *\n * The code needs to be in sync with th code template in the compilation\n * function for \&quot;action\&quot; nodes.\n */\n// Copied from peg.js, thanks to David Majda\nexports.escape = function(ch) {\n\tvar charCode = ch.charCodeAt(0);\n\tif(charCode &lt;= 0xFF) {\n\t\treturn '\\\\x' + $tw.utils.pad(charCode.toString(16).toUpperCase());\n\t} else {\n\t\treturn '\\\\u' + $tw.utils.pad(charCode.toString(16).toUpperCase(),4);\n\t}\n};\n\n// Turns a string into a legal JavaScript string\n// Copied from peg.js, thanks to David Majda\nexports.stringify = function(s) {\n\t/*\n\t* ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a string\n\t* literal except for the closing quote character, backslash, carriage return,\n\t* line separator, paragraph separator, and line feed. Any character may\n\t* appear in the form of an escape sequence.\n\t*\n\t* For portability, we also escape escape all non-ASCII characters.\n\t*/\n\treturn s\n\t\t.replace(/\\\\/g, '\\\\\\\\')            // backslash\n\t\t.replace(/\&quot;/g, '\\\\\&quot;')              // double quote character\n\t\t.replace(/'/g, \&quot;\\\\'\&quot;)              // single quote character\n\t\t.replace(/\\r/g, '\\\\r')            // carriage return\n\t\t.replace(/\\n/g, '\\\\n')            // line feed\n\t\t.replace(/[\\x80-\\uFFFF]/g, exports.escape); // non-ASCII characters\n};\n\n/*\nEscape the RegExp special characters with a preceding backslash\n*/\nexports.escapeRegExp = function(s) {\n    return s.replace(/[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}]/g, '\\\\$&amp;');\n};\n\nexports.nextTick = function(fn) {\n/*global window: false */\n\tif(typeof window !== \&quot;undefined\&quot;) {\n\t\t// Apparently it would be faster to use postMessage - http://dbaron.org/log/20100309-faster-timeouts\n\t\twindow.setTimeout(fn,4);\n\t} else {\n\t\tprocess.nextTick(fn);\n\t}\n};\n\n/*\nConvert a hyphenated CSS property name into a camel case one\n*/\nexports.unHyphenateCss = function(propName) {\n\treturn propName.replace(/-([a-z])/gi, function(match0,match1) {\n\t\treturn match1.toUpperCase();\n\t});\n};\n\n/*\nConvert a camelcase CSS property name into a dashed one (\&quot;backgroundColor\&quot; --&gt; \&quot;background-color\&quot;)\n*/\nexports.hyphenateCss = function(propName) {\n\treturn propName.replace(/([A-Z])/g, function(match0,match1) {\n\t\treturn \&quot;-\&quot; + match1.toLowerCase();\n\t});\n};\n\n/*\nParse a text reference of one of these forms:\n* title\n* !!field\n* title!!field\n* title##index\n* etc\nReturns an object with the following fields, all optional:\n* title: tiddler title\n* field: tiddler field name\n* index: JSON property index\n*/\nexports.parseTextReference = function(textRef) {\n\t// Separate out the title, field name and/or JSON indices\n\tvar reTextRef = /^\\s*([^!#]+)?(?:(?:!!([^\\s]+))|(?:##(.+)))?\\s*/mg,\n\t\tmatch = reTextRef.exec(textRef);\n\tif(match &amp;&amp; reTextRef.lastIndex === textRef.length) {\n\t\t// Return the parts\n\t\treturn {\n\t\t\ttitle: match[1],\n\t\t\tfield: match[2],\n\t\t\tindex: match[3]\n\t\t};\n\t} else {\n\t\t// If we couldn't parse it (eg it started with a)\n\t\treturn {\n\t\t\ttitle: textRef\n\t\t};\n\t}\n};\n\n/*\nChecks whether a string is a valid fieldname\n*/\nexports.isValidFieldName = function(name) {\n\tif(!name || typeof name !== \&quot;string\&quot;) {\n\t\treturn false;\n\t}\n\tname = name.toLowerCase().trim();\n\tvar fieldValidatorRegEx = /^[a-z0-9\\-\\._]+$/mg;\n\treturn fieldValidatorRegEx.test(name);\n};\n\n/*\nExtract the version number from the meta tag or from the boot file\n*/\n\nif($tw.browser) {\n\n// Browser version\nexports.extractVersionInfo = function() {\n\tvar metatags = document.getElementsByTagName(\&quot;meta\&quot;);\n\tfor(var t=0; t&lt;metatags.length; t++) {\n\t\tvar m = metatags[t];\n\t\tif(m.name === \&quot;tiddlywiki-version\&quot;) {\n\t\t\treturn m.content;\n\t\t}\n\t}\n\treturn null;\n};\n\n} else {\n\n// Server version\nexports.extractVersionInfo = function() {\n\treturn $tw.packageInfo.version;\n};\n\n}\n\n/*\nGet the animation duration in ms\n*/\nexports.getAnimationDuration = function() {\n\treturn parseInt($tw.wiki.getTiddlerText(\&quot;$:/config/AnimationDuration\&quot;,\&quot;400\&quot;),10);\n};\n\n/*\nHash a string to a number\nDerived from http://stackoverflow.com/a/15710692\n*/\nexports.hashString = function(str) {\n\treturn str.split(\&quot;\&quot;).reduce(function(a,b) {\n\t\ta = ((a &lt;&lt; 5) - a) + b.charCodeAt(0);\n\t\treturn a &amp; a;\n\t},0);\n};\n\n/*\nDecode a base64 string\n*/\nexports.base64Decode = function(string64) {\n\tif($tw.browser) {\n\t\t// TODO\n\t\tthrow \&quot;$tw.utils.base64Decode() doesn't work in the browser\&quot;;\n\t} else {\n\t\treturn (new Buffer(string64,\&quot;base64\&quot;)).toString();\n\t}\n};\n\n/*\nConvert a hashmap into a tiddler dictionary format sequence of name:value pairs\n*/\nexports.makeTiddlerDictionary = function(data) {\n\tvar output = [];\n\tfor(var name in data) {\n\t\toutput.push(name + \&quot;: \&quot; + data[name]);\n\t}\n\treturn output.join(\&quot;\\n\&quot;);\n};\n\n/*\nHigh resolution microsecond timer for profiling\n*/\nexports.timer = function(base) {\n\tvar m;\n\tif($tw.node) {\n\t\tvar r = process.hrtime();\t\t\n\t\tm =  r[0] * 1e3 + (r[1] / 1e6);\n\t} else if(window.performance) {\n\t\tm = performance.now();\n\t} else {\n\t\tm = Date.now();\n\t}\n\tif(typeof base !== \&quot;undefined\&quot;) {\n\t\tm = m - base;\n\t}\n\treturn m;\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/utils/utils.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;utils&quot;
        },
        &quot;$:/core/modules/widgets/browse.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/browse.js\ntype: application/javascript\nmodule-type: widget\n\nBrowse widget for browsing for files to import\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar BrowseWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nBrowseWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nBrowseWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar domNode = this.document.createElement(\&quot;input\&quot;);\n\tdomNode.setAttribute(\&quot;type\&quot;,\&quot;file\&quot;);\n\tdomNode.setAttribute(\&quot;multiple\&quot;,\&quot;multiple\&quot;);\n\t// Add a click event handler\n\tdomNode.addEventListener(\&quot;change\&quot;,function (event) {\n\t\tself.wiki.readFiles(event.target.files,function(tiddlerFieldsArray) {\n\t\t\tself.dispatchEvent({type: \&quot;tw-import-tiddlers\&quot;, param: JSON.stringify(tiddlerFieldsArray)});\n\t\t});\n\t\treturn false;\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nBrowseWidget.prototype.execute = function() {\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nBrowseWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.browse = BrowseWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/browse.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/button.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/button.js\ntype: application/javascript\nmodule-type: widget\n\nButton widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar ButtonWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nButtonWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nButtonWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar domNode = this.document.createElement(\&quot;button\&quot;);\n\t// Assign classes\n\tvar classes = this[\&quot;class\&quot;].split(\&quot; \&quot;) || [];\n\tif(this.selectedClass) {\n\t\tif(this.set &amp;&amp; this.setTo &amp;&amp; this.isSelected()) {\n\t\t\t$tw.utils.pushTop(classes,this.selectedClass.split(\&quot; \&quot;));\n\t\t}\n\t\tif(this.popup &amp;&amp; this.isPoppedUp()) {\n\t\t\t$tw.utils.pushTop(classes,this.selectedClass.split(\&quot; \&quot;));\n\t\t}\n\t}\n\tdomNode.className = classes.join(\&quot; \&quot;);\n\t// Assign other attributes\n\tif(this.style) {\n\t\tdomNode.setAttribute(\&quot;style\&quot;,this.style);\n\t}\n\tif(this.title) {\n\t\tdomNode.setAttribute(\&quot;title\&quot;,this.title);\n\t}\n\tif(this[\&quot;aria-label\&quot;]) {\n\t\tdomNode.setAttribute(\&quot;aria-label\&quot;,this[\&quot;aria-label\&quot;]);\n\t}\n\t// Add a click event handler\n\tdomNode.addEventListener(\&quot;click\&quot;,function (event) {\n\t\tvar handled = false;\n\t\tif(self.to) {\n\t\t\tself.navigateTo(event);\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.message) {\n\t\t\tself.dispatchMessage(event);\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.popup) {\n\t\t\tself.triggerPopup(event);\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.set) {\n\t\t\tself.setTiddler();\n\t\t\thandled = true;\n\t\t}\n\t\tif(handled) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t\treturn handled;\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nButtonWidget.prototype.isSelected = function() {\n\tvar tiddler = this.wiki.getTiddler(this.set);\n\treturn tiddler ? tiddler.fields.text === this.setTo : this.defaultSetValue === this.setTo;\n};\n\nButtonWidget.prototype.isPoppedUp = function() {\n\tvar tiddler = this.wiki.getTiddler(this.popup);\n\tvar result = tiddler &amp;&amp; tiddler.fields.text ? $tw.popup.readPopupState(this.popup,tiddler.fields.text) : false;\n\treturn result;\n};\n\nButtonWidget.prototype.navigateTo = function(event) {\n\tvar bounds = this.domNodes[0].getBoundingClientRect();\n\tthis.dispatchEvent({\n\t\ttype: \&quot;tw-navigate\&quot;,\n\t\tnavigateTo: this.to,\n\t\tnavigateFromTitle: this.getVariable(\&quot;storyTiddler\&quot;),\n\t\tnavigateFromNode: this,\n\t\tnavigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\n\t\t},\n\t\tnavigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1)\n\t});\n};\n\nButtonWidget.prototype.dispatchMessage = function(event) {\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\&quot;currentTiddler\&quot;)});\n};\n\nButtonWidget.prototype.triggerPopup = function(event) {\n\t$tw.popup.triggerPopup({\n\t\tdomNode: this.domNodes[0],\n\t\ttitle: this.popup,\n\t\twiki: this.wiki\n\t});\n};\n\nButtonWidget.prototype.setTiddler = function() {\n\tthis.wiki.setTextReference(this.set,this.setTo,this.getVariable(\&quot;currentTiddler\&quot;));\n};\n\n/*\nCompute the internal state of the widget\n*/\nButtonWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.to = this.getAttribute(\&quot;to\&quot;);\n\tthis.message = this.getAttribute(\&quot;message\&quot;);\n\tthis.param = this.getAttribute(\&quot;param\&quot;);\n\tthis.set = this.getAttribute(\&quot;set\&quot;);\n\tthis.setTo = this.getAttribute(\&quot;setTo\&quot;);\n\tthis.popup = this.getAttribute(\&quot;popup\&quot;);\n\tthis.hover = this.getAttribute(\&quot;hover\&quot;);\n\tthis[\&quot;class\&quot;] = this.getAttribute(\&quot;class\&quot;,\&quot;\&quot;);\n\tthis[\&quot;aria-label\&quot;] = this.getAttribute(\&quot;aria-label\&quot;);\n\tthis.title = this.getAttribute(\&quot;title\&quot;);\n\tthis.style = this.getAttribute(\&quot;style\&quot;);\n\tthis.selectedClass = this.getAttribute(\&quot;selectedClass\&quot;);\n\tthis.defaultSetValue = this.getAttribute(\&quot;default\&quot;);\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nButtonWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes[\&quot;class\&quot;] || changedAttributes.selectedClass || changedAttributes.style || (this.set &amp;&amp; changedTiddlers[this.set]) || (this.popup &amp;&amp; changedTiddlers[this.popup])) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.button = ButtonWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/button.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/checkbox.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/checkbox.js\ntype: application/javascript\nmodule-type: widget\n\nCheckbox widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar CheckboxWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCheckboxWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCheckboxWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our elements\n\tthis.labelDomNode = this.document.createElement(\&quot;label\&quot;);\n\tthis.inputDomNode = this.document.createElement(\&quot;input\&quot;);\n\tthis.inputDomNode.setAttribute(\&quot;type\&quot;,\&quot;checkbox\&quot;);\n\tif(this.getValue()) {\n\t\tthis.inputDomNode.setAttribute(\&quot;checked\&quot;,\&quot;true\&quot;);\n\t}\n\tthis.labelDomNode.appendChild(this.inputDomNode);\n\tthis.spanDomNode = this.document.createElement(\&quot;span\&quot;);\n\tthis.labelDomNode.appendChild(this.spanDomNode);\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(this.inputDomNode,[\n\t\t{name: \&quot;change\&quot;, handlerObject: this, handlerMethod: \&quot;handleChangeEvent\&quot;}\n\t]);\n\t// Insert the label into the DOM and render any children\n\tparent.insertBefore(this.labelDomNode,nextSibling);\n\tthis.renderChildren(this.spanDomNode,null);\n\tthis.domNodes.push(this.labelDomNode);\n};\n\nCheckboxWidget.prototype.getValue = function() {\n\tvar tiddler = this.wiki.getTiddler(this.checkboxTitle);\n\treturn tiddler ? tiddler.hasTag(this.checkboxTag) : false;\n};\n\nCheckboxWidget.prototype.handleChangeEvent = function(event) {\n\tvar checked = this.inputDomNode.checked,\n\t\ttiddler = this.wiki.getTiddler(this.checkboxTitle);\n\tif(tiddler &amp;&amp; tiddler.hasTag(this.checkboxTag) !== checked) {\n\t\tvar newTags = (tiddler.fields.tags || []).slice(0),\n\t\t\tpos = newTags.indexOf(this.checkboxTag);\n\t\tif(pos !== -1) {\n\t\t\tnewTags.splice(pos,1);\n\t\t}\n\t\tif(checked) {\n\t\t\tnewTags.push(this.checkboxTag);\n\t\t}\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,{tags: newTags},this.wiki.getModificationFields()));\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nCheckboxWidget.prototype.execute = function() {\n\t// Get the parameters from the attributes\n\tthis.checkboxTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\tthis.checkboxTag = this.getAttribute(\&quot;tag\&quot;);\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCheckboxWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.tag || changedAttributes[\&quot;class\&quot;]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\tvar refreshed = false;\n\t\tif(changedTiddlers[this.checkboxTitle]) {\n\t\t\tthis.inputDomNode.checked = this.getValue();\n\t\t\trefreshed = true;\n\t\t}\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\n\t}\n};\n\nexports.checkbox = CheckboxWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/checkbox.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/codeblock.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/codeblock.js\ntype: application/javascript\nmodule-type: widget\n\nCode block node widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar CodeBlockWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCodeBlockWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCodeBlockWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar codeNode = this.document.createElement(\&quot;code\&quot;),\n\t\tdomNode = this.document.createElement(\&quot;pre\&quot;);\n\tcodeNode.appendChild(this.document.createTextNode(this.getAttribute(\&quot;code\&quot;)));\n\tdomNode.appendChild(codeNode);\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.domNodes.push(domNode);\n\tif(this.postRender) {\n\t\tthis.postRender();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nCodeBlockWidget.prototype.execute = function() {\n\tthis.language = this.getAttribute(\&quot;language\&quot;);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCodeBlockWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.codeblock = CodeBlockWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/codeblock.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/count.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/count.js\ntype: application/javascript\nmodule-type: widget\n\nCount widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar CountWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCountWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCountWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar textNode = this.document.createTextNode(this.currentCount);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nCountWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.filter = this.getAttribute(\&quot;filter\&quot;);\n\t// Execute the filter\n\tif(this.filter) {\n\t\tthis.currentCount = this.wiki.filterTiddlers(this.filter,this).length;\n\t} else {\n\t\tthis.currentCount = undefined;\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCountWidget.prototype.refresh = function(changedTiddlers) {\n\t// Re-execute the filter to get the count\n\tthis.computeAttributes();\n\tvar oldCount = this.currentCount;\n\tthis.execute();\n\tif(this.currentCount !== oldCount) {\n\t\t// Regenerate and rerender the widget and replace the existing DOM node\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n\n};\n\nexports.count = CountWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/count.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/dropzone.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/dropzone.js\ntype: application/javascript\nmodule-type: widget\n\nDropzone widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar DropZoneWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nDropZoneWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nDropZoneWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar domNode = this.document.createElement(\&quot;div\&quot;);\n\tdomNode.className = \&quot;tw-dropzone\&quot;;\n\t// Add event handlers\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \&quot;dragenter\&quot;, handlerObject: this, handlerMethod: \&quot;handleDragEnterEvent\&quot;},\n\t\t{name: \&quot;dragover\&quot;, handlerObject: this, handlerMethod: \&quot;handleDragOverEvent\&quot;},\n\t\t{name: \&quot;dragleave\&quot;, handlerObject: this, handlerMethod: \&quot;handleDragLeaveEvent\&quot;},\n\t\t{name: \&quot;drop\&quot;, handlerObject: this, handlerMethod: \&quot;handleDropEvent\&quot;},\n\t\t{name: \&quot;paste\&quot;, handlerObject: this, handlerMethod: \&quot;handlePasteEvent\&quot;}\n\t]);\n\tdomNode.addEventListener(\&quot;click\&quot;,function (event) {\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nDropZoneWidget.prototype.handleDragEnterEvent  = function(event) {\n\t// We count enter/leave events\n\tthis.dragEnterCount = (this.dragEnterCount || 0) + 1;\n\t// If we're entering for the first time we need to apply highlighting\n\tif(this.dragEnterCount === 1) {\n\t\t$tw.utils.addClass(this.domNodes[0],\&quot;tw-dragover\&quot;);\n\t}\n\t// Tell the browser that we're ready to handle the drop\n\tevent.preventDefault();\n\t// Tell the browser not to ripple the drag up to any parent drop handlers\n\tevent.stopPropagation();\n};\n\nDropZoneWidget.prototype.handleDragOverEvent  = function(event) {\n\t// Check for being over a TEXTAREA or INPUT\n\tif([\&quot;TEXTAREA\&quot;,\&quot;INPUT\&quot;].indexOf(event.target.tagName) !== -1) {\n\t\treturn false;\n\t}\n\t// Tell the browser that we're still interested in the drop\n\tevent.preventDefault();\n\tevent.dataTransfer.dropEffect = \&quot;copy\&quot;; // Explicitly show this is a copy\n};\n\nDropZoneWidget.prototype.handleDragLeaveEvent  = function(event) {\n\t// Reduce the enter count\n\tthis.dragEnterCount = (this.dragEnterCount || 0) - 1;\n\t// Remove highlighting if we're leaving externally\n\tif(this.dragEnterCount &lt;= 0) {\n\t\t$tw.utils.removeClass(this.domNodes[0],\&quot;tw-dragover\&quot;);\n\t}\n};\n\nDropZoneWidget.prototype.handleDropEvent  = function(event) {\n\t// Check for being over a TEXTAREA or INPUT\n\tif([\&quot;TEXTAREA\&quot;,\&quot;INPUT\&quot;].indexOf(event.target.tagName) !== -1) {\n\t\treturn false;\n\t}\n\tvar self = this,\n\t\tdataTransfer = event.dataTransfer;\n\t// Reset the enter count\n\tthis.dragEnterCount = 0;\n\t// Remove highlighting\n\t$tw.utils.removeClass(this.domNodes[0],\&quot;tw-dragover\&quot;);\n\t// Import any files in the drop\n\tvar numFiles = this.wiki.readFiles(dataTransfer.files,function(tiddlerFieldsArray) {\n\t\tself.dispatchEvent({type: \&quot;tw-import-tiddlers\&quot;, param: JSON.stringify(tiddlerFieldsArray)});\n\t});\n\t// Try to import the various data types we understand\n\tif(numFiles === 0) {\n\t\tthis.importData(dataTransfer);\n\t}\n\t// Tell the browser that we handled the drop\n\tevent.preventDefault();\n\t// Stop the drop ripple up to any parent handlers\n\tevent.stopPropagation();\n};\n\nDropZoneWidget.prototype.importData = function(dataTransfer) {\n\t// Try each provided data type in turn\n\tfor(var t=0; t&lt;this.importDataTypes.length; t++) {\n\t\tif(!$tw.browser.isIE || this.importDataTypes[t].IECompatible) {\n\t\t\t// Get the data\n\t\t\tvar dataType = this.importDataTypes[t];\n\t\t\t\tvar data = dataTransfer.getData(dataType.type);\n\t\t\t// Import the tiddlers in the data\n\t\t\tif(data !== \&quot;\&quot; &amp;&amp; data !== null) {\n\t\t\t\tvar tiddlerFields = dataType.convertToFields(data);\n\t\t\t\tif(!tiddlerFields.title) {\n\t\t\t\t\ttiddlerFields.title = this.wiki.generateNewTitle(\&quot;Untitled\&quot;);\n\t\t\t\t}\n\t\t\t\tthis.dispatchEvent({type: \&quot;tw-import-tiddlers\&quot;, param: JSON.stringify([tiddlerFields])});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n};\n\nDropZoneWidget.prototype.importDataTypes = [\n\t{type: \&quot;text/vnd.tiddler\&quot;, IECompatible: false, convertToFields: function(data) {\n\t\treturn JSON.parse(data);\n\t}},\n\t{type: \&quot;URL\&quot;, IECompatible: true, convertToFields: function(data) {\n\t\t// Check for tiddler data URI\n\t\tvar match = decodeURI(data).match(/^data\\:text\\/vnd\\.tiddler,(.*)/i);\n\t\tif(match) {\n\t\t\treturn JSON.parse(match[1]);\n\t\t} else {\n\t\t\treturn { // As URL string\n\t\t\t\ttext: data\n\t\t\t};\n\t\t}\n\t}},\n\t{type: \&quot;text/x-moz-url\&quot;, IECompatible: false, convertToFields: function(data) {\n\t\t// Check for tiddler data URI\n\t\tvar match = decodeURI(data).match(/^data\\:text\\/vnd\\.tiddler,(.*)/i);\n\t\tif(match) {\n\t\t\treturn JSON.parse(match[1]);\n\t\t} else {\n\t\t\treturn { // As URL string\n\t\t\t\ttext: data\n\t\t\t};\n\t\t}\n\t}},\n\t{type: \&quot;text/html\&quot;, IECompatible: false, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}},\n\t{type: \&quot;text/plain\&quot;, IECompatible: false, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}},\n\t{type: \&quot;Text\&quot;, IECompatible: true, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}},\n\t{type: \&quot;text/uri-list\&quot;, IECompatible: false, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}}\n];\n\nDropZoneWidget.prototype.handlePasteEvent  = function(event) {\n\t// Let the browser handle it if we're in a textarea or input box\n\tif([\&quot;TEXTAREA\&quot;,\&quot;INPUT\&quot;].indexOf(event.target.tagName) == -1) {\n\t\tvar self = this,\n\t\t\titems = event.clipboardData.items;\n\t\t// Enumerate the clipboard items\n\t\tfor(var t = 0; t&lt;items.length; t++) {\n\t\t\tvar item = items[t];\n\t\t\tif(item.kind === \&quot;file\&quot;) {\n\t\t\t\t// Import any files\n\t\t\t\tthis.wiki.readFile(item.getAsFile(),function(tiddlerFieldsArray) {\n\t\t\t\t\tself.dispatchEvent({type: \&quot;tw-import-tiddlers\&quot;, param: JSON.stringify(tiddlerFieldsArray)});\n\t\t\t\t});\n\t\t\t} else if(item.kind === \&quot;string\&quot;) {\n\t\t\t\t// Create tiddlers from string items\n\t\t\t\tvar type = item.type;\n\t\t\t\titem.getAsString(function(str) {\n\t\t\t\t\tvar tiddlerFields = {\n\t\t\t\t\t\ttitle: self.wiki.generateNewTitle(\&quot;Untitled\&quot;),\n\t\t\t\t\t\ttext: str,\n\t\t\t\t\t\ttype: type\n\t\t\t\t\t};\n\t\t\t\t\tself.dispatchEvent({type: \&quot;tw-import-tiddlers\&quot;, param: JSON.stringify([tiddlerFields])});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t// Tell the browser that we've handled the paste\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nDropZoneWidget.prototype.execute = function() {\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nDropZoneWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.dropzone = DropZoneWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/dropzone.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/edit-binary.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/edit-binary.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-binary widget; placeholder for editing binary tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar BINARY_WARNING_MESSAGE = \&quot;$:/core/ui/BinaryWarning\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar EditBinaryWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditBinaryWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditBinaryWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditBinaryWidget.prototype.execute = function() {\n\t// Construct the child widgets\n\tthis.makeChildWidgets([{\n\t\ttype: \&quot;transclude\&quot;,\n\t\tattributes: {\n\t\t\ttiddler: {type: \&quot;string\&quot;, value: BINARY_WARNING_MESSAGE}\n\t\t}\n\t}]);\n};\n\n/*\nRefresh by refreshing our child widget\n*/\nEditBinaryWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports[\&quot;edit-binary\&quot;] = EditBinaryWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/edit-binary.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/edit-bitmap.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/edit-bitmap.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-bitmap widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n// Default image sizes\nvar DEFAULT_IMAGE_WIDTH = 300,\n\tDEFAULT_IMAGE_HEIGHT = 185;\n\n// Configuration tiddlers\nvar LINE_WIDTH_TITLE = \&quot;$:/config/BitmapEditor/LineWidth\&quot;,\n\tLINE_COLOUR_TITLE = \&quot;$:/config/BitmapEditor/Colour\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar EditBitmapWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditBitmapWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditBitmapWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our element\n\tthis.canvasDomNode = $tw.utils.domMaker(\&quot;canvas\&quot;,{\n\t\tdocument: this.document,\n\t\t\&quot;class\&quot;:\&quot;tw-edit-bitmapeditor\&quot;,\n\t\teventListeners: [{\n\t\t\tname: \&quot;touchstart\&quot;, handlerObject: this, handlerMethod: \&quot;handleTouchStartEvent\&quot;\n\t\t},{\n\t\t\tname: \&quot;touchmove\&quot;, handlerObject: this, handlerMethod: \&quot;handleTouchMoveEvent\&quot;\n\t\t},{\n\t\t\tname: \&quot;touchend\&quot;, handlerObject: this, handlerMethod: \&quot;handleTouchEndEvent\&quot;\n\t\t},{\n\t\t\tname: \&quot;mousedown\&quot;, handlerObject: this, handlerMethod: \&quot;handleMouseDownEvent\&quot;\n\t\t},{\n\t\t\tname: \&quot;mousemove\&quot;, handlerObject: this, handlerMethod: \&quot;handleMouseMoveEvent\&quot;\n\t\t},{\n\t\t\tname: \&quot;mouseup\&quot;, handlerObject: this, handlerMethod: \&quot;handleMouseUpEvent\&quot;\n\t\t}]\n\t});\n\tthis.widthDomNode = $tw.utils.domMaker(\&quot;input\&quot;,{\n\t\tdocument: this.document,\n\t\t\&quot;class\&quot;:\&quot;tw-edit-bitmapeditor-width\&quot;,\n\t\teventListeners: [{\n\t\t\tname: \&quot;change\&quot;, handlerObject: this, handlerMethod: \&quot;handleWidthChangeEvent\&quot;\n\t\t}]\n\t});\n\tthis.heightDomNode = $tw.utils.domMaker(\&quot;input\&quot;,{\n\t\tdocument: this.document,\n\t\t\&quot;class\&quot;:\&quot;tw-edit-bitmapeditor-height\&quot;,\n\t\teventListeners: [{\n\t\t\tname: \&quot;change\&quot;, handlerObject: this, handlerMethod: \&quot;handleHeightChangeEvent\&quot;\n\t\t}]\n\t});\n\t// Insert the elements into the DOM\n\tparent.insertBefore(this.canvasDomNode,nextSibling);\n\tparent.insertBefore(this.widthDomNode,nextSibling);\n\tparent.insertBefore(this.heightDomNode,nextSibling);\n\tthis.domNodes.push(this.canvasDomNode,this.widthDomNode,this.heightDomNode);\n\t// Load the image into the canvas\n\tthis.loadCanvas();\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditBitmapWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.editTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n};\n\n/*\nNote that the bitmap editor intentionally doesn't try to refresh itself because it would be confusing to have the image changing spontaneously while editting it\n*/\nEditBitmapWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nEditBitmapWidget.prototype.loadCanvas = function() {\n\tvar tiddler = this.wiki.getTiddler(this.editTitle),\n\t\tcurrImage = new Image();\n\t// Set up event handlers for loading the image\n\tvar self = this;\n\tcurrImage.onload = function() {\n\t\t// Copy the image to the on-screen canvas\n\t\tself.initCanvas(self.canvasDomNode,currImage.width,currImage.height,currImage);\n\t\t// And also copy the current bitmap to the off-screen canvas\n\t\tself.currCanvas = self.document.createElement(\&quot;canvas\&quot;);\n\t\tself.initCanvas(self.currCanvas,currImage.width,currImage.height,currImage);\n\t\t// Set the width and height input boxes\n\t\tself.updateSize();\n\t};\n\tcurrImage.onerror = function() {\n\t\t// Set the on-screen canvas size and clear it\n\t\tself.initCanvas(self.canvasDomNode,DEFAULT_IMAGE_WIDTH,DEFAULT_IMAGE_HEIGHT);\n\t\t// Set the off-screen canvas size and clear it\n\t\tself.currCanvas = self.document.createElement(\&quot;canvas\&quot;);\n\t\tself.initCanvas(self.currCanvas,DEFAULT_IMAGE_WIDTH,DEFAULT_IMAGE_HEIGHT);\n\t\t// Set the width and height input boxes\n\t\tself.updateSize();\n\t}\n\t// Get the current bitmap into an image object\n\tcurrImage.src = \&quot;data:\&quot; + tiddler.fields.type + \&quot;;base64,\&quot; + tiddler.fields.text;\n};\n\nEditBitmapWidget.prototype.initCanvas = function(canvas,width,height,image) {\n\tcanvas.width = width;\n\tcanvas.height = height;\n\tvar ctx = canvas.getContext(\&quot;2d\&quot;);\n\tif(image) {\n\t\tctx.drawImage(image,0,0);\n\t} else {\n\t\tctx.fillStyle = \&quot;#fff\&quot;;\n\t\tctx.fillRect(0,0,canvas.width,canvas.height);\n\t}\n}\n\n/*\n** Update the input boxes with the actual size of the canvas\n*/\nEditBitmapWidget.prototype.updateSize = function() {\n\tthis.widthDomNode.value = this.currCanvas.width;\n\tthis.heightDomNode.value = this.currCanvas.height;\n};\n\n/*\n** Change the size of the canvas, preserving the current image\n*/\nEditBitmapWidget.prototype.changeCanvasSize = function(newWidth,newHeight) {\n\t// Create and size a new canvas\n\tvar newCanvas = this.document.createElement(\&quot;canvas\&quot;);\n\tthis.initCanvas(newCanvas,newWidth,newHeight);\n\t// Copy the old image\n\tvar ctx = newCanvas.getContext(\&quot;2d\&quot;);\n\tctx.drawImage(this.currCanvas,0,0);\n\t// Set the new canvas as the current one\n\tthis.currCanvas = newCanvas;\n\t// Set the size of the onscreen canvas\n\tthis.canvasDomNode.width = newWidth;\n\tthis.canvasDomNode.height = newHeight;\n\t// Paint the onscreen canvas with the offscreen canvas\n\tctx = this.canvasDomNode.getContext(\&quot;2d\&quot;);\n\tctx.drawImage(this.currCanvas,0,0);\n};\n\nEditBitmapWidget.prototype.handleWidthChangeEvent = function(event) {\n\t// Get the new width\n\tvar newWidth = parseInt(this.widthDomNode.value,10);\n\t// Update if necessary\n\tif(newWidth &gt; 0 &amp;&amp; newWidth !== this.currCanvas.width) {\n\t\tthis.changeCanvasSize(newWidth,this.currCanvas.height);\n\t}\n\t// Update the input controls\n\tthis.updateSize();\n};\n\nEditBitmapWidget.prototype.handleHeightChangeEvent = function(event) {\n\t// Get the new width\n\tvar newHeight = parseInt(this.heightDomNode.value,10);\n\t// Update if necessary\n\tif(newHeight &gt; 0 &amp;&amp; newHeight !== this.currCanvas.height) {\n\t\tthis.changeCanvasSize(this.currCanvas.width,newHeight);\n\t}\n\t// Update the input controls\n\tthis.updateSize();\n};\n\nEditBitmapWidget.prototype.handleTouchStartEvent = function(event) {\n\tthis.brushDown = true;\n\tthis.strokeStart(event.touches[0].clientX,event.touches[0].clientY);\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleTouchMoveEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.strokeMove(event.touches[0].clientX,event.touches[0].clientY);\n\t}\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleTouchEndEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.brushDown = false;\n\t\tthis.strokeEnd();\n\t}\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleMouseDownEvent = function(event) {\n\tthis.strokeStart(event.clientX,event.clientY);\n\tthis.brushDown = true;\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleMouseMoveEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.strokeMove(event.clientX,event.clientY);\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\treturn false;\n\t}\n\treturn true;\n};\n\nEditBitmapWidget.prototype.handleMouseUpEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.brushDown = false;\n\t\tthis.strokeEnd();\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\treturn false;\n\t}\n\treturn true;\n};\n\nEditBitmapWidget.prototype.adjustCoordinates = function(x,y) {\n\tvar canvasRect = this.canvasDomNode.getBoundingClientRect(),\n\t\tscale = this.canvasDomNode.width/canvasRect.width;\n\treturn {x: (x - canvasRect.left) * scale, y: (y - canvasRect.top) * scale};\n};\n\nEditBitmapWidget.prototype.strokeStart = function(x,y) {\n\t// Start off a new stroke\n\tthis.stroke = [this.adjustCoordinates(x,y)];\n};\n\nEditBitmapWidget.prototype.strokeMove = function(x,y) {\n\tvar ctx = this.canvasDomNode.getContext(\&quot;2d\&quot;),\n\t\tt;\n\t// Add the new position to the end of the stroke\n\tthis.stroke.push(this.adjustCoordinates(x,y));\n\t// Redraw the previous image\n\tctx.drawImage(this.currCanvas,0,0);\n\t// Render the stroke\n\tctx.strokeStyle = this.wiki.getTiddlerText(LINE_COLOUR_TITLE,\&quot;#ff0\&quot;);\n\tctx.lineWidth = parseInt(this.wiki.getTiddlerText(LINE_WIDTH_TITLE,\&quot;3\&quot;),10);\n\tctx.lineCap = \&quot;round\&quot;;\n\tctx.lineJoin = \&quot;round\&quot;;\n\tctx.beginPath();\n\tctx.moveTo(this.stroke[0].x,this.stroke[0].y);\n\tfor(t=1; t&lt;this.stroke.length-1; t++) {\n\t\tvar s1 = this.stroke[t],\n\t\t\ts2 = this.stroke[t-1],\n\t\t\ttx = (s1.x + s2.x)/2,\n\t\t\tty = (s1.y + s2.y)/2;\n\t\tctx.quadraticCurveTo(s2.x,s2.y,tx,ty);\n\t}\n\tctx.stroke();\n};\n\nEditBitmapWidget.prototype.strokeEnd = function() {\n\t// Copy the bitmap to the off-screen canvas\n\tvar ctx = this.currCanvas.getContext(\&quot;2d\&quot;);\n\tctx.drawImage(this.canvasDomNode,0,0);\n\t// Save the image into the tiddler\n\tthis.saveChanges();\n};\n\nEditBitmapWidget.prototype.saveChanges = function() {\n\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\tif(tiddler) {\n\t\t// data URIs look like \&quot;data:&lt;type&gt;;base64,&lt;text&gt;\&quot;\n\t\tvar dataURL = this.canvasDomNode.toDataURL(tiddler.fields.type,1.0),\n\t\t\tposColon = dataURL.indexOf(\&quot;:\&quot;),\n\t\t\tposSemiColon = dataURL.indexOf(\&quot;;\&quot;),\n\t\t\tposComma = dataURL.indexOf(\&quot;,\&quot;),\n\t\t\ttype = dataURL.substring(posColon+1,posSemiColon),\n\t\t\ttext = dataURL.substring(posComma+1);\n\t\tvar update = {type: type, text: text};\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,update));\n\t}\n};\n\nexports[\&quot;edit-bitmap\&quot;] = EditBitmapWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/edit-bitmap.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/edit-text.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/edit-text.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-text widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar MIN_TEXT_AREA_HEIGHT = 100; // Minimum height of textareas in pixels\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar EditTextWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditTextWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditTextWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our element\n\tvar editInfo = this.getEditInfo();\n\tvar domNode = this.document.createElement(this.editTag);\n\tif(this.editType) {\n\t\tdomNode.setAttribute(\&quot;type\&quot;,this.editType);\n\t}\n\tif(editInfo.value === \&quot;\&quot; &amp;&amp; this.editPlaceholder) {\n\t\tdomNode.setAttribute(\&quot;placeholder\&quot;,this.editPlaceholder);\n\t}\n\tif(this.editSize) {\n\t\tdomNode.setAttribute(\&quot;size\&quot;,this.editSize);\n\t}\n\t// Assign classes\n\tif(this.editClass) {\n\t\tdomNode.className = this.editClass;\n\t}\n\t// Set the text\n\tif(this.editTag === \&quot;textarea\&quot;) {\n\t\tdomNode.appendChild(this.document.createTextNode(editInfo.value));\n\t} else {\n\t\tdomNode.value = editInfo.value;\n\t}\n\t// Add an input event handler\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \&quot;focus\&quot;, handlerObject: this, handlerMethod: \&quot;handleFocusEvent\&quot;},\n\t\t{name: \&quot;input\&quot;, handlerObject: this, handlerMethod: \&quot;handleInputEvent\&quot;}\n\t]);\n\t// Insert the element into the DOM\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.domNodes.push(domNode);\n\tif(this.postRender) {\n\t\tthis.postRender();\n\t}\n\t// Fix height\n\tthis.fixHeight();\n};\n\n/*\nGet the tiddler being edited and current value\n*/\nEditTextWidget.prototype.getEditInfo = function() {\n\t// Get the edit value\n\tvar self = this,\n\t\tvalue,\n\t\tupdate;\n\tif(this.editIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);\n\t\tupdate = function(value) {\n\t\t\tvar data = self.wiki.getTiddlerData(self.editTitle,{});\n\t\t\tif(data[self.editIndex] !== value) {\n\t\t\t\tdata[self.editIndex] = value;\n\t\t\t\tself.wiki.setTiddlerData(self.editTitle,data);\n\t\t\t}\n\t\t};\n\t} else {\n\t\t// Get the current tiddler and the field name\n\t\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\t\tif(tiddler) {\n\t\t\t// If we've got a tiddler, the value to display is the field string value\n\t\t\tvalue = tiddler.getFieldString(this.editField);\n\t\t} else {\n\t\t\t// Otherwise, we need to construct a default value for the editor\n\t\t\tswitch(this.editField) {\n\t\t\t\tcase \&quot;text\&quot;:\n\t\t\t\t\tvalue = \&quot;Type the text for the tiddler '\&quot; + this.editTitle + \&quot;'\&quot;;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \&quot;title\&quot;:\n\t\t\t\t\tvalue = this.editTitle;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tvalue = \&quot;\&quot;;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(this.editDefault !== undefined) {\n\t\t\t\tvalue = this.editDefault;\n\t\t\t}\n\t\t}\n\t\tupdate = function(value) {\n\t\t\tvar tiddler = self.wiki.getTiddler(self.editTitle),\n\t\t\t\tupdateFields = {\n\t\t\t\t\ttitle: self.editTitle\n\t\t\t\t};\n\t\t\tupdateFields[self.editField] = value;\n\t\t\tself.wiki.addTiddler(new $tw.Tiddler(self.wiki.getCreationFields(),tiddler,updateFields,self.wiki.getModificationFields()));\n\t\t};\n\t}\n\treturn {value: value, update: update};\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditTextWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.editTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\tthis.editField = this.getAttribute(\&quot;field\&quot;,\&quot;text\&quot;);\n\tthis.editIndex = this.getAttribute(\&quot;index\&quot;);\n\tthis.editDefault = this.getAttribute(\&quot;default\&quot;);\n\tthis.editClass = this.getAttribute(\&quot;class\&quot;);\n\tthis.editPlaceholder = this.getAttribute(\&quot;placeholder\&quot;);\n\tthis.editSize = this.getAttribute(\&quot;size\&quot;);\n\tthis.editFocusPopup = this.getAttribute(\&quot;focusPopup\&quot;);\n\t// Get the editor element tag and type\n\tvar tag,type;\n\tif(this.editField === \&quot;text\&quot;) {\n\t\ttag = \&quot;textarea\&quot;;\n\t} else {\n\t\ttag = \&quot;input\&quot;;\n\t\tvar fieldModule = $tw.Tiddler.fieldModules[this.editField];\n\t\tif(fieldModule &amp;&amp; fieldModule.editTag) {\n\t\t\ttag = fieldModule.editTag;\n\t\t}\n\t\tif(fieldModule &amp;&amp; fieldModule.editType) {\n\t\t\ttype = fieldModule.editType;\n\t\t}\n\t\ttype = type || \&quot;text\&quot;;\n\t}\n\t// Get the rest of our parameters\n\tthis.editTag = this.getAttribute(\&quot;tag\&quot;,tag);\n\tthis.editType = this.getAttribute(\&quot;type\&quot;,type);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEditTextWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// Completely rerender if any of our attributes have changed\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else if(changedTiddlers[this.editTitle]) {\n\t\tthis.updateEditor(this.getEditInfo().value);\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n/*\nUpdate the editor with new text. This method is separate from updateEditorDomNode()\nso that subclasses can override updateEditor() and still use updateEditorDomNode()\n*/\nEditTextWidget.prototype.updateEditor = function(text) {\n\tthis.updateEditorDomNode(text);\n};\n\n/*\nUpdate the editor dom node with new text\n*/\nEditTextWidget.prototype.updateEditorDomNode = function(text) {\n\t// Replace the edit value if the tiddler we're editing has changed\n\tvar domNode = this.domNodes[0];\n\tif(!domNode.isTiddlyWikiFakeDom) {\n\t\tif(this.document.activeElement !== domNode) {\n\t\t\tdomNode.value = text;\n\t\t}\n\t\t// Fix the height if needed\n\t\tthis.fixHeight();\n\t}\n};\n\n/*\nFix the height of textareas to fit their content\n*/\nEditTextWidget.prototype.fixHeight = function() {\n\tvar self = this,\n\t\tdomNode = this.domNodes[0];\n\tif(domNode &amp;&amp; !domNode.isTiddlyWikiFakeDom &amp;&amp; this.editTag === \&quot;textarea\&quot;) {\n\t\t$tw.utils.nextTick(function() {\n\t\t\t// Resize the textarea to fit its content, preserving scroll position\n\t\t\tvar scrollPosition = $tw.utils.getScrollPosition(),\n\t\t\t\tscrollTop = scrollPosition.y;\n\t\t\t// Set its height to auto so that it snaps to the correct height\n\t\t\tdomNode.style.height = \&quot;auto\&quot;;\n\t\t\t// Calculate the revised height\n\t\t\tvar newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,MIN_TEXT_AREA_HEIGHT);\n\t\t\t// Only try to change the height if it has changed\n\t\t\tif(newHeight !== domNode.offsetHeight) {\n\t\t\t\tdomNode.style.height =  newHeight + \&quot;px\&quot;;\n\t\t\t\t// Make sure that the dimensions of the textarea are recalculated\n\t\t\t\t$tw.utils.forceLayout(domNode);\n\t\t\t\t// Check that the scroll position is still visible before trying to scroll back to it\n\t\t\t\tscrollTop = Math.min(scrollTop,self.document.body.scrollHeight - window.innerHeight);\n\t\t\t\twindow.scrollTo(scrollPosition.x,scrollTop);\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\nHandle a dom \&quot;input\&quot; event\n*/\nEditTextWidget.prototype.handleInputEvent = function(event) {\n\tthis.saveChanges(this.domNodes[0].value);\n\tthis.fixHeight();\n\treturn true;\n};\n\nEditTextWidget.prototype.handleFocusEvent = function(event) {\n\tif(this.editFocusPopup) {\n\t\t$tw.popup.triggerPopup({\n\t\t\tdomNode: this.domNodes[0],\n\t\t\ttitle: this.editFocusPopup,\n\t\t\twiki: this.wiki,\n\t\t\tforce: true\n\t\t});\n\t}\n\treturn true;\n};\n\nEditTextWidget.prototype.saveChanges = function(text) {\n\tvar editInfo = this.getEditInfo();\n\tif(text !== editInfo.value) {\n\t\teditInfo.update(text);\n\t}\n};\n\nexports[\&quot;edit-text\&quot;] = EditTextWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/edit-text.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/edit.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/edit.js\ntype: application/javascript\nmodule-type: widget\n\nEdit widget is a meta-widget chooses the appropriate actual editting widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar EditWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n// Mappings from content type to editor type are stored in tiddlers with this prefix\nvar EDITOR_MAPPING_PREFIX = \&quot;$:/config/EditorTypeMappings/\&quot;;\n\n/*\nCompute the internal state of the widget\n*/\nEditWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.editTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\tthis.editField = this.getAttribute(\&quot;field\&quot;,\&quot;text\&quot;);\n\tthis.editIndex = this.getAttribute(\&quot;index\&quot;);\n\tthis.editClass = this.getAttribute(\&quot;class\&quot;);\n\tthis.editPlaceholder = this.getAttribute(\&quot;placeholder\&quot;);\n\t// Get the content type of the thing we're editing\n\tvar type;\n\tif(this.editField === \&quot;text\&quot;) {\n\t\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\t\tif(tiddler) {\n\t\t\ttype = tiddler.fields.type;\n\t\t}\n\t}\n\ttype = type || \&quot;text/vnd.tiddlywiki\&quot;;\n\t// Choose the appropriate edit widget\n\tvar editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type);\n\tif(!editorType) {\n\t\tvar typeInfo = $tw.config.contentTypeInfo[type];\n\t\tif(typeInfo &amp;&amp; typeInfo.encoding === \&quot;base64\&quot;) {\n\t\t\teditorType = \&quot;binary\&quot;;\n\t\t} else {\n\t\t\teditorType = \&quot;text\&quot;;\n\t\t}\n\t}\n\t// Make the child widgets\n\tthis.makeChildWidgets([{\n\t\ttype: \&quot;edit-\&quot; + editorType,\n\t\tattributes: {\n\t\t\ttiddler: {type: \&quot;string\&quot;, value: this.editTitle},\n\t\t\tfield: {type: \&quot;string\&quot;, value: this.editField},\n\t\t\tindex: {type: \&quot;string\&quot;, value: this.editIndex},\n\t\t\t\&quot;class\&quot;: {type: \&quot;string\&quot;, value: this.editClass},\n\t\t\t\&quot;placeholder\&quot;: {type: \&quot;string\&quot;, value: this.editPlaceholder}\n\t\t}\n\t}]);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEditWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.edit = EditWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/edit.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/element.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/element.js\ntype: application/javascript\nmodule-type: widget\n\nElement widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar ElementWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nElementWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nElementWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Neuter blacklisted elements\n\tvar tag = this.parseTreeNode.tag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \&quot;safe-\&quot; + tag;\n\t}\n\tvar domNode = this.document.createElementNS(this.namespace,tag);\n\tthis.assignAttributes(domNode,{excludeEventAttributes: true});\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nElementWidget.prototype.execute = function() {\n\t// Select the namespace for the tag\n\tvar tagNamespaces = {\n\t\t\tsvg: \&quot;http://www.w3.org/2000/svg\&quot;,\n\t\t\tmath: \&quot;http://www.w3.org/1998/Math/MathML\&quot;,\n\t\t\tbody: \&quot;http://www.w3.org/1999/xhtml\&quot;\n\t\t};\n\tthis.namespace = tagNamespaces[this.parseTreeNode.tag];\n\tif(this.namespace) {\n\t\tthis.setVariable(\&quot;namespace\&quot;,this.namespace);\n\t} else {\n\t\tthis.namespace = this.getVariable(\&quot;namespace\&quot;,{defaultValue: \&quot;http://www.w3.org/1999/xhtml\&quot;});\n\t}\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nElementWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes(),\n\t\thasChangedAttributes = $tw.utils.count(changedAttributes) &gt; 0;\n\tif(hasChangedAttributes) {\n\t\t// Update our attributes\n\t\tthis.assignAttributes(this.domNodes[0],{excludeEventAttributes: true});\n\t}\n\treturn this.refreshChildren(changedTiddlers) || hasChangedAttributes;\n};\n\nexports.element = ElementWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/element.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/encrypt.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/encrypt.js\ntype: application/javascript\nmodule-type: widget\n\nEncrypt widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar EncryptWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEncryptWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEncryptWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar textNode = this.document.createTextNode(this.encryptedText);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEncryptWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.filter = this.getAttribute(\&quot;filter\&quot;,\&quot;[!is[system]]\&quot;);\n\t// Encrypt the filtered tiddlers\n\tvar tiddlers = this.wiki.filterTiddlers(this.filter),\n\t\tjson = {},\n\t\tself = this;\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.wiki.getTiddler(title),\n\t\t\tjsonTiddler = {};\n\t\tfor(var f in tiddler.fields) {\n\t\t\tjsonTiddler[f] = tiddler.getFieldString(f);\n\t\t}\n\t\tjson[title] = jsonTiddler;\n\t});\n\tthis.encryptedText = $tw.utils.htmlEncode($tw.crypto.encrypt(JSON.stringify(json)));\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEncryptWidget.prototype.refresh = function(changedTiddlers) {\n\t// We don't need to worry about refreshing because the encrypt widget isn't for interactive use\n\treturn false;\n};\n\nexports.encrypt = EncryptWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/encrypt.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/entity.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/entity.js\ntype: application/javascript\nmodule-type: widget\n\nHTML entity widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar EntityWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEntityWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEntityWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.execute();\n\tvar textNode = this.document.createTextNode($tw.utils.entityDecode(this.parseTreeNode.entity));\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEntityWidget.prototype.execute = function() {\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEntityWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.entity = EntityWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/entity.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/fieldmangler.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/fieldmangler.js\ntype: application/javascript\nmodule-type: widget\n\nField mangler widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar FieldManglerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.addEventListeners([\n\t\t{type: \&quot;tw-remove-field\&quot;, handler: \&quot;handleRemoveFieldEvent\&quot;},\n\t\t{type: \&quot;tw-add-field\&quot;, handler: \&quot;handleAddFieldEvent\&quot;},\n\t\t{type: \&quot;tw-remove-tag\&quot;, handler: \&quot;handleRemoveTagEvent\&quot;},\n\t\t{type: \&quot;tw-add-tag\&quot;, handler: \&quot;handleAddTagEvent\&quot;}\n\t]);\n};\n\n/*\nInherit from the base widget class\n*/\nFieldManglerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nFieldManglerWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nFieldManglerWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.mangleTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nFieldManglerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nFieldManglerWidget.prototype.handleRemoveFieldEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle),\n\t\tdeletion = {};\n\tdeletion[event.param] = undefined;\n\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,deletion));\n\treturn true;\n};\n\nFieldManglerWidget.prototype.handleAddFieldEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle);\n\tif(tiddler &amp;&amp; typeof event.param === \&quot;string\&quot;) {\n\t\tvar name = event.param.toLowerCase().trim();\n\t\tif(name !== \&quot;\&quot; &amp;&amp; !$tw.utils.hop(tiddler.fields,name)) {\n\t\t\tif(!$tw.utils.isValidFieldName(name)) {\n\t\t\t\talert($tw.language.getString(\n\t\t\t\t\t\&quot;InvalidFieldName\&quot;,\n\t\t\t\t\t{variables:\n\t\t\t\t\t\t{fieldName: name}\n\t\t\t\t\t}\n\t\t\t\t));\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tvar addition = this.wiki.getModificationFields();\n\t\t\taddition[name] = \&quot;\&quot;;\n\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));\n\t\t}\n\t}\n\treturn true;\n};\n\nFieldManglerWidget.prototype.handleRemoveTagEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle);\n\tif(tiddler &amp;&amp; tiddler.fields.tags) {\n\t\tvar p = tiddler.fields.tags.indexOf(event.param);\n\t\tif(p !== -1) {\n\t\t\tvar modification = this.wiki.getModificationFields();\n\t\t\tmodification.tags = (tiddler.fields.tags || []).slice(0);\n\t\t\tmodification.tags.splice(p,1);\n\t\t\tif(modification.tags.length === 0) {\n\t\t\t\tmodification.tags = undefined;\n\t\t\t}\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));\n\t\t}\n\t}\n\treturn true;\n};\n\nFieldManglerWidget.prototype.handleAddTagEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle);\n\tif(tiddler &amp;&amp; typeof event.param === \&quot;string\&quot;) {\n\t\tvar tag = event.param.trim();\n\t\tif(tag !== \&quot;\&quot;) {\n\t\t\tvar modification = this.wiki.getModificationFields();\n\t\t\tmodification.tags = (tiddler.fields.tags || []).slice(0);\n\t\t\t$tw.utils.pushTop(modification.tags,tag);\n\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));\t\t\t\n\t\t}\n\t}\n\treturn true;\n};\n\nexports.fieldmangler = FieldManglerWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/fieldmangler.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/fields.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/fields.js\ntype: application/javascript\nmodule-type: widget\n\nFields widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar FieldsWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nFieldsWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nFieldsWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar textNode = this.document.createTextNode(this.text);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nFieldsWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.tiddlerTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\tthis.template = this.getAttribute(\&quot;template\&quot;);\n\tthis.exclude = this.getAttribute(\&quot;exclude\&quot;);\n\tthis.stripTitlePrefix = this.getAttribute(\&quot;stripTitlePrefix\&quot;,\&quot;no\&quot;) === \&quot;yes\&quot;;\n\t// Get the value to display\n\tvar tiddler = this.wiki.getTiddler(this.tiddlerTitle);\n\t// Get the exclusion list\n\tvar exclude;\n\tif(this.exclude) {\n\t\texclude = this.exclude.split(\&quot; \&quot;);\n\t} else {\n\t\texclude = [\&quot;text\&quot;]; \n\t}\n\t// Compose the template\n\tvar text = [];\n\tif(this.template &amp;&amp; tiddler) {\n\t\tvar fields = [];\n\t\tfor(var fieldName in tiddler.fields) {\n\t\t\tif(exclude.indexOf(fieldName) === -1) {\n\t\t\t\tfields.push(fieldName);\n\t\t\t}\n\t\t}\n\t\tfields.sort();\n\t\tfor(var f=0; f&lt;fields.length; f++) {\n\t\t\tfieldName = fields[f];\n\t\t\tif(exclude.indexOf(fieldName) === -1) {\n\t\t\t\tvar row = this.template,\n\t\t\t\t\tvalue = tiddler.getFieldString(fieldName);\n\t\t\t\tif(this.stripTitlePrefix &amp;&amp; fieldName === \&quot;title\&quot;) {\n\t\t\t\t\tvar reStrip = /^\\{[^\\}]+\\}(.+)/mg,\n\t\t\t\t\t\treMatch = reStrip.exec(value);\n\t\t\t\t\tif(reMatch) {\n\t\t\t\t\t\tvalue = reMatch[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trow = row.replace(\&quot;$name$\&quot;,fieldName);\n\t\t\t\trow = row.replace(\&quot;$value$\&quot;,value);\n\t\t\t\trow = row.replace(\&quot;$encoded_value$\&quot;,$tw.utils.htmlEncode(value));\n\t\t\t\ttext.push(row)\n\t\t\t}\n\t\t}\n\t}\n\tthis.text = text.join(\&quot;\&quot;);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nFieldsWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.template || changedAttributes.exclude || changedAttributes.stripTitlePrefix || changedTiddlers[this.tiddlerTitle]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.fields = FieldsWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/fields.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/image.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/image.js\ntype: application/javascript\nmodule-type: widget\n\nThe image widget displays an image referenced with an external URI or with a local tiddler title.\n\n```\n&lt;$image src=\&quot;TiddlerTitle\&quot; width=\&quot;320\&quot; height=\&quot;400\&quot; class=\&quot;classnames\&quot;&gt;\n```\n\nThe image source can be the title of an existing tiddler or the URL of an external image.\n\nExternal images always generate an HTML `&lt;img&gt;` tag.\n\nTiddlers that have a _canonical_uri field generate an HTML `&lt;img&gt;` tag with the src attribute containing the URI.\n\nTiddlers that contain image data generate an HTML `&lt;img&gt;` tag with the src attribute containing a base64 representation of the image.\n\nTiddlers that contain wikitext could be rendered to a DIV of the usual size of a tiddler, and then transformed to the size requested.\n\nThe width and height attributes are interpreted as a number of pixels, and do not need to include the \&quot;px\&quot; suffix.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar ImageWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nImageWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nImageWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\t// Determine what type of image it is\n\tvar tag = \&quot;img\&quot;, src = \&quot;\&quot;,\n\t\ttiddler = this.wiki.getTiddler(this.imageSource);\n\tif(!tiddler) {\n\t\t// The source isn't the title of a tiddler, so we'll assume it's a URL\n\t\tsrc = this.imageSource;\n\t} else {\n\t\t// Check if it is an image tiddler\n\t\tif(this.wiki.isImageTiddler(this.imageSource)) {\n\t\t\tvar type = tiddler.fields.type,\n\t\t\t\ttext = tiddler.fields.text,\n\t\t\t\t_canonical_uri = tiddler.fields._canonical_uri;\n\t\t\t// If the tiddler has body text then it doesn't need to be lazily loaded\n\t\t\tif(text) {\n\t\t\t\t// Render the appropriate element for the image type\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase \&quot;application/pdf\&quot;:\n\t\t\t\t\t\ttag = \&quot;embed\&quot;;\n\t\t\t\t\t\tsrc = \&quot;data:application/pdf;base64,\&quot; + text;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \&quot;image/svg+xml\&quot;:\n\t\t\t\t\t\tsrc = \&quot;data:image/svg+xml,\&quot; + encodeURIComponent(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tsrc = \&quot;data:\&quot; + type + \&quot;;base64,\&quot; + text;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if(_canonical_uri) {\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase \&quot;application/pdf\&quot;:\n\t\t\t\t\t\ttag = \&quot;embed\&quot;;\n\t\t\t\t\t\tsrc = _canonical_uri;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \&quot;image/svg+xml\&quot;:\n\t\t\t\t\t\tsrc = _canonical_uri;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tsrc = _canonical_uri;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}\n\t// Create the element and assign the attributes\n\tvar domNode = this.document.createElement(tag);\n\tdomNode.setAttribute(\&quot;src\&quot;,src);\n\tif(this.imageClass) {\n\t\tdomNode.setAttribute(\&quot;class\&quot;,this.imageClass);\t\t\n\t}\n\tif(this.imageWidth) {\n\t\tdomNode.setAttribute(\&quot;width\&quot;,parseInt(this.imageWidth,10) + \&quot;px\&quot;);\n\t}\n\tif(this.imageHeight) {\n\t\tdomNode.setAttribute(\&quot;height\&quot;,parseInt(this.imageHeight,10) + \&quot;px\&quot;);\n\t}\n\tif(this.imageTooltip) {\n\t\tdomNode.setAttribute(\&quot;title\&quot;,this.imageTooltip);\t\t\n\t}\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nImageWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.imageSource = this.getAttribute(\&quot;source\&quot;);\n\tthis.imageWidth = this.getAttribute(\&quot;width\&quot;);\n\tthis.imageHeight = this.getAttribute(\&quot;height\&quot;);\n\tthis.imageClass = this.getAttribute(\&quot;class\&quot;);\n\tthis.imageTooltip = this.getAttribute(\&quot;tooltip\&quot;);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nImageWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.source || changedAttributes.width || changedAttributes.height || changedAttributes[\&quot;class\&quot;] || changedAttributes.tooltip || changedTiddlers[this.imageSource]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\t\n\t}\n};\n\nexports.image = ImageWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/image.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/importvariables.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/importvariables.js\ntype: application/javascript\nmodule-type: widget\n\nImport variable definitions from other tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar ImportVariablesWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nImportVariablesWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nImportVariablesWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nImportVariablesWidget.prototype.execute = function(tiddlerList) {\n\tvar self = this;\n\t// Get our parameters\n\tthis.filter = this.getAttribute(\&quot;filter\&quot;);\n\t// Compute the filter\n\tthis.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);\n\t// Accumulate the &lt;$set&gt; widgets from each tiddler\n\tvar widgetStackStart,widgetStackEnd;\n\tfunction addWidgetNode(widgetNode) {\n\t\tif(widgetNode) {\n\t\t\tif(!widgetStackStart &amp;&amp; !widgetStackEnd) {\n\t\t\t\twidgetStackStart = widgetNode;\n\t\t\t\twidgetStackEnd = widgetNode;\n\t\t\t} else {\n\t\t\t\twidgetStackEnd.children = [widgetNode];\n\t\t\t\twidgetStackEnd = widgetNode;\n\t\t\t}\n\t\t}\n\t}\n\t$tw.utils.each(this.tiddlerList,function(title) {\n\t\tvar parser = self.wiki.parseTiddler(title);\n\t\tif(parser) {\n\t\t\tvar parseTreeNode = parser.tree[0];\n\t\t\twhile(parseTreeNode &amp;&amp; parseTreeNode.type === \&quot;set\&quot;) {\n\t\t\t\taddWidgetNode({\n\t\t\t\t\ttype: \&quot;set\&quot;,\n\t\t\t\t\tattributes: parseTreeNode.attributes,\n\t\t\t\t\tparams: parseTreeNode.params\n\t\t\t\t});\n\t\t\t\tparseTreeNode = parseTreeNode.children[0];\n\t\t\t}\n\t\t} \n\t});\n\t// Add our own children to the end of the pile\n\tvar parseTreeNodes;\n\tif(widgetStackStart &amp;&amp; widgetStackEnd) {\n\t\tparseTreeNodes = [widgetStackStart];\n\t\twidgetStackEnd.children = this.parseTreeNode.children;\n\t} else {\n\t\tparseTreeNodes = this.parseTreeNode.children;\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(parseTreeNodes);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nImportVariablesWidget.prototype.refresh = function(changedTiddlers) {\n\t// Recompute our attributes and the filter list\n\tvar changedAttributes = this.computeAttributes(),\n\t\ttiddlerList = this.wiki.filterTiddlers(this.getAttribute(\&quot;filter\&quot;),this);\n\t// Refresh if the filter has changed, or the list of tiddlers has changed, or any of the tiddlers in the list has changed\n\tfunction haveListedTiddlersChanged() {\n\t\tvar changed = false;\n\t\ttiddlerList.forEach(function(title) {\n\t\t\tif(changedTiddlers[title]) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t});\n\t\treturn changed;\n\t}\n\tif(changedAttributes.filter || !$tw.utils.isArrayEqual(this.tiddlerList,tiddlerList) || haveListedTiddlersChanged()) {\n\t\t// Compute the filter\n\t\tthis.removeChildDomNodes();\n\t\tthis.execute(tiddlerList);\n\t\tthis.renderChildren(this.parentDomNode,this.findNextSiblingDomNode());\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.importvariables = ImportVariablesWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/importvariables.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/keyboard.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/keyboard.js\ntype: application/javascript\nmodule-type: widget\n\nKeyboard shortcut widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar KeyboardWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nKeyboardWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nKeyboardWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar domNode = this.document.createElement(\&quot;div\&quot;);\n\t// Assign classes\n\tvar classes = (this[\&quot;class\&quot;] || \&quot;\&quot;).split(\&quot; \&quot;);\n\tclasses.push(\&quot;tw-keyboard\&quot;);\n\tdomNode.className = classes.join(\&quot; \&quot;);\n\t// Add a keyboard event handler\n\tdomNode.addEventListener(\&quot;keydown\&quot;,function (event) {\n\t\tif(event.keyCode === self.keyInfo.keyCode &amp;&amp; \n\t\t\tevent.shiftKey === self.keyInfo.shiftKey &amp;&amp; \n\t\t\tevent.altKey === self.keyInfo.altKey &amp;&amp; \n\t\t\tevent.ctrlKey === self.keyInfo.ctrlKey) {\n\t\t\tself.dispatchMessage(event);\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nKeyboardWidget.prototype.dispatchMessage = function(event) {\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\&quot;currentTiddler\&quot;)});\n};\n\n/*\nCompute the internal state of the widget\n*/\nKeyboardWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.message = this.getAttribute(\&quot;message\&quot;);\n\tthis.param = this.getAttribute(\&quot;param\&quot;);\n\tthis.key = this.getAttribute(\&quot;key\&quot;);\n\tthis.keyInfo = $tw.utils.parseKeyDescriptor(this.key);\n\tthis[\&quot;class\&quot;] = this.getAttribute(\&quot;class\&quot;);\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nKeyboardWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.message || changedAttributes.param || changedAttributes.key || changedAttributes[\&quot;class\&quot;]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.keyboard = KeyboardWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/keyboard.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/link.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/link.js\ntype: application/javascript\nmodule-type: widget\n\nLink widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar LinkWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nLinkWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nLinkWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Get the value of the tw-wikilinks configuration macro\n\tvar wikiLinksMacro = this.getVariable(\&quot;tw-wikilinks\&quot;),\n\t\tuseWikiLinks = wikiLinksMacro ? !(wikiLinksMacro.trim() === \&quot;no\&quot;) : true;\n\t// Render the link if required\n\tif(useWikiLinks) {\n\t\tthis.renderLink(parent,nextSibling);\n\t} else {\n\t\t// Just insert the link text\n\t\tvar domNode = this.document.createElement(\&quot;span\&quot;);\n\t\tparent.insertBefore(domNode,nextSibling);\n\t\tthis.renderChildren(domNode,null);\n\t\tthis.domNodes.push(domNode);\n\t}\n};\n\n/*\nRender this widget into the DOM\n*/\nLinkWidget.prototype.renderLink = function(parent,nextSibling) {\n\tvar self = this;\n\t// Create our element\n\tvar domNode = this.document.createElement(\&quot;a\&quot;);\n\t// Assign classes\n\tvar classes = [\&quot;tw-tiddlylink\&quot;];\n\tif(this.isShadow) {\n\t\tclasses.push(\&quot;tw-tiddlylink-shadow\&quot;);\n\t}\n\tif(this.isMissing &amp;&amp; !this.isShadow) {\n\t\tclasses.push(\&quot;tw-tiddlylink-missing\&quot;);\n\t} else {\n\t\tif(!this.isMissing) {\n\t\t\tclasses.push(\&quot;tw-tiddlylink-resolves\&quot;);\n\t\t}\n\t}\n\tdomNode.setAttribute(\&quot;class\&quot;,classes.join(\&quot; \&quot;));\n\t// Set an href\n\tvar wikiLinkTemplateMacro = this.getVariable(\&quot;tw-wikilink-template\&quot;),\n\t\twikiLinkTemplate = wikiLinkTemplateMacro ? wikiLinkTemplateMacro.trim() : \&quot;#$uri_encoded$\&quot;,\n\t\twikiLinkText = wikiLinkTemplate.replace(\&quot;$uri_encoded$\&quot;,encodeURIComponent(this.to));\n\twikiLinkText = wikiLinkText.replace(\&quot;$uri_doubleencoded$\&quot;,encodeURIComponent(encodeURIComponent(this.to)));\n\tdomNode.setAttribute(\&quot;href\&quot;,wikiLinkText);\n\t// Set the tooltip\n\t// HACK: Performance issues with re-parsing the tooltip prevent us defaulting the tooltip to \&quot;&lt;$transclude field='tooltip'&gt;&lt;$transclude field='title'/&gt;&lt;/$transclude&gt;\&quot;\n\tvar tooltipWikiText = this.tooltip || this.getVariable(\&quot;tw-wikilink-tooltip\&quot;);\n\tif(tooltipWikiText) {\n\t\tvar tooltipText = this.wiki.renderText(\&quot;text/plain\&quot;,\&quot;text/vnd.tiddlywiki\&quot;,tooltipWikiText,{\n\t\t\t\tparseAsInline: true,\n\t\t\t\tvariables: {\n\t\t\t\t\tcurrentTiddler: this.to\n\t\t\t\t},\n\t\t\t\tparentWidget: this\n\t\t\t});\n\t\tdomNode.setAttribute(\&quot;title\&quot;,tooltipText);\n\t}\n\tif(this[\&quot;aria-label\&quot;]) {\n\t\tdomNode.setAttribute(\&quot;aria-label\&quot;,this[\&quot;aria-label\&quot;]);\n\t}\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \&quot;click\&quot;, handlerObject: this, handlerMethod: \&quot;handleClickEvent\&quot;},\n\t\t{name: \&quot;dragstart\&quot;, handlerObject: this, handlerMethod: \&quot;handleDragStartEvent\&quot;},\n\t\t{name: \&quot;dragend\&quot;, handlerObject: this, handlerMethod: \&quot;handleDragEndEvent\&quot;}\n\t]);\n\t// Insert the link into the DOM and render any children\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nLinkWidget.prototype.handleClickEvent = function (event) {\n\t// Send the click on it's way as a navigate event\n\tvar bounds = this.domNodes[0].getBoundingClientRect();\n\tthis.dispatchEvent({\n\t\ttype: \&quot;tw-navigate\&quot;,\n\t\tnavigateTo: this.to,\n\t\tnavigateFromTitle: this.getVariable(\&quot;storyTiddler\&quot;),\n\t\tnavigateFromNode: this,\n\t\tnavigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\n\t\t},\n\t\tnavigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1)\n\t});\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nLinkWidget.prototype.handleDragStartEvent = function(event) {\n\tif(this.to) {\n\t\t// Set the dragging class on the element being dragged\n\t\t$tw.utils.addClass(event.target,\&quot;tw-tiddlylink-dragging\&quot;);\n\t\t// Create the drag image elements\n\t\tthis.dragImage = this.document.createElement(\&quot;div\&quot;);\n\t\tthis.dragImage.className = \&quot;tw-tiddler-dragger\&quot;;\n\t\tvar inner = this.document.createElement(\&quot;div\&quot;);\n\t\tinner.className = \&quot;tw-tiddler-dragger-inner\&quot;;\n\t\tinner.appendChild(this.document.createTextNode(this.to));\n\t\tthis.dragImage.appendChild(inner);\n\t\tthis.document.body.appendChild(this.dragImage);\n\t\t// Astoundingly, we need to cover the dragger up: http://www.kryogenix.org/code/browser/custom-drag-image.html\n\t\tvar cover = this.document.createElement(\&quot;div\&quot;);\n\t\tcover.className = \&quot;tw-tiddler-dragger-cover\&quot;;\n\t\tcover.style.left = (inner.offsetLeft - 16) + \&quot;px\&quot;;\n\t\tcover.style.top = (inner.offsetTop - 16) + \&quot;px\&quot;;\n\t\tcover.style.width = (inner.offsetWidth + 32) + \&quot;px\&quot;;\n\t\tcover.style.height = (inner.offsetHeight + 32) + \&quot;px\&quot;;\n\t\tthis.dragImage.appendChild(cover);\n\t\t// Set the data transfer properties\n\t\tvar dataTransfer = event.dataTransfer;\n\t\t// First the image\n\t\tdataTransfer.effectAllowed = \&quot;copy\&quot;;\n\t\tif(dataTransfer.setDragImage) {\n\t\t\tdataTransfer.setDragImage(this.dragImage.firstChild,-16,-16);\n\t\t}\n\t\t// Then the data\n\t\tdataTransfer.clearData();\n\t\tvar jsonData = this.wiki.getTiddlerAsJson(this.to),\n\t\t\ttextData = this.wiki.getTiddlerText(this.to,\&quot;\&quot;);\n\t\t// IE doesn't like these content types\n\t\tif(!$tw.browser.isIE) {\n\t\t\tdataTransfer.setData(\&quot;text/vnd.tiddler\&quot;,jsonData);\n\t\t\tdataTransfer.setData(\&quot;text/plain\&quot;,textData);\n\t\t\tdataTransfer.setData(\&quot;text/x-moz-url\&quot;,\&quot;data:text/vnd.tiddler,\&quot; + encodeURI(jsonData));\n\t\t}\n\t\tdataTransfer.setData(\&quot;URL\&quot;,\&quot;data:text/vnd.tiddler,\&quot; + encodeURI(jsonData));\n\t\tdataTransfer.setData(\&quot;Text\&quot;,textData);\n\t\tevent.stopPropagation();\n\t} else {\n\t\tevent.preventDefault();\n\t}\n};\n\nLinkWidget.prototype.handleDragEndEvent = function(event) {\n\t// Remove the dragging class on the element being dragged\n\t$tw.utils.removeClass(event.target,\&quot;tw-tiddlylink-dragging\&quot;);\n\t// Delete the drag image element\n\tif(this.dragImage) {\n\t\tthis.dragImage.parentNode.removeChild(this.dragImage);\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nLinkWidget.prototype.execute = function() {\n\t// Get the target tiddler title\n\tthis.to = this.getAttribute(\&quot;to\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\t// Get the link title and aria label\n\tthis.tooltip = this.getAttribute(\&quot;tooltip\&quot;);\n\tthis[\&quot;aria-label\&quot;] = this.getAttribute(\&quot;aria-label\&quot;);\n\t// Determine the link characteristics\n\tthis.isMissing = !this.wiki.tiddlerExists(this.to);\n\tthis.isShadow = this.wiki.isShadowTiddler(this.to);\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nLinkWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.to || changedTiddlers[this.to] || changedAttributes[\&quot;aria-label\&quot;] || changedAttributes.tooltip) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.link = LinkWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/link.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/linkcatcher.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/linkcatcher.js\ntype: application/javascript\nmodule-type: widget\n\nLinkcatcher widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar LinkCatcherWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.addEventListeners([\n\t\t{type: \&quot;tw-navigate\&quot;, handler: \&quot;handleNavigateEvent\&quot;}\n\t]);\n};\n\n/*\nInherit from the base widget class\n*/\nLinkCatcherWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nLinkCatcherWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nLinkCatcherWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.catchTo = this.getAttribute(\&quot;to\&quot;);\n\tthis.catchMessage = this.getAttribute(\&quot;message\&quot;);\n\tthis.catchSet = this.getAttribute(\&quot;set\&quot;);\n\tthis.catchSetTo = this.getAttribute(\&quot;setTo\&quot;);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nLinkCatcherWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.to || changedAttributes.message || changedAttributes.set || changedAttributes.setTo) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\n/*\nHandle a tw-navigate event\n*/\nLinkCatcherWidget.prototype.handleNavigateEvent = function(event) {\n\tif(this.catchTo) {\n\t\tthis.wiki.setTextReference(this.catchTo,event.navigateTo,this.getVariable(\&quot;currentTiddler\&quot;));\n\t}\n\tif(this.catchMessage &amp;&amp; this.parentWidget) {\n\t\tthis.parentWidget.dispatchEvent({\n\t\t\ttype: this.catchMessage,\n\t\t\tparam: event.navigateTo,\n\t\t\tnavigateTo: event.navigateTo\n\t\t});\n\t}\n\tif(this.catchSet) {\n\t\tvar tiddler = this.wiki.getTiddler(this.catchSet);\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));\n\t}\n\treturn false;\n};\n\nexports.linkcatcher = LinkCatcherWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/linkcatcher.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/list.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/list.js\ntype: application/javascript\nmodule-type: widget\n\nList and list item widgets\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\n/*\nThe list widget creates list element sub-widgets that reach back into the list widget for their configuration\n*/\n\nvar ListWidget = function(parseTreeNode,options) {\n\t// Initialise the storyviews if they've not been done already\n\tif(!this.storyViews) {\n\t\tListWidget.prototype.storyViews = {};\n\t\t$tw.modules.applyMethods(\&quot;storyview\&quot;,this.storyViews);\n\t}\n\t// Main initialisation inherited from widget.js\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nListWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nListWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n\t// Construct the storyview\n\tvar StoryView = this.storyViews[this.storyViewName];\n\tif(StoryView &amp;&amp; !this.document.isTiddlyWikiFakeDom) {\n\t\tthis.storyview = new StoryView(this)\n\t} else {\n\t\tthis.storyview = null;\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nListWidget.prototype.execute = function() {\n\t// Get our attributes\n\tthis.template = this.getAttribute(\&quot;template\&quot;);\n\tthis.editTemplate = this.getAttribute(\&quot;editTemplate\&quot;);\n\tthis.variableName = this.getAttribute(\&quot;variable\&quot;,\&quot;currentTiddler\&quot;);\n\tthis.storyViewName = this.getAttribute(\&quot;storyview\&quot;);\n\tthis.historyTitle = this.getAttribute(\&quot;history\&quot;);\n\t// Compose the list elements\n\tthis.list = this.getTiddlerList();\n\tvar members = [],\n\t\tself = this;\n\t// Check for an empty list\n\tif(this.list.length === 0) {\n\t\tmembers = this.getEmptyMessage();\n\t} else {\n\t\t$tw.utils.each(this.list,function(title,index) {\n\t\t\tmembers.push(self.makeItemTemplate(title));\n\t\t});\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(members);\n\t// Clear the last history\n\tthis.history = [];\n};\n\nListWidget.prototype.getTiddlerList = function() {\n\tvar defaultFilter = \&quot;[!is[system]sort[title]]\&quot;;\n\treturn this.wiki.filterTiddlers(this.getAttribute(\&quot;filter\&quot;,defaultFilter),this);\n};\n\nListWidget.prototype.getEmptyMessage = function() {\n\tvar emptyMessage = this.getAttribute(\&quot;emptyMessage\&quot;,\&quot;\&quot;),\n\t\tparser = this.wiki.parseText(\&quot;text/vnd.tiddlywiki\&quot;,emptyMessage,{parseAsInline: true});\n\tif(parser) {\n\t\treturn parser.tree;\n\t} else {\n\t\treturn [];\n\t}\n};\n\n/*\nCompose the template for a list item\n*/\nListWidget.prototype.makeItemTemplate = function(title) {\n\t// Check if the tiddler is a draft\n\tvar tiddler = this.wiki.getTiddler(title),\n\t\tisDraft = tiddler &amp;&amp; tiddler.hasField(\&quot;draft.of\&quot;),\n\t\ttemplate = this.template,\n\t\ttemplateTree;\n\tif(isDraft &amp;&amp; this.editTemplate) {\n\t\ttemplate = this.editTemplate;\n\t}\n\t// Compose the transclusion of the template\n\tif(template) {\n\t\ttemplateTree = [{type: \&quot;transclude\&quot;, attributes: {tiddler: {type: \&quot;string\&quot;, value: template}}}];\n\t} else {\n\t\tif(this.parseTreeNode.children &amp;&amp; this.parseTreeNode.children.length &gt; 0) {\n\t\t\ttemplateTree = this.parseTreeNode.children;\n\t\t} else {\n\t\t\t// Default template is a link to the title\n\t\t\ttemplateTree = [{type: \&quot;element\&quot;, tag: this.parseTreeNode.isBlock ? \&quot;div\&quot; : \&quot;span\&quot;, children: [{type: \&quot;link\&quot;, attributes: {to: {type: \&quot;string\&quot;, value: title}}, children: [\n\t\t\t\t\t{type: \&quot;text\&quot;, text: title}\n\t\t\t]}]}];\n\t\t}\n\t}\n\t// Return the list item\n\treturn {type: \&quot;listitem\&quot;, itemTitle: title, variableName: this.variableName, children: templateTree};\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nListWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// Completely refresh if any of our attributes have changed\n\tif(changedAttributes.filter || changedAttributes.template || changedAttributes.editTemplate || changedAttributes.emptyMessage || changedAttributes.storyview || changedAttributes.history) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\t// Handle any changes to the list\n\t\tvar hasChanged = this.handleListChanges(changedTiddlers);\n\t\t// Handle any changes to the history stack\n\t\tif(this.historyTitle &amp;&amp; changedTiddlers[this.historyTitle]) {\n\t\t\tthis.handleHistoryChanges();\n\t\t}\n\t\treturn hasChanged;\n\t}\n};\n\n/*\nHandle any changes to the history list\n*/\nListWidget.prototype.handleHistoryChanges = function() {\n\t// Get the history data\n\tvar newHistory = this.wiki.getTiddlerData(this.historyTitle,[]);\n\t// Ignore any entries of the history that match the previous history\n\tvar entry = 0;\n\twhile(entry &lt; newHistory.length &amp;&amp; entry &lt; this.history.length &amp;&amp; newHistory[entry].title === this.history[entry].title) {\n\t\tentry++;\n\t}\n\t// Navigate forwards to each of the new tiddlers\n\twhile(entry &lt; newHistory.length) {\n\t\tif(this.storyview &amp;&amp; this.storyview.navigateTo) {\n\t\t\tthis.storyview.navigateTo(newHistory[entry]);\n\t\t}\n\t\tentry++;\n\t}\n\t// Update the history\n\tthis.history = newHistory;\n};\n\n/*\nProcess any changes to the list\n*/\nListWidget.prototype.handleListChanges = function(changedTiddlers) {\n\t// Get the new list\n\tvar prevList = this.list;\n\tthis.list = this.getTiddlerList();\n\t// Check for an empty list\n\tif(this.list.length === 0) {\n\t\t// Check if it was empty before\n\t\tif(prevList.length === 0) {\n\t\t\t// If so, just refresh the empty message\n\t\t\treturn this.refreshChildren(changedTiddlers);\n\t\t} else {\n\t\t\t// Replace the previous content with the empty message\n\t\t\tfor(t=this.children.length-1; t&gt;=0; t--) {\n\t\t\t\tthis.removeListItem(t);\n\t\t\t}\n\t\t\tvar nextSibling = this.findNextSiblingDomNode();\n\t\t\tthis.makeChildWidgets(this.getEmptyMessage());\n\t\t\tthis.renderChildren(this.parentDomNode,nextSibling);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\t// If the list was empty then we need to remove the empty message\n\t\tif(prevList.length === 0) {\n\t\t\tthis.removeChildDomNodes();\n\t\t\tthis.children = [];\n\t\t}\n\t\t// Cycle through the list, inserting and removing list items as needed\n\t\tvar hasRefreshed = false;\n\t\tfor(var t=0; t&lt;this.list.length; t++) {\n\t\t\tvar index = this.findListItem(t,this.list[t]);\n\t\t\tif(index === undefined) {\n\t\t\t\t// The list item must be inserted\n\t\t\t\tthis.insertListItem(t,this.list[t]);\n\t\t\t\thasRefreshed = true;\n\t\t\t} else {\n\t\t\t\t// There are intervening list items that must be removed\n\t\t\t\tfor(var n=index-1; n&gt;=t; n--) {\n\t\t\t\t\tthis.removeListItem(n);\n\t\t\t\t\thasRefreshed = true;\n\t\t\t\t}\n\t\t\t\t// Refresh the item we're reusing\n\t\t\t\tvar refreshed = this.children[t].refresh(changedTiddlers);\n\t\t\t\thasRefreshed = hasRefreshed || refreshed;\n\t\t\t}\n\t\t}\n\t\t// Remove any left over items\n\t\tfor(t=this.children.length-1; t&gt;=this.list.length; t--) {\n\t\t\tthis.removeListItem(t);\n\t\t\thasRefreshed = true;\n\t\t}\n\t\treturn hasRefreshed;\n\t}\n};\n\n/*\nFind the list item with a given title, starting from a specified position\n*/\nListWidget.prototype.findListItem = function(startIndex,title) {\n\twhile(startIndex &lt; this.children.length) {\n\t\tif(this.children[startIndex].parseTreeNode.itemTitle === title) {\n\t\t\treturn startIndex;\n\t\t}\n\t\tstartIndex++;\n\t}\n\treturn undefined;\n};\n\n/*\nInsert a new list item at the specified index\n*/\nListWidget.prototype.insertListItem = function(index,title) {\n\t// Create, insert and render the new child widgets\n\tvar widget = this.makeChildWidget(this.makeItemTemplate(title));\n\twidget.parentDomNode = this.parentDomNode; // Hack to enable findNextSiblingDomNode() to work\n\tthis.children.splice(index,0,widget);\n\tvar nextSibling = widget.findNextSiblingDomNode();\n\twidget.render(this.parentDomNode,nextSibling);\n\t// Animate the insertion if required\n\tif(this.storyview &amp;&amp; this.storyview.insert) {\n\t\tthis.storyview.insert(widget);\n\t}\n\treturn true;\n};\n\n/*\nRemove the specified list item\n*/\nListWidget.prototype.removeListItem = function(index) {\n\tvar widget = this.children[index];\n\t// Animate the removal if required\n\tif(this.storyview &amp;&amp; this.storyview.remove) {\n\t\tthis.storyview.remove(widget);\n\t} else {\n\t\twidget.removeChildDomNodes();\n\t}\n\t// Remove the child widget\n\tthis.children.splice(index,1);\n};\n\nexports.list = ListWidget;\n\nvar ListItemWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nListItemWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nListItemWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nListItemWidget.prototype.execute = function() {\n\t// Set the current list item title\n\tthis.setVariable(this.parseTreeNode.variableName,this.parseTreeNode.itemTitle);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nListItemWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.listitem = ListItemWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/list.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/macrocall.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/macrocall.js\ntype: application/javascript\nmodule-type: widget\n\nMacrocall widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar MacroCallWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nMacroCallWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nMacroCallWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nMacroCallWidget.prototype.execute = function() {\n\t// Get the parse type if specified\n\tthis.parseType = this.getAttribute(\&quot;$type\&quot;,\&quot;text/vnd.tiddlywiki\&quot;);\n\tthis.renderOutput = this.getAttribute(\&quot;$output\&quot;,\&quot;text/html\&quot;);\n\t// Merge together the parameters specified in the parse tree with the specified attributes\n\tvar params = this.parseTreeNode.params ? this.parseTreeNode.params.slice(0) : [];\n\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\tif(name.charAt(0) !== \&quot;$\&quot;) {\n\t\t\tparams.push({name: name, value: attribute});\t\t\t\n\t\t}\n\t});\n\t// Get the macro value\n\tvar text = this.getVariable(this.parseTreeNode.name || this.getAttribute(\&quot;$name\&quot;),{params: params}),\n\t\tparseTreeNodes;\n\t// Are we rendering to HTML?\n\tif(this.renderOutput === \&quot;text/html\&quot;) {\n\t\t// If so we'll return the parsed macro\n\t\tvar parser = this.wiki.parseText(this.parseType,text,\n\t\t\t\t\t\t\t{parseAsInline: !this.parseTreeNode.isBlock});\n\t\tparseTreeNodes = parser ? parser.tree : [];\n\t} else {\n\t\t// Otherwise, we'll render the text\n\t\tvar plainText = this.wiki.renderText(\&quot;text/plain\&quot;,this.parseType,text,{parentWidget: this});\n\t\tparseTreeNodes = [{type: \&quot;text\&quot;, text: plainText}];\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(parseTreeNodes);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nMacroCallWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif($tw.utils.count(changedAttributes) &gt; 0) {\n\t\t// Rerender ourselves\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports.macrocall = MacroCallWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/macrocall.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/navigator.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/navigator.js\ntype: application/javascript\nmodule-type: widget\n\nNavigator widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar NavigatorWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.addEventListeners([\n\t\t{type: \&quot;tw-navigate\&quot;, handler: \&quot;handleNavigateEvent\&quot;},\n\t\t{type: \&quot;tw-edit-tiddler\&quot;, handler: \&quot;handleEditTiddlerEvent\&quot;},\n\t\t{type: \&quot;tw-delete-tiddler\&quot;, handler: \&quot;handleDeleteTiddlerEvent\&quot;},\n\t\t{type: \&quot;tw-save-tiddler\&quot;, handler: \&quot;handleSaveTiddlerEvent\&quot;},\n\t\t{type: \&quot;tw-cancel-tiddler\&quot;, handler: \&quot;handleCancelTiddlerEvent\&quot;},\n\t\t{type: \&quot;tw-close-tiddler\&quot;, handler: \&quot;handleCloseTiddlerEvent\&quot;},\n\t\t{type: \&quot;tw-close-all-tiddlers\&quot;, handler: \&quot;handleCloseAllTiddlersEvent\&quot;},\n\t\t{type: \&quot;tw-close-other-tiddlers\&quot;, handler: \&quot;handleCloseOtherTiddlersEvent\&quot;},\n\t\t{type: \&quot;tw-new-tiddler\&quot;, handler: \&quot;handleNewTiddlerEvent\&quot;},\n\t\t{type: \&quot;tw-import-tiddlers\&quot;, handler: \&quot;handleImportTiddlersEvent\&quot;}\n\t]);\n};\n\n/*\nInherit from the base widget class\n*/\nNavigatorWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nNavigatorWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nNavigatorWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.storyTitle = this.getAttribute(\&quot;story\&quot;);\n\tthis.historyTitle = this.getAttribute(\&quot;history\&quot;);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nNavigatorWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.story || changedAttributes.history) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nNavigatorWidget.prototype.getStoryList = function() {\n\treturn this.storyTitle ? this.wiki.getTiddlerList(this.storyTitle) : null;\n};\n\nNavigatorWidget.prototype.saveStoryList = function(storyList) {\n\tvar storyTiddler = this.wiki.getTiddler(this.storyTitle);\n\tthis.wiki.addTiddler(new $tw.Tiddler(\n\t\t{title: this.storyTitle},\n\t\tstoryTiddler,\n\t\t{list: storyList}\n\t));\n};\n\nNavigatorWidget.prototype.findTitleInStory = function(storyList,title,defaultIndex) {\n\tvar p = storyList.indexOf(title);\n\treturn p === -1 ? defaultIndex : p;\n};\n\nNavigatorWidget.prototype.removeTitleFromStory = function(storyList,title) {\n\tvar p = storyList.indexOf(title);\n\twhile(p !== -1) {\n\t\tstoryList.splice(p,1);\n\t\tp = storyList.indexOf(title);\n\t}\n};\n\nNavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle,newTitle) {\n\tvar pos = storyList.indexOf(oldTitle);\n\tif(pos !== -1) {\n\t\tstoryList[pos] = newTitle;\n\t\tdo {\n\t\t\tpos = storyList.indexOf(oldTitle,pos + 1);\n\t\t\tif(pos !== -1) {\n\t\t\t\tstoryList.splice(pos,1);\n\t\t\t}\n\t\t} while(pos !== -1);\n\t} else {\n\t\tstoryList.splice(0,0,newTitle);\n\t}\n};\n\nNavigatorWidget.prototype.addToStory = function(title,fromTitle) {\n\tvar storyList = this.getStoryList();\n\tif(storyList) {\n\t\t// See if the tiddler is already there\n\t\tvar slot = this.findTitleInStory(storyList,title,-1);\n\t\t// If not we need to add it\n\t\tif(slot === -1) {\n\t\t\t// First we try to find the position of the story element we navigated from\n\t\t\tslot = this.findTitleInStory(storyList,fromTitle,-1) + 1;\n\t\t\t// Add the tiddler\n\t\t\tstoryList.splice(slot,0,title);\n\t\t\t// Save the story\n\t\t\tthis.saveStoryList(storyList);\n\t\t}\n\t}\n};\n\n/*\nAdd a new record to the top of the history stack\ntitle: a title string or an array of title strings\nfromPageRect: page coordinates of the origin of the navigation\n*/\nNavigatorWidget.prototype.addToHistory = function(title,fromPageRect) {\n\tthis.wiki.addToHistory(title,fromPageRect,this.historyTitle);\n};\n\n/*\nHandle a tw-navigate event\n*/\nNavigatorWidget.prototype.handleNavigateEvent = function(event) {\n\tthis.addToStory(event.navigateTo,event.navigateFromTitle);\n\tif(!event.navigateSuppressNavigation) {\n\t\tthis.addToHistory(event.navigateTo,event.navigateFromClientRect);\n\t}\n\treturn false;\n};\n\n// Close a specified tiddler\nNavigatorWidget.prototype.handleCloseTiddlerEvent = function(event) {\n\tvar title = event.param || event.tiddlerTitle,\n\t\tstoryList = this.getStoryList();\n\t// Look for tiddlers with this title to close\n\tthis.removeTitleFromStory(storyList,title);\n\tthis.saveStoryList(storyList);\n\treturn false;\n};\n\n// Close all tiddlers\nNavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) {\n\tthis.saveStoryList([]);\n\treturn false;\n};\n\n// Close other tiddlers\nNavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {\n\tvar title = event.param || event.tiddlerTitle;\n\tthis.saveStoryList([title]);\n\treturn false;\n};\n\n// Place a tiddler in edit mode\nNavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {\n\tvar self = this;\n\tfunction isUnmodifiedShadow(title) {\n\t\t// jshint eqnull:true\n\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\treturn (\n\t\t\tself.wiki.isShadowTiddler(title) &amp;&amp;\n\t\t\ttiddler.fields.modified == null\n\t\t);\n\t}\n\tfunction confirmEditShadow(title) {\n\t\treturn confirm($tw.language.getString(\n\t\t\t\&quot;ConfirmEditShadowTiddler\&quot;,\n\t\t\t{variables:\n\t\t\t\t{title: title}\n\t\t\t}\n\t\t));\n\t}\n\tvar title = event.param || event.tiddlerTitle;\n\tif(isUnmodifiedShadow(title) &amp;&amp; !confirmEditShadow(title)) {\n\t\treturn false;\n\t}\n\t// Replace the specified tiddler with a draft in edit mode\n\tvar draftTiddler = this.makeDraftTiddler(title),\n\t\tdraftTitle = draftTiddler.fields.title,\n\t\tstoryList = this.getStoryList();\n\tthis.removeTitleFromStory(storyList,draftTitle);\n\tthis.replaceFirstTitleInStory(storyList,title,draftTitle);\n\tthis.addToHistory(draftTitle,event.navigateFromClientRect);\n\tthis.saveStoryList(storyList);\n\treturn false;\n};\n\n// Delete a tiddler\nNavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {\n\t// Get the tiddler we're deleting\n\tvar title = event.param || event.tiddlerTitle,\n\t\ttiddler = this.wiki.getTiddler(title),\n\t\tstoryList = this.getStoryList(),\n\t\toriginalTitle, confirmationTitle;\n\t// Check if the tiddler we're deleting is in draft mode\n\tif(tiddler.hasField(\&quot;draft.title\&quot;)) {\n\t\t// If so, we'll prompt for confirmation referencing the original tiddler\n\t\toriginalTitle = tiddler.fields[\&quot;draft.of\&quot;];\n\t\tconfirmationTitle = originalTitle;\n\t} else {\n\t\t// If not a draft, then prompt for confirmation referencing the specified tiddler\n\t\toriginalTitle = null;\n\t\tconfirmationTitle = title;\n\t}\n\t// Seek confirmation\n\tif(!confirm($tw.language.getString(\n\t\t\t\t\&quot;ConfirmDeleteTiddler\&quot;,\n\t\t\t\t{variables:\n\t\t\t\t\t{title: confirmationTitle}\n\t\t\t\t}\n\t\t\t))) {\n\t\treturn false;\n\t}\n\t// Delete the original tiddler\n\tif(originalTitle) {\n\t\tthis.wiki.deleteTiddler(originalTitle);\n\t\tthis.removeTitleFromStory(storyList,originalTitle);\n\t}\n\t// Delete this tiddler\n\tthis.wiki.deleteTiddler(title);\n\t// Remove the closed tiddler from the story\n\tthis.removeTitleFromStory(storyList,title);\n\tthis.saveStoryList(storyList);\n\t// Send a notification event\n\tthis.dispatchEvent({type: \&quot;tw-auto-save-wiki\&quot;});\n\treturn false;\n};\n\n/*\nCreate/reuse the draft tiddler for a given title\n*/\nNavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {\n\t// See if there is already a draft tiddler for this tiddler\n\tvar drafts = [];\n\tthis.wiki.forEachTiddler({includeSystem: true},function(title,tiddler) {\n\t\tif(tiddler.fields[\&quot;draft.title\&quot;] &amp;&amp; tiddler.fields[\&quot;draft.of\&quot;] === targetTitle) {\n\t\t\tdrafts.push(tiddler);\n\t\t}\n\t});\n\tif(drafts.length &gt; 0) {\n\t\treturn drafts[0];\n\t}\n\t// Get the current value of the tiddler we're editing\n\tvar tiddler = this.wiki.getTiddler(targetTitle),\n\t\tdraftTitle = this.generateDraftTitle(targetTitle);\n\t// Save the initial value of the draft tiddler\n\tvar draftTiddler = new $tw.Tiddler(\n\t\t\ttiddler,\n\t\t\t{\n\t\t\t\ttitle: draftTitle,\n\t\t\t\t\&quot;draft.title\&quot;: targetTitle,\n\t\t\t\t\&quot;draft.of\&quot;: targetTitle\n\t\t\t},\n\t\t\tthis.wiki.getModificationFields()\n\t\t);\n\tthis.wiki.addTiddler(draftTiddler);\n\treturn draftTiddler;\n};\n\n/*\nGenerate a title for the draft of a given tiddler\n*/\nNavigatorWidget.prototype.generateDraftTitle = function(title) {\n\tvar c = 0;\n\tdo {\n\t\tvar draftTitle = \&quot;Draft \&quot; + (c ? (c + 1) + \&quot; \&quot; : \&quot;\&quot;) + \&quot;of '\&quot; + title + \&quot;'\&quot;;\n\t\tc++;\n\t} while(this.wiki.tiddlerExists(draftTitle));\n\treturn draftTitle;\n};\n\n// Take a tiddler out of edit mode, saving the changes\nNavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {\n\tvar title = event.param || event.tiddlerTitle,\n\t\ttiddler = this.wiki.getTiddler(title),\n\t\tstoryList = this.getStoryList();\n\t// Replace the original tiddler with the draft\n\tif(tiddler) {\n\t\tvar draftTitle = (tiddler.fields[\&quot;draft.title\&quot;] || \&quot;\&quot;).trim(),\n\t\t\tdraftOf = (tiddler.fields[\&quot;draft.of\&quot;] || \&quot;\&quot;).trim();\n\t\tif(draftTitle) {\n\t\t\tvar isRename = draftOf !== draftTitle,\n\t\t\t\tisConfirmed = true;\n\t\t\tif(isRename &amp;&amp; this.wiki.tiddlerExists(draftTitle)) {\n\t\t\t\tisConfirmed = confirm($tw.language.getString(\n\t\t\t\t\t\&quot;ConfirmOverwriteTiddler\&quot;,\n\t\t\t\t\t{variables:\n\t\t\t\t\t\t{title: draftTitle}\n\t\t\t\t\t}\n\t\t\t\t));\n\t\t\t}\n\t\t\tif(!isRename &amp;&amp; !this.wiki.isDraftModified(title)) {\n\t\t\t\tevent.type = \&quot;tw-cancel-tiddler\&quot;;\n\t\t\t\tthis.dispatchEvent(event);\n\t\t\t} else if(isConfirmed) {\n\t\t\t\t// Save the draft tiddler as the real tiddler\n\t\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{\n\t\t\t\t\ttitle: draftTitle,\n\t\t\t\t\t\&quot;draft.title\&quot;: undefined,\n\t\t\t\t\t\&quot;draft.of\&quot;: undefined\n\t\t\t\t},this.wiki.getModificationFields()));\n\t\t\t\t// Remove the draft tiddler\n\t\t\t\tthis.wiki.deleteTiddler(title);\n\t\t\t\t// Remove the original tiddler if we're renaming it\n\t\t\t\tif(isRename) {\n\t\t\t\t\tthis.wiki.deleteTiddler(draftOf);\n\t\t\t\t}\n\t\t\t\t// Replace the draft in the story with the original\n\t\t\t\tthis.replaceFirstTitleInStory(storyList,title,draftTitle);\n\t\t\t\tthis.addToHistory(draftTitle,event.navigateFromClientRect);\n\t\t\t\tif(draftTitle !== this.storyTitle) {\n\t\t\t\t\tthis.saveStoryList(storyList);\n\t\t\t\t}\n\t\t\t\t// Send a notification event\n\t\t\t\tthis.dispatchEvent({type: \&quot;tw-auto-save-wiki\&quot;});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n\n// Take a tiddler out of edit mode without saving the changes\nNavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {\n\t// Flip the specified tiddler from draft back to the original\n\tvar draftTitle = event.param || event.tiddlerTitle,\n\t\tdraftTiddler = this.wiki.getTiddler(draftTitle),\n\t\toriginalTitle = draftTiddler.fields[\&quot;draft.of\&quot;],\n\t\tstoryList = this.getStoryList();\n\tif(draftTiddler &amp;&amp; originalTitle) {\n\t\t// Ask for confirmation if the tiddler text has changed\n\t\tvar isConfirmed = true;\n\t\tif(this.wiki.getTiddlerText(draftTitle) !== this.wiki.getTiddlerText(originalTitle)) {\n\t\t\tisConfirmed = confirm($tw.language.getString(\n\t\t\t\t\&quot;ConfirmCancelTiddler\&quot;,\n\t\t\t\t{variables:\n\t\t\t\t\t{title: draftTitle}\n\t\t\t\t}\n\t\t\t));\n\t\t}\n\t\t// Remove the draft tiddler\n\t\tif(isConfirmed) {\n\t\t\tthis.wiki.deleteTiddler(draftTitle);\n\t\t\tthis.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);\n\t\t\tthis.addToHistory(originalTitle,event.navigateFromClientRect);\n\t\t\tthis.saveStoryList(storyList);\n\t\t}\n\t}\n\treturn false;\n};\n\n// Create a new draft tiddler\nNavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {\n\t// Get the story details\n\tvar storyList = this.getStoryList();\n\t// Get the template tiddler if there is one\n\tvar templateTiddler = this.wiki.getTiddler(event.param);\n\t// Create the new tiddler\n\tvar title = this.wiki.generateNewTitle((templateTiddler &amp;&amp; templateTiddler.fields.title) || \&quot;New Tiddler\&quot;);\n\tvar tiddler = new $tw.Tiddler(this.wiki.getCreationFields(),{\n\t\ttext: \&quot;Newly created tiddler\&quot;,\n\t\ttitle: title\n\t},this.wiki.getModificationFields());\n\tthis.wiki.addTiddler(tiddler);\n\t// Create the draft tiddler\n\tvar draftTitle = this.generateDraftTitle(title),\n\t\tdraftTiddler = new $tw.Tiddler({\n\t\t\ttext: \&quot;\&quot;\n\t\t},templateTiddler,\n\t\tthis.wiki.getCreationFields(),\n\t\t{\n\t\t\ttitle: draftTitle,\n\t\t\t\&quot;draft.title\&quot;: title,\n\t\t\t\&quot;draft.of\&quot;: title\n\t\t},this.wiki.getModificationFields());\n\tthis.wiki.addTiddler(draftTiddler);\n\t// Update the story to insert the new draft at the top\n\tvar slot = storyList.indexOf(event.navigateFromTitle);\n\tstoryList.splice(slot + 1,0,draftTitle);\n\t// Save the updated story\n\tthis.saveStoryList(storyList);\n\t// Add a new record to the top of the history stack\n\tthis.addToHistory(draftTitle);\n\treturn false;\n};\n\n// Import JSON tiddlers\nNavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {\n\tvar self = this;\n\t// Get the tiddlers\n\tvar tiddlers = [];\n\ttry {\n\t\ttiddlers = JSON.parse(event.param);\t\n\t} catch(e) {\n\t}\n\t// Process each tiddler\n\tvar importedTiddlers = [];\n\t$tw.utils.each(tiddlers,function(tiddlerFields) {\n\t\tvar title = tiddlerFields.title;\n\t\t// Add it to the store\n\t\tvar imported = self.wiki.importTiddler(new $tw.Tiddler(\n\t\t\tself.wiki.getCreationFields(),\n\t\t\tself.wiki.getModificationFields(),\n\t\t\ttiddlerFields\n\t\t));\n\t\tif(imported) {\n\t\t\timportedTiddlers.push(title);\n\t\t}\n\t});\n\t// Get the story and history details\n\tvar storyList = this.getStoryList(),\n\t\thistory = [];\n\t// Create the import report tiddler\n\tif(importedTiddlers.length === 0) {\n\t\treturn false;\n\t}\n\tvar title;\n\tif(importedTiddlers.length &gt; 1) {\n\t\ttitle = this.wiki.generateNewTitle(\&quot;$:/temp/ImportReport\&quot;);\n\t\tvar tiddlerFields = {\n\t\t\ttitle: title,\n\t\t\ttext: \&quot;# [[\&quot; + importedTiddlers.join(\&quot;]]\\n# [[\&quot;) + \&quot;]]\\n\&quot;\n\t\t};\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(\n\t\t\tself.wiki.getCreationFields(),\n\t\t\ttiddlerFields,\n\t\t\tself.wiki.getModificationFields()\n\t\t));\n\t} else {\n\t\ttitle = importedTiddlers[0];\n\t}\n\t// Add it to the story\n\tif(storyList.indexOf(title) === -1) {\n\t\tstoryList.unshift(title);\n\t}\n\t// And to history\n\thistory.push(title);\n\t// Save the updated story and history\n\tthis.saveStoryList(storyList);\n\tthis.addToHistory(history);\n\treturn false;\n};\n\nexports.navigator = NavigatorWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/navigator.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/password.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/password.js\ntype: application/javascript\nmodule-type: widget\n\nPassword widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar PasswordWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nPasswordWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nPasswordWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Get the current password\n\tvar password = $tw.browser ? $tw.utils.getPassword(this.passwordName) || \&quot;\&quot; : \&quot;\&quot;;\n\t// Create our element\n\tvar domNode = this.document.createElement(\&quot;input\&quot;);\n\tdomNode.setAttribute(\&quot;type\&quot;,\&quot;password\&quot;);\n\tdomNode.setAttribute(\&quot;value\&quot;,password);\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \&quot;change\&quot;, handlerObject: this, handlerMethod: \&quot;handleChangeEvent\&quot;}\n\t]);\n\t// Insert the label into the DOM and render any children\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nPasswordWidget.prototype.handleChangeEvent = function(event) {\n\tvar password = this.domNodes[0].value;\n\treturn $tw.utils.savePassword(this.passwordName,password);\n};\n\n/*\nCompute the internal state of the widget\n*/\nPasswordWidget.prototype.execute = function() {\n\t// Get the parameters from the attributes\n\tthis.passwordName = this.getAttribute(\&quot;name\&quot;,\&quot;\&quot;);\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nPasswordWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.name) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports.password = PasswordWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/password.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/radio.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/radio.js\ntype: application/javascript\nmodule-type: widget\n\nRadio widget\n\nWill set a field to the selected value:\n\n```\n\t&lt;$radio field=\&quot;myfield\&quot; value=\&quot;check 1\&quot;&gt;one&lt;/$radio&gt;\n\t&lt;$radio field=\&quot;myfield\&quot; value=\&quot;check 2\&quot;&gt;two&lt;/$radio&gt;\n\t&lt;$radio field=\&quot;myfield\&quot; value=\&quot;check 3\&quot;&gt;three&lt;/$radio&gt;\n```\n\n|Parameter |Description |h\n|tiddler |Name of the tiddler in which the field should be set. Defaults to current tiddler |\n|field |The name of the field to be set |\n|value |The value to set |\n|class |Optional class name(s) |\n\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar RadioWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nRadioWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nRadioWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our elements\n\tthis.labelDomNode = this.document.createElement(\&quot;label\&quot;);\n\tthis.labelDomNode.setAttribute(\&quot;class\&quot;,this.radioClass);\n\tthis.inputDomNode = this.document.createElement(\&quot;input\&quot;);\n\tthis.inputDomNode.setAttribute(\&quot;type\&quot;,\&quot;radio\&quot;);\n\tif(this.getValue() == this.radioValue) {\n\t\tthis.inputDomNode.setAttribute(\&quot;checked\&quot;,\&quot;true\&quot;);\n\t}\n\tthis.labelDomNode.appendChild(this.inputDomNode);\n\tthis.spanDomNode = this.document.createElement(\&quot;span\&quot;);\n\tthis.labelDomNode.appendChild(this.spanDomNode);\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(this.inputDomNode,[\n\t\t{name: \&quot;change\&quot;, handlerObject: this, handlerMethod: \&quot;handleChangeEvent\&quot;}\n\t]);\n\t// Insert the label into the DOM and render any children\n\tparent.insertBefore(this.labelDomNode,nextSibling);\n\tthis.renderChildren(this.spanDomNode,null);\n\tthis.domNodes.push(this.labelDomNode);\n};\n\nRadioWidget.prototype.getValue = function() {\n\tvar tiddler = this.wiki.getTiddler(this.radioTitle);\n\treturn tiddler &amp;&amp; tiddler.getFieldString(this.radioField);\n};\n\nRadioWidget.prototype.setValue = function() {\n\tif(this.radioField) {\n\t\tvar tiddler = this.wiki.getTiddler(this.radioTitle),\n\t\t\taddition = {};\n\t\taddition[this.radioField] = this.radioValue;\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));\n\t}\n};\n\nRadioWidget.prototype.handleChangeEvent = function(event) {\n\tif(this.inputDomNode.checked) {\n\t\tthis.setValue();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nRadioWidget.prototype.execute = function() {\n\t// Get the parameters from the attributes\n\tthis.radioTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\tthis.radioField = this.getAttribute(\&quot;field\&quot;,\&quot;text\&quot;);\n\tthis.radioValue = this.getAttribute(\&quot;value\&quot;);\n\tthis.radioClass = this.getAttribute(\&quot;class\&quot;,\&quot;\&quot;);\n\tif(this.radioClass !== \&quot;\&quot;) {\n\t\tthis.radioClass += \&quot; \&quot;;\n\t}\n\tthis.radioClass += \&quot;tw-radio\&quot;;\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nRadioWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.value || changedAttributes[\&quot;class\&quot;]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\tvar refreshed = false;\n\t\tif(changedTiddlers[this.radioTitle]) {\n\t\t\tthis.inputDomNode.checked = this.getValue() === this.radioValue;\n\t\t\trefreshed = true;\n\t\t}\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\n\t}\n};\n\nexports.radio = RadioWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/radio.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/raw.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/raw.js\ntype: application/javascript\nmodule-type: widget\n\nRaw widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar RawWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nRawWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nRawWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.execute();\n\tvar div = this.document.createElement(\&quot;div\&quot;);\n\tdiv.innerHTML=this.parseTreeNode.html;\n\tparent.insertBefore(div,nextSibling);\n\tthis.domNodes.push(div);\t\n};\n\n/*\nCompute the internal state of the widget\n*/\nRawWidget.prototype.execute = function() {\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nRawWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.raw = RawWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/raw.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/reveal.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/reveal.js\ntype: application/javascript\nmodule-type: widget\n\nReveal widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar RevealWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nRevealWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nRevealWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar domNode = this.document.createElement(this.parseTreeNode.isBlock ? \&quot;div\&quot; : \&quot;span\&quot;);\n\tvar classes = this[\&quot;class\&quot;].split(\&quot; \&quot;) || [];\n\tclasses.push(\&quot;tw-reveal\&quot;);\n\tdomNode.className = classes.join(\&quot; \&quot;);\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tif(!domNode.isTiddlyWikiFakeDom &amp;&amp; this.type === \&quot;popup\&quot; &amp;&amp; this.isOpen) {\n\t\tthis.positionPopup(domNode);\n\t\t$tw.utils.addClass(domNode,\&quot;tw-popup\&quot;); // Make sure that clicks don't dismiss popups within the revealed content\n\t}\n\tif(!this.isOpen) {\n\t\tdomNode.setAttribute(\&quot;hidden\&quot;,\&quot;true\&quot;)\n\t}\n\tthis.domNodes.push(domNode);\n};\n\nRevealWidget.prototype.positionPopup = function(domNode) {\n\tdomNode.style.position = \&quot;absolute\&quot;;\n\tdomNode.style.zIndex = \&quot;1000\&quot;;\n\tswitch(this.position) {\n\t\tcase \&quot;left\&quot;:\n\t\t\tdomNode.style.left = (this.popup.left - domNode.offsetWidth) + \&quot;px\&quot;;\n\t\t\tdomNode.style.top = this.popup.top + \&quot;px\&quot;;\n\t\t\tbreak;\n\t\tcase \&quot;above\&quot;:\n\t\t\tdomNode.style.left = this.popup.left + \&quot;px\&quot;;\n\t\t\tdomNode.style.top = (this.popup.top - domNode.offsetHeight) + \&quot;px\&quot;;\n\t\t\tbreak;\n\t\tcase \&quot;aboveright\&quot;:\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width) + \&quot;px\&quot;;\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height - domNode.offsetHeight) + \&quot;px\&quot;;\n\t\t\tbreak;\n\t\tcase \&quot;right\&quot;:\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width) + \&quot;px\&quot;;\n\t\t\tdomNode.style.top = this.popup.top + \&quot;px\&quot;;\n\t\t\tbreak;\n\t\tcase \&quot;belowleft\&quot;:\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width - domNode.offsetWidth) + \&quot;px\&quot;;\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height) + \&quot;px\&quot;;\n\t\t\tbreak;\n\t\tdefault: // Below\n\t\t\tdomNode.style.left = this.popup.left + \&quot;px\&quot;;\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height) + \&quot;px\&quot;;\n\t\t\tbreak;\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nRevealWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.state = this.getAttribute(\&quot;state\&quot;);\n\tthis.type = this.getAttribute(\&quot;type\&quot;);\n\tthis.text = this.getAttribute(\&quot;text\&quot;);\n\tthis.position = this.getAttribute(\&quot;position\&quot;);\n\tthis[\&quot;class\&quot;] = this.getAttribute(\&quot;class\&quot;,\&quot;\&quot;);\n\tthis[\&quot;default\&quot;] = this.getAttribute(\&quot;default\&quot;,\&quot;\&quot;);\n\tthis.animate = this.getAttribute(\&quot;animate\&quot;,\&quot;no\&quot;);\n\tthis.retain = this.getAttribute(\&quot;retain\&quot;,\&quot;no\&quot;);\n\tthis.openAnimation = this.animate === \&quot;no\&quot; ? undefined : \&quot;open\&quot;;\n\tthis.closeAnimation = this.animate === \&quot;no\&quot; ? undefined : \&quot;close\&quot;;\n\t// Compute the title of the state tiddler and read it\n\tthis.stateTitle = this.state;\n\tthis.readState();\n\t// Construct the child widgets\n\tvar childNodes = this.isOpen ? this.parseTreeNode.children : [];\n\tthis.hasChildNodes = this.isOpen;\n\tthis.makeChildWidgets(childNodes);\n};\n\n/*\nRead the state tiddler\n*/\nRevealWidget.prototype.readState = function() {\n\t// Read the information from the state tiddler\n\tif(this.stateTitle) {\n\t\tvar state = this.wiki.getTextReference(this.stateTitle,this[\&quot;default\&quot;],this.getVariable(\&quot;currentTiddler\&quot;));\n\t\tswitch(this.type) {\n\t\t\tcase \&quot;popup\&quot;:\n\t\t\t\tthis.readPopupState(state);\n\t\t\t\tbreak;\n\t\t\tcase \&quot;match\&quot;:\n\t\t\t\tthis.readMatchState(state);\n\t\t\t\tbreak;\n\t\t\tcase \&quot;nomatch\&quot;:\n\t\t\t\tthis.readMatchState(state);\n\t\t\t\tthis.isOpen = !this.isOpen;\n\t\t\t\tbreak;\n\t\t}\n\t}\n};\n\nRevealWidget.prototype.readMatchState = function(state) {\n\tthis.isOpen = state === this.text;\n};\n\nRevealWidget.prototype.readPopupState = function(state) {\n\tvar popupLocationRegExp = /^\\((-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+)\\)$/,\n\t\tmatch = popupLocationRegExp.exec(state);\n\t// Check if the state matches the location regexp\n\tif(match) {\n\t\t// If so, we're open\n\t\tthis.isOpen = true;\n\t\t// Get the location\n\t\tthis.popup = {\n\t\t\tleft: parseFloat(match[1]),\n\t\t\ttop: parseFloat(match[2]),\n\t\t\twidth: parseFloat(match[3]),\n\t\t\theight: parseFloat(match[4])\n\t\t};\n\t} else {\n\t\t// If not, we're closed\n\t\tthis.isOpen = false;\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nRevealWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes[\&quot;default\&quot;] || changedAttributes.animate) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\tvar refreshed = false,\n\t\t\tcurrentlyOpen = this.isOpen;\n\t\tthis.readState();\n\t\tif(this.isOpen !== currentlyOpen) {\n\t\t\tif(this.retain === \&quot;yes\&quot;) {\n\t\t\t\tthis.updateState();\n\t\t\t} else {\n\t\t\t\tthis.refreshSelf();\n\t\t\t\trefreshed = true;\n\t\t\t}\n\t\t}\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\n\t}\n};\n\n/*\nCalled by refresh() to dynamically show or hide the content\n*/\nRevealWidget.prototype.updateState = function() {\n\t// Read the current state\n\tthis.readState();\n\t// Construct the child nodes if needed\n\tvar domNode = this.domNodes[0];\n\tif(this.isOpen &amp;&amp; !this.hasChildNodes) {\n\t\tthis.hasChildNodes = true;\n\t\tthis.makeChildWidgets(this.parseTreeNode.children);\n\t\tthis.renderChildren(domNode,null);\n\t}\n\t// Animate our DOM node\n\tif(!domNode.isTiddlyWikiFakeDom &amp;&amp; this.type === \&quot;popup\&quot; &amp;&amp; this.isOpen) {\n\t\tthis.positionPopup(domNode);\n\t\t$tw.utils.addClass(domNode,\&quot;tw-popup\&quot;); // Make sure that clicks don't dismiss popups within the revealed content\n\n\t}\n\tif(this.isOpen) {\n\t\tdomNode.removeAttribute(\&quot;hidden\&quot;);\n        $tw.anim.perform(this.openAnimation,domNode);\n\t} else {\n\t\t$tw.anim.perform(this.closeAnimation,domNode,{callback: function() {\n\t\t\tdomNode.setAttribute(\&quot;hidden\&quot;,\&quot;true\&quot;);\n        }});\n\t}\n};\n\nexports.reveal = RevealWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/reveal.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/scrollable.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/scrollable.js\ntype: application/javascript\nmodule-type: widget\n\nScrollable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar ScrollableWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.scaleFactor = 1;\n\tthis.addEventListeners([\n\t\t{type: \&quot;tw-scroll\&quot;, handler: \&quot;handleScrollEvent\&quot;}\n\t]);\n\tif($tw.browser) {\n\t\tthis.requestAnimationFrame = window.requestAnimationFrame ||\n\t\t\twindow.webkitRequestAnimationFrame ||\n\t\t\twindow.mozRequestAnimationFrame ||\n\t\t\tfunction(callback) {\n\t\t\t\treturn window.setTimeout(callback, 1000/60);\n\t\t\t};\n\t\tthis.cancelAnimationFrame = window.cancelAnimationFrame ||\n\t\t\twindow.webkitCancelAnimationFrame ||\n\t\t\twindow.webkitCancelRequestAnimationFrame ||\n\t\t\twindow.mozCancelAnimationFrame ||\n\t\t\twindow.mozCancelRequestAnimationFrame ||\n\t\t\tfunction(id) {\n\t\t\t\twindow.clearTimeout(id);\n\t\t\t};\n\t}\n};\n\n/*\nInherit from the base widget class\n*/\nScrollableWidget.prototype = new Widget();\n\nScrollableWidget.prototype.cancelScroll = function() {\n\tif(this.idRequestFrame) {\n\t\tthis.cancelAnimationFrame.call(window,this.idRequestFrame);\n\t\tthis.idRequestFrame = null;\n\t}\n};\n\n/*\nHandle a scroll event\n*/\nScrollableWidget.prototype.handleScrollEvent = function(event) {\n\t// Pass the scroll event through if our offsetsize is larger than our scrollsize\n\tif(this.outerDomNode.scrollWidth &lt;= this.outerDomNode.offsetWidth &amp;&amp; this.outerDomNode.scrollHeight &lt;= this.outerDomNode.offsetHeight &amp;&amp; this.fallthrough === \&quot;yes\&quot;) {\n\t\treturn true;\n\t}\n\tthis.scrollIntoView(event.target);\n\treturn false; // Handled event\n};\n\n/*\nScroll an element into view\n*/\nScrollableWidget.prototype.scrollIntoView = function(element) {\n\tvar duration = $tw.utils.getAnimationDuration();\n\tthis.cancelScroll();\n\tthis.startTime = Date.now();\n\tvar scrollPosition = {\n\t\tx: this.outerDomNode.scrollLeft,\n\t\ty: this.outerDomNode.scrollTop\n\t};\n\t// Get the client bounds of the element and adjust by the scroll position\n\tvar scrollableBounds = this.outerDomNode.getBoundingClientRect(),\n\t\tclientTargetBounds = element.getBoundingClientRect(),\n\t\tbounds = {\n\t\t\tleft: clientTargetBounds.left + scrollPosition.x - scrollableBounds.left,\n\t\t\ttop: clientTargetBounds.top + scrollPosition.y - scrollableBounds.top,\n\t\t\twidth: clientTargetBounds.width,\n\t\t\theight: clientTargetBounds.height\n\t\t};\n\t// We'll consider the horizontal and vertical scroll directions separately via this function\n\tvar getEndPos = function(targetPos,targetSize,currentPos,currentSize) {\n\t\t\t// If the target is already visible then stay where we are\n\t\t\tif(targetPos &gt;= currentPos &amp;&amp; (targetPos + targetSize) &lt;= (currentPos + currentSize)) {\n\t\t\t\treturn currentPos;\n\t\t\t// If the target is above/left of the current view, then scroll to its top/left\n\t\t\t} else if(targetPos &lt;= currentPos) {\n\t\t\t\treturn targetPos;\n\t\t\t// If the target is smaller than the window and the scroll position is too far up, then scroll till the target is at the bottom of the window\n\t\t\t} else if(targetSize &lt; currentSize &amp;&amp; currentPos &lt; (targetPos + targetSize - currentSize)) {\n\t\t\t\treturn targetPos + targetSize - currentSize;\n\t\t\t// If the target is big, then just scroll to the top\n\t\t\t} else if(currentPos &lt; targetPos) {\n\t\t\t\treturn targetPos;\n\t\t\t// Otherwise, stay where we are\n\t\t\t} else {\n\t\t\t\treturn currentPos;\n\t\t\t}\n\t\t},\n\t\tendX = getEndPos(bounds.left,bounds.width,scrollPosition.x,this.outerDomNode.offsetWidth),\n\t\tendY = getEndPos(bounds.top,bounds.height,scrollPosition.y,this.outerDomNode.offsetHeight);\n\t// Only scroll if necessary\n\tif(endX !== scrollPosition.x || endY !== scrollPosition.y) {\n\t\tvar self = this,\n\t\t\tdrawFrame;\n\t\tdrawFrame = function () {\n\t\t\tvar t;\n\t\t\tif(duration &lt;= 0) {\n\t\t\t\tt = 1;\n\t\t\t} else {\n\t\t\t\tt = ((Date.now()) - self.startTime) / duration;\t\n\t\t\t}\n\t\t\tif(t &gt;= 1) {\n\t\t\t\tself.cancelScroll();\n\t\t\t\tt = 1;\n\t\t\t}\n\t\t\tt = $tw.utils.slowInSlowOut(t);\n\t\t\tself.outerDomNode.scrollLeft = scrollPosition.x + (endX - scrollPosition.x) * t;\n\t\t\tself.outerDomNode.scrollTop = scrollPosition.y + (endY - scrollPosition.y) * t;\n\t\t\tif(t &lt; 1) {\n\t\t\t\tself.idRequestFrame = self.requestAnimationFrame.call(window,drawFrame);\n\t\t\t}\n\t\t};\n\t\tdrawFrame();\n\t}\n};\n\n/*\nRender this widget into the DOM\n*/\nScrollableWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create elements\n\tthis.outerDomNode = this.document.createElement(\&quot;div\&quot;);\n\t$tw.utils.setStyle(this.outerDomNode,[\n\t\t{overflowY: \&quot;auto\&quot;},\n\t\t{overflowX: \&quot;auto\&quot;},\n\t\t{webkitOverflowScrolling: \&quot;touch\&quot;}\n\t]);\n\tthis.innerDomNode = this.document.createElement(\&quot;div\&quot;);\n\tthis.outerDomNode.appendChild(this.innerDomNode);\n\t// Assign classes\n\tthis.outerDomNode.className = this[\&quot;class\&quot;] || \&quot;\&quot;;\n\t// Insert element\n\tparent.insertBefore(this.outerDomNode,nextSibling);\n\tthis.renderChildren(this.innerDomNode,null);\n\tthis.domNodes.push(this.outerDomNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nScrollableWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.fallthrough = this.getAttribute(\&quot;fallthrough\&quot;,\&quot;yes\&quot;);\n\tthis[\&quot;class\&quot;] = this.getAttribute(\&quot;class\&quot;);\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nScrollableWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\&quot;class\&quot;]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.scrollable = ScrollableWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/scrollable.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/select.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/select.js\ntype: application/javascript\nmodule-type: widget\n\nSelect widget:\n\n```\n&lt;$select tiddler=\&quot;MyTiddler\&quot; field=\&quot;text\&quot;&gt;\n&lt;$list filter=\&quot;[tag[chapter]]\&quot;&gt;\n&lt;option value=&lt;&lt;currentTiddler&gt;&gt;&gt;\n&lt;$view field=\&quot;description\&quot;/&gt;\n&lt;/option&gt;\n&lt;/$list&gt;\n&lt;/$select&gt;\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar SelectWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSelectWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSelectWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n\tthis.setSelectValue();\n\t$tw.utils.addEventListeners(this.getSelectDomNode(),[\n\t\t{name: \&quot;change\&quot;, handlerObject: this, handlerMethod: \&quot;handleChangeEvent\&quot;}\n\t]);\n};\n\n/*\nHandle a change event\n*/\nSelectWidget.prototype.handleChangeEvent = function(event) {\n\tvar value = this.getSelectDomNode().value;\n\tthis.wiki.setText(this.selectTitle,this.selectField,this.selectIndex,value);\n};\n\n/*\nIf necessary, set the value of the select element to the current value\n*/\nSelectWidget.prototype.setSelectValue = function() {\n\tvar value = this.selectDefault;\n\t// Get the value\n\tif(this.selectIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.selectTitle,this.selectIndex);\n\t} else {\n\t\tvar tiddler = this.wiki.getTiddler(this.selectTitle);\n\t\tif(tiddler) {\n\t\t\tif(this.selectField === \&quot;text\&quot;) {\n\t\t\t\t// Calling getTiddlerText() triggers lazy loading of skinny tiddlers\n\t\t\t\tvalue = this.wiki.getTiddlerText(this.selectTitle);\n\t\t\t} else {\n\t\t\t\tif($tw.utils.hop(tiddler.fields,this.selectField)) {\n\t\t\t\t\tvalue = tiddler.getFieldString(this.selectField);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif(this.selectField === \&quot;title\&quot;) {\n\t\t\t\tvalue = this.selectTitle;\n\t\t\t}\n\t\t}\n\t}\n\t// Assign it to the select element if it's different than the current value\n\tvar domNode = this.getSelectDomNode();\n\tif(domNode.value !== value) {\n\t\tdomNode.value = value;\n\t}\n};\n\n/*\nGet the DOM node of the select element\n*/\nSelectWidget.prototype.getSelectDomNode = function() {\n\treturn this.children[0].domNodes[0];\n};\n\n/*\nCompute the internal state of the widget\n*/\nSelectWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.selectTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\tthis.selectField = this.getAttribute(\&quot;field\&quot;,\&quot;text\&quot;);\n\tthis.selectIndex = this.getAttribute(\&quot;index\&quot;);\n\tthis.selectClass = this.getAttribute(\&quot;class\&quot;);\n\tthis.selectDefault = this.getAttribute(\&quot;default\&quot;);\n\t// Make the child widgets\n\tvar selectNode = {\n\t\ttype: \&quot;element\&quot;,\n\t\ttag: \&quot;select\&quot;,\n\t\tchildren: this.parseTreeNode.children\n\t};\n\tif(this.selectClass) {\n\t\t$tw.utils.addAttributeToParseTreeNode(selectNode,\&quot;class\&quot;,this.selectClass);\n\t}\n\tthis.makeChildWidgets([selectNode]);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nSelectWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// If we're using a different tiddler/field/index then completely refresh ourselves\n\tif(changedAttributes.selectTitle || changedAttributes.selectField || changedAttributes.selectIndex) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t// If the target tiddler value has changed, just update setting and refresh the children\n\t} else {\n\t\tif(changedTiddlers[this.selectTitle]) {\n\t\t\tthis.setSelectValue();\n\t\t} \n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.select = SelectWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/select.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/set.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/set.js\ntype: application/javascript\nmodule-type: widget\n\nSet variable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar SetWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSetWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSetWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nSetWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.setName = this.getAttribute(\&quot;name\&quot;,\&quot;currentTiddler\&quot;);\n\tthis.setValue = this.getAttribute(\&quot;value\&quot;);\n\t// Set context variable\n\tthis.setVariable(this.setName,this.setValue,this.parseTreeNode.params);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nSetWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.name || changedAttributes.value) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.setvariable = SetWidget;\nexports.set = SetWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/set.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/text.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/text.js\ntype: application/javascript\nmodule-type: widget\n\nText node widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar TextNodeWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTextNodeWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTextNodeWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar text = this.getAttribute(\&quot;text\&quot;,this.parseTreeNode.text),\n\t\ttextNode = this.document.createTextNode(text);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nTextNodeWidget.prototype.execute = function() {\n\t// Nothing to do for a text node\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTextNodeWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.text) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.text = TextNodeWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/text.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/tiddler.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/tiddler.js\ntype: application/javascript\nmodule-type: widget\n\nTiddler widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar TiddlerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTiddlerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTiddlerWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nTiddlerWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.tiddlerTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\t// Set context variables\n\tthis.setVariable(\&quot;currentTiddler\&quot;,this.tiddlerTitle);\n\tthis.setVariable(\&quot;missingTiddlerClass\&quot;,(this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? \&quot;tw-tiddler-exists\&quot; : \&quot;tw-tiddler-missing\&quot;);\n\tthis.setVariable(\&quot;shadowTiddlerClass\&quot;,this.wiki.isShadowTiddler(this.tiddlerTitle) ? \&quot;tw-tiddler-shadow\&quot; : \&quot;\&quot;);\n\tthis.setVariable(\&quot;systemTiddlerClass\&quot;,this.wiki.isSystemTiddler(this.tiddlerTitle) ? \&quot;tw-tiddler-system\&quot; : \&quot;\&quot;);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTiddlerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.tiddler = TiddlerWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/tiddler.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/transclude.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/transclude.js\ntype: application/javascript\nmodule-type: widget\n\nTransclude widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar TranscludeWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTranscludeWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTranscludeWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nTranscludeWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.transcludeTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\tthis.transcludeField = this.getAttribute(\&quot;field\&quot;);\n\tthis.transcludeIndex = this.getAttribute(\&quot;index\&quot;);\n\tthis.transcludeMode = this.getAttribute(\&quot;mode\&quot;);\n\t// Check for recursion\n\tvar recursionMarker = this.makeRecursionMarker();\n\tif(this.parentWidget &amp;&amp; this.parentWidget.hasVariable(\&quot;transclusion\&quot;,recursionMarker)) {\n\t\tthis.makeChildWidgets([{type: \&quot;text\&quot;, text: \&quot;Recursive transclusion error in transclude widget\&quot;}]);\n\t\treturn;\n\t}\n\t// Set context variables for recursion detection\n\tthis.setVariable(\&quot;transclusion\&quot;,recursionMarker);\n\t// Parse the text reference\n\tvar parseAsInline = !this.parseTreeNode.isBlock;\n\tif(this.transcludeMode === \&quot;inline\&quot;) {\n\t\tparseAsInline = true;\n\t} else if(this.transcludeMode === \&quot;block\&quot;) {\n\t\tparseAsInline = false;\n\t}\n\tvar parser = this.wiki.parseTextReference(\n\t\t\t\t\t\tthis.transcludeTitle,\n\t\t\t\t\t\tthis.transcludeField,\n\t\t\t\t\t\tthis.transcludeIndex,\n\t\t\t\t\t\t{parseAsInline: parseAsInline}),\n\t\tparseTreeNodes = parser ? parser.tree : this.parseTreeNode.children;\n\t// Construct the child widgets\n\tthis.makeChildWidgets(parseTreeNodes);\n};\n\n/*\nCompose a string comprising the title, field and/or index to identify this transclusion for recursion detection\n*/\nTranscludeWidget.prototype.makeRecursionMarker = function() {\n\tvar output = [];\n\toutput.push(\&quot;{\&quot;);\n\toutput.push(this.getVariable(\&quot;currentTiddler\&quot;,{defaultValue: \&quot;\&quot;}));\n\toutput.push(\&quot;|\&quot;);\n\toutput.push(this.transcludeTitle || \&quot;\&quot;);\n\toutput.push(\&quot;|\&quot;);\n\toutput.push(this.transcludeField || \&quot;\&quot;);\n\toutput.push(\&quot;|\&quot;);\n\toutput.push(this.transcludeIndex || \&quot;\&quot;);\n\toutput.push(\&quot;}\&quot;);\n\treturn output.join(\&quot;\&quot;);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTranscludeWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedTiddlers[this.transcludeTitle]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.transclude = TranscludeWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/transclude.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/view.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/view.js\ntype: application/javascript\nmodule-type: widget\n\nView widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar Widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;).widget;\n\nvar ViewWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nViewWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nViewWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tif(this.text) {\n\t\tvar textNode = this.document.createTextNode(this.text);\n\t\tparent.insertBefore(textNode,nextSibling);\n\t\tthis.domNodes.push(textNode);\n\t} else {\n\t\tthis.makeChildWidgets();\n\t\tthis.renderChildren(parent,nextSibling);\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nViewWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.viewTitle = this.getAttribute(\&quot;tiddler\&quot;,this.getVariable(\&quot;currentTiddler\&quot;));\n\tthis.viewField = this.getAttribute(\&quot;field\&quot;,\&quot;text\&quot;);\n\tthis.viewIndex = this.getAttribute(\&quot;index\&quot;);\n\tthis.viewFormat = this.getAttribute(\&quot;format\&quot;,\&quot;text\&quot;);\n\tthis.viewTemplate = this.getAttribute(\&quot;template\&quot;,\&quot;\&quot;);\n\tswitch(this.viewFormat) {\n\t\tcase \&quot;htmlwikified\&quot;:\n\t\t\tthis.text = this.getValueAsHtmlWikified();\n\t\t\tbreak;\n\t\tcase \&quot;htmlencoded\&quot;:\n\t\t\tthis.text = this.getValueAsHtmlEncoded();\n\t\t\tbreak;\n\t\tcase \&quot;urlencoded\&quot;:\n\t\t\tthis.text = this.getValueAsUrlEncoded();\n\t\t\tbreak;\n\t\tcase \&quot;doubleurlencoded\&quot;:\n\t\t\tthis.text = this.getValueAsDoubleUrlEncoded();\n\t\t\tbreak;\n\t\tcase \&quot;date\&quot;:\n\t\t\tthis.text = this.getValueAsDate(this.viewTemplate);\n\t\t\tbreak;\n\t\tcase \&quot;relativedate\&quot;:\n\t\t\tthis.text = this.getValueAsRelativeDate();\n\t\t\tbreak;\n\t\tcase \&quot;stripcomments\&quot;:\n\t\t\tthis.text = this.getValueAsStrippedComments();\n\t\t\tbreak;\n\t\tcase \&quot;jsencoded\&quot;:\n\t\t\tthis.text = this.getValueAsJsEncoded();\n\t\t\tbreak;\n\t\tdefault: // \&quot;text\&quot;\n\t\t\tthis.text = this.getValueAsText();\n\t\t\tbreak;\n\t}\n};\n\n/*\nThe various formatter functions are baked into this widget for the moment. Eventually they will be replaced by macro functions\n*/\n\n/*\nRetrieve the value of the widget. Options are:\nasString: Optionally return the value as a string\n*/\nViewWidget.prototype.getValue = function(options) {\n\toptions = options || {};\n\tvar value = options.asString ? \&quot;\&quot; : undefined;\n\tif(this.viewIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.viewTitle,this.viewIndex);\n\t} else {\n\t\tvar tiddler = this.wiki.getTiddler(this.viewTitle);\n\t\tif(tiddler) {\n\t\t\tif(this.viewField === \&quot;text\&quot;) {\n\t\t\t\t// Calling getTiddlerText() triggers lazy loading of skinny tiddlers\n\t\t\t\tvalue = this.wiki.getTiddlerText(this.viewTitle);\n\t\t\t} else {\n\t\t\t\tif($tw.utils.hop(tiddler.fields,this.viewField)) {\n\t\t\t\t\tif(options.asString) {\n\t\t\t\t\t\tvalue = tiddler.getFieldString(this.viewField);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = tiddler.fields[this.viewField];\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif(this.viewField === \&quot;title\&quot;) {\n\t\t\t\tvalue = this.viewTitle;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n\nViewWidget.prototype.getValueAsText = function() {\n\treturn this.getValue({asString: true});\n};\n\nViewWidget.prototype.getValueAsHtmlWikified = function() {\n\treturn this.wiki.renderText(\&quot;text/html\&quot;,\&quot;text/vnd.tiddlywiki\&quot;,this.getValueAsText(),{parentWidget: this});\n};\n\nViewWidget.prototype.getValueAsHtmlEncoded = function() {\n\treturn $tw.utils.htmlEncode(this.getValueAsText());\n};\n\nViewWidget.prototype.getValueAsUrlEncoded = function() {\n\treturn encodeURIComponent(this.getValueAsText());\n};\n\nViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {\n\treturn encodeURIComponent(encodeURIComponent(this.getValueAsText()));\n};\n\nViewWidget.prototype.getValueAsDate = function(format) {\n\tformat = format || \&quot;YYYY MM DD 0hh:0mm\&quot;;\n\tvar value = $tw.utils.parseDate(this.getValue());\n\tif(value &amp;&amp; $tw.utils.isDate(value) &amp;&amp; value.toString() !== \&quot;Invalid Date\&quot;) {\n\t\treturn $tw.utils.formatDateString(value,format);\n\t} else {\n\t\treturn \&quot;\&quot;;\n\t}\n};\n\nViewWidget.prototype.getValueAsRelativeDate = function(format) {\n\tvar value = $tw.utils.parseDate(this.getValue());\n\tif(value &amp;&amp; $tw.utils.isDate(value) &amp;&amp; value.toString() !== \&quot;Invalid Date\&quot;) {\n\t\treturn $tw.utils.getRelativeDate((new Date()) - (new Date(value))).description;\n\t} else {\n\t\treturn \&quot;\&quot;;\n\t}\n};\n\nViewWidget.prototype.getValueAsStrippedComments = function() {\n\tvar lines = this.getValueAsText().split(\&quot;\\n\&quot;),\n\t\tout = [];\n\tfor(var line=0; line&lt;lines.length; line++) {\n\t\tvar text = lines[line];\n\t\tif(!/^\\s*\\/\\/#/.test(text)) {\n\t\t\tout.push(text);\n\t\t}\n\t}\n\treturn out.join(\&quot;\\n\&quot;);\n};\n\nViewWidget.prototype.getValueAsJsEncoded = function() {\n\treturn $tw.utils.stringify(this.getValueAsText());\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nViewWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.template || changedAttributes.format || changedTiddlers[this.viewTitle]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.view = ViewWidget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/view.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/widgets/widget.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/widgets/widget.js\ntype: application/javascript\nmodule-type: widget\n\nWidget base class\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\n/*\nCreate a widget object for a parse tree node\n\tparseTreeNode: reference to the parse tree node to be rendered\n\toptions: see below\nOptions include:\n\twiki: mandatory reference to wiki associated with this render tree\n\tvariables: optional hashmap of context variables (see below)\n\tparentWidget: optional reference to a parent renderer node for the context chain\n\tdocument: optional document object to use instead of global document\nContext variables include:\n\tcurrentTiddler: title of the tiddler providing the context\n*/\nvar Widget = function(parseTreeNode,options) {\n\tif(arguments.length &gt; 0) {\n\t\tthis.initialise(parseTreeNode,options);\n\t}\n};\n\n/*\nInitialise widget properties. These steps are pulled out of the constructor so that we can reuse them in subclasses\n*/\nWidget.prototype.initialise = function(parseTreeNode,options) {\n\toptions = options || {};\n\t// Save widget info\n\tthis.parseTreeNode = parseTreeNode;\n\tthis.wiki = options.wiki;\n\tthis.parentWidget = options.parentWidget;\n\tthis.variablesConstructor = function() {};\n\tthis.variablesConstructor.prototype = this.parentWidget ? this.parentWidget.variables : {};\n\tthis.variables = new this.variablesConstructor();\n\tthis.document = options.document;\n\tthis.attributes = {};\n\tthis.children = [];\n\tthis.domNodes = [];\n\tthis.eventListeners = {};\n\t// Hashmap of the widget classes\n\tif(!this.widgetClasses) {\n\t\tWidget.prototype.widgetClasses = $tw.modules.applyMethods(\&quot;widget\&quot;);\n\t}\n};\n\n/*\nRender this widget into the DOM\n*/\nWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nWidget.prototype.execute = function() {\n\tthis.makeChildWidgets();\n};\n\n/*\nSet the value of a context variable\nname: name of the variable\nvalue: value of the variable\nparams: array of {name:, default:} for each parameter\n*/\nWidget.prototype.setVariable = function(name,value,params) {\n\tthis.variables[name] = {value: value, params: params};\n};\n\n/*\nGet the prevailing value of a context variable\nname: name of variable\noptions: see below\nOptions include\nparams: array of {name:, value:} for each parameter\ndefaultValue: default value if the variable is not defined\n*/\nWidget.prototype.getVariable = function(name,options) {\n\toptions = options || {};\n\tvar actualParams = options.params || [],\n\t\tparentWidget = this.parentWidget;\n\t// Check for the variable defined in the parent widget (or an ancestor in the prototype chain)\n\tif(parentWidget &amp;&amp; name in parentWidget.variables) {\n\t\tvar variable = parentWidget.variables[name],\n\t\t\tvalue = variable.value;\n\t\t// Substitute any parameters specified in the definition\n\t\tvalue = this.substituteVariableParameters(value,variable.params,actualParams);\n\t\tvalue = this.substituteVariableReferences(value);\n\t\treturn value;\n\t}\n\t// If the variable doesn't exist in the parent widget then look for a macro module\n\treturn this.evaluateMacroModule(name,actualParams,options.defaultValue);\n};\n\nWidget.prototype.substituteVariableParameters = function(text,formalParams,actualParams) {\n\tif(formalParams) {\n\t\tvar nextAnonParameter = 0, // Next candidate anonymous parameter in macro call\n\t\t\tparamInfo, paramValue;\n\t\t// Step through each of the parameters in the macro definition\n\t\tfor(var p=0; p&lt;formalParams.length; p++) {\n\t\t\t// Check if we've got a macro call parameter with the same name\n\t\t\tparamInfo = formalParams[p];\n\t\t\tparamValue = undefined;\n\t\t\tfor(var m=0; m&lt;actualParams.length; m++) {\n\t\t\t\tif(actualParams[m].name === paramInfo.name) {\n\t\t\t\t\tparamValue = actualParams[m].value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If not, use the next available anonymous macro call parameter\n\t\t\twhile(nextAnonParameter &lt; actualParams.length &amp;&amp; actualParams[nextAnonParameter].name) {\n\t\t\t\tnextAnonParameter++;\n\t\t\t}\n\t\t\tif(paramValue === undefined &amp;&amp; nextAnonParameter &lt; actualParams.length) {\n\t\t\t\tparamValue = actualParams[nextAnonParameter++].value;\n\t\t\t}\n\t\t\t// If we've still not got a value, use the default, if any\n\t\t\tparamValue = paramValue || paramInfo[\&quot;default\&quot;] || \&quot;\&quot;;\n\t\t\t// Replace any instances of this parameter\n\t\t\ttext = text.replace(new RegExp(\&quot;\\\\$\&quot; + $tw.utils.escapeRegExp(paramInfo.name) + \&quot;\\\\$\&quot;,\&quot;mg\&quot;),paramValue);\n\t\t}\n\t}\n\treturn text;\n};\n\nWidget.prototype.substituteVariableReferences = function(text) {\n\tvar self = this;\n\treturn text.replace(/\\$\\(([^\\)\\$]+)\\)\\$/g,function(match,p1,offset,string) {\n\t\treturn self.getVariable(p1,{defaultValue: \&quot;\&quot;});\n\t});\n};\n\nWidget.prototype.evaluateMacroModule = function(name,actualParams,defaultValue) {\n\tif($tw.utils.hop($tw.macros,name)) {\n\t\tvar macro = $tw.macros[name],\n\t\t\targs = [];\n\t\tif(macro.params.length &gt; 0) {\n\t\t\tvar nextAnonParameter = 0, // Next candidate anonymous parameter in macro call\n\t\t\t\tparamInfo, paramValue;\n\t\t\t// Step through each of the parameters in the macro definition\n\t\t\tfor(var p=0; p&lt;macro.params.length; p++) {\n\t\t\t\t// Check if we've got a macro call parameter with the same name\n\t\t\t\tparamInfo = macro.params[p];\n\t\t\t\tparamValue = undefined;\n\t\t\t\tfor(var m=0; m&lt;actualParams.length; m++) {\n\t\t\t\t\tif(actualParams[m].name === paramInfo.name) {\n\t\t\t\t\t\tparamValue = actualParams[m].value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If not, use the next available anonymous macro call parameter\n\t\t\t\twhile(nextAnonParameter &lt; actualParams.length &amp;&amp; actualParams[nextAnonParameter].name) {\n\t\t\t\t\tnextAnonParameter++;\n\t\t\t\t}\n\t\t\t\tif(paramValue === undefined &amp;&amp; nextAnonParameter &lt; actualParams.length) {\n\t\t\t\t\tparamValue = actualParams[nextAnonParameter++].value;\n\t\t\t\t}\n\t\t\t\t// If we've still not got a value, use the default, if any\n\t\t\t\tparamValue = paramValue || paramInfo[\&quot;default\&quot;] || \&quot;\&quot;;\n\t\t\t\t// Save the parameter\n\t\t\t\targs.push(paramValue);\n\t\t\t}\n\t\t}\n\t\telse for(var i=0; i&lt;actualParams.length; ++i) {\n\t\t\targs.push(actualParams[i].value);\n\t\t}\n\t\treturn macro.run.apply(this,args)\n\t} else {\n\t\treturn defaultValue;\n\t}\n};\n\n/*\nCheck whether a given context variable value exists in the parent chain\n*/\nWidget.prototype.hasVariable = function(name,value) {\n\tvar node = this;\n\twhile(node) {\n\t\tif($tw.utils.hop(node.variables,name) &amp;&amp; node.variables[name].value === value) {\n\t\t\treturn true;\n\t\t}\n\t\tnode = node.parentWidget;\n\t}\n\treturn false;\n};\n\n/*\nConstruct a qualifying string based on a hash of concatenating the values of a given variable in the parent chain\n*/\nWidget.prototype.getStateQualifier = function(name) {\n\tname = name || \&quot;transclusion\&quot;;\n\tvar output = [],\n\t\tnode = this;\n\twhile(node &amp;&amp; node.parentWidget) {\n\t\tif($tw.utils.hop(node.parentWidget.variables,name)) {\n\t\t\toutput.push(node.getVariable(name));\n\t\t}\n\t\tnode = node.parentWidget;\n\t}\n\treturn \&quot;{\&quot; + $tw.utils.hashString(output.join(\&quot;\&quot;)) + \&quot;}\&quot;;\n};\n\n/*\nCompute the current values of the attributes of the widget. Returns a hashmap of the names of the attributes that have changed\n*/\nWidget.prototype.computeAttributes = function() {\n\tvar changedAttributes = {},\n\t\tself = this,\n\t\tvalue;\n\t$tw.utils.each(this.parseTreeNode.attributes,function(attribute,name) {\n\t\tif(attribute.type === \&quot;indirect\&quot;) {\n\t\t\tvalue = self.wiki.getTextReference(attribute.textReference,\&quot;\&quot;,self.getVariable(\&quot;currentTiddler\&quot;));\n\t\t} else if(attribute.type === \&quot;macro\&quot;) {\n\t\t\tvalue = self.getVariable(attribute.value.name,{params: attribute.value.params});\n\t\t} else { // String attribute\n\t\t\tvalue = attribute.value;\n\t\t}\n\t\t// Check whether the attribute has changed\n\t\tif(self.attributes[name] !== value) {\n\t\t\tself.attributes[name] = value;\n\t\t\tchangedAttributes[name] = true;\n\t\t}\n\t});\n\treturn changedAttributes;\n};\n\n/*\nCheck for the presence of an attribute\n*/\nWidget.prototype.hasAttribute = function(name) {\n\treturn $tw.utils.hop(this.attributes,name);\n};\n\n/*\nGet the value of an attribute\n*/\nWidget.prototype.getAttribute = function(name,defaultText) {\n\tif($tw.utils.hop(this.attributes,name)) {\n\t\treturn this.attributes[name];\n\t} else {\n\t\treturn defaultText;\n\t}\n};\n\n/*\nAssign the computed attributes of the widget to a domNode\noptions include:\nexcludeEventAttributes: ignores attributes whose name begins with \&quot;on\&quot;\n*/\nWidget.prototype.assignAttributes = function(domNode,options) {\n\toptions = options || {};\n\tvar self = this;\n\t$tw.utils.each(this.attributes,function(v,a) {\n\t\t// Check exclusions\n\t\tif(options.excludeEventAttributes &amp;&amp; a.substr(0,2) === \&quot;on\&quot;) {\n\t\t\tv = undefined;\n\t\t}\n\t\tif(v !== undefined) {\n\t\t\t// Setting certain attributes can cause a DOM error (eg xmlns on the svg element)\n\t\t\ttry {\n\t\t\t\tdomNode.setAttributeNS(null,a,v);\n\t\t\t} catch(e) {\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\nMake child widgets correspondng to specified parseTreeNodes\n*/\nWidget.prototype.makeChildWidgets = function(parseTreeNodes) {\n\tthis.children = [];\n\tvar self = this;\n\t$tw.utils.each(parseTreeNodes || (this.parseTreeNode &amp;&amp; this.parseTreeNode.children),function(childNode) {\n\t\tself.children.push(self.makeChildWidget(childNode));\n\t});\n};\n\n/*\nConstruct the widget object for a parse tree node\n*/\nWidget.prototype.makeChildWidget = function(parseTreeNode) {\n\tvar WidgetClass = this.widgetClasses[parseTreeNode.type];\n\tif(!WidgetClass) {\n\t\tWidgetClass = this.widgetClasses[\&quot;text\&quot;];\n\t\tparseTreeNode = {type: \&quot;text\&quot;, text: \&quot;Undefined widget '\&quot; + parseTreeNode.type + \&quot;'\&quot;};\n\t}\n\treturn new WidgetClass(parseTreeNode,{\n\t\twiki: this.wiki,\n\t\tvariables: {},\n\t\tparentWidget: this,\n\t\tdocument: this.document\n\t});\n};\n\n/*\nGet the next sibling of this widget\n*/\nWidget.prototype.nextSibling = function() {\n\tif(this.parentWidget) {\n\t\tvar index = this.parentWidget.children.indexOf(this);\n\t\tif(index !== -1 &amp;&amp; index &lt; this.parentWidget.children.length-1) {\n\t\t\treturn this.parentWidget.children[index+1];\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nGet the previous sibling of this widget\n*/\nWidget.prototype.previousSibling = function() {\n\tif(this.parentWidget) {\n\t\tvar index = this.parentWidget.children.indexOf(this);\n\t\tif(index !== -1 &amp;&amp; index &gt; 0) {\n\t\t\treturn this.parentWidget.children[index-1];\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nRender the children of this widget into the DOM\n*/\nWidget.prototype.renderChildren = function(parent,nextSibling) {\n\t$tw.utils.each(this.children,function(childWidget) {\n\t\tchildWidget.render(parent,nextSibling);\n\t});\n};\n\n/*\nAdd a list of event listeners from an array [{type:,handler:},...]\n*/\nWidget.prototype.addEventListeners = function(listeners) {\n\tvar self = this;\n\t$tw.utils.each(listeners,function(listenerInfo) {\n\t\tself.addEventListener(listenerInfo.type,listenerInfo.handler);\n\t});\n};\n\n/*\nAdd an event listener\n*/\nWidget.prototype.addEventListener = function(type,handler) {\n\tvar self = this;\n\tif(typeof handler === \&quot;string\&quot;) { // The handler is a method name on this widget\n\t\tthis.eventListeners[type] = function(event) {\n\t\t\treturn self[handler].call(self,event);\n\t\t};\n\t} else { // The handler is a function\n\t\tthis.eventListeners[type] = function(event) {\n\t\t\treturn handler.call(self,event);\n\t\t}\n\n\t}\n};\n\n/*\nDispatch an event to a widget. If the widget doesn't handle the event then it is also dispatched to the parent widget\n*/\nWidget.prototype.dispatchEvent = function(event) {\n\t// Dispatch the event if this widget handles it\n\tvar listener = this.eventListeners[event.type];\n\tif(listener) {\n\t\t// Don't propagate the event if the listener returned false\n\t\tif(!listener(event)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Dispatch the event to the parent widget\n\tif(this.parentWidget) {\n\t\treturn this.parentWidget.dispatchEvent(event);\n\t}\n\treturn true;\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nRebuild a previously rendered widget\n*/\nWidget.prototype.refreshSelf = function() {\n\tvar nextSibling = this.findNextSiblingDomNode();\n\tthis.removeChildDomNodes();\n\tthis.render(this.parentDomNode,nextSibling);\n};\n\n/*\nRefresh all the children of a widget\n*/\nWidget.prototype.refreshChildren = function(changedTiddlers) {\n\tvar self = this,\n\t\trefreshed = false;\n\t$tw.utils.each(this.children,function(childWidget) {\n\t\trefreshed = childWidget.refresh(changedTiddlers) || refreshed;\n\t});\n\treturn refreshed;\n};\n\n/*\nFind the next sibling in the DOM to this widget. This is done by scanning the widget tree through all next siblings and their descendents that share the same parent DOM node\n*/\nWidget.prototype.findNextSiblingDomNode = function(startIndex) {\n\t// Refer to this widget by its index within its parents children\n\tvar parent = this.parentWidget,\n\t\tindex = startIndex !== undefined ? startIndex : parent.children.indexOf(this);\nif(index === -1) {\n\tthrow \&quot;node not found in parents children\&quot;;\n}\n\t// Look for a DOM node in the later siblings\n\twhile(++index &lt; parent.children.length) {\n\t\tvar domNode = parent.children[index].findFirstDomNode();\n\t\tif(domNode) {\n\t\t\treturn domNode;\n\t\t}\n\t}\n\t// Go back and look for later siblings of our parent if it has the same parent dom node\n\tvar grandParent = parent.parentWidget;\n\tif(grandParent &amp;&amp; parent.parentDomNode === this.parentDomNode) {\n\t\tindex = grandParent.children.indexOf(parent);\n\t\treturn parent.findNextSiblingDomNode(index);\n\t}\n\treturn null;\n};\n\n/*\nFind the first DOM node generated by a widget or its children\n*/\nWidget.prototype.findFirstDomNode = function() {\n\t// Return the first dom node of this widget, if we've got one\n\tif(this.domNodes.length &gt; 0) {\n\t\treturn this.domNodes[0];\n\t}\n\t// Otherwise, recursively call our children\n\tfor(var t=0; t&lt;this.children.length; t++) {\n\t\tvar domNode = this.children[t].findFirstDomNode();\n\t\tif(domNode) {\n\t\t\treturn domNode;\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nRemove any DOM nodes created by this widget or its children\n*/\nWidget.prototype.removeChildDomNodes = function() {\n\t// If this widget has directly created DOM nodes, delete them and exit. This assumes that any child widgets are contained within the created DOM nodes, which would normally be the case\n\tif(this.domNodes.length &gt; 0) {\n\t\t$tw.utils.each(this.domNodes,function(domNode) {\n\t\t\tdomNode.parentNode.removeChild(domNode);\n\t\t});\n\t\tthis.domNodes = [];\n\t} else {\n\t\t// Otherwise, ask the child widgets to delete their DOM nodes\n\t\t$tw.utils.each(this.children,function(childWidget) {\n\t\t\tchildWidget.removeChildDomNodes();\n\t\t});\n\t}\n};\n\nexports.widget = Widget;\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/widgets/widget.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;widget&quot;
        },
        &quot;$:/core/modules/wiki.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/core/modules/wiki.js\ntype: application/javascript\nmodule-type: wikimethod\n\nExtension methods for the $tw.Wiki object\n\nAdds the following properties to the wiki object:\n\n* `eventListeners` is a hashmap by type of arrays of listener functions\n* `changedTiddlers` is a hashmap describing changes to named tiddlers since wiki change events were last dispatched. Each entry is a hashmap containing two fields:\n\tmodified: true/false\n\tdeleted: true/false\n* `changeCount` is a hashmap by tiddler title containing a numerical index that starts at zero and is incremented each time a tiddler is created changed or deleted\n* `caches` is a hashmap by tiddler title containing a further hashmap of named cache objects. Caches are automatically cleared when a tiddler is modified or deleted\n* `globalCache` is a hashmap by cache name of cache objects that are cleared whenever any tiddler change occurs\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\&quot;use strict\&quot;;\n\nvar widget = require(\&quot;$:/core/modules/widgets/widget.js\&quot;);\n\nvar USER_NAME_TITLE = \&quot;$:/status/UserName\&quot;;\n\n/*\nGet the value of a text reference. Text references can have any of these forms:\n\t&lt;tiddlertitle&gt;\n\t&lt;tiddlertitle&gt;!!&lt;fieldname&gt;\n\t!!&lt;fieldname&gt; - specifies a field of the current tiddlers\n\t&lt;tiddlertitle&gt;##&lt;index&gt;\n*/\nexports.getTextReference = function(textRef,defaultText,currTiddlerTitle) {\n\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\ttitle = tr.title || currTiddlerTitle;\n\tif(tr.field) {\n\t\tvar tiddler = this.getTiddler(title);\n\t\tif(tr.field === \&quot;title\&quot;) { // Special case so we can return the title of a non-existent tiddler\n\t\t\treturn title;\n\t\t} else if(tiddler &amp;&amp; $tw.utils.hop(tiddler.fields,tr.field)) {\n\t\t\treturn tiddler.getFieldString(tr.field);\n\t\t} else {\n\t\t\treturn defaultText;\n\t\t}\n\t} else if(tr.index) {\n\t\treturn this.extractTiddlerDataItem(title,tr.index,defaultText);\n\t} else {\n\t\treturn this.getTiddlerText(title,defaultText);\n\t}\n};\n\nexports.setTextReference = function(textRef,value,currTiddlerTitle) {\n\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\ttitle = tr.title || currTiddlerTitle;\n\tthis.setText(title,tr.field,tr.index,value);\n};\n\nexports.setText = function(title,field,index,value) {\n\t// Check if it is a reference to a tiddler field\n\tif(index) {\n\t\tvar data = this.getTiddlerData(title,Object.create(null));\n\t\tdata[index] = value;\n\t\tthis.setTiddlerData(title,data,this.getModificationFields());\n\t} else {\n\t\tvar tiddler = this.getTiddler(title),\n\t\t\tfields = {title: title};\n\t\tfields[field || \&quot;text\&quot;] = value;\n\t\tthis.addTiddler(new $tw.Tiddler(tiddler,fields,this.getModificationFields()));\n\t}\n};\n\nexports.deleteTextReference = function(textRef,currTiddlerTitle) {\n\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\ttitle,tiddler,fields;\n\t// Check if it is a reference to a tiddler\n\tif(tr.title &amp;&amp; !tr.field) {\n\t\tthis.deleteTiddler(tr.title);\n\t// Else check for a field reference\n\t} else if(tr.field) {\n\t\ttitle = tr.title || currTiddlerTitle;\n\t\ttiddler = this.getTiddler(title);\n\t\tif(tiddler &amp;&amp; $tw.utils.hop(tiddler.fields,tr.field)) {\n\t\t\tfields = Object.create(null);\n\t\t\tfields[tr.field] = undefined;\n\t\t\tthis.addTiddler(new $tw.Tiddler(tiddler,fields,this.getModificationFields()));\n\t\t}\n\t}\n};\n\nexports.addEventListener = function(type,listener) {\n\tthis.eventListeners = this.eventListeners || {};\n\tthis.eventListeners[type] = this.eventListeners[type]  || [];\n\tthis.eventListeners[type].push(listener);\t\n};\n\nexports.removeEventListener = function(type,listener) {\n\tvar listeners = this.eventListeners[type];\n\tif(listeners) {\n\t\tvar p = listeners.indexOf(listener);\n\t\tif(p !== -1) {\n\t\t\tlisteners.splice(p,1);\n\t\t}\n\t}\n};\n\nexports.dispatchEvent = function(type /*, args */) {\n\tvar args = Array.prototype.slice.call(arguments,1),\n\t\tlisteners = this.eventListeners[type];\n\tif(listeners) {\n\t\tfor(var p=0; p&lt;listeners.length; p++) {\n\t\t\tvar listener = listeners[p];\n\t\t\tlistener.apply(listener,args);\n\t\t}\n\t}\n};\n\n/*\nCauses a tiddler to be marked as changed, incrementing the change count, and triggers event handlers.\nThis method should be called after the changes it describes have been made to the wiki.tiddlers[] array.\n\ttitle: Title of tiddler\n\tisDeleted: defaults to false (meaning the tiddler has been created or modified),\n\t\ttrue if the tiddler has been deleted\n*/\nexports.enqueueTiddlerEvent = function(title,isDeleted) {\n\t// Record the touch in the list of changed tiddlers\n\tthis.changedTiddlers = this.changedTiddlers || Object.create(null);\n\tthis.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null);\n\tthis.changedTiddlers[title][isDeleted ? \&quot;deleted\&quot; : \&quot;modified\&quot;] = true;\n\t// Increment the change count\n\tthis.changeCount = this.changeCount || Object.create(null);\n\tif($tw.utils.hop(this.changeCount,title)) {\n\t\tthis.changeCount[title]++;\n\t} else {\n\t\tthis.changeCount[title] = 1;\n\t}\n\t// Trigger events\n\tthis.eventListeners = this.eventListeners || [];\n\tif(!this.eventsTriggered) {\n\t\tvar self = this;\n\t\t$tw.utils.nextTick(function() {\n\t\t\tvar changes = self.changedTiddlers;\n\t\t\tself.changedTiddlers = Object.create(null);\n\t\t\tself.eventsTriggered = false;\n\t\t\tif($tw.utils.count(changes) &gt; 0) {\n\t\t\t\tself.dispatchEvent(\&quot;change\&quot;,changes);\n\t\t\t}\n\t\t});\n\t\tthis.eventsTriggered = true;\n\t}\n};\n\nexports.clearTiddlerEventQueue = function() {\n\tthis.changedTiddlers = Object.create(null);\n\tthis.changeCount = Object.create(null)\n};\n\nexports.getChangeCount = function(title) {\n\tthis.changeCount = this.changeCount || Object.create(null);\n\tif($tw.utils.hop(this.changeCount,title)) {\n\t\treturn this.changeCount[title];\n\t} else {\n\t\treturn 0;\n\t}\n};\n\n/*\nGenerate an unused title from the specified base\n*/\nexports.generateNewTitle = function(baseTitle,options) {\n\toptions = options || {};\n\tvar c = 0,\n\t    title = baseTitle;\n\twhile(this.tiddlerExists(title) || this.isShadowTiddler(title)) {\n\t\ttitle = baseTitle + \n\t\t\t(options.prefix || \&quot; \&quot;) + \n\t\t\t(++c);\n\t};\n\treturn title;\n};\n\nexports.isSystemTiddler = function(title) {\n\treturn title.indexOf(\&quot;$:/\&quot;) === 0;\n};\n\nexports.isTemporaryTiddler = function(title) {\n\treturn title.indexOf(\&quot;$:/temp/\&quot;) === 0;\n};\n\nexports.isImageTiddler = function(title) {\n\tvar tiddler = this.getTiddler(title);\n\tif(tiddler) {\t\t\n\t\tvar contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type || \&quot;text/vnd.tiddlywiki\&quot;];\n\t\treturn !!contentTypeInfo &amp;&amp; contentTypeInfo.flags.indexOf(\&quot;image\&quot;) !== -1;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nLike addTiddler() except it will silently reject any plugin tiddlers that are older than the currently loaded version. Returns true if the tiddler was imported\n*/\nexports.importTiddler = function(tiddler) {\n\tvar existingTiddler = this.getTiddler(tiddler.fields.title);\n\t// Check if we're dealing with a plugin\n\tif(tiddler &amp;&amp; tiddler.hasField(\&quot;plugin-type\&quot;) &amp;&amp; tiddler.hasField(\&quot;version\&quot;) &amp;&amp; existingTiddler &amp;&amp; existingTiddler.hasField(\&quot;plugin-type\&quot;) &amp;&amp; existingTiddler.hasField(\&quot;version\&quot;)) {\n\t\t// Reject the incoming plugin if it is older\n\t\tif($tw.utils.checkVersions(existingTiddler.fields.version,tiddler.fields.version)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Fall through to adding the tiddler\n\tthis.addTiddler(tiddler);\n\treturn true;\n};\n\n/*\nReturn a hashmap of the fields that should be set when a tiddler is created\n*/\nexports.getCreationFields = function() {\n\tvar fields = {\n\t\t\tcreated: new Date()\n\t\t},\n\t\tcreator = this.getTiddlerText(USER_NAME_TITLE);\n\tif(creator) {\n\t\tfields.creator = creator;\n\t}\n\treturn fields;\n};\n\n/*\nReturn a hashmap of the fields that should be set when a tiddler is modified\n*/\nexports.getModificationFields = function() {\n\tvar fields = Object.create(null),\n\t\tmodifier = this.getTiddlerText(USER_NAME_TITLE);\n\tfields.modified = new Date();\n\tif(modifier) {\n\t\tfields.modifier = modifier;\n\t}\n\treturn fields;\n};\n\n/*\nReturn a sorted array of tiddler titles.  Options include:\nsortField: field to sort by\nexcludeTag: tag to exclude\nincludeSystem: whether to include system tiddlers (defaults to false)\n*/\nexports.getTiddlers = function(options) {\n\toptions = options || Object.create(null);\n\tvar self = this,\n\t\tsortField = options.sortField || \&quot;title\&quot;,\n\t\ttiddlers = [], t, titles = [];\n\tthis.each(function(tiddler,title) {\n\t\tif(options.includeSystem || !self.isSystemTiddler(title)) {\n\t\t\tif(!options.excludeTag || !tiddler.hasTag(options.excludeTag)) {\n\t\t\t\ttiddlers.push(tiddler);\n\t\t\t}\n\t\t}\n\t});\n\ttiddlers.sort(function(a,b) {\n\t\tvar aa = a.fields[sortField].toLowerCase() || \&quot;\&quot;,\n\t\t\tbb = b.fields[sortField].toLowerCase() || \&quot;\&quot;;\n\t\tif(aa &lt; bb) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\tif(aa &gt; bb) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t});\n\tfor(t=0; t&lt;tiddlers.length; t++) {\n\t\ttitles.push(tiddlers[t].fields.title);\n\t}\n\treturn titles;\n};\n\nexports.countTiddlers = function(excludeTag) {\n\tvar tiddlers = this.getTiddlers({excludeTag: excludeTag});\n\treturn $tw.utils.count(tiddlers);\n};\n\n/*\nReturns a function iterator(callback) that iterates through the specified titles, and invokes the callback with callback(tiddler,title)\n*/\nexports.makeTiddlerIterator = function(titles) {\n\tvar self = this;\n\tif(!$tw.utils.isArray(titles)) {\n\t\ttitles = Object.keys(titles);\n\t} else {\n\t\ttitles = titles.slice(0);\n\t}\n\treturn function(callback) {\n\t\ttitles.forEach(function(title) {\n\t\t\tcallback(self.getTiddler(title),title);\n\t\t});\n\t};\n};\n\n/*\nSort an array of tiddler titles by a specified field\n\ttitles: array of titles (sorted in place)\n\tsortField: name of field to sort by\n\tisDescending: true if the sort should be descending\n\tisCaseSensitive: true if the sort should consider upper and lower case letters to be different\n*/\nexports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive,isNumeric) {\n\tvar self = this;\n\ttitles.sort(function(a,b) {\n\t\tif(sortField !== \&quot;title\&quot;) {\n\t\t\ta = self.getTiddler(a).fields[sortField] || \&quot;\&quot;;\n\t\t\tb = self.getTiddler(b).fields[sortField] || \&quot;\&quot;;\n\t\t}\n\t\tif(isNumeric) {\n\t\t\ta = Number(a);\n\t\t\tb = Number(b);\n\t\t\treturn isDescending ? b - a : a - b;\n\t\t} else if($tw.utils.isDate(a) &amp;&amp; $tw.utils.isDate(b)) {\n\t\t\treturn isDescending ? b - a : a - b;\n\t\t} else {\n\t\t\ta = String(a);\n\t\t\tb = String(b);\n\t\t\tif(!isCaseSensitive) {\n\t\t\t\ta = a.toLowerCase();\n\t\t\t\tb = b.toLowerCase();\n\t\t\t}\n\t\t\treturn isDescending ? b.localeCompare(a) : a.localeCompare(b);\n\t\t}\n\t});\n};\n\n/*\nFor every tiddler invoke a callback(title,tiddler) with `this` set to the wiki object. Options include:\nsortField: field to sort by\nexcludeTag: tag to exclude\nincludeSystem: whether to include system tiddlers (defaults to false)\n*/\nexports.forEachTiddler = function(/* [options,]callback */) {\n\tvar arg = 0,\n\t\toptions = arguments.length &gt;= 2 ? arguments[arg++] : {},\n\t\tcallback = arguments[arg++],\n\t\ttitles = this.getTiddlers(options),\n\t\tt, tiddler;\n\tfor(t=0; t&lt;titles.length; t++) {\n\t\ttiddler = this.getTiddler(titles[t]);\n\t\tif(tiddler) {\n\t\t\tcallback.call(this,tiddler.fields.title,tiddler);\n\t\t}\n\t}\n};\n\n/*\nReturn an array of tiddler titles that are directly linked from the specified tiddler\n*/\nexports.getTiddlerLinks = function(title) {\n\tvar self = this;\n\t// We'll cache the links so they only get computed if the tiddler changes\n\treturn this.getCacheForTiddler(title,\&quot;links\&quot;,function() {\n\t\t// Parse the tiddler\n\t\tvar parser = self.parseTiddler(title);\n\t\t// Count up the links\n\t\tvar links = [],\n\t\t\tcheckParseTree = function(parseTree) {\n\t\t\t\tfor(var t=0; t&lt;parseTree.length; t++) {\n\t\t\t\t\tvar parseTreeNode = parseTree[t];\n\t\t\t\t\tif(parseTreeNode.type === \&quot;link\&quot; &amp;&amp; parseTreeNode.attributes.to &amp;&amp; parseTreeNode.attributes.to.type === \&quot;string\&quot;) {\n\t\t\t\t\t\tvar value = parseTreeNode.attributes.to.value;\n\t\t\t\t\t\tif(links.indexOf(value) === -1) {\n\t\t\t\t\t\t\tlinks.push(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(parseTreeNode.children) {\n\t\t\t\t\t\tcheckParseTree(parseTreeNode.children);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\tif(parser) {\n\t\t\tcheckParseTree(parser.tree);\n\t\t}\n\t\treturn links;\n\t});\n};\n\n/*\nReturn an array of tiddler titles that link to the specified tiddler\n*/\nexports.getTiddlerBacklinks = function(targetTitle) {\n\tvar self = this,\n\t\tbacklinks = [];\n\tthis.forEachTiddler(function(title,tiddler) {\n\t\tvar links = self.getTiddlerLinks(title);\n\t\tif(links.indexOf(targetTitle) !== -1) {\n\t\t\tbacklinks.push(title);\n\t\t}\n\t});\n\treturn backlinks;\n};\n\n/*\nReturn a hashmap of tiddler titles that are referenced but not defined. Each value is the number of times the missing tiddler is referenced\n*/\nexports.getMissingTitles = function() {\n\tvar self = this,\n\t\tmissing = [];\n// We should cache the missing tiddler list, even if we recreate it every time any tiddler is modified\n\tthis.forEachTiddler(function(title,tiddler) {\n\t\tvar links = self.getTiddlerLinks(title);\n\t\t$tw.utils.each(links,function(link) {\n\t\t\tif((!self.tiddlerExists(link) &amp;&amp; !self.isShadowTiddler(link)) &amp;&amp; missing.indexOf(link) === -1) {\n\t\t\t\tmissing.push(link);\n\t\t\t}\n\t\t});\n\t});\n\treturn missing;\n};\n\nexports.getOrphanTitles = function() {\n\tvar self = this,\n\t\torphans = this.getTiddlers();\n\tthis.forEachTiddler(function(title,tiddler) {\n\t\tvar links = self.getTiddlerLinks(title);\n\t\t$tw.utils.each(links,function(link) {\n\t\t\tvar p = orphans.indexOf(link);\n\t\t\tif(p !== -1) {\n\t\t\t\torphans.splice(p,1);\n\t\t\t}\n\t\t});\n\t});\n\treturn orphans; // Todo\n};\n\n/*\nRetrieves a list of the tiddler titles that are tagged with a given tag\n*/\nexports.getTiddlersWithTag = function(tag) {\n\tvar self = this;\n\treturn this.getGlobalCache(\&quot;taglist-\&quot; + tag,function() {\n\t\tvar tagmap = self.getTagMap();\n\t\treturn self.sortByList(tagmap[tag],tag);\n\t});\n};\n\n/*\nGet a hashmap by tag of arrays of tiddler titles\n*/\nexports.getTagMap = function() {\n\tvar self = this;\n\treturn this.getGlobalCache(\&quot;tagmap\&quot;,function() {\n\t\tvar tags = Object.create(null),\n\t\t\tstoreTags = function(tagArray,title) {\n\t\t\t\tif(tagArray) {\n\t\t\t\t\tfor(var index=0; index&lt;tagArray.length; index++) {\n\t\t\t\t\t\tvar tag = tagArray[index];\n\t\t\t\t\t\tif($tw.utils.hop(tags,tag)) {\n\t\t\t\t\t\t\ttags[tag].push(title)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttags[tag] = [title];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\ttitle, tiddler;\n\t\t// Collect up all the tags\n\t\tself.eachShadow(function(tiddler,title) {\n\t\t\tif(!self.tiddlerExists(title)) {\n\t\t\t\ttiddler = self.getTiddler(title);\n\t\t\t\tstoreTags(tiddler.fields.tags,title);\n\t\t\t}\n\t\t});\n\t\tself.each(function(tiddler,title) {\n\t\t\tstoreTags(tiddler.fields.tags,title);\n\t\t});\n\t\treturn tags;\n\t});\n};\n\n/*\nLookup a given tiddler and return a list of all the tiddlers that include it in the specified list field\n*/\nexports.findListingsOfTiddler = function(targetTitle,fieldName) {\n\tfieldName = fieldName || \&quot;list\&quot;;\n\tvar titles = [];\n\tthis.each(function(tiddler,title) {\n\t\tvar list = $tw.utils.parseStringArray(tiddler.fields[fieldName]);\n\t\tif(list &amp;&amp; list.indexOf(targetTitle) !== -1) {\n\t\t\ttitles.push(title);\n\t\t}\n\t});\n\treturn titles;\n};\n\n/*\nSorts an array of tiddler titles according to an ordered list\n*/\nexports.sortByList = function(array,listTitle) {\n\tvar list = this.getTiddlerList(listTitle);\n\tif(!array || array.length === 0) {\n\t\treturn [];\n\t} else {\n\t\tvar titles = [], t, title;\n\t\t// First place any entries that are present in the list\n\t\tfor(t=0; t&lt;list.length; t++) {\n\t\t\ttitle = list[t];\n\t\t\tif(array.indexOf(title) !== -1) {\n\t\t\t\ttitles.push(title);\n\t\t\t}\n\t\t}\n\t\t// Then place any remaining entries\n\t\tfor(t=0; t&lt;array.length; t++) {\n\t\t\ttitle = array[t];\n\t\t\tif(list.indexOf(title) === -1) {\n\t\t\t\ttitles.push(title);\n\t\t\t}\n\t\t}\n\t\t// Finally obey the list-before and list-after fields of each tiddler in turn\n\t\tvar sortedTitles = titles.slice(0);\n\t\tfor(t=0; t&lt;sortedTitles.length; t++) {\n\t\t\ttitle = sortedTitles[t];\n\t\t\tvar currPos = titles.indexOf(title),\n\t\t\t\tnewPos = -1,\n\t\t\t\ttiddler = this.getTiddler(title);\n\t\t\tif(tiddler) {\n\t\t\t\tvar beforeTitle = tiddler.fields[\&quot;list-before\&quot;],\n\t\t\t\t\tafterTitle = tiddler.fields[\&quot;list-after\&quot;];\n\t\t\t\tif(beforeTitle === \&quot;\&quot;) {\n\t\t\t\t\tnewPos = 0;\n\t\t\t\t} else if(beforeTitle) {\n\t\t\t\t\tnewPos = titles.indexOf(beforeTitle);\n\t\t\t\t} else if(afterTitle) {\n\t\t\t\t\tnewPos = titles.indexOf(afterTitle);\n\t\t\t\t\tif(newPos &gt;= 0) {\n\t\t\t\t\t\t++newPos;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(newPos === -1) {\n\t\t\t\t\tnewPos = currPos;\n\t\t\t\t}\n\t\t\t\tif(newPos !== currPos) {\n\t\t\t\t\ttitles.splice(currPos,1);\n\t\t\t\t\tif(newPos &gt;= currPos) {\n\t\t\t\t\t\tnewPos--;\n\t\t\t\t\t}\n\t\t\t\t\ttitles.splice(newPos,0,title);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn titles;\n\t}\n};\n\n/*\nRetrieve a tiddler as a JSON string of the fields\n*/\nexports.getTiddlerAsJson = function(title) {\n\tvar tiddler = this.getTiddler(title);\n\tif(tiddler) {\n\t\tvar fields = Object.create(null);\n\t\t$tw.utils.each(tiddler.fields,function(value,name) {\n\t\t\tfields[name] = tiddler.getFieldString(name);\n\t\t});\n\t\treturn JSON.stringify(fields);\n\t} else {\n\t\treturn JSON.stringify({title: title});\n\t}\n};\n\n/*\nGet a tiddlers content as a JavaScript object. How this is done depends on the type of the tiddler:\n\napplication/json: the tiddler JSON is parsed into an object\napplication/x-tiddler-dictionary: the tiddler is parsed as sequence of name:value pairs\n\nOther types currently just return null.\n*/\nexports.getTiddlerData = function(title,defaultData) {\n\tvar tiddler = this.getTiddler(title),\n\t\tdata;\n\tif(tiddler &amp;&amp; tiddler.fields.text) {\n\t\tswitch(tiddler.fields.type) {\n\t\t\tcase \&quot;application/json\&quot;:\n\t\t\t\t// JSON tiddler\n\t\t\t\ttry {\n\t\t\t\t\tdata = JSON.parse(tiddler.fields.text);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\treturn defaultData;\n\t\t\t\t}\n\t\t\t\treturn data;\n\t\t\tcase \&quot;application/x-tiddler-dictionary\&quot;:\n\t\t\t\treturn $tw.utils.parseFields(tiddler.fields.text);\n\t\t}\n\t}\n\treturn defaultData;\n};\n\n/*\nExtract an indexed field from within a data tiddler\n*/\nexports.extractTiddlerDataItem = function(title,index,defaultText) {\n\tvar data = this.getTiddlerData(title,Object.create(null)),\n\t\ttext;\n\tif(data &amp;&amp; $tw.utils.hop(data,index)) {\n\t\ttext = data[index];\n\t}\n\tif(typeof text === \&quot;string\&quot; || typeof text === \&quot;number\&quot;) {\n\t\treturn text.toString();\n\t} else {\n\t\treturn defaultText;\n\t}\n};\n\n/*\nSet a tiddlers content to a JavaScript object. Currently this is done by setting the tiddler's type to \&quot;application/json\&quot; and setting the text to the JSON text of the data.\ntitle: title of tiddler\ndata: object that can be serialised to JSON\nfields: optional hashmap of additional tiddler fields to be set\n*/\nexports.setTiddlerData = function(title,data,fields) {\n\tvar existingTiddler = this.getTiddler(title),\n\t\tnewFields = {\n\t\t\ttitle: title\n\t};\n\tif(existingTiddler &amp;&amp; existingTiddler.fields.type === \&quot;application/x-tiddler-dictionary\&quot;) {\n\t\tnewFields.text = $tw.utils.makeTiddlerDictionary(data);\n\t} else {\n\t\tnewFields.type = \&quot;application/json\&quot;;\n\t\tnewFields.text = JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);\n\t}\n\tthis.addTiddler(new $tw.Tiddler(existingTiddler,fields,newFields,this.getModificationFields()));\n};\n\n/*\nReturn the content of a tiddler as an array containing each line\n*/\nexports.getTiddlerList = function(title,field,index) {\n\tif(index) {\n\t\treturn $tw.utils.parseStringArray(this.extractTiddlerDataItem(title,index,\&quot;\&quot;));\n\t}\n\tfield = field || \&quot;list\&quot;;\n\tvar tiddler = this.getTiddler(title);\n\tif(tiddler) {\n\t\treturn ($tw.utils.parseStringArray(tiddler.fields[field]) || []).slice(0);\n\t}\n\treturn [];\n};\n\n// Return a named global cache object. Global cache objects are cleared whenever a tiddler change occurs\nexports.getGlobalCache = function(cacheName,initializer) {\n\tthis.globalCache = this.globalCache || Object.create(null);\n\tif($tw.utils.hop(this.globalCache,cacheName)) {\n\t\treturn this.globalCache[cacheName];\n\t} else {\n\t\tthis.globalCache[cacheName] = initializer();\n\t\treturn this.globalCache[cacheName];\n\t}\n};\n\nexports.clearGlobalCache = function() {\n\tthis.globalCache = Object.create(null);\n}\n\n// Return the named cache object for a tiddler. If the cache doesn't exist then the initializer function is invoked to create it\nexports.getCacheForTiddler = function(title,cacheName,initializer) {\n\n// Temporarily disable caching so that tweakParseTreeNode() works\nreturn initializer();\n\n\tthis.caches = this.caches || Object.create(null);\n\tvar caches = this.caches[title];\n\tif(caches &amp;&amp; caches[cacheName]) {\n\t\treturn caches[cacheName];\n\t} else {\n\t\tif(!caches) {\n\t\t\tcaches = Object.create(null);\n\t\t\tthis.caches[title] = caches;\n\t\t}\n\t\tcaches[cacheName] = initializer();\n\t\treturn caches[cacheName];\n\t}\n};\n\n// Clear all caches associated with a particular tiddler\nexports.clearCache = function(title) {\n\tthis.caches = this.caches || Object.create(null);\n\tif($tw.utils.hop(this.caches,title)) {\n\t\tdelete this.caches[title];\n\t}\n};\n\nexports.initParsers = function(moduleType) {\n\t// Install the parser modules\n\t$tw.Wiki.parsers = {};\n\tvar self = this;\n\t$tw.modules.forEachModuleOfType(\&quot;parser\&quot;,function(title,module) {\n\t\tfor(var f in module) {\n\t\t\tif($tw.utils.hop(module,f)) {\n\t\t\t\t$tw.Wiki.parsers[f] = module[f]; // Store the parser class\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\nParse a block of text of a specified MIME type\n\ttype: content type of text to be parsed\n\ttext: text\n\toptions: see below\nOptions include:\n\tparseAsInline: if true, the text of the tiddler will be parsed as an inline run\n\t_canonical_uri: optional string of the canonical URI of this content\n*/\nexports.old_parseText = function(type,text,options) {\n\toptions = options || {};\n\t// Select a parser\n\tvar Parser = $tw.Wiki.parsers[type];\n\tif(!Parser &amp;&amp; $tw.config.fileExtensionInfo[type]) {\n\t\tParser = $tw.Wiki.parsers[$tw.config.fileExtensionInfo[type].type];\n\t}\n\tif(!Parser) {\n\t\tParser = $tw.Wiki.parsers[options.defaultType || \&quot;text/vnd.tiddlywiki\&quot;];\n\t}\n\tif(!Parser) {\n\t\treturn null;\n\t}\n\t// Return the parser instance\n\treturn new Parser(type,text,{\n\t\tparseAsInline: options.parseAsInline,\n\t\twiki: this,\n\t\t_canonical_uri: options._canonical_uri\n\t});\n};\n\n/*\nParse a tiddler according to its MIME type\n*/\nexports.old_parseTiddler = function(title,options) {\n\toptions = $tw.utils.extend({},options);\n\tvar cacheType = options.parseAsInline ? \&quot;newInlineParseTree\&quot; : \&quot;newBlockParseTree\&quot;,\n\t\ttiddler = this.getTiddler(title),\n\t\tself = this;\n\treturn tiddler ? this.getCacheForTiddler(title,cacheType,function() {\n\t\t\tif(tiddler.hasField(\&quot;_canonical_uri\&quot;)) {\n\t\t\t\toptions._canonical_uri = tiddler.fields._canonical_uri;\n\t\t\t}\n\t\t\treturn self.old_parseText(tiddler.fields.type,tiddler.fields.text,options);\n\t\t}) : null;\n};\n\nvar tweakMacroDefinition = function(nodeList) {\n\tif(nodeList &amp;&amp; nodeList[0] &amp;&amp; nodeList[0].type === \&quot;macrodef\&quot;) {\n\t\tnodeList[0].type = \&quot;set\&quot;;\n\t\tnodeList[0].attributes = {\n\t\t\tname: {type: \&quot;string\&quot;, value: nodeList[0].name},\n\t\t\tvalue: {type: \&quot;string\&quot;, value: nodeList[0].text}\n\t\t};\n\t\tnodeList[0].children = nodeList.slice(1);\n\t\tnodeList.splice(1,nodeList.length-1);\n\t\ttweakMacroDefinition(nodeList[0].children);\n\t}\n};\n\nvar tweakParser = function(parser) {\n\t// Move any macro definitions to contain the body tree\n\ttweakMacroDefinition(parser.tree);\n};\n\nexports.parseText = function(type,text,options) {\n\tvar parser = this.old_parseText(type,text,options);\n\tif(parser) {\n\t\ttweakParser(parser)\n\t};\n\treturn parser;\n};\n\nexports.parseTiddler = function(title,options) {\n\tvar parser = this.old_parseTiddler(title,options);\n\tif(parser) {\n\t\ttweakParser(parser)\n\t};\n\treturn parser;\n};\n\nexports.parseTextReference = function(title,field,index,options) {\n\tif(field === \&quot;text\&quot; || (!field &amp;&amp; !index)) {\n\t\t// Force the tiddler to be lazily loaded\n\t\tthis.getTiddlerText(title);\n\t\t// Parse it\n\t\treturn this.parseTiddler(title,options);\n\t} else {\n\t\tvar text;\n\t\tif(field) {\n\t\t\tif(field === \&quot;title\&quot;) {\n\t\t\t\ttext = title;\n\t\t\t} else {\n\t\t\t\tvar tiddler = this.getTiddler(title);\n\t\t\t\tif(!tiddler || !tiddler.hasField(field)) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\ttext = tiddler.fields[field];\n\t\t\t}\n\t\t\treturn this.parseText(\&quot;text/vnd.tiddlywiki\&quot;,text.toString(),options);\n\t\t} else if(index) {\n\t\t\ttext = this.extractTiddlerDataItem(title,index,\&quot;\&quot;);\n\t\t\tif(text === undefined) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn this.parseText(\&quot;text/vnd.tiddlywiki\&quot;,text,options);\n\t\t}\n\t}\n};\n\n/*\nMake a widget tree for a parse tree\nparser: parser object\noptions: see below\nOptions include:\ndocument: optional document to use\nvariables: hashmap of variables to set\nparentWidget: optional parent widget for the root node\n*/\nexports.makeWidget = function(parser,options) {\n\toptions = options || {};\n\tvar widgetNode = {\n\t\t\ttype: \&quot;widget\&quot;,\n\t\t\tchildren: []\n\t\t},\n\t\tcurrWidgetNode = widgetNode;\n\t// Create set variable widgets for each variable\n\t$tw.utils.each(options.variables,function(value,name) {\n\t\tvar setVariableWidget = {\n\t\t\ttype: \&quot;set\&quot;,\n\t\t\tattributes: {\n\t\t\t\tname: {type: \&quot;string\&quot;, value: name},\n\t\t\t\tvalue: {type: \&quot;string\&quot;, value: value}\n\t\t\t},\n\t\t\tchildren: []\n\t\t};\n\t\tcurrWidgetNode.children = [setVariableWidget];\n\t\tcurrWidgetNode = setVariableWidget;\n\t});\n\t// Add in the supplied parse tree nodes\n\tcurrWidgetNode.children = parser ? parser.tree : [];\n\t// Create the widget\n\treturn new widget.widget(widgetNode,{\n\t\twiki: this,\n\t\tdocument: options.document || $tw.fakeDocument,\n\t\tparentWidget: options.parentWidget\n\t});\n};\n\n/*\nMake a widget tree for transclusion\ntitle: target tiddler title\noptions: as for wiki.makeWidget() (including parseAsInline)\n*/\nexports.makeTranscludeWidget = function(title,options) {\n\toptions = options || {};\n\tvar parseTree = {tree: [{\n\t\ttype: \&quot;transclude\&quot;,\n\t\tattributes: {\n\t\t\ttiddler: {\n\t\t\t\tname: \&quot;tiddler\&quot;,\n\t\t\t\ttype: \&quot;string\&quot;,\n\t\t\t\tvalue: title}},\n\t\tisBlock: !options.parseAsInline}\n\t]};\n\treturn $tw.wiki.makeWidget(parseTree,options);\n};\n\n/*\nParse text in a specified format and render it into another format\n\toutputType: content type for the output\n\ttextType: content type of the input text\n\ttext: input text\n\toptions: see below\nOptions include:\nvariables: hashmap of variables to set\nparentWidget: optional parent widget for the root node\n*/\nexports.renderText = function(outputType,textType,text,options) {\n\toptions = options || {};\n\tvar parser = this.parseText(textType,text,options),\n\t\twidgetNode = this.makeWidget(parser,options);\n\tvar container = $tw.fakeDocument.createElement(\&quot;div\&quot;);\n\twidgetNode.render(container,null);\n\treturn outputType === \&quot;text/html\&quot; ? container.innerHTML : container.textContent;\n};\n\n/*\nParse text from a tiddler and render it into another format\n\toutputType: content type for the output\n\ttitle: title of the tiddler to be rendered\n\toptions: see below\nOptions include:\nvariables: hashmap of variables to set\nparentWidget: optional parent widget for the root node\n*/\nexports.renderTiddler = function(outputType,title,options) {\n\toptions = options || {};\n\tvar parser = this.parseTiddler(title,options),\n\t\twidgetNode = this.makeWidget(parser,options);\n\tvar container = $tw.fakeDocument.createElement(\&quot;div\&quot;);\n\twidgetNode.render(container,null);\n\treturn outputType === \&quot;text/html\&quot; ? container.innerHTML : (outputType === \&quot;text/plain-formatted\&quot; ? container.formattedTextContent : container.textContent);\n};\n\n/*\nReturn an array of tiddler titles that match a search string\n\ttext: The text string to search for\n\toptions: see below\nOptions available:\n\tsource: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)\n\texclude: An array of tiddler titles to exclude from the search\n\tinvert: If true returns tiddlers that do not contain the specified string\n\tcaseSensitive: If true forces a case sensitive search\n\tliteral: If true, searches for literal string, rather than separate search terms\n*/\nexports.search = function(text,options) {\n\toptions = options || {};\n\tvar self = this,t;\n\t// Convert the search string into a regexp for each term\n\tvar terms, searchTermsRegExps,\n\t\tflags = options.caseSensitive ? \&quot;\&quot; : \&quot;i\&quot;;\n\tif(options.literal) {\n\t\tif(text.length === 0) {\n\t\t\tsearchTermsRegExps = null;\n\t\t} else {\n\t\t\tsearchTermsRegExps = [new RegExp(\&quot;(\&quot; + $tw.utils.escapeRegExp(text) + \&quot;)\&quot;,flags)];\n\t\t}\n\t} else {\n\t\tterms = text.split(/ +/);\n\t\tif(terms.length === 1 &amp;&amp; terms[0] === \&quot;\&quot;) {\n\t\t\tsearchTermsRegExps = null;\n\t\t} else {\n\t\t\tsearchTermsRegExps = [];\n\t\t\tfor(t=0; t&lt;terms.length; t++) {\n\t\t\t\tsearchTermsRegExps.push(new RegExp(\&quot;(\&quot; + $tw.utils.escapeRegExp(terms[t]) + \&quot;)\&quot;,flags));\n\t\t\t}\n\t\t}\n\t}\n\t// Function to check a given tiddler for the search term\n\tvar searchTiddler = function(title) {\n\t\tif(!searchTermsRegExps) {\n\t\t\treturn true;\n\t\t}\n\t\tvar tiddler = self.getTiddler(title);\n\t\tif(!tiddler) {\n\t\t\ttiddler = new $tw.Tiddler({title: title, text: \&quot;\&quot;, type: \&quot;text/vnd.tiddlywiki\&quot;});\n\t\t}\n\t\tvar contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type] || $tw.config.contentTypeInfo[\&quot;text/vnd.tiddlywiki\&quot;],\n\t\t\tmatch;\n\t\tfor(var t=0; t&lt;searchTermsRegExps.length; t++) {\n\t\t\t// Search title, tags and body\n\t\t\tmatch = false;\n\t\t\tif(contentTypeInfo.encoding === \&quot;utf8\&quot;) {\n\t\t\t\tmatch = match || searchTermsRegExps[t].test(tiddler.fields.text);\n\t\t\t}\n\t\t\tvar tags = tiddler.fields.tags ? tiddler.fields.tags.join(\&quot;\\0\&quot;) : \&quot;\&quot;;\n\t\t\tmatch = match || searchTermsRegExps[t].test(tags) || searchTermsRegExps[t].test(tiddler.fields.title);\n\t\t\tif(!match) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t};\n\t// Loop through all the tiddlers doing the search\n\tvar results = [],\n\t\tsource = options.source || this.each;\n\tsource(function(tiddler,title) {\n\t\tif(!!searchTiddler(title) === !options.invert) {\n\t\t\tresults.push(title);\n\t\t}\n\t});\n\t// Remove any of the results we have to exclude\n\tif(options.exclude) {\n\t\tfor(t=0; t&lt;options.exclude.length; t++) {\n\t\t\tvar p = results.indexOf(options.exclude[t]);\n\t\t\tif(p !== -1) {\n\t\t\t\tresults.splice(p,1);\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n};\n\n/*\nTrigger a load for a tiddler if it is skinny. Returns the text, or undefined if the tiddler is missing, null if the tiddler is being lazily loaded.\n*/\nexports.getTiddlerText = function(title,defaultText) {\n\tvar tiddler = this.getTiddler(title);\n\t// Return undefined if the tiddler isn't found\n\tif(!tiddler) {\n\t\treturn defaultText;\n\t}\n\tif(tiddler.fields.text !== undefined) {\n\t\t// Just return the text if we've got it\n\t\treturn tiddler.fields.text;\n\t} else {\n\t\t// Tell any listeners about the need to lazily load this tiddler\n\t\tthis.dispatchEvent(\&quot;lazyLoad\&quot;,title);\n\t\t// Indicate that the text is being loaded\n\t\treturn null;\n\t}\n};\n\n/*\nRead an array of browser File objects, invoking callback(tiddlerFieldsArray) once they're all read\n*/\nexports.readFiles = function(files,callback) {\n\tvar result = [],\n\t\toutstanding = files.length;\n\tfor(var f=0; f&lt;files.length; f++) {\n\t\tthis.readFile(files[f],function(tiddlerFieldsArray) {\n\t\t\tresult.push.apply(result,tiddlerFieldsArray);\n\t\t\tif(--outstanding === 0) {\n\t\t\t\tcallback(result);\n\t\t\t}\n\t\t});\n\t};\n\treturn files.length;\n};\n\n/*\nRead a browser File object, invoking callback(tiddlerFieldsArray) with an array of tiddler fields objects\n*/\nexports.readFile = function(file,callback) {\n\t// Get the type, falling back to the filename extension\n\tvar self = this,\n\t\ttype = file.type;\n\tif(type === \&quot;\&quot; || !type) {\n\t\tvar dotPos = file.name.lastIndexOf(\&quot;.\&quot;);\n\t\tif(dotPos !== -1) {\n\t\t\tvar fileExtensionInfo = $tw.config.fileExtensionInfo[file.name.substr(dotPos)];\n\t\t\tif(fileExtensionInfo) {\n\t\t\t\ttype = fileExtensionInfo.type;\n\t\t\t}\n\t\t}\n\t}\n\t// Figure out if we're reading a binary file\n\tvar contentTypeInfo = $tw.config.contentTypeInfo[type],\n\t\tisBinary = contentTypeInfo ? contentTypeInfo.encoding === \&quot;base64\&quot; : false;\n\t// Create the FileReader\n\tvar reader = new FileReader();\n\t// Onload\n\treader.onload = function(event) {\n\t\t// Deserialise the file contents\n\t\tvar text = event.target.result,\n\t\t\ttiddlerFields = {title: file.name || \&quot;Untitled\&quot;, type: type};\n\t\t// Are we binary?\n\t\tif(isBinary) {\n\t\t\t// The base64 section starts after the first comma in the data URI\n\t\t\tvar commaPos = text.indexOf(\&quot;,\&quot;);\n\t\t\tif(commaPos !== -1) {\n\t\t\t\ttiddlerFields.text = text.substr(commaPos+1);\n\t\t\t\tcallback([tiddlerFields]);\n\t\t\t}\n\t\t} else {\n\t\t\t// Check whether this is an encrypted TiddlyWiki file\n\t\t\tvar encryptedJson = $tw.utils.extractEncryptedStoreArea(text);\n\t\t\tif(encryptedJson) {\n\t\t\t\t// If so, attempt to decrypt it with the current password\n\t\t\t\t$tw.utils.decryptStoreAreaInteractive(encryptedJson,function(tiddlers) {\n\t\t\t\t\tcallback(tiddlers);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Otherwise, just try to deserialise any tiddlers in the file\n\t\t\t\tcallback(self.deserializeTiddlers(type,text,tiddlerFields));\n\t\t\t}\n\t\t}\n\t};\n\t// Kick off the read\n\tif(isBinary) {\n\t\treader.readAsDataURL(file);\n\t} else {\n\t\treader.readAsText(file);\n\t}\n};\n\n/*\nCheck whether the specified draft tiddler has been modified\n*/\nexports.isDraftModified = function(title) {\n\tvar tiddler = this.getTiddler(title);\n\tif(!tiddler.isDraft()) {\n\t\treturn false;\n\t}\n\tvar ignoredFields = [\&quot;created\&quot;, \&quot;modified\&quot;, \&quot;title\&quot;, \&quot;draft.title\&quot;, \&quot;draft.of\&quot;],\n\t\torigTiddler = this.getTiddler(tiddler.fields[\&quot;draft.of\&quot;]);\n\tif(!origTiddler) {\n\t\treturn true;\n\t}\n\treturn !tiddler.isEqual(origTiddler,ignoredFields);\n};\n\n/*\nAdd a new record to the top of the history stack\ntitle: a title string or an array of title strings\nfromPageRect: page coordinates of the origin of the navigation\nhistoryTitle: title of history tiddler (defaults to $:/HistoryList)\n*/\nexports.addToHistory = function(title,fromPageRect,historyTitle) {\n\thistoryTitle = historyTitle || \&quot;$:/HistoryList\&quot;;\n\tvar titles = $tw.utils.isArray(title) ? title : [title];\n\t// Add a new record to the top of the history stack\n\tvar historyList = this.getTiddlerData(historyTitle,[]);\n\t$tw.utils.each(titles,function(title) {\n\t\thistoryList.push({title: title, fromPageRect: fromPageRect});\n\t});\n\tthis.setTiddlerData(historyTitle,historyList,{\&quot;current-tiddler\&quot;: titles[titles.length-1]});\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/core/modules/wiki.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;wikimethod&quot;
        },
        &quot;$:/palettes/Blanca&quot;: {
            &quot;title&quot;: &quot;$:/palettes/Blanca&quot;,
            &quot;name&quot;: &quot;Blanca&quot;,
            &quot;description&quot;: &quot;A clean white palette to let you focus&quot;,
            &quot;tags&quot;: &quot;$:/tags/Palette&quot;,
            &quot;type&quot;: &quot;application/x-tiddler-dictionary&quot;,
            &quot;text&quot;: &quot;alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: &lt;&lt;colour muted-foreground&gt;&gt;\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndownload-background: #66cccc\ndownload-foreground: &lt;&lt;colour background&gt;&gt;\ndragger-background: &lt;&lt;colour foreground&gt;&gt;\ndragger-foreground: &lt;&lt;colour background&gt;&gt;\ndropdown-background: &lt;&lt;colour background&gt;&gt;\ndropdown-border: &lt;&lt;colour muted-foreground&gt;&gt;\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: \nexternal-link-background-visited: \nexternal-link-background: \nexternal-link-foreground-hover: \nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: &lt;&lt;colour foreground&gt;&gt;\nmodal-background: &lt;&lt;colour background&gt;&gt;\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #ffffff\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #7897f3\nsidebar-button-foreground: &lt;&lt;colour foreground&gt;&gt;\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ccc\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #ffffff\nsidebar-tab-background: &lt;&lt;colour tab-background&gt;&gt;\nsidebar-tab-border-selected: &lt;&lt;colour tab-border-selected&gt;&gt;\nsidebar-tab-border: &lt;&lt;colour tab-border&gt;&gt;\nsidebar-tab-divider: &lt;&lt;colour tab-divider&gt;&gt;\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: &lt;&lt;colour tab-foreground&gt;&gt;\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #7897f3\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #fffffffff\ntab-background: #eeeeee\ntab-border-selected: #cccccc\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: &lt;&lt;colour tab-foreground&gt;&gt;\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ffeedd\ntag-foreground: #000\ntiddler-background: &lt;&lt;colour background&gt;&gt;\ntiddler-border: #eee\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: &lt;&lt;colour background&gt;&gt;\ntiddler-link-foreground: &lt;&lt;colour primary&gt;&gt;\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #ff9900\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n&quot;
        },
        &quot;$:/palettes/Blue&quot;: {
            &quot;title&quot;: &quot;$:/palettes/Blue&quot;,
            &quot;name&quot;: &quot;Blue&quot;,
            &quot;description&quot;: &quot;A blue theme&quot;,
            &quot;tags&quot;: &quot;$:/tags/Palette&quot;,
            &quot;type&quot;: &quot;application/x-tiddler-dictionary&quot;,
            &quot;text&quot;: &quot;alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #fff\nblockquote-bar: &lt;&lt;colour muted-foreground&gt;&gt;\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndownload-background: #34c734\ndownload-foreground: &lt;&lt;colour foreground&gt;&gt;\ndragger-background: &lt;&lt;colour foreground&gt;&gt;\ndragger-foreground: &lt;&lt;colour background&gt;&gt;\ndropdown-background: &lt;&lt;colour background&gt;&gt;\ndropdown-border: &lt;&lt;colour muted-foreground&gt;&gt;\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: \nexternal-link-background-visited: \nexternal-link-background: \nexternal-link-foreground-hover: \nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333353\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: &lt;&lt;colour foreground&gt;&gt;\nmodal-background: &lt;&lt;colour background&gt;&gt;\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #ddddff\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #5778d8\nsidebar-button-foreground: &lt;&lt;colour foreground&gt;&gt;\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ffffff\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: &lt;&lt;colour page-background&gt;&gt;\nsidebar-tab-background: &lt;&lt;colour tab-background&gt;&gt;\nsidebar-tab-border-selected: &lt;&lt;colour tab-border-selected&gt;&gt;\nsidebar-tab-border: &lt;&lt;colour tab-border&gt;&gt;\nsidebar-tab-divider: &lt;&lt;colour tab-divider&gt;&gt;\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: &lt;&lt;colour tab-foreground&gt;&gt;\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #5959c0\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: &lt;&lt;colour background&gt;&gt;\ntab-background: #ccccdd\ntab-border-selected: #ccccdd\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: &lt;&lt;colour tab-foreground&gt;&gt;\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #eeeeff\ntag-foreground: #000\ntiddler-background: &lt;&lt;colour background&gt;&gt;\ntiddler-border: &lt;&lt;colour background&gt;&gt;\ntiddler-controls-foreground-hover: #666666\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #ffffff\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #ffffff\ntiddler-link-background: &lt;&lt;colour background&gt;&gt;\ntiddler-link-foreground: &lt;&lt;colour primary&gt;&gt;\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #5959c0\ntoolbar-new-button: #5eb95e\ntoolbar-options-button: rgb(128, 88, 165)\ntoolbar-save-button: #0e90d2\ntoolbar-info-button: #0e90d2\ntoolbar-edit-button: rgb(243, 123, 29)\ntoolbar-close-button: #dd514c\ntoolbar-delete-button: #dd514c\ntoolbar-cancel-button: rgb(243, 123, 29)\ntoolbar-done-button: #5eb95e\nuntagged-background: #999999\nvery-muted-foreground: #888888\n&quot;
        },
        &quot;$:/palettes/Muted&quot;: {
            &quot;title&quot;: &quot;$:/palettes/Muted&quot;,
            &quot;name&quot;: &quot;Muted&quot;,
            &quot;description&quot;: &quot;Bright tiddlers on a muted background&quot;,
            &quot;tags&quot;: &quot;$:/tags/Palette&quot;,
            &quot;type&quot;: &quot;application/x-tiddler-dictionary&quot;,
            &quot;text&quot;: &quot;alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: &lt;&lt;colour muted-foreground&gt;&gt;\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndownload-background: #34c734\ndownload-foreground: &lt;&lt;colour background&gt;&gt;\ndragger-background: &lt;&lt;colour foreground&gt;&gt;\ndragger-foreground: &lt;&lt;colour background&gt;&gt;\ndropdown-background: &lt;&lt;colour background&gt;&gt;\ndropdown-border: &lt;&lt;colour muted-foreground&gt;&gt;\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: \nexternal-link-background-visited: \nexternal-link-background: \nexternal-link-foreground-hover: \nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: &lt;&lt;colour foreground&gt;&gt;\nmodal-background: &lt;&lt;colour background&gt;&gt;\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #bbb\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #6f6f70\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #29a6ee\nsidebar-button-foreground: &lt;&lt;colour foreground&gt;&gt;\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #c2c1c2\nsidebar-foreground-shadow: rgba(255,255,255,0)\nsidebar-foreground: #d3d2d4\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #6f6f70\nsidebar-tab-background: #666667\nsidebar-tab-border-selected: #999\nsidebar-tab-border: #515151\nsidebar-tab-divider: #999\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: #999\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #d1d0d2\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: &lt;&lt;colour tab-foreground&gt;&gt;\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #d5ad34\ntag-foreground: #ffffff\ntiddler-background: &lt;&lt;colour background&gt;&gt;\ntiddler-border: &lt;&lt;colour background&gt;&gt;\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: &lt;&lt;colour background&gt;&gt;\ntiddler-link-foreground: &lt;&lt;colour primary&gt;&gt;\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #182955\ntoolbar-new-button: \ntoolbar-options-button: \ntoolbar-save-button: \ntoolbar-info-button: \ntoolbar-edit-button: \ntoolbar-close-button: \ntoolbar-delete-button: \ntoolbar-cancel-button: \ntoolbar-done-button: \nuntagged-background: #999999\nvery-muted-foreground: #888888\n&quot;
        },
        &quot;$:/palettes/Contrast&quot;: {
            &quot;title&quot;: &quot;$:/palettes/Contrast&quot;,
            &quot;name&quot;: &quot;Contrast&quot;,
            &quot;description&quot;: &quot;High contrast and unambiguous&quot;,
            &quot;tags&quot;: &quot;$:/tags/Palette&quot;,
            &quot;type&quot;: &quot;application/x-tiddler-dictionary&quot;,
            &quot;text&quot;: &quot;alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: &lt;&lt;colour muted-foreground&gt;&gt;\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndownload-background: #34c734\ndownload-foreground: &lt;&lt;colour background&gt;&gt;\ndragger-background: &lt;&lt;colour foreground&gt;&gt;\ndragger-foreground: &lt;&lt;colour background&gt;&gt;\ndropdown-background: &lt;&lt;colour background&gt;&gt;\ndropdown-border: &lt;&lt;colour muted-foreground&gt;&gt;\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: \nexternal-link-background-visited: \nexternal-link-background: \nexternal-link-foreground-hover: \nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: &lt;&lt;colour foreground&gt;&gt;\nmodal-background: &lt;&lt;colour background&gt;&gt;\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #000000\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #5778d8\nsidebar-button-foreground: &lt;&lt;colour foreground&gt;&gt;\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ffffff\nsidebar-foreground-shadow: rgba(255,0,0, 0.5)\nsidebar-foreground: #ffffff\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #ececec\nsidebar-tab-background: &lt;&lt;colour tab-background&gt;&gt;\nsidebar-tab-border-selected: &lt;&lt;colour tab-border-selected&gt;&gt;\nsidebar-tab-border: &lt;&lt;colour tab-border&gt;&gt;\nsidebar-tab-divider: &lt;&lt;colour tab-divider&gt;&gt;\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: &lt;&lt;colour tab-foreground&gt;&gt;\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #999999\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: &lt;&lt;colour tab-foreground&gt;&gt;\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #d5ad34\ntag-foreground: #ffffff\ntiddler-background: &lt;&lt;colour background&gt;&gt;\ntiddler-border: &lt;&lt;colour background&gt;&gt;\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: &lt;&lt;colour background&gt;&gt;\ntiddler-link-foreground: &lt;&lt;colour primary&gt;&gt;\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #182955\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n&quot;
        },
        &quot;$:/palettes/Rocker&quot;: {
            &quot;title&quot;: &quot;$:/palettes/Rocker&quot;,
            &quot;name&quot;: &quot;Rocker&quot;,
            &quot;description&quot;: &quot;A dark theme&quot;,
            &quot;tags&quot;: &quot;$:/tags/Palette&quot;,
            &quot;type&quot;: &quot;application/x-tiddler-dictionary&quot;,
            &quot;text&quot;: &quot;alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: &lt;&lt;colour muted-foreground&gt;&gt;\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndownload-background: #34c734\ndownload-foreground: &lt;&lt;colour background&gt;&gt;\ndragger-background: &lt;&lt;colour foreground&gt;&gt;\ndragger-foreground: &lt;&lt;colour background&gt;&gt;\ndropdown-background: &lt;&lt;colour background&gt;&gt;\ndropdown-border: &lt;&lt;colour muted-foreground&gt;&gt;\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: \nexternal-link-background-visited: \nexternal-link-background: \nexternal-link-foreground-hover: \nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: &lt;&lt;colour foreground&gt;&gt;\nmodal-background: &lt;&lt;colour background&gt;&gt;\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #000\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #cc0000\nsidebar-button-foreground: &lt;&lt;colour foreground&gt;&gt;\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ffffff\nsidebar-foreground-shadow: rgba(255,255,255, 0.0)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #000\nsidebar-tab-background: &lt;&lt;colour tab-background&gt;&gt;\nsidebar-tab-border-selected: &lt;&lt;colour tab-border-selected&gt;&gt;\nsidebar-tab-border: &lt;&lt;colour tab-border&gt;&gt;\nsidebar-tab-divider: &lt;&lt;colour tab-divider&gt;&gt;\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: &lt;&lt;colour tab-foreground&gt;&gt;\nsidebar-tiddler-link-foreground-hover: #ffbb99\nsidebar-tiddler-link-foreground: #cc0000\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: &lt;&lt;colour tab-foreground&gt;&gt;\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ffbb99\ntag-foreground: #000\ntiddler-background: &lt;&lt;colour background&gt;&gt;\ntiddler-border: &lt;&lt;colour background&gt;&gt;\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: &lt;&lt;colour background&gt;&gt;\ntiddler-link-foreground: &lt;&lt;colour primary&gt;&gt;\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #cc0000\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n&quot;
        },
        &quot;$:/palettes/Vanilla&quot;: {
            &quot;title&quot;: &quot;$:/palettes/Vanilla&quot;,
            &quot;name&quot;: &quot;Vanilla&quot;,
            &quot;description&quot;: &quot;Pale and unobtrusive&quot;,
            &quot;tags&quot;: &quot;$:/tags/Palette&quot;,
            &quot;type&quot;: &quot;application/x-tiddler-dictionary&quot;,
            &quot;text&quot;: &quot;alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: &lt;&lt;colour muted-foreground&gt;&gt;\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndownload-background: #34c734\ndownload-foreground: &lt;&lt;colour background&gt;&gt;\ndragger-background: &lt;&lt;colour foreground&gt;&gt;\ndragger-foreground: &lt;&lt;colour background&gt;&gt;\ndropdown-background: &lt;&lt;colour background&gt;&gt;\ndropdown-border: &lt;&lt;colour muted-foreground&gt;&gt;\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: \nexternal-link-background-visited: \nexternal-link-background: \nexternal-link-foreground-hover: \nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: &lt;&lt;colour foreground&gt;&gt;\nmodal-background: &lt;&lt;colour background&gt;&gt;\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #bbb\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #ececec\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #5778d8\nsidebar-button-foreground: &lt;&lt;colour foreground&gt;&gt;\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ffffff\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #ececec\nsidebar-tab-background: &lt;&lt;colour tab-background&gt;&gt;\nsidebar-tab-border-selected: &lt;&lt;colour tab-border-selected&gt;&gt;\nsidebar-tab-border: &lt;&lt;colour tab-border&gt;&gt;\nsidebar-tab-divider: #e4e4e4\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: &lt;&lt;colour tab-foreground&gt;&gt;\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #999999\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: &lt;&lt;colour tab-foreground&gt;&gt;\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #d5ad34\ntag-foreground: #ffffff\ntiddler-background: &lt;&lt;colour background&gt;&gt;\ntiddler-border: &lt;&lt;colour background&gt;&gt;\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: &lt;&lt;colour background&gt;&gt;\ntiddler-link-foreground: &lt;&lt;colour primary&gt;&gt;\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #182955\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n&quot;
        },
        &quot;$:/core/templates/MOTW.html&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/MOTW.html&quot;,
            &quot;text&quot;: &quot;\\rules only filteredtranscludeinline transcludeinline entity\n&lt;!-- The following comment is called a MOTW comment and is necessary for the TiddlyIE Internet Explorer extension --&gt;\n&lt;!-- saved from url=(0021)http://tiddlywiki.com --&gt;&amp;#13;&amp;#10;&quot;
        },
        &quot;$:/core/templates/alltiddlers.content&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/alltiddlers.content&quot;,
            &quot;text&quot;: &quot;{{{ [!is[system]sort[title]] ||$:/core/templates/static-tiddler}}}&quot;
        },
        &quot;$:/core/templates/alltiddlers.template.html&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/alltiddlers.template.html&quot;,
            &quot;type&quot;: &quot;text/vnd.tiddlywiki-html&quot;,
            &quot;text&quot;: &quot;\\define tw-wikilink-template() #$uri_encoded$\n\\rules only filteredtranscludeinline transcludeinline\n&lt;!doctype html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html;charset=utf-8\&quot; /&gt;\n&lt;meta name=\&quot;generator\&quot; content=\&quot;TiddlyWiki\&quot; /&gt;\n&lt;meta name=\&quot;tiddlywiki-version\&quot; content=\&quot;{{$:/core/templates/version}}\&quot; /&gt;\n&lt;meta name=\&quot;format-detection\&quot; content=\&quot;telephone=no\&quot;&gt;\n&lt;link id=\&quot;faviconLink\&quot; rel=\&quot;shortcut icon\&quot; href=\&quot;favicon.ico\&quot;&gt;\n&lt;title&gt;{{$:/core/wiki/title}}&lt;/title&gt;\n&lt;div id=\&quot;styleArea\&quot;&gt;\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\n&lt;/div&gt;\n&lt;style type=\&quot;text/css\&quot;&gt;\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\n&lt;/style&gt;\n&lt;/head&gt;\n&lt;body class=\&quot;tw-body\&quot;&gt;\n{{$:/StaticBanner||$:/core/templates/html-tiddler}}\n&lt;section class=\&quot;story-river\&quot;&gt;\n{{$:/core/templates/alltiddlers.content||$:/core/templates/html-tiddler}}\n&lt;/section&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n&quot;
        },
        &quot;$:/core/templates/canonical-uri-external-image&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/canonical-uri-external-image&quot;,
            &quot;text&quot;: &quot;&lt;!--\n\nThis template is used to assign the ''_canonical_uri'' field to external images.\n\nChange the `./images/` part to a different base URI. The URI can be relative or absolute.\n\n--&gt;\n./images/&lt;$view field=\&quot;title\&quot; format=\&quot;doubleurlencoded\&quot;/&gt;&quot;
        },
        &quot;$:/core/templates/css-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/css-tiddler&quot;,
            &quot;text&quot;: &quot;&lt;!--\n\nThis template is used for saving CSS tiddlers as a style tag with data attributes representing the tiddler fields.\n\n--&gt;`&lt;style`&lt;$fields template=' data-tiddler-$name$=\&quot;$encoded_value$\&quot;'&gt;&lt;/$fields&gt;` type=\&quot;text/css\&quot;&gt;`&lt;$view field=\&quot;text\&quot; format=\&quot;text\&quot; /&gt;`&lt;/style&gt;`&quot;
        },
        &quot;$:/core/templates/html-div-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/html-div-tiddler&quot;,
            &quot;text&quot;: &quot;&lt;!--\n\nThis template is used for saving tiddlers as an HTML DIV tag with attributes representing the tiddler fields.\n\n--&gt;`&lt;div`&lt;$fields template=' $name$=\&quot;$encoded_value$\&quot;'&gt;&lt;/$fields&gt;`&gt;\n&lt;pre&gt;`&lt;$view field=\&quot;text\&quot; format=\&quot;htmlencoded\&quot; /&gt;`&lt;/pre&gt;\n&lt;/div&gt;`\n&quot;
        },
        &quot;$:/core/templates/html-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/html-tiddler&quot;,
            &quot;text&quot;: &quot;&lt;!--\n\nThis template is used for saving tiddlers as raw HTML\n\n--&gt;&lt;$view field=\&quot;text\&quot; format=\&quot;htmlwikified\&quot; /&gt;&quot;
        },
        &quot;$:/core/templates/javascript-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/javascript-tiddler&quot;,
            &quot;text&quot;: &quot;&lt;!--\n\nThis template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields.\n\n--&gt;`&lt;script`&lt;$fields template=' data-tiddler-$name$=\&quot;$encoded_value$\&quot;'&gt;&lt;/$fields&gt;` type=\&quot;text/javascript\&quot;&gt;`&lt;$view field=\&quot;text\&quot; format=\&quot;text\&quot; /&gt;`&lt;/script&gt;`&quot;
        },
        &quot;$:/core/templates/module-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/module-tiddler&quot;,
            &quot;text&quot;: &quot;&lt;!--\n\nThis template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields. The body of the tiddler is wrapped in a call to the `$tw.modules.define` function in order to define the body of the tiddler as a module\n\n--&gt;`&lt;script`&lt;$fields template=' data-tiddler-$name$=\&quot;$encoded_value$\&quot;'&gt;&lt;/$fields&gt;` type=\&quot;text/javascript\&quot; data-module=\&quot;yes\&quot;&gt;$tw.modules.define(\&quot;`&lt;$view field=\&quot;title\&quot; format=\&quot;jsencoded\&quot; /&gt;`\&quot;,\&quot;`&lt;$view field=\&quot;module-type\&quot; format=\&quot;jsencoded\&quot; /&gt;`\&quot;,function(module,exports,require) {`&lt;$view field=\&quot;text\&quot; format=\&quot;text\&quot; /&gt;`});\n&lt;/script&gt;`&quot;
        },
        &quot;$:/core/templates/plain-text-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/plain-text-tiddler&quot;,
            &quot;text&quot;: &quot;&lt;$view field=\&quot;text\&quot; format=\&quot;text\&quot; /&gt;&quot;
        },
        &quot;$:/core/save/all&quot;: {
            &quot;title&quot;: &quot;$:/core/save/all&quot;,
            &quot;text&quot;: &quot;\\define saveTiddlerFilter()\n[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]\n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n&quot;
        },
        &quot;$:/core/save/empty&quot;: {
            &quot;title&quot;: &quot;$:/core/save/empty&quot;,
            &quot;text&quot;: &quot;\\define saveTiddlerFilter()\n[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]\n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n&quot;
        },
        &quot;$:/core/save/lazy-images&quot;: {
            &quot;title&quot;: &quot;$:/core/save/lazy-images&quot;,
            &quot;text&quot;: &quot;\\define saveTiddlerFilter()\n[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]] \n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n&quot;
        },
        &quot;$:/core/templates/split-recipe&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/split-recipe&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[!is[system]]\&quot;&gt;\ntiddler: &lt;$view field=\&quot;title\&quot; format=\&quot;urlencoded\&quot;/&gt;.tid\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/templates/static-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/static-tiddler&quot;,
            &quot;text&quot;: &quot;&lt;a name=&lt;&lt;currentTiddler&gt;&gt;&gt;\n&lt;$transclude tiddler=\&quot;$:/core/ui/ViewTemplate\&quot;/&gt;\n&lt;/a&gt;&quot;
        },
        &quot;$:/core/templates/static.area&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/static.area&quot;,
            &quot;text&quot;: &quot;&lt;$reveal type=\&quot;nomatch\&quot; state=\&quot;$:/isEncrypted\&quot; text=\&quot;yes\&quot;&gt;\n{{$:/core/templates/static.content||$:/core/templates/html-tiddler}}\n&lt;/$reveal&gt;\n&lt;$reveal type=\&quot;match\&quot; state=\&quot;$:/isEncrypted\&quot; text=\&quot;yes\&quot;&gt;\nThis file contains an encrypted ~TiddlyWiki. Enable ~JavaScript and enter the decryption password when prompted.\n&lt;/$reveal&gt;\n&quot;
        },
        &quot;$:/core/templates/static.content&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/static.content&quot;,
            &quot;type&quot;: &quot;text/vnd.tiddlywiki&quot;,
            &quot;text&quot;: &quot;&lt;!-- For Google, and people without JavaScript--&gt;\nThis [[TiddlyWiki|http://tiddlywiki.com]] contains the following tiddlers:\n\n&lt;ul&gt;\n&lt;$list filter=&lt;&lt;saveTiddlerFilter&gt;&gt;&gt;\n&lt;li&gt;&lt;$view field=\&quot;title\&quot; format=\&quot;text\&quot;&gt;&lt;/$view&gt;&lt;/li&gt;\n&lt;/$list&gt;\n&lt;/ul&gt;\n&quot;
        },
        &quot;$:/core/templates/static.template.css&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/static.template.css&quot;,
            &quot;text&quot;: &quot;{{$:/boot/boot.css||$:/core/templates/plain-text-tiddler}}\n\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\n&quot;
        },
        &quot;$:/core/templates/static.template.html&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/static.template.html&quot;,
            &quot;type&quot;: &quot;text/vnd.tiddlywiki-html&quot;,
            &quot;text&quot;: &quot;\\define tw-wikilink-template() static/$uri_doubleencoded$.html\n\\rules only filteredtranscludeinline transcludeinline\n&lt;!doctype html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html;charset=utf-8\&quot; /&gt;\n&lt;meta name=\&quot;generator\&quot; content=\&quot;TiddlyWiki\&quot; /&gt;\n&lt;meta name=\&quot;tiddlywiki-version\&quot; content=\&quot;{{$:/core/templates/version}}\&quot; /&gt;\n&lt;meta name=\&quot;format-detection\&quot; content=\&quot;telephone=no\&quot;&gt;\n&lt;link id=\&quot;faviconLink\&quot; rel=\&quot;shortcut icon\&quot; href=\&quot;favicon.ico\&quot;&gt;\n&lt;title&gt;{{$:/core/wiki/title}}&lt;/title&gt;\n&lt;div id=\&quot;styleArea\&quot;&gt;\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\n&lt;/div&gt;\n&lt;style type=\&quot;text/css\&quot;&gt;\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\n&lt;/style&gt;\n&lt;/head&gt;\n&lt;body class=\&quot;tw-body\&quot;&gt;\n{{$:/StaticBanner||$:/core/templates/html-tiddler}}\n{{$:/core/ui/PageTemplate||$:/core/templates/html-tiddler}}\n&lt;/body&gt;\n&lt;/html&gt;\n&quot;
        },
        &quot;$:/core/templates/static.tiddler.html&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/static.tiddler.html&quot;,
            &quot;text&quot;: &quot;\\define tw-wikilink-template() $uri_doubleencoded$.html\n`&lt;!doctype html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html;charset=utf-8\&quot; /&gt;\n&lt;meta name=\&quot;generator\&quot; content=\&quot;TiddlyWiki\&quot; /&gt;\n&lt;meta name=\&quot;tiddlywiki-version\&quot; content=\&quot;`{{$:/core/templates/version}}`\&quot; /&gt;\n&lt;meta name=\&quot;format-detection\&quot; content=\&quot;telephone=no\&quot;&gt;\n&lt;link id=\&quot;faviconLink\&quot; rel=\&quot;shortcut icon\&quot; href=\&quot;favicon.ico\&quot;&gt;\n&lt;link rel=\&quot;stylesheet\&quot; href=\&quot;static.css\&quot;&gt;\n&lt;title&gt;`{{$:/core/wiki/title}}`&lt;/title&gt;\n&lt;/head&gt;\n&lt;body class=\&quot;tw-body\&quot;&gt;\n`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`\n&lt;section class=\&quot;story-river\&quot;&gt;\n`&lt;$importvariables filter=\&quot;[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\&quot;&gt;\n&lt;$view tiddler=\&quot;$:/core/ui/ViewTemplate\&quot; format=\&quot;htmlwikified\&quot;/&gt;\n&lt;/$importvariables&gt;`\n&lt;/section&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n`&quot;
        },
        &quot;$:/core/templates/store.area.template.html&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/store.area.template.html&quot;,
            &quot;text&quot;: &quot;&lt;$reveal type=\&quot;nomatch\&quot; state=\&quot;$:/isEncrypted\&quot; text=\&quot;yes\&quot;&gt;\n`&lt;div id=\&quot;storeArea\&quot; style=\&quot;display:none;\&quot;&gt;`\n&lt;$list filter=&lt;&lt;saveTiddlerFilter&gt;&gt; template=\&quot;$:/core/templates/html-div-tiddler\&quot;/&gt;\n`&lt;/div&gt;`\n&lt;/$reveal&gt;\n&lt;$reveal type=\&quot;match\&quot; state=\&quot;$:/isEncrypted\&quot; text=\&quot;yes\&quot;&gt;\n`&lt;!--~~ Encrypted tiddlers ~~--&gt;`\n`&lt;pre id=\&quot;encryptedStoreArea\&quot; type=\&quot;text/plain\&quot; style=\&quot;display:none;\&quot;&gt;`\n&lt;$encrypt filter=&lt;&lt;saveTiddlerFilter&gt;&gt;/&gt;\n`&lt;/pre&gt;`\n&lt;/$reveal&gt;&quot;
        },
        &quot;$:/core/templates/tid-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/tid-tiddler&quot;,
            &quot;text&quot;: &quot;&lt;!--\n\nThis template is used for saving tiddlers in TiddlyWeb *.tid format\n\n--&gt;&lt;$fields exclude='text bag' template='$name$: $value$\n'&gt;&lt;/$fields&gt;`\n`&lt;$view field=\&quot;text\&quot; format=\&quot;text\&quot; /&gt;&quot;
        },
        &quot;$:/core/templates/tiddler-metadata&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/tiddler-metadata&quot;,
            &quot;text&quot;: &quot;&lt;!--\n\nThis template is used for saving tiddler metadata *.meta files\n\n--&gt;&lt;$fields exclude='text bag' template='$name$: $value$\n'&gt;&lt;/$fields&gt;&quot;
        },
        &quot;$:/core/templates/tiddlywiki5.html&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/tiddlywiki5.html&quot;,
            &quot;text&quot;: &quot;\\rules only filteredtranscludeinline transcludeinline\n&lt;!doctype html&gt;\n{{$:/core/templates/MOTW.html}}&lt;html&gt;\n&lt;head&gt;\n&lt;meta http-equiv=\&quot;X-UA-Compatible\&quot; content=\&quot;IE=edge\&quot; /&gt;\t\t&lt;!-- Force IE standards mode for Intranet and HTA - should be the first meta --&gt;\n&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html;charset=utf-8\&quot; /&gt;\n&lt;meta name=\&quot;application-name\&quot; content=\&quot;TiddlyWiki\&quot; /&gt;\n&lt;meta name=\&quot;generator\&quot; content=\&quot;TiddlyWiki\&quot; /&gt;\n&lt;meta name=\&quot;tiddlywiki-version\&quot; content=\&quot;{{$:/core/templates/version}}\&quot; /&gt;\n&lt;meta name=\&quot;viewport\&quot; content=\&quot;width=device-width, initial-scale=1.0\&quot; /&gt;\n&lt;meta name=\&quot;apple-mobile-web-app-capable\&quot; content=\&quot;yes\&quot; /&gt;\n&lt;meta name=\&quot;apple-mobile-web-app-status-bar-style\&quot; content=\&quot;black-translucent\&quot; /&gt;\n&lt;meta name=\&quot;format-detection\&quot; content=\&quot;telephone=no\&quot; /&gt;\n&lt;meta name=\&quot;copyright\&quot; content=\&quot;{{$:/core/copyright.txt}}\&quot; /&gt;\n&lt;link id=\&quot;faviconLink\&quot; rel=\&quot;shortcut icon\&quot; href=\&quot;favicon.ico\&quot;&gt;\n&lt;title&gt;{{$:/core/wiki/title}}&lt;/title&gt;\n&lt;!--~~ This is a Tiddlywiki file. The points of interest in the file are marked with this pattern ~~--&gt;\n\n&lt;!--~~ Raw markup ~~--&gt;\n{{{ [all[shadows+tiddlers]tag[$:/core/wiki/rawmarkup]] [all[shadows+tiddlers]tag[$:/tags/RawMarkup]] ||$:/core/templates/plain-text-tiddler}}}\n&lt;/head&gt;\n&lt;body class=\&quot;tw-body\&quot;&gt;\n&lt;!--~~ Static styles ~~--&gt;\n&lt;div id=\&quot;styleArea\&quot;&gt;\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\n&lt;/div&gt;\n&lt;!--~~ Static content for Google and browsers without JavaScript ~~--&gt;\n&lt;noscript&gt;\n&lt;div id=\&quot;splashArea\&quot;&gt;\n{{$:/core/templates/static.area}}\n&lt;/div&gt;\n&lt;/noscript&gt;\n&lt;!--~~ Ordinary tiddlers ~~--&gt;\n{{$:/core/templates/store.area.template.html}}\n&lt;!--~~ Library modules ~~--&gt;\n&lt;div id=\&quot;libraryModules\&quot; style=\&quot;display:none;\&quot;&gt;\n{{{ [is[system]type[application/javascript]library[yes]] ||$:/core/templates/javascript-tiddler}}}\n&lt;/div&gt;\n&lt;!--~~ Boot kernel prologue ~~--&gt;\n&lt;div id=\&quot;bootKernelPrefix\&quot; style=\&quot;display:none;\&quot;&gt;\n{{ $:/boot/bootprefix.js ||$:/core/templates/javascript-tiddler}}\n&lt;/div&gt;\n&lt;!--~~ Boot kernel ~~--&gt;\n&lt;div id=\&quot;bootKernel\&quot; style=\&quot;display:none;\&quot;&gt;\n{{ $:/boot/boot.js ||$:/core/templates/javascript-tiddler}}\n&lt;/div&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n&quot;
        },
        &quot;$:/core/templates/version&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/version&quot;,
            &quot;text&quot;: &quot;&lt;&lt;version&gt;&gt;&quot;
        },
        &quot;$:/core/templates/wikified-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/templates/wikified-tiddler&quot;,
            &quot;text&quot;: &quot;&lt;$transclude /&gt;&quot;
        },
        &quot;$:/core/ui/AdvancedSearch/Filter&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/AdvancedSearch/Filter&quot;,
            &quot;tags&quot;: &quot;$:/tags/AdvancedSearch&quot;,
            &quot;caption&quot;: &quot;{{$:/language/Search/Filter/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/Search/\n&lt;$linkcatcher to=\&quot;$:/temp/advancedsearch\&quot;&gt;\n\n&lt;&lt;lingo Filter/Hint&gt;&gt;\n\n&lt;div class=\&quot;tw-search tw-advanced-search\&quot;&gt;&lt;$edit-text tiddler=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;search\&quot; tag=\&quot;input\&quot;/&gt; &lt;$button popup=&lt;&lt;qualify \&quot;$:/state/filterDropdown\&quot;&gt;&gt; class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/down-arrow}}&lt;/$button&gt; &lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt; &lt;$link to=\&quot;\&quot; class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/close-button}}&lt;/$link&gt;&lt;/$reveal&gt;&lt;/div&gt;\n\n&lt;div class=\&quot;tw-block-dropdown-wrapper\&quot;&gt;\n&lt;$reveal state=&lt;&lt;qualify \&quot;$:/state/filterDropdown\&quot;&gt;&gt; type=\&quot;nomatch\&quot; text=\&quot;\&quot; default=\&quot;\&quot;&gt;\n&lt;div class=\&quot;tw-block-dropdown tw-edit-type-dropdown\&quot;&gt;\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/Filter]]\&quot;&gt;&lt;$link to={{!!filter}}&gt;&lt;$transclude field=\&quot;description\&quot;/&gt;&lt;/$link&gt;\n&lt;/$list&gt;\n&lt;/div&gt;\n&lt;/$reveal&gt;\n&lt;/div&gt;\n\n&lt;/$linkcatcher&gt;\n\n&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt;\n&lt;div class=\&quot;tw-search-results\&quot;&gt;\n&lt;&lt;lingo Filter/Matches&gt;&gt;\n&lt;$list filter={{$:/temp/advancedsearch}} template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&lt;/div&gt;\n&lt;/$reveal&gt;\n&quot;
        },
        &quot;$:/core/ui/AdvancedSearch/Shadows&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/AdvancedSearch/Shadows&quot;,
            &quot;tags&quot;: &quot;$:/tags/AdvancedSearch&quot;,
            &quot;caption&quot;: &quot;{{$:/language/Search/Shadows/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/Search/\n&lt;$linkcatcher to=\&quot;$:/temp/advancedsearch\&quot;&gt;\n\n&lt;&lt;lingo Shadows/Hint&gt;&gt;\n\n&lt;div class=\&quot;tw-search\&quot;&gt;&lt;$edit-text tiddler=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;search\&quot; tag=\&quot;input\&quot;/&gt;&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt; &lt;$link to=\&quot;\&quot; class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/close-button}}&lt;/$link&gt;&lt;/$reveal&gt;&lt;/div&gt;\n\n&lt;/$linkcatcher&gt;\n\n&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt;\n\n&lt;div class=\&quot;tw-search-results\&quot;&gt;\n\n&lt;&lt;lingo Shadows/Matches&gt;&gt;\n\n&lt;$list filter=\&quot;[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n\n&lt;/div&gt;\n\n&lt;/$reveal&gt;\n\n&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;match\&quot; text=\&quot;\&quot;&gt;\n\n&lt;/$reveal&gt;\n&quot;
        },
        &quot;$:/core/ui/AdvancedSearch/Standard&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/AdvancedSearch/Standard&quot;,
            &quot;tags&quot;: &quot;$:/tags/AdvancedSearch&quot;,
            &quot;caption&quot;: &quot;{{$:/language/Search/Standard/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/Search/\n&lt;$linkcatcher to=\&quot;$:/temp/advancedsearch\&quot;&gt;\n\n&lt;&lt;lingo Standard/Hint&gt;&gt;\n\n&lt;div class=\&quot;tw-search\&quot;&gt;&lt;$edit-text tiddler=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;search\&quot; tag=\&quot;input\&quot;/&gt;&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt; &lt;$link to=\&quot;\&quot; class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/close-button}}&lt;/$link&gt;&lt;/$reveal&gt;&lt;/div&gt;\n\n&lt;/$linkcatcher&gt;\n\n&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt;\n\n&lt;div class=\&quot;tw-search-results\&quot;&gt;\n\n&lt;&lt;lingo Standard/Matches&gt;&gt;\n\n&lt;$list filter=\&quot;[!is[system]search{$:/temp/advancedsearch}sort[title]limit[250]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n\n&lt;/div&gt;\n\n&lt;/$reveal&gt;\n\n&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;match\&quot; text=\&quot;\&quot;&gt;\n\n&lt;/$reveal&gt;\n&quot;
        },
        &quot;$:/core/ui/AdvancedSearch/System&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/AdvancedSearch/System&quot;,
            &quot;tags&quot;: &quot;$:/tags/AdvancedSearch&quot;,
            &quot;caption&quot;: &quot;{{$:/language/Search/System/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/Search/\n&lt;$linkcatcher to=\&quot;$:/temp/advancedsearch\&quot;&gt;\n\n&lt;&lt;lingo System/Hint&gt;&gt;\n\n&lt;div class=\&quot;tw-search\&quot;&gt;&lt;$edit-text tiddler=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;search\&quot; tag=\&quot;input\&quot;/&gt;&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt; &lt;$link to=\&quot;\&quot; class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/close-button}}&lt;/$link&gt;&lt;/$reveal&gt;&lt;/div&gt;\n\n&lt;/$linkcatcher&gt;\n\n&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt;\n\n&lt;div class=\&quot;tw-search-results\&quot;&gt;\n\n&lt;&lt;lingo System/Matches&gt;&gt;\n\n&lt;$list filter=\&quot;[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n\n&lt;/div&gt;\n\n&lt;/$reveal&gt;\n\n&lt;$reveal state=\&quot;$:/temp/advancedsearch\&quot; type=\&quot;match\&quot; text=\&quot;\&quot;&gt;\n\n&lt;/$reveal&gt;\n&quot;
        },
        &quot;$:/AdvancedSearch&quot;: {
            &quot;title&quot;: &quot;$:/AdvancedSearch&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-advanced-search\&quot;&gt;\n&lt;&lt;tabs \&quot;[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]\&quot; \&quot;$:/core/ui/AdvancedSearch/System\&quot;&gt;&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/AlertTemplate&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/AlertTemplate&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-alert\&quot;&gt;\n&lt;div class=\&quot;tw-alert-toolbar\&quot;&gt;\n&lt;$button message=\&quot;tw-delete-tiddler\&quot; class=\&quot;btn-invisible\&quot;&gt;\n{{$:/core/images/delete-button}}&lt;/$button&gt;\n&lt;/div&gt;\n&lt;div class=\&quot;tw-alert-subtitle\&quot;&gt;\n&lt;$view field=\&quot;component\&quot;/&gt; - &lt;$view field=\&quot;modified\&quot; format=\&quot;date\&quot; template=\&quot;0hh:0mm:0ss DD MM YYYY\&quot;/&gt; &lt;$reveal type=\&quot;nomatch\&quot; state=\&quot;!!count\&quot; text=\&quot;\&quot;&gt;&lt;span class=\&quot;tw-alert-highlight\&quot;&gt;(count: &lt;$view field=\&quot;count\&quot;/&gt;)&lt;/span&gt;&lt;/$reveal&gt;\n&lt;/div&gt;\n&lt;div class=\&quot;tw-alert-body\&quot;&gt;\n\n&lt;$transclude/&gt;\n\n&lt;/div&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/BinaryWarning&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/BinaryWarning&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/BinaryWarning/\n&lt;div class=\&quot;tw-binary-warning\&quot;&gt;\n\n&lt;&lt;lingo Prompt&gt;&gt;\n\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Advanced/EditorTypes&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Advanced/EditorTypes&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Advanced&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Advanced/EditorTypes/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Advanced/EditorTypes/\n\n&lt;&lt;lingo Hint&gt;&gt;\n\n&lt;table&gt;\n&lt;tbody&gt;\n&lt;tr&gt;\n&lt;th&gt;&lt;&lt;lingo Type/Caption&gt;&gt;&lt;/th&gt;\n&lt;th&gt;&lt;&lt;lingo Editor/Caption&gt;&gt;&lt;/th&gt;\n&lt;/tr&gt;\n&lt;$list filter=\&quot;[all[shadows+tiddlers]prefix[$:/config/EditorTypeMappings/]sort[title]]\&quot;&gt;\n&lt;tr&gt;\n&lt;td&gt;\n&lt;$link&gt;\n&lt;$list filter=\&quot;[all[current]removeprefix[$:/config/EditorTypeMappings/]]\&quot;&gt;\n&lt;$text text={{!!title}}/&gt;\n&lt;/$list&gt;\n&lt;/$link&gt;\n&lt;/td&gt;\n&lt;td&gt;\n&lt;$view field=\&quot;text\&quot;/&gt;\n&lt;/td&gt;\n&lt;/tr&gt;\n&lt;/$list&gt;\n&lt;/tbody&gt;\n&lt;/table&gt;\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Advanced/LoadedModules&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Advanced/LoadedModules&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Advanced&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Advanced/LoadedModules/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Advanced/\n&lt;&lt;lingo LoadedModules/Hint&gt;&gt;\n\n{{$:/snippets/modules}}\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Advanced/Settings/NavigationAddressBar&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Advanced/Settings/NavigationAddressBar&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Advanced/Settings&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Advanced/Settings/NavigationAddressBar/\n\n&lt;$link to=\&quot;$:/config/Navigation/UpdateAddressBar\&quot;&gt;&lt;&lt;lingo Hint&gt;&gt;&lt;/$link&gt;\n\n&lt;$radio tiddler=\&quot;$:/config/Navigation/UpdateAddressBar\&quot; value=\&quot;permaview\&quot;&gt; &lt;&lt;lingo Permaview/Description&gt;&gt; &lt;/$radio&gt;\n\n&lt;$radio tiddler=\&quot;$:/config/Navigation/UpdateAddressBar\&quot; value=\&quot;permalink\&quot;&gt; &lt;&lt;lingo Permalink/Description&gt;&gt; &lt;/$radio&gt;\n\n&lt;$radio tiddler=\&quot;$:/config/Navigation/UpdateAddressBar\&quot; value=\&quot;no\&quot;&gt; &lt;&lt;lingo No/Description&gt;&gt; &lt;/$radio&gt;\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Advanced/Settings/NavigationHistory&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Advanced/Settings/NavigationHistory&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Advanced/Settings&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Advanced/Settings/NavigationHistory/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Advanced/Settings/NavigationHistory/\n&lt;$link to=\&quot;$:/config/Navigation/UpdateHistory\&quot;&gt;&lt;&lt;lingo Hint&gt;&gt;&lt;/$link&gt;\n\n&lt;$radio tiddler=\&quot;$:/config/Navigation/UpdateHistory\&quot; value=\&quot;yes\&quot;&gt; &lt;&lt;lingo Yes/Description&gt;&gt; &lt;/$radio&gt;\n\n&lt;$radio tiddler=\&quot;$:/config/Navigation/UpdateHistory\&quot; value=\&quot;no\&quot;&gt; &lt;&lt;lingo No/Description&gt;&gt; &lt;/$radio&gt;\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Advanced/Settings&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Advanced/Settings&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Advanced&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Advanced/Settings/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Advanced/Settings/\n\n&lt;&lt;lingo Hint&gt;&gt;\n\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Advanced/Settings]]\&quot;&gt;\n\n&lt;div style=\&quot;border-top:1px solid #eee;\&quot;&gt;\n\n!! &lt;$link&gt;&lt;$transclude field=\&quot;caption\&quot;/&gt;&lt;/$link&gt;\n\n&lt;$transclude/&gt;\n\n&lt;/div&gt;\n\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Advanced/TiddlerFields&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Advanced/TiddlerFields&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Advanced&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Advanced/TiddlerFields/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Advanced/\n\n&lt;&lt;lingo TiddlerFields/Hint&gt;&gt;\n\n{{$:/snippets/allfields}}&quot;
        },
        &quot;$:/core/ui/ControlPanel/Advanced&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Advanced&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Advanced/Caption}}&quot;,
            &quot;text&quot;: &quot;{{$:/language/ControlPanel/Advanced/Hint}}\n\n&lt;div class=\&quot;tw-control-panel\&quot;&gt;\n&lt;&lt;tabs \&quot;[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Advanced]!has[draft.of]]\&quot; \&quot;$:/core/ui/ControlPanel/Advanced/TiddlerFields\&quot;&gt;&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Appearance/Palette&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Appearance/Palette&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Appearance&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Appearance/Palette/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Appearance/Palette/\n\n{{$:/snippets/paletteswitcher}}\n\n&lt;$reveal type=\&quot;nomatch\&quot; state=\&quot;$:/state/ShowPaletteEditor\&quot; text=\&quot;yes\&quot;&gt;\n\n&lt;$button set=\&quot;$:/state/ShowPaletteEditor\&quot; setTo=\&quot;yes\&quot;&gt;&lt;&lt;lingo ShowEditor/Caption&gt;&gt;&lt;/$button&gt;\n\n&lt;/$reveal&gt;\n\n&lt;$reveal type=\&quot;match\&quot; state=\&quot;$:/state/ShowPaletteEditor\&quot; text=\&quot;yes\&quot;&gt;\n\n&lt;$button set=\&quot;$:/state/ShowPaletteEditor\&quot; setTo=\&quot;no\&quot;&gt;&lt;&lt;lingo HideEditor/Caption&gt;&gt;&lt;/$button&gt;\n{{$:/snippets/paletteeditor}}\n\n&lt;/$reveal&gt;\n\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Appearance/StoryView&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Appearance/StoryView&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Appearance&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Appearance/StoryView/Caption}}&quot;,
            &quot;text&quot;: &quot;{{$:/snippets/viewswitcher}}\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Appearance/Theme&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Appearance/Theme&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Appearance&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Appearance/Theme/Caption}}&quot;,
            &quot;text&quot;: &quot;{{$:/snippets/themeswitcher}}\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Appearance&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Appearance&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Appearance/Caption}}&quot;,
            &quot;text&quot;: &quot;{{$:/language/ControlPanel/Appearance/Hint}}\n\n&lt;div class=\&quot;tw-control-panel\&quot;&gt;\n&lt;&lt;tabs \&quot;[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Appearance]!has[draft.of]]\&quot; \&quot;$:/core/ui/ControlPanel/Appearance/Theme\&quot;&gt;&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Basics&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Basics&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Basics/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Basics/\n|&lt;&lt;lingo Version/Prompt&gt;&gt; |''&lt;&lt;version&gt;&gt;'' |\n|&lt;$link to=\&quot;$:/SiteTitle\&quot;&gt;&lt;&lt;lingo Title/Prompt&gt;&gt;&lt;/$link&gt; |&lt;$edit-text tiddler=\&quot;$:/SiteTitle\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt; |\n|&lt;$link to=\&quot;$:/SiteSubtitle\&quot;&gt;&lt;&lt;lingo Subtitle/Prompt&gt;&gt;&lt;/$link&gt; |&lt;$edit-text tiddler=\&quot;$:/SiteSubtitle\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt; |\n|&lt;$link to=\&quot;$:/status/UserName\&quot;&gt;&lt;&lt;lingo Username/Prompt&gt;&gt;&lt;/$link&gt; |&lt;$edit-text tiddler=\&quot;$:/status/UserName\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt; |\n|&lt;$link to=\&quot;$:/config/AnimationDuration\&quot;&gt;&lt;&lt;lingo AnimDuration/Prompt&gt;&gt;&lt;/$link&gt; |&lt;$edit-text tiddler=\&quot;$:/config/AnimationDuration\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt; |\n|&lt;$link to=\&quot;$:/DefaultTiddlers\&quot;&gt;&lt;&lt;lingo DefaultTiddlers/Prompt&gt;&gt;&lt;/$link&gt; |&lt;&lt;lingo DefaultTiddlers/TopHint&gt;&gt;&lt;br&gt; &lt;$edit-text tag=\&quot;textarea\&quot; tiddler=\&quot;$:/DefaultTiddlers\&quot;/&gt;&lt;br&gt;//&lt;&lt;lingo DefaultTiddlers/BottomHint&gt;&gt;// |\n|&lt;&lt;lingo Language/Prompt&gt;&gt; |{{$:/snippets/minilanguageswitcher}} |\n|&lt;&lt;lingo Tiddlers/Prompt&gt;&gt; |''&lt;$count filter=\&quot;[!is[system]]\&quot;/&gt;'' |\n|&lt;&lt;lingo Tags/Prompt&gt;&gt; |''&lt;$count filter=\&quot;[tags[]]\&quot;/&gt;'' |\n|&lt;&lt;lingo SystemTiddlers/Prompt&gt;&gt; |''&lt;$count filter=\&quot;[is[system]]\&quot;/&gt;'' |\n|&lt;&lt;lingo ShadowTiddlers/Prompt&gt;&gt; |''&lt;$count filter=\&quot;[all[shadows]]\&quot;/&gt;'' |\n|&lt;&lt;lingo OverriddenShadowTiddlers/Prompt&gt;&gt; |''&lt;$count filter=\&quot;[is[tiddler]is[shadow]]\&quot;/&gt;'' |\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Plugins&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Plugins&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Plugins/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Plugins/\n\\define plugin-table(type)\n&lt;table&gt;\n&lt;tbody&gt;\n&lt;tr&gt;\n&lt;th&gt;\n&lt;&lt;lingo Fields/Description&gt;&gt;\n&lt;/th&gt;\n&lt;th&gt;\n&lt;&lt;lingo Fields/Version&gt;&gt;\n&lt;/th&gt;\n&lt;/tr&gt;\n&lt;$list filter=\&quot;[!has[draft.of]plugin-type[$type$]sort[description]]\&quot;&gt;\n&lt;tr&gt;\n&lt;td&gt;\n&lt;$link to={{!!title}}&gt;\n''&lt;$view field=\&quot;description\&quot;&gt;&lt;$view field=\&quot;title\&quot;/&gt;&lt;/$view&gt;''&lt;br&gt;\n&lt;$view field=\&quot;title\&quot;/&gt;\n&lt;/$link&gt;\n&lt;/td&gt;\n&lt;td&gt;\n&lt;$view field=\&quot;version\&quot;/&gt;\n&lt;/td&gt;\n&lt;/tr&gt;\n&lt;/$list&gt;\n&lt;/tbody&gt;\n&lt;/table&gt;\n\\end\n\n! &lt;&lt;lingo Plugin/Prompt&gt;&gt;\n\n&lt;&lt;plugin-table plugin&gt;&gt;\n\n! &lt;&lt;lingo Theme/Prompt&gt;&gt;\n\n&lt;&lt;plugin-table theme&gt;&gt;\n\n! &lt;&lt;lingo Language/Prompt&gt;&gt;\n\n&lt;&lt;plugin-table language&gt;&gt;\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Saving&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Saving&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Saving/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Saving/\n\\define backupURL()\nhttp://$(userName)$.tiddlyspot.com/backup/\n\\end\n\\define backupLink()\n&lt;$reveal type=\&quot;nomatch\&quot; state=\&quot;$:/UploadName\&quot; text=\&quot;\&quot;&gt;\n&lt;$set name=\&quot;userName\&quot; value={{$:/UploadName}}&gt;\n&lt;a href=&lt;&lt;backupURL&gt;&gt;&gt;&lt;$macrocall $name=\&quot;backupURL\&quot; $type=\&quot;text/plain\&quot; $output=\&quot;text/plain\&quot;/&gt;&lt;/a&gt;\n&lt;/$set&gt;\n&lt;/$reveal&gt;\n\\end\n! &lt;&lt;lingo Saving/Heading&gt;&gt;\n\n|&lt;&lt;lingo AutoSave&gt;&gt; |{{$:/snippets/autosavestatus}} |\n\n! &lt;&lt;lingo TiddlySpot/Heading&gt;&gt;\n\n|&lt;&lt;lingo TiddlySpot/UserName&gt;&gt; |&lt;$edit-text tiddler=\&quot;$:/UploadName\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt; |\n|&lt;&lt;lingo TiddlySpot/Password&gt;&gt; |&lt;$password name=\&quot;upload\&quot;/&gt; |\n|&lt;&lt;lingo TiddlySpot/Backups&gt;&gt; |&lt;&lt;backupLink&gt;&gt; |\n\n!! &lt;&lt;lingo TiddlySpot/Advanced/Heading&gt;&gt;\n\n|&lt;&lt;lingo TiddlySpot/ServerURL&gt;&gt;  |&lt;$edit-text tiddler=\&quot;$:/UploadURL\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt; |\n|&lt;&lt;lingo TiddlySpot/Filename&gt;&gt; |&lt;$edit-text tiddler=\&quot;$:/UploadFilename\&quot; default=\&quot;index.html\&quot; tag=\&quot;input\&quot;/&gt; |\n|&lt;&lt;lingo TiddlySpot/UploadDir&gt;&gt; |&lt;$edit-text tiddler=\&quot;$:/UploadDir\&quot; default=\&quot;.\&quot; tag=\&quot;input\&quot;/&gt; |\n|&lt;&lt;lingo TiddlySpot/BackupDir&gt;&gt; |&lt;$edit-text tiddler=\&quot;$:/UploadBackupDir\&quot; default=\&quot;.\&quot; tag=\&quot;input\&quot;/&gt; |\n\n&lt;&lt;lingo TiddlySpot/Hint&gt;&gt;\n\n&quot;
        },
        &quot;$:/core/ui/ControlPanel/Tools&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ControlPanel/Tools&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel&quot;,
            &quot;caption&quot;: &quot;{{$:/language/ControlPanel/Tools/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Tools/\n! &lt;&lt;lingo Import/Heading&gt;&gt;\n\n&lt;$browse/&gt;\n\n&lt;&lt;lingo Import/Hint&gt;&gt;\n\n! &lt;&lt;lingo Export/Heading&gt;&gt;\n\n&lt;$button message=\&quot;tw-download-file\&quot; param=\&quot;$:/core/templates/alltiddlers.template.html\&quot; class=\&quot;btn-big-green\&quot;&gt;&lt;&lt;lingo Export/AllAsStaticHTML/Caption&gt;&gt; {{$:/core/images/save-button}}&lt;/$button&gt;\n\n! &lt;&lt;lingo Encryption/Heading&gt;&gt;\n\n{{$:/snippets/encryptionstatus}}\n&quot;
        },
        &quot;$:/ControlPanel&quot;: {
            &quot;title&quot;: &quot;$:/ControlPanel&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-control-panel\&quot;&gt;\n&lt;&lt;tabs \&quot;[all[shadows+tiddlers]tag[$:/tags/ControlPanel]!has[draft.of]]\&quot; \&quot;$:/core/ui/ControlPanel/Basics\&quot;&gt;&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/EditTemplate/body&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditTemplate/body&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditTemplate&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/EditTemplate/Body/\n&lt;$list filter=\&quot;[is[current]has[_canonical_uri]]\&quot;&gt;\n\n&lt;div class=\&quot;tw-message-box\&quot;&gt;\n\n&lt;&lt;lingo External/Hint&gt;&gt;\n\n&lt;a href={{!!_canonical_uri}}&gt;&lt;$text text={{!!_canonical_uri}}/&gt;&lt;/a&gt;\n\n&lt;$edit-text field=\&quot;_canonical_uri\&quot; class=\&quot;tw-edit-fields\&quot;&gt;&lt;/$edit-text&gt;\n\n&lt;/div&gt;\n\n&lt;/$list&gt;\n\n&lt;$list filter=\&quot;[is[current]!has[_canonical_uri]]\&quot;&gt;\n\n&lt;$reveal state=\&quot;$:/state/showeditpreview\&quot; type=\&quot;match\&quot; text=\&quot;yes\&quot;&gt;\n\n&lt;em class=\&quot;tw-edit\&quot;&gt;&lt;&lt;lingo Hint&gt;&gt;&lt;/em&gt; &lt;$button type=\&quot;set\&quot; set=\&quot;$:/state/showeditpreview\&quot; setTo=\&quot;no\&quot;&gt;&lt;&lt;lingo Preview/Button/Hide&gt;&gt;&lt;/$button&gt;\n\n&lt;div class=\&quot;tw-tiddler-preview\&quot;&gt;\n&lt;div class=\&quot;tw-tiddler-preview-preview\&quot;&gt;\n\n&lt;$transclude /&gt;\n\n&lt;/div&gt;\n\n&lt;div class=\&quot;tw-tiddler-preview-edit\&quot;&gt;\n&lt;$edit field=\&quot;text\&quot; class=\&quot;tw-edit-texteditor\&quot; placeholder={{$:/language/EditTemplate/Body/Placeholder}}/&gt;\n\n&lt;/div&gt;\n\n&lt;/div&gt;\n\n&lt;/$reveal&gt;\n\n&lt;$reveal state=\&quot;$:/state/showeditpreview\&quot; type=\&quot;nomatch\&quot; text=\&quot;yes\&quot;&gt;\n\n&lt;em class=\&quot;tw-edit\&quot;&gt;&lt;&lt;lingo Hint&gt;&gt;&lt;/em&gt; &lt;$button type=\&quot;set\&quot; set=\&quot;$:/state/showeditpreview\&quot; setTo=\&quot;yes\&quot;&gt;&lt;&lt;lingo Preview/Button/Show&gt;&gt;&lt;/$button&gt;\n&lt;$edit field=\&quot;text\&quot; class=\&quot;tw-edit-texteditor\&quot; placeholder={{$:/language/EditTemplate/Body/Placeholder}}/&gt;\n\n&lt;/$reveal&gt;\n\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/ui/EditTemplate/controls&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditTemplate/controls&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditTemplate&quot;,
            &quot;text&quot;: &quot;&lt;span class=\&quot;tw-tiddler-controls titlebar\&quot;&gt; &lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]\&quot; variable=\&quot;listItem\&quot;&gt;&lt;$transclude tiddler=&lt;&lt;listItem&gt;&gt;/&gt;&lt;/$list&gt; &lt;/span&gt;\n&quot;
        },
        &quot;$:/core/ui/EditTemplate/fields&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditTemplate/fields&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditTemplate&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/EditTemplate/\n&lt;$fieldmangler&gt;\n&lt;div class=\&quot;tw-edit-fields\&quot;&gt;\n&lt;table class=\&quot;tw-edit-fields\&quot;&gt;\n&lt;tbody&gt;\n&lt;$list filter=\&quot;[all[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]] +[sort[title]]\&quot; variable=\&quot;currentField\&quot;&gt;\n&lt;tr class=\&quot;tw-edit-field\&quot;&gt;\n&lt;td class=\&quot;tw-edit-field-name\&quot;&gt;\n&lt;$text text=&lt;&lt;currentField&gt;&gt;/&gt;:&lt;/td&gt;\n&lt;td class=\&quot;tw-edit-field-value\&quot;&gt;\n&lt;$edit-text tiddler=&lt;&lt;currentTiddler&gt;&gt; field=&lt;&lt;currentField&gt;&gt; placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}}/&gt;\n&lt;/td&gt;\n&lt;td class=\&quot;tw-edit-field-remove\&quot;&gt;\n&lt;$button message=\&quot;tw-remove-field\&quot; param=&lt;&lt;currentField&gt;&gt; class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/delete-button}}&lt;/$button&gt;\n&lt;/td&gt;\n&lt;/tr&gt;\n&lt;/$list&gt;\n&lt;/tbody&gt;\n&lt;/table&gt;\n&lt;/div&gt;\n\n&lt;div class=\&quot;tw-edit-field-add\&quot;&gt;\n&lt;em class=\&quot;tw-edit\&quot;&gt;\n&lt;&lt;lingo Fields/Add/Prompt&gt;&gt;\n&lt;/em&gt; &lt;span class=\&quot;tw-edit-field-add-name\&quot;&gt;\n&lt;$edit-text tiddler=\&quot;$:/temp/newfieldname\&quot; tag=\&quot;input\&quot; default=\&quot;\&quot; placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} class=\&quot;tw-edit-texteditor\&quot;/&gt;\n&lt;/span&gt; &lt;span class=\&quot;tw-edit-field-add-button\&quot;&gt;\n&lt;$button message=\&quot;tw-add-field\&quot; param={{$:/temp/newfieldname}} set=\&quot;$:/temp/newfieldname\&quot; setTo=\&quot;\&quot; class=\&quot;\&quot;&gt;\n&lt;&lt;lingo Fields/Add/Button&gt;&gt;\n&lt;/$button&gt;\n&lt;/span&gt;\n&lt;/div&gt;\n\n&lt;/$fieldmangler&gt;\n&quot;
        },
        &quot;$:/core/ui/EditTemplate/shadow&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditTemplate/shadow&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditTemplate&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/EditTemplate/Shadow/\n&lt;$list filter=\&quot;[all[current]get[draft.of]is[shadow]!is[tiddler]]\&quot;&gt;\n&lt;div class=\&quot;tw-message-box\&quot;&gt;\n\n&lt;&lt;lingo Warning&gt;&gt;\n\n&lt;/div&gt;\n&lt;/$list&gt;\n\n&lt;$list filter=\&quot;[all[current]get[draft.of]is[shadow]is[tiddler]]\&quot;&gt;\n&lt;div class=\&quot;tw-message-box\&quot;&gt;\n\n&lt;&lt;lingo OverriddenWarning&gt;&gt;\n\n&lt;/div&gt;\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/ui/EditTemplate/tags&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditTemplate/tags&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditTemplate&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/EditTemplate/\n\\define tag-styles()\nbackground-color:$(backgroundColor)$;\n\\end\n&lt;div class=\&quot;tw-edit-tags\&quot;&gt;\n&lt;$fieldmangler&gt;\n&lt;$list filter=\&quot;[all[current]tags[]sort[title]]\&quot; storyview=\&quot;pop\&quot;&gt;&lt;$set name=\&quot;backgroundColor\&quot; value={{!!color}}&gt;&lt;span style=&lt;&lt;tag-styles&gt;&gt; class=\&quot;tw-tag-label\&quot;&gt;\n&lt;$view field=\&quot;title\&quot; format=\&quot;text\&quot; /&gt;\n&lt;$button message=\&quot;tw-remove-tag\&quot; param={{!!title}} class=\&quot;btn-invisible tw-remove-tag-button\&quot;&gt;&amp;times;&lt;/$button&gt;&lt;/span&gt;\n&lt;/$set&gt;\n&lt;/$list&gt;\n\n&lt;div class=\&quot;tw-edit-add-tag\&quot;&gt;\n&lt;span class=\&quot;tw-add-tag-name\&quot;&gt;\n&lt;$edit-text tiddler=\&quot;$:/temp/NewTagName\&quot; tag=\&quot;input\&quot; default=\&quot;\&quot; placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=&lt;&lt;qualify \&quot;$:/state/popup/tags-auto-complete\&quot;&gt;&gt; class=\&quot;tw-edit-texteditor\&quot;/&gt;\n&lt;/span&gt; &lt;$button popup=&lt;&lt;qualify \&quot;$:/state/popup/tags-auto-complete\&quot;&gt;&gt; class=\&quot;btn-invisible btn-dropdown\&quot;&gt;{{$:/core/images/down-arrow}}&lt;/$button&gt; &lt;span class=\&quot;tw-add-tag-button\&quot;&gt;\n&lt;$button message=\&quot;tw-add-tag\&quot; param={{$:/temp/NewTagName}} set=\&quot;$:/temp/NewTagName\&quot; setTo=\&quot;\&quot; class=\&quot;\&quot;&gt;\n&lt;&lt;lingo Tags/Add/Button&gt;&gt;\n&lt;/$button&gt;\n&lt;/span&gt;\n&lt;/div&gt;\n\n&lt;div class=\&quot;tw-block-dropdown-wrapper\&quot;&gt;\n\n&lt;$reveal state=&lt;&lt;qualify \&quot;$:/state/popup/tags-auto-complete\&quot;&gt;&gt; type=\&quot;nomatch\&quot; text=\&quot;\&quot; default=\&quot;\&quot;&gt;\n\n&lt;div class=\&quot;tw-block-dropdown\&quot;&gt;\n\n&lt;$linkcatcher set=\&quot;$:/temp/NewTagName\&quot; setTo=\&quot;\&quot; message=\&quot;tw-add-tag\&quot;&gt;\n&lt;$list filter=\&quot;[!is[shadow]tags[]search{$:/temp/NewTagName}sort[title]]\&quot;&gt;\n&lt;$link&gt;\n&lt;$set name=\&quot;backgroundColor\&quot; value={{!!color}}&gt;\n&lt;span style=&lt;&lt;tag-styles&gt;&gt; class=\&quot;tw-tag-label\&quot;&gt;\n&lt;$view field=\&quot;title\&quot; format=\&quot;text\&quot;/&gt;\n&lt;/span&gt;\n&lt;/$set&gt;\n&lt;/$link&gt;\n&lt;/$list&gt;\n&lt;/$linkcatcher&gt;\n\n&lt;/div&gt;\n\n&lt;/$reveal&gt;\n&lt;/div&gt;\n&lt;/$fieldmangler&gt;\n&lt;/div&gt;&quot;
        },
        &quot;$:/core/ui/EditTemplate/title&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditTemplate/title&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditTemplate&quot;,
            &quot;text&quot;: &quot;&lt;$view field=\&quot;title\&quot;/&gt;\n\n&lt;$edit-text field=\&quot;draft.title\&quot; class=\&quot;titlebar tw-edit-texteditor\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/EditTemplate/type&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditTemplate/type&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditTemplate&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/EditTemplate/\n&lt;p&gt;&lt;$fieldmangler&gt;&lt;em class=\&quot;tw-edit\&quot;&gt;&lt;&lt;lingo Type/Prompt&gt;&gt;&lt;/em&gt; &lt;$edit-text field=\&quot;type\&quot; tag=\&quot;input\&quot; default=\&quot;\&quot; placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=&lt;&lt;qualify \&quot;$:/state/popup/type-dropdown\&quot;&gt;&gt; class=\&quot;tw-edit-typeeditor\&quot;/&gt; &lt;$button popup=&lt;&lt;qualify \&quot;$:/state/popup/type-dropdown\&quot;&gt;&gt; class=\&quot;btn-invisible btn-dropdown\&quot;&gt;{{$:/core/images/down-arrow}}&lt;/$button&gt; &lt;$button message=\&quot;tw-remove-field\&quot; param=\&quot;type\&quot; class=\&quot;btn-invisible btn-icon\&quot;&gt;{{$:/core/images/delete-button}}&lt;/$button&gt;&lt;/$fieldmangler&gt;&lt;/p&gt;\n\n&lt;div class=\&quot;tw-block-dropdown-wrapper\&quot;&gt;\n&lt;$reveal state=&lt;&lt;qualify \&quot;$:/state/popup/type-dropdown\&quot;&gt;&gt; type=\&quot;nomatch\&quot; text=\&quot;\&quot; default=\&quot;\&quot;&gt;\n&lt;div class=\&quot;tw-block-dropdown tw-edit-type-dropdown\&quot;&gt;\n&lt;$linkcatcher to=\&quot;!!type\&quot;&gt;\n&lt;$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group]]'&gt;\n&lt;div class=\&quot;tw-dropdown-item\&quot;&gt;\n&lt;$text text={{!!group}}/&gt;\n&lt;/div&gt;\n&lt;$list filter=\&quot;[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]]\&quot;&gt;&lt;$link to={{!!name}}&gt;&lt;$view field=\&quot;description\&quot;/&gt; (&lt;$view field=\&quot;name\&quot;/&gt;)&lt;/$link&gt;\n&lt;/$list&gt;\n&lt;/$list&gt;\n&lt;/$linkcatcher&gt;\n&lt;/div&gt;\n&lt;/$reveal&gt;\n&lt;/div&gt;&quot;
        },
        &quot;$:/core/ui/EditTemplate&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditTemplate&quot;,
            &quot;text&quot;: &quot;\\define frame-classes()\ntw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$\n\\end\n&lt;div class=&lt;&lt;frame-classes&gt;&gt;&gt;\n&lt;$set name=\&quot;storyTiddler\&quot; value=&lt;&lt;currentTiddler&gt;&gt;&gt;\n&lt;$keyboard key=\&quot;escape\&quot; message=\&quot;tw-cancel-tiddler\&quot;&gt;\n&lt;$keyboard key=\&quot;ctrl+enter\&quot; message=\&quot;tw-save-tiddler\&quot;&gt;\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]\&quot; variable=\&quot;listItem\&quot;&gt;\n&lt;$transclude tiddler=&lt;&lt;listItem&gt;&gt;/&gt;\n&lt;/$list&gt;\n&lt;/$keyboard&gt;\n&lt;/$keyboard&gt;\n&lt;/$set&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/EditToolbar/cancel&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditToolbar/cancel&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditToolbar&quot;,
            &quot;text&quot;: &quot;&lt;$button message=\&quot;tw-cancel-tiddler\&quot; title={{$:/language/Buttons/Cancel/Hint}} aria-label={{$:/language/Buttons/Cancel/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/cancel-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/core/ui/EditToolbar/delete&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditToolbar/delete&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditToolbar&quot;,
            &quot;text&quot;: &quot;&lt;$button message=\&quot;tw-delete-tiddler\&quot; title={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/delete-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/core/ui/EditToolbar/save&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/EditToolbar/save&quot;,
            &quot;tags&quot;: &quot;$:/tags/EditToolbar&quot;,
            &quot;text&quot;: &quot;&lt;$button message=\&quot;tw-save-tiddler\&quot; title={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/done-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/core/Filters/AllTags&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/AllTags&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[tags[]!is[system]sort[title]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/AllTags}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/Filters/AllTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/AllTiddlers&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[!is[system]sort[title]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/AllTiddlers}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/Filters/Drafts&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/Drafts&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[has[draft.of]sort[title]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/Drafts}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/Filters/Missing&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/Missing&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[all[missing]sort[title]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/Missing}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/Filters/Orphans&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/Orphans&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[all[orphans]sort[title]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/Orphans}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/Filters/OverriddenShadowTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/OverriddenShadowTiddlers&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[is[shadow]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/OverriddenShadowTiddlers}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/Filters/RecentTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/RecentTiddlers&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[!is[system]has[modified]!sort[modified]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/RecentTiddlers}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/Filters/ShadowTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/ShadowTiddlers&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[all[shadows]sort[title]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/ShadowTiddlers}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/Filters/SystemTags&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/SystemTags&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[all[shadows+tiddlers]tags[]is[system]sort[title]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/SystemTags}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/Filters/SystemTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/core/Filters/SystemTiddlers&quot;,
            &quot;tags&quot;: &quot;$:/tags/Filter&quot;,
            &quot;filter&quot;: &quot;[is[system]sort[title]]&quot;,
            &quot;description&quot;: &quot;{{$:/language/Filters/SystemTiddlers}}&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/core/ui/ListItemTemplate&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ListItemTemplate&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-menu-list-item\&quot;&gt;\n&lt;$link to={{!!title}}&gt;\n&lt;$view field=\&quot;title\&quot;/&gt;\n&lt;/$link&gt;\n&lt;/div&gt;&quot;
        },
        &quot;$:/core/ui/MissingTemplate&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MissingTemplate&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-tiddler-missing\&quot;&gt;\n&lt;$button popup=&lt;&lt;qualify \&quot;$:/state/popup/missing\&quot;&gt;&gt; class=\&quot;btn-invisible tw-missing-tiddler-label\&quot;&gt;\n&lt;$view field=\&quot;title\&quot; format=\&quot;text\&quot; /&gt;\n&lt;/$button&gt;\n&lt;$reveal state=&lt;&lt;qualify \&quot;$:/state/popup/missing\&quot;&gt;&gt; type=\&quot;popup\&quot; position=\&quot;below\&quot; animate=\&quot;yes\&quot;&gt;\n&lt;div class=\&quot;tw-drop-down\&quot;&gt;\n&lt;$transclude tiddler=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&lt;hr&gt;\n&lt;$list filter=\&quot;[all[current]backlinks[]sort[title]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&lt;/div&gt;\n&lt;/$reveal&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/MoreSideBar/All&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MoreSideBar/All&quot;,
            &quot;tags&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/All/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[!is[system]sort[title]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/MoreSideBar/Drafts&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MoreSideBar/Drafts&quot;,
            &quot;tags&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Drafts/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[has[draft.of]sort[title]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/MoreSideBar/Missing&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MoreSideBar/Missing&quot;,
            &quot;tags&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Missing/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[all[missing]sort[title]]\&quot; template=\&quot;$:/core/ui/MissingTemplate\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/MoreSideBar/Orphans&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MoreSideBar/Orphans&quot;,
            &quot;tags&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Orphans/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[all[orphans]sort[title]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/MoreSideBar/Recent&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MoreSideBar/Recent&quot;,
            &quot;tags&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Recent/Caption}}&quot;,
            &quot;text&quot;: &quot;{{$:/snippets/recentchanges}}\n&quot;
        },
        &quot;$:/core/ui/MoreSideBar/Shadows&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MoreSideBar/Shadows&quot;,
            &quot;tags&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Shadows/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[all[shadows]sort[title]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/MoreSideBar/System&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MoreSideBar/System&quot;,
            &quot;tags&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/System/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[is[system]sort[title]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/MoreSideBar/Tags&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MoreSideBar/Tags&quot;,
            &quot;tags&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Tags/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/SideBar/Tags/\n&lt;$button to=\&quot;$:/TagManager\&quot; class=\&quot;btn\&quot;&gt;&lt;&lt;lingo TagManager/Caption&gt;&gt;&lt;/$button&gt;\n\n&lt;$list filter=\&quot;[tags[]!is[system]sort[title]]\&quot;&gt;\n\n&lt;$transclude tiddler=\&quot;$:/core/ui/TagTemplate\&quot;/&gt; &lt;small class=\&quot;tw-menu-list-count\&quot;&gt;&lt;$count filter=\&quot;[all[current]tagging[]]\&quot;/&gt;&lt;/small&gt;\n\n&lt;/$list&gt;\n\n----\n\n{{$:/core/ui/UntaggedTemplate}} &lt;small class=\&quot;tw-menu-list-count\&quot;&gt;&lt;$count filter=\&quot;[untagged[]!is[system]] -[tags[]]\&quot;/&gt;&lt;/small&gt;\n&quot;
        },
        &quot;$:/core/ui/MoreSideBar/Types&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/MoreSideBar/Types&quot;,
            &quot;tags&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Types/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[!is[system]has[type]each[type]sort[type]] -[type[text/vnd.tiddlywiki]]\&quot;&gt;\n&lt;div class=\&quot;tw-menu-list-item\&quot;&gt;\n&lt;$view field=\&quot;type\&quot;/&gt;\n&lt;$list filter=\&quot;[type{!!type}!is[system]sort[title]]\&quot;&gt;\n&lt;div class=\&quot;tw-menu-list-subitem\&quot;&gt;\n&lt;$link to={{!!title}}&gt;&lt;$view field=\&quot;title\&quot;/&gt;&lt;/$link&gt;\n&lt;/div&gt;\n&lt;/$list&gt;\n&lt;/div&gt;\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/ui/PageControls/control-panel&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageControls/control-panel&quot;,
            &quot;tags&quot;: &quot;$:/tags/PageControls&quot;,
            &quot;text&quot;: &quot;&lt;$button to=\&quot;$:/ControlPanel\&quot; title={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/options-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/core/ui/PageControls/new-tiddler&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageControls/new-tiddler&quot;,
            &quot;tags&quot;: &quot;$:/tags/PageControls&quot;,
            &quot;text&quot;: &quot;&lt;$button message=\&quot;tw-new-tiddler\&quot; title={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/new-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/core/ui/PageControls/save-wiki&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageControls/save-wiki&quot;,
            &quot;tags&quot;: &quot;$:/tags/PageControls&quot;,
            &quot;text&quot;: &quot;&lt;$button message=\&quot;tw-save-wiki\&quot; title={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/save-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/core/ui/PageStylesheet&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageStylesheet&quot;,
            &quot;text&quot;: &quot;\\define colour(name)\n&lt;$transclude tiddler={{$:/palette}} index=\&quot;$name$\&quot;/&gt;\n\\end\n\\define color(name)\n&lt;&lt;colour $name$&gt;&gt;\n\\end\n\\define box-shadow(shadow)\n```\n  -webkit-box-shadow: $shadow$;\n    -moz-box-shadow: $shadow$;\n          box-shadow: $shadow$;\n```\n\\end\n\\define filter(filter)\n```\n  -webkit-filter: $filter$;\n    -moz-filter: $filter$;\n          filter: $filter$;\n```\n\\end\n\\define transition(transition)\n```\n  -webkit-transition: $transition$;\n    -moz-transition: $transition$;\n          transition: $transition$;\n```\n\\end\n\\define transform-origin(origin)\n```\n  -webkit-transform-origin: $origin$;\n    -moz-transform-origin: $origin$;\n          transform-origin: $origin$;\n```\n\\end\n\\define background-linear-gradient(gradient)\n```\nbackground-image: linear-gradient($gradient$);\nbackground-image: -o-linear-gradient($gradient$);\nbackground-image: -moz-linear-gradient($gradient$);\nbackground-image: -webkit-linear-gradient($gradient$);\nbackground-image: -ms-linear-gradient($gradient$);\n```\n\\end\n\\define datauri(title)\n&lt;$macrocall $name=\&quot;makedatauri\&quot; type={{$title$!!type}} text={{$title$}}/&gt;\n\\end\n\\define if-sidebar(text)\n&lt;$reveal state=\&quot;$:/state/sidebar\&quot; type=\&quot;match\&quot; text=\&quot;yes\&quot; default=\&quot;yes\&quot;&gt;$text$&lt;/$reveal&gt;\n\\end\n\\define if-no-sidebar(text)\n&lt;$reveal state=\&quot;$:/state/sidebar\&quot; type=\&quot;nomatch\&quot; text=\&quot;yes\&quot; default=\&quot;yes\&quot;&gt;$text$&lt;/$reveal&gt;\n\\end\n\n\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/stylesheet]]\&quot;&gt;\n&lt;$transclude/&gt;\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/ui/PageTemplate/alerts&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageTemplate/alerts&quot;,
            &quot;tags&quot;: &quot;$:/tags/PageTemplate&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-alerts\&quot;&gt;\n\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/Alert]!has[draft.of]]\&quot; template=\&quot;$:/core/ui/AlertTemplate\&quot; storyview=\&quot;pop\&quot;/&gt;\n\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/PageTemplate/sidebar&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageTemplate/sidebar&quot;,
            &quot;tags&quot;: &quot;$:/tags/PageTemplate&quot;,
            &quot;text&quot;: &quot;&lt;$scrollable fallthrough=\&quot;no\&quot; class=\&quot;tw-sidebar-scrollable\&quot;&gt;\n\n&lt;div class=\&quot;sidebar-header\&quot;&gt;\n\n&lt;$reveal state=\&quot;$:/state/sidebar\&quot; type=\&quot;match\&quot; text=\&quot;yes\&quot; default=\&quot;yes\&quot; retain=\&quot;yes\&quot;&gt;\n\n&lt;h1 class=\&quot;tw-site-title\&quot;&gt;\n\n&lt;$transclude tiddler=\&quot;$:/SiteTitle\&quot; mode=\&quot;inline\&quot;/&gt;\n\n&lt;/h1&gt;\n\n&lt;div class=\&quot;tw-site-subtitle\&quot;&gt;\n\n&lt;$transclude tiddler=\&quot;$:/SiteSubtitle\&quot; mode=\&quot;inline\&quot;/&gt;\n\n&lt;/div&gt;\n\n&lt;div class=\&quot;tw-page-controls\&quot;&gt;\n\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\&quot; variable=\&quot;listItem\&quot;&gt;\n\n&lt;$transclude tiddler=&lt;&lt;listItem&gt;&gt; mode=\&quot;inline\&quot;/&gt;\n\n&lt;/$list&gt;\n\n&lt;/div&gt;\n\n&lt;$transclude tiddler=\&quot;$:/core/ui/SideBarLists\&quot; mode=\&quot;inline\&quot;/&gt;\n\n&lt;/$reveal&gt;\n\n&lt;/div&gt;\n\n&lt;/$scrollable&gt;&quot;
        },
        &quot;$:/core/ui/PageTemplate/story&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageTemplate/story&quot;,
            &quot;tags&quot;: &quot;$:/tags/PageTemplate&quot;,
            &quot;text&quot;: &quot;&lt;section class=\&quot;story-river\&quot;&gt;\n\n&lt;$list filter=\&quot;[list[$:/StoryList]]\&quot; history=\&quot;$:/HistoryList\&quot; template=\&quot;$:/core/ui/ViewTemplate\&quot; editTemplate=\&quot;$:/core/ui/EditTemplate\&quot; storyview={{$:/view}} /&gt;\n\n&lt;/section&gt;\n&quot;
        },
        &quot;$:/core/ui/PageTemplate/topleftbar&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageTemplate/topleftbar&quot;,
            &quot;tags&quot;: &quot;$:/tags/PageTemplate&quot;,
            &quot;text&quot;: &quot;&lt;span class=\&quot;tw-topbar tw-topbar-left\&quot;&gt;\n\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/TopLeftBar]!has[draft.of]]\&quot; variable=\&quot;listItem\&quot;&gt;\n\n&lt;$transclude tiddler=&lt;&lt;listItem&gt;&gt; mode=\&quot;inline\&quot;/&gt;\n\n&lt;/$list&gt;\n\n&lt;/span&gt;\n&quot;
        },
        &quot;$:/core/ui/PageTemplate/toprightbar&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageTemplate/toprightbar&quot;,
            &quot;tags&quot;: &quot;$:/tags/PageTemplate&quot;,
            &quot;text&quot;: &quot;&lt;span class=\&quot;tw-topbar tw-topbar-right\&quot;&gt;\n\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/TopRightBar]!has[draft.of]]\&quot; variable=\&quot;listItem\&quot;&gt;\n\n&lt;$transclude tiddler=&lt;&lt;listItem&gt;&gt; mode=\&quot;inline\&quot;/&gt;\n\n&lt;/$list&gt;\n\n&lt;/span&gt;\n&quot;
        },
        &quot;$:/core/ui/PageTemplate&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/PageTemplate&quot;,
            &quot;text&quot;: &quot;\\define containerClasses()\ntw-page-container tw-page-view-$(themeTitle)$ tw-language-$(languageTitle)$\n\\end\n\n&lt;$importvariables filter=\&quot;[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\&quot;&gt;\n\n&lt;$set name=\&quot;themeTitle\&quot; value={{$:/view}}&gt;\n\n&lt;$set name=\&quot;currentTiddler\&quot; value={{$:/language}}&gt;\n\n&lt;$set name=\&quot;languageTitle\&quot; value={{!!name}}&gt;\n\n&lt;$set name=\&quot;currentTiddler\&quot; value=\&quot;\&quot;&gt;\n\n&lt;div class=&lt;&lt;containerClasses&gt;&gt;&gt;\n\n&lt;$navigator story=\&quot;$:/StoryList\&quot; history=\&quot;$:/HistoryList\&quot;&gt;\n\n&lt;$dropzone&gt;\n\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]\&quot; variable=\&quot;listItem\&quot;&gt;\n\n&lt;$transclude tiddler=&lt;&lt;listItem&gt;&gt;/&gt;\n\n&lt;/$list&gt;\n\n&lt;/$dropzone&gt;\n\n&lt;/$navigator&gt;\n\n&lt;/div&gt;\n\n&lt;/$set&gt;\n\n&lt;/$set&gt;\n\n&lt;/$set&gt;\n\n&lt;/$set&gt;\n\n&lt;/$importvariables&gt;\n&quot;
        },
        &quot;$:/core/ui/SideBar/More&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/SideBar/More&quot;,
            &quot;tags&quot;: &quot;$:/tags/SideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/More/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-more-sidebar\&quot;&gt;\n&lt;&lt;tabs \&quot;[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]\&quot; \&quot;$:/core/ui/MoreSideBar/Tags\&quot; \&quot;$:/state/tab/moresidebar\&quot; \&quot;tw-vertical\&quot;&gt;&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/SideBar/Open&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/SideBar/Open&quot;,
            &quot;tags&quot;: &quot;$:/tags/SideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Open/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/CloseAll/\n&lt;$list filter=\&quot;[list[$:/StoryList]]\&quot; history=\&quot;$:/HistoryList\&quot; storyview=\&quot;pop\&quot;&gt;\n\n&lt;$button message=\&quot;tw-close-tiddler\&quot; title={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=\&quot;btn-invisible btn-mini\&quot;&gt;&amp;times;&lt;/$button&gt; &lt;$link to={{!!title}}&gt;&lt;$view field=\&quot;title\&quot;/&gt;&lt;/$link&gt;\n\n&lt;/$list&gt;\n\n&lt;$button message=\&quot;tw-close-all-tiddlers\&quot; class=\&quot;btn-invisible btn-mini\&quot;&gt;&lt;&lt;lingo Button&gt;&gt;&lt;/$button&gt;\n&quot;
        },
        &quot;$:/core/ui/SideBar/Recent&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/SideBar/Recent&quot;,
            &quot;tags&quot;: &quot;$:/tags/SideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Recent/Caption}}&quot;,
            &quot;text&quot;: &quot;{{$:/snippets/recentchanges}}\n&quot;
        },
        &quot;$:/core/ui/SideBar/Tools&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/SideBar/Tools&quot;,
            &quot;tags&quot;: &quot;$:/tags/SideBar&quot;,
            &quot;caption&quot;: &quot;{{$:/language/SideBar/Tools/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/\n&lt;&lt;lingo Tools/Import/Prompt&gt;&gt; &lt;$browse/&gt;\n\n---\n\n{{$:/snippets/encryptionstatus}}\n\n---\n\n&lt;&lt;lingo Basics/Version/Prompt&gt;&gt; &lt;&lt;version&gt;&gt;\n\n---\n\n{{$:/snippets/viewswitcher}}\n\n---\n\n{{$:/snippets/minithemeswitcher}}\n\n---\n\n{{$:/snippets/languageswitcher}}\n&quot;
        },
        &quot;$:/core/ui/SideBarLists&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/SideBarLists&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-sidebar-lists\&quot;&gt;\n\n&lt;div class=\&quot;tw-search\&quot;&gt;\n&lt;$edit-text tiddler=\&quot;$:/temp/search\&quot; type=\&quot;search\&quot; tag=\&quot;input\&quot;/&gt;\n&lt;$reveal state=\&quot;$:/temp/search\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt;\n&lt;$linkcatcher to=\&quot;$:/temp/search\&quot;&gt;\n&lt;$link to=\&quot;\&quot; class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/close-button}}&lt;/$link&gt;\n&lt;/$linkcatcher&gt;\n&lt;/$reveal&gt;\n&lt;$reveal state=\&quot;$:/temp/search\&quot; type=\&quot;match\&quot; text=\&quot;\&quot;&gt;&amp;nbsp;&lt;$link to=\&quot;$:/AdvancedSearch\&quot; tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=\&quot;btn-invisible\&quot;&gt;&amp;hellip;&lt;/$link&gt;\n&lt;/$reveal&gt;\n&lt;/div&gt;\n\n&lt;$reveal state=\&quot;$:/temp/search\&quot; type=\&quot;nomatch\&quot; text=\&quot;\&quot;&gt;\n\n&lt;div class=\&quot;tw-search-results\&quot;&gt;\n\n{{$:/language/Search/Matches}}\n\n&lt;$list filter=\&quot;[!is[system]search{$:/temp/search}sort[title]limit[250]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n\n&lt;/div&gt;\n\n&lt;/$reveal&gt;\n\n&lt;$reveal state=\&quot;$:/temp/search\&quot; type=\&quot;match\&quot; text=\&quot;\&quot;&gt;\n\n&lt;&lt;tabs \&quot;[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]\&quot; \&quot;$:/core/ui/SideBar/Open\&quot; \&quot;$:/state/tab/sidebar\&quot;&gt;&gt;\n\n&lt;/$reveal&gt;\n\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/TagManager&quot;: {
            &quot;title&quot;: &quot;$:/TagManager&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/TagManager/\n\\define iconEditor(title)\n&lt;$edit-text field=\&quot;icon\&quot; tag=\&quot;input\&quot; size=\&quot;20\&quot;/&gt; &lt;$button popup=&lt;&lt;qualify \&quot;$:/state/popup/icon/$title$\&quot;&gt;&gt; class=\&quot;btn-invisible btn-dropdown\&quot;&gt;{{$:/core/images/down-arrow}}&lt;/$button&gt;\n&lt;div class=\&quot;tw-block-dropdown-wrapper\&quot;&gt;\n&lt;$reveal state=&lt;&lt;qualify \&quot;$:/state/popup/icon/$title$\&quot;&gt;&gt; type=\&quot;nomatch\&quot; text=\&quot;\&quot; default=\&quot;\&quot;&gt;\n&lt;$linkcatcher to=\&quot;$title$!!icon\&quot;&gt;\n&lt;div class=\&quot;tw-block-dropdown tw-edit-type-dropdown\&quot;&gt;\n&lt;$list filter=\&quot;[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] +[sort[title]]\&quot;&gt;\n&lt;$link to={{!!title}}&gt;\n&lt;$view field=\&quot;title\&quot;/&gt;\n&lt;/$link&gt;\n&lt;/$list&gt;\n&lt;/div&gt;\n&lt;/$linkcatcher&gt;\n&lt;/$reveal&gt;\n&lt;/div&gt;\n\\end\n&lt;table&gt;\n&lt;tbody&gt;\n&lt;tr&gt;\n&lt;th&gt;&lt;&lt;lingo Tag/Heading&gt;&gt;&lt;/th&gt;\n&lt;th&gt;&lt;&lt;lingo Count/Heading&gt;&gt;&lt;/th&gt;\n&lt;th&gt;&lt;&lt;lingo Colour/Heading&gt;&gt;&lt;/th&gt;\n&lt;th&gt;&lt;&lt;lingo Icon/Heading&gt;&gt;&lt;/th&gt;\n&lt;/tr&gt;\n&lt;$list filter=\&quot;[tags[]!is[system]sort[title]]\&quot;&gt;\n&lt;tr&gt;\n&lt;td&gt;&lt;$transclude tiddler=\&quot;$:/core/ui/TagTemplate\&quot;/&gt;&lt;/td&gt;\n&lt;td&gt;&lt;$count filter=\&quot;[all[current]tagging[]]\&quot;/&gt;&lt;/td&gt;\n&lt;td&gt;&lt;$edit-text field=\&quot;color\&quot; tag=\&quot;input\&quot; type=\&quot;text\&quot; size=\&quot;9\&quot;/&gt; &lt;$edit-text field=\&quot;color\&quot; tag=\&quot;input\&quot; type=\&quot;color\&quot;/&gt;&lt;/td&gt;\n&lt;td&gt;&lt;$macrocall $name=\&quot;iconEditor\&quot; title={{!!title}}/&gt;&lt;/td&gt;\n&lt;/tr&gt;\n&lt;/$list&gt;\n&lt;/tbody&gt;\n&lt;/table&gt;\n&quot;
        },
        &quot;$:/core/ui/TagTemplate&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TagTemplate&quot;,
            &quot;text&quot;: &quot;\\define tag-styles()\nbackground-color:$(backgroundColor)$;\n\\end\n&lt;span class=\&quot;tw-tag-list-item\&quot;&gt;\n&lt;$set name=\&quot;backgroundColor\&quot; value={{!!color}}&gt;\n&lt;$button popup=&lt;&lt;qualify \&quot;$:/state/popup/tag\&quot;&gt;&gt; class=\&quot;btn-invisible tw-tag-label\&quot; style=&lt;&lt;tag-styles&gt;&gt;&gt;\n&lt;$transclude tiddler={{!!icon}}/&gt; &lt;$view field=\&quot;title\&quot; format=\&quot;text\&quot; /&gt;\n&lt;/$button&gt;\n&lt;/$set&gt;\n&lt;$reveal state=&lt;&lt;qualify \&quot;$:/state/popup/tag\&quot;&gt;&gt; type=\&quot;popup\&quot; position=\&quot;below\&quot; animate=\&quot;yes\&quot;&gt;&lt;div class=\&quot;tw-drop-down\&quot;&gt;&lt;$transclude tiddler=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&lt;hr&gt;\n&lt;$list filter=\&quot;[all[current]tagging[]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&lt;/div&gt;\n&lt;/$reveal&gt;\n&lt;/span&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerFieldTemplate&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerFieldTemplate&quot;,
            &quot;text&quot;: &quot;&lt;tr class=\&quot;tw-view-field\&quot;&gt;\n&lt;td class=\&quot;tw-view-field-name\&quot;&gt;\n&lt;$text text=&lt;&lt;listItem&gt;&gt;/&gt;\n&lt;/td&gt;\n&lt;td class=\&quot;tw-view-field-value\&quot;&gt;\n&lt;$view field=&lt;&lt;listItem&gt;&gt;/&gt;\n&lt;/td&gt;\n&lt;/tr&gt;&quot;
        },
        &quot;$:/core/ui/TiddlerFields&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerFields&quot;,
            &quot;text&quot;: &quot;&lt;table class=\&quot;tw-view-field-table\&quot;&gt;\n&lt;tbody&gt;\n&lt;$list filter=\&quot;[all[current]fields[]sort[title]] -text\&quot; template=\&quot;$:/core/ui/TiddlerFieldTemplate\&quot; variable=\&quot;listItem\&quot;/&gt;\n&lt;/tbody&gt;\n&lt;/table&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerInfo/Advanced/PluginInfo&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerInfo/Advanced/PluginInfo&quot;,
            &quot;tags&quot;: &quot;$:/tags/TiddlerInfo/Advanced&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/\n&lt;$list filter=\&quot;[all[current]has[plugin-type]]\&quot;&gt;\n\n! &lt;&lt;lingo Heading&gt;&gt;\n\n&lt;&lt;lingo Hint&gt;&gt;\n&lt;ul&gt;\n&lt;$list filter=\&quot;[all[current]plugintiddlers[]sort[title]]\&quot; emptyMessage=&lt;&lt;lingo Empty/Hint&gt;&gt;&gt;\n&lt;li&gt;\n&lt;$link to={{!!title}}&gt;\n&lt;$view field=\&quot;title\&quot;/&gt;\n&lt;/$link&gt;\n&lt;/li&gt;\n&lt;/$list&gt;\n&lt;/ul&gt;\n\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerInfo/Advanced/ShadowInfo&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerInfo/Advanced/ShadowInfo&quot;,
            &quot;tags&quot;: &quot;$:/tags/TiddlerInfo/Advanced&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/TiddlerInfo/Advanced/ShadowInfo/\n&lt;$set name=\&quot;infoTiddler\&quot; value=&lt;&lt;currentTiddler&gt;&gt;&gt;\n\n''&lt;&lt;lingo Heading&gt;&gt;''\n\n&lt;$list filter=\&quot;[all[current]!is[shadow]]\&quot;&gt;\n\n&lt;&lt;lingo NotShadow/Hint&gt;&gt;\n\n&lt;/$list&gt;\n\n&lt;$list filter=\&quot;[all[current]is[shadow]]\&quot;&gt;\n\n&lt;&lt;lingo Shadow/Hint&gt;&gt;\n\n&lt;$list filter=\&quot;[all[current]shadowsource[]]\&quot;&gt;\n\n&lt;$set name=\&quot;pluginTiddler\&quot; value=&lt;&lt;currentTiddler&gt;&gt;&gt;\n&lt;&lt;lingo Shadow/Source&gt;&gt;\n&lt;/$set&gt;\n\n&lt;/$list&gt;\n\n&lt;$list filter=\&quot;[all[current]is[shadow]is[tiddler]]\&quot;&gt;\n\n&lt;&lt;lingo OverriddenShadow/Hint&gt;&gt;\n\n&lt;/$list&gt;\n\n\n&lt;/$list&gt;\n&lt;/$set&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerInfo/Advanced&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerInfo/Advanced&quot;,
            &quot;tags&quot;: &quot;$:/tags/TiddlerInfo&quot;,
            &quot;caption&quot;: &quot;{{$:/language/TiddlerInfo/Advanced/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]\&quot; variable=\&quot;listItem\&quot;&gt;\n&lt;$transclude tiddler=&lt;&lt;listItem&gt;&gt;/&gt;\n\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerInfo/Fields&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerInfo/Fields&quot;,
            &quot;tags&quot;: &quot;$:/tags/TiddlerInfo&quot;,
            &quot;caption&quot;: &quot;{{$:/language/TiddlerInfo/Fields/Caption}}&quot;,
            &quot;text&quot;: &quot;&lt;$transclude tiddler=\&quot;$:/core/ui/TiddlerFields\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerInfo/List&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerInfo/List&quot;,
            &quot;tags&quot;: &quot;$:/tags/TiddlerInfo&quot;,
            &quot;caption&quot;: &quot;{{$:/language/TiddlerInfo/List/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/TiddlerInfo/\n&lt;$list filter=\&quot;[list{!!title}]\&quot; emptyMessage=&lt;&lt;lingo List/Empty&gt;&gt; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerInfo/Listed&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerInfo/Listed&quot;,
            &quot;tags&quot;: &quot;$:/tags/TiddlerInfo&quot;,
            &quot;caption&quot;: &quot;{{$:/language/TiddlerInfo/Listed/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/TiddlerInfo/\n&lt;$list filter=\&quot;[all[current]listed[]!is[system]]\&quot; emptyMessage=&lt;&lt;lingo Listed/Empty&gt;&gt; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerInfo/References&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerInfo/References&quot;,
            &quot;tags&quot;: &quot;$:/tags/TiddlerInfo&quot;,
            &quot;caption&quot;: &quot;{{$:/language/TiddlerInfo/References/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/TiddlerInfo/\n&lt;$list filter=\&quot;[all[current]backlinks[]sort[title]]\&quot; emptyMessage=&lt;&lt;lingo References/Empty&gt;&gt; template=\&quot;$:/core/ui/ListItemTemplate\&quot;&gt;\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerInfo/Tagging&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerInfo/Tagging&quot;,
            &quot;tags&quot;: &quot;$:/tags/TiddlerInfo&quot;,
            &quot;caption&quot;: &quot;{{$:/language/TiddlerInfo/Tagging/Caption}}&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/TiddlerInfo/\n&lt;$list filter=\&quot;[all[current]tagging[]]\&quot; emptyMessage=&lt;&lt;lingo Tagging/Empty&gt;&gt; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&quot;
        },
        &quot;$:/core/ui/TiddlerInfo&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TiddlerInfo&quot;,
            &quot;text&quot;: &quot;&lt;&lt;tabs \&quot;[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo]!has[draft.of]]\&quot; \&quot;$:/core/ui/TiddlerInfo/References\&quot;&gt;&gt;\n&quot;
        },
        &quot;$:/core/ui/TopBar/menu&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/TopBar/menu&quot;,
            &quot;tags&quot;: &quot;$:/tags/TopRightBar&quot;,
            &quot;text&quot;: &quot;&lt;$reveal state=\&quot;$:/state/sidebar\&quot; type=\&quot;nomatch\&quot; text=\&quot;no\&quot;&gt;\n&lt;$button set=\&quot;$:/state/sidebar\&quot; setTo=\&quot;no\&quot; title={{$:/language/Buttons/HideSideBar/Hint}} aria-label={{$:/language/Buttons/HideSideBar/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/chevron-right}}&lt;/$button&gt;\n&lt;/$reveal&gt;\n&lt;$reveal state=\&quot;$:/state/sidebar\&quot; type=\&quot;match\&quot; text=\&quot;no\&quot;&gt;\n&lt;$button set=\&quot;$:/state/sidebar\&quot; setTo=\&quot;yes\&quot; title={{$:/language/Buttons/ShowSideBar/Hint}} aria-label={{$:/language/Buttons/ShowSideBar/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/chevron-left}}&lt;/$button&gt;\n&lt;/$reveal&gt;\n&quot;
        },
        &quot;$:/core/ui/UntaggedTemplate&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/UntaggedTemplate&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/SideBar/\n&lt;$button popup=&lt;&lt;qualify \&quot;$:/state/popup/tag\&quot;&gt;&gt; class=\&quot;btn-invisible tw-untagged-label tw-tag-label\&quot;&gt;\n&lt;&lt;lingo Tags/Untagged/Caption&gt;&gt;\n&lt;/$button&gt;\n&lt;$reveal state=&lt;&lt;qualify \&quot;$:/state/popup/tag\&quot;&gt;&gt; type=\&quot;popup\&quot; position=\&quot;below\&quot;&gt;\n&lt;div class=\&quot;tw-drop-down\&quot;&gt;\n&lt;$list filter=\&quot;[untagged[]!is[system]] -[tags[]] +[sort[title]]\&quot; template=\&quot;$:/core/ui/ListItemTemplate\&quot;/&gt;\n&lt;/div&gt;\n&lt;/$reveal&gt;\n&quot;
        },
        &quot;$:/core/ui/ViewTemplate/body&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ViewTemplate/body&quot;,
            &quot;tags&quot;: &quot;$:/tags/ViewTemplate&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;body\&quot;&gt;\n\n&lt;$transclude&gt;\n\n&lt;$transclude tiddler=\&quot;$:/language/MissingTiddler/Hint\&quot;/&gt;\n\n&lt;/$transclude&gt;\n\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/ViewTemplate/classic&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ViewTemplate/classic&quot;,
            &quot;tags&quot;: &quot;$:/tags/ViewTemplate $:/tags/EditTemplate&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ClassicWarning/\n&lt;$list filter=\&quot;[all[current]type[text/x-tiddlywiki]]\&quot;&gt;\n&lt;div class=\&quot;tw-message-box\&quot;&gt;\n\n&lt;&lt;lingo Hint&gt;&gt;\n\n&lt;$button set=\&quot;!!type\&quot; setTo=\&quot;text/vnd.tiddlywiki\&quot;&gt;&lt;&lt;lingo Upgrade/Caption&gt;&gt;&lt;/$button&gt;\n\n&lt;/div&gt;\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/core/ui/ViewTemplate/subtitle&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ViewTemplate/subtitle&quot;,
            &quot;tags&quot;: &quot;$:/tags/ViewTemplate&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-subtitle\&quot;&gt;\n&lt;$link to={{!!modifier}}&gt;\n&lt;$view field=\&quot;modifier\&quot;/&gt;\n&lt;/$link&gt; &lt;$view field=\&quot;modified\&quot; format=\&quot;relativedate\&quot;/&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/ViewTemplate/tags&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ViewTemplate/tags&quot;,
            &quot;tags&quot;: &quot;$:/tags/ViewTemplate&quot;,
            &quot;text&quot;: &quot;&lt;div class=\&quot;tw-tags-wrapper\&quot;&gt;&lt;$list filter=\&quot;[all[current]tags[]sort[title]]\&quot; template=\&quot;$:/core/ui/TagTemplate\&quot; storyview=\&quot;pop\&quot;/&gt;&lt;/div&gt;\n&quot;
        },
        &quot;$:/core/ui/ViewTemplate/title&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ViewTemplate/title&quot;,
            &quot;tags&quot;: &quot;$:/tags/ViewTemplate&quot;,
            &quot;text&quot;: &quot;\\define title-styles()\nfill:$(foregroundColor)$;\n\\end\n&lt;div class=\&quot;tw-tiddler-title\&quot;&gt;\n&lt;h2 class=\&quot;titlebar\&quot;&gt;\n&lt;span class=\&quot;tw-tiddler-controls\&quot;&gt;\n&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]\&quot; variable=\&quot;listItem\&quot;&gt;&lt;$transclude tiddler=&lt;&lt;listItem&gt;&gt;/&gt;&lt;/$list&gt;\n&lt;/span&gt;\n&lt;$set name=\&quot;foregroundColor\&quot; value={{!!color}}&gt;\n&lt;span style=&lt;&lt;title-styles&gt;&gt;&gt;\n&lt;$transclude tiddler={{!!icon}}/&gt;\n&lt;/span&gt;\n&lt;/$set&gt;\n&lt;$list filter=\&quot;[all[current]removeprefix[$:/]]\&quot;&gt;\n&lt;span class=\&quot;title\&quot; title={{$:/language/SystemTiddler/Tooltip}}&gt;\n&lt;span class=\&quot;tw-system-title-prefix\&quot;&gt;$:/&lt;/span&gt;&lt;$text text=&lt;&lt;currentTiddler&gt;&gt;/&gt;\n&lt;/span&gt;\n&lt;/$list&gt;\n&lt;$list filter=\&quot;[all[current]!prefix[$:/]]\&quot;&gt;\n&lt;span class=\&quot;title\&quot;&gt;\n&lt;$view field=\&quot;title\&quot;/&gt;\n&lt;/span&gt;\n&lt;/$list&gt;\n&lt;/h2&gt;\n\n&lt;$reveal type=\&quot;nomatch\&quot; text=\&quot;\&quot; default=\&quot;\&quot; state=&lt;&lt;tiddlerInfoState&gt;&gt; class=\&quot;tw-tiddler-info tw-popup\&quot; animate=\&quot;yes\&quot; retain=\&quot;yes\&quot;&gt;\n\n&lt;$transclude tiddler=\&quot;$:/core/ui/TiddlerInfo\&quot;/&gt;\n\n&lt;/$reveal&gt;\n&lt;/div&gt;&quot;
        },
        &quot;$:/core/ui/ViewTemplate&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ViewTemplate&quot;,
            &quot;text&quot;: &quot;\\define frame-classes()\ntw-tiddler-frame tw-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$\n\\end\n&lt;$set name=\&quot;storyTiddler\&quot; value=&lt;&lt;currentTiddler&gt;&gt;&gt;&lt;$set name=\&quot;tiddlerInfoState\&quot; value=&lt;&lt;qualify \&quot;$:/state/popup/tiddler-info\&quot;&gt;&gt;&gt;&lt;$tiddler tiddler=&lt;&lt;currentTiddler&gt;&gt;&gt;&lt;div class=&lt;&lt;frame-classes&gt;&gt;&gt;&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]\&quot; variable=\&quot;listItem\&quot;&gt;&lt;$transclude tiddler=&lt;&lt;listItem&gt;&gt;/&gt;&lt;/$list&gt;\n&lt;/div&gt;\n&lt;/$tiddler&gt;&lt;/$set&gt;&lt;/$set&gt;\n&quot;
        },
        &quot;$:/core/ui/ViewToolbar/close&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ViewToolbar/close&quot;,
            &quot;tags&quot;: &quot;$:/tags/ViewToolbar&quot;,
            &quot;text&quot;: &quot;&lt;$button message=\&quot;tw-close-tiddler\&quot; title={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/close-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/core/ui/ViewToolbar/edit&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ViewToolbar/edit&quot;,
            &quot;tags&quot;: &quot;$:/tags/ViewToolbar&quot;,
            &quot;text&quot;: &quot;&lt;$button message=\&quot;tw-edit-tiddler\&quot; title={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class=\&quot;btn-invisible\&quot;&gt;{{$:/core/images/edit-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/core/ui/ViewToolbar/info&quot;: {
            &quot;title&quot;: &quot;$:/core/ui/ViewToolbar/info&quot;,
            &quot;tags&quot;: &quot;$:/tags/ViewToolbar&quot;,
            &quot;text&quot;: &quot;&lt;$button popup=&lt;&lt;tiddlerInfoState&gt;&gt; title={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=\&quot;btn-invisible\&quot; selectedClass=\&quot;tw-selected\&quot;&gt;{{$:/core/images/info-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/DefaultTiddlers&quot;: {
            &quot;title&quot;: &quot;$:/DefaultTiddlers&quot;,
            &quot;text&quot;: &quot;GettingStarted\n[!is[system]has[modified]!sort[modified]limit[25]]&quot;
        },
        &quot;$:/temp/advancedsearch&quot;: {
            &quot;title&quot;: &quot;$:/temp/advancedsearch&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/snippets/allfields&quot;: {
            &quot;title&quot;: &quot;$:/snippets/allfields&quot;,
            &quot;text&quot;: &quot;\\define renderfield(title)\n&lt;tr class=\&quot;tw-view-field\&quot;&gt;&lt;td class=\&quot;tw-view-field-name\&quot;&gt;''$title$'':&lt;/td&gt;&lt;td class=\&quot;tw-view-field-value\&quot;&gt;//{{$:/language/Docs/Fields/$title$}}//&lt;/td&gt;&lt;/tr&gt;\n\\end\n&lt;table class=\&quot;tw-view-field-table\&quot;&gt;&lt;tbody&gt;&lt;$list filter=\&quot;[fields[]sort[title]]\&quot; variable=\&quot;listItem\&quot;&gt;&lt;$macrocall $name=\&quot;renderfield\&quot; title=&lt;&lt;listItem&gt;&gt;/&gt;&lt;/$list&gt;\n&lt;/tbody&gt;&lt;/table&gt;\n&quot;
        },
        &quot;$:/snippets/autosavestatus&quot;: {
            &quot;title&quot;: &quot;$:/snippets/autosavestatus&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Saving/\n&lt;$reveal type=\&quot;match\&quot; state=\&quot;$:/config/AutoSave\&quot; text=\&quot;yes\&quot;&gt;\n&lt;&lt;lingo AutoSave/Enabled/Prompt&gt;&gt;\n&lt;$linkcatcher to=\&quot;$:/config/AutoSave\&quot;&gt;&lt;$button to=\&quot;no\&quot;&gt;&lt;&lt;lingo AutoSave/Enabled/Button&gt;&gt;\n&lt;/$button&gt;&lt;/$linkcatcher&gt;\n&lt;/$reveal&gt;\n&lt;$reveal type=\&quot;nomatch\&quot; state=\&quot;$:/config/AutoSave\&quot; text=\&quot;yes\&quot;&gt;\n&lt;&lt;lingo AutoSave/Disabled/Prompt&gt;&gt;\n&lt;$linkcatcher to=\&quot;$:/config/AutoSave\&quot;&gt;&lt;$button to=\&quot;yes\&quot;&gt;&lt;&lt;lingo AutoSave/Disabled/Button&gt;&gt;&lt;/$button&gt;&lt;/$linkcatcher&gt;\n&lt;/$reveal&gt;&quot;
        },
        &quot;$:/config/AnimationDuration&quot;: {
            &quot;title&quot;: &quot;$:/config/AnimationDuration&quot;,
            &quot;text&quot;: &quot;400&quot;
        },
        &quot;$:/config/AutoSave&quot;: {
            &quot;title&quot;: &quot;$:/config/AutoSave&quot;,
            &quot;text&quot;: &quot;yes&quot;
        },
        &quot;$:/config/BitmapEditor/Colour&quot;: {
            &quot;title&quot;: &quot;$:/config/BitmapEditor/Colour&quot;,
            &quot;text&quot;: &quot;#ff0&quot;
        },
        &quot;$:/config/BitmapEditor/LineWidth&quot;: {
            &quot;title&quot;: &quot;$:/config/BitmapEditor/LineWidth&quot;,
            &quot;text&quot;: &quot;3&quot;
        },
        &quot;$:/config/Navigation/UpdateAddressBar&quot;: {
            &quot;title&quot;: &quot;$:/config/Navigation/UpdateAddressBar&quot;,
            &quot;text&quot;: &quot;permaview&quot;
        },
        &quot;$:/config/Navigation/UpdateHistory&quot;: {
            &quot;title&quot;: &quot;$:/config/Navigation/UpdateHistory&quot;,
            &quot;text&quot;: &quot;no&quot;
        },
        &quot;$:/config/SyncFilter&quot;: {
            &quot;title&quot;: &quot;$:/config/SyncFilter&quot;,
            &quot;text&quot;: &quot;[is[tiddler]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]]&quot;
        },
        &quot;$:/snippets/currpalettepreview&quot;: {
            &quot;title&quot;: &quot;$:/snippets/currpalettepreview&quot;,
            &quot;text&quot;: &quot;\\define swatchStyle()\nbackground-color: $(swatchColour)$;\n\\end\n\\define swatch(colour)\n&lt;$set name=\&quot;swatchColour\&quot; value={{##$colour$}}&gt;\n&lt;div class=\&quot;tw-swatch\&quot; style=&lt;&lt;swatchStyle&gt;&gt;/&gt;\n&lt;/$set&gt;\n\\end\n&lt;div class=\&quot;tw-swatches-horiz\&quot;&gt;\n&lt;&lt;swatch foreground&gt;&gt;\n&lt;&lt;swatch background&gt;&gt;\n&lt;&lt;swatch muted-foreground&gt;&gt;\n&lt;&lt;swatch primary&gt;&gt;\n&lt;&lt;swatch page-background&gt;&gt;\n&lt;&lt;swatch tab-background&gt;&gt;\n&lt;&lt;swatch tiddler-info-background&gt;&gt;\n&lt;/div&gt;\n&quot;
        },
        &quot;$:/snippets/download-wiki-button&quot;: {
            &quot;title&quot;: &quot;$:/snippets/download-wiki-button&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Tools/Download/\n&lt;$button message=\&quot;tw-download-file\&quot; param=\&quot;$:/core/save/all\&quot; class=\&quot;btn-big-green\&quot;&gt;&lt;&lt;lingo Full/Caption&gt;&gt; {{$:/core/images/save-button}}&lt;/$button&gt;&quot;
        },
        &quot;$:/snippets/encryptionstatus&quot;: {
            &quot;title&quot;: &quot;$:/snippets/encryptionstatus&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Tools/Encryption/\n&lt;$reveal type=\&quot;match\&quot; state=\&quot;$:/isEncrypted\&quot; text=\&quot;yes\&quot;&gt;\n&lt;&lt;lingo Enabled/Prompt&gt;&gt;\n&lt;$button message=\&quot;tw-clear-password\&quot; class=\&quot;btn btn-danger\&quot;&gt;&lt;&lt;lingo ClearPassword/Button&gt;&gt;&lt;/$button&gt;\n&lt;$button message=\&quot;tw-set-password\&quot; class=\&quot;btn btn-warning\&quot;&gt;&lt;&lt;lingo ChangePassword/Button&gt;&gt;&lt;/$button&gt;\n&lt;/$reveal&gt;\n&lt;$reveal type=\&quot;nomatch\&quot; state=\&quot;$:/isEncrypted\&quot; text=\&quot;yes\&quot;&gt;\n&lt;&lt;lingo Disabled/Prompt&gt;&gt;\n&lt;$button message=\&quot;tw-set-password\&quot; class=\&quot;btn btn-warning\&quot;&gt;&lt;&lt;lingo SetPassword/Button&gt;&gt;&lt;/$button&gt;\n&lt;/$reveal&gt;&quot;
        },
        &quot;$:/snippets/languageswitcher&quot;: {
            &quot;title&quot;: &quot;$:/snippets/languageswitcher&quot;,
            &quot;text&quot;: &quot;{{$:/language/ControlPanel/Basics/Language/Prompt}} &lt;$select tiddler=\&quot;$:/language\&quot;&gt;\n&lt;$list filter=\&quot;[[$:/languages/en-GB]] [plugin-type[language]sort[title]]\&quot;&gt;\n&lt;option value=&lt;&lt;currentTiddler&gt;&gt;&gt;&lt;$view field=\&quot;description\&quot;&gt;&lt;$view field=\&quot;name\&quot;&gt;&lt;$view field=\&quot;title\&quot;/&gt;&lt;/$view&gt;&lt;/$view&gt;&lt;/option&gt;\n&lt;/$list&gt;\n&lt;/$select&gt;&quot;
        },
        &quot;$:/core/macros/CSS&quot;: {
            &quot;title&quot;: &quot;$:/core/macros/CSS&quot;,
            &quot;tags&quot;: &quot;$:/tags/Macro&quot;,
            &quot;text&quot;: &quot;\\define colour(name)\n&lt;$transclude tiddler={{$:/palette}} index=\&quot;$name$\&quot;/&gt;\n\\end\n\n\\define color(name)\n&lt;&lt;colour $name$&gt;&gt;\n\\end\n&quot;
        },
        &quot;$:/core/macros/lingo&quot;: {
            &quot;title&quot;: &quot;$:/core/macros/lingo&quot;,
            &quot;tags&quot;: &quot;$:/tags/Macro&quot;,
            &quot;text&quot;: &quot;\\define lingo-base()\n$:/language/\n\\end\n\n\\define lingo(title)\n{{$(lingo-base)$$title$}}\n\\end\n&quot;
        },
        &quot;$:/core/macros/tabs&quot;: {
            &quot;title&quot;: &quot;$:/core/macros/tabs&quot;,
            &quot;tags&quot;: &quot;$:/tags/Macro&quot;,
            &quot;text&quot;: &quot;\\define tabs(tabsList,default,state:\&quot;$:/state/tab\&quot;,class)\n&lt;div class=\&quot;tw-tab-set $class$\&quot;&gt;\n&lt;div class=\&quot;tw-tab-buttons $class$\&quot;&gt;\n&lt;$list filter=\&quot;$tabsList$\&quot; variable=\&quot;currentTab\&quot;&gt;\n&lt;$button set=&lt;&lt;qualify \&quot;$state$\&quot;&gt;&gt; setTo=&lt;&lt;currentTab&gt;&gt; default=\&quot;$default$\&quot; selectedClass=\&quot;tw-tab-selected\&quot;&gt;\n&lt;$transclude tiddler=&lt;&lt;currentTab&gt;&gt; field=\&quot;caption\&quot;&gt;\n&lt;$macrocall $name=\&quot;currentTab\&quot; $type=\&quot;text/plain\&quot; $output=\&quot;text/plain\&quot;/&gt;\n&lt;/$transclude&gt;\n&lt;/$button&gt;\n&lt;/$list&gt;\n&lt;/div&gt;&lt;div class=\&quot;tw-tab-divider $class$\&quot;/&gt;&lt;div class=\&quot;tw-tab-content $class$\&quot;&gt;\n&lt;$list filter=\&quot;$tabsList$\&quot; variable=\&quot;currentTab\&quot;&gt;\n\n&lt;$reveal type=\&quot;match\&quot; state=&lt;&lt;qualify \&quot;$state$\&quot;&gt;&gt; text=&lt;&lt;currentTab&gt;&gt; default=\&quot;$default$\&quot;&gt;\n\n&lt;$transclude tiddler=&lt;&lt;currentTab&gt;&gt; mode=\&quot;block\&quot;/&gt;\n\n&lt;/$reveal&gt;\n\n&lt;/$list&gt;\n&lt;/div&gt;\n&lt;/div&gt;\n\\end\n&quot;
        },
        &quot;$:/snippets/minilanguageswitcher&quot;: {
            &quot;title&quot;: &quot;$:/snippets/minilanguageswitcher&quot;,
            &quot;text&quot;: &quot;&lt;$select tiddler=\&quot;$:/language\&quot;&gt;\n&lt;$list filter=\&quot;[[$:/languages/en-GB]] [plugin-type[language]sort[title]]\&quot;&gt;\n&lt;option value=&lt;&lt;currentTiddler&gt;&gt;&gt;&lt;$view field=\&quot;description\&quot;&gt;&lt;$view field=\&quot;name\&quot;&gt;&lt;$view field=\&quot;title\&quot;/&gt;&lt;/$view&gt;&lt;/$view&gt;&lt;/option&gt;\n&lt;/$list&gt;\n&lt;/$select&gt;&quot;
        },
        &quot;$:/snippets/minithemeswitcher&quot;: {
            &quot;title&quot;: &quot;$:/snippets/minithemeswitcher&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Appearance/Theme/\n&lt;&lt;lingo Prompt&gt;&gt; &lt;$select tiddler=\&quot;$:/theme\&quot;&gt;\n&lt;$list filter=\&quot;[plugin-type[theme]sort[title]]\&quot;&gt;\n&lt;option value=&lt;&lt;currentTiddler&gt;&gt;&gt;&lt;$view field=\&quot;name\&quot;&gt;&lt;$view field=\&quot;title\&quot;/&gt;&lt;/$view&gt;&lt;/option&gt;\n&lt;/$list&gt;\n&lt;/$select&gt;&quot;
        },
        &quot;$:/snippets/modules&quot;: {
            &quot;title&quot;: &quot;$:/snippets/modules&quot;,
            &quot;text&quot;: &quot;\\define describeModuleType(type)\n{{$:/language/Docs/ModuleTypes/$type$}}\n\\end\n&lt;$list filter=\&quot;[moduletypes[]]\&quot;&gt;\n\n!! &lt;$macrocall $name=\&quot;currentTiddler\&quot; $type=\&quot;text/plain\&quot; $output=\&quot;text/plain\&quot;/&gt;\n\n&lt;$macrocall $name=\&quot;describeModuleType\&quot; type=&lt;&lt;currentTiddler&gt;&gt;/&gt;\n\n&lt;ul&gt;&lt;$list filter=\&quot;[all[current]modules[]]\&quot;&gt;&lt;li&gt;&lt;$link&gt;&lt;&lt;currentTiddler&gt;&gt;&lt;/$link&gt;\n&lt;/li&gt;\n&lt;/$list&gt;\n&lt;/ul&gt;\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/palette&quot;: {
            &quot;title&quot;: &quot;$:/palette&quot;,
            &quot;text&quot;: &quot;$:/palettes/Vanilla&quot;
        },
        &quot;$:/snippets/paletteeditor&quot;: {
            &quot;title&quot;: &quot;$:/snippets/paletteeditor&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Appearance/Palette/Editor/\n\\define describePaletteColour(colour)\n{{$:/language/Docs/PaletteColours/$colour$}}\n\\end\n&lt;$set name=\&quot;currentTiddler\&quot; value={{$:/palette}}&gt;\n\n&lt;&lt;lingo Prompt&gt;&gt; &lt;$link to={{$:/palette}}&gt;&lt;$macrocall $name=\&quot;currentTiddler\&quot; $output=\&quot;text/plain\&quot;/&gt;&lt;/$link&gt;\n\n&lt;$list filter=\&quot;[all[current]is[shadow]is[tiddler]]\&quot; variable=\&quot;listItem\&quot;&gt;\n&lt;&lt;lingo Prompt/Modified&gt;&gt;\n&lt;$button message=\&quot;tw-delete-tiddler\&quot; param={{$:/palette}}&gt;&lt;&lt;lingo Reset/Caption&gt;&gt;&lt;/$button&gt;\n&lt;/$list&gt;\n\n&lt;$list filter=\&quot;[all[current]is[shadow]!is[tiddler]]\&quot; variable=\&quot;listItem\&quot;&gt;\n&lt;&lt;lingo Clone/Prompt&gt;&gt;\n&lt;/$list&gt;\n\n&lt;$button message=\&quot;tw-new-tiddler\&quot; param={{$:/palette}}&gt;&lt;&lt;lingo Clone/Caption&gt;&gt;&lt;/$button&gt;\n\n&lt;table&gt;\n&lt;tbody&gt;\n&lt;$list filter=\&quot;[all[current]indexes[]]\&quot; variable=\&quot;colourName\&quot;&gt;\n&lt;tr&gt;\n&lt;td&gt;\n''&lt;$macrocall $name=\&quot;describePaletteColour\&quot; colour=&lt;&lt;colourName&gt;&gt;/&gt;''&lt;br/&gt;\n&lt;$macrocall $name=\&quot;colourName\&quot; $output=\&quot;text/plain\&quot;/&gt;\n&lt;/td&gt;\n&lt;td&gt;\n&lt;$edit-text index=&lt;&lt;colourName&gt;&gt; tag=\&quot;input\&quot;/&gt;\n&lt;br&gt;\n&lt;$edit-text index=&lt;&lt;colourName&gt;&gt; type=\&quot;color\&quot; tag=\&quot;input\&quot;/&gt;\n&lt;/td&gt;\n&lt;/tr&gt;\n&lt;/$list&gt;\n&lt;/tbody&gt;\n&lt;/table&gt;\n&lt;/$set&gt;\n&quot;
        },
        &quot;$:/snippets/palettepreview&quot;: {
            &quot;title&quot;: &quot;$:/snippets/palettepreview&quot;,
            &quot;text&quot;: &quot;&lt;$set name=\&quot;currentTiddler\&quot; value={{$:/palette}}&gt;\n&lt;$transclude tiddler=\&quot;$:/snippets/currpalettepreview\&quot;/&gt;\n&lt;/$set&gt;\n&quot;
        },
        &quot;$:/snippets/paletteswitcher&quot;: {
            &quot;title&quot;: &quot;$:/snippets/paletteswitcher&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Appearance/Palette/\n&lt;&lt;lingo Prompt&gt;&gt; &lt;$view tiddler={{$:/palette}} field=\&quot;name\&quot;/&gt;\n\n&lt;$linkcatcher to=\&quot;$:/palette\&quot;&gt;\n&lt;div class=\&quot;tw-chooser\&quot;&gt;&lt;$list filter=\&quot;[all[shadows+tiddlers]tag[$:/tags/Palette]sort[description]]\&quot;&gt;&lt;div class=\&quot;tw-chooser-item\&quot;&gt;&lt;$link to={{!!title}}&gt;&lt;div&gt;&lt;$reveal state=\&quot;$:/palette\&quot; type=\&quot;match\&quot; text={{!!title}}&gt;&amp;bull;&lt;/$reveal&gt;&lt;$reveal state=\&quot;$:/palette\&quot; type=\&quot;nomatch\&quot; text={{!!title}}&gt;&amp;nbsp;&lt;/$reveal&gt; ''&lt;$view field=\&quot;name\&quot; format=\&quot;text\&quot;/&gt;'' - &lt;$view field=\&quot;description\&quot; format=\&quot;text\&quot;/&gt;&lt;/div&gt;&lt;$transclude tiddler=\&quot;$:/snippets/currpalettepreview\&quot;/&gt;&lt;/$link&gt;&lt;/div&gt;\n&lt;/$list&gt;\n&lt;/div&gt;\n&lt;/$linkcatcher&gt;&quot;
        },
        &quot;$:/snippets/recentchanges&quot;: {
            &quot;title&quot;: &quot;$:/snippets/recentchanges&quot;,
            &quot;text&quot;: &quot;&lt;$list filter=\&quot;[!is[system]has[modified]!sort[modified]limit[100]eachday[modified]]\&quot;&gt;\n&lt;div class=\&quot;tw-menu-list-item\&quot;&gt;\n&lt;$view field=\&quot;modified\&quot; format=\&quot;date\&quot; template={{$:/language/RecentChanges/DateFormat}}/&gt;\n&lt;$list filter=\&quot;[sameday{!!modified}!is[system]!sort[modified]]\&quot;&gt;\n&lt;div class=\&quot;tw-menu-list-subitem\&quot;&gt;\n&lt;$link to={{!!title}}&gt;\n&lt;$view field=\&quot;title\&quot;/&gt;\n&lt;/$link&gt;\n&lt;/div&gt;\n&lt;/$list&gt;\n&lt;/div&gt;\n&lt;/$list&gt;\n&quot;
        },
        &quot;$:/temp/search&quot;: {
            &quot;title&quot;: &quot;$:/temp/search&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/tags/AdvancedSearch&quot;: {
            &quot;title&quot;: &quot;$:/tags/AdvancedSearch&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/AdvancedSearch/Standard]] [[$:/core/ui/AdvancedSearch/System]] [[$:/core/ui/AdvancedSearch/Shadows]] [[$:/core/ui/AdvancedSearch/Filter]]&quot;
        },
        &quot;$:/tags/ControlPanel&quot;: {
            &quot;title&quot;: &quot;$:/tags/ControlPanel&quot;,
            &quot;list&quot;: &quot;$:/core/ui/ControlPanel/Basics $:/core/ui/ControlPanel/Appearance $:/core/ui/ControlPanel/Saving $:/core/ui/ControlPanel/Plugins $:/core/ui/ControlPanel/Tools $:/core/ui/ControlPanel/Internals&quot;
        },
        &quot;$:/tags/EditTemplate&quot;: {
            &quot;title&quot;: &quot;$:/tags/EditTemplate&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/EditTemplate/controls]] [[$:/core/ui/EditTemplate/title]] [[$:/core/ui/EditTemplate/tags]] [[$:/core/ui/EditTemplate/shadow]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/EditTemplate/body]] [[$:/core/ui/EditTemplate/type]] [[$:/core/ui/EditTemplate/fields]]&quot;
        },
        &quot;$:/tags/EditToolbar&quot;: {
            &quot;title&quot;: &quot;$:/tags/EditToolbar&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/EditToolbar/delete]] [[$:/core/ui/EditToolbar/cancel]] [[$:/core/ui/EditToolbar/save]]&quot;
        },
        &quot;$:/tags/MoreSideBar&quot;: {
            &quot;title&quot;: &quot;$:/tags/MoreSideBar&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Shadows]]&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/tags/PageControls&quot;: {
            &quot;title&quot;: &quot;$:/tags/PageControls&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/PageControls/new-tiddler]] [[$:/core/ui/PageControls/control-panel]] [[$:/core/ui/PageControls/save-wiki]]&quot;
        },
        &quot;$:/tags/PageTemplate&quot;: {
            &quot;title&quot;: &quot;$:/tags/PageTemplate&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/PageTemplate/sidebar]] [[$:/core/ui/PageTemplate/story]] [[$:/core/ui/PageTemplate/alerts]] [[$:/core/ui/PageTemplate/topleftbar]] [[$:/core/ui/PageTemplate/toprightbar]]&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/tags/SideBar&quot;: {
            &quot;title&quot;: &quot;$:/tags/SideBar&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/SideBar/Open]] [[$:/core/ui/SideBar/Recent]] [[$:/core/ui/SideBar/Tools]] [[$:/core/ui/SideBar/More]]&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/tags/TiddlerInfo&quot;: {
            &quot;title&quot;: &quot;$:/tags/TiddlerInfo&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/TiddlerInfo/References]] [[$:/core/ui/TiddlerInfo/Tagging]] [[$:/core/ui/TiddlerInfo/List]] [[$:/core/ui/TiddlerInfo/Listed]] [[$:/core/ui/TiddlerInfo/Fields]]&quot;,
            &quot;text&quot;: &quot;&quot;
        },
        &quot;$:/tags/TiddlerInfo/Advanced&quot;: {
            &quot;title&quot;: &quot;$:/tags/TiddlerInfo/Advanced&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/TiddlerInfo/Advanced/ShadowInfo]] [[$:/core/ui/TiddlerInfo/Advanced/PluginInfo]]&quot;
        },
        &quot;$:/tags/ViewTemplate&quot;: {
            &quot;title&quot;: &quot;$:/tags/ViewTemplate&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/ViewTemplate/title]] [[$:/core/ui/ViewTemplate/subtitle]] [[$:/core/ui/ViewTemplate/tags]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/ViewTemplate/body]]&quot;
        },
        &quot;$:/tags/ViewToolbar&quot;: {
            &quot;title&quot;: &quot;$:/tags/ViewToolbar&quot;,
            &quot;list&quot;: &quot;[[$:/core/ui/ViewToolbar/info]] [[$:/core/ui/ViewToolbar/edit]] [[$:/core/ui/ViewToolbar/close]]&quot;
        },
        &quot;$:/snippets/themeswitcher&quot;: {
            &quot;title&quot;: &quot;$:/snippets/themeswitcher&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Appearance/Theme/\n&lt;&lt;lingo Prompt&gt;&gt; &lt;$view tiddler={{$:/theme}} field=\&quot;name\&quot;/&gt;\n\n&lt;$linkcatcher to=\&quot;$:/theme\&quot;&gt;\n&lt;$list filter=\&quot;[plugin-type[theme]sort[title]]\&quot;&gt;&lt;div&gt;&lt;$reveal state=\&quot;$:/theme\&quot; type=\&quot;match\&quot; text={{!!title}}&gt;&amp;bull;&lt;/$reveal&gt;&lt;$reveal state=\&quot;$:/theme\&quot; type=\&quot;nomatch\&quot; text={{!!title}}&gt;&amp;nbsp;&lt;/$reveal&gt; &lt;$link to={{!!title}}&gt;''&lt;$view field=\&quot;name\&quot; format=\&quot;text\&quot;/&gt;'' &lt;$view field=\&quot;description\&quot; format=\&quot;text\&quot;/&gt;&lt;/$link&gt;&lt;/div&gt;\n&lt;/$list&gt;\n&lt;/$linkcatcher&gt;&quot;
        },
        &quot;$:/core/wiki/title&quot;: {
            &quot;title&quot;: &quot;$:/core/wiki/title&quot;,
            &quot;type&quot;: &quot;text/vnd.tiddlywiki&quot;,
            &quot;text&quot;: &quot;{{$:/SiteTitle}} --- {{$:/SiteSubtitle}}&quot;
        },
        &quot;$:/view&quot;: {
            &quot;title&quot;: &quot;$:/view&quot;,
            &quot;text&quot;: &quot;classic&quot;
        },
        &quot;$:/snippets/viewswitcher&quot;: {
            &quot;title&quot;: &quot;$:/snippets/viewswitcher&quot;,
            &quot;text&quot;: &quot;\\define lingo-base() $:/language/ControlPanel/Appearance/StoryView/\n&lt;&lt;lingo Prompt&gt;&gt; &lt;$select tiddler=\&quot;$:/view\&quot;&gt;\n&lt;$list filter=\&quot;[storyviews[]]\&quot;&gt;\n&lt;option&gt;&lt;$view field=\&quot;title\&quot;/&gt;&lt;/option&gt;\n&lt;/$list&gt;\n&lt;/$select&gt;&quot;
        }
    }
}</pre>
</div>
<div title="$:/isEncrypted">
<pre>no</pre>
</div>
<div author="JeremyRuston" core-version="&gt;=5.0.0" dependents="" description="Adds support for HTML5 full screen mode" plugin-type="plugin" title="$:/plugins/tiddlywiki/fullscreen" type="application/json" version="5.0.13-beta">
<pre>{
    &quot;tiddlers&quot;: {
        &quot;$:/plugins/tiddlywiki/fullscreen/init.js&quot;: {
            &quot;text&quot;: &quot;/*\\\ntitle: $:/plugins/tiddlywiki/fullscreen/init.js\ntype: application/javascript\nmodule-type: startup\n\nMessage handler for full screen mode\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, Element: false */\n\&quot;use strict\&quot;;\n\n// Export name and synchronous status\nexports.name = \&quot;full-screen\&quot;;\nexports.platforms = [\&quot;browser\&quot;];\nexports.after = [\&quot;startup\&quot;];\nexports.synchronous = true;\n\nexports.startup = function() {\n\tvar d = document,\n\t\tdb = d.body,\n\t\t_requestFullscreen = db.webkitRequestFullscreen !== undefined ? \&quot;webkitRequestFullscreen\&quot; :\n\t\t\t\t\t\t\tdb.mozRequestFullScreen !== undefined ? \&quot;mozRequestFullScreen\&quot; :\n\t\t\t\t\t\t\tdb.msRequestFullscreen !== undefined ? \&quot;msRequestFullscreen\&quot; :\n\t\t\t\t\t\t\tdb.requestFullscreen !== undefined ? \&quot;requestFullscreen\&quot; : \&quot;\&quot;,\n\t\t_exitFullscreen = d.webkitExitFullscreen !== undefined ? \&quot;webkitExitFullscreen\&quot; :\n\t\t\t\t\t\t\td.mozCancelFullScreen !== undefined ? \&quot;mozCancelFullScreen\&quot; :\n\t\t\t\t\t\t\td.msExitFullscreen !== undefined ? \&quot;msExitFullscreen\&quot; :\n\t\t\t\t\t\t\td.exitFullscreen !== undefined ? \&quot;exitFullscreen\&quot; : \&quot;\&quot;,\n\t\t_fullscreenElement = d.webkitFullscreenElement !== undefined ? \&quot;webkitFullscreenElement\&quot; :\n\t\t\t\t\t\t\td.mozFullScreenElement !== undefined ? \&quot;mozFullScreenElement\&quot; :\n\t\t\t\t\t\t\td.msFullscreenElement !== undefined ? \&quot;msFullscreenElement\&quot; :\n\t\t\t\t\t\t\td.fullscreenElement !== undefined ? \&quot;fullscreenElement\&quot; : \&quot;\&quot;;\n\t// Install the full screen handler\n\tif(_requestFullscreen) {\n\t\t$tw.rootWidget.addEventListener(\&quot;tw-full-screen\&quot;,function(event) {\n\t\t\tif(document[_fullscreenElement]) {\n\t\t\t\tdocument[_exitFullscreen]();\n\t\t\t} else {\n\t\t\t\tdocument.documentElement[_requestFullscreen](Element.ALLOW_KEYBOARD_INPUT);\n\t\t\t}\n\t\t});\n\t}\n};\n\n})();\n&quot;,
            &quot;title&quot;: &quot;$:/plugins/tiddlywiki/fullscreen/init.js&quot;,
            &quot;type&quot;: &quot;application/javascript&quot;,
            &quot;module-type&quot;: &quot;startup&quot;
        }
    }
}</pre>
</div>
<div author="JeremyRuston" core-version="&gt;=5.0.0" dependents="$:/themes/tiddlywiki/vanilla" description="A clean theme that emphasises individual tiddlers" name="Snow White" plugin-type="theme" title="$:/themes/tiddlywiki/snowwhite" type="application/json" version="5.0.13-beta">
<pre>{
    &quot;tiddlers&quot;: {
        &quot;$:/themes/tiddlywiki/snowwhite/base&quot;: {
            &quot;title&quot;: &quot;$:/themes/tiddlywiki/snowwhite/base&quot;,
            &quot;tags&quot;: &quot;[[$:/tags/stylesheet]]&quot;,
            &quot;text&quot;: &quot;\\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline\n\n.sidebar-header {\n\ttext-shadow: 0 1px 0 &lt;&lt;colour sidebar-foreground-shadow&gt;&gt;;\n}\n\n.tw-tiddler-info {\n\t&lt;&lt;box-shadow \&quot;inset 1px 2px 3px rgba(0,0,0,0.1)\&quot;&gt;&gt;\n}\n\n@media screen {\n\t.tw-tiddler-frame {\n\t\t&lt;&lt;box-shadow \&quot;5px 5px 5px rgba(0, 0, 0, 0.1)\&quot;&gt;&gt;\n\t}\n}\n\n@media (max-width: 770px) {\n\t.tw-tiddler-frame {\n\t\t&lt;&lt;box-shadow none&gt;&gt;\n\t}\n}\n\n.tw-page-controls button svg, .tw-tiddler-controls button svg, .tw-topbar button svg {\n\t&lt;&lt;transition \&quot;fill 150ms ease-in-out\&quot;&gt;&gt;\n}\n\n.tw-tiddler-controls button.tw-selected svg {\n\t&lt;&lt;filter \&quot;drop-shadow(0px -1px 2px rgba(0,0,0,0.25))\&quot;&gt;&gt;\n}\n\n.tw-tiddler-frame input.tw-edit-texteditor {\n\t&lt;&lt;box-shadow \&quot;inset 0 1px 8px rgba(0, 0, 0, 0.15)\&quot;&gt;&gt;\n}\n\n.tw-edit-tags {\n\t&lt;&lt;box-shadow \&quot;inset 0 1px 8px rgba(0, 0, 0, 0.15)\&quot;&gt;&gt;\n}\n\n.tw-tiddler-frame .tw-edit-tags input.tw-edit-texteditor {\n\t&lt;&lt;box-shadow \&quot;none\&quot;&gt;&gt;\n\tborder: none;\n\toutline: none;\n}\n\ncanvas.tw-edit-bitmapeditor {\n\t&lt;&lt;box-shadow \&quot;2px 2px 5px rgba(0, 0, 0, 0.5)\&quot;&gt;&gt;\n}\n\n.tw-drop-down {\n\tborder-radius: 4px;\n\t&lt;&lt;box-shadow \&quot;2px 2px 10px rgba(0, 0, 0, 0.5)\&quot;&gt;&gt;\n}\n\n.tw-block-dropdown {\n\tborder-radius: 4px;\n\t&lt;&lt;box-shadow \&quot;2px 2px 10px rgba(0, 0, 0, 0.5)\&quot;&gt;&gt;\n}\n\n.tw-modal-displayed {\n\t-webkit-filter: blur(4px);\n}\n\n.modal {\n\tborder-radius: 6px;\n\t&lt;&lt;box-shadow \&quot;0 3px 7px rgba(0,0,0,0.3)\&quot;&gt;&gt;\n}\n\n.modal-footer {\n\tborder-radius: 0 0 6px 6px;\n\t&lt;&lt;box-shadow \&quot;inset 0 1px 0 #fff\&quot;&gt;&gt;;\n}\n\n\n.tw-alert {\n\tborder-radius: 6px;\n\t&lt;&lt;box-shadow \&quot;0 3px 7px rgba(0,0,0,0.6)\&quot;&gt;&gt;\n}\n\n.tw-notification {\n\tborder-radius: 6px;\n\t&lt;&lt;box-shadow \&quot;0 3px 7px rgba(0,0,0,0.3)\&quot;&gt;&gt;\n\ttext-shadow: 0 1px 0 rgba(255,255,255, 0.8);\n}\n\n.tw-sidebar-lists .tw-tab-divider {\n\t&lt;&lt;background-linear-gradient \&quot;left, rgb(216,216,216) 0%, rgb(236,236,236) 250px\&quot;&gt;&gt;\n}\n\n.tw-more-sidebar .tw-tab-buttons button {\n\t&lt;&lt;background-linear-gradient \&quot;left, rgb(236,236,236) 0%, rgb(224,224,224) 100%\&quot;&gt;&gt;\n}\n\n.tw-more-sidebar .tw-tab-buttons button.tw-tab-selected {\n\t&lt;&lt;background-linear-gradient \&quot;left, rgb(236,236,236) 0%, rgb(248,248,248) 100%\&quot;&gt;&gt;\n}\n\n.tw-message-box img {\n\t&lt;&lt;box-shadow \&quot;1px 1px 3px rgba(0,0,0,0.5)\&quot;&gt;&gt;\n}\n&quot;
        }
    }
}</pre>
</div>
<div author="JeremyRuston" core-version="&gt;=5.0.0" dependents="" description="A basic default theme" name="Vanilla" plugin-type="theme" title="$:/themes/tiddlywiki/vanilla" type="application/json" version="5.0.13-beta">
<pre>{
    &quot;tiddlers&quot;: {
        &quot;$:/themes/tiddlywiki/vanilla/themetweaks&quot;: {
            &quot;title&quot;: &quot;$:/themes/tiddlywiki/vanilla/themetweaks&quot;,
            &quot;tags&quot;: &quot;$:/tags/ControlPanel/Appearance&quot;,
            &quot;caption&quot;: &quot;Theme Tweaks&quot;,
            &quot;text&quot;: &quot;You can tweak certain aspects of the ''Vanilla'' theme.\n\n//Take care to preserve any backticks (&amp;#96;) in the settings//\n\n! Settings\n\n* Font family: &lt;$edit-text tiddler=\&quot;$:/themes/tiddlywiki/vanilla/settings\&quot; index=\&quot;fontfamily\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt;\n\n! Sizes\n\n* Font size: &lt;$edit-text tiddler=\&quot;$:/themes/tiddlywiki/vanilla/metrics\&quot; index=\&quot;fontsize\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt;\n* Line height: &lt;$edit-text tiddler=\&quot;$:/themes/tiddlywiki/vanilla/metrics\&quot; index=\&quot;lineheight\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt;\n* Story left position //(the distance between the left of the screen and the left margin of the story river or tiddler area)//: &lt;$edit-text tiddler=\&quot;$:/themes/tiddlywiki/vanilla/metrics\&quot; index=\&quot;storyleft\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt;\n* Story top position //(the distance between the top of the screen ad the top margin of the story river or tiddler area)//: &lt;$edit-text tiddler=\&quot;$:/themes/tiddlywiki/vanilla/metrics\&quot; index=\&quot;storytop\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt;\n* Story right //(the distance between the left side of the screen and the left margin of the sidebar area)//: &lt;$edit-text tiddler=\&quot;$:/themes/tiddlywiki/vanilla/metrics\&quot; index=\&quot;storyright\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt;\n* Story width //(the width of the story river or tiddler area)//: &lt;$edit-text tiddler=\&quot;$:/themes/tiddlywiki/vanilla/metrics\&quot; index=\&quot;storywidth\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt;\n* Tiddler width //(the width of individual tiddlers -- used for zoomin storyview)//: &lt;$edit-text tiddler=\&quot;$:/themes/tiddlywiki/vanilla/metrics\&quot; index=\&quot;tiddlerwidth\&quot; default=\&quot;\&quot; tag=\&quot;input\&quot;/&gt;\n\n&quot;
        },
        &quot;$:/themes/tiddlywiki/vanilla/base&quot;: {
            &quot;title&quot;: &quot;$:/themes/tiddlywiki/vanilla/base&quot;,
            &quot;tags&quot;: &quot;[[$:/tags/stylesheet]]&quot;,
            &quot;text&quot;: &quot;\\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline\n/*\n** Start with the normalize CSS reset, and then belay some of its effects\n*/\n\n{{$:/themes/tiddlywiki/vanilla/reset}}\n\n*, input[type=\&quot;search\&quot;] {\n\tbox-sizing: border-box;\n\t-moz-box-sizing: border-box;\n\t-webkit-box-sizing: border-box;\n}\n\nhtml button {\n\tline-height: 1.2;\n}\n\n/*\n** Basic element styles\n*/\n\nhtml {\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings##fontfamily}};\n\ttext-rendering: optimizeLegibility; /* Enables kerning and ligatures etc. */\t\n}\n\nhtml:-webkit-full-screen {\n\tbackground-color: &lt;&lt;colour page-background&gt;&gt;;\n}\n\nbody.tw-body {\n\tfont-size: {{$:/themes/tiddlywiki/vanilla/metrics##fontsize}};\n\tline-height: {{$:/themes/tiddlywiki/vanilla/metrics##lineheight}};\n\tcolor: &lt;&lt;colour foreground&gt;&gt;;\n\tbackground-color: &lt;&lt;colour page-background&gt;&gt;;\n\tword-wrap: break-word;\n}\n\nh1, h2, h3, h4, h5, h6 {\n\tline-height: 1.2;\n\tfont-weight: 300;\n}\n\npre {\n\tdisplay: block;\n\tpadding: 14px;\n\tmargin-top: 1em;\n\tmargin-bottom: 1em;\n\tword-break: normal;\n\tword-wrap: break-word;\n\twhite-space: pre;\n\twhite-space: pre-wrap;\n\tbackground-color: &lt;&lt;colour pre-background&gt;&gt;;\n\tborder: 1px solid &lt;&lt;colour pre-border&gt;&gt;;\n\tpadding: 0 3px 2px;\n\tborder-radius: 3px;\n}\n\ncode {\n\tcolor: &lt;&lt;colour code-foreground&gt;&gt;;\n\tbackground-color: &lt;&lt;colour code-background&gt;&gt;;\n\tborder: 1px solid &lt;&lt;colour code-border&gt;&gt;;\n    white-space: pre-wrap;\n\tpadding: 0 3px 2px;\n\tborder-radius: 3px;\n}\n\nblockquote {\n\tborder-left: 5px solid &lt;&lt;colour blockquote-bar&gt;&gt;;\n\tmargin-left: 25px;\n\tpadding-left: 10px;\n}\n\ndl dt {\n\tfont-weight: bold;\n\tmargin-top: 6px;\n}\n\n/*\nMarkdown likes putting code elements inside pre elements\n*/\npre &gt; code {\n\tpadding: 0;\n\tborder: none;\n\tbackground-color: inherit;\n\tcolor: inherit;\n}\n\ntable {\n\tborder: 1px solid &lt;&lt;colour table-border&gt;&gt;;\n\twidth: auto;\n\tmax-width: 100%;\n\tcaption-side: bottom;\n\tmargin-top: 1em;\n\tmargin-bottom: 1em;\n}\n\ntable th, table td {\n\tpadding: 0 7px 0 7px;\n\tborder-top: 1px solid &lt;&lt;colour table-border&gt;&gt;;\n\tborder-left: 1px solid &lt;&lt;colour table-border&gt;&gt;;\n}\n\ntable thead tr td, table th {\n\tbackground-color: &lt;&lt;colour table-header-background&gt;&gt;;\n\tfont-weight: bold;\n}\n\ntable tfoot tr td {\n\tbackground-color: &lt;&lt;colour table-footer-background&gt;&gt;;\n}\n\n.tw-csv-table {\n\twhite-space: nowrap;\n}\n\n.tw-tiddler-frame img,\n.tw-tiddler-frame svg,\n.tw-tiddler-frame canvas,\n.tw-tiddler-frame embed,\n.tw-tiddler-frame iframe {\n\tmax-width: 100%;\n}\n\n.tw-tiddler-frame embed,\n.tw-tiddler-frame iframe {\n\twidth: 100%;\n\theight: 600px;\n}\n\n/*\n** Links\n*/\n\na.tw-tiddlylink {\n\ttext-decoration: none;\n\tfont-weight: normal;\n\tcolor: &lt;&lt;colour tiddler-link-foreground&gt;&gt;;\n\t-webkit-user-select: inherit; /* Otherwise the draggable attribute makes links impossible to select */\n}\n\n.tw-sidebar-lists a.tw-tiddlylink {\n\tcolor: &lt;&lt;colour sidebar-tiddler-link-foreground&gt;&gt;;\n}\n\n.tw-sidebar-lists a.tw-tiddlylink:hover {\n\tcolor: &lt;&lt;colour sidebar-tiddler-link-foreground-hover&gt;&gt;;\n}\n\na.tw-tiddlylink:hover {\n\ttext-decoration: underline;\n}\n\na.tw-tiddlylink-resolves {\n}\n\na.tw-tiddlylink-shadow {\n\tfont-weight: bold;\n}\n\na.tw-tiddlylink-shadow.tw-tiddlylink-resolves {\n\tfont-weight: normal;\n}\n\na.tw-tiddlylink-missing {\n\tfont-style: italic;\n}\n\na.tw-tiddlylink-external {\n\ttext-decoration: underline;\n\tcolor: &lt;&lt;colour external-link-foreground&gt;&gt;;\n\tbackground-color: &lt;&lt;colour external-link-background&gt;&gt;;\n}\n\na.tw-tiddlylink-external:visited {\n\tcolor: &lt;&lt;colour external-link-foreground-visited&gt;&gt;;\n\tbackground-color: &lt;&lt;colour external-link-background-visited&gt;&gt;;\n}\n\na.tw-tiddlylink-external:hover {\n\tcolor: &lt;&lt;colour external-link-foreground-hover&gt;&gt;;\n\tbackground-color: &lt;&lt;colour external-link-background-hover&gt;&gt;;\n}\n\n/*\n** Drag and drop styles\n*/\n\n.tw-tiddler-dragger {\n\tposition: relative;\n\tz-index: -10000;\n}\n\n.tw-tiddler-dragger-inner {\n\tposition: absolute;\n\tdisplay: inline-block;\n\tpadding: 8px 20px;\n\tfont-size: 16.9px;\n\tfont-weight: bold;\n\tline-height: 20px;\n\tcolor: &lt;&lt;colour dragger-foreground&gt;&gt;;\n\ttext-shadow: 0 1px 0 rgba(0, 0, 0, 1);\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n\tbackground-color: &lt;&lt;colour dragger-background&gt;&gt;;\n\tborder-radius: 20px;\n}\n\n.tw-tiddler-dragger-cover {\n\tposition: absolute;\n\tbackground-color: &lt;&lt;colour page-background&gt;&gt;;\n}\n\n.tw-dropzone {\n\tposition: relative;\n}\n\n.tw-dropzone.tw-dragover:before {\n\tz-index: 10000;\n\tdisplay: block;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbackground: &lt;&lt;colour dropzone-background&gt;&gt;;\n\ttext-align: center;\n\tcontent: \&quot;Drop here\&quot;;\n}\n\n/*\n** Buttons\n*/\n\n.btn-invisible {\n\tpadding: 0;\n\tmargin: 0;\n\tbackground: none;\n\tborder: none;\n}\n\n.btn-icon svg {\n\theight: 1em;\n\twidth: 1em;\n\tfill: &lt;&lt;colour muted-foreground&gt;&gt;;\n}\n\n.btn-big-green {\n\tpadding: 8px;\n\tmargin: 4px 8px 4px 8px;\n\tbackground: &lt;&lt;colour download-background&gt;&gt;;\n\tcolor: &lt;&lt;colour download-foreground&gt;&gt;;\n\tfill: &lt;&lt;colour download-foreground&gt;&gt;;\n\tborder: none;\n\tfont-size: 1.2em;\n\tline-height: 1.4em;\n}\n\n.tw-sidebar-lists input {\n\tcolor: &lt;&lt;colour foreground&gt;&gt;;\n}\n\n.tw-sidebar-lists button.btn {\n\tcolor: &lt;&lt;colour sidebar-button-foreground&gt;&gt;;\n}\n\n.tw-sidebar-lists button.btn-mini {\n\tcolor: &lt;&lt;colour sidebar-muted-foreground&gt;&gt;;\n}\n\n.tw-sidebar-lists button.btn-mini:hover {\n\tcolor: &lt;&lt;colour sidebar-muted-foreground-hover&gt;&gt;;\n}\n\n.tw-image-button {\n\theight: 1em;\n}\n\n/*\n** Tags and missing tiddlers\n*/\n\n.tw-tag-list-item {\n\tposition: relative;\n\tdisplay: inline-block;\n\tmargin-right: 7px;\n}\n\n.tw-tags-wrapper {\n\tmargin: 4px 0 14px 0;\n}\n\n.tw-missing-tiddler-label {\n\tfont-style: italic;\n\tfont-weight: normal;\n\tdisplay: inline-block;\n\tfont-size: 11.844px;\n\tline-height: 14px;\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n}\n\n.tw-tag-label {\n\tdisplay: inline-block;\n\tpadding: 2px 9px;\n\tfont-size: 0.9em;\n\tfont-weight: 300;\n\tline-height: 1.2em;\n\tcolor: &lt;&lt;colour tag-foreground&gt;&gt;;\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n\tbackground-color: &lt;&lt;colour tag-background&gt;&gt;;\n\tborder-radius: 8px;\n}\n\n.tw-untagged-label {\n\tbackground-color: &lt;&lt;colour untagged-background&gt;&gt;;\n}\n\n.tw-tag-label svg, .tw-tag-label img {\n\theight: 1em;\n\twidth: 1em;\n\tfill: &lt;&lt;colour tag-foreground&gt;&gt;;\n}\n\n/*\n** Page layout\n*/\n\n.tw-topbar {\n\tposition: fixed;\n\tz-index: 1200;\n}\n\n.tw-topbar-left {\n\tleft: 29px;\n\ttop: 5px;\n}\n\n.tw-topbar-right {\n\ttop: 5px;\n\tright: 29px;\n}\n\n.tw-topbar button {\n\tpadding: 8px;\n}\n\n.tw-topbar svg {\n\tfill: &lt;&lt;colour muted-foreground&gt;&gt;;\n}\n\n.tw-topbar button:hover svg {\n\tfill: &lt;&lt;colour foreground&gt;&gt;;\n}\n\n.sidebar-header {\n\tcolor: &lt;&lt;colour sidebar-foreground&gt;&gt;;\n\tfill: &lt;&lt;colour sidebar-foreground&gt;&gt;;\n}\n\n.sidebar-header .title a.tw-tiddlylink-resolves {\n\tfont-weight: 300;\n}\n\n.sidebar-header .tw-sidebar-lists p {\n\tmargin-top: 3px;\n\tmargin-bottom: 3px;\n}\n\n.sidebar-header .tw-missing-tiddler-label {\n\tcolor: &lt;&lt;colour sidebar-foreground&gt;&gt;;\n}\n\n.tw-advanced-search input {\n\twidth: 60%;\n}\n\n.tw-search {\n\tpadding-top: 14px;\n}\n\n.tw-search a svg {\n\theight: 0.75em;\n}\n\n.tw-search-results {\n\tpadding-top: 14px;\n}\n\n.tw-page-controls {\n\tmargin-top: 14px;\n}\n\n.tw-page-controls a.tw-tiddlylink:hover {\n\ttext-decoration: none;\n}\n\n.tw-page-controls svg {\n\theight: 1.75em;\n\tmin-width: 1px;\n\tpadding-right: 0.5em;\n\tfill: &lt;&lt;colour sidebar-controls-foreground&gt;&gt;;\n}\n\n.tw-page-controls button:hover svg, .tw-page-controls a:hover svg {\n\tfill: &lt;&lt;colour sidebar-controls-foreground-hover&gt;&gt;;\n}\n\n.tw-menu-list-item {\n\twhite-space: nowrap;\n}\n\n.tw-menu-list-count {\n\tfont-weight: bold;\n}\n\n.tw-open-tiddler-list {\n\t&lt;&lt;transform-origin \&quot;0% 0%\&quot;&gt;&gt;\n}\n\n.tw-menu-list-subitem {\n\tpadding-left: 7px;\n}\n\n.story-river {\n\tposition: relative;\n}\n\n.tw-story-spacer {\n\tposition: absolute;\n\tmin-height: 100%;\n}\n\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics##storywidth}}) {\n\n\t.sidebar-header {\n\t\tpadding: 14px;\n\t\tmin-height: 32px;\n\t}\n\n\t.story-river {\n\t\tposition: relative;\n\t\tpadding: 0;\n\t}\n}\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics##storywidth}}) {\n\n\t.tw-message-box {\n\t\tmargin: 21px -21px 21px -21px;\n\t}\n\n\t.tw-sidebar-scrollable {\n\t\tposition: fixed;\n\t\ttop: {{$:/themes/tiddlywiki/vanilla/metrics##storytop}};\n\t\tleft: {{$:/themes/tiddlywiki/vanilla/metrics##storyright}};\n\t\tbottom: 0;\n\t\tright: 0;\n\t\toverflow-y: auto;\n\t\toverflow-x: auto;\n\t\t-webkit-overflow-scrolling: touch;\n\t\tmargin: 0 0 0 -42px;\n\t\tpadding: 71px 0 28px 42px;\n\t}\n\n\t.story-river {\n\t\tposition: relative;\n\t\tleft: {{$:/themes/tiddlywiki/vanilla/metrics##storyleft}};\n\t\ttop: {{$:/themes/tiddlywiki/vanilla/metrics##storytop}};\n\t\twidth: {{$:/themes/tiddlywiki/vanilla/metrics##storywidth}};\n\t\tpadding: 42px 42px 42px 42px;\n\t}\n\n&lt;&lt;if-no-sidebar \&quot;\n\n\t.story-river {\n\t\twidth: auto;\n\t}\n\n\&quot;&gt;&gt;\n\n}\n\n@media print {\n\t.sidebar-header, .tw-topbar {\n\t\tdisplay: none;\n\t}\n\n\t.story-river {\n\t\tmargin-left: 14px;\n\t}\n}\n\n/*\n** Tiddler styles\n*/\n\n.tw-tiddler-frame {\n\tmargin-bottom: 28px;\n\tbackground-color: &lt;&lt;colour tiddler-background&gt;&gt;;\n\tborder: 1px solid &lt;&lt;colour tiddler-border&gt;&gt;;\n}\n\n\n@media print {\n\t.tw-tiddler-frame {\n\t\tborder: none;\n\t}\n}\n\n.tw-tiddler-info {\n\tpadding: 14px 42px 14px 42px;\n\tbackground-color: &lt;&lt;colour tiddler-info-background&gt;&gt;;\n\tborder-top: 1px solid &lt;&lt;colour tiddler-info-border&gt;&gt;;\n\tborder-bottom: 1px solid &lt;&lt;colour tiddler-info-border&gt;&gt;;\n}\n\n.tw-tiddler-info .tw-tab-buttons button.tw-tab-selected {\n\tbackground-color: &lt;&lt;colour tiddler-info-tab-background&gt;&gt;;\n\tborder-bottom: 1px solid &lt;&lt;colour tiddler-info-tab-background&gt;&gt;;\n}\n\n.tw-view-field-table {\n\twidth: 100%;\n}\n\n.tw-view-field-name {\n\twidth: 1%; /* Makes this column be as narrow as possible */\n\ttext-align: right;\n\tfont-style: italic;\n\tfont-weight: 200;\n}\n\n.tw-view-field-value {\n}\n\n@media (max-width: 770px) {\n\t.tw-tiddler-frame {\n\t\tpadding: 14px 14px 14px 14px;\n\t}\n\n\t.tw-tiddler-info {\n\t\tmargin: 0 -14px 0 -14px;\n\t}\n}\n\n@media (min-width: 770px) {\n\t.tw-tiddler-frame {\n\t\tpadding: 28px 42px 42px 42px;\n\t\twidth: {{$:/themes/tiddlywiki/vanilla/metrics##tiddlerwidth}};\n\t}\n\n&lt;&lt;if-no-sidebar \&quot;\n\n\t.tw-tiddler-frame {\n\t\twidth: 100%;\n\t}\n\n\&quot;&gt;&gt;\n\n\t.tw-tiddler-info {\n\t\tmargin: 0 -42px 0 -42px;\n\t}\n}\n\n.tw-site-title,\n.titlebar {\n\tfont-weight: 300;\n\tfont-size: 2.35em;\n\tline-height: 1.2em;\n\tcolor: &lt;&lt;colour tiddler-title-foreground&gt;&gt;;\n\tmargin: 0;\n}\n\n.tw-system-title-prefix {\n\tcolor: &lt;&lt;colour muted-foreground&gt;&gt;;\n}\n\n.titlebar img {\n\theight: 1em;\n}\n\n.tw-subtitle {\n\tfont-size: 0.9em;\n\tcolor: &lt;&lt;colour tiddler-subtitle-foreground&gt;&gt;;\n\tfont-weight: 300;\n}\n\n.tw-tiddler-missing .title {\n  font-style: italic;\n  font-weight: normal;\n}\n\n.tw-tiddler-frame .tw-tiddler-controls {\n\tfloat: right;\n}\n\n.tw-tiddler-controls button {\n\tmargin: 0 0 0 5px;\n\tvertical-align: baseline;\n}\n\n.tw-tiddler-controls button svg {\n\theight: 0.75em;\n\tfill: &lt;&lt;colour tiddler-controls-foreground&gt;&gt;;\n}\n\n.tw-tiddler-controls button.tw-selected svg {\n\tfill: &lt;&lt;colour tiddler-controls-foreground-selected&gt;&gt;;\n}\n\n.tw-tiddler-controls button.btn-invisible:hover svg {\n\tfill: &lt;&lt;colour tiddler-controls-foreground-hover&gt;&gt;;\n}\n\n@media print {\n\t.tw-tiddler-controls {\n\t\tdisplay: none;\n\t}\n}\n\n.tw-tiddler-help { /* Help prompts within tiddler template */\n\tcolor: &lt;&lt;colour muted-foreground&gt;&gt;;\n\tmargin-top: 14px;\n}\n\n.tw-tiddler-help a.tw-tiddlylink {\n\tcolor: &lt;&lt;colour very-muted-foreground&gt;&gt;;\n}\n\n.tw-tiddler-frame input.tw-edit-texteditor, .tw-tiddler-frame textarea.tw-edit-texteditor {\n\twidth: 100%;\n\tpadding: 3px 3px 3px 3px;\n\tborder: 1px solid &lt;&lt;colour tiddler-editor-border&gt;&gt;;\n\tline-height: 1.3em;\n\t-webkit-appearance: none;\n\tmargin: 4px 0 4px 0;\n}\n\n.tw-tiddler-frame .tw-binary-warning {\n\twidth: 100%;\n\theight: 5em;\n\ttext-align: center;\n\tpadding: 3em 3em 6em 3em;\n\tbackground: &lt;&lt;colour alert-background&gt;&gt;;\n\tborder: 1px solid &lt;&lt;colour alert-border&gt;&gt;;\n}\n\n.tw-tiddler-frame input.tw-edit-texteditor {\n\tbackground-color: &lt;&lt;colour tiddler-editor-background&gt;&gt;;\n}\n\ncanvas.tw-edit-bitmapeditor {\n\tborder: 6px solid &lt;&lt;colour tiddler-editor-border-image&gt;&gt;;\n\tcursor: crosshair;\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tmargin-top: 6px;\n\tmargin-bottom: 6px;\n}\n\n.tw-edit-bitmapeditor-width {\n\tdisplay: block;\n}\n\n.tw-edit-bitmapeditor-height {\n\tdisplay: block;\n}\n\n/*\n** Toolbar buttons\n*/\n\n.tw-page-controls svg.tw-image-new-button {\n  fill: &lt;&lt;colour toolbar-new-button&gt;&gt;;\n}\n\n.tw-page-controls svg.tw-image-options-button {\n  fill: &lt;&lt;colour toolbar-options-button&gt;&gt;;\n}\n\n.tw-page-controls svg.tw-image-save-button {\n  fill: &lt;&lt;colour toolbar-save-button&gt;&gt;;\n}\n\n.tw-tiddler-controls button svg.tw-image-info-button {\n  fill: &lt;&lt;colour toolbar-info-button&gt;&gt;;\n}\n\n.tw-tiddler-controls button svg.tw-image-edit-button {\n  fill: &lt;&lt;colour toolbar-edit-button&gt;&gt;;\n}\n\n.tw-tiddler-controls button svg.tw-image-close-button {\n  fill: &lt;&lt;colour toolbar-close-button&gt;&gt;;\n}\n\n.tw-tiddler-controls button svg.tw-image-delete-button {\n  fill: &lt;&lt;colour toolbar-delete-button&gt;&gt;;\n}\n\n.tw-tiddler-controls button svg.tw-image-cancel-button {\n  fill: &lt;&lt;colour toolbar-cancel-button&gt;&gt;;\n}\n\n.tw-tiddler-controls button svg.tw-image-done-button {\n  fill: &lt;&lt;colour toolbar-done-button&gt;&gt;;\n}\n\n/*\n** Tiddler edit mode\n*/\n\n.tw-tiddler-edit-frame em.tw-edit {\n\tcolor: &lt;&lt;colour muted-foreground&gt;&gt;;\n\tfont-style: normal;\n}\n\n.tw-edit-type-dropdown a.tw-tiddlylink-missing {\n\tfont-style: normal;\n}\n\n.tw-edit-tags {\n\tborder: 1px solid &lt;&lt;colour tiddler-editor-border&gt;&gt;;\n\tpadding: 4px 8px 4px 8px;\n}\n\n.tw-edit-add-tag {\n\tdisplay: inline-block;\n}\n\n.tw-edit-add-tag .tw-add-tag-name input {\n\twidth: 50%;\n}\n\n.tw-edit-tags .tw-tag-label {\n\tdisplay: inline-block;\n}\n\n.tw-edit-tags-list {\n\tmargin: 14px 0 14px 0;\n}\n\n.tw-tag-editor-label {\n\tdisplay: inline-block;\n\tmargin-right: 7px;\n}\n\n.tw-remove-tag-button {\n\tpadding-left: 4px;\n}\n\n.tw-tiddler-preview {\n\toverflow: auto;\n}\n\n.tw-tiddler-preview-preview {\n\tfloat: right;\n\twidth: 48%;\n\tborder: 1px solid &lt;&lt;colour tiddler-editor-border&gt;&gt;;\n\tmargin: 4px 3px 3px 3px;\n\tpadding: 3px 3px 3px 3px;\n}\n\n.tw-tiddler-preview-edit {\n\twidth: 48%;\n}\n\n.tw-edit-fields {\n\twidth: 100%;\n}\n\n\n.tw-edit-fields table, .tw-edit-fields tr, .tw-edit-fields td {\n\tborder: none;\n\tpadding: 4px;\n}\n\n.tw-edit-fields &gt; tbody &gt; .tw-edit-field:nth-child(odd) {\n\tbackground-color: &lt;&lt;colour tiddler-editor-fields-odd&gt;&gt;;\n}\n\n.tw-edit-fields &gt; tbody &gt; .tw-edit-field:nth-child(even) {\n\tbackground-color: &lt;&lt;colour tiddler-editor-fields-even&gt;&gt;;\n}\n\n.tw-edit-field-name {\n\ttext-align: right;\n}\n\n.tw-edit-field-value input {\n\twidth: 100%;\n}\n\n.tw-edit-field-remove {\n}\n\n.tw-edit-field-remove svg {\n\theight: 1em;\n\twidth: 1em;\n\tfill: &lt;&lt;colour muted-foreground&gt;&gt;;\n\tvertical-align: middle;\n}\n\n.tw-edit-field-add-name {\n\tdisplay: inline-block;\n\twidth: 15%;\n}\n\n.tw-edit-field-add-button {\n\tdisplay: inline-block;\n\twidth: 10%;\n}\n\n/*\n** Dropdowns\n*/\n\n.btn-dropdown svg {\n\theight: 1em;\n\twidth: 1em;\n\tfill: &lt;&lt;colour muted-foreground&gt;&gt;;\n}\n\n.tw-drop-down {\n\tmin-width: 280px;\n\tborder: 1px solid &lt;&lt;colour dropdown-border&gt;&gt;;\n\tbackground-color: &lt;&lt;colour dropdown-background&gt;&gt;;\n\tpadding: 7px 0 7px 0;\n\tmargin: 4px 0 0 0;\n\twhite-space: nowrap;\n}\n\n.tw-drop-down p {\n\tpadding: 0 14px 0 14px;\n}\n\n.tw-drop-down a {\n\tdisplay: block;\n\tpadding: 0 14px 0 14px;\n}\n\n.tw-drop-down a:hover {\n\tcolor: &lt;&lt;colour tiddler-link-background&gt;&gt;;\n\tbackground-color: &lt;&lt;colour tiddler-link-foreground&gt;&gt;;\n\ttext-decoration: none;\n}\n\n.tw-drop-down .tw-tab-buttons button {\n\tbackground-color: &lt;&lt;colour dropdown-tab-background&gt;&gt;;\n}\n\n.tw-drop-down .tw-tab-buttons button.tw-tab-selected {\n\tbackground-color: &lt;&lt;colour dropdown-tab-background-selected&gt;&gt;;\n\tborder-bottom: 1px solid &lt;&lt;colour dropdown-tab-background-selected&gt;&gt;;\n}\n\n.tw-drop-down .tw-tab-contents a {\n\tpadding: 0 0.5em 0 0.5em;\n}\n\n.tw-block-dropdown-wrapper {\n\tposition: relative;\n}\n\n.tw-block-dropdown {\n\tposition: absolute;\n\tmin-width: 280px;\n\tborder: 1px solid &lt;&lt;colour dropdown-border&gt;&gt;;\n\tbackground-color: &lt;&lt;colour dropdown-background&gt;&gt;;\n\tpadding: 0 0 0 0;\n\tmargin: 4px 0 0 0;\n\twhite-space: nowrap;\n\tz-index: 1000;\n}\n\n.tw-block-dropdown a {\n\tdisplay: block;\n\tpadding: 4px 14px 4px 14px;\n}\n\n.tw-block-dropdown .tw-dropdown-item {\n\tpadding: 4px 14px 4px 7px;\n\tcolor: &lt;&lt;colour muted-foreground&gt;&gt;;\n}\n\n.tw-block-dropdown a:hover {\n\tcolor: &lt;&lt;colour tiddler-link-background&gt;&gt;;\n\tbackground-color: &lt;&lt;colour tiddler-link-foreground&gt;&gt;;\n\ttext-decoration: none;\n}\n\n/*\n** Modals\n*/\n\n.modal-wrapper {\n\tposition: fixed;\n\toverflow: auto;\n\toverflow-y: scroll;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n}\n\n.modal-backdrop {\n\tposition: fixed;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\tz-index: 1000;\n\tbackground-color: &lt;&lt;colour modal-backdrop&gt;&gt;;\n}\n\n.modal {\n\tz-index: 1100;\n\tbackground-color: &lt;&lt;colour modal-background&gt;&gt;;\n\tborder: 1px solid &lt;&lt;colour modal-border&gt;&gt;;\n}\n\n@media (max-width: 55em) {\n\t.modal {\n\t\tposition: fixed;\n\t\ttop: 1em;\n\t\tleft: 1em;\n\t\tright: 1em;\n\t}\n\n\t.modal-body {\n\t\toverflow-y: auto;\n\t\tmax-height: 400px;\n\t}\n}\n\n@media (min-width: 55em) {\n\t.modal {\n\t\tposition: relative;\n\t\twidth: 50%;\n\t\tmargin: 30px auto;\n\t}\n}\n\n.modal-header {\n\tpadding: 9px 15px;\n\tborder-bottom: 1px solid &lt;&lt;colour modal-header-border&gt;&gt;;\n}\n\n.modal-header h3 {\n\tmargin: 0;\n\tline-height: 30px;\n}\n\n.modal-body {\n\tpadding: 15px;\n}\n\n.modal-footer {\n\tpadding: 14px 15px 15px;\n\tmargin-bottom: 0;\n\ttext-align: right;\n\tbackground-color: &lt;&lt;colour modal-footer-background&gt;&gt;;\n\tborder-top: 1px solid &lt;&lt;colour modal-footer-border&gt;&gt;;\n}\n\n/*\n** Notifications\n*/\n\n.tw-notification {\n\tposition: fixed;\n\ttop: 14px;\n\tright: 42px;\n\tz-index: 1000;\n\tmax-width: 280px;\n\tpadding: 0 14px 0 14px;\n\tbackground-color: &lt;&lt;colour notification-background&gt;&gt;;\n\tborder: 1px solid &lt;&lt;colour notification-border&gt;&gt;;\n}\n\n/*\n** Tabs\n*/\n\n.tw-tab-set.tw-vertical {\n\tdisplay: -webkit-flex;\n\tdisplay: flex;\n}\n\n.tw-tab-buttons {\n\tfont-size: 0.85em;\n\tpadding-top: 1em;\n\tmargin-bottom: -1px;\n}\n\n.tw-tab-buttons.tw-vertical  {\n\tz-index: 100;\n\tdisplay: block;\n\tpadding-top: 14px;\n\tvertical-align: top;\n\ttext-align: right;\n\tmargin-bottom: inherit;\n\tmargin-right: -1px;\n\tmax-width: 33%;\n\t-webkit-flex: 0 0 auto;\n\tflex: 0 0 auto;\n}\n\n.tw-tab-buttons button.tw-tab-selected {\n\tcolor: &lt;&lt;colour tab-foreground-selected&gt;&gt;;\n\tbackground-color: &lt;&lt;colour tab-background-selected&gt;&gt;;\n\tborder-left: 1px solid &lt;&lt;colour tab-border-selected&gt;&gt;;\n\tborder-top: 1px solid &lt;&lt;colour tab-border-selected&gt;&gt;;\n\tborder-right: 1px solid &lt;&lt;colour tab-border-selected&gt;&gt;;\n}\n\n.tw-tab-buttons button {\n\tcolor: &lt;&lt;colour tab-foreground&gt;&gt;;\n\tpadding: 3px 5px 3px 5px;\n\tfont-weight: 300;\n\tborder: none;\n\tbackground: inherit;\n\tbackground-color: &lt;&lt;colour tab-background&gt;&gt;;\n\tborder-left: 1px solid &lt;&lt;colour tab-border&gt;&gt;;\n\tborder-top: 1px solid &lt;&lt;colour tab-border&gt;&gt;;\n\tborder-right: 1px solid &lt;&lt;colour tab-border&gt;&gt;;\n}\n\n.tw-tab-buttons.tw-vertical button {\n\tdisplay: block;\n\twidth: 100%;\n\tmargin-top: 3px;\n\ttext-align: right;\n\tbackground-color: &lt;&lt;colour tab-background&gt;&gt;;\n\tborder-left: 1px solid &lt;&lt;colour tab-border&gt;&gt;;\n\tborder-bottom: 1px solid &lt;&lt;colour tab-border&gt;&gt;;\n\tborder-right: none;\n}\n\n.tw-tab-buttons.tw-vertical button.tw-tab-selected {\n\tbackground-color: &lt;&lt;colour tab-background-selected&gt;&gt;;\n\tborder-right: 1px solid &lt;&lt;colour tab-background-selected&gt;&gt;;\n}\n\n.tw-tab-divider {\n\tborder-top: 1px solid &lt;&lt;colour tab-divider&gt;&gt;;\n}\n\n.tw-tab-divider.tw-vertical  {\n\tdisplay: none;\n}\n\n.tw-tab-content {\n\tmargin-top: 14px;\n}\n\n.tw-tab-content.tw-vertical  {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tpadding-top: 0;\n\tpadding-left: 14px;\n\tborder-left: 1px solid &lt;&lt;colour tab-border&gt;&gt;;\n\t-webkit-flex: 0 0 70%;\n\tflex: 0 0 70%;\n}\n\n.tw-sidebar-lists .tw-tab-buttons button.tw-tab-selected {\n\tbackground-color: &lt;&lt;colour sidebar-tab-background-selected&gt;&gt;;\n\tcolor: &lt;&lt;colour sidebar-tab-foreground-selected&gt;&gt;;\n\tborder-left: 1px solid &lt;&lt;colour sidebar-tab-border-selected&gt;&gt;;\n\tborder-top: 1px solid &lt;&lt;colour sidebar-tab-border-selected&gt;&gt;;\n\tborder-right: 1px solid &lt;&lt;colour sidebar-tab-border-selected&gt;&gt;;\n}\n\n.tw-sidebar-lists .tw-tab-buttons button {\n\tbackground-color: &lt;&lt;colour sidebar-tab-background&gt;&gt;;\n\tcolor: &lt;&lt;colour sidebar-tab-foreground&gt;&gt;;\n\tborder-left: 1px solid &lt;&lt;colour sidebar-tab-border&gt;&gt;;\n\tborder-top: 1px solid &lt;&lt;colour sidebar-tab-border&gt;&gt;;\n\tborder-right: 1px solid &lt;&lt;colour sidebar-tab-border&gt;&gt;;\n}\n\n.tw-sidebar-lists .tw-tab-divider {\n\tborder-top: 1px solid &lt;&lt;colour sidebar-tab-divider&gt;&gt;;\n}\n\n.tw-more-sidebar .tw-tab-buttons button {\n\tbackground-color: &lt;&lt;colour sidebar-tab-background&gt;&gt;;\n\tborder-top: none;\n\tborder-left: none;\n\tborder-bottom: none;\n\tborder-right: 1px solid #ccc;\n\tmargin-bottom: inherit;\n}\n\n.tw-more-sidebar .tw-tab-buttons button.tw-tab-selected {\n\tbackground-color: &lt;&lt;colour sidebar-tab-background-selected&gt;&gt;;\n\tborder: none;\n}\n\n/*\n** Alerts\n*/\n\n.tw-alerts {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tmax-width: 500px;\n\tz-index: 20000;\n}\n\n.tw-alert {\n\tposition: relative;\n\tmargin: 28px;\n\tpadding: 14px 14px 14px 14px;\n\tborder: 2px solid &lt;&lt;colour alert-border&gt;&gt;;\n\tbackground-color: &lt;&lt;colour alert-background&gt;&gt;;\n}\n\n.tw-alert-toolbar {\n\tposition: absolute;\n\ttop: 14px;\n\tright: 14px;\n}\n\n.tw-alert-toolbar svg {\n\tfill: &lt;&lt;colour alert-muted-foreground&gt;&gt;;\n}\n\n.tw-alert-subtitle {\n\tcolor: &lt;&lt;colour alert-muted-foreground&gt;&gt;;\n\tfont-weight: bold;\n}\n\n.tw-alert-highlight {\n\tcolor: &lt;&lt;colour alert-highlight&gt;&gt;;\t\n}\n\n.tw-static-alert {\n\tposition: relative;\n}\n\n.tw-static-alert-inner {\n\tpadding: 0 2px 2px 42px;\n\tcolor: &lt;&lt;colour static-alert-foreground&gt;&gt;;\n\tposition: absolute;\n}\n\n/*\n** Grids\n*/\n\n.tw-grid-frame td {\n\twidth: 1em;\n\theight: 1em;\n}\n\n/*\n** Control panel\n*/\n\n.tw-control-panel td {\n\tpadding: 4px;\n}\n\n.tw-control-panel table, .tw-control-panel table input, .tw-control-panel table textarea {\n\twidth: 100%;\n}\n\n/*\n** Message boxes\n*/\n\n.tw-message-box {\n\tborder: 1px solid &lt;&lt;colour message-border&gt;&gt;;\n\tbackground: &lt;&lt;colour message-background&gt;&gt;;\n\tpadding: 0px 21px 0px 21px;\n\tfont-size: 12px;\n\tline-height: 18px;\n\tcolor: &lt;&lt;colour message-foreground&gt;&gt;;\n}\n\n.tw-message-box img {\n\tfloat: right;\n\twidth: 150px;\n\tmargin: 0px 0px 12px 12px;\n}\n\n/*\n** Chooser\n*/\n\n.tw-chooser {\n\tborder: 1px solid &lt;&lt;colour table-border&gt;&gt;;\n}\n\n.tw-chooser-item {\n\tborder: 8px;\n}\n\n.tw-chooser-item a.tw-tiddlylink {\n\tdisplay: block;\n\ttext-decoration: none;\n\tcolor: &lt;&lt;colour tiddler-link-foreground&gt;&gt;;\n\tbackground-color: &lt;&lt;colour tiddler-link-background&gt;&gt;;\n\tmargin: 4px;\n}\n\n.tw-chooser-item a.tw-tiddlylink:hover {\n\ttext-decoration: none;\n\tcolor: &lt;&lt;colour tiddler-link-background&gt;&gt;;\n\tbackground-color: &lt;&lt;colour tiddler-link-foreground&gt;&gt;;\n}\n\n/*\n** Palette swatches\n*/\n\n.tw-swatches-horiz {\n}\n\n.tw-swatches-horiz .tw-swatch {\n\tdisplay: inline-block;\n}\n\n.tw-swatch {\n\twidth: 2em;\n\theight: 2em;\n\tmargin: 4px;\n\tborder: 1px solid #000;\n}\n\n/*\n** Table of contents\n*/\n\n.tw-sidebar-lists .tw-table-of-contents {\n\twhite-space: nowrap;\n}\n\n.tw-table-of-contents svg {\n\twidth: 0.7em;\n\theight: 0.7em;\n\tvertical-align: middle;\n}\n\n.tw-table-of-contents ol {\n\tlist-style-type: none;\n\tpadding-left: 0;\n}\n\n.tw-table-of-contents ol ol {\n\tpadding-left: 1em;\n}\n\n.tw-table-of-contents li {\n\tfont-size: 1.0em;\n\tfont-weight: bold;\n}\n\n.tw-table-of-contents li a {\n\tfont-weight: bold;\n}\n\n.tw-table-of-contents li li {\n\tfont-size: 0.95em;\n\tfont-weight: normal;\n\tline-height: 1.4;\n}\n\n.tw-table-of-contents li li a {\n\tfont-weight: normal;\n}\n\n.tw-table-of-contents li li li {\n\tfont-size: 0.95em;\n\tfont-weight: 200;\n\tline-height: 1.5;\n}\n\n.tw-table-of-contents li li li a {\n\tfont-weight: bold;\n}\n\n.tw-table-of-contents li li li li {\n\tfont-size: 0.95em;\n\tfont-weight: 200;\n}\n&quot;
        },
        &quot;$:/themes/tiddlywiki/vanilla/metrics&quot;: {
            &quot;title&quot;: &quot;$:/themes/tiddlywiki/vanilla/metrics&quot;,
            &quot;type&quot;: &quot;application/x-tiddler-dictionary&quot;,
            &quot;text&quot;: &quot;fontsize: `14px`\nlineheight: `20px`\nstoryleft: `0px`\nstorytop: `0px`\nstoryright: `770px`\nstorywidth: `770px`\ntiddlerwidth: `686px`\n&quot;
        },
        &quot;$:/themes/tiddlywiki/vanilla/reset&quot;: {
            &quot;title&quot;: &quot;$:/themes/tiddlywiki/vanilla/reset&quot;,
            &quot;type&quot;: &quot;text/plain&quot;,
            &quot;text&quot;: &quot;/*! normalize.css v3.0.0 | MIT License | git.io/normalize */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS text size adjust after orientation change, without disabling\n *    user zoom.\n */\n\nhtml {\n  font-family: sans-serif; /* 1 */\n  -ms-text-size-adjust: 100%; /* 2 */\n  -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove default margin.\n */\n\nbody {\n  margin: 0;\n}\n\n/* HTML5 display definitions\n  ========================================================================== */\n\n/**\n * Correct `block` display not defined in IE 8/9.\n */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection,\nsummary {\n  display: block;\n}\n\n/**\n * 1. Correct `inline-block` display not defined in IE 8/9.\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n */\n\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block; /* 1 */\n  vertical-align: baseline; /* 2 */\n}\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\n\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n\n/**\n * Address `[hidden]` styling not present in IE 8/9.\n * Hide the `template` element in IE, Safari, and Firefox &lt; 22.\n */\n\n[hidden],\ntemplate {\n  display: none;\n}\n\n/* Links\n  ========================================================================== */\n\n/**\n * Remove the gray background color from active links in IE 10.\n */\n\na {\n  background: transparent;\n}\n\n/**\n * Improve readability when focused and also mouse hovered in all browsers.\n */\n\na:active,\na:hover {\n  outline: 0;\n}\n\n/* Text-level semantics\n  ========================================================================== */\n\n/**\n * Address styling not present in IE 8/9, Safari 5, and Chrome.\n */\n\nabbr[title] {\n  border-bottom: 1px dotted;\n}\n\n/**\n * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n */\n\nb,\nstrong {\n  font-weight: bold;\n}\n\n/**\n * Address styling not present in Safari 5 and Chrome.\n */\n\ndfn {\n  font-style: italic;\n}\n\n/**\n * Address variable `h1` font-size and margin within `section` and `article`\n * contexts in Firefox 4+, Safari 5, and Chrome.\n */\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n/**\n * Address styling not present in IE 8/9.\n */\n\nmark {\n  background: #ff0;\n  color: #000;\n}\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\n\nsmall {\n  font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsup {\n  top: -0.5em;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\n/* Embedded content\n  ========================================================================== */\n\n/**\n * Remove border when inside `a` element in IE 8/9.\n */\n\nimg {\n  border: 0;\n}\n\n/**\n * Correct overflow displayed oddly in IE 9.\n */\n\nsvg:not(:root) {\n  overflow: hidden;\n}\n\n/* Grouping content\n  ========================================================================== */\n\n/**\n * Address margin not present in IE 8/9 and Safari 5.\n */\n\nfigure {\n  margin: 1em 40px;\n}\n\n/**\n * Address differences between Firefox and other browsers.\n */\n\nhr {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  height: 0;\n}\n\n/**\n * Contain overflow in all browsers.\n */\n\npre {\n  overflow: auto;\n}\n\n/**\n * Address odd `em`-unit font size rendering in all browsers.\n */\n\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\n\n/* Forms\n  ========================================================================== */\n\n/**\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\n * styling of `select`, unless a `border` property is set.\n */\n\n/**\n * 1. Correct color not being inherited.\n *    Known issue: affects color of disabled elements.\n * 2. Correct font properties not being inherited.\n * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  color: inherit; /* 1 */\n  font: inherit; /* 2 */\n  margin: 0; /* 3 */\n}\n\n/**\n * Address `overflow` set to `hidden` in IE 8/9/10.\n */\n\nbutton {\n  overflow: visible;\n}\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Firefox, IE 8+, and Opera\n * Correct `select` style inheritance in Firefox.\n */\n\nbutton,\nselect {\n  text-transform: none;\n}\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n *    and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n *    `input` and others.\n */\n\nbutton,\nhtml input[type=\&quot;button\&quot;], /* 1 */\ninput[type=\&quot;reset\&quot;],\ninput[type=\&quot;submit\&quot;] {\n  -webkit-appearance: button; /* 2 */\n  cursor: pointer; /* 3 */\n}\n\n/**\n * Re-set default cursor for disabled elements.\n */\n\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\n * the UA stylesheet.\n */\n\ninput {\n  line-height: normal;\n}\n\n/**\n * It's recommended that you don't attempt to style these elements.\n * Firefox's implementation doesn't respect box-sizing, padding, or width.\n *\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\n * 2. Remove excess padding in IE 8/9/10.\n */\n\ninput[type=\&quot;checkbox\&quot;],\ninput[type=\&quot;radio\&quot;] {\n  box-sizing: border-box; /* 1 */\n  padding: 0; /* 2 */\n}\n\n/**\n * Fix the cursor style for Chrome's increment/decrement buttons. For certain\n * `font-size` values of the `input`, it causes the cursor style of the\n * decrement button to change from `default` to `text`.\n */\n\ninput[type=\&quot;number\&quot;]::-webkit-inner-spin-button,\ninput[type=\&quot;number\&quot;]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n *    (include `-moz` to future-proof).\n */\n\ninput[type=\&quot;search\&quot;] {\n  -webkit-appearance: textfield; /* 1 */\n  -moz-box-sizing: content-box;\n  -webkit-box-sizing: content-box; /* 2 */\n  box-sizing: content-box;\n}\n\n/**\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\n * Safari (but not Chrome) clips the cancel button when the search input has\n * padding (and `textfield` appearance).\n */\n\ninput[type=\&quot;search\&quot;]::-webkit-search-cancel-button,\ninput[type=\&quot;search\&quot;]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n/**\n * Define consistent border, margin, and padding.\n */\n\nfieldset {\n  border: 1px solid #c0c0c0;\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n}\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\n\nlegend {\n  border: 0; /* 1 */\n  padding: 0; /* 2 */\n}\n\n/**\n * Remove default vertical scrollbar in IE 8/9.\n */\n\ntextarea {\n  overflow: auto;\n}\n\n/**\n * Don't inherit the `font-weight` (applied by a rule above).\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n */\n\noptgroup {\n  font-weight: bold;\n}\n\n/* Tables\n  ========================================================================== */\n\n/**\n * Remove most spacing between table cells.\n */\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\ntd,\nth {\n  padding: 0;\n}\n&quot;
        },
        &quot;$:/themes/tiddlywiki/vanilla/settings&quot;: {
            &quot;title&quot;: &quot;$:/themes/tiddlywiki/vanilla/settings&quot;,
            &quot;type&quot;: &quot;application/x-tiddler-dictionary&quot;,
            &quot;text&quot;: &quot;fontfamily: `\&quot;Helvetica Neue\&quot;, Helvetica, Arial, \&quot;Lucida Grande\&quot;, sans-serif`\n&quot;
        }
    }
}</pre>
</div>
 
</div>
 
 
<!--~~ Library modules ~~-->
<div id="libraryModules" style="display:none;">
<script data-tiddler-library="yes" data-tiddler-title="$:/library/sjcl.js" data-tiddler-type="application/javascript" type="text/javascript">"use strict";var sjcl={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(a){this.toString=function(){return"CORRUPT: "+this.message};this.message=a},invalid:function(a){this.toString=function(){return"INVALID: "+this.message};this.message=a},bug:function(a){this.toString=function(){return"BUG: "+this.message};this.message=a},notReady:function(a){this.toString=function(){return"NOT READY: "+this.message};this.message=a}}};
if(typeof module!="undefined"&&module.exports)module.exports=sjcl;
sjcl.cipher.aes=function(a){this.h[0][0][0]||this.z();var b,c,d,e,f=this.h[0][4],g=this.h[1];b=a.length;var h=1;if(b!==4&&b!==6&&b!==8)throw new sjcl.exception.invalid("invalid aes key size");this.a=[d=a.slice(0),e=[]];for(a=b;a<4*b+28;a++){c=d[a-1];if(a%b===0||b===8&&a%b===4){c=f[c>>>24]<<24^f[c>>16&255]<<16^f[c>>8&255]<<8^f[c&255];if(a%b===0){c=c<<8^c>>>24^h<<24;h=h<<1^(h>>7)*283}}d[a]=d[a-b]^c}for(b=0;a;b++,a--){c=d[b&3?a:a-4];e[b]=a<=4||b<4?c:g[0][f[c>>>24]]^g[1][f[c>>16&255]]^g[2][f[c>>8&255]]^
g[3][f[c&255]]}};
sjcl.cipher.aes.prototype={encrypt:function(a){return this.I(a,0)},decrypt:function(a){return this.I(a,1)},h:[[[],[],[],[],[]],[[],[],[],[],[]]],z:function(){var a=this.h[0],b=this.h[1],c=a[4],d=b[4],e,f,g,h=[],i=[],k,j,l,m;for(e=0;e<0x100;e++)i[(h[e]=e<<1^(e>>7)*283)^e]=e;for(f=g=0;!c[f];f^=k||1,g=i[g]||1){l=g^g<<1^g<<2^g<<3^g<<4;l=l>>8^l&255^99;c[f]=l;d[l]=f;j=h[e=h[k=h[f]]];m=j*0x1010101^e*0x10001^k*0x101^f*0x1010100;j=h[l]*0x101^l*0x1010100;for(e=0;e<4;e++){a[e][f]=j=j<<24^j>>>8;b[e][l]=m=m<<24^m>>>8}}for(e=
0;e<5;e++){a[e]=a[e].slice(0);b[e]=b[e].slice(0)}},I:function(a,b){if(a.length!==4)throw new sjcl.exception.invalid("invalid aes block size");var c=this.a[b],d=a[0]^c[0],e=a[b?3:1]^c[1],f=a[2]^c[2];a=a[b?1:3]^c[3];var g,h,i,k=c.length/4-2,j,l=4,m=[0,0,0,0];g=this.h[b];var n=g[0],o=g[1],p=g[2],q=g[3],r=g[4];for(j=0;j<k;j++){g=n[d>>>24]^o[e>>16&255]^p[f>>8&255]^q[a&255]^c[l];h=n[e>>>24]^o[f>>16&255]^p[a>>8&255]^q[d&255]^c[l+1];i=n[f>>>24]^o[a>>16&255]^p[d>>8&255]^q[e&255]^c[l+2];a=n[a>>>24]^o[d>>16&
255]^p[e>>8&255]^q[f&255]^c[l+3];l+=4;d=g;e=h;f=i}for(j=0;j<4;j++){m[b?3&-j:j]=r[d>>>24]<<24^r[e>>16&255]<<16^r[f>>8&255]<<8^r[a&255]^c[l++];g=d;d=e;e=f;f=a;a=g}return m}};
sjcl.bitArray={bitSlice:function(a,b,c){a=sjcl.bitArray.P(a.slice(b/32),32-(b&31)).slice(1);return c===undefined?a:sjcl.bitArray.clamp(a,c-b)},extract:function(a,b,c){var d=Math.floor(-b-c&31);return((b+c-1^b)&-32?a[b/32|0]<<32-d^a[b/32+1|0]>>>d:a[b/32|0]>>>d)&(1<<c)-1},concat:function(a,b){if(a.length===0||b.length===0)return a.concat(b);var c=a[a.length-1],d=sjcl.bitArray.getPartial(c);return d===32?a.concat(b):sjcl.bitArray.P(b,d,c|0,a.slice(0,a.length-1))},bitLength:function(a){var b=a.length;
if(b===0)return 0;return(b-1)*32+sjcl.bitArray.getPartial(a[b-1])},clamp:function(a,b){if(a.length*32<b)return a;a=a.slice(0,Math.ceil(b/32));var c=a.length;b&=31;if(c>0&&b)a[c-1]=sjcl.bitArray.partial(b,a[c-1]&2147483648>>b-1,1);return a},partial:function(a,b,c){if(a===32)return b;return(c?b|0:b<<32-a)+a*0x10000000000},getPartial:function(a){return Math.round(a/0x10000000000)||32},equal:function(a,b){if(sjcl.bitArray.bitLength(a)!==sjcl.bitArray.bitLength(b))return false;var c=0,d;for(d=0;d<a.length;d++)c|=
a[d]^b[d];return c===0},P:function(a,b,c,d){var e;e=0;if(d===undefined)d=[];for(;b>=32;b-=32){d.push(c);c=0}if(b===0)return d.concat(a);for(e=0;e<a.length;e++){d.push(c|a[e]>>>b);c=a[e]<<32-b}e=a.length?a[a.length-1]:0;a=sjcl.bitArray.getPartial(e);d.push(sjcl.bitArray.partial(b+a&31,b+a>32?c:d.pop(),1));return d},k:function(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}};
sjcl.codec.utf8String={fromBits:function(a){var b="",c=sjcl.bitArray.bitLength(a),d,e;for(d=0;d<c/8;d++){if((d&3)===0)e=a[d/4];b+=String.fromCharCode(e>>>24);e<<=8}return decodeURIComponent(escape(b))},toBits:function(a){a=unescape(encodeURIComponent(a));var b=[],c,d=0;for(c=0;c<a.length;c++){d=d<<8|a.charCodeAt(c);if((c&3)===3){b.push(d);d=0}}c&3&&b.push(sjcl.bitArray.partial(8*(c&3),d));return b}};
sjcl.codec.hex={fromBits:function(a){var b="",c;for(c=0;c<a.length;c++)b+=((a[c]|0)+0xf00000000000).toString(16).substr(4);return b.substr(0,sjcl.bitArray.bitLength(a)/4)},toBits:function(a){var b,c=[],d;a=a.replace(/\s|0x/g,"");d=a.length;a+="00000000";for(b=0;b<a.length;b+=8)c.push(parseInt(a.substr(b,8),16)^0);return sjcl.bitArray.clamp(c,d*4)}};
sjcl.codec.base64={F:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(a,b,c){var d="",e=0,f=sjcl.codec.base64.F,g=0,h=sjcl.bitArray.bitLength(a);if(c)f=f.substr(0,62)+"-_";for(c=0;d.length*6<h;){d+=f.charAt((g^a[c]>>>e)>>>26);if(e<6){g=a[c]<<6-e;e+=26;c++}else{g<<=6;e-=6}}for(;d.length&3&&!b;)d+="=";return d},toBits:function(a,b){a=a.replace(/\s|=/g,"");var c=[],d=0,e=sjcl.codec.base64.F,f=0,g;if(b)e=e.substr(0,62)+"-_";for(b=0;b<a.length;b++){g=e.indexOf(a.charAt(b));
if(g<0)throw new sjcl.exception.invalid("this isn't base64!");if(d>26){d-=26;c.push(f^g>>>d);f=g<<32-d}else{d+=6;f^=g<<32-d}}d&56&&c.push(sjcl.bitArray.partial(d&56,f,1));return c}};sjcl.codec.base64url={fromBits:function(a){return sjcl.codec.base64.fromBits(a,1,1)},toBits:function(a){return sjcl.codec.base64.toBits(a,1)}};sjcl.hash.sha256=function(a){this.a[0]||this.z();if(a){this.n=a.n.slice(0);this.i=a.i.slice(0);this.e=a.e}else this.reset()};sjcl.hash.sha256.hash=function(a){return(new sjcl.hash.sha256).update(a).finalize()};
sjcl.hash.sha256.prototype={blockSize:512,reset:function(){this.n=this.N.slice(0);this.i=[];this.e=0;return this},update:function(a){if(typeof a==="string")a=sjcl.codec.utf8String.toBits(a);var b,c=this.i=sjcl.bitArray.concat(this.i,a);b=this.e;a=this.e=b+sjcl.bitArray.bitLength(a);for(b=512+b&-512;b<=a;b+=512)this.D(c.splice(0,16));return this},finalize:function(){var a,b=this.i,c=this.n;b=sjcl.bitArray.concat(b,[sjcl.bitArray.partial(1,1)]);for(a=b.length+2;a&15;a++)b.push(0);b.push(Math.floor(this.e/
4294967296));for(b.push(this.e|0);b.length;)this.D(b.splice(0,16));this.reset();return c},N:[],a:[],z:function(){function a(e){return(e-Math.floor(e))*0x100000000|0}var b=0,c=2,d;a:for(;b<64;c++){for(d=2;d*d<=c;d++)if(c%d===0)continue a;if(b<8)this.N[b]=a(Math.pow(c,0.5));this.a[b]=a(Math.pow(c,1/3));b++}},D:function(a){var b,c,d=a.slice(0),e=this.n,f=this.a,g=e[0],h=e[1],i=e[2],k=e[3],j=e[4],l=e[5],m=e[6],n=e[7];for(a=0;a<64;a++){if(a<16)b=d[a];else{b=d[a+1&15];c=d[a+14&15];b=d[a&15]=(b>>>7^b>>>18^
b>>>3^b<<25^b<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+d[a&15]+d[a+9&15]|0}b=b+n+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(m^j&(l^m))+f[a];n=m;m=l;l=j;j=k+b|0;k=i;i=h;h=g;g=b+(h&i^k&(h^i))+(h>>>2^h>>>13^h>>>22^h<<30^h<<19^h<<10)|0}e[0]=e[0]+g|0;e[1]=e[1]+h|0;e[2]=e[2]+i|0;e[3]=e[3]+k|0;e[4]=e[4]+j|0;e[5]=e[5]+l|0;e[6]=e[6]+m|0;e[7]=e[7]+n|0}};
sjcl.mode.ccm={name:"ccm",encrypt:function(a,b,c,d,e){var f,g=b.slice(0),h=sjcl.bitArray,i=h.bitLength(c)/8,k=h.bitLength(g)/8;e=e||64;d=d||[];if(i<7)throw new sjcl.exception.invalid("ccm: iv must be at least 7 bytes");for(f=2;f<4&&k>>>8*f;f++);if(f<15-i)f=15-i;c=h.clamp(c,8*(15-f));b=sjcl.mode.ccm.H(a,b,c,d,e,f);g=sjcl.mode.ccm.J(a,g,c,b,e,f);return h.concat(g.data,g.tag)},decrypt:function(a,b,c,d,e){e=e||64;d=d||[];var f=sjcl.bitArray,g=f.bitLength(c)/8,h=f.bitLength(b),i=f.clamp(b,h-e),k=f.bitSlice(b,
h-e);h=(h-e)/8;if(g<7)throw new sjcl.exception.invalid("ccm: iv must be at least 7 bytes");for(b=2;b<4&&h>>>8*b;b++);if(b<15-g)b=15-g;c=f.clamp(c,8*(15-b));i=sjcl.mode.ccm.J(a,i,c,k,e,b);a=sjcl.mode.ccm.H(a,i.data,c,d,e,b);if(!f.equal(i.tag,a))throw new sjcl.exception.corrupt("ccm: tag doesn't match");return i.data},H:function(a,b,c,d,e,f){var g=[],h=sjcl.bitArray,i=h.k;e/=8;if(e%2||e<4||e>16)throw new sjcl.exception.invalid("ccm: invalid tag length");if(d.length>0xffffffff||b.length>0xffffffff)throw new sjcl.exception.bug("ccm: can't deal with 4GiB or more data");
f=[h.partial(8,(d.length?64:0)|e-2<<2|f-1)];f=h.concat(f,c);f[3]|=h.bitLength(b)/8;f=a.encrypt(f);if(d.length){c=h.bitLength(d)/8;if(c<=65279)g=[h.partial(16,c)];else if(c<=0xffffffff)g=h.concat([h.partial(16,65534)],[c]);g=h.concat(g,d);for(d=0;d<g.length;d+=4)f=a.encrypt(i(f,g.slice(d,d+4).concat([0,0,0])))}for(d=0;d<b.length;d+=4)f=a.encrypt(i(f,b.slice(d,d+4).concat([0,0,0])));return h.clamp(f,e*8)},J:function(a,b,c,d,e,f){var g,h=sjcl.bitArray;g=h.k;var i=b.length,k=h.bitLength(b);c=h.concat([h.partial(8,
f-1)],c).concat([0,0,0]).slice(0,4);d=h.bitSlice(g(d,a.encrypt(c)),0,e);if(!i)return{tag:d,data:[]};for(g=0;g<i;g+=4){c[3]++;e=a.encrypt(c);b[g]^=e[0];b[g+1]^=e[1];b[g+2]^=e[2];b[g+3]^=e[3]}return{tag:d,data:h.clamp(b,k)}}};
sjcl.mode.ocb2={name:"ocb2",encrypt:function(a,b,c,d,e,f){if(sjcl.bitArray.bitLength(c)!==128)throw new sjcl.exception.invalid("ocb iv must be 128 bits");var g,h=sjcl.mode.ocb2.B,i=sjcl.bitArray,k=i.k,j=[0,0,0,0];c=h(a.encrypt(c));var l,m=[];d=d||[];e=e||64;for(g=0;g+4<b.length;g+=4){l=b.slice(g,g+4);j=k(j,l);m=m.concat(k(c,a.encrypt(k(c,l))));c=h(c)}l=b.slice(g);b=i.bitLength(l);g=a.encrypt(k(c,[0,0,0,b]));l=i.clamp(k(l.concat([0,0,0]),g),b);j=k(j,k(l.concat([0,0,0]),g));j=a.encrypt(k(j,k(c,h(c))));
if(d.length)j=k(j,f?d:sjcl.mode.ocb2.pmac(a,d));return m.concat(i.concat(l,i.clamp(j,e)))},decrypt:function(a,b,c,d,e,f){if(sjcl.bitArray.bitLength(c)!==128)throw new sjcl.exception.invalid("ocb iv must be 128 bits");e=e||64;var g=sjcl.mode.ocb2.B,h=sjcl.bitArray,i=h.k,k=[0,0,0,0],j=g(a.encrypt(c)),l,m,n=sjcl.bitArray.bitLength(b)-e,o=[];d=d||[];for(c=0;c+4<n/32;c+=4){l=i(j,a.decrypt(i(j,b.slice(c,c+4))));k=i(k,l);o=o.concat(l);j=g(j)}m=n-c*32;l=a.encrypt(i(j,[0,0,0,m]));l=i(l,h.clamp(b.slice(c),
m).concat([0,0,0]));k=i(k,l);k=a.encrypt(i(k,i(j,g(j))));if(d.length)k=i(k,f?d:sjcl.mode.ocb2.pmac(a,d));if(!h.equal(h.clamp(k,e),h.bitSlice(b,n)))throw new sjcl.exception.corrupt("ocb: tag doesn't match");return o.concat(h.clamp(l,m))},pmac:function(a,b){var c,d=sjcl.mode.ocb2.B,e=sjcl.bitArray,f=e.k,g=[0,0,0,0],h=a.encrypt([0,0,0,0]);h=f(h,d(d(h)));for(c=0;c+4<b.length;c+=4){h=d(h);g=f(g,a.encrypt(f(h,b.slice(c,c+4))))}b=b.slice(c);if(e.bitLength(b)<128){h=f(h,d(h));b=e.concat(b,[2147483648|0,0,
0,0])}g=f(g,b);return a.encrypt(f(d(f(h,d(h))),g))},B:function(a){return[a[0]<<1^a[1]>>>31,a[1]<<1^a[2]>>>31,a[2]<<1^a[3]>>>31,a[3]<<1^(a[0]>>>31)*135]}};sjcl.misc.hmac=function(a,b){this.M=b=b||sjcl.hash.sha256;var c=[[],[]],d=b.prototype.blockSize/32;this.l=[new b,new b];if(a.length>d)a=b.hash(a);for(b=0;b<d;b++){c[0][b]=a[b]^909522486;c[1][b]=a[b]^1549556828}this.l[0].update(c[0]);this.l[1].update(c[1])};
sjcl.misc.hmac.prototype.encrypt=sjcl.misc.hmac.prototype.mac=function(a,b){a=(new this.M(this.l[0])).update(a,b).finalize();return(new this.M(this.l[1])).update(a).finalize()};
sjcl.misc.pbkdf2=function(a,b,c,d,e){c=c||1E3;if(d<0||c<0)throw sjcl.exception.invalid("invalid params to pbkdf2");if(typeof a==="string")a=sjcl.codec.utf8String.toBits(a);e=e||sjcl.misc.hmac;a=new e(a);var f,g,h,i,k=[],j=sjcl.bitArray;for(i=1;32*k.length<(d||1);i++){e=f=a.encrypt(j.concat(b,[i]));for(g=1;g<c;g++){f=a.encrypt(f);for(h=0;h<f.length;h++)e[h]^=f[h]}k=k.concat(e)}if(d)k=j.clamp(k,d);return k};
sjcl.random={randomWords:function(a,b){var c=[];b=this.isReady(b);var d;if(b===0)throw new sjcl.exception.notReady("generator isn't seeded");else b&2&&this.U(!(b&1));for(b=0;b<a;b+=4){(b+1)%0x10000===0&&this.L();d=this.w();c.push(d[0],d[1],d[2],d[3])}this.L();return c.slice(0,a)},setDefaultParanoia:function(a){this.t=a},addEntropy:function(a,b,c){c=c||"user";var d,e,f=(new Date).valueOf(),g=this.q[c],h=this.isReady(),i=0;d=this.G[c];if(d===undefined)d=this.G[c]=this.R++;if(g===undefined)g=this.q[c]=
0;this.q[c]=(this.q[c]+1)%this.b.length;switch(typeof a){case "number":if(b===undefined)b=1;this.b[g].update([d,this.u++,1,b,f,1,a|0]);break;case "object":c=Object.prototype.toString.call(a);if(c==="[object Uint32Array]"){e=[];for(c=0;c<a.length;c++)e.push(a[c]);a=e}else{if(c!=="[object Array]")i=1;for(c=0;c<a.length&&!i;c++)if(typeof a[c]!="number")i=1}if(!i){if(b===undefined)for(c=b=0;c<a.length;c++)for(e=a[c];e>0;){b++;e>>>=1}this.b[g].update([d,this.u++,2,b,f,a.length].concat(a))}break;case "string":if(b===
undefined)b=a.length;this.b[g].update([d,this.u++,3,b,f,a.length]);this.b[g].update(a);break;default:i=1}if(i)throw new sjcl.exception.bug("random: addEntropy only supports number, array of numbers or string");this.j[g]+=b;this.f+=b;if(h===0){this.isReady()!==0&&this.K("seeded",Math.max(this.g,this.f));this.K("progress",this.getProgress())}},isReady:function(a){a=this.C[a!==undefined?a:this.t];return this.g&&this.g>=a?this.j[0]>80&&(new Date).valueOf()>this.O?3:1:this.f>=a?2:0},getProgress:function(a){a=
this.C[a?a:this.t];return this.g>=a?1:this.f>a?1:this.f/a},startCollectors:function(){if(!this.m){if(window.addEventListener){window.addEventListener("load",this.o,false);window.addEventListener("mousemove",this.p,false)}else if(document.attachEvent){document.attachEvent("onload",this.o);document.attachEvent("onmousemove",this.p)}else throw new sjcl.exception.bug("can't attach event");this.m=true}},stopCollectors:function(){if(this.m){if(window.removeEventListener){window.removeEventListener("load",
this.o,false);window.removeEventListener("mousemove",this.p,false)}else if(window.detachEvent){window.detachEvent("onload",this.o);window.detachEvent("onmousemove",this.p)}this.m=false}},addEventListener:function(a,b){this.r[a][this.Q++]=b},removeEventListener:function(a,b){var c;a=this.r[a];var d=[];for(c in a)a.hasOwnProperty(c)&&a[c]===b&&d.push(c);for(b=0;b<d.length;b++){c=d[b];delete a[c]}},b:[new sjcl.hash.sha256],j:[0],A:0,q:{},u:0,G:{},R:0,g:0,f:0,O:0,a:[0,0,0,0,0,0,0,0],d:[0,0,0,0],s:undefined,
t:6,m:false,r:{progress:{},seeded:{}},Q:0,C:[0,48,64,96,128,192,0x100,384,512,768,1024],w:function(){for(var a=0;a<4;a++){this.d[a]=this.d[a]+1|0;if(this.d[a])break}return this.s.encrypt(this.d)},L:function(){this.a=this.w().concat(this.w());this.s=new sjcl.cipher.aes(this.a)},T:function(a){this.a=sjcl.hash.sha256.hash(this.a.concat(a));this.s=new sjcl.cipher.aes(this.a);for(a=0;a<4;a++){this.d[a]=this.d[a]+1|0;if(this.d[a])break}},U:function(a){var b=[],c=0,d;this.O=b[0]=(new Date).valueOf()+3E4;for(d=
0;d<16;d++)b.push(Math.random()*0x100000000|0);for(d=0;d<this.b.length;d++){b=b.concat(this.b[d].finalize());c+=this.j[d];this.j[d]=0;if(!a&&this.A&1<<d)break}if(this.A>=1<<this.b.length){this.b.push(new sjcl.hash.sha256);this.j.push(0)}this.f-=c;if(c>this.g)this.g=c;this.A++;this.T(b)},p:function(a){sjcl.random.addEntropy([a.x||a.clientX||a.offsetX||0,a.y||a.clientY||a.offsetY||0],2,"mouse")},o:function(){sjcl.random.addEntropy((new Date).valueOf(),2,"loadtime")},K:function(a,b){var c;a=sjcl.random.r[a];
var d=[];for(c in a)a.hasOwnProperty(c)&&d.push(a[c]);for(c=0;c<d.length;c++)d[c](b)}};try{var s=new Uint32Array(32);crypto.getRandomValues(s);sjcl.random.addEntropy(s,1024,"crypto['getRandomValues']")}catch(t){}
sjcl.json={defaults:{v:1,iter:1E3,ks:128,ts:64,mode:"ccm",adata:"",cipher:"aes"},encrypt:function(a,b,c,d){c=c||{};d=d||{};var e=sjcl.json,f=e.c({iv:sjcl.random.randomWords(4,0)},e.defaults),g;e.c(f,c);c=f.adata;if(typeof f.salt==="string")f.salt=sjcl.codec.base64.toBits(f.salt);if(typeof f.iv==="string")f.iv=sjcl.codec.base64.toBits(f.iv);if(!sjcl.mode[f.mode]||!sjcl.cipher[f.cipher]||typeof a==="string"&&f.iter<=100||f.ts!==64&&f.ts!==96&&f.ts!==128||f.ks!==128&&f.ks!==192&&f.ks!==0x100||f.iv.length<
2||f.iv.length>4)throw new sjcl.exception.invalid("json encrypt: invalid parameters");if(typeof a==="string"){g=sjcl.misc.cachedPbkdf2(a,f);a=g.key.slice(0,f.ks/32);f.salt=g.salt}if(typeof b==="string")b=sjcl.codec.utf8String.toBits(b);if(typeof c==="string")c=sjcl.codec.utf8String.toBits(c);g=new sjcl.cipher[f.cipher](a);e.c(d,f);d.key=a;f.ct=sjcl.mode[f.mode].encrypt(g,b,f.iv,c,f.ts);return e.encode(f)},decrypt:function(a,b,c,d){c=c||{};d=d||{};var e=sjcl.json;b=e.c(e.c(e.c({},e.defaults),e.decode(b)),
c,true);var f;c=b.adata;if(typeof b.salt==="string")b.salt=sjcl.codec.base64.toBits(b.salt);if(typeof b.iv==="string")b.iv=sjcl.codec.base64.toBits(b.iv);if(!sjcl.mode[b.mode]||!sjcl.cipher[b.cipher]||typeof a==="string"&&b.iter<=100||b.ts!==64&&b.ts!==96&&b.ts!==128||b.ks!==128&&b.ks!==192&&b.ks!==0x100||!b.iv||b.iv.length<2||b.iv.length>4)throw new sjcl.exception.invalid("json decrypt: invalid parameters");if(typeof a==="string"){f=sjcl.misc.cachedPbkdf2(a,b);a=f.key.slice(0,b.ks/32);b.salt=f.salt}if(typeof c===
"string")c=sjcl.codec.utf8String.toBits(c);f=new sjcl.cipher[b.cipher](a);c=sjcl.mode[b.mode].decrypt(f,b.ct,b.iv,c,b.ts);e.c(d,b);d.key=a;return sjcl.codec.utf8String.fromBits(c)},encode:function(a){var b,c="{",d="";for(b in a)if(a.hasOwnProperty(b)){if(!b.match(/^[a-z0-9]+$/i))throw new sjcl.exception.invalid("json encode: invalid property name");c+=d+'"'+b+'":';d=",";switch(typeof a[b]){case "number":case "boolean":c+=a[b];break;case "string":c+='"'+escape(a[b])+'"';break;case "object":c+='"'+
sjcl.codec.base64.fromBits(a[b],1)+'"';break;default:throw new sjcl.exception.bug("json encode: unsupported type");}}return c+"}"},decode:function(a){a=a.replace(/\s/g,"");if(!a.match(/^\{.*\}$/))throw new sjcl.exception.invalid("json decode: this isn't json!");a=a.replace(/^\{|\}$/g,"").split(/,/);var b={},c,d;for(c=0;c<a.length;c++){if(!(d=a[c].match(/^(?:(["']?)([a-z][a-z0-9]*)\1):(?:(\d+)|"([a-z0-9+\/%*_.@=\-]*)")$/i)))throw new sjcl.exception.invalid("json decode: this isn't json!");b[d[2]]=
d[3]?parseInt(d[3],10):d[2].match(/^(ct|salt|iv)$/)?sjcl.codec.base64.toBits(d[4]):unescape(d[4])}return b},c:function(a,b,c){if(a===undefined)a={};if(b===undefined)return a;var d;for(d in b)if(b.hasOwnProperty(d)){if(c&&a[d]!==undefined&&a[d]!==b[d])throw new sjcl.exception.invalid("required parameter overridden");a[d]=b[d]}return a},W:function(a,b){var c={},d;for(d in a)if(a.hasOwnProperty(d)&&a[d]!==b[d])c[d]=a[d];return c},V:function(a,b){var c={},d;for(d=0;d<b.length;d++)if(a[b[d]]!==undefined)c[b[d]]=
a[b[d]];return c}};sjcl.encrypt=sjcl.json.encrypt;sjcl.decrypt=sjcl.json.decrypt;sjcl.misc.S={};sjcl.misc.cachedPbkdf2=function(a,b){var c=sjcl.misc.S,d;b=b||{};d=b.iter||1E3;c=c[a]=c[a]||{};d=c[d]=c[d]||{firstSalt:b.salt&&b.salt.length?b.salt.slice(0):sjcl.random.randomWords(2,0)};c=b.salt===undefined?d.firstSalt:b.salt;d[c]=d[c]||sjcl.misc.pbkdf2(a,c,b.iter);return{key:d[c].slice(0),salt:c.slice(0)}};</script>
</div>
<!--~~ Boot kernel prologue ~~-->
<div id="bootKernelPrefix" style="display:none;">
<script data-tiddler-title="$:/boot/bootprefix.js" data-tiddler-type="application/javascript" type="text/javascript">/*\
title: $:/boot/bootprefix.js
type: application/javascript
 
This file sets up the globals that need to be available when JavaScript modules are executed in the browser. The overall sequence is:
 
# BootPrefix.js
# <module definitions>
# Boot.js
 
See Boot.js for further details of the boot process.
 
\*/
 
var _bootprefix = (function($tw) {
 
"use strict";
 
$tw = $tw || Object.create(null);
$tw.boot = $tw.boot || Object.create(null);
 
// Detect platforms
$tw.browser = typeof(window) !== "undefined" ? {} : null;
$tw.node = typeof(process) === "object" ? {} : null;
$tw.nodeWebKit = $tw.node && global.window && global.window.nwDispatcher ? {} : null;
 
// Set default boot tasks
$tw.boot.tasks = {
trapErrors: !!($tw.browser && !$tw.node),
readBrowserTiddlers: !!($tw.browser && !$tw.node)
};
 
/*
Information about each module is kept in an object with these members:
moduleType: type of module
definition: object, function or string defining the module; see below
exports: exports of the module, filled in after execution
 
The `definition` can be of several types:
 
* An object can be used to directly specify the exports of the module
* A function with the arguments `module,require,exports` that returns `exports`
* A string function body with the same arguments
 
Each moduleInfo object is stored in two hashmaps: $tw.modules.titles and $tw.modules.types. The first is indexed by title and the second is indexed by type and then title
*/
$tw.modules = {
titles: {}, // hashmap by module name of moduleInfo
types: {} // hashmap by module type and then name of moduleInfo
};
 
/*
Define a JavaScript tiddler module for later execution
moduleName: name of module being defined
moduleType: type of module
definition: module definition; see discussion above
*/
$tw.modules.define = function(moduleName,moduleType,definition) {
// Create the moduleInfo
var moduleInfo = {
moduleType: moduleType,
definition: definition,
exports: undefined
};
// If the definition is already an object we can use it as the exports
if(typeof moduleInfo.definition === "object") {
moduleInfo.exports = definition;
}
// Store the module in the titles hashmap
if(Object.prototype.hasOwnProperty.call($tw.modules.titles,moduleName)) {
console.log("Warning: Redefined module - " + moduleName);
}
$tw.modules.titles[moduleName] = moduleInfo;
// Store the module in the types hashmap
if(!Object.prototype.hasOwnProperty.call($tw.modules.types,moduleType)) {
$tw.modules.types[moduleType] = {};
}
if(Object.prototype.hasOwnProperty.call($tw.modules.types[moduleType],moduleName)) {
console.log("Warning: Redefined module - " + moduleName);
}
$tw.modules.types[moduleType][moduleName] = moduleInfo;
};
 
/*
External JavaScript can populate this array before calling boot.js in order to preload tiddlers
*/
$tw.preloadTiddlers = $tw.preloadTiddlers || [];
 
/*
Convenience function for pushing a tiddler onto the preloading array
*/
$tw.preloadTiddler = function(fields) {
$tw.preloadTiddlers.push(fields);
};
 
return $tw
 
});
 
if(typeof(exports) === "undefined") {
// Set up $tw global for the browser
window.$tw = _bootprefix();
} else {
// Export functionality as a module
exports.bootprefix = _bootprefix;
}
</script>
</div>
<!--~~ Boot kernel ~~-->
<div id="bootKernel" style="display:none;">
<script data-tiddler-title="$:/boot/boot.js" data-tiddler-type="application/javascript" type="text/javascript">/*\
title: $:/boot/boot.js
type: application/javascript
 
The main boot kernel for TiddlyWiki. This single file creates a barebones TW environment that is just sufficient to bootstrap the modules containing the main logic of the application.
 
On the server this file is executed directly to boot TiddlyWiki. In the browser, this file is packed into a single HTML file along with other elements:
 
# bootprefix.js
# <module definitions>
# boot.js
 
The module definitions on the browser look like this:
 
$tw.defineModule("MyModule","moduletype",function(module,exports,require) {
// Module code inserted here
return exports;
});
 
In practice, each module is wrapped in a separate script block.
 
\*/
 
var _boot = (function($tw) {
 
/*jslint node: true, browser: true */
/*global modules: false, $tw: false */
"use strict";
 
// Include bootprefix if we're not given module data
if(!$tw) {
$tw = require("./bootprefix.js").bootprefix();
}
 
$tw.utils = $tw.utils || Object.create(null);
 
/////////////////////////// Standard node.js libraries
 
var fs, path, vm;
if($tw.node) {
fs = require("fs");
path = require("path");
vm = require("vm");
}
 
/////////////////////////// Utility functions
 
$tw.boot.log = function(str) {
$tw.boot.logMessages = $tw.boot.logMessages || [];
$tw.boot.logMessages.push(str);
}
 
/*
Check if an object has a property
*/
$tw.utils.hop = function(object,property) {
return object ? Object.prototype.hasOwnProperty.call(object,property) : false;
};
 
/*
Determine if a value is an array
*/
$tw.utils.isArray = function(value) {
return Object.prototype.toString.call(value) == "[object Array]";
};
 
/*
Determine if a value is a date
*/
$tw.utils.isDate = function(value) {
return Object.prototype.toString.call(value) === "[object Date]";
};
 
/*
Iterate through all the own properties of an object or array. Callback is invoked with (element,title,object)
*/
$tw.utils.each = function(object,callback) {
var f;
if(object) {
if(Object.prototype.toString.call(object) == "[object Array]") {
object.forEach(callback);
} else {
for(f in object) {
if(Object.prototype.hasOwnProperty.call(object,f)) {
callback(object[f],f,object);
}
}
}
}
};
 
/*
Helper for making DOM elements
tag: tag name
options: see below
Options include:
attributes: hashmap of attribute values
text: text to add as a child node
children: array of further child nodes
innerHTML: optional HTML for element
class: class name(s)
document: defaults to current document
eventListeners: array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded)
*/
$tw.utils.domMaker = function(tag,options) {
var doc = options.document || document;
var element = doc.createElement(tag);
if(options["class"]) {
element.className = options["class"];
}
if(options.text) {
element.appendChild(doc.createTextNode(options.text));
}
$tw.utils.each(options.children,function(child) {
element.appendChild(child);
});
if(options.innerHTML) {
element.innerHTML = options.innerHTML;
}
$tw.utils.each(options.attributes,function(attribute,name) {
element.setAttribute(name,attribute);
});
if(options.eventListeners) {
$tw.utils.addEventListeners(element,options.eventListeners);
}
return element;
};
 
/*
Display an error and exit
*/
$tw.utils.error = function(err) {
// Prepare the error message
var errHeading = "Internal JavaScript Error",
promptMsg = "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser";
// Log the error to the console
console.error(err);
if($tw.browser && !$tw.node) {
// Display an error message to the user
var dm = $tw.utils.domMaker,
heading = dm("h1",{text: errHeading}),
prompt = dm("div",{text: promptMsg, "class": "tw-error-prompt"}),
message = dm("div",{text: err}),
button = dm("button",{text: "close"}),
form = dm("form",{children: [heading,prompt,message,button], "class": "tw-error-form"});
document.body.insertBefore(form,document.body.firstChild);
form.addEventListener("submit",function(event) {
document.body.removeChild(form);
event.preventDefault();
return false;
},true);
return null;
} else if(!$tw.browser) {
// Exit if we're under node.js
process.exit(1);
}
};
 
/*
Use our custom error handler if we're in the browser
*/
if($tw.boot.tasks.trapErrors) {
window.onerror = function(errorMsg,url,lineNumber) {
$tw.utils.error(errorMsg);
return false;
};
}
 
/*
Extend an object with the properties from a list of source objects
*/
$tw.utils.extend = function(object /*, sourceObjectList */) {
$tw.utils.each(Array.prototype.slice.call(arguments,1),function(source) {
if(source) {
for (var p in source) {
object[p] = source[p];
}
}
});
return object;
};
 
/*
Fill in any null or undefined properties of an object with the properties from a list of source objects. Each property that is an object is called recursively
*/
$tw.utils.deepDefaults = function(object /*, sourceObjectList */) {
$tw.utils.each(Array.prototype.slice.call(arguments,1),function(source) {
if(source) {
for (var p in source) {
if(object[p] === null || object[p] === undefined) {
object[p] = source[p];
}
if(typeof object[p] === "object" && typeof source[p] === "object") {
$tw.utils.deepDefaults(object[p],source[p]);
}
}
}
});
return object;
};
 
/*
Convert "&amp;" to &, "&nbsp;" to nbsp, "&lt;" to <, "&gt;" to > and "&quot;" to "
*/
$tw.utils.htmlDecode = function(s) {
return s.toString().replace(/&lt;/mg,"<").replace(/&nbsp;/mg,"\xA0").replace(/&gt;/mg,">").replace(/&quot;/mg,"\"").replace(/&amp;/mg,"&");
};
 
/*
Get the browser location.hash. We don't use location.hash because of the way that Firefox auto-urldecodes it (see http://stackoverflow.com/questions/1703552/encoding-of-window-location-hash)
*/
$tw.utils.getLocationHash = function() {
var parts = window.location.href.split('#');
return "#" + (parts.length > 1 ? parts[1] : "");
};
 
/*
Pad a string to a given length with "0"s. Length defaults to 2
*/
$tw.utils.pad = function(value,length) {
length = length || 2;
var s = value.toString();
if(s.length < length) {
s = "000000000000000000000000000".substr(0,length - s.length) + s;
}
return s;
};
 
// Convert a date into UTC YYYYMMDDHHMMSSmmm format
$tw.utils.stringifyDate = function(value) {
return value.getUTCFullYear() +
$tw.utils.pad(value.getUTCMonth() + 1) +
$tw.utils.pad(value.getUTCDate()) +
$tw.utils.pad(value.getUTCHours()) +
$tw.utils.pad(value.getUTCMinutes()) +
$tw.utils.pad(value.getUTCSeconds()) +
$tw.utils.pad(value.getUTCMilliseconds(),3);
};
 
// Parse a date from a UTC YYYYMMDDHHMMSSmmm format string
$tw.utils.parseDate = function(value) {
if(typeof value === "string") {
return new Date(Date.UTC(parseInt(value.substr(0,4),10),
parseInt(value.substr(4,2),10)-1,
parseInt(value.substr(6,2),10),
parseInt(value.substr(8,2)||"00",10),
parseInt(value.substr(10,2)||"00",10),
parseInt(value.substr(12,2)||"00",10),
parseInt(value.substr(14,3)||"000",10)));
} else if($tw.utils.isDate(value)) {
return value;
} else {
return null;
}
};
 
// Stringify an array of tiddler titles into a list string
$tw.utils.stringifyList = function(value) {
var result = [];
for(var t=0; t<value.length; t++) {
if(value[t].indexOf(" ") !== -1) {
result.push("[[" + value[t] + "]]");
} else {
result.push(value[t]);
}
}
return result.join(" ");
};
 
// Parse a string array from a bracketted list. For example "OneTiddler [[Another Tiddler]] LastOne"
$tw.utils.parseStringArray = function(value) {
if(typeof value === "string") {
var memberRegExp = /(?:^|[^\S\xA0])(?:\[\[(.*?)\]\])(?=[^\S\xA0]|$)|([\S\xA0]+)/mg,
results = [],
match;
do {
match = memberRegExp.exec(value);
if(match) {
var item = match[1] || match[2];
if(item !== undefined && results.indexOf(item) === -1) {
results.push(item);
}
}
} while(match);
return results;
} else if($tw.utils.isArray(value)) {
return value;
} else {
return null;
}
};
 
// Parse a block of name:value fields. The `fields` object is used as the basis for the return value
$tw.utils.parseFields = function(text,fields) {
fields = fields || Object.create(null);
text.split(/\r?\n/mg).forEach(function(line) {
if(line.charAt(0) !== "#") {
var p = line.indexOf(":");
if(p !== -1) {
var field = line.substr(0, p).trim(),
value = line.substr(p+1).trim();
fields[field] = value;
}
}
});
return fields;
};
 
/*
Resolves a source filepath delimited with `/` relative to a specified absolute root filepath.
In relative paths, the special folder name `..` refers to immediate parent directory, and the
name `.` refers to the current directory
*/
$tw.utils.resolvePath = function(sourcepath,rootpath) {
// If the source path starts with ./ or ../ then it is relative to the root
if(sourcepath.substr(0,2) === "./" || sourcepath.substr(0,3) === "../" ) {
var src = sourcepath.split("/"),
root = rootpath.split("/");
// Remove the filename part of the root
root.splice(root.length-1,1);
// Process the source path bit by bit onto the end of the root path
while(src.length > 0) {
var c = src.shift();
if(c === "..") { // Slice off the last root entry for a double dot
if(root.length > 0) {
root.splice(root.length-1,1);
}
} else if(c !== ".") { // Ignore dots
root.push(c); // Copy other elements across
}
}
return root.join("/");
} else {
// If it isn't relative, just return the path
if(rootpath) {
var root = rootpath.split("/");
// Remove the filename part of the root
root.splice(root.length - 1, 1);
return root.join("/") + "/" + sourcepath;
} else {
return sourcepath;
}
}
};
 
/*
Parse a semantic version string into its constituent parts
*/
$tw.utils.parseVersion = function(version) {
var match = /^((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/.exec(version);
if(match) {
return {
version: match[1],
major: parseInt(match[2],10),
minor: parseInt(match[3],10),
patch: parseInt(match[4],10),
prerelease: match[5],
build: match[6]
};
} else {
return null;
}
};
 
/*
Returns true if the version string A is greater than the version string B. Returns true if the versions are the same
*/
$tw.utils.checkVersions = function(versionStringA,versionStringB) {
var defaultVersion = {
major: 0,
minor: 0,
patch: 0
},
versionA = $tw.utils.parseVersion(versionStringA) || defaultVersion,
versionB = $tw.utils.parseVersion(versionStringB) || defaultVersion,
diff = [
versionA.major - versionB.major,
versionA.minor - versionB.minor,
versionA.patch - versionB.patch
];
return (diff[0] > 0) ||
(diff[0] === 0 && diff[1] > 0) ||
(diff[0] === 0 && diff[1] === 0 && diff[2] > 0) ||
(diff[0] === 0 && diff[1] === 0 && diff[2] === 0);
};
 
/*
Register file type information
options: {flags: flags,deserializerType: deserializerType}
flags:"image" for image types
deserializerType: defaults to type if not specified
*/
$tw.utils.registerFileType = function(type,encoding,extension,options) {
options = options || {};
$tw.config.fileExtensionInfo[extension] = {type: type};
$tw.config.contentTypeInfo[type] = {encoding: encoding, extension: extension, flags: options.flags || [], deserializerType: options.deserializerType || type};
};
 
/*
Given an extension, get the correct encoding for that file.
defaults to utf8
*/
$tw.utils.getTypeEncoding = function(ext) {
var extensionInfo = $tw.config.fileExtensionInfo[ext],
type = extensionInfo ? extensionInfo.type : null,
typeInfo = type ? $tw.config.contentTypeInfo[type] : null;
return typeInfo ? typeInfo.encoding : "utf8";
};
 
/*
Run code globally with specified context variables in scope
*/
$tw.utils.evalGlobal = function(code,context,filename) {
var contextCopy = $tw.utils.extend(Object.create(null),context);
// Get the context variables as a pair of arrays of names and values
var contextNames = [], contextValues = [];
$tw.utils.each(contextCopy,function(value,name) {
contextNames.push(name);
contextValues.push(value);
});
// Add the code prologue and epilogue
code = "(function(" + contextNames.join(",") + ") {(function(){\n" + code + ";})();\nreturn exports;\n})\n";
// Compile the code into a function
var fn;
if($tw.browser) {
fn = window["eval"](code + "\n\n//# sourceURL=" + filename);
} else {
fn = vm.runInThisContext(code,filename);
}
// Call the function and return the exports
return fn.apply(null,contextValues);
};
 
/*
Run code in a sandbox with only the specified context variables in scope
*/
$tw.utils.evalSandboxed = $tw.browser ? $tw.utils.evalGlobal : function(code,context,filename) {
var sandbox = $tw.utils.extend(Object.create(null),context);
vm.runInNewContext(code,sandbox,filename);
return sandbox.exports;
};
 
/*
Creates a PasswordPrompt object
*/
$tw.utils.PasswordPrompt = function() {
// Store of pending password prompts
this.passwordPrompts = [];
// Create the wrapper
this.promptWrapper = $tw.utils.domMaker("div",{"class":"tw-password-wrapper"});
document.body.appendChild(this.promptWrapper);
// Hide the empty wrapper
this.setWrapperDisplay();
};
 
/*
Hides or shows the wrapper depending on whether there are any outstanding prompts
*/
$tw.utils.PasswordPrompt.prototype.setWrapperDisplay = function() {
if(this.passwordPrompts.length) {
this.promptWrapper.style.display = "block";
} else {
this.promptWrapper.style.display = "none";
}
};
 
/*
Adds a new password prompt. Options are:
submitText: text to use for submit button (defaults to "Login")
serviceName: text of the human readable service name
noUserName: set true to disable username prompt
canCancel: set true to enable a cancel button (callback called with null)
callback: function to be called on submission with parameter of object {username:,password:}. Callback must return `true` to remove the password prompt
*/
$tw.utils.PasswordPrompt.prototype.createPrompt = function(options) {
// Create and add the prompt to the DOM
var self = this,
submitText = options.submitText || "Login",
dm = $tw.utils.domMaker,
children = [dm("h1",{text: options.serviceName})];
if(!options.noUserName) {
children.push(dm("input",{
attributes: {type: "text", name: "username", placeholder: "Username"},
"class": "input-small"
}));
}
children.push(dm("input",{
attributes: {type: "password", name: "password", placeholder: "Password"},
"class": "input-small"
}));
if(options.canCancel) {
children.push(dm("button",{
text: "Cancel",
"class": "btn",
eventListeners: [{
name: "click",
handlerFunction: function(event) {
self.removePrompt(promptInfo);
options.callback(null);
}
}]
}));
}
children.push(dm("button",{
attributes: {type: "submit"},
text: submitText,
"class": "btn"
}));
var form = dm("form",{
"class": "form-inline",
attributes: {autocomplete: "off"},
children: children
});
this.promptWrapper.appendChild(form);
window.setTimeout(function() {
form.elements[0].focus();
},10);
// Add a submit event handler
var self = this;
form.addEventListener("submit",function(event) {
// Collect the form data
var data = {},t;
$tw.utils.each(form.elements,function(element) {
if(element.name && element.value) {
data[element.name] = element.value;
}
});
// Call the callback
if(options.callback(data)) {
// Remove the prompt if the callback returned true
self.removePrompt(promptInfo);
} else {
// Clear the password if the callback returned false
$tw.utils.each(form.elements,function(element) {
if(element.name === "password") {
element.value = "";
}
});
}
event.preventDefault();
return false;
},true);
// Add the prompt to the list
var promptInfo = {
serviceName: options.serviceName,
callback: options.callback,
form: form
};
this.passwordPrompts.push(promptInfo);
// Make sure the wrapper is displayed
this.setWrapperDisplay();
};
 
$tw.utils.PasswordPrompt.prototype.removePrompt = function(promptInfo) {
var i = this.passwordPrompts.indexOf(promptInfo);
if(i !== -1) {
this.passwordPrompts.splice(i,1);
promptInfo.form.parentNode.removeChild(promptInfo.form);
this.setWrapperDisplay();
}
}
 
/*
Crypto helper object for encrypted content. It maintains the password text in a closure, and provides methods to change
the password, and to encrypt/decrypt a block of text
*/
$tw.utils.Crypto = function() {
var sjcl = $tw.node ? require("./sjcl.js") : window.sjcl,
currentPassword = null,
callSjcl = function(method,inputText,password) {
password = password || currentPassword;
var outputText;
try {
if(password) {
outputText = sjcl[method](password,inputText);
}
} catch(ex) {
console.log("Crypto error:" + ex);
outputText = null;
}
return outputText;
};
this.setPassword = function(newPassword) {
currentPassword = newPassword;
this.updateCryptoStateTiddler();
};
this.updateCryptoStateTiddler = function() {
if($tw.wiki) {
var state = currentPassword ? "yes" : "no",
tiddler = $tw.wiki.getTiddler("$:/isEncrypted");
if(!tiddler || tiddler.fields.text !== state) {
$tw.wiki.addTiddler(new $tw.Tiddler({title: "$:/isEncrypted", text: state}));
}
}
};
this.hasPassword = function() {
return !!currentPassword;
}
this.encrypt = function(text,password) {
return callSjcl("encrypt",text,password);
};
this.decrypt = function(text,password) {
return callSjcl("decrypt",text,password);
};
};
 
/////////////////////////// Module mechanism
 
/*
Execute the module named 'moduleName'. The name can optionally be relative to the module named 'moduleRoot'
*/
$tw.modules.execute = function(moduleName,moduleRoot) {
var name = moduleName[0] === "." ? $tw.utils.resolvePath(moduleName,moduleRoot) : moduleName,
moduleInfo = $tw.modules.titles[name] || $tw.modules.titles[name + ".js"] || $tw.modules.titles[moduleName] || $tw.modules.titles[moduleName + ".js"] ,
tiddler = $tw.wiki.getTiddler(name) || $tw.wiki.getTiddler(name + ".js") || $tw.wiki.getTiddler(moduleName) || $tw.wiki.getTiddler(moduleName + ".js") ,
_exports = {},
sandbox = {
module: {},
//moduleInfo: moduleInfo,
exports: _exports,
console: console,
setInterval: setInterval,
clearInterval: clearInterval,
setTimeout: setTimeout,
clearTimeout: clearTimeout,
Buffer: $tw.browser ? {} : Buffer,
$tw: $tw,
require: function(title) {
return $tw.modules.execute(title, name);
}
};
 
Object.defineProperty(sandbox.module, "id", {
value: name,
writable: false,
enumerable: true,
configurable: false
});
 
if(!$tw.browser) {
$tw.utils.extend(sandbox,{
process: process
});
} else {
/*
CommonJS optional require.main property:
In a browser we offer a fake main module which points back to the boot function
(Theoretically, this may allow TW to eventually load itself as a module in the browser)
*/
Object.defineProperty(sandbox.require, "main", {
value: (typeof(require) !== "undefined") ? require.main : {TiddlyWiki: _boot},
writable: false,
enumerable: true,
configurable: false
});
}
if(!moduleInfo) {
// We could not find the module on this path
// Try to defer to browserify etc, or node
var deferredModule;
if($tw.browser) {
if(window.require) {
try {
return window.require(moduleName);
} catch(e) {}
}
throw "Cannot find module named '" + moduleName + "' required by module '" + moduleRoot + "', resolved to " + name;
} else {
// If we don't have a module with that name, let node.js try to find it
return require(moduleName);
}
}
// Execute the module if we haven't already done so
if(!moduleInfo.exports) {
try {
// Check the type of the definition
if(typeof moduleInfo.definition === "function") { // Function
moduleInfo.exports = _exports;
moduleInfo.definition(moduleInfo,moduleInfo.exports,sandbox.require);
} else if(typeof moduleInfo.definition === "string") { // String
moduleInfo.exports = _exports;
$tw.utils.evalSandboxed(moduleInfo.definition,sandbox,tiddler.fields.title);
if(sandbox.module.exports) {
moduleInfo.exports = sandbox.module.exports; //more codemirror workaround
}
} else { // Object
moduleInfo.exports = moduleInfo.definition;
}
} catch(e) {
$tw.utils.error("Error executing boot module " + name + ":\n" + e);
}
}
// Return the exports of the module
return moduleInfo.exports;
};
 
/*
Apply a callback to each module of a particular type
moduleType: type of modules to enumerate
callback: function called as callback(title,moduleExports) for each module
*/
$tw.modules.forEachModuleOfType = function(moduleType,callback) {
var modules = $tw.modules.types[moduleType];
$tw.utils.each(modules,function(element,title) {
callback(title,$tw.modules.execute(title));
});
};
 
/*
Get all the modules of a particular type in a hashmap by their `name` field
*/
$tw.modules.getModulesByTypeAsHashmap = function(moduleType,nameField) {
nameField = nameField || "name";
var results = Object.create(null);
$tw.modules.forEachModuleOfType(moduleType,function(title,module) {
results[module[nameField]] = module;
});
return results;
};
 
/*
Apply the exports of the modules of a particular type to a target object
*/
$tw.modules.applyMethods = function(moduleType,targetObject) {
if(!targetObject) {
targetObject = Object.create(null);
}
$tw.modules.forEachModuleOfType(moduleType,function(title,module) {
$tw.utils.each(module,function(element,title,object) {
targetObject[title] = module[title];
});
});
return targetObject;
};
 
/*
Return an array of classes created from the modules of a specified type. Each module should export the properties to be added to those of the optional base class
*/
$tw.modules.createClassesFromModules = function(moduleType,subType,baseClass) {
var classes = Object.create(null);
$tw.modules.forEachModuleOfType(moduleType,function(title,moduleExports) {
if(!subType || moduleExports.types[subType]) {
var newClass = function() {};
if(baseClass) {
newClass.prototype = new baseClass();
newClass.prototype.constructor = baseClass;
}
$tw.utils.extend(newClass.prototype,moduleExports);
classes[moduleExports.name] = newClass;
}
});
return classes;
};
 
/////////////////////////// Barebones tiddler object
 
/*
Construct a tiddler object from a hashmap of tiddler fields. If multiple hasmaps are provided they are merged,
taking precedence to the right
*/
$tw.Tiddler = function(/* [fields,] fields */) {
this.fields = Object.create(null);
for(var c=0; c<arguments.length; c++) {
var arg = arguments[c],
src = (arg instanceof $tw.Tiddler) ? arg.fields : arg;
for(var t in src) {
if(src[t] === undefined || src[t] === null) {
if(t in this.fields) {
delete this.fields[t]; // If we get a field that's undefined, delete any previous field value
}
} else {
// Parse the field with the associated field module (if any)
var fieldModule = $tw.Tiddler.fieldModules[t],
value;
if(fieldModule && fieldModule.parse) {
value = fieldModule.parse.call(this,src[t]);
} else {
value = src[t];
}
// Freeze the field to keep it immutable
if(typeof value === "object") {
Object.freeze(value);
}
this.fields[t] = value;
}
}
}
// Freeze the tiddler against modification
Object.freeze(this.fields);
};
 
$tw.Tiddler.prototype.hasField = function(field) {
return $tw.utils.hop(this.fields,field);
};
 
/*
Register and install the built in tiddler field modules
*/
$tw.modules.define("$:/boot/tiddlerfields/modified","tiddlerfield",{
name: "modified",
parse: $tw.utils.parseDate,
stringify: $tw.utils.stringifyDate
});
$tw.modules.define("$:/boot/tiddlerfields/created","tiddlerfield",{
name: "created",
parse: $tw.utils.parseDate,
stringify: $tw.utils.stringifyDate
});
$tw.modules.define("$:/boot/tiddlerfields/color","tiddlerfield",{
name: "color",
editTag: "input",
editType: "color"
});
$tw.modules.define("$:/boot/tiddlerfields/tags","tiddlerfield",{
name: "tags",
parse: $tw.utils.parseStringArray,
stringify: $tw.utils.stringifyList
});
$tw.modules.define("$:/boot/tiddlerfields/list","tiddlerfield",{
name: "list",
parse: $tw.utils.parseStringArray,
stringify: $tw.utils.stringifyList
});
 
/////////////////////////// Barebones wiki store
 
/*
Wiki constructor. State is stored in private members that only a small number of privileged accessor methods have direct access. Methods added via the prototype have to use these accessors and cannot access the state data directly.
options include:
shadowTiddlers: Array of shadow tiddlers to be added
*/
$tw.Wiki = function(options) {
options = options || {};
var self = this,
tiddlers = Object.create(null), // Hashmap of tiddlers
pluginTiddlers = [], // Array of tiddlers containing registered plugins, ordered by priority
pluginInfo = Object.create(null), // Hashmap of parsed plugin content
shadowTiddlers = options.shadowTiddlers || Object.create(null); // Hashmap by title of {source:, tiddler:}
 
// Add a tiddler to the store
this.addTiddler = function(tiddler) {
if(!(tiddler instanceof $tw.Tiddler)) {
tiddler = new $tw.Tiddler(tiddler);
}
// Save the tiddler
if(tiddler) {
var title = tiddler.fields.title;
if(title) {
tiddlers[title] = tiddler;
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title);
}
}
};
 
// Delete a tiddler
this.deleteTiddler = function(title) {
delete tiddlers[title];
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title,true);
};
 
// Get a tiddler from the store
this.getTiddler = function(title) {
var t = tiddlers[title];
if(t instanceof $tw.Tiddler) {
return t;
} else if(title !== undefined && Object.prototype.hasOwnProperty.call(shadowTiddlers,title)) {
return shadowTiddlers[title].tiddler;
} else {
return undefined;
}
};
 
// Get an array of all tiddler titles
this.allTitles = function() {
return Object.keys(tiddlers);
};
 
// Iterate through all tiddler titles
this.each = function(callback) {
for(var title in tiddlers) {
callback(tiddlers[title],title);
}
};
 
// Get an array of all shadow tiddler titles
this.allShadowTitles = function() {
return Object.keys(shadowTiddlers);
};
 
// Iterate through all shadow tiddler titles
this.eachShadow = function(callback) {
for(var title in shadowTiddlers) {
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
}
};
 
// Iterate through all tiddlers and then the shadows
this.eachTiddlerPlusShadows = function(callback) {
for(var title in tiddlers) {
callback(tiddlers[title],title);
}
for(var title in shadowTiddlers) {
if(!Object.prototype.hasOwnProperty.call(tiddlers,title)) {
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
}
}
};
 
// Iterate through all the shadows and then the tiddlers
this.eachShadowPlusTiddlers = function(callback) {
for(var title in shadowTiddlers) {
if(Object.prototype.hasOwnProperty.call(tiddlers,title)) {
callback(tiddlers[title],title);
} else {
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
}
}
for(var title in tiddlers) {
if(!Object.prototype.hasOwnProperty.call(shadowTiddlers,title)) {
callback(tiddlers[title],title);
}
}
 
};
 
// Test for the existence of a tiddler
this.tiddlerExists = function(title) {
return !!$tw.utils.hop(tiddlers,title);
};
 
// Determines if a tiddler is a shadow tiddler, regardless of whether it has been overridden by a real tiddler
this.isShadowTiddler = function(title) {
return $tw.utils.hop(shadowTiddlers,title);
};
 
this.getShadowSource = function(title) {
if($tw.utils.hop(shadowTiddlers,title)) {
return shadowTiddlers[title].source;
}
return null;
};
 
// Read plugin info for all plugins
this.readPluginInfo = function() {
for(var title in tiddlers) {
var tiddler = tiddlers[title];
if(tiddler.fields.type === "application/json" && tiddler.hasField("plugin-type")) {
pluginInfo[tiddler.fields.title] = JSON.parse(tiddler.fields.text);
}
 
}
};
 
// Get plugin info for a plugin
this.getPluginInfo = function(title) {
return pluginInfo[title];
};
 
// Register the plugin tiddlers of a particular type, optionally restricting registration to an array of tiddler titles. Return the array of titles affected
this.registerPluginTiddlers = function(pluginType,titles) {
var self = this,
registeredTitles = [],
checkTiddler = function(tiddler) {
if(tiddler && tiddler.fields.type === "application/json" && tiddler.fields["plugin-type"] === pluginType) {
pluginTiddlers.push(tiddler);
registeredTitles.push(tiddler.fields.title);
}
};
if(titles) {
$tw.utils.each(titles,function(title) {
checkTiddler(self.getTiddler(title));
});
} else {
this.each(function(tiddler,title) {
checkTiddler(tiddler);
});
}
return registeredTitles;
};
 
// Unregister the plugin tiddlers of a particular type, returning an array of the titles affected
this.unregisterPluginTiddlers = function(pluginType) {
var self = this,
titles = [];
// Remove any previous registered plugins of this type
for(var t=pluginTiddlers.length-1; t>=0; t--) {
var tiddler = pluginTiddlers[t];
if(tiddler.fields["plugin-type"] === pluginType) {
titles.push(tiddler.fields.title);
pluginTiddlers.splice(t,1);
}
}
return titles;
};
 
// Unpack the currently registered plugins, creating shadow tiddlers for their constituent tiddlers
this.unpackPluginTiddlers = function() {
var self = this;
// Sort the plugin titles by the `plugin-priority` field
pluginTiddlers.sort(function(a,b) {
if("plugin-priority" in a.fields && "plugin-priority" in b.fields) {
return a.fields["plugin-priority"] - b.fields["plugin-priority"];
} else if("plugin-priority" in a.fields) {
return -1;
} else if("plugin-priority" in b.fields) {
return +1;
} else if(a.fields.title < b.fields.title) {
return -1;
} else if(a.fields.title === b.fields.title) {
return 0;
} else {
return +1;
}
});
// Now go through the plugins in ascending order and assign the shadows
shadowTiddlers = Object.create(null);
$tw.utils.each(pluginTiddlers,function(tiddler) {
// Extract the constituent tiddlers
if($tw.utils.hop(pluginInfo,tiddler.fields.title)) {
$tw.utils.each(pluginInfo[tiddler.fields.title].tiddlers,function(constituentTiddler,constituentTitle) {
// Save the tiddler object
if(constituentTitle) {
shadowTiddlers[constituentTitle] = {
source: tiddler.fields.title,
tiddler: new $tw.Tiddler(constituentTiddler,{title: constituentTitle})
};
}
});
}
});
};
 
};
 
// Dummy methods that will be filled in after boot
$tw.Wiki.prototype.clearCache =
$tw.Wiki.prototype.clearGlobalCache =
$tw.Wiki.prototype.enqueueTiddlerEvent = function() {};
 
// Add an array of tiddlers
$tw.Wiki.prototype.addTiddlers = function(tiddlers) {
for(var t=0; t<tiddlers.length; t++) {
this.addTiddler(tiddlers[t]);
}
};
 
/*
Define all modules stored in ordinary tiddlers
*/
$tw.Wiki.prototype.defineTiddlerModules = function() {
this.each(function(tiddler,title) {
if(tiddler.hasField("module-type")) {
switch (tiddler.fields.type) {
case "application/javascript":
// We only define modules that haven't already been defined, because in the browser modules in system tiddlers are defined in inline script
if(!$tw.utils.hop($tw.modules.titles,tiddler.fields.title)) {
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],tiddler.fields.text);
}
break;
case "application/json":
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],JSON.parse(tiddler.fields.text));
break;
case "application/x-tiddler-dictionary":
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],$tw.utils.parseFields(tiddler.fields.text));
break;
}
}
});
};
 
/*
Register all the module tiddlers that have a module type
*/
$tw.Wiki.prototype.defineShadowModules = function() {
var self = this;
this.eachShadow(function(tiddler,title) {
// Don't define the module if it is overidden by an ordinary tiddler
if(!self.tiddlerExists(title) && tiddler.hasField("module-type")) {
// Define the module
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],tiddler.fields.text);
}
});
};
 
/*
Enable safe mode by deleting any tiddlers that override a shadow tiddler
*/
$tw.Wiki.prototype.processSafeMode = function() {
var self = this,
overrides = [];
// Find the overriding tiddlers
this.each(function(tiddler,title) {
if(self.isShadowTiddler(title)) {
console.log(title);
overrides.push(title);
}
});
// Assemble a report tiddler
var titleReportTiddler = "TiddlyWiki Safe Mode",
report = [];
report.push("TiddlyWiki has been started in [[safe mode|http://tiddlywiki.com/static/SafeMode.html]]. Most customisations have been disabled by renaming the following tiddlers:")
// Delete the overrides
overrides.forEach(function(title) {
var tiddler = self.getTiddler(title),
newTitle = "SAFE: " + title;
self.deleteTiddler(title);
self.addTiddler(new $tw.Tiddler(tiddler, {title: newTitle}));
report.push("* [[" + title + "|" + newTitle + "]]");
});
report.push()
this.addTiddler(new $tw.Tiddler({title: titleReportTiddler, text: report.join("\n\n")}));
// Set $:/DefaultTiddlers to point to our report
this.addTiddler(new $tw.Tiddler({title: "$:/DefaultTiddlers", text: "[[" + titleReportTiddler + "]]"}));
};
 
/*
Extracts tiddlers from a typed block of text, specifying default field values
*/
$tw.Wiki.prototype.deserializeTiddlers = function(type,text,srcFields) {
srcFields = srcFields || Object.create(null);
var deserializer = $tw.Wiki.tiddlerDeserializerModules[type],
fields = Object.create(null);
if(!deserializer && $tw.config.fileExtensionInfo[type]) {
// If we didn't find the serializer, try converting it from an extension to a content type
type = $tw.config.fileExtensionInfo[type].type;
deserializer = $tw.Wiki.tiddlerDeserializerModules[type];
}
if(!deserializer && $tw.config.contentTypeInfo[type]) {
// see if this type has a different deserializer registered with it
type = $tw.config.contentTypeInfo[type].deserializerType;
deserializer = $tw.Wiki.tiddlerDeserializerModules[type];
}
if(!deserializer) {
// If we still don't have a deserializer, treat it as plain text
deserializer = $tw.Wiki.tiddlerDeserializerModules["text/plain"];
}
for(var f in srcFields) {
fields[f] = srcFields[f];
}
if(deserializer) {
return deserializer.call(this,text,fields,type);
} else {
// Return a raw tiddler for unknown types
fields.text = text;
return [fields];
}
};
 
/*
Register the built in tiddler deserializer modules
*/
$tw.modules.define("$:/boot/tiddlerdeserializer/js","tiddlerdeserializer",{
"application/javascript": function(text,fields) {
var headerCommentRegExp = new RegExp($tw.config.jsModuleHeaderRegExpString,"mg"),
match = headerCommentRegExp.exec(text);
fields.text = text;
if(match) {
fields = $tw.utils.parseFields(match[1].split(/\r?\n\r?\n/mg)[0],fields);
}
return [fields];
}
});
$tw.modules.define("$:/boot/tiddlerdeserializer/tid","tiddlerdeserializer",{
"application/x-tiddler": function(text,fields) {
var split = text.split(/\r?\n\r?\n/mg);
if(split.length >= 1) {
fields = $tw.utils.parseFields(split[0],fields);
}
if(split.length >= 2) {
fields.text = split.slice(1).join("\n\n");
}
return [fields];
}
});
$tw.modules.define("$:/boot/tiddlerdeserializer/tids","tiddlerdeserializer",{
"application/x-tiddlers": function(text,fields) {
var titles = [],
tiddlers = [],
match = /\r?\n\r?\n/mg.exec(text);
if(match) {
fields = $tw.utils.parseFields(text.substr(0,match.index),fields);
var lines = text.substr(match.index + match[0].length).split(/\r?\n/mg);
for(var t=0; t<lines.length; t++) {
var line = lines[t];
if(line.charAt(0) !== "#") {
var colonPos= line.indexOf(": ");
if(colonPos !== -1) {
var tiddler = $tw.utils.extend(Object.create(null),fields);
tiddler.title = (tiddler.title || "") + line.substr(0,colonPos);
if(titles.indexOf(tiddler.title) !== -1) {
console.log("Warning: .multids file contains multiple definitions for " + tiddler.title);
}
titles.push(tiddler.title);
tiddler.text = line.substr(colonPos + 2);
tiddlers.push(tiddler);
}
}
}
}
return tiddlers;
}
});
$tw.modules.define("$:/boot/tiddlerdeserializer/txt","tiddlerdeserializer",{
"text/plain": function(text,fields,type) {
fields.text = text;
fields.type = type || "text/plain";
return [fields];
}
});
$tw.modules.define("$:/boot/tiddlerdeserializer/html","tiddlerdeserializer",{
"text/html": function(text,fields) {
fields.text = text;
fields.type = "text/html";
return [fields];
}
});
$tw.modules.define("$:/boot/tiddlerdeserializer/json","tiddlerdeserializer",{
"application/json": function(text,fields) {
var tiddlers = JSON.parse(text);
return tiddlers;
}
});
 
/////////////////////////// Browser definitions
 
if($tw.browser && !$tw.node) {
 
/*
Decrypt any tiddlers stored within the element with the ID "encryptedArea". The function is asynchronous to allow the user to be prompted for a password
callback: function to be called the decryption is complete
*/
$tw.boot.decryptEncryptedTiddlers = function(callback) {
var encryptedArea = document.getElementById("encryptedStoreArea");
if(encryptedArea) {
var encryptedText = encryptedArea.innerHTML;
// Prompt for the password
$tw.passwordPrompt.createPrompt({
serviceName: "Enter a password to decrypt this TiddlyWiki",
noUserName: true,
submitText: "Decrypt",
callback: function(data) {
// Attempt to decrypt the tiddlers
$tw.crypto.setPassword(data.password);
var decryptedText = $tw.crypto.decrypt(encryptedText);
if(decryptedText) {
var json = JSON.parse(decryptedText);
for(var title in json) {
$tw.preloadTiddler(json[title]);
}
// Call the callback
callback();
// Exit and remove the password prompt
return true;
} else {
// We didn't decrypt everything, so continue to prompt for password
return false;
}
}
});
} else {
// Just invoke the callback straight away if there weren't any encrypted tiddlers
callback();
}
};
 
/*
Register a deserializer that can extract tiddlers from the DOM
*/
$tw.modules.define("$:/boot/tiddlerdeserializer/dom","tiddlerdeserializer",{
"(DOM)": function(node) {
var extractTextTiddlers = function(node) {
var e = node.firstChild;
while(e && e.nodeName.toLowerCase() !== "pre") {
e = e.nextSibling;
}
var title = node.getAttribute ? node.getAttribute("title") : null;
if(e && title) {
var attrs = node.attributes,
tiddler = {
text: $tw.utils.htmlDecode(e.innerHTML)
};
for(var i=attrs.length-1; i >= 0; i--) {
tiddler[attrs[i].name] = attrs[i].value;
}
return [tiddler];
} else {
return null;
}
},
extractModuleTiddlers = function(node) {
if(node.hasAttribute && node.hasAttribute("data-tiddler-title")) {
var text = node.innerHTML,
s = text.indexOf("{"),
e = text.lastIndexOf("}");
if(node.hasAttribute("data-module") && s !== -1 && e !== -1) {
text = text.substring(s+1,e);
}
var fields = {text: text},
attributes = node.attributes;
for(var a=0; a<attributes.length; a++) {
if(attributes[a].nodeName.substr(0,13) === "data-tiddler-") {
fields[attributes[a].nodeName.substr(13)] = attributes[a].value;
}
}
return [fields];
} else {
return null;
}
},
t,result = [];
if(node) {
for(t = 0; t < node.childNodes.length; t++) {
var childNode = node.childNodes[t],
tiddlers = extractTextTiddlers(childNode);
tiddlers = tiddlers || extractModuleTiddlers(childNode);
if(tiddlers) {
result.push.apply(result,tiddlers);
}
}
}
return result;
}
});
 
$tw.loadTiddlersBrowser = function() {
// In the browser, we load tiddlers from certain elements
var containerIds = [
"libraryModules",
"modules",
"bootKernelPrefix",
"bootKernel",
"styleArea",
"storeArea",
"systemArea"
];
for(var t=0; t<containerIds.length; t++) {
$tw.wiki.addTiddlers($tw.wiki.deserializeTiddlers("(DOM)",document.getElementById(containerIds[t])));
}
// Load any preloaded tiddlers
if($tw.preloadTiddlers) {
$tw.wiki.addTiddlers($tw.preloadTiddlers);
}
};
 
} else {
 
/////////////////////////// Server definitions
 
/*
Get any encrypted tiddlers
*/
$tw.boot.decryptEncryptedTiddlers = function(callback) {
// Storing encrypted tiddlers on the server isn't supported yet
callback();
};
 
} // End of if($tw.browser && !$tw.node)
 
/////////////////////////// Node definitions
 
if($tw.node) {
 
/*
Load the tiddlers contained in a particular file (and optionally extract fields from the accompanying .meta file) returned as {filepath:,type:,tiddlers:[],hasMetaFile:}
*/
$tw.loadTiddlersFromFile = function(filepath,fields) {
var ext = path.extname(filepath),
extensionInfo = $tw.config.fileExtensionInfo[ext],
type = extensionInfo ? extensionInfo.type : null,
typeInfo = type ? $tw.config.contentTypeInfo[type] : null,
data = fs.readFileSync(filepath,typeInfo ? typeInfo.encoding : "utf8"),
tiddlers = $tw.wiki.deserializeTiddlers(ext,data,fields),
metafile = filepath + ".meta",
metadata;
if(ext !== ".json" && tiddlers.length === 1 && fs.existsSync(metafile)) {
metadata = fs.readFileSync(metafile,"utf8");
if(metadata) {
tiddlers = [$tw.utils.parseFields(metadata,tiddlers[0])];
}
}
return {filepath: filepath, type: type, tiddlers: tiddlers, hasMetaFile: !!metadata};
};
 
/*
A default set of files for TiddlyWiki to ignore during load.
This matches what NPM ignores, and adds "*.meta" to ignore tiddler
metadata files.
*/
$tw.boot.excludeRegExp = /^\.DS_Store$|^.*\.meta$|^\..*\.swp$|^\._.*$|^\.git$|^\.hg$|^\.lock-wscript$|^\.svn$|^\.wafpickle-.*$|^CVS$|^npm-debug\.log$/;
 
/*
Load all the tiddlers recursively from a directory, including honouring `tiddlywiki.files` files for drawing in external files. Returns an array of {filepath:,type:,tiddlers: [{..fields...}],hasMetaFile:}. Note that no file information is returned for externally loaded tiddlers, just the `tiddlers` property.
*/
$tw.loadTiddlersFromPath = function(filepath,excludeRegExp) {
excludeRegExp = excludeRegExp || $tw.boot.excludeRegExp;
var tiddlers = [];
if(fs.existsSync(filepath)) {
var stat = fs.statSync(filepath);
if(stat.isDirectory()) {
var files = fs.readdirSync(filepath);
// Look for a tiddlywiki.files file
if(files.indexOf("tiddlywiki.files") !== -1) {
// If so, process the files it describes
var filesInfo = JSON.parse(fs.readFileSync(filepath + path.sep + "tiddlywiki.files","utf8"));
$tw.utils.each(filesInfo.tiddlers,function(tidInfo) {
var typeInfo = $tw.config.contentTypeInfo[tidInfo.fields.type || "text/plain"],
pathname = path.resolve(filepath,tidInfo.file),
text = fs.readFileSync(pathname,typeInfo ? typeInfo.encoding : "utf8");
if(tidInfo.prefix) {
text = tidInfo.prefix + text;
}
if(tidInfo.suffix) {
text = text + tidInfo.suffix;
}
tidInfo.fields.text = text;
tiddlers.push({tiddlers: [tidInfo.fields]});
});
} else {
// If not, read all the files in the directory
$tw.utils.each(files,function(file) {
if(!excludeRegExp.test(file) && file !== "plugin.info") {
tiddlers.push.apply(tiddlers,$tw.loadTiddlersFromPath(filepath + path.sep + file,excludeRegExp));
}
});
}
} else if(stat.isFile()) {
tiddlers.push($tw.loadTiddlersFromFile(filepath));
}
}
return tiddlers;
};
 
/*
Load the tiddlers from a plugin folder, and package them up into a proper JSON plugin tiddler
*/
$tw.loadPluginFolder = function(filepath,excludeRegExp) {
excludeRegExp = excludeRegExp || $tw.boot.excludeRegExp;
if(fs.existsSync(filepath) && fs.statSync(filepath).isDirectory()) {
// Read the plugin information
var pluginInfo = JSON.parse(fs.readFileSync(filepath + path.sep + "plugin.info","utf8"));
// Read the plugin files
var pluginFiles = $tw.loadTiddlersFromPath(filepath,excludeRegExp);
// Save the plugin tiddlers into the plugin info
pluginInfo.tiddlers = pluginInfo.tiddlers || Object.create(null);
for(var f=0; f<pluginFiles.length; f++) {
var tiddlers = pluginFiles[f].tiddlers;
for(var t=0; t<tiddlers.length; t++) {
var tiddler= tiddlers[t];
if(tiddler.title) {
pluginInfo.tiddlers[tiddler.title] = tiddler;
}
}
}
// Give the plugin the same version number as the core if it doesn't have one
if(!("version" in pluginInfo)) {
pluginInfo.version = $tw.packageInfo.version;
}
// Use "plugin" as the plugin-type if we don't have one
if(!("plugin-type" in pluginInfo)) {
pluginInfo["plugin-type"] = "plugin";
}
pluginInfo.dependents = pluginInfo.dependents || [];
pluginInfo.type = "application/json";
// Set plugin text
pluginInfo.text = JSON.stringify({tiddlers: pluginInfo.tiddlers},null,4);
delete pluginInfo.tiddlers;
// Deserialise array fields (currently required for the dependents field)
for(var field in pluginInfo) {
if($tw.utils.isArray(pluginInfo[field])) {
pluginInfo[field] = $tw.utils.stringifyList(pluginInfo[field]);
}
}
return pluginInfo;
} else {
return null;
}
};
 
/*
name: Name of the plugin to find
paths: array of file paths to search for it
Returns the path of the plugin folder
*/
$tw.findLibraryItem = function(name,paths) {
var pathIndex = 0;
do {
var pluginPath = path.resolve(paths[pathIndex],"./" + name)
if(fs.existsSync(pluginPath) && fs.statSync(pluginPath).isDirectory()) {
return pluginPath;
}
} while(++pathIndex < paths.length);
return null;
};
 
/*
name: Name of the plugin to load
paths: array of file paths to search for it
*/
$tw.loadPlugin = function(name,paths) {
var pluginPath = $tw.findLibraryItem(name,paths);
if(pluginPath) {
var pluginFields = $tw.loadPluginFolder(pluginPath);
if(pluginFields) {
$tw.wiki.addTiddler(pluginFields);
}
}
};
 
/*
libraryPath: Path of library folder for these plugins (relative to core path)
envVar: Environment variable name for these plugins
Returns an array of search paths
*/
$tw.getLibraryItemSearchPaths = function(libraryPath,envVar) {
var pluginPaths = [path.resolve($tw.boot.corePath,libraryPath)],
env = process.env[envVar];
if(env) {
Array.prototype.push.apply(pluginPaths,env.split(":"));
}
return pluginPaths;
};
 
/*
plugins: Array of names of plugins (eg, "tiddlywiki/filesystemadaptor")
libraryPath: Path of library folder for these plugins (relative to core path)
envVar: Environment variable name for these plugins
*/
$tw.loadPlugins = function(plugins,libraryPath,envVar) {
if(plugins) {
var pluginPaths = $tw.getLibraryItemSearchPaths(libraryPath,envVar);
for(var t=0; t<plugins.length; t++) {
$tw.loadPlugin(plugins[t],pluginPaths);
}
}
};
 
/*
path: path of wiki directory
parentPaths: array of parent paths that we mustn't recurse into
*/
$tw.loadWikiTiddlers = function(wikiPath,parentPaths) {
parentPaths = parentPaths || [];
var wikiInfoPath = path.resolve(wikiPath,$tw.config.wikiInfo),
wikiInfo,
pluginFields;
// Bail if we don't have a wiki info file
if(fs.existsSync(wikiInfoPath)) {
wikiInfo = JSON.parse(fs.readFileSync(wikiInfoPath,"utf8"));
} else {
return null;
}
// Load any parent wikis
if(wikiInfo.includeWikis) {
parentPaths = parentPaths.slice(0);
parentPaths.push(wikiPath);
$tw.utils.each(wikiInfo.includeWikis,function(includedWikiPath) {
var resolvedIncludedWikiPath = path.resolve(wikiPath,includedWikiPath);
if(parentPaths.indexOf(resolvedIncludedWikiPath) === -1) {
$tw.loadWikiTiddlers(resolvedIncludedWikiPath,parentPaths);
} else {
$tw.utils.error("Cannot recursively include wiki " + resolvedIncludedWikiPath);
}
});
}
// Load any plugins, themes and languages listed in the wiki info file
$tw.loadPlugins(wikiInfo.plugins,$tw.config.pluginsPath,$tw.config.pluginsEnvVar);
$tw.loadPlugins(wikiInfo.themes,$tw.config.themesPath,$tw.config.themesEnvVar);
$tw.loadPlugins(wikiInfo.languages,$tw.config.languagesPath,$tw.config.languagesEnvVar);
// Load the wiki files, registering them as writable
var resolvedWikiPath = path.resolve(wikiPath,$tw.config.wikiTiddlersSubDir);
$tw.utils.each($tw.loadTiddlersFromPath(resolvedWikiPath),function(tiddlerFile) {
if(tiddlerFile.filepath) {
$tw.utils.each(tiddlerFile.tiddlers,function(tiddler) {
$tw.boot.files[tiddler.title] = {
filepath: tiddlerFile.filepath,
type: tiddlerFile.type,
hasMetaFile: tiddlerFile.hasMetaFile
};
});
}
$tw.wiki.addTiddlers(tiddlerFile.tiddlers);
});
// Save the original tiddler file locations if requested
if(wikiInfo.config && wikiInfo.config["retain-original-tiddler-path"]) {
var output = [];
for(var title in $tw.boot.files) {
output.push(title + ": " + path.relative(resolvedWikiPath,$tw.boot.files[title].filepath) + "\n");
}
$tw.wiki.addTiddler({title: "$:/config/OriginalTiddlerPaths", type: "application/x-tiddler-dictionary", text: output.join("")});
}
// Save the path to the tiddlers folder for the filesystemadaptor
$tw.boot.wikiTiddlersPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiTiddlersSubDir);
// Load any plugins within the wiki folder
var wikiPluginsPath = path.resolve(wikiPath,$tw.config.wikiPluginsSubDir);
if(fs.existsSync(wikiPluginsPath)) {
var pluginFolders = fs.readdirSync(wikiPluginsPath);
for(var t=0; t<pluginFolders.length; t++) {
pluginFields = $tw.loadPluginFolder(path.resolve(wikiPluginsPath,"./" + pluginFolders[t]));
if(pluginFields) {
$tw.wiki.addTiddler(pluginFields);
}
}
}
// Load any themes within the wiki folder
var wikiThemesPath = path.resolve(wikiPath,$tw.config.wikiThemesSubDir);
if(fs.existsSync(wikiThemesPath)) {
var themeFolders = fs.readdirSync(wikiThemesPath);
for(var t=0; t<themeFolders.length; t++) {
pluginFields = $tw.loadPluginFolder(path.resolve(wikiThemesPath,"./" + themeFolders[t]));
if(pluginFields) {
$tw.wiki.addTiddler(pluginFields);
}
}
}
// Load any languages within the wiki folder
var wikiLanguagesPath = path.resolve(wikiPath,$tw.config.wikiLanguagesSubDir);
if(fs.existsSync(wikiLanguagesPath)) {
var languageFolders = fs.readdirSync(wikiLanguagesPath);
for(var t=0; t<languageFolders.length; t++) {
pluginFields = $tw.loadPluginFolder(path.resolve(wikiLanguagesPath,"./" + languageFolders[t]));
if(pluginFields) {
$tw.wiki.addTiddler(pluginFields);
}
}
}
return wikiInfo;
};
 
$tw.loadTiddlersNode = function() {
// Load the boot tiddlers
$tw.utils.each($tw.loadTiddlersFromPath($tw.boot.bootPath),function(tiddlerFile) {
$tw.wiki.addTiddlers(tiddlerFile.tiddlers);
});
// Load the core tiddlers
$tw.wiki.addTiddler($tw.loadPluginFolder($tw.boot.corePath));
// Load the tiddlers from the wiki directory
if($tw.boot.wikiPath) {
$tw.boot.wikiInfo = $tw.loadWikiTiddlers($tw.boot.wikiPath);
}
};
 
// End of if($tw.node)
}
 
/////////////////////////// Main startup function called once tiddlers have been decrypted
 
/*
Startup TiddlyWiki
*/
$tw.boot.startup = function(options) {
options = options || {};
// Get the URL hash and check for safe mode
$tw.locationHash = "#";
if($tw.browser && !$tw.node) {
if(location.hash === "#:safe") {
$tw.safeMode = true;
} else {
$tw.locationHash = $tw.utils.getLocationHash();
}
}
// Initialise some more $tw properties
$tw.utils.deepDefaults($tw,{
modules: { // Information about each module
titles: Object.create(null), // hashmap by module title of {fn:, exports:, moduleType:}
types: {} // hashmap by module type of hashmap of exports
},
config: { // Configuration overridables
pluginsPath: "../plugins/",
themesPath: "../themes/",
languagesPath: "../languages/",
editionsPath: "../editions/",
wikiInfo: "./tiddlywiki.info",
wikiPluginsSubDir: "./plugins",
wikiThemesSubDir: "./themes",
wikiLanguagesSubDir: "./languages",
wikiTiddlersSubDir: "./tiddlers",
wikiOutputSubDir: "./output",
jsModuleHeaderRegExpString: "^\\/\\*\\\\(?:\\r?\\n)((?:^[^\\r\\n]*(?:\\r?\\n))+?)(^\\\\\\*\\/$(?:\\r?\\n)?)",
fileExtensionInfo: Object.create(null), // Map file extension to {type:}
contentTypeInfo: Object.create(null), // Map type to {encoding:,extension:}
pluginsEnvVar: "TIDDLYWIKI_PLUGIN_PATH",
themesEnvVar: "TIDDLYWIKI_THEME_PATH",
languagesEnvVar: "TIDDLYWIKI_LANGUAGE_PATH",
editionsEnvVar: "TIDDLYWIKI_EDITION_PATH"
}
});
if(!$tw.boot.tasks.readBrowserTiddlers) {
// For writable tiddler files, a hashmap of title to {filepath:,type:,hasMetaFile:}
$tw.boot.files = Object.create(null);
// System paths and filenames
$tw.boot.bootPath = path.dirname(module.filename);
$tw.boot.corePath = path.resolve($tw.boot.bootPath,"../core");
// If there's no arguments then default to `--help`
if($tw.boot.argv.length === 0) {
$tw.boot.argv = ["--help"];
}
// If the first command line argument doesn't start with `--` then we
// interpret it as the path to the wiki folder, which will otherwise default
// to the current folder
if($tw.boot.argv[0] && $tw.boot.argv[0].indexOf("--") !== 0) {
$tw.boot.wikiPath = $tw.boot.argv[0];
$tw.boot.argv = $tw.boot.argv.slice(1);
} else {
$tw.boot.wikiPath = process.cwd();
}
// Read package info
$tw.packageInfo = require("../package.json");
// Check node version number
if($tw.utils.checkVersions($tw.packageInfo.engines.node.substr(2),process.version.substr(1))) {
$tw.utils.error("TiddlyWiki5 requires node.js version " + $tw.packageInfo.engines.node);
}
}
// Add file extension information
$tw.utils.registerFileType("text/vnd.tiddlywiki","utf8",".tid");
$tw.utils.registerFileType("application/x-tiddler","utf8",".tid");
$tw.utils.registerFileType("application/x-tiddlers","utf8",".multids");
$tw.utils.registerFileType("application/x-tiddler-html-div","utf8",".tiddler");
$tw.utils.registerFileType("text/vnd.tiddlywiki2-recipe","utf8",".recipe");
$tw.utils.registerFileType("text/plain","utf8",".txt");
$tw.utils.registerFileType("text/css","utf8",".css");
$tw.utils.registerFileType("text/html","utf8",".html");
$tw.utils.registerFileType("application/hta","utf16le",".hta",{deserializerType:"text/html"});
$tw.utils.registerFileType("application/javascript","utf8",".js");
$tw.utils.registerFileType("application/json","utf8",".json");
$tw.utils.registerFileType("application/pdf","base64",".pdf",{flags:["image"]});
$tw.utils.registerFileType("image/jpeg","base64",".jpg",{flags:["image"]});
$tw.utils.registerFileType("image/png","base64",".png",{flags:["image"]});
$tw.utils.registerFileType("image/gif","base64",".gif",{flags:["image"]});
$tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]});
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("application/font-woff","base64",".woff");
// Create the wiki store for the app
$tw.wiki = new $tw.Wiki();
// Install built in tiddler fields modules
$tw.Tiddler.fieldModules = $tw.modules.getModulesByTypeAsHashmap("tiddlerfield");
// Install the tiddler deserializer modules
$tw.Wiki.tiddlerDeserializerModules = Object.create(null);
$tw.modules.applyMethods("tiddlerdeserializer",$tw.Wiki.tiddlerDeserializerModules);
// Load tiddlers
if($tw.boot.tasks.readBrowserTiddlers) {
$tw.loadTiddlersBrowser();
} else {
$tw.loadTiddlersNode();
}
// Unpack plugin tiddlers
$tw.wiki.readPluginInfo();
$tw.wiki.registerPluginTiddlers("plugin");
$tw.wiki.unpackPluginTiddlers();
// Process "safe mode"
if($tw.safeMode) {
$tw.wiki.processSafeMode();
}
// Register typed modules from the tiddlers we've just loaded
$tw.wiki.defineTiddlerModules();
// And any modules within plugins
$tw.wiki.defineShadowModules();
// Make sure the crypto state tiddler is up to date
if($tw.crypto) {
$tw.crypto.updateCryptoStateTiddler();
}
// Gather up any startup modules
$tw.boot.remainingStartupModules = []; // Array of startup modules
$tw.modules.forEachModuleOfType("startup",function(title,module) {
if(module.startup) {
$tw.boot.remainingStartupModules.push(module);
}
});
// Keep track of the startup tasks that have been executed
$tw.boot.executedStartupModules = Object.create(null);
$tw.boot.disabledStartupModules = $tw.boot.disabledStartupModules || [];
// Repeatedly execute the next eligible task
$tw.boot.executeNextStartupTask();
};
 
/*
Execute the remaining eligible startup tasks
*/
$tw.boot.executeNextStartupTask = function() {
// Find the next eligible task
var taskIndex = 0, task,
asyncTaskCallback = function() {
if(task.name) {
$tw.boot.executedStartupModules[task.name] = true;
}
return $tw.boot.executeNextStartupTask();
};
while(taskIndex < $tw.boot.remainingStartupModules.length) {
task = $tw.boot.remainingStartupModules[taskIndex];
if($tw.boot.isStartupTaskEligible(task)) {
// Remove this task from the list
$tw.boot.remainingStartupModules.splice(taskIndex,1);
// Assemble log message
var s = ["Startup task:",task.name];
if(task.platforms) {
s.push("platforms:",task.platforms.join(","));
}
if(task.after) {
s.push("after:",task.after.join(","));
}
if(task.before) {
s.push("before:",task.before.join(","));
}
$tw.boot.log(s.join(" "));
// Execute task
if(!$tw.utils.hop(task,"synchronous") || task.synchronous) {
task.startup();
if(task.name) {
$tw.boot.executedStartupModules[task.name] = true;
}
return $tw.boot.executeNextStartupTask();
} else {
task.startup(asyncTaskCallback);
return true;
}
}
taskIndex++;
}
return false;
};
 
/*
Returns true if we are running on one platforms specified in a task modules `platforms` array
*/
$tw.boot.doesTaskMatchPlatform = function(taskModule) {
var platforms = taskModule.platforms;
if(platforms) {
for(var t=0; t<platforms.length; t++) {
if((platforms[t] === "browser" && !$tw.browser) || (platforms[t] === "node" && !$tw.node)) {
return false;
}
}
}
return true;
};
 
$tw.boot.isStartupTaskEligible = function(taskModule) {
var t;
// Check that the platform is correct
if(!$tw.boot.doesTaskMatchPlatform(taskModule)) {
return false;
}
var name = taskModule.name,
remaining = $tw.boot.remainingStartupModules;
if(name) {
// Fail if this module is disabled
if($tw.boot.disabledStartupModules.indexOf(name) !== -1) {
return false;
}
// Check that no other outstanding tasks must be executed before this one
for(t=0; t<remaining.length; t++) {
var task = remaining[t];
if(task.before && task.before.indexOf(name) !== -1) {
if($tw.boot.doesTaskMatchPlatform(task) || (task.name && $tw.boot.disabledStartupModules.indexOf(name) !== -1)) {
return false;
}
}
}
}
// Check that all of the tasks that we must be performed after has been done
var after = taskModule.after;
if(after) {
for(t=0; t<after.length; t++) {
if(!$tw.boot.executedStartupModules[after[t]]) {
return false;
}
}
}
return true;
};
 
/////////////////////////// Main boot function to decrypt tiddlers and then startup
 
$tw.boot.boot = function() {
// Initialise crypto object
$tw.crypto = new $tw.utils.Crypto();
// Initialise password prompter
if($tw.browser && !$tw.node) {
$tw.passwordPrompt = new $tw.utils.PasswordPrompt();
}
// Preload any encrypted tiddlers
$tw.boot.decryptEncryptedTiddlers(function() {
// Startup
$tw.boot.startup();
});
};
 
/////////////////////////// Autoboot in the browser
 
if($tw.browser && !$tw.boot.suppressBoot) {
$tw.boot.boot();
}
 
return $tw;
 
});
 
if(typeof(exports) !== "undefined") {
exports.TiddlyWiki = _boot;
} else {
_boot(window.$tw);
}
</script>
</div>
</body>
</html>
</html>

Latest revision as of 19:54, 25 July 2014

<html> <?php

phpinfo() ;
?>

</html>